Extended API

iotax_getDynamicFieldObject

Return the dynamic field object information for a specified object

parent_object_id< ObjectID >

  • Required: yes

  • Description: The ID of the queried parent object

name< DynamicFieldName >

  • Required: yes

  • Description: The Name of the dynamic field

Result

IotaObjectResponse< IotaObjectResponse >

Parameters

data< ObjectData | null >

  • Required: no

error< ObjectResponseError | null >

  • Required: no

Example

Gets the information for the dynamic field the request provides.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getDynamicFieldObject",
  "params": [
    "0x5ea6f7a348f4a7bd1a9ab069eb7f63865de3075cc5a4e62432f634b50fd2bb2b",
    {
      "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
      "value": "some_value"
    }
  ]
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "data": {
      "objectId": "0x5ea6f7a348f4a7bd1a9ab069eb7f63865de3075cc5a4e62432f634b50fd2bb2b",
      "version": "1",
      "digest": "FnxePMX8y7AqX5mRL4nCcK4xecSrpHrd85c3sJDmh5uG",
      "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
      "owner": {
        "AddressOwner": "0x013d1eb156edcc1bedc3b1af1be1fe41671856fd3450dc5574abd53c793c9f22"
      },
      "previousTransaction": "Faiv4yqGR4HjAW8WhMN1NHHNStxXgP3u22dVPyvLad2z",
      "storageRebate": "100",
      "content": {
        "dataType": "moveObject",
        "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
        "fields": {}
      }
    }
  },
  "id": 1
}

iotax_getDynamicFieldsObject

Return the list of dynamic field objects owned by an object.

Parameters

parent_object_id< ObjectID >

  • Required: yes

  • Description: The ID of the parent object

cursor< ObjectID >

  • Required: no

  • Description: An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.

limit< uint >

  • Required: no

  • Description: Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.

Result

DynamicFieldPage< Page_for_DynamicFieldInfo_and_ObjectID >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Gets dynamic fields for the object the request provides in a paginated list of limit dynamic field results per page. The default limit is 50.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getDynamicFields",
  "params": [
    "0xcfd10bca4d517e9452ad5486d69ee482b758c2399039dbbedd5db24385e934d6",
    "0x3ddea0f8c3da994d9ead562ce76e36fdef6a382da344930c73d1298b0e9644b8",
    3
  ]
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "name": {
          "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
          "value": "some_value"
        },
        "bcsEncoding": "base64",
        "bcsName": "FDB4OTo6dGVzdDo6VGVzdEZpZWxk",
        "type": "DynamicField",
        "objectType": "test",
        "objectId": "0x82b2fd67344691abd0efc771941b948ad35360b08e449fbbc28b0641175bf60b",
        "version": 1,
        "digest": "P2fGrUFbsF576cFxXYXrp1PskZHo2XKvbEoxL14qtnr"
      },
      {
        "name": {
          "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
          "value": "some_value"
        },
        "bcsEncoding": "base64",
        "bcsName": "FDB4OTo6dGVzdDo6VGVzdEZpZWxk",
        "type": "DynamicField",
        "objectType": "test",
        "objectId": "0x21564fc5a68ace997461b098c1d1f3ccbde241d8fdf562db36bc1423ee10cecb",
        "version": 1,
        "digest": "8Nmpatir33R88Xow2td3dpezMm1gsQJD19VThwR1Y8T5"
      },
      {
        "name": {
          "type": "0x0000000000000000000000000000000000000000000000000000000000000009::test::TestField",
          "value": "some_value"
        },
        "bcsEncoding": "base64",
        "bcsName": "FDB4OTo6dGVzdDo6VGVzdEZpZWxk",
        "type": "DynamicField",
        "objectType": "test",
        "objectId": "0x7e00acf5386662fa062483ba507b1e9e3039750f0a270f2e12441ad7f611a5f7",
        "version": 1,
        "digest": "J2n2gEG8R9P9nMep8mRVLjttxcDXQnWSH9KmrRsnGSg2"
      }
    ],
    "nextCursor": "0x671832358f25bfacde706e528df4e15bb8de6dadd21835dfe44f4973139c15f9",
    "hasNextPage": true
  },
  "id": 1
}

iotax_getOwnedObjects

Return the list of objects owned by an address. Note that if the address owns more than QUERY_MAX_RESULT_LIMIT objects, the pagination is not accurate, because previous page may have been updated when the next page is fetched. Please use iotax_queryObjects if this is a concern.

Parameters

address< IotaAddress >

  • Required: yes

  • Description: The owner's IOTA address

query< ObjectResponseQuery >

  • Required: no

  • Description: The objects query criteria.

cursor< ObjectID >

  • Required: no

  • Description: An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.

limit< uint >

  • Required: no

  • Description: Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.

Result

