For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

IOTA — iota, unsafe (1/3)

API reference for IOTA. All methods ->

Part 1 of 3: 1 · 2 · 3

iota_getNormalizedMoveModulesByPackage

Retrieves all normalized Move modules in a package.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • package< ObjectID > (required): the object ID of the Move package whose modules should be retrieved in normalized form.

Returns

BTreeMap<String,IotaMoveNormalizedModule>< IotaMoveNormalizedModule >

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getNormalizedMoveModulesByPackage",
"params": [
"0x1b33a3cf7eb5dde04ed7ae571db1763006811ff6b7bb35b3d1c780de153af9dd"
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"result": {
"fileFormatVersion": 6,
"address": "0x1b33a3cf7eb5dde04ed7ae571db1763006811ff6b7bb35b3d1c780de153af9dd",
"name": "request",
"friends": [],
"structs": {},
"exposedFunctions": {}
},
"id": 1
}

iota_getNormalizedMoveStruct

Retrieves normalized representation of a Move struct.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • package< ObjectID > (required): the object ID of the Move package that contains the module defining the struct.
    • module_name< string > (required): the name of the Move module within the package where the struct is defined.
    • struct_name< string > (required): the name of the struct whose normalized representation should be retrieved.

Returns

IotaMoveNormalizedStruct< IotaMoveNormalizedStruct >
  • abilities< IotaMoveAbilitySet > (required): the set of abilities (e.g., copy, drop, store, key) that define what operations are allowed on this struct type.
  • fields<[ IotaMoveNormalizedField ]> (required): list of fields defined in the struct, including each field's name and type.
  • typeParameters<[ IotaMoveStructTypeParameter ]> (required): list of type parameters for the struct, where each includes constraints such as required abilities.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getNormalizedMoveStruct",
"params": [
"0x1b33a3cf7eb5dde04ed7ae571db1763006811ff6b7bb35b3d1c780de153af9dd",
"assets_bag",
"AssetsBag"
],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"abilities": {
"abilities": [
"Store",
"Key"
]
},
"typeParameters": [],
"fields": [
{
"name": "id",
"type": {
"Struct": {
"address": "0x2",
"module": "object",
"name": "UID",
"typeArguments": []
}
}
},
{
"name": "size",
"type": "U64"
}
]
}
}

iota_getChainIdentifier

Retrieves the unique identifier of the chain.

Returns the first four bytes of the chain's genesis checkpoint digest.

Parameters

  • id (integer; required): a request ID (example: 1).
  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).
  • method (string; required): a method used for the request.
  • params (array; required): none.

Returns

String< string >

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getChainIdentifier",
"params": [],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": "6364aad5"
}

iota_getCheckpoint

Retrieves a checkpoint by sequence number.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • id< CheckpointId > (requried): checkpoint identifier, can use either checkpoint digest, or checkpoint sequence number as input.

Returns

Checkpoint< Checkpoint >
  • checkpointCommitments<[ CheckpointCommitment ]> (required): commitments to checkpoint state.
  • digest< CheckpointDigest > (required): the digest of this checkpoint.
  • endOfEpochData< EndOfEpochData | null > (optional): data present only on the final checkpoint of the epoch.
  • epoch< BigInt_for_uint64 > (required): the checkpoint's epoch ID.
  • epochRollingGasCostSummary< GasCostSummary > (required): the running total gas costs of all transactions included in the current epoch up to this checkpoint.
  • networkTotalTransactions< BigInt_for_uint64 > (required): total number of transactions committed since genesis, including those in this checkpoint.
  • previousDigest< CheckpointDigest | null > (optional): the digest of the previous checkpoint.
  • sequenceNumber< BigInt_for_uint64 > (required): the checkpoint’s sequence number.
  • timestampMs< BigInt_for_uint64 > (required): timestamp of the checkpoint in milliseconds since Unix epoch. Checkpoint timestamps are monotonic but may be equal across checkpoints originating from the same consensus commit.
  • transactions<[ TransactionDigest ]> (required): digests of transactions included in the checkpoint.
  • validatorSignature< Base64 > (required): the signature of the validator producing this checkpoint.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getCheckpoint",
