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 — unsafe, iota

API reference for IOTA. All methods ->

unsafe_pay

Creates a transaction to transfer coins to multiple recipients.

Sends Coin<T> to a list of recipient addresses, where T can be any supported coin type. The amounts must correspond to each recipient in the list. The object specified in the gas field will be used to pay the transaction fee. The gas object must not be included in the input_coins. If no gas object is provided, the RPC server will automatically select one.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • input_coins< [ObjectID] > (required): the list of IOTA coin object IDs to be used for this transaction.
    • recipients< [IotaAddress] > (required): the list of recipient addresses. The length must match the amounts array.
    • amounts< [BigInt_for_uint64] > (required): the list of amounts to send to each corresponding recipient.
    • gas< ObjectID > (optional): the gas object used to pay for transaction execution. If not provided, the node will automatically select one from the signer's assets.
    • gas_budget< BigInt_for_uint64 > (required): the gas limit for the transaction. The transaction will fail if this limit is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects that will be used in the transaction.
  • inputObjects< [InputObjectKind] > (required): the input objects that are referenced and consumed during transaction execution.
  • txBytes< Base64 > (required): the BCS-encoded transaction data (excluding the type tag), represented as a base64 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": "unsafe_pay",
"params": [
"0xSIGNER_ADDRESS", // IOTA address of the sender
[
"0xINPUT_COIN_1", // Coin object IDs to be used
"0xINPUT_COIN_2"
],
[
"0xRECIPIENT_ADDRESS_1", // Recipient addresses
"0xRECIPIENT_ADDRESS_2"
],
[
"1000000", // Amounts to transfer (must match recipient count)
"2500000"
],
"0xOPTIONAL_GAS_OBJECT_ID", // Optional: gas object (omit or set to null to auto-select)
"5000000" // Gas budget (as string)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"digest": "0xTRANSACTION_DIGEST",
"effects": {
"status": {
"status": "success"
},
"executedEpoch": "123",
"gasUsed": {
"computationCost": "1000000",
"storageCost": "80000",
"storageRebate": "75000",
"nonRefundableStorageFee": "0"
},
"mutated": [
{
"owner": {
"AddressOwner": "0xSIGNER_ADDRESS"
},
"reference": {
"objectId": "0xPRIMARY_COIN_OBJECT_ID",
"version": 12345678,
"digest": "0xUPDATED_OBJECT_DIGEST"
}
}
],
"deleted": [
{
"objectId": "0xMERGED_COIN_OBJECT_ID",
"version": 12345678,
"digest": "0xDELETED_OBJECT_DIGEST"
}
],
"gasObject": {
"owner": {
"AddressOwner": "0xSIGNER_ADDRESS"
},
"reference": {
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
}
},
"events": [],
"timestampMs": "1690000000000",
"checkpoint": "1234567"
}
}

unsafe_payAllIota

Creates a transaction to transfer all IOTA coins to a single recipient.

Sends all IOTA from multiple coin objects to a single recipient. This method supports IOTA coin only and does not require a separate gas coin object.

The pay_all_iota operation performs the following steps:

  1. Aggregates the total IOTA from all input coins and consolidates it into the first input coin.
  2. Transfers the updated first coin to the recipient and uses it as the gas object for the transaction.
  3. After execution, the first input coin holds the remaining balance: sum(input_coins) - actual_gas_cost.
  4. All other input coins (except the first) are deleted.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • input_coins< [ObjectID] > (required): the IOTA coin object IDs to be used in the transaction, including the coin that will be used to pay for gas.
    • recipient< IotaAddress > (required): the address to receive the consolidated IOTA.
    • gas_budget< BigInt_for_uint64 > (required): the maximum amount of gas allowed for the transaction. The transaction will fail if this budget is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used in the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects that are referenced and processed during the transaction.
  • txBytes< Base64 > (required): the BCS-encoded transaction data, without its type tag, represented as a base64-encoded 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": "unsafe_payAllIota",