ObjectsPage< Page_for_IotaObjectResponse_and_ObjectID >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Returns all the objects the address provided in the request owns and that match the filter. By default, only the digest value is returned, but the request returns additional information by setting the relevant keys to true. A cursor value is also provided, so the list of results begin after that value.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getOwnedObjects",
  "params": [
    "0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f",
    {
      "filter": {
        "MatchAll": [
          {
            "StructType": "0x2::coin::Coin<0x2::iota::IOTA>"
          },
          {
            "AddressOwner": "0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f"
          },
          {
            "Version": "13488"
          }
        ]
      },
      "options": {
        "showType": true,
        "showOwner": true,
        "showPreviousTransaction": true,
        "showDisplay": false,
        "showContent": false,
        "showBcs": false,
        "showStorageRebate": false
      }
    },
    "0x8a417a09c971859f8f2b8ec279438a25d8876ea3c60e345ac3861444136b4a1b",
    3
  ]
}

Response:

{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "data": {
          "objectId": "0xd87765d1aadec2db8cc24c312542c8359b6b5e3bfeab524e5edaad3a204b4053",
          "version": "13488",
          "digest": "8qCvxDHh5LtDfF95Ci9G7vvQN2P6y4v55S9xoKBYp7FM",
          "type": "0x2::coin::Coin<0x2::iota::IOTA>",
          "owner": {
            "AddressOwner": "0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f"
          },
          "previousTransaction": "kniF9zCBVYevxq3ZmtKxDDJk27N1qEgwkDtPiyeve4Y",
          "storageRebate": "100"
        }
      },
      {
        "data": {
          "objectId": "0x26ed170e0427f9416a614d23284116375c16bd317738fd2c7a885362e04923f5",
          "version": "13488",
          "digest": "5Ka3vDaDy9h5UYk3Maz3vssWHrhbcGXQgwg8fL2ygyTi",
          "type": "0x2::coin::Coin<0x2::iota::IOTA>",
          "owner": {
            "AddressOwner": "0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f"
          },
          "previousTransaction": "FLSfkL1pVTxv724z5kfPbTq2KsWP1HEKBwZQ57uRZU11",
          "storageRebate": "100"
        }
      },
      {
        "data": {
          "objectId": "0x2aea16d6fb49b7d1ae51f33b01ed8e1ac66916858610c124bb6fd73bb13e141c",
          "version": "13488",
          "digest": "D3hfhfecVcmRcqNEkxkoFMzbuXvBqWj1JkCNU9zbnYMo",
          "type": "0x2::coin::Coin<0x2::iota::IOTA>",
          "owner": {
            "AddressOwner": "0x0cd4bb4d4f520fe9bbf0cf1cebe3f2549412826c3c9261bff9786c240123749f"
          },
          "previousTransaction": "GEoTGQuWicnPLM9Rg3vW1Q2y3kvnAgEkbyn8Z3RnAYai",
          "storageRebate": "100"
        }
      }
    ],
    "nextCursor": "0x2aea16d6fb49b7d1ae51f33b01ed8e1ac66916858610c124bb6fd73bb13e141c",
    "hasNextPage": true
  },
  "id": 1
}

iotax_getTotalTransactions

Return the total number of transactions. Exclusively served by the indexer.

Parameters

None

Result

BigInt<u64>< BigInt_for_uint64 >

iotax_queryEvents

Return list of events for a specified query criteria.

Parameters

descending_order< Boolean >

  • Required: no

query< ObjectResponseQuery >

  • Required: no

  • Description: The objects query criteria.

cursor< ObjectID >

  • Required: no

  • Description: An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.

limit< uint >

  • Required: no

  • Description: Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.

Result