"params": ["1000"],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"epoch": "0",
"sequenceNumber": "1000",
"digest": "FKxXqL6KKGG1UyguTu6daodhRuZ8G3GrXVqPNmJ76YXc",
"networkTotalTransactions": "13995",
"previousDigest": "2kC97pinzVSrBNmi7LVN9LGMiDAupRP6p54fceMHma9j",
"epochRollingGasCostSummary": {
"computationCost": "0",
"computationCostBurned": "0",
"storageCost": "0",
"storageRebate": "0",
"nonRefundableStorageFee": "0"
},
"timestampMs": "1746433821035",
"transactions": [
"7Vzm6UUEaeoML3ZvAxJ48mebKaNHPDzUM1fNABipe9dB",
"5WNsm2PEbQv73KQ32ZA7AoSydXhma9LWGQRKrjL9BHHe",
"9mbaYLV9Vp6T2pJ68LhWRtUo57zs5jCPoHq5FZkCmcVg",
"8QS7YcDAKhnsHnkEvmkQ4sECp4fZaiVsVmQbB82BTSbe",
"6wz7WS4CiQYwtFTdhmaH5AU1e7Scw3VZimHzhViDuoFn"
],
"checkpointCommitments": [],
"validatorSignature": "sCsUuGz4daTuwbPG9I+qLzFm3cF1Lq8kL+JYDL8/0DnT8/DbMj72DHhFNIC0uwuv"
}
}

iota_getCheckpoints

Retrieves a list of checkpoints.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • cursor< BigInt_for_uint64 > (optional): an optional paging cursor. If provided, the query starts from the item after the specified cursor; defaults to the first item if not specified.
    • limit< uint > (optional): maximum number of items returned per page; defaults to QUERY_MAX_RESULT_LIMIT_CHECKPOINTS if not specified.
    • descending_order< Boolean > (required): query result ordering. If true, returns results in descending order (newest first); defaults to false for ascending order (oldest first).

Returns

CheckpointPage< Page_for_Checkpoint_and_BigInt_for_uint64 >

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.

  • data<[ Checkpoint ]> (required): list of checkpoint objects returned by the query.
  • hasNextPage< Boolean > (required): indicates whether more checkpoints are available beyond the current page.
  • nextCursor< BigInt_for_uint64 | null > (optional): cursor value to use for retrieving the next page of results; null if there are no more results.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getCheckpoints",
"params": ["1004", 4, false],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"epoch": "0",
"sequenceNumber": "1005",
"digest": "7YGc3Pj9PrtLj7hMEjm3ZBAxGRVns9prvdhzqg8CFCSi",
"networkTotalTransactions": "14015",
"previousDigest": "H4dJS4R6bTFDBcCyN8UyCdrp1wNfa9UFqxM31xPLztb7",
"epochRollingGasCostSummary": {
"computationCost": "0",
"computationCostBurned": "0",
"storageCost": "0",
"storageRebate": "0",
"nonRefundableStorageFee": "0"
},
"timestampMs": "1746433822163",
"transactions": [
"B8DSv1PRfMxg6hx4Vcb5zKwKUHK4PAasmGLvg4UBwrSV",
"FqBheLcfG5fUo7y3yM4Hvy6QYTojqRWWmLkNw5hBSXZ5",
"3L2Sz8Vhikqzxvqin2NhiNfdnHcopuBStGYXNBVyML7Y",
"GhVbcW3ZrHjtLxrWWUCaNErNEw1JULazA4LDMoDBmvja",
"AdnqzbVVUFX55GvvWLGBgXbbH4mnPhzaryHJ5Tab8YLX"
],
"checkpointCommitments": [],
"validatorSignature": "js9+DK5wdS2tJB46ygIa5fedn+0TfvgsmirQZ2QUa6ShVrOohrxKCGRY7bliQ985"
}
],
"nextCursor": "1008",
"hasNextPage": true
}
}

