Skip to main content

sui_getNormalizedMoveModule

Return a structured representation of Move module

Return a structured representation of Move module

Parameters

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

Returns

SuiMoveNormalizedModule : <SuiMoveNormalizedModule>

  • address : <string>
  • exposed_functions : <object>
  • file_format_version : <uint32>
  • friends : <[SuiMoveModuleId]>
  • name : <string>
  • structs : <object>

Example Request and Result for sui_getNormalizedMoveModule

Request

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

Result:

{
"jsonrpc": "2.0",
"result": {
"fileFormatVersion": 6,
"address": "0x2",
"name": "bag",
"friends": [],
"structs": {
"Bag": {
"abilities": {
"abilities": [
"Store",
"Key"
]
},
"typeParameters": [],
"fields": [
{
"name": "id",
"type": {
"Struct": {
"address": "0x2",
"module": "object",
"name": "UID",
"typeArguments": []
}
}
},
{
"name": "size",
"type": "U64"
}
]
}
},
"exposedFunctions": {
"add": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
},
{
"abilities": [
"Store"
]
}
],
"parameters": [
{
"MutableReference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
},
{
"TypeParameter": 1
}
],
"return": []
},
"borrow": {
"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
}
}
]
},
"borrow_mut": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
},
{
"abilities": [
"Store"
]
}
],
"parameters": [
{
"MutableReference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
}
],
"return": [
{
"MutableReference": {
"TypeParameter": 1
}
}
]
},
"contains": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
}
],
"parameters": [
{
"Reference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
}
],
"return": [
"Bool"
]
},
"contains_with_type": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
},
{
"abilities": [
"Store"
]
}
],
"parameters": [
{
"Reference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
}
],
"return": [
"Bool"
]
},
"destroy_empty": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [],
"parameters": [
{
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
],
"return": []
},
"is_empty": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [],
"parameters": [
{
"Reference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
}
],
"return": [
"Bool"
]
},
"length": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [],
"parameters": [
{
"Reference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
}
],
"return": [
"U64"
]
},
"new": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [],
"parameters": [
{
"MutableReference": {
"Struct": {
"address": "0x2",
"module": "tx_context",
"name": "TxContext",
"typeArguments": []
}
}
}
],
"return": [
{
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
]
},
"remove": {
"visibility": "Public",
"isEntry": false,
"typeParameters": [
{
"abilities": [
"Copy",
"Drop",
"Store"
]
},
{
"abilities": [
"Store"
]
}
],
"parameters": [
{
"MutableReference": {
"Struct": {
"address": "0x2",
"module": "bag",
"name": "Bag",
"typeArguments": []
}
}
},
{
"TypeParameter": 0
}
],
"return": [
{
"TypeParameter": 1
}
]
}
}
},
"id": 1
}