EventPage< Page_for_Event_and_EventID >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Returns the events for a specified query criteria.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_queryEvents",
  "params": [
    {
      "MoveModule": {
        "package": "0x9c76d5157eaa77c41a7bfda8db98a8e8080f7cb53b7313088ed085c73f866f21",
        "module": "test"
      }
    },
    {
      "txDigest": "EnySDWe22mnp35umt47kifqXvvchBqTzAoyoPXaH3rfK",
      "eventSeq": "1"
    },
    100,
    false
  ]
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "id": {
          "txDigest": "FUMhRSj76es8MYeaRYeaBnppk56cuEehKwL2CiU82U7B",
          "eventSeq": "1"
        },
        "packageId": "0xd3d707164b2a378eee639ebc2690873d2f7dd97d60bdd8f0b9935a5c791b096d",
        "transactionModule": "test",
        "sender": "0x84bd999f9ff7a1804872957fafa528628a24386298faa98850887f64da841b87",
        "type": "0x3::test::Test<0x3::test::Test>",
        "parsedJson": "some_value",
        "bcsEncoding": "base64",
        "bcs": ""
      },
      {
        "id": {
          "txDigest": "CkEYWW2zxTCGBLvUcTARhyX92fu2uc7cnCUXfCiqAypp",
          "eventSeq": "1"
        },
        "packageId": "0xd3d707164b2a378eee639ebc2690873d2f7dd97d60bdd8f0b9935a5c791b096d",
        "transactionModule": "test",
        "sender": "0x279efd098d59a66a3d9adc87cce81fe9ec69dc8105b2b60140589ec8be44c29f",
        "type": "0x3::test::Test<0x3::test::Test>",
        "parsedJson": "some_value",
        "bcsEncoding": "base64",
        "bcs": ""
      },
      {
        "id": {
          "txDigest": "Eg3ynETJfTfPKyvJzq3VLG6MngURYHPMjjUJ3Xt1t7tf",
          "eventSeq": "1"
        },
        "packageId": "0xd3d707164b2a378eee639ebc2690873d2f7dd97d60bdd8f0b9935a5c791b096d",
        "transactionModule": "test",
        "sender": "0x289be027d2a94f744b4c59fda7b528f9c59f430eaba84b8bee9b43a30f9cc83f",
        "type": "0x3::test::Test<0x3::test::Test>",
        "parsedJson": "some_value",
        "bcsEncoding": "base64",
        "bcs": ""
      },
      {
        "id": {
          "txDigest": "EnySDWe22mnp35umt47kifqXvvchBqTzAoyoPXaH3rfK",
          "eventSeq": "1"
        },
        "packageId": "0xd3d707164b2a378eee639ebc2690873d2f7dd97d60bdd8f0b9935a5c791b096d",
        "transactionModule": "test",
        "sender": "0xa395759ca37c6e1ffc179184e98a6f9a2da5d78f6e34b0e5044ed52a6bc0a1bc",
        "type": "0x3::test::Test<0x3::test::Test>",
        "parsedJson": "some_value",
        "bcsEncoding": "base64",
        "bcs": ""
      }
    ],
    "nextCursor": {
      "txDigest": "EnySDWe22mnp35umt47kifqXvvchBqTzAoyoPXaH3rfK",
      "eventSeq": "1"
    },
    "hasNextPage": false
  },
  "id": 1
}

iotax_queryTransactionBlocks

Return list of transactions for a specified query criteria.

Parameters

descending_order< Boolean >

  • Required: no

query< ObjectResponseQuery >

  • Required: no

  • Description: The objects query criteria.

cursor< ObjectID >

  • Required: no

  • Description: An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.

limit< uint >

  • Required: no

  • Description: Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.

Result

TransactionBlocksPage< Page_for_TransactionBlockResponse_and_TransactionDigest >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Returns the transaction digest for specified query criteria.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_queryTransactionBlocks",
  "params": [
    {
      "filter": {
        "InputObject": "0x93633829fcba6d6e0ccb13d3dbfe7614b81ea76b255e5d435032cd8595f37eb8"
      },
      "options": null
    },
    "HxidAfFfyr4kXSiWeVq1J6Tk526YUVDoSUY5PSnS4tEJ",
    100,
    false
  ]
}

Response

{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "digest": "GUPcK4cmRmgsTFr52ab9f6fnzNVg3Lz6hF2aXFcsRzaD"
      },
      {
        "digest": "B2iV1SVbBjgTKfbJKPQrvTT6F3kNdekFuBwY9tQcAxV2"
      },
      {
        "digest": "8QrPa4x9iNG5r2zQfmeH8pJoVjjtq9AGzp8rp2fxi8Sk"
      },
      {
        "digest": "3nek86HEjXZ7K3EtrAcBG4wMrCS21gqr8BqwwC6M6P7F"
      }
    ],
    "nextCursor": "3nek86HEjXZ7K3EtrAcBG4wMrCS21gqr8BqwwC6M6P7F",
    "hasNextPage": false
  },
  "id": 1
}

iotax_subscribeEvent

Subscribe to a stream of IOTA event

Parameters

filter< EventFilter >

  • Required: Yes

  • Description: The filter criteria of the event stream. See Event filter documentation for examples.

Result

IotaEvent< Event >

Parameters

id< EventID >

  • Required: Yes

  • Description: Sequential event ID, ie (transaction seq number, event seq number). 1) Serves as a unique event ID for each fullnode 2) Also serves to sequence events for the purposes of pagination and querying. A higher id is an event seen later by that fullnode. This ID is the "cursor" for event querying.

packageId< ObjectID >

  • Required: Yes

  • Description: Move package where this event was emitted.

parsedJson< >

  • Required: Yes

  • Description: Parsed json value of the event

sender< IotaAddress >

  • Required: Yes

  • Description: Sender's IOTA address.

timestampMs< BigInt_for_uint64 | null >

  • Required: No

  • Description: UTC timestamp in milliseconds since epoch (1/1/1970)

transactionModule< string >

  • Required: Yes

  • Description: Move module where this event was emitted.

type< string >

  • Required: Yes

  • Description:Move event type.

iotax_subscribeEvent

Subscribe to a stream of IOTA event

Parameters

filter< EventFilter >

  • Required: Yes

  • Description: The filter criteria of the event stream. See Event filter documentation for examples.

Result

IotaTransactionBlockEffects< TransactionBlockEffects >

Last updated