iota_getEvents

Retrieves transaction events.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • transaction_digest< TransactionDigest > (required): the digest of the transaction whose emitted events should be retrieved.

Returns

Vec<IotaEvent><[ Event ]>

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getEvents",
"params": ["1yWvHoudroTZA8TpNwLCEjmGLaEZCLoXZETjt4GRq7G"],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": {
"txDigest": "1yWvHoudroTZA8TpNwLCEjmGLaEZCLoXZETjt4GRq7G",
"eventSeq": "0"
},
"packageId": "0x0000000000000000000000000000000000000000000000000000000000000003",
"transactionModule": "timelocked_staking",
"sender": "0x1ee12dca0e798966a82f74c010c109e1bd0674f4f47517db6843f223bad5eb7c",
"type": "0x3::validator::StakingRequestEvent",
"parsedJson": {
"amount": "2816564858653000",
"epoch": "9",
"pool_id": "0x829fcfaca1ce8ca42161469447c23a600b2df7215a5b784a51e930e323bdd3bb",
"staker_address": "0x1ee12dca0e798966a82f74c010c109e1bd0674f4f47517db6843f223bad5eb7c",
"validator_address": "0x37421363c5fd56c43325217b6c58b77f307d04a825ad8b49a38e7436ae422205"
},
"bcsEncoding": "base64",
"bcs": "gp/PrKHOjKQhYUaUR8I6YAst9yFaW3hKUekw4yO907s3QhNjxf1WxDMlIXtsWLd/MH0EqCWti0mjjnQ2rkIiBR7hLcoOeYlmqC90wBDBCeG9BnT09HUX22hD8iO61et8CQAAAAAAAABICeObpgEKAA=="
}
]
}

iota_getLatestCheckpointSequenceNumber

Retrieves the latest checkpoint sequence number.

Parameters

  • id (integer; required): a request ID (example: 1).
  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).
  • method (string; required): a method used for the request.
  • params (array; required): none.

Returns

BigInt<u64>< BigInt_for_uint64 >

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getLatestCheckpointSequenceNumber",
"params": [],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": "3514321"
}

iota_getObject

Retrieves object data by ID.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • object_id< ObjectID > (required): the ID of the queried object.
    • options< ObjectDataOptions > (optional): options for specifying the content to be returned.

Returns

IotaObjectResponse< IotaObjectResponse >
  • data< ObjectData | null > (optional): the retrieved on-chain object data if found; null if the object does not exist or is not accessible.
  • error< ObjectResponseError | null > (optional): error details if the object could not be retrieved; null if the operation was successful.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getObject",
"params": [
"0x9f5bc1dbdc77a1603835318928fcb4bfb8b80b59638ea86579aecdadb00e6a58",
{
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": {
"objectId": "0x9f5bc1dbdc77a1603835318928fcb4bfb8b80b59638ea86579aecdadb00e6a58",
"version": "13624397",
"digest": "7igEiTswauamJfm8vKQq4htKzyEwTJKBUTP9RvfXaj2g",
"type": "0x3::timelocked_staking::TimelockedStakedIota",
"owner": {
"AddressOwner": "0x1ee12dca0e798966a82f74c010c109e1bd0674f4f47517db6843f223bad5eb7c"
},
"previousTransaction": "1yWvHoudroTZA8TpNwLCEjmGLaEZCLoXZETjt4GRq7G",
"storageRebate": "3009600",
"content": {
"dataType": "moveObject",
"type": "0x3::timelocked_staking::TimelockedStakedIota",
"fields": {
"expiration_timestamp_ms": "1787097600000",
"id": {
"id": "0x9f5bc1dbdc77a1603835318928fcb4bfb8b80b59638ea86579aecdadb00e6a58"
},
"label": "000000000000000000000000000000000000000000000000000000000000107a::stardust_upgrade_label::STARDUST_UPGRADE_LABEL",
"staked_iota": {
"type": "0x3::staking_pool::StakedIota",
"fields": {
"id": {
"id": "0xc9b07d5e6148cf2f70bc2f4d013bbe2697764a4e6181f0610803aac940bb04cc"
},
"pool_id": "0x829fcfaca1ce8ca42161469447c23a600b2df7215a5b784a51e930e323bdd3bb",
"principal": "2816564858653000",
"stake_activation_epoch": "10"
}
}
}
}
}
}
}