"params": [
"0xSIGNER_ADDRESS", // IOTA address of the sender
[
"0xINPUT_COIN_ID_1", // Input coins (must include coin used for gas)
"0xINPUT_COIN_ID_2"
],
"0xRECIPIENT_ADDRESS", // Recipient address
"5000000" // Gas budget (as string)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID", // gas object used
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xINPUT_COIN_ID_1", // first coin used and retained
"objectType": "coin::Coin<0x2::iota::IOTA>"
},
{
"objectId": "0xINPUT_COIN_ID_2", // coin that was merged and deleted
"objectType": "coin::Coin<0x2::iota::IOTA>"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_DATA" // base64-encoded BCS transaction bytes
}
}

unsafe_payIota

Creates a transaction to transfer IOTA coins to multiple recipients.

Sends IOTA coins to a list of recipient addresses based on a corresponding list of amounts. This method supports IOTA coin only and does not require a separate gas coin object.

The pay_iota operation performs the following:

  1. Debits each input_coin to create new coin objects corresponding to the specified amounts and assigns them to the matching recipients.
  2. Accumulates any remaining IOTA from the input coins into the first input coin and uses it as the gas coin object.
  3. After execution, the balance of the first input coin is: sum(input_coins) - sum(amounts) - actual_gas_cost.
  4. All other input coins, except the first one, are deleted.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • input_coins< [ObjectID] > (required): the list of IOTA coin object IDs to be used in this transaction, including the coin that will cover gas fees.
    • recipients< [IotaAddress] > (required): the list of recipient addresses. The length must match the amounts list.
    • amounts< [BigInt_for_uint64] > (required): the list of amounts to transfer to each corresponding recipient, in the same order as recipients.
    • gas_budget< BigInt_for_uint64 > (required): the maximum gas allowed for the transaction. The transaction fails if this budget is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects referenced and consumed during the transaction.
  • txBytes< Base64 > (required): the BCS-encoded transaction data (without a type tag), represented as a base64-encoded 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": "unsafe_payIota",
"params": [
"0xSIGNER_ADDRESS", // IOTA address of the sender
[
"0xINPUT_COIN_ID_1", // IOTA coin object IDs (including the one for gas)
"0xINPUT_COIN_ID_2"
],
[
"0xRECIPIENT_ADDRESS_1", // Recipient addresses
"0xRECIPIENT_ADDRESS_2"
],
[
"1000000", // Amounts to send (must match recipients)
"2500000"
],
"5000000" // Gas budget (as string)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID", // gas object used
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xINPUT_COIN_ID_1", // first coin retained and used for gas
"objectType": "coin::Coin<0x2::iota::IOTA>"
},
{
"objectId": "0xINPUT_COIN_ID_2", // coin that was consumed
"objectType": "coin::Coin<0x2::iota::IOTA>"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_DATA" // base64-encoded BCS transaction bytes
}
}

unsafe_publish

Creates an unsigned transaction to publish Move modules.

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):

    • sender< IotaAddress > (required): the IOTA address of the transaction signer.
    • compiled_modules< [Base64] > (required): the compiled Move modules, encoded in base64 format.
    • dependencies< [ObjectID] > (required): a list of object IDs representing the transitive dependencies required by the Move package.
    • gas< ObjectID > (optional): the gas coin object to use for paying transaction fees. If not specified, the node will auto-select one from the sender's assets.
    • gas_budget< BigInt_for_uint64 > (required): the gas budget for the transaction. The transaction will fail if gas consumption exceeds this value.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects that are referenced, mutated, or consumed during the transaction.
  • txBytes< Base64 > (required): the transaction payload, serialized in BCS format without its type tag, and encoded as a base64 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": "unsafe_publish",
