sui_getNormalizedMoveStruct - Sui
Example code for the sui_getNormalizedMoveStruct JSON-RPC method. Complete guide on how to use sui_getNormalizedMoveStruct JSON-RPC in GetBlock Web3 documentation.
The sui_getNormalizedMoveStruct method returns a structured representation of a Move struct on the SUI network. This provides complete struct metadata including abilities, type parameters, and field definitions.
Parameters
package
ObjectID
Yes
Package object ID
module_name
string
Yes
Module name
struct_name
string
Yes
Struct name
Request Example
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getNormalizedMoveStruct",
"params": [
"0xc95b9e341bc3aba1654bdbad707dcd773bd6309363447ef3fe58a960de92aa93",
"module",
"StructName"
]
}'const axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'sui_getNormalizedMoveStruct',
params: [
'0xc95b9e341bc3aba1654bdbad707dcd773bd6309363447ef3fe58a960de92aa93',
'module',
'StructName'
]
};
axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));Response Example
Response Parameters
abilities
object
Struct abilities (copy, drop, store, key)
typeParameters
array
Generic type parameters
fields
array
Array of field definitions
Use Cases
Understand object structure
Generate type definitions
Build deserialization logic
Document data types
Error Handling
-32602
Invalid params
-32603
Internal error
StructNotFound
Struct not found
SDK Integration
Last updated
Was this helpful?