Skip to main content

sui_getNormalizedMoveFunction

Return a structured representation of Move function.

Return a structured representation of Move function.

Parameters

  • package : <ObjectID> -
  • module_name : <string> -
  • function_name : <string> -

Returns

SuiMoveNormalizedFunction : <SuiMoveNormalizedFunction>

  • is_entry : <boolean>
  • parameters : <[SuiMoveNormalizedType]>
  • return_ : <[SuiMoveNormalizedType]>
  • type_parameters : <[SuiMoveAbilitySet]>
  • visibility : <SuiMoveVisibility>

Example Request and Result for sui_getNormalizedMoveFunction

Request

curl --location 'https://sui-testnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_getNormalizedMoveFunction",
"params": [
"0x0000000000000000000000000000000000000000000000000000000000000002",
"bag",
"borrow"
]
}'

Result

{
"jsonrpc": "2.0",
"result": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
},
{
"abilities": [
"Store"
]
}
],
"parameters": [
{
"Reference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
}
],
"return": [
{
"Reference": {
"TypeParameter": 1
}
}
]
},
"id": 1
}