"params": [
"0xSIGNER_ADDRESS", // sender<IotaAddress>
[
"BASE64_COMPILED_MODULE_1", // compiled_modules<[Base64]>
"BASE64_COMPILED_MODULE_2"
],
[
"0xDEPENDENCY_OBJECT_ID_1", // dependencies<[ObjectID]>
"0xDEPENDENCY_OBJECT_ID_2"
],
"0xOPTIONAL_GAS_OBJECT_ID", // gas<ObjectID> (optional)
"10000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID", // Gas object used
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xSIGNER_ADDRESS",
"objectType": "0x2::account::Account"
},
{
"objectId": "0xDEPENDENCY_OBJECT_ID_1",
"objectType": "0x1::move_stdlib::Module"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_requestAddStake

Creates a request to add stake.

Adds stake to a validator's staking pool using multiple coins and amount.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • coins< [ObjectID] > (required): the list of Coin<IOTA> object IDs to be staked in this transaction.
    • amount< BigInt_for_uint64 > (optional): the amount to stake. If omitted, the total balance from the provided coin objects is used.
    • validator< IotaAddress > (required): the IOTA address of the validator to which the stake is delegated.
    • gas< ObjectID > (optional): the gas object used to pay transaction fees. If not specified, one will be selected automatically from the signer's assets.
    • gas_budget< BigInt_for_uint64 > (required): the maximum amount of gas allocated for the transaction. The transaction fails if this budget is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects that will be used to pay for the transaction.
  • inputObjects< [InputObjectKind] > (required): the input objects referenced in the transaction, including coins and validator-related inputs.
  • txBytes< Base64 > (required): the transaction data serialized in BCS format (excluding the type tag) and encoded as a base64 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": "unsafe_requestAddStake",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
[
"0xCOIN_OBJECT_ID_1", // coins<[ObjectID]>
"0xCOIN_OBJECT_ID_2"
],
"1000000000", // amount<BigInt_for_uint64> (optional, can be null)
"0xVALIDATOR_ADDRESS", // validator<IotaAddress>
"0xOPTIONAL_GAS_OBJECT_ID", // gas<ObjectID> (optional, can be null)
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xCOIN_OBJECT_ID_1",
"objectType": "coin::Coin<0x2::iota::IOTA>"
},
{
"objectId": "0xCOIN_OBJECT_ID_2",
"objectType": "coin::Coin<0x2::iota::IOTA>"
},
{
"objectId": "0xVALIDATOR_ADDRESS",
"objectType": "staking::Validator"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_requestAddTimelockedStake

Adds a timelocked stake.

Adds timelocked stake to a validator's staking pool using multiple balances and amount.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • locked_balance< ObjectID > (required): the object ID of the TimeLock<Balance<IOTA>> that will be staked.
    • validator< IotaAddress > (required): the IOTA address of the validator to whom the stake is being delegated.
    • gas< ObjectID > (required): the gas object used to pay for the transaction. This must be explicitly provided.
    • gas_budget< BigInt_for_uint64 > (required): the gas budget for the transaction. The transaction will fail if the actual gas used exceeds this value.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, such as the locked balance object and validator address.
  • txBytes< Base64 > (required): the transaction data, serialized in BCS format (without its type tag) and encoded as a base64 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": "unsafe_requestAddTimelockedStake",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xLOCKED_BALANCE_OBJECT_ID", // locked_balance<ObjectID>
"0xVALIDATOR_ADDRESS", // validator<IotaAddress>
"0xGAS_OBJECT_ID", // gas<ObjectID>
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xLOCKED_BALANCE_OBJECT_ID",
"objectType": "timelock::TimeLock<coin::Coin<0x2::iota::IOTA>>"
},
{
"objectId": "0xVALIDATOR_ADDRESS",
"objectType": "staking::Validator"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_requestWithdrawStake

Withdraws stake from a validator's staking pool.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • staked_iota< ObjectID > (required): the object ID of the StakedIota that is to be withdrawn.
    • gas< ObjectID > (optional): the gas object to be used for transaction fees. If not specified, the node will automatically select one from the signer's holdings.
    • gas_budget< BigInt_for_uint64 > (required): the maximum gas allowed for the transaction. The transaction will fail if gas consumption exceeds this value.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, including the staked IOTA object and any additional references.
  • txBytes< Base64 > (required): the transaction payload, serialized in BCS format (excluding its type tag), and encoded as a base64 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": "unsafe_requestWithdrawStake",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xSTAKED_IOTA_OBJECT_ID", // staked_iota<ObjectID>
"0xOPTIONAL_GAS_OBJECT_ID", // gas<ObjectID> (optional, can be null)
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xSTAKED_IOTA_OBJECT_ID",
"objectType": "staking::StakedIota"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_requestWithdrawTimelockedStake

Withdraws timelocked stake from a validator's staking pool.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • timelocked_staked_iota< ObjectID > (required): the object ID of the TimelockedStakedIota to be withdrawn.
    • gas< ObjectID > (required): the gas object to be used for paying transaction fees.
    • gas_budget< BigInt_for_uint64 > (required): the maximum amount of gas the transaction is allowed to consume. The transaction will fail if this budget is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, including the TimelockedStakedIota object and any supporting references.
  • txBytes< Base64 > (required): the transaction payload serialized in BCS format (without its type tag), and encoded as a base64 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": "unsafe_requestWithdrawTimelockedStake",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xTIMELOCKED_STAKED_IOTA_OBJECT_ID", // timelocked_staked_iota<ObjectID>
"0xGAS_OBJECT_ID", // gas<ObjectID>
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xTIMELOCKED_STAKED_IOTA_OBJECT_ID",
"objectType": "staking::TimelockedStakedIota"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_splitCoin

Creates an unsigned transaction to split a coin into specified amounts.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • coin_object_id< ObjectID > (required): the object ID of the coin to be split.
    • split_amounts< [BigInt_for_uint64] > (required): a list of amounts to split from the coin. Each value represents a new coin to be created with that amount.
    • gas< ObjectID > (optional): the gas object to be used for paying transaction fees. If omitted, the node selects one from the signer's assets.
    • gas_budget< BigInt_for_uint64 > (required): the maximum gas allowed for this transaction. The transaction will fail if this limit is exceeded.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the execution of the transaction.
  • inputObjects< [InputObjectKind] > (required): the objects involved in the transaction, including the coin being split and any other necessary references.
  • txBytes< Base64 > (required): the transaction payload serialized in BCS format (without its type tag), and encoded as a base64 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": "unsafe_splitCoin",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xCOIN_OBJECT_ID", // coin_object_id<ObjectID>
["1000", "2000", "3000"], // split_amounts<[BigInt_for_uint64]>
"0xOPTIONAL_GAS_OBJECT_ID", // gas<ObjectID> (optional, can be null)
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xCOIN_OBJECT_ID",
"objectType": "coin::Coin<0x2::iota::IOTA>"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_splitCoinEqual

Creates an unsigned transaction to split a coin into equal parts.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • coin_object_id< ObjectID > (required): the object ID of the coin to be split.
    • split_count< BigInt_for_uint64 > (required): the number of equally sized coins to create from the original coin. The total coin value will be evenly divided among them.
    • gas< ObjectID > (optional): the gas object to be used for transaction fee payment. If omitted, the node will select one automatically from the signer’s holdings.
    • gas_budget< BigInt_for_uint64 > (required): the gas budget for the transaction. The transaction fails if this amount is exceeded during execution.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for the transaction execution.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, including the coin being split.
  • txBytes< Base64 > (required): the transaction payload serialized using BCS (without its type tag) and encoded as a base64 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": "unsafe_splitCoinEqual",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xCOIN_OBJECT_ID", // coin_object_id<ObjectID>
"3", // split_count<BigInt_for_uint64>
"0xOPTIONAL_GAS_OBJECT_ID", // gas<ObjectID> (optional, can be null)
"5000000" // gas_budget<BigInt_for_uint64>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xCOIN_OBJECT_ID",
"objectType": "coin::Coin<0x2::iota::IOTA>"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_transferIota

Creates an unsigned transaction to transfer IOTA coins.

Creates an unsigned transaction to send IOTA coin object to an IOTA address. The IOTA object is also used as the gas object.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • iota_object_id< ObjectID > (required): the object ID of the IOTA coin to be used in the transaction.
    • gas_budget< BigInt_for_uint64 > (required): the gas budget for the transaction. The transaction will fail if gas usage exceeds this amount.
    • recipient< IotaAddress > (required): the IOTA address of the recipient who will receive the transferred amount.
    • amount< BigInt_for_uint64 > (optional): the amount of IOTA to be split from the original coin and transferred to the recipient. If omitted, the entire coin may be transferred.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for executing the transaction.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, including the IOTA coin and any other dependencies.
  • txBytes< Base64 > (required): the transaction data, serialized using BCS (without its type tag) and encoded as a base64 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": "unsafe_transferIota",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xIOTA_OBJECT_ID", // iota_object_id<ObjectID>
"5000000", // gas_budget<BigInt_for_uint64>
"0xRECIPIENT_ADDRESS", // recipient<IotaAddress>
"100000000" // amount<BigInt_for_uint64> (optional)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xIOTA_OBJECT_ID",
"objectType": "coin::Coin<0x2::iota::IOTA>"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

unsafe_transferObject

Creates an unsigned transaction to transfer an on-chain object.

Creates an unsigned transaction to transfer an object from one address to another. The object's type must allow public transfers.

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):

    • signer< IotaAddress > (required): the IOTA address of the transaction signer.
    • object_id< ObjectID > (required): the object ID of the item to be transferred.
    • gas< ObjectID > (optional): the gas object to be used for paying transaction fees. If not specified, the node selects one automatically from the signer's assets.
    • gas_budget< BigInt_for_uint64 > (required): the maximum gas allowed for this transaction. The transaction will fail if this amount is exceeded.
    • recipient< IotaAddress > (required): the IOTA address of the recipient who will receive the transferred object.

