suix_getDynamicFieldObject - Sui

Example code for the suix_getDynamicFieldObject JSON-RPC method. Complete guide on how to use suix_getDynamicFieldObject JSON-RPC in GetBlock Web3 documentation.

This method returns the object information of a specific dynamic field on the SUI network. While suix_getDynamicFields lists all dynamic fields. This method retrieves the full data for a single dynamic field when you know its name and type.

Parameters

Parameter
Type
Required
Description

parent_object_id

ObjectID

Yes

The parent object ID

name

DynamicFieldName

Yes

The dynamic field name (type and value)

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": "suix_getDynamicFieldObject",
  "params": [
    "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
    {
      "type": "0x1::string::String",
      "value": "key_name"
    }
  ]
}'

Response Example

Response Parameters

Parameter
Type
Description

objectId

string

The dynamic field object ID

version

string

Object version

digest

string

Object digest

type

string

Full Move type

content

object

Object content with fields

Use Cases

  • Retrieve specific map entries

  • Read table values by key

  • Access object attachments

  • Query nested dynamic data

Error Handling

Error Code
Description

-32602

Invalid params - malformed input

-32603

Internal error - node issues

NotFound

Dynamic field not found

SDK Integration

Last updated

Was this helpful?