sui_getMoveFunctionArgTypes - Sui

Example code for the sui_getMoveFunctionArgTypes JSON-RPC method. Complete guide on how to use sui_getMoveFunctionArgTypes JSON-RPC in GetBlock Web3 documentation.

This method returns the argument types of a Move function on the SUI network. This is useful for understanding function signatures, building transaction calls, and validating inputs before execution.

Parameters

Parameter
Type
Required
Description

package

ObjectID

Yes

Package object ID

module

string

Yes

Module name

function

string

Yes

Function name

Request Example

cURL
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "sui_getMoveFunctionArgTypes",
  "params": [
    "0xa0a7b108f5023b7356f2c6a4be6f058e267aae38e08260c7d519d8641897490c",
    "suifrens",
    "mint"
  ]
}'

Response Example

Response Parameters

Parameter
Type
Description

result

array

Array of argument type descriptors

Argument Types

  • Pure - Primitive type (u8, u64, bool, address, vector, etc.)

  • Object: ByValue - Object passed by value (consumed)

  • Object: ByImmutableReference - Immutable object reference

  • Object: ByMutableReference - Mutable object reference

Use Cases

  • Build transaction calls programmatically

  • Validate function parameters

  • Generate type-safe SDK code

  • Document smart contract interfaces

Error Handling

Error Code
Description

-32602

Invalid params - invalid package/module/function

-32603

Internal error - node issues

FunctionNotFound

Function does not exist

SDK Integration

Last updated

Was this helpful?