Returns

TransactionBlockBytes< TransactionBlockBytes >
  • gas< [ObjectRef] > (required): the gas objects used to pay for executing the transaction.
  • inputObjects< [InputObjectKind] > (required): the input objects involved in the transaction, including the object being transferred and any related dependencies.
  • txBytes< Base64 > (required): the transaction payload serialized using BCS (without its type tag) and encoded as a base64 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": "unsafe_transferObject",
"params": [
"0xSIGNER_ADDRESS", // signer<IotaAddress>
"0xOBJECT_ID", // object_id<ObjectID>
"0xOPTIONAL_GAS_ID", // gas<ObjectID> (optional, can be null)
"5000000", // gas_budget<BigInt_for_uint64>
"0xRECIPIENT_ADDRESS" // recipient<IotaAddress>
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": [
{
"objectId": "0xGAS_OBJECT_ID",
"version": 12345678,
"digest": "0xGAS_OBJECT_DIGEST"
}
],
"inputObjects": [
{
"objectId": "0xOBJECT_ID",
"objectType": "example::CustomObjectType"
}
],
"txBytes": "BASE64_ENCODED_TRANSACTION_BYTES"
}
}

iota_devInspectTransactionBlock

Simulates a transaction block for debugging and inspection.

Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.

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):

    • sender_address< IotaAddress > (required): the IOTA address initiating the dev inspect call.
    • tx_bytes< Base64 > (required): the BCS-encoded TransactionKind (not TransactionData). This includes only the transaction logic without gasBudget and gasPrice.
    • gas_price< BigInt_for_uint64 > (optional): the reference gas price to use for calculating gas usage. No actual gas is charged. If omitted, the system will use the default reference gas price.
    • epoch< BigInt_for_uint64 > (optional): the epoch during which to simulate the call. If not provided, it will default to the current epoch from the latest system state.
    • additional_args< DevInspectArgs > (optional): additional simulation configuration, including: gas_budget, gas_objects, gas_sponsor, skip_checks.