iota_getProtocolConfig

Retrieves the current protocol configuration.

Returns the protocol configuration for a specified version number. If no version is provided, the node returns the configuration corresponding to the latest epoch it has processed.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • version< BigInt_for_uint64 > (optional): the protocol version to query. If omitted, the latest protocol config table for the node will be returned.

Returns

ProtocolConfigResponse< ProtocolConfig >
  • attributes< Boolean > (required): indicates whether Move object attributes are enabled in the current protocol version.
  • featureFlags< Boolean > (required): indicates whether Move feature flags are supported and active.
  • maxSupportedProtocolVersion< ProtocolVersion > (required): the highest protocol version supported by this node.
  • minSupportedProtocolVersion< ProtocolVersion > (required): the lowest protocol version supported by this node.
  • protocolVersion< ProtocolVersion > (required): the current protocol version this configuration applies to.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getProtocolConfig",
"params": ["6"],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"minSupportedProtocolVersion": "1",
"maxSupportedProtocolVersion": "7",
"protocolVersion": "6",
"featureFlags": {
"bridge": false,
"convert_type_argument_error": true,
"native_charging_v2": true,
"passkey_auth": false,
"zklogin_auth": false
},
"attributes": {
"base_gas_price": { "u64": "1000" },
"base_tx_cost_fixed": { "u64": "1000" },
"base_tx_cost_per_byte": { "u64": "0" },
"max_tx_gas": { "u64": "50000000000" },
"max_tx_size_bytes": { "u64": "131072" },
"max_gas_price": { "u64": "100000" },
"max_function_definitions": { "u64": "1000" },
"max_struct_definitions": { "u64": "200" },
"storage_gas_price": { "u64": "76" },
"storage_rebate_rate": { "u64": "10000" },
"event_emit_cost_base": { "u64": "52" },
"event_emit_output_cost_per_byte": { "u64": "10" },
"debug_print_base_cost": { "u64": "52" },
"object_runtime_max_num_cached_objects": { "u64": "1000" },
"validator_target_reward": { "u64": "767000000000000" },
"consensus_max_num_transactions_in_block": { "u64": "512" },
"ecdsa_k1_ecrecover_sha256_cost_base": { "u64": "500" },
"ed25519_ed25519_verify_cost_base": { "u64": "1802" },
"bls12381_bls12381_min_sig_verify_cost_base": { "u64": "44064" },
"group_ops_bls12381_g1_mul_cost": { "u64": "4842" },
"hash_sha3_256_base_cost": { "u64": "52" },
"type_name_get_base_cost": { "u64": "52" },
"vector_push_back_base_cost": { "u64": "52" },
"dynamic_field_add_child_object_cost_base": { "u64": "100" },
"package_publish_cost_fixed": { "u64": "1000" },
"package_publish_cost_per_byte": { "u64": "80" }
}
}
}

iota_getTotalTransactionBlocks

Retrieves the total number of transaction blocks.

Parameters

  • id (integer; required): a request ID (example: 1).
  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).
  • method (string; required): a method used for the request.
  • params (array; required): none.

Returns

BigInt<u64>< BigInt_for_uint64 >

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getTotalTransactionBlocks",
"params": [],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": "15406387"
}

