Skip to main content

Get Function

Get normalized Move function definition via MovePackageService/GetFunction. Provides canonical function definitions for code generation and IDEs.

Service

sui.rpc.v2.MovePackageService

Parity

Direct

This method has a direct mapping from the JSON-RPC method sui_getNormalizedMoveFunction.

Request

Parameters

{
"package_id": "0x2",
"module_name": "coin",
"name": "balance"
}

Example (grpcurl)

grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{"package_id":"0x2","module_name":"coin","name":"balance"}' \
grpc.surflux.dev:443 \
sui.rpc.v2.MovePackageService/GetFunction
Run in Playground

Response

The response structure is defined by the sui/rpc/v2/move_package_service.proto definition.

Response Fields

FieldTypeDescription
functionFunctionDescriptorSee proto definition
info

For full field definitions, please refer to the Sui Protobuf definitions.