Returns

DevInspectResults< DevInspectResults >
  • effects< TransactionBlockEffects > (required): the simulated summary of effects that would likely occur if the transaction were executed. Note: not all dev-inspected transactions are valid for execution.
  • error< [string, null] > (optional): any execution error encountered during simulation, if applicable.
  • events< [Event] > (required): the list of events that would likely be emitted by the transaction if it were run.
  • rawEffects< [string] > (optional): raw data representation of the transaction effects that were simulated.
  • rawTxnData< [string] > (optional): raw data representation of the transaction itself used in the dev inspection.
  • results< [IotaExecutionResult, null] > (optional): execution results from running the transaction, including any return values or outputs from function calls.

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_devInspectTransactionBlock",
"params": [
"0x94f1a597b4e8f709a396f7f6b1482bdcd65a673d111e49286c527fab7c2d0961", // sender_address<IotaAddress>
"BASE64_ENCODED_TX_BYTES", // tx_bytes<Base64>
"1", // gas_price<BigInt_for_uint64> (optional)
"1000", // epoch<BigInt_for_uint64> (optional)
{
"gas_budget": "1000000", // gas_budget<BigInt_for_uint64> (optional)
"gas_objects": ["0xGAS_OBJECT_ID"], // gas_objects<[ObjectID]> (optional)
"gas_sponsor": "0xSPONSOR_ADDRESS", // gas_sponsor<IotaAddress> (optional)
"skip_checks": true // skip_checks<boolean> (optional)
}
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"effects": {
// Summary of effects that would likely occur if the transaction were executed
},
"error": null,
"events": [
// List of events that would likely be emitted by the transaction
],
"rawEffects": [
// Raw data representation of the transaction effects
],
"rawTxnData": [
// Raw data representation of the transaction itself
],
"results": [
// Execution results from running the transaction, including return values
]
}
}