iota_getTransactionBlock

Retrieves a transaction block by digest.

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    • digest< TransactionDigest > (required): the digest of the queried transaction.
    • options< TransactionBlockResponseOptions > (optional): specifying which parts of the transaction block to include in the response.

Returns

IotaTransactionBlockResponse< TransactionBlockResponse >
  • balanceChanges< [BalanceChange] | null > (optional): list of balance changes caused by the transaction, or null if not available.
  • checkpoint< BigInt_for_uint64 | null > (optional): the checkpoint number in which the transaction was included and finalized. Only available in the read API.
  • confirmedLocalExecution< [boolean] | null > (optional): indicates whether the transaction was confirmed by local execution; null if unknown or not applicable.
  • digest< TransactionDigest > (required): the digest of the queried transaction.
  • effects< TransactionBlockEffects | null > (optional): structured transaction effects, such as object mutations, deletions, and transfers.
  • errors< [string] > (optional): list of errors, if any, encountered during processing or execution.
  • events< [Event] | null > (optional): list of events emitted by the transaction, or null if none.
  • objectChanges< [ObjectChange] | null > (optional): list of on-chain object changes caused by the transaction, or null if not available.
  • rawEffects< [string] > (optional): BCS-encoded raw effect bytes, represented as base64 strings.
  • rawTransaction< Base64 > (optional): BCS-encoded SenderSignedData representing the full signed transaction; empty if show_raw_transaction is false.
  • timestampMs< BigInt_for_uint64 | null > (optional): timestamp (in milliseconds since Unix epoch) when the transaction was finalized.
  • transaction< TransactionBlock | null > (optional): the input transaction block data, or null if not available.

Request example

curl -X POST https://rpc.ankr.com/iota_mainnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "iota_getTransactionBlock",
"params": [
"1yWvHoudroTZA8TpNwLCEjmGLaEZCLoXZETjt4GRq7G",
{
"showInput": true,
"showRawInput": false,
"showEffects": true,
"showEvents": true,
"showObjectChanges": false,
"showBalanceChanges": false,
"showRawEffects": false
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"digest": "1yWvHoudroTZA8TpNwLCEjmGLaEZCLoXZETjt4GRq7G",
"transaction": {
"data": {
"messageVersion": "v1",
"transaction": {
"kind": "ProgrammableTransaction",
"inputs": [{ "objectId": "0xee2f...ab72", "version": "1" }],
"transactions": [{
"MoveCall": {
"package": "0x3",
"module": "timelocked_staking",
"function": "request_add_stake",
"arguments": [{ "Input": 1 }, { "Input": 0 }]
}
}]
},
"sender": "0x1ee1...eb7c",
"gasData": {
"payment": [{ "objectId": "0x3aba...9593" }],
"price": "1000",
"budget": "5990000"
}
},
"txSignatures": ["AADfuE3s...YKIA=="]
},
"effects": {
"status": { "status": "success" },
"executedEpoch": "9",
"gasUsed": {
"computationCost": "1000000",
"storageCost": "299037200",
"storageRebate": "296027600"
},
"created": [{ "reference": { "objectId": "0x9f5b...6a58" } }],
"mutated": [{ "reference": { "objectId": "0x0000...0005" } }],
"deleted": [{ "objectId": "0xee2f...ab72" }],
"gasObject": { "reference": { "objectId": "0x3aba...9593" } },
"eventsDigest": "D2wXokf8VZsdpR3qGCNkoJXBFSSvoMGdwXqwYuReRuDe"
},
"events": [{
"type": "0x3::validator::StakingRequestEvent",
"parsedJson": {
"amount": "2816564858653000",
"epoch": "9",
"pool_id": "0x829f...d3bb",
"staker_address": "0x1ee1...eb7c",
"validator_address": "0x3742...2205"
}
}],
"timestampMs": "1747226554971",
"checkpoint": "3513008"
}
}