Get Datatype
Get Move struct definition via MovePackageService/GetDatatype. Returns field names, types, and abilities for object deserialization.
Service
sui.rpc.v2.MovePackageService
Parity
Direct
This method has a direct mapping from the JSON-RPC method sui_getNormalizedMoveStruct.
Request
Parameters
{
"package_id": "0x2",
"module_name": "coin",
"name": "Coin"
}
Example (grpcurl)
grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{"package_id":"0x2","module_name":"coin","name":"Coin"}' \
grpc.surflux.dev:443 \
sui.rpc.v2.MovePackageService/GetDatatype
Response
The response structure is defined by the sui/rpc/v2/move_package_service.proto definition.
Response Fields
| Field | Type | Description |
|---|---|---|
datatype | DatatypeDescriptor | See proto definition |
info
For full field definitions, please refer to the Sui Protobuf definitions.