iota_dryRunTransactionBlock

Simulates execution of a transaction block without committing it.

Returns transaction execution effects including the gas cost summary, while the effects are not committed to the chain.

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):

    • tx_bytes< Base64 > (required): the transaction payload encoded as a base64 string. This must be the BCS-encoded TransactionKind (not TransactionData), meaning it contains only the logic of the transaction without metadata such as gasBudget or gasPrice.

Returns

DryRunTransactionBlockResponse< DryRunTransactionBlockResponse >
  • balanceChanges< [BalanceChange] > (required): a list of balance changes resulting from the execution of the transaction.
  • effects< TransactionBlockEffects > (required): summary of transaction effects, including created, mutated, and deleted objects, along with gas usage and status.
  • events< [Event] > (required): events emitted during the transaction execution.
  • input< TransactionBlockData > (required): the transaction input data, including sender, gas settings, and execution logic.
  • objectChanges< [ObjectChange] > (required): a list of changes made to on-chain objects, including object creation, mutation, and deletion.

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_dryRunTransactionBlock",
"params": [
"BASE64_ENCODED_TX_BYTES", // tx_bytes<Base64>
{
"sender": "0xSENDER_ADDRESS", // sender<IotaAddress>
"gasBudget": "1000000", // gas_budget<BigInt_for_uint64>
"gasPrice": "1" // gas_price<BigInt_for_uint64> (optional)
},
false // skipChecks<boolean> (optional)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"balanceChanges": [
{
"owner": "0xSENDER_ADDRESS",
"coinType": "0x2::iota::IOTA",
"amount": "-100000"
},
{
"owner": "0xRECIPIENT_ADDRESS",
"coinType": "0x2::iota::IOTA",
"amount": "100000"
}
],
"effects": {
"status": "success",
"created": [],
"mutated": [],
"deleted": [],
"gasUsed": "50000"
},
"events": [
{
"type": "0x2::iota::TransferEvent",
"sender": "0xSENDER_ADDRESS",
"recipient": "0xRECIPIENT_ADDRESS",
"amount": "100000"
}
],
"input": {
"sender": "0xSENDER_ADDRESS",
"gasBudget": "1000000",
"gasPrice": "1",
"kind": {
"Transfer": {
"recipient": "0xRECIPIENT_ADDRESS",
"amount": "100000"
}
}
},
"objectChanges": [],
"error": null
}
}

iota_executeTransactionBlock

Executes and commits a transaction block to the network.

Executes the transaction and optionally waits for the result. Supported request types:

  1. WaitForEffectsCert – Waits for the TransactionEffectsCert before returning the response. This mode serves as a proxy for transaction finality.

  2. WaitForLocalExecution – Waits for the TransactionEffectsCert and ensures the node has executed the transaction locally before responding. This guarantees that the node is aware of the transaction for subsequent client queries. If the node fails to execute the transaction in time, the response includes a false flag indicating the failure.

