sui_getNormalizedMoveFunction - Sui
Example code for the sui_getNormalizedMoveFunction JSON-RPC method. Complete guide on how to use sui_getNormalizedMoveFunction JSON-RPC in GetBlock Web3 documentation.
This method returns a structured representation of a Move function on the SUI network. This provides complete function metadata, including visibility, type parameters, parameter types, and return types.
Parameters
package
ObjectID
Yes
Package object ID
module_name
string
Yes
Module name
function_name
string
Yes
Function name
Request Example
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getNormalizedMoveFunction",
"params": [
"0x9c4eb6769ca8b6a23efeb7298cf0a8d0b837b78749c2cfc711c42036cc6b7621",
"moduleName",
"functionName"
]
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "sui_getNormalizedMoveFunction",
"params": [
"0x9c4eb6769ca8b6a23efeb7298cf0a8d0b837b78749c2cfc711c42036cc6b7621",
"moduleName",
"functionName"
]
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response Example
Response Parameters
visibility
string
Public, Private, or Friend
isEntry
boolean
Whether callable as entry point
typeParameters
array
Generic type parameter constraints
parameters
array
Function parameter types
return
array
Return types
Use Cases
Inspect function signatures
Generate API documentation
Build type-safe transaction builders
Analyze smart contract interfaces
Error Handling
-32602
Invalid params
-32603
Internal error
FunctionNotFound
Function not found
SDK Integration
Last updated
Was this helpful?