If neither is specified, the default behavior is WaitForEffectsCert—unless options.show_events or options.show_effects is set to true, in which case WaitForLocalExecution is used.

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):

    • tx_bytes< Base64 > (required): BCS-serialized transaction data bytes (excluding the type tag), encoded as a base64 string.
    • signatures< [Base64] > (required): a list of signatures, each encoded as base64. Each entry must be in the format: flag || signature || public_key. The signatures must be committed to the intent message derived from the transaction data.
    • options< TransactionBlockResponseOptions > (optional): configuration options to specify which parts of the transaction response should be returned (e.g., events, effects, inputs).
    • request_type< ExecuteTransactionRequestType > (optional): the type of request execution behavior. If not provided, it will be inferred from options. Default is WaitForEffectsCert.

Returns

IotaTransactionBlockResponse< TransactionBlockResponse >
  • balanceChanges< [BalanceChange, null] > (optional): a list of balance changes resulting from the execution of the transaction.
  • checkpoint< BigInt_for_uint64 | null > (optional): the checkpoint number at which this transaction was finalized. Only available in read APIs, not execution endpoints.
  • confirmedLocalExecution< [boolean, null] > (optional): indicates whether the node has successfully executed the transaction locally.
  • digest< TransactionDigest > (required): the unique digest of the executed transaction.
  • effects< TransactionBlockEffects | null > (optional): the effects of the transaction, including status, object mutations, and gas usage.
  • errors< [string] > (optional): a list of errors encountered during transaction execution, if any.
  • events< [Event, null] > (optional): a list of events emitted during the transaction execution.
  • objectChanges< [ObjectChange, null] > (optional): a list of changes to on-chain objects, such as creations, deletions, or mutations.
  • rawEffects< [string] > (optional): the raw, serialized representation of transaction effects.
  • rawTransaction< Base64 > (optional): BCS-encoded SenderSignedData representing the transaction, including input object references. Will be empty if options.show_raw_transaction is false.
  • timestampMs< BigInt_for_uint64 | null > (optional): the Unix timestamp (in milliseconds) when the transaction was finalized.
  • transaction< TransactionBlock | null > (optional): the input data of the transaction, including sender, gas settings, and logic.

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_executeTransactionBlock",
"params": [
"BASE64_ENCODED_TX_BYTES", // tx_bytes
[
"BASE64_ENCODED_SIGNATURE_1", // signatures[]
"BASE64_ENCODED_SIGNATURE_2"
],
{
"show_input": true,
"show_effects": true,
"show_events": true,
"show_object_changes": true,
"show_raw_transaction": true,
"show_balance_changes": true
},
"WaitForLocalExecution" // request_type (optional)
],
"id": 1
}'

Response example

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"digest": "9XZBtYjprrsNzL4QXHj1SmttfAWhu7A8iTfbbJcYkHQx",
"transaction": {
"sender": "0x1a2b3c...abcd",
"gasBudget": "1000000",
"kind": {
"MoveCall": {
"package": "0x2",
"module": "pay",
"function": "split",
"arguments": [ ... ]
}
}
},
"effects": {
"status": "success",
"gasUsed": "50000",
"created": [ ... ],
"mutated": [ ... ],
"deleted": [ ... ]
},
"events": [
{
"type": "0x2::coin::SplitEvent",
"sender": "0x1a2b3c...abcd",
"details": {
"amount": "500000",
"recipient": "0x4d5e6f...beef"
}
}
],
"balanceChanges": [
{
"owner": "0x1a2b3c...abcd",
"coinType": "0x2::iota::IOTA",
"amount": "-500000"
},
{
"owner": "0x4d5e6f...beef",
"coinType": "0x2::iota::IOTA",
"amount": "500000"
}
],
"objectChanges": [ ... ],
"rawTransaction": "BASE64_ENCODED_SENDER_SIGNED_DATA",
"timestampMs": "1747234567890",
"confirmedLocalExecution": true
}
}