Sui API

JSON-RPC API to send requests to Shinami’s enhanced Sui nodes

Overview

Shinami's Node Service provides a reliable way to interact with the Sui blockchain that scales with you as you grow.

Authentication, Rate Limits, and Error Handling

Authentication

See our Authentication and API Keys guide.

Rate Limits

When you surpass the QPS limit for a key, we return a JSON-RPC error code -32010. We recommend implementing retries with a backoff to handle any rate limits errors that arise. If you haven't assigned all the QPS you have for a network, or one key has more than it needs, you can adjust the QPS assigned to your keys. You may also be able to reduce requests by using methods like sui_multiGetObjects instead of multiple calls to sui_getObject.

NOTE: Depending on your plan, you may also be subject to overall daily request limits. Hitting this limit will also result in a -32010. You can see your Node Service request totals in the Node Service Metrics section of your Shinami Dashboard. You can see your account limits in the billing section of your Shinami dashboard, where you can also upgrade your plan if needed.

Error Handling

See our Error Reference guide.

Sending Your First Request

Here is a quick sample request you can make using cURL, the Shinami Clients TypeScript SDK, or the Mysten Rust SDK . It's asking for the current reference price for gas on Testnet.

Example Request Template

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeTestnetAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getReferenceGasPrice", 
        "params":[], 
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeTestnetAccessKey}});

await nodeClient.getReferenceGasPrice();
use sui_sdk::SuiClientBuilder;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {

    let sui = SuiClientBuilder::default()
        .ws_url("wss://api.shinami.com:443/node/v1/{{nodeTestnetAccessKey}}")
        .build("https://api.shinami.com:443/node/v1/{{nodeTestnetAccessKey}}")
        .await?;

    let resp = sui.read_api().get_reference_gas_price().await?;
    println!("{}", resp);

    Ok(())
}

Example Response

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

// The reference gas price is 750 MIST, which is 0.00000075 SUI
750n // BigInt<u64>

// The reference gas price is 750 MIST, which is 0.00000075 SUI
1000

For a detailed look at how Sui charges for transactions, see here. You can use Shinami's Gas Station to increase user engagement by sponsoring your users' transactions so they don't have to think about all those calculations.

Reading Historical Data

Following Mysten's recommendation, we run our full nodes with transaction history pruning and full object history (as outlined here). As a result, we store transaction and effects data for the current epoch and the one prior to it. This has the following results:

Notes:

  • The above applies to our Free and Growth plan customers. Enterprise customers get dedicated infrastructure and can have customized pruning settings to have access to additional historical data.
  • Our implementation - and Mysten's - may change around the release of RPC 2.0 later this year.

Reading Event Data from Sui

sui_getEvents

Description
Return events emitted by the provided transaction.

Params

  • transaction_digest : <TransactionDigest> - the digest of the transaction whose events you want to fetch.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_getEvents", 
        "params":[
            "{{transaction_digest}}"
        ], 
        "id":1
      }'
import { createSuiClient } from from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.call(
    "sui_getEvents",
    ["{{transaction_digest}}"]
);

Example Response

{
    "jsonrpc": "2.0",
    "result": [{
        "id": {
            "txDigest": "CubwoU3csqf1cCrBkS4pkEMVJYNnii5yTdab8iPuBqNP",
            "eventSeq": "0"
        },
        "packageId": "0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e",
        "transactionModule": "operator",
        "sender": "0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569",
        "type": "0x4e56b39acd75721999cf833062dfb77b1d51e749b02d90f049a5688e21919a64::prl::Mint",
        "parsedJson": {
            "amount": "19599619796",
            "minter": "0x0b18f971b4c907504c22ecdedbdf1701c984ef3d52d2e1818e4c151f8a86b0e8"
        },
        "bcs": "BZHibQM4dw3Aru9SjkfkmTJpqJShAw8GCmqwYvAJZvaSZPjaay7C5xB"
    }, {
        "id": {
            "txDigest": "CubwoU3csqf1cCrBkS4pkEMVJYNnii5yTdab8iPuBqNP",
            "eventSeq": "1"
        },
        "packageId": "0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e",
        "transactionModule": "operator",
        "sender": "0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569",
        "type": "0xb64a1deda83c33ce160bc321057615c16306342853f2a0283ebf09f712d45a91::ostr::Mint",
        "parsedJson": {
            "amount": "176396578166",
            "minter": "0x10e535424d0372b1fa9075582a42b43e107da61e789ccf3f6fc55e822bba200b",
            "to": "0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569"
        },
        "bcs": "2kArdcijWBNJmzxJ5HEDRhkzUKDR218MXwoUJ5f9wGevo6CvEcR7aXfgDsQD3pYucSWo2NAsJBVxSvQr63XXXNZk6KxuUrpBzAW"
    }],
    "id": 1
}
[
    {
        id: {
          txDigest: 'CubwoU3csqf1cCrBkS4pkEMVJYNnii5yTdab8iPuBqNP',
          eventSeq: '0'
        },
        packageId: '0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e',
        transactionModule: 'operator',
        sender: '0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569',
        type: '0x4e56b39acd75721999cf833062dfb77b1d51e749b02d90f049a5688e21919a64::prl::Mint',
        parsedJson: {
          amount: '19599619796',
          minter: '0x0b18f971b4c907504c22ecdedbdf1701c984ef3d52d2e1818e4c151f8a86b0e8'
        },
        bcs: 'BZHibQM4dw3Aru9SjkfkmTJpqJShAw8GCmqwYvAJZvaSZPjaay7C5xB'
    },
    {
        id: {
          txDigest: 'CubwoU3csqf1cCrBkS4pkEMVJYNnii5yTdab8iPuBqNP',
          eventSeq: '1'
        },
        packageId: '0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e',
        transactionModule: 'operator',
        sender: '0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569',
        type: '0xb64a1deda83c33ce160bc321057615c16306342853f2a0283ebf09f712d45a91::ostr::Mint',
        parsedJson: {
          amount: '176396578166',
          minter: '0x10e535424d0372b1fa9075582a42b43e107da61e789ccf3f6fc55e822bba200b',
          to: '0xa543c093a08fe615821df4bbcc6be4dae4926b20623b3730da8ea03b9ec20569'
        },
        bcs: '2kArdcijWBNJmzxJ5HEDRhkzUKDR218MXwoUJ5f9wGevo6CvEcR7aXfgDsQD3pYucSWo2NAsJBVxSvQr63XXXNZk6KxuUrpBzAW'
    }
]

Response Data
Vec<SuiEvent> : SuiEvent[] - a list of the events that were emitted by the transaction.

suix_queryEvents

Description
Return a list of events that match filter.

IMPORTANT NOTES:

  • ascending order: use a Mysten node. We start from the oldest event we have, which may not be the oldest event.
  • descending order: when following cursors, you will likely get a Could not find the referenced transaction events error (when going beyond the previous epoch, or sometimes a ways beyond). If so, try the request once more starting with that cursor on Shinami. If we return the error again, switch to a Mysten public node using the cursor that produced the error to proceed farther back in time.
    • The error isJSONRPCError: Could not find the referenced transaction events [TransactionEventsDigest(SOME_TX_DIGEST)] . We have found the SOME_TX_DIGEST in the error message can be different than the cursor you followed and may not represent a real transaction. Ignore the digest in the message and use the cursor.
  • For more context on historical data, see Reading Historical Data.

Params

  • query : <SuiEventFilter> - the event query criteria. Note: the Package and MoveEventField filters, along with the All, Any, And and Or operators, are not supported by Shinami or Mysten. This may change with the release of RPC 2.0 in late 2023 or early 2024.
  • cursor : <EventID> - optional paging cursor. The cursor has two fields: txDigest and eventSeq. Together, they tell the request to produce examples starting after, for example, "the 4th event emitted by the transaction" ( where 4th denoted by eventSeq).
  • limit : <uint> - maximum number of items per page; defaults to maximum possible if not specified, which is 50.
  • descending_order : <boolean> - query result ordering; default to false (ascending order), oldest record first. Set to true when using Shinami (see "IMPORTANT NOTES" above for more context).

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_queryEvents",
        "params":[
            "{{query}}",
      	    "{{cursor}}",
      	    {{limit}},            
      	    {{descending_order}}
        ],
        "id":1
    }'
curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeMainnetAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "suix_queryEvents",
        "params": [
            {
                "MoveModule": {
                    "package": "0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e",
                    "module": "operator"
                }
            },
            {
                "txDigest": "5jUH6zVd98oCSHP2cEgaMjFL4WXEXHkPsk7ksEGCorGJ",
                "eventSeq": "2"
            },
            10,
            true
        ]
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.queryEvents(
    {
        {{query}}, 
        {{cursor}},
        {{limit}},
        {{order}}
    }
);

import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeMainnetAccessKey}});

await nodeClient.queryEvents(
    {
        query: {
            MoveModule:  {
                package: "0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e",
                module: "operator"
            }           
        }, 
        cursor: {
            txDigest: '5jUH6zVd98oCSHP2cEgaMjFL4WXEXHkPsk7ksEGCorGJ',
            eventSeq: '2'
        },
        limit: 1,
        order: 'descending'
    }
);

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "data": [
        {
            "id": {
                "txDigest": "5jUH6zVd98oCSHP2cEgaMjFL4WXEXHkPsk7ksEGCorGJ",
                "eventSeq": "1"
            },
            "packageId": "0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e",
            "transactionModule": "operator",
            "sender": "0x5c29b3a7571733c80beea0a36cbadd1c5911753b165fa5f8f486a1ffbde4af31",
            "type": "0xb64a1deda83c33ce160bc321057615c16306342853f2a0283ebf09f712d45a91::ostr::Mint",
            "parsedJson": {
                "amount": "10204196",
                "minter": "0x10e535424d0372b1fa9075582a42b43e107da61e789ccf3f6fc55e822bba200b",
                "to": "0x5c29b3a7571733c80beea0a36cbadd1c5911753b165fa5f8f486a1ffbde4af31"
            },
            "bcs": "YRZKdqY9HbSDh5v1odwpgR72P6nYVNNKSAprJo5X5nYXcZdD4ppVZkLkdP5FihNKPKEmw9e2MTqfgnJ4xYhooXTc93K2htnVox",
            "timestampMs": "1696150145484"
        }],
        "nextCursor": {
            "txDigest": "5jUH6zVd98oCSHP2cEgaMjFL4WXEXHkPsk7ksEGCorGJ",
            "eventSeq": "1"
        },
        "hasNextPage": true
    },
    "id": 1
}
{
    data: [
        {
            id: [Object],
            packageId: '0xf794e590fb6a42aee87837631e6ff9c006397503d64a1d3f69bfb3938a118b9e',
            transactionModule: 'operator',
            sender: '0x5c29b3a7571733c80beea0a36cbadd1c5911753b165fa5f8f486a1ffbde4af31',
            type: '0xb64a1deda83c33ce160bc321057615c16306342853f2a0283ebf09f712d45a91::ostr::Mint',
            parsedJson: [Object],
            bcs: 'YRZKdqY9HbSDh5v1odwpgR72P6nYVNNKSAprJo5X5nYXcZdD4ppVZkLkdP5FihNKPKEmw9e2MTqfgnJ4xYhooXTc93K2htnVox',
            timestampMs: '1696150145483'
        }
    ],
    nextCursor: {
        txDigest: '5jUH6zVd98oCSHP2cEgaMjFL4WXEXHkPsk7ksEGCorGJ',
        eventSeq: '1'
    },
    hasNextPage: true
}

Response Data
EventPage : Page<SuiEvent, EventID> - which contains a list of type SuiEvent, a nextCursor field of type EventID , and a hasNextPage field with a boolean telling you whether or not there is a next page..

Event QueryDescriptionParameter Example
TransactionEvents emitted from the specified transaction{"Transaction":"<TransactionBlock>"}
MoveModuleEvents emitted from the specified Move module{"MoveModule":{"package":"", "module":"nft"}}
MoveEventMove struct name of the event{"MoveEvent":"::nft::MintNFTEvent"}
EventTypeType of event described in this Events section{"EventType": "NewObject"}
SenderQuery by sender address{"Sender": "<SuiAddress>"}
RecipientQuery by recipient{"Recipient":{"AddressOwner":"<SuiAddress>"}}
ObjectReturn events associated with the given object{"Object":"<ObjectID>"}
TimeRangeReturn events emitted within a time range{"TimeRange":{"startTime":1669039504014, "endTime":1669039604014}}

Reading Move Data from Sui

sui_getMoveFunctionArgTypes

Description
Return the argument types of a Move function based on normalized type.

Params

  • package : <ObjectID> - the Move package ID, e.g. '0x2'
  • module : <string> - the Move module name, e.g. 'devnet_nft'
  • function : <string> - the Move function name, e.g. 'mint'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_getMoveFunctionArgTypes",
      "params":["{{package}}",
      			"{{module}}",          
                "{{function}}"],
      "id":1}'

Result
Vec<MoveFunctionArgType> : <[MoveFunctionArgType]>

sui_getNormalizedMoveModulesByPackage

Description
Return the structured representations of all modules in the given package.

Params

  • package : <ObjectID> - the Move package ID, e.g. '0x2'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getNormalizedMoveModulesByPackage", "params":["{{package}}"], "id":1}'

Result
BTreeMap<String,SuiMoveNormalizedModule> : <object>

sui_getNormalizedMoveModule

Description
Return a structured representation of a Move module.

Params

  • package : <ObjectID> - the Move package ID, e.g. '0x2'
  • module_name : <string> - the Move module name, e.g. 'devnet_nft'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_getNormalizedMoveModule",
      "params":["{{package}}",
      			"{{module_name}}",          
      "id":1}'

Result

  • <SuiMoveNormalizedModule> : <[SuiMoveNormalizedModule]>
  • address : <string>
  • exposed_functions : <object>
  • file_format_version : <uint32>
  • friends : <[SuiMoveModuleId]>
  • name : <string>
  • structs : <object>

sui_getNormalizedMoveStruct

Description
Return a structured representation of a Move struct.

Params

  • package : <ObjectID> - the Move package ID, e.g. '0x2'
  • module_name : <string> - the Move module name, e.g. 'devnet_nft'
  • struct_name: <string> - the struct name
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_getNormalizedMoveStruct",
      "params":["{{package}}",
      			"{{module_name}}",           
                "{{struct_name}}"],
      "id":1}'

Result

  • <SuiMoveNormalizedStruct> : <[SuiMoveNormalizedStruct]>
  • abilities : <SuiMoveAbilitySet>
  • fields : <[SuiMoveNormalizedField]>
  • type_parameters : <[SuiMoveStructTypeParameter]>

sui_getNormalizedMoveFunction

Description
Return a structured representation of a Move function.

Params

  • package : <ObjectID> - the Move package ID, e.g. '0x2'
  • module_name : <string> - the Move module name, e.g. 'devnet_nft'
  • function_name: <string> - the Move function name, e.g. mint
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_getNormalizedMoveFunction",
      "params":["{{package}}",
      			"{{module_name}}",           
                "{{function_name}}"],
      "id":1}'

Result

  • <SuiMoveNormalizedFunction> : <[SuiMoveNormalizedFunction]>
  • is_entry : <boolean>
  • parameters : <[SuiMoveNormalizedType]>
  • return : <[SuiMoveNormalizedType]>
  • type_parameters : <[SuiMoveAbilitySet]>
  • visibility : <SuiMoveVisibility>

Reading Object Data from Sui

sui_getObject

Description
Return the object data for a specified object.

Params

  • id : the ID of the queried object
  • options : SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned. All options default to false if not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_getObject",
        "params":[
            "{{objectId}}",
            {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": false,
                "showBcs": false,
                "showStorageRebate": true 
            }
    
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getObject({
    id: "{{objectId}}",
    options: {
        showBcs: false,
        showContent: false,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    }
});

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "data": {
            "objectId": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1",
            "version": "1",
            "digest": "A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw",
            "type": "package",
            "owner": "Immutable",
            "previousTransaction": "9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi",
            "storageRebate": "75924000",
            "display": {
                "data": null,
                "error": null
            }
        }
    },
    "id": 1
}
{
    "jsonrpc": "2.0",
    "result": {
        "error": {
            "code": "notExists",
            "object_id": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2"
        }
    },
    "id": 1
}
{
    data: {
        objectId: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1',
        version: '1',
        digest: 'A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw',
        type: 'package',
        owner: 'Immutable',
        previousTransaction: '9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi',
        storageRebate: '75924000',
        display: { data: null, error: null }
    }
}
{
    error: {
        code: 'notExists',
        object_id: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2'
    }
}

Response Data

sui_multiGetObjects

Description
Return the object data for a list of objects.

Params

  • ids : A list of object ids to be queried
  • options : SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned for each id. All options default to false if not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_multiGetObjects",
        "params":[
            [
                "{{objectId}}",
                "{{objectId2}}"
            ],
            {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": false,
                "showBcs": false,
                "showStorageRebate": true 
            }
    
        ],
        "id":1
    }' 
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.multiGetObjects({
    ids: [
             "{{objectId}}",
             "{{objectId2}}"
    ],
    options: {
        showBcs: false,
        showContent: false,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    }
});

Example Response

{
    "jsonrpc": "2.0",
    "result": [
        {
            "data": {
                "objectId": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1",
                "version": "1",
                "digest": "A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw",
                "type": "package",
                "owner": "Immutable",
                "previousTransaction": "9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi",
                "storageRebate": "75924000",
                "display": {
                    "data": null,
                    "error": null
                }
            }
        }, 
        {
            "error": {
                "code": "notExists",
                "object_id": "0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2"
            }
        }
    ],
    "id": 1
}
[
    {
        data: {
            objectId: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a1',
            version: '1',
            digest: 'A8XvoZVx3d3b4w47cAjSoAUKHd1DLRPh4JBwRKCmFeDw',
            type: 'package',
            owner: 'Immutable',
            previousTransaction: '9eAtptEvo2Nugre64dnjD8m87YZWppwTctUfktPXQCUi',
            storageRebate: '75924000',
            display: [Object]
        }
    },
    {
        error: {
            code: 'notExists',
            object_id: '0xee496a0cc04d06a345982ba6697c90c619020de9e274408c7819f787ff66e1a2'
        }
    }
]

Response Data
A list of type SuiObjectResponse, whose elements can be either of:

sui_tryGetPastObject

Description
Return the object information for a specified version. There is no guarantee that objects with past versions can be retrieved by this API. The result may vary across nodes depending on their pruning policies.

Params

  • object_id : <ObjectID> - the ID of the queried object
  • version : <SequenceNumber> - the version of the queried object. If None, default to the latest known version
  • options : <ObjectDataOptions> - Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_tryGetPastObject",
      "params":["{{object_id}}",
      			{{version}},           
      			"showType": true,
      			"showOwner": true,
      			"showPreviousTransaction": true,
      			"showDisplay": false,
      			"showContent": true,
      			"showBcs": false,
      			"showStorageRebate": true],
      "id":1}'

Result
SuiPastObjectResponse : <ObjectRead>

sui_tryMultiGetPastObjects

Description
Return object information for a vector of objects and versions. There is no guarantee that objects with past versions can be retrieved by this API. The result may vary across nodes depending on their pruning policies.

Params

  • past_objects : <[GetPastObjectRequest]> - a vector of objects and versions to be queried
  • options : <ObjectDataOptions> - Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_tryMultiGetPastObjects",
      "params":["{{past_objects}}",
      			"showType": true,
      			"showOwner": true,
      			"showPreviousTransaction": true,
      			"showDisplay": false,
      			"showContent": true,
      			"showBcs": false,
      			"showStorageRebate": true],
      "id":1}'

Result
Vec<SuiPastObjectResponse> : <[ObjectRead]>

suix_getDynamicFieldObject

Description
Return the dynamic field object information for a specified object.

Params

  • parent_object_id : String - the ID of the queried parent object
  • name : type DynamicFieldName with elements:
    • type: String- the type of the object
    • value: additional identifying information (see example below)

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFieldObject",
        "params":[
            "{{parentObjectId}}",
            "type" : "objectType",
            "value" : {{theValue}}
        ],
        "id":1
    }'
    
##
## Real-world mainnet example:
##
curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFieldObject",
        "params":[
             "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd",
             {
                 "type" : "0x2::kiosk::Listing",
                 "value" : {
                     "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                     "is_exclusive" : true
                 }
             }
         ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getDynamicFieldObject({
    parentId: "{{parentObjectId}}",
    name: {
        "type" : "{{objectType}}",
        "value" : {{value}}
     }
});

//
// Real-world mainnet example:
//
await nodeClient.getDynamicFieldObject({
    parentId: "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd",
    name: {
        "type" : "0x2::kiosk::Listing",
        "value" : {
            "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
            "is_exclusive" : true
        }
     }
});

Example Response

{
     "id" : 1,
     "jsonrpc" : "2.0",
     "result" : {
         "data" : {
             "content" : {
                 "dataType" : "moveObject",
                 "fields" : {
                      "id" : {
                          "id" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be"
                      },
                      "name" : {
                          "fields" : {
                              "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                              "is_exclusive" : true
                          },
                      "type" : "0x2::kiosk::Listing"
                      },
                      "value" : "650000000"
                 },
                 "hasPublicTransfer" : false,
                 "type" : "0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>"
            },
            "digest" : "DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X",
            "objectId" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be",
            "owner" : {
                "ObjectOwner" : "0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd"
            },
            "previousTransaction" : "4fPHcSzMb5W1xK3zN79hKDrzYxR35ksQF1HZb1QGpDc9",
            "storageRebate" : "2014000",
            "type" : "0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>",
            "version" : "46057077"
        }
    }
}
{
    data: {
        objectId: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
        version: '46057077',
        digest: 'DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X',
        type: '0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>',
        owner: {
            ObjectOwner: '0x0c687e442db438be185fad2e86a27abfa1f509c4932d6e8a339ae3e7c8609afd'
        },
        previousTransaction: '4fPHcSzMb5W1xK3zN79hKDrzYxR35ksQF1HZb1QGpDc9',
        storageRebate: '2014000',
        content: {
            dataType: 'moveObject',
            type: '0x2::dynamic_field::Field<0x2::kiosk::Listing, u64>',
            hasPublicTransfer: false,
            fields: [Object]
    }
}

Result

suix_getDynamicFields

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

Params

  • parent_object_id : String - the ID of the queried parent object
  • cursor : String - optional paging cursor
  • limit : <uint> - maximum number of items per page; defaults to maximum possible if not specified, which is 50.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeServiceAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getDynamicFields",
        "params":[
            "{{parentObjectId}}",
            "{{cursor}}",           
            {{limit}}
            ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getDynamicFields({
    parentId: "{{parentObjectId}}",
    cursor: "{{cursor}}"
    limit: {{limit}}
});

Example Response

{
    "id" : 1,
    "jsonrpc" : "2.0",
    "result" : {
        "data" : [
            {
                "bcsName" : "49k8ctZtQ8wZoXT8BRc8JBEYZNRDbGJqRCQ9xpycG2rr",
                "digest" : "ZypNDZSBfSB9wNqgqGtjxfBDXM3ARr7x7GxxWhWMGpu",
                "name" : {
                    "type" : "0x2::kiosk::Lock",
                    "value" : {
                        "id" : "0x2ed079dd5b52f5d96238972907db0108de0f9af62e2786935bc2b5706a06f637"
                    }
                },
                "objectId" : "0x0055d940a0c04e0d9a620915c00d62f7059d4cf191e9e9b59177e0288c926485",
                "objectType" : "bool",
                "type" : "DynamicField",
                "version" : 29685770
            },
            {
                "bcsName" : "2AjnSJjsS2VtXpqshETPsk3dUMmfHzyzUZ3c7QmJPmFADN",
                "digest" : "DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X",
                "name" : {
                    "type" : "0x2::kiosk::Listing",
                    "value" : {
                        "id" : "0xe40675ff1cc967c53f6253cb9534bd8b3d9ac43539709ac1a249c5563f323889",
                        "is_exclusive" : true
                    }
                },
                "objectId" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be",
                "objectType" : "u64",
                "type" : "DynamicField",
                "version" : 46057077
            }
        ],
        "hasNextPage" : true,
        "nextCursor" : "0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be"
    }
}
{
    data: [
        {
            name: [Object],
            bcsName: '49k8ctZtQ8wZoXT8BRc8JBEYZNRDbGJqRCQ9xpycG2rr',
            type: 'DynamicField',
            objectType: 'bool',
            objectId: '0x0055d940a0c04e0d9a620915c00d62f7059d4cf191e9e9b59177e0288c926485',
            version: 29685770,
            digest: 'ZypNDZSBfSB9wNqgqGtjxfBDXM3ARr7x7GxxWhWMGpu'
        },
        {
            name: [Object],
            bcsName: '2AjnSJjsS2VtXpqshETPsk3dUMmfHzyzUZ3c7QmJPmFADN',
            type: 'DynamicField',
            objectType: 'u64',
            objectId: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
            version: 46057077,
            digest: 'DJUR6seb8ovP3WiqTywD9NSWVk17ir1MHW4HNSJhG96X'
        }
    ],
    nextCursor: '0x006d57813508869778f3e64c58408cbfbd8191b07d5a26be59b46e8e88a648be',
    hasNextPage: true
}

Result
DynamicFieldPage : type DynamicFieldPage with elements:

  • data : Array of type DynamicFieldInfo
  • nextCursor: String | null
  • hasNextPage: Boolean

sui_getLoadedChildObjects

Description
Return loaded child objects for specified transaction digest

Params

  • digest : <TransactionDigest> - the digest of the queried transaction
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLoadedChildObjects", "params":["{{digest}}"], "id":1}'

Result
SuiLoadedChildObjectsResponse : <LoadedChildObjectsResponse>

suix_getOwnedObjects

Description
Return the list of objects owned by an address.

Params

  • owner : the owner's Sui address
  • SuiObjectResponseQuery
    • filter : SuiObjectDataFilter - Optional. Object query criteria.
    • options: SuiObjectDataOptions - Optional. Sui options for specifying the object content to be returned. All options default to false if not provided.
  • cursor : <CheckpointedObjectID> - 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> - optional limit of items per page; default to maximum limit of 50 if not specified.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getOwnedObjects",
        "params":[
            "{{ownersSuiAddress}}",
            {
            {{SuiObjectDataFilter}}, # e.g. "Package": "0xc8ada8b9d295379f5c8128fa796b76ddfd8ab78be669463520a6df57d20e5719"
            "options": {
                "showType": true,
                "showOwner": true,
                "showPreviousTransaction": true,
                "showDisplay": true,
                "showContent": true,
                "showBcs": true,
                "showStorageRebate": true 
            }
        }
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getOwnedObjects({
    owner: "{{ownersSuiAddress}}",
    filter: {
      {{SuiObjectDataFilter}} // e.g. Package: "0xc8ada8b9d295379f5c8128fa796b76ddfd8ab78be669463520a6df57d20e5719"
    },
    options:{
        showBcs: true,
        showContent: true,
        showDisplay: true,
        showOwner: true,
        showPreviousTransaction: true,
        showStorageRebate: true,
        showType: true
    },
   cursor: null,
   limit: null
});

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "data": [{
            "data": {
                "objectId": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
                "version": "36175593",
                "digest": "Gn4n9ZvoUuTmMhUSyb6JfuLjvEvX6xnpmnCydtaLG35n",
                "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                "owner": {
                    "AddressOwner": "0x4da016bcfd074d7419afa7b9168dd3bc4b6dcfdbe76465bbb34aac299857562a"
                },
                "previousTransaction": "Hpx6kbrtGD4RXa4to7zwJrrbnXs3ovmHZCEfPEnjr7uH",
                "storageRebate": "1816400",
                "display": {
                    "data": {
                        "creator": "Worlds Beyond Creator",
                        "description": "The Infinity Passport is a loyalty program that rewards players for playing games in our ecosystem. Players earn Infinity Credits on their Infinity Passports for playing Worlds Beyond games, winning competitions, completing challenges and more. These Infinity Credits can be redeemed for a variety of rewards, including WBITS mining keys, in-game items, exclusive content, and real-world prizes. Be sure to follow news in our Discord and Twitter for the most updated information.",
                        "image_url": "https://cdn.worldsbeyondnft.com/nft/loyalty-boxes/0.png",
                        "infinity_credits": "27630",
                        "link": "https://worldsbeyondnft.com/loyalty-boxes/0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
                        "name": "Infinity Passport #81430",
                        "project_url": "https://worldsbeyondnft.com"
                    },
                    "error": null
                },
                "content": {
                    "dataType": "moveObject",
                    "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                    "hasPublicTransfer": false,
                    "fields": {
                        "attributes": {
                            "type": "0xbc3df36be17f27ac98e3c839b2589db8475fa07b20657b08e8891e3aaf5ee5f9::attributes::Attributes",
                            "fields": {
                                "map": {
                                    "type": "0x2::vec_map::VecMap<0x1::ascii::String, 0x1::ascii::String>",
                                    "fields": {
                                        "contents": [{
                                            "type": "0x2::vec_map::Entry<0x1::ascii::String, 0x1::ascii::String>",
                                            "fields": {
                                                "key": "ID",
                                                "value": "81430"
                                            }
                                        }, {
                                            "type": "0x2::vec_map::Entry<0x1::ascii::String, 0x1::ascii::String>",
                                            "fields": {
                                                "key": "Infinity Credits",
                                                "value": "900"
                                            }
                                        }]
                                    }
                                }
                            }
                        },
                        "id": {
                            "id": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371"
                        },
                        "infinity_credits": "27630",
                        "name": "Infinity Passport #81430",
                        "type": "0"
                    }
                },
                "bcs": {
                    "dataType": "moveObject",
                    "type": "0x8bdc95e99e393fea9b0e010353ef27109ca6b93d96c57090d7ab61fc9ca4d78d::loyalty::Box",
                    "hasPublicTransfer": false,
                    "version": 36175593,
                    "bcsBytes": "W3mVY0OqbTwJ42LdIPl7ZQJ+DGTnXoioiqWW5F06I3EAAAAAAAAAABhJbmZpbml0eSBQYXNzcG9ydCAjODE0MzDuawAAAAAAAAICSUQFODE0MzAQSW5maW5pdHkgQ3JlZGl0cwM5MDA="
                }
            }
        }],
        "nextCursor": "0x5b79956343aa6d3c09e362dd20f97b65027e0c64e75e88a88aa596e45d3a2371",
        "hasNextPage": false ## since this is false, you should not follow the cursor
    },
    "id": 1
}
{
    data: [ { data: [Object] } ],
    nextCursor: '0x163672be5eceb498c45a6e92e57e8da19f20c30edbd67dd9d9e8db91796991e1',
    hasNextPage: false // Since this is false, you should not follow the cursor as there
                     // are no more objects owned by the address that match the filter.
}

Response Data
PaginatedObjectsResponse containing:

  • data: list of type SuiObjectResponse
  • hasNextPage: boolean - if false, there are no more results to fetch
  • nextCursor?: String - if hasNextPage is true use this cursor in the subsequent request to fetch additional objects.

Reading Coin Data from Sui

suix_getBalance

Description
Return the total Coin balance owned by an address for one coin type.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • coin_type : <string> - (optional) fully qualified type names for the coin. Defaults to 0x2::sui::SUI if not specified.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getBalance",
        "params":[
            "{{ownerAddress}}",
            "{{coinType}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getBalance({
  owner: "{{ownerAddress}}",
  coinType: "{{coinType}}"
});

Example Response

{
    "jsonrpc":"2.0",
    "result":{
        "coinType":"0x2::sui::SUI",
        "coinObjectCount":11,
        "totalBalance":"15822947868",
        "lockedBalance":{}
    },
    "id":1
}
{
  coinType: '0x2::sui::SUI',
  coinObjectCount: 11,
  totalBalance: '15822947868',
  lockedBalance: {}
}

Response Data

A CoinBalance object containing:

  • coinType : <string>
  • coinObjectCount : <uint>
  • totalBalance : <BigInt_for_uint128>
  • lockedBalance : <object>

suix_getAllBalances

Description
Return the balance for all Coin types owned by an address.

Params

  • owner : <SuiAddress> - the owner's Sui address

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getAllBalances",
        "params":[
            "{{ownerAddress}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getAllBalances({
  owner: "{{ownerAddress}}"
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : [
        {
            "coinObjectCount" : 11,
            "coinType" : "0x2::sui::SUI",
            "lockedBalance" : {},
            "totalBalance" : "15822947868"
        }
    ],
    "id" : 1
}
[
  {
    coinType: '0x2::sui::SUI',
    coinObjectCount: 11,
    totalBalance: '15822947868',
    lockedBalance: {}
  }
]

Response Data
An array of type CoinBalance , where a CoinBalance is an object containing:

  • coinType : <string>
  • coinObjectCount : <uint>
  • totalBalance : <BigInt_for_uint128>
  • lockedBalance : <object>

suix_getCoins

Description
Return all Coin objects owned by an address of a given Coin type.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • coin_type : <string> - (optional) fully qualified type names for the coin. Defaults to 0x2::sui::SUI if not specified.
  • cursor : <ObjectID> - (optional) paging cursor of the coin Object to start after when returning results for the next request
  • limit : <uint> - (optional) maximum number of items per page

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getCoins",
        "params":[
            "{{ownerAddress}}",
            "{{coinType}}",
            "{{cursor}}",
            {{limit}}
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getCoins({
  owner: "{{ownerAddress}}",
  cursor: "{{cursor}}",
  limit: {{limit}},
  coinType: "{{coinType}}"
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : {
        "data" : [
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07",
                "coinType" : "0x2::sui::SUI",
                "digest" : "62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct",
                "previousTransaction" : "32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz",
                "version" : "1191782"
            },
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x3eb0bace095a1703998be4c8cf243a709ae3ef86bc5a6ebcd165c7d72279eea0",
                "coinType" : "0x2::sui::SUI",
                "digest" : "BQdrF9DYTU4tjfiqxW21DfFkcMENDSuWmA2cuELzeT8j",
                "previousTransaction" : "74xn4rX8hbN1dYEbhHz7jCctatVbdLXcgBXbtZ7WQbxj",
                "version" : "1074085"
            },
            {
                "balance" : "1000000000",
                "coinObjectId" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727",
                "coinType" : "0x2::sui::SUI",
                "digest" : "6eB7ssJnR8wR45LqvpMcSqUnYvja4ZhqZh8H2fAeWjKG",
                "previousTransaction" : "8FhkCTwj7toJ4E9mYq6gsvG6Gbi547Sxtf1ew9t9czxk",
                "version" : "1046394"
            }
        ],
        "hasNextPage" : true,
        "nextCursor" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727"
    },
    "id" : 1
}
{
  data: [
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x1c709e5b04848d0d8bff33f704cc13e1850e89e436aa39006efb1542aae63662',
      version: '23580100',
      digest: '6LSuGqMeapf3QEer5GQP6dYbt6qnU7Syf5hDVjURmqLF',
      balance: '2822947868',
      previousTransaction: 'DWmo9FQKTjTj99jBwGcC56fKn7CzjGguEZffT62V2QS'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07',
      version: '1191782',
      digest: '62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct',
      balance: '1000000000',
      previousTransaction: '32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
      version: '629073',
      digest: 'J5bVLnhArLZYd8qp8hGeNX5iR9Y7ZjWxFTbHNmN5d2aA',
      balance: '1000000000',
      previousTransaction: '5hB7axMVtZ7dNWaZW77nR8zYsY1HMAJRAdG5rz59p9Tp'
    }
  ],
  nextCursor: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
  hasNextPage: false
}

Response Data
PaginatedCoins object with fields:

  • data: Array of type CoinStruct with fields:
    • balance: String
    • coinObjectId: String
    • coinType: String
    • digest: String
    • previousTransaction: String
    • version: String
  • hasNextPage: Boolean
  • nextCursor?: String | null

suix_getAllCoins

Description
Return all Coin objects owned by an address.

Params

  • owner : <SuiAddress> - the owner's Sui address
  • cursor : <ObjectID> - (optional) paging cursor
  • limit : <uint> - (optional) maximum number of items per page

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"suix_getAllCoins",
        "params":[
            "{{ownerAddress}}",
            "{{cursor}}",
            {{limit}}
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getAllCoins({
  owner: "{{ownerAddress}}",
  cursor: "{{cursor}}",
  limit: {{limit}}
});

Example Response

{
    "jsonrpc" : "2.0",
    "result" : {
       "data" : [
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07",
               "coinType" : "0x2::sui::SUI",
               "digest" : "62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct",
               "previousTransaction" : "32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz",
               "version" : "1191782"
           },
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x3eb0bace095a1703998be4c8cf243a709ae3ef86bc5a6ebcd165c7d72279eea0",
               "coinType" : "0x2::sui::SUI",
               "digest" : "BQdrF9DYTU4tjfiqxW21DfFkcMENDSuWmA2cuELzeT8j",
               "previousTransaction" : "74xn4rX8hbN1dYEbhHz7jCctatVbdLXcgBXbtZ7WQbxj",
               "version" : "1074085"
           },
           {
               "balance" : "1000000000",
               "coinObjectId" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727",
               "coinType" : "0x2::sui::SUI",
               "digest" : "6eB7ssJnR8wR45LqvpMcSqUnYvja4ZhqZh8H2fAeWjKG",
               "previousTransaction" : "8FhkCTwj7toJ4E9mYq6gsvG6Gbi547Sxtf1ew9t9czxk",
               "version" : "1046394"
           }
       ],
       "hasNextPage" : true,
       "nextCursor" : "0x75beecf910f5e585cf1a1ccee0a1176130dfd0e0a34ce4bf027032e6a7797727"
    },
    "id" : 1
}
{
  data: [
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x1c709e5b04848d0d8bff33f704cc13e1850e89e436aa39006efb1542aae63662',
      version: '23580100',
      digest: '6LSuGqMeapf3QEer5GQP6dYbt6qnU7Syf5hDVjURmqLF',
      balance: '2822947868',
      previousTransaction: 'DWmo9FQKTjTj99jBwGcC56fKn7CzjGguEZffT62V2QS'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0x34a947649e7d1837dc864bfa5bbbc873fef7f003ee8b502005f521aca9ba6e07',
      version: '1191782',
      digest: '62xUAyKWPf8yMkCUxkNNj5js8FMWnbsv6QC75QhKRYct',
      balance: '1000000000',
      previousTransaction: '32sp5CeigGxKqEhMqDUJDaSb48eMPgLj1fD7UXxvjekz'
    },
    {
      coinType: '0x2::sui::SUI',
      coinObjectId: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
      version: '629073',
      digest: 'J5bVLnhArLZYd8qp8hGeNX5iR9Y7ZjWxFTbHNmN5d2aA',
      balance: '1000000000',
      previousTransaction: '5hB7axMVtZ7dNWaZW77nR8zYsY1HMAJRAdG5rz59p9Tp'
    }
  ],
  nextCursor: '0xfab8b696ffc877ee0667719465402a408da361b8e424299ef9370c1ad0eaf5e1',
  hasNextPage: false
}

Response Data
PaginatedCoins object with fields:

  • data: Array of type CoinStruct with fields:
    • balance: String
    • coinObjectId: String
    • coinType: String
    • digest: String
    • previousTransaction: String
    • version: String
  • hasNextPage: Boolean
  • nextCursor?: String | null

suix_getCoinMetadata

Description
Return metadata(e.g., symbol, decimals) for a coin.

Params

  • coin_type : <string> - fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCoinMetadata", "params":["{{coin_type}}"], "id":1}'

Result

  • SuiCoinMetadata : <SuiCoinMetadata>
  • decimals : <uint8> - Number of decimal places the coin uses
  • description : <string> - Description of the token
  • iconUrl : <string,null> - URL for the token logo
  • id : <[ObjectID]> - Object id for the CoinMetadata object
  • name : <string> - Name for the token
  • symbol : <string> - Symbol for the token

suix_getTotalSupply

Description
Return total supply for a coin.

Params

  • coin_type : <string> - fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getTotalSupply", "params":["{{coin_type}}"], "id":1}'

Result

  • Supply : <Supply>
  • value : <BigInt_for_uint64>

Reading Name Service Data from Sui

suix_resolveNameServiceAddress

Description
Return the resolved address given resolver and name.

Params

  • name : <string> - the name to resolve
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_resolveNameServiceAddress", "params":["{{name}}"], "id":1}'

Result

  • SuiAddress : <SuiAddress>

suix_resolveNameServiceNames

Description
Return the resolved names given address, if multiple names are resolved, the first one is the primary name.

Params

  • address: <SuiAddress> - the address to resolve
  • cursor: <ObjectID>
  • limit: <uint> - maximum number of items per page
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"suix_resolveNameServiceNames",
      "params":["{{address}}",
      			"{{cursor}}",          
                {{limit}}],
      "id":1}'

Result

  • Page<String,ObjectID> : <Page_for_String_and_ObjectID>

Reading System Data from Sui

suix_getReferenceGasPrice

Description
Return the reference gas price for the network
Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getReferenceGasPrice", "params":[], "id":1}'

Result

  • BigInt<u64> : <BigInt_for_uint64>

suix_getCommitteeInfo

Description
Return the committee information for the epoch of interest.

Params

  • epoch : <BigInt_for_uint64> - the epoch of interest. If None, default to the latest epoch
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCommitteeInfo", "params":[{{epoch}}], "id":1}'

Result

  • SuiCommittee : <CommitteeInfo>

sui_getProtocolConfig

Description
Return the protocol config table for the given version number. If the version number is not specified, If none is specified, the node uses the version of the latest epoch it has processed.

Params

  • version : <BigInt_for_uint64> - optional protocol version specifier
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakes", "params":[{{version}}], "id":1}'

Result

  • ProtocolConfigResponse : <ProtocolConfig>

suix_getStakes

Description
Return all delegated stake.

Params

  • owner : <SuiAddress> - the owner's Sui address
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakes", "params":["{{owner}}"], "id":1}'

Result

  • Vec<DelegatedStake> : <[DelegatedStake]>

suix_getStakesByIds

Description
Return one or more delegated stake. If a Stake was withdrawn, its status will be Unstaked.

Params

  • staked_sui_ids : <[ObjectID]>
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakesByIds", "params":["{{staked_sui_ids}}"], "id":1}'

Result

  • Vec<DelegatedStake> : <[DelegatedStake]>

sui_getLatestCheckpointSequenceNumber

Description
Return the sequence number of the latest checkpoint that has been executed

Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'

Result

  • BigInt<u64> : <BigInt_for_uint64>

sui_getCheckpoint

Description
Return a checkpoint.

Params

  • id : <CheckpointID> - checkpoint identifier; can use either checkpoint digest, or checkpoint sequence number as input
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getCheckpoint", "params":["{{id}}"], "id":1}'

Result

  • Checkpoint : <Checkpoint>
  • checkpointCommitments : <[CheckpointCommitment]> - Commitments to checkpoint state
  • digest : <[CheckpointDigest]> - Checkpoint digest
  • endOfEpochData : <[EndOfEpochData]> - Present only on the final checkpoint of the epoch.
  • epoch : <BigInt_for_uint64> - Checkpoint's epoch ID
  • epochRollingGasCostSummary : <[GasCostSummary]> - The running total gas costs of all transactions included in the current epoch so far until this checkpoint.
  • networkTotalTransactions : <BigInt_for_uint64> - Total number of transactions committed since genesis, including those in this checkpoint.
  • previousDigest : <[CheckpointDigest]> - Digest of the previous checkpoint
  • sequenceNumber : <[BigInt]> - Checkpoint sequence number
  • timestampMs : <BigInt_for_uint64> - Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they originate from the same underlining consensus commit
  • transactions : <[TransactionDigest]> - Transaction digests

sui_getCheckpoints

Description
Return contents of a checkpoint based on checkpoint content digest

Params

  • cursor : <BigInt_for_uint64> - 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> - maximum items returned per page, default to maximum limit if not specified
  • descending_order : <boolean> - query result ordering, default to false (ascending order), oldest record first
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_getCheckpoints",
      "params":[{{cursor}},
      			{{limit}},          
                {{descending_order}}],
      "id":1}'

Result

  • CheckpointPage : <Page_for_Checkpoint_and_BigInt_for_uint64>

sui_getLatestCheckpointSequenceNumber

Description
Return the sequence number of the latest checkpoint that has been executed

Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'

Result

  • SuiCheckpointSequenceNumber : <BigInt_for_uint64>

sui_getChainIdentifier

Description
Return the chain's identifier

Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getChainIdentifier", "params":[], "id":1}'

Result

  • String : <string>

suix_getValidatorsApy

Return the validator APY

Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getValidatorsApy", "params":[], "id":1}'

Result

  • ValidatorApys : <ValidatorApys>
  • apys : <[ValidatorApy]>
  • epoch : <BigInt_for_uint64>

suix_getLatestSuiSystemState

Return the latest SUI system state object on-chain.

Params


curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getLatestSuiSystemState", "params":[], "id":1}'

Result

  • SuiSystemStateSummary : <SuiSystemStateSummary>
  • activeValidators : <[SuiValidatorSummary]> - The list of active validators in the current epoch.
  • atRiskValidators : <[SuiAddress]> - Map storing the number of epochs for which each validator has been below the low stake threshold.
  • epoch : <BigInt_for_uint64> - The current epoch ID, starting from 0.
  • epochDurationMs : <BigInt_for_uint64> - The duration of an epoch, in milliseconds.
  • epochStartTimestampMs : <BigInt_for_uint64> - Unix timestamp of the current epoch start
  • inactivePoolsId : <[ObjectID]> - ID of the object that maps from a staking pool ID to the inactive validator that has that pool as its staking pool.
  • inactivePoolsSize : <BigInt_for_uint64> - Number of inactive staking pools.
    maxValidatorCount : <BigInt_for_uint64> - Maximum number of active validators at any moment. We do not allow the number of validators in any epoch to go above this.
  • minValidatorJoiningStake : <BigInt_for_uint64> - Lower-bound on the amount of stake required to become a validator.
  • pendingActiveValidatorsId : <[ObjectID]> - ID of the object that contains the list of new validators that will join at the end of the epoch.
  • pendingActiveValidatorsSize : <BigInt_for_uint64> - Number of new validators that will join at the end of the epoch.
  • pendingRemovals : <[]> - Removal requests from the validators. Each element is an index pointing to active_validators.
  • protocolVersion : <BigInt_for_uint64> - The current protocol version, starting from 1.
  • referenceGasPrice : <BigInt_for_uint64> - The reference gas price for the current epoch.
  • safeMode : <boolean> - Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can be reset once we are able to successfully execute advance_epoch.
  • safeModeComputationRewards : <BigInt_for_uint64> - Amount of computation rewards accumulated (and not yet distributed) during safe mode.
  • safeModeNonRefundableStorageFee : <BigInt_for_uint64> - Amount of non-refundable storage fee accumulated during safe mode.
  • safeModeStorageRebates : <BigInt_for_uint64> - Amount of storage rebates accumulated (and not yet burned) during safe mode.
  • safeModeStorageRewards : <BigInt_for_uint64> - Amount of storage rewards accumulated (and not yet distributed) during safe mode.
  • stakeSubsidyBalance : <BigInt_for_uint64> - Balance of SUI set aside for stake subsidies that will be drawn down over time.
  • stakeSubsidyCurrentDistributionAmount : <BigInt_for_uint64> - The amount of stake subsidy to be drawn down per epoch. This amount decays and decreases over time.
  • stakeSubsidyDecreaseRate : <uint16> - The rate at which the distribution amount decays at the end of each period. Expressed in basis points.
  • stakeSubsidyDistributionCounter : <BigInt_for_uint64> - This counter may be different from the current epoch number if in some epochs we decide to skip the subsidy.
  • stakeSubsidyPeriodLength : <BigInt_for_uint64> - Number of distributions to occur before the distribution amount decays.
  • stakeSubsidyStartEpoch : <BigInt_for_uint64> - The starting epoch in which stake subsidies start being paid out
  • stakingPoolMappingsId : <[ObjectID]> - ID of the object that maps from staking pool's ID to the sui address of a validator.
  • stakingPoolMappingsSize : <BigInt_for_uint64> - Number of staking pool mappings.
  • storageFundNonRefundableBalance : <BigInt_for_uint64> - The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable storage rebates and any leftover staking rewards.
  • storageFundTotalObjectStorageRebates : <BigInt_for_uint64> - The storage rebates of all the objects on-chain stored in the storage fund.
  • systemStateVersion : <BigInt_for_uint64> - The current version of the system state data structure type.
  • totalStake : <BigInt_for_uint64> - Total amount of stake from all active validators at the beginning of the epoch.
  • validatorCandidatesId : <[ObjectID]> - ID of the object that stores preactive validators, mapping their addresses to their Validator structs.
  • validatorCandidatesSize : <BigInt_for_uint64> - Number of preactive validators.
  • validatorLowStakeGracePeriod : <BigInt_for_uint64> - A validator can have stake below the validator_low_stake_threshold for this many epochs before being kicked out.
  • validatorLowStakeThreshold : <BigInt_for_uint64> - Validators with stake amount below validator_low_stake_threshold are considered to have low stake and will be escorted out of the validator set after being below this threshold for more than validator_low_stake_grace_period number of epochs.
  • validatorReportRecords : <[SuiAddress]> - A map storing the records of validator reporting each other.
  • validatorVeryLowStakeThreshold : <BigInt_for_uint64> - Validators with stake below validator_very_low_stake_threshold will be removed immediately at epoch change, no grace period.

Reading Transaction Block Data from Sui

sui_getTotalTransactionBlocks

Description
Return the total number of transactions known to the node.

Params

  • N/A

Example Request

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeServiceAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc": "2.0", 
        "method": "sui_getTotalTransactionBlocks", 
        "params": [], 
        "id": 1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeServiceAccessKey}});

await nodeClient.getTotalTransactionBlocks();

Example Response

{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : "971804907"
}
971804747n

Response Data
BigInt<u64> : total number of transactions on the network known by the node you queried.

sui_getTransactionBlock

Description
Return the transaction response object for a specified transaction digest.

Params

  • digest : <TransactionDigest> - the digest of the queried transaction
  • options : <TransactionBlockResponseOptions> - optional. Sui options for specifying the transaction content to be returned. All options default to false if not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_getTransactionBlock",
        "params":[
            "{{digest}}", 
            {
                "showInput": true,
                "showRawInput": true,
                "showEffects": true,
                "showEvents": true,
                "showObjectChanges": true,
                "showBalanceChanges": true
             }
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.getTransactionBlock({
    digest: "{{digest}}",
    options: {
        showEvents: true,
        showBalanceChanges: true,
        showInput: true,
        showRawInput: true,
        showObjectChanges: true,
        showEffects: true
    }
});

Example Response

{
    "jsonrpc":"2.0",
    "result":{
        "digest":"AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm",
        "timestampMs":"1697114914140",
        "checkpoint":"15380798"
    },
    "id":1
}

{
    "jsonrpc": "2.0",
    "result": {
        "digest": "AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm",
        "transaction": {
            "data": {
                "messageVersion": "v1",
                "transaction": {
                    "kind": "ProgrammableTransaction",
                    "inputs": [{
                        "type": "object",
                        "objectType": "immOrOwnedObject",
                        "objectId": "0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc",
                        "version": "32511092",
                        "digest": "H46gvRyHqev3CKJoRWY9Cr9fdgYvsj2B3Y4yJJKH39n"
                    }, {
                        "type": "pure",
                        "valueType": "u64",
                        "value": "3"
                    }],
                    "transactions": [{
                        "MoveCall": {
                            "package": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
                            "module": "game_8192",
                            "function": "make_move",
                            "arguments": [{
                                "Input": 0
                            }, {
                                "Input": 1
                            }]
                        }
                    }]
                },
                "sender": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4",
                "gasData": {
                    "payment": [{
                        "objectId": "0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9",
                        "version": 32511092,
                        "digest": "HiRuPssbzFPAnR5CqRjT4XNibbkuCSpV5sEw6PWtPkkr"
                    }],
                    "owner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4",
                    "price": "750",
                    "budget": "200000000"
                }
            },
            "txSignatures": ["AMHzoT/o/JxqBWGNBE/jXTz5bwjG6I+R+bIO/8KQuACtojP61jVQ4IWiWZVcsUT6tvcISvNL81LIb/xrQpOU+AwwHG2Rohsdt60Et3BX8+aK5w/uaO70ADCJtGGo1GJlsA=="]
        },
        "rawTransaction": "AQAAAAAAAgEAuSljXvS8iIgT9+59oGY/BF0Bof3kBoHhHU/AwdLMzNx0FPABAAAAACAEHMvDS9cuYV88wr2dD+FQJcFux9gEOtMCUzVpGXcgxQAIAwAAAAAAAAABAHL5x2QhFwtaeXQyup4bOy4rfPb6om65VTlsdzryR54eCWdhbWVfODE5MgltYWtlX21vdmUAAgEAAAEBAFEJDxzAsOXCePxbwKZkuygaa6yH/TMX+lC3np/mwWzEAQYhOhJQ1aUYii7rxutZmAPMpZpV7RrxIEXeDQfgrUb5dBTwAQAAAAAg+Ff2WYzBH/zwdYITQQI84Q9KZAj7EX6M0n+3M0QsmbtRCQ8cwLDlwnj8W8CmZLsoGmush/0zF/pQt56f5sFsxO4CAAAAAAAAAMLrCwAAAAAAAWEAwfOhP+j8nGoFYY0ET+NdPPlvCMboj5H5sg7/wpC4AK2iM/rWNVDghaJZlVyxRPq29whK80vzUshv/GtCk5T4DDAcbZGiGx23rQS3cFfz5ornD+5o7vQAMIm0YajUYmWw",
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "182",
            "gasUsed": {
                "computationCost": "750000",
                "storageCost": "3184400",
                "storageRebate": "3152556",
                "nonRefundableStorageFee": "31844"
            },
            "modifiedAtVersions": [{
                "objectId": "0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9",
                "sequenceNumber": "32511092"
            }, {
                "objectId": "0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc",
                "sequenceNumber": "32511092"
            }],
            "transactionDigest": "AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm",
            "mutated": [{
                "owner": {
                    "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
                },
                "reference": {
                    "objectId": "0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9",
                    "version": 32511093,
                    "digest": "43dHK4BJzLt4sEzSbip9gExsXjJyPjEnqnVCsxxJFUbm"
                }
            }, {
                "owner": {
                    "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
                },
                "reference": {
                    "objectId": "0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc",
                    "version": 32511093,
                    "digest": "6ZAZD22Wxf7yq6Sg7LEvjQKmZkLt62MYge3wZ6birK2"
                }
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
                },
                "reference": {
                    "objectId": "0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9",
                    "version": 32511093,
                    "digest": "43dHK4BJzLt4sEzSbip9gExsXjJyPjEnqnVCsxxJFUbm"
                }
            },
            "eventsDigest": "w9EH7rPK8ZeEqjARC9zTdbhmtGKzRFeUuwgxo7Nbmfn",
            "dependencies": ["8h7Lu65EaAEgWF97VLyXC8xgi2fcSdMcSH1VpqXfscw", "8mA5YRaKcm2Pfy4MeJF16CtmZgsdnFyL3DNot3yRXFoW"]
        },
        "events": [{
            "id": {
                "txDigest": "AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm",
                "eventSeq": "0"
            },
            "packageId": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
            "transactionModule": "game_8192",
            "sender": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4",
            "type": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::GameMoveEvent8192",
            "parsedJson": {
                "direction": "3",
                "game_id": "0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc",
                "game_over": false,
                "last_tile": ["0", "1", "1"],
                "move_count": "593",
                "packed_spaces": "12138418370724765968",
                "score": "11396",
                "top_tile": "10"
            },
            "bcs": "NRc1FEpwwECTKqbLi6Ykb4SLn9gr88LKFCahr8EV4x6qvrYbRXdvP9Tz8sZQK6PChXtKWQVm9Ey25DFCQcoeL3irNQXTuvTNVGu6drq1Hvgx6Lx6W1YWCetbTaG1dv2u5H2wKm"
        }],
        "objectChanges": [{
            "type": "mutated",
            "sender": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4",
            "owner": {
                "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9",
            "version": "32511093",
            "previousVersion": "32511092",
            "digest": "43dHK4BJzLt4sEzSbip9gExsXjJyPjEnqnVCsxxJFUbm"
        }, {
            "type": "mutated",
            "sender": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4",
            "owner": {
                "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
            },
            "objectType": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::Game8192",
            "objectId": "0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc",
            "version": "32511093",
            "previousVersion": "32511092",
            "digest": "6ZAZD22Wxf7yq6Sg7LEvjQKmZkLt62MYge3wZ6birK2"
        }],
        "balanceChanges": [{
            "owner": {
                "AddressOwner": "0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "-781844"
        }],
        "timestampMs": "1697114914140",
        "checkpoint": "15380798"
    },
    "id": 1
}
{
    digest: 'AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm',
    timestampMs: '1697114914140',
    checkpoint: '15380798'
}
{
      digest: 'AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm',
      transaction: {
          data: {
            messageVersion: 'v1',
            transaction: [Object],
            sender: '0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4',
            gasData: [Object]
          },
          txSignatures: [
              'AMHzoT/o/JxqBWGNBE/jXTz5bwjG6I+R+bIO/8KQuACtojP61jVQ4IWiWZVcsUT6tvcISvNL81LIb/xrQpOU+AwwHG2Rohsdt60Et3BX8+aK5w/uaO70ADCJtGGo1GJlsA=='
          ]
      },
      rawTransaction: 'AQAAAAAAAgEAuSljXvS8iIgT9+59oGY/BF0Bof3kBoHhHU/AwdLMzNx0FPABAAAAACAEHMvDS9cuYV88wr2dD+FQJcFux9gEOtMCUzVpGXcgxQAIAwAAAAAAAAABAHL5x2QhFwtaeXQyup4bOy4rfPb6om65VTlsdzryR54eCWdhbWVfODE5MgltYWtlX21vdmUAAgEAAAEBAFEJDxzAsOXCePxbwKZkuygaa6yH/TMX+lC3np/mwWzEAQYhOhJQ1aUYii7rxutZmAPMpZpV7RrxIEXeDQfgrUb5dBTwAQAAAAAg+Ff2WYzBH/zwdYITQQI84Q9KZAj7EX6M0n+3M0QsmbtRCQ8cwLDlwnj8W8CmZLsoGmush/0zF/pQt56f5sFsxO4CAAAAAAAAAMLrCwAAAAAAAWEAwfOhP+j8nGoFYY0ET+NdPPlvCMboj5H5sg7/wpC4AK2iM/rWNVDghaJZlVyxRPq29whK80vzUshv/GtCk5T4DDAcbZGiGx23rQS3cFfz5ornD+5o7vQAMIm0YajUYmWw',
      effects: {
          messageVersion: 'v1',
          status: { status: 'success' },
          executedEpoch: '182',
          gasUsed: {
              computationCost: '750000',
              storageCost: '3184400',
              storageRebate: '3152556',
              nonRefundableStorageFee: '31844'
          },
          modifiedAtVersions: [ [Object], [Object] ],
          transactionDigest: 'AgJdnNoXFgDvTzXrsMLBpnhLvY7FRHjy2qP7Jwiyxwbm',
          mutated: [ [Object], [Object] ],
          gasObject: { owner: [Object], reference: [Object] },
          eventsDigest: 'w9EH7rPK8ZeEqjARC9zTdbhmtGKzRFeUuwgxo7Nbmfn',
          dependencies: [
              '8h7Lu65EaAEgWF97VLyXC8xgi2fcSdMcSH1VpqXfscw',
              '8mA5YRaKcm2Pfy4MeJF16CtmZgsdnFyL3DNot3yRXFoW'
          ]
      },
      events: [
            {
                  id: [Object],
                  packageId: '0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e',
                  transactionModule: 'game_8192',
                  sender: '0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4',
                  type: '0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::GameMoveEvent8192',
                  parsedJson: [Object],
                  bcs: 'NRc1FEpwwECTKqbLi6Ykb4SLn9gr88LKFCahr8EV4x6qvrYbRXdvP9Tz8sZQK6PChXtKWQVm9Ey25DFCQcoeL3irNQXTuvTNVGu6drq1Hvgx6Lx6W1YWCetbTaG1dv2u5H2wKm'
            }
      ],
      objectChanges: [
            {
                  type: 'mutated',
                  sender: '0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4',
                  owner: [Object],
                  objectType: '0x2::coin::Coin<0x2::sui::SUI>',
                  objectId: '0x06213a1250d5a5188a2eebc6eb599803cca59a55ed1af12045de0d07e0ad46f9',
                  version: '32511093',
                  previousVersion: '32511092',
                  digest: '43dHK4BJzLt4sEzSbip9gExsXjJyPjEnqnVCsxxJFUbm'
            },
            {
                  type: 'mutated',
                  sender: '0x51090f1cc0b0e5c278fc5bc0a664bb281a6bac87fd3317fa50b79e9fe6c16cc4',
                  owner: [Object],
                  objectType: '0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::Game8192',
                  objectId: '0xb929635ef4bc888813f7ee7da0663f045d01a1fde40681e11d4fc0c1d2ccccdc',
                  version: '32511093',
                  previousVersion: '32511092',
                  digest: '6ZAZD22Wxf7yq6Sg7LEvjQKmZkLt62MYge3wZ6birK2'
            }
      ],
      balanceChanges: [ { owner: [Object], coinType: '0x2::sui::SUI', amount: '-781844' } ],
      timestampMs: '1697114914140',
      checkpoint: '15380798'
}

Response Data

sui_multiGetTransactionBlocks

Description
Return the transaction response object for multiple transaction digests. Results from this request may be impacted by our pruning policy - see Reading Historical Data.

Params

  • digests: <TransactionDigest> - the digests of the queried transactions
  • options : <TransactionBlockResponseOptions> - Optional. Sui options for specifying the transaction content to be returned. Options default to false when not provided.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name


curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ 
        "jsonrpc":"2.0", 
        "method":"sui_multiGetTransactionBlocks",
        "params":[
            [
            "{{digest_1}}",
            "{{digest_2}}"
            ],
            {
                "showInput": true,
                "showRawInput": true,
                "showEffects": true,
                "showEvents": true,
                "showObjectChanges": true, 
                "showBalanceChanges": true
            }
        ],
        "id":1
    }'

import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.multiGetTransactionBlocks({
    digests: ["{{digest}}","{{digest_2}}"],
    options: {
        showEvents: true,
        showBalanceChanges: true,
        showInput: true,
        showRawInput: true,
        showObjectChanges: true,
        showEffects: true
    }
});

console.log(resp);

Example Response

{
    "jsonrpc":"2.0",
    "result":[
        {
            "digest":"718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu",
            "timestampMs":"1697242012264", // provided for current and most recent epoch
            "checkpoint":"15508611"        // provided for current and most recent epoch
        },
        {
            "digest":"2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY",
            "timestampMs":"1697242011266", // provided for current and most recent epoch
            "checkpoint":"15508610"        // provided for current and most recent epoch
        }
    ],
    "id":"1"
}

{
    "jsonrpc": "2.0",
    "result": [{
        "digest": "718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu",
        "transaction": {
            "data": {
                "messageVersion": "v1",
                "transaction": {
                    "kind": "ProgrammableTransaction",
                    "inputs": [{
                        "type": "object",
                        "objectType": "sharedObject",
                        "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                        "initialSharedVersion": "24193611",
                        "mutable": true
                    }, {
                        "type": "pure",
                        "valueType": "0x2::object::ID",
                        "value": "0x1e760fc31275b3c16d5b4d1ca9f46c1373d78f2960124688be71c979cb504880"
                    }, {
                        "type": "pure",
                        "valueType": "vector<u8>",
                        "value": [185, 189, 203, 155, 52, 60, 153, 72, 255, 2, 161, 129, 188, 130, 101, 214, 109, 86, 142, 236, 46, 224, 243, 17, 12, 206, 38, 61, 52, 228, 226, 31, 17, 135, 250, 178, 89, 37, 210, 176, 95, 59, 240, 226, 192, 193, 116, 55, 13, 201, 50, 231, 179, 164, 7, 172, 71, 167, 36, 138, 63, 179, 174, 188, 128, 102, 85, 65, 240, 253, 90, 103, 130, 28, 85, 41, 203, 67, 82, 148, 252, 95, 38, 164, 90, 10, 185, 183, 195, 57, 202, 225, 131, 46, 158, 252]
                    }],
                    "transactions": [{
                        "MoveCall": {
                            "package": "0x4c2d27c9639362c062148d01ed28cf58430cefadd43267c2e176d93259c258e2",
                            "module": "coin_flip_v2",
                            "function": "settle",
                            "type_arguments": ["0x2::sui::SUI"],
                            "arguments": [{
                                "Input": 0
                            }, {
                                "Input": 1
                            }, {
                                "Input": 2
                            }]
                        }
                    }]
                },
                "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
                "gasData": {
                    "payment": [{
                        "objectId": "0x442b5e975305165ba292e4ccd836bed608dd8a9041c8301fa95e8b41056086e7",
                        "version": 32737590,
                        "digest": "9nvx7NVBAWE3wwE6LyqP8vToavRZCBkpNDny65gxmnjo"
                    }],
                    "owner": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
                    "price": "750",
                    "budget": "1500000"
                }
            },
            "txSignatures": ["AMFDS6PtjxGv60GQz+0bp2yLGW2wYZeRhVZdWcv59Xh/ZU1B2+gbizdIL2tbnEe35y5r/tzYEiPkJJyZuoP9ZAEbVoYEtpNVxa0zqCICROCS/YD9Mgkx5a9DzvO9PQig8g=="]
        },
        "rawTransaction": "AQAAAAAAAwEBRk6peBX99wePjQNY3MhjmvuoxTxYfVzkIXlA6YcOjnRLKnEBAAAAAAEAIB52D8MSdbPBbVtNHKn0bBNz148pYBJGiL5xyXnLUEiAAGFgub3LmzQ8mUj/AqGBvIJl1m1Wjuwu4PMRDM4mPTTk4h8Rh/qyWSXSsF878OLAwXQ3Dcky57OkB6xHpySKP7OuvIBmVUHw/VpnghxVKctDUpT8XyakWgq5t8M5yuGDLp78AQBMLSfJY5NiwGIUjQHtKM9YQwzvrdQyZ8LhdtkyWcJY4gxjb2luX2ZsaXBfdjIGc2V0dGxlAQcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgNzdWkDU1VJAAMBAAABAQABAgA23xE2nPAOzwvmjWupZbCr4uiDvFJFkR46Kev6Cq9raQFEK16XUwUWW6KS5MzYNr7WCN2KkEHIMB+pXotBBWCG5zaJ8wEAAAAAIIKhoisd4MHkUB6/gW9bI8AY8XP3lrcB3cxWlqGVJhE2Nt8RNpzwDs8L5o1rqWWwq+Log7xSRZEeOinr+gqva2nuAgAAAAAAAGDjFgAAAAAAAAFhAMFDS6PtjxGv60GQz+0bp2yLGW2wYZeRhVZdWcv59Xh/ZU1B2+gbizdIL2tbnEe35y5r/tzYEiPkJJyZuoP9ZAEbVoYEtpNVxa0zqCICROCS/YD9Mgkx5a9DzvO9PQig8g==",
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "184",
            "gasUsed": {
                "computationCost": "750000",
                "storageCost": "4354800",
                "storageRebate": "10315404",
                "nonRefundableStorageFee": "104196"
            },
            "modifiedAtVersions": [{
                "objectId": "0x442b5e975305165ba292e4ccd836bed608dd8a9041c8301fa95e8b41056086e7",
                "sequenceNumber": "32737590"
            }, {
                "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                "sequenceNumber": "32747958"
            }, {
                "objectId": "0x026bf24eb4d0bbeef561b32d31c7910120bc15360372ab0b85dc9631e48834c2",
                "sequenceNumber": "32747943"
            }, {
                "objectId": "0x1e760fc31275b3c16d5b4d1ca9f46c1373d78f2960124688be71c979cb504880",
                "sequenceNumber": "32747943"
            }],
            "sharedObjects": [{
                "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                "version": 32747958,
                "digest": "3uenBzsCemEVYarpdUHJgTGvVrq2K9yLGomuC5RpDwxv"
            }],
            "transactionDigest": "718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu",
            "created": [{
                "owner": {
                    "AddressOwner": "0x7b75e24fc1239ea4110af8518848bef3dcf8fbddeca116252bbd5efc3330c384"
                },
                "reference": {
                    "objectId": "0x2c52bf3f24b0c1c9c1dd7ec4bbbca9358b171645c046e7fc8b874e6fdda5c366",
                    "version": 32747959,
                    "digest": "A3BgCHnLbE4Qw97UmJrMhsesSNLzJXKg5nJUday23BDd"
                }
            }],
            "mutated": [{
                "owner": {
                    "AddressOwner": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69"
                },
                "reference": {
                    "objectId": "0x442b5e975305165ba292e4ccd836bed608dd8a9041c8301fa95e8b41056086e7",
                    "version": 32747959,
                    "digest": "7mSiDw3brwY8Y9VKoRXHCjGCUAzd2AGRvWJnPGfjiqD1"
                }
            }, {
                "owner": {
                    "Shared": {
                        "initial_shared_version": 24193611
                    }
                },
                "reference": {
                    "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                    "version": 32747959,
                    "digest": "AKufEuheWcTnRYevVWTPBqq1neWWS7LUx3gmTbwBWKMp"
                }
            }],
            "deleted": [{
                "objectId": "0x026bf24eb4d0bbeef561b32d31c7910120bc15360372ab0b85dc9631e48834c2",
                "version": 32747959,
                "digest": "7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz"
            }, {
                "objectId": "0x1e760fc31275b3c16d5b4d1ca9f46c1373d78f2960124688be71c979cb504880",
                "version": 32747959,
                "digest": "7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz"
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69"
                },
                "reference": {
                    "objectId": "0x442b5e975305165ba292e4ccd836bed608dd8a9041c8301fa95e8b41056086e7",
                    "version": 32747959,
                    "digest": "7mSiDw3brwY8Y9VKoRXHCjGCUAzd2AGRvWJnPGfjiqD1"
                }
            },
            "eventsDigest": "Exh92aH1g8j6Y4yZzFUJCpxUC7NDvJGhkHgMkdMwv7nP",
            "dependencies": ["b5c8btbbTezVVNM8omuCJ9AY4EJvD5kUQyRKe2zM6yW", "2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY", "9jUbWiQYmeo2xQrbvPDJY9GfB27tCSLJ1rXhvbaNkpxr", "GGsDqhUEP1QokmZyrJkYguJutuN1qf2XY6RmtyDtSeM3"]
        },
        "events": [{
            "id": {
                "txDigest": "718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu",
                "eventSeq": "0"
            },
            "packageId": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b",
            "transactionModule": "coin_flip_v2",
            "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
            "type": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b::coin_flip_v2::FeeCollected<0x2::sui::SUI>",
            "parsedJson": {
                "amount": "20000000"
            },
            "bcs": "12iL2WeWAv3"
        }, {
            "id": {
                "txDigest": "718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu",
                "eventSeq": "1"
            },
            "packageId": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b",
            "transactionModule": "coin_flip_v2",
            "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
            "type": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b::coin_flip_v2::Outcome<0x2::sui::SUI>",
            "parsedJson": {
                "challenged": false,
                "game_id": "0x1e760fc31275b3c16d5b4d1ca9f46c1373d78f2960124688be71c979cb504880",
                "player": "0x7b75e24fc1239ea4110af8518848bef3dcf8fbddeca116252bbd5efc3330c384",
                "player_won": true,
                "pnl": "980000000"
            },
            "bcs": "9m2yTgJKuDM4QaNKMTVzqdtRLzJhjft2GdFzB362aGauvFQjWxSFsJFYsx6n6aJxJ5z3hMTVzi2FeNFaSnmeA2WKFC9wdzHAZRsK5"
        }],
        "objectChanges": [{
            "type": "mutated",
            "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
            "owner": {
                "AddressOwner": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0x442b5e975305165ba292e4ccd836bed608dd8a9041c8301fa95e8b41056086e7",
            "version": "32747959",
            "previousVersion": "32737590",
            "digest": "7mSiDw3brwY8Y9VKoRXHCjGCUAzd2AGRvWJnPGfjiqD1"
        }, {
            "type": "mutated",
            "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
            "owner": {
                "Shared": {
                    "initial_shared_version": 24193611
                }
            },
            "objectType": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b::coin_flip_v2::House<0x2::sui::SUI>",
            "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
            "version": "32747959",
            "previousVersion": "32747958",
            "digest": "AKufEuheWcTnRYevVWTPBqq1neWWS7LUx3gmTbwBWKMp"
        }, {
            "type": "created",
            "sender": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69",
            "owner": {
                "AddressOwner": "0x7b75e24fc1239ea4110af8518848bef3dcf8fbddeca116252bbd5efc3330c384"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0x2c52bf3f24b0c1c9c1dd7ec4bbbca9358b171645c046e7fc8b874e6fdda5c366",
            "version": "32747959",
            "digest": "A3BgCHnLbE4Qw97UmJrMhsesSNLzJXKg5nJUday23BDd"
        }],
        "balanceChanges": [{
            "owner": {
                "AddressOwner": "0x36df11369cf00ecf0be68d6ba965b0abe2e883bc5245911e3a29ebfa0aaf6b69"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "5210604"
        }, {
            "owner": {
                "AddressOwner": "0x7b75e24fc1239ea4110af8518848bef3dcf8fbddeca116252bbd5efc3330c384"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "1980000000"
        }],
        "timestampMs": "1697242012264", // provided for current and most recent epoch
        "checkpoint": "15508611"        // provided for current and most recent epoch
    }, {
        "digest": "2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY",
        "transaction": {
            "data": {
                "messageVersion": "v1",
                "transaction": {
                    "kind": "ProgrammableTransaction",
                    "inputs": [{
                        "type": "object",
                        "objectType": "sharedObject",
                        "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                        "initialSharedVersion": "24193611",
                        "mutable": true
                    }, {
                        "type": "pure",
                        "valueType": "vector<0x2::object::ID>",
                        "value": ["0x64923a94d8d4a20b644c4d13c20c990c12788cab9fcb3e5cf3ba66f7f7ed01c7", "0x98117276bd7707a6c28ed95abd96e9cb5fa006e50f05bfb9615100c43f19e0b5", "0xdbaabd60eb1ffd4e69674f7624dec3c69e08015f711711c0c5434e119d8ddc1f", "0x21a20cace450b48607da0bbbe198aac8a79a706445aba9559c089681770ba57b", "0xd40dbea8e0754dab71503dd8933f4939ed4a5f5f3f7d1b8cdc6f8aa21c24d80b", "0x25f77883d766a5d9095497338a552dd3c2970b87209a2facafcf4b4130edc3d9", "0x5c5d4ea18fa8a4c19fbf383579ba1aaa6f436d2580a7d6af5719b27f507749cd", "0x4db48bea1cd2978b9775e7299cfecc2afd9163966bdf9992f55705d724a0dce9", "0x1bf97a9526ee858092f9484edf2b5dc13c0f4a6b92947f05b58a3d15555019eb", "0x3d0c8a2fd2148805bd9cfcf1021471f81774a21b62f73526717379b0833251b7"]
                    }, {
                        "type": "pure",
                        "valueType": "vector<vector<u8>>",
                        "value": [
                            [139, 159, 220, 203, 38, 217, 93, 180, 82, 210, 106, 94, 120, 155, 197, 141, 255, 242, 192, 122, 201, 104, 14, 89, 211, 140, 88, 174, 184, 56, 198, 95, 7, 133, 11, 21, 99, 85, 110, 147, 109, 77, 225, 210, 19, 216, 96, 121, 11, 178, 53, 91, 19, 41, 87, 0, 128, 1, 46, 186, 202, 153, 87, 21, 19, 24, 157, 255, 251, 74, 0, 74, 51, 7, 45, 230, 255, 104, 216, 17, 190, 71, 106, 180, 115, 110, 224, 246, 161, 22, 37, 210, 14, 157, 57, 3],
                            [140, 224, 191, 239, 64, 53, 34, 251, 60, 253, 147, 88, 243, 167, 94, 34, 200, 98, 198, 71, 16, 142, 4, 85, 130, 140, 26, 39, 12, 158, 129, 97, 118, 97, 25, 115, 58, 171, 235, 87, 164, 214, 121, 30, 181, 168, 140, 152, 6, 137, 6, 116, 212, 190, 231, 192, 181, 250, 17, 111, 59, 171, 203, 212, 161, 35, 96, 50, 85, 231, 208, 0, 227, 78, 144, 191, 198, 185, 98, 62, 198, 34, 223, 209, 228, 42, 180, 19, 223, 101, 180, 188, 243, 221, 241, 108],
                            [152, 72, 171, 28, 167, 234, 211, 129, 30, 81, 111, 4, 146, 121, 71, 154, 51, 57, 177, 202, 26, 133, 182, 194, 78, 149, 129, 219, 24, 34, 161, 49, 211, 58, 40, 13, 40, 144, 35, 200, 94, 2, 156, 96, 43, 49, 84, 47, 18, 240, 238, 77, 191, 127, 42, 221, 219, 86, 131, 163, 70, 208, 115, 24, 76, 118, 161, 20, 133, 37, 60, 106, 34, 152, 174, 185, 38, 3, 199, 89, 137, 22, 211, 49, 169, 212, 60, 114, 243, 73, 47, 101, 248, 171, 216, 112],
                            [183, 241, 68, 162, 202, 84, 137, 105, 233, 34, 250, 84, 215, 203, 82, 177, 45, 105, 213, 159, 230, 13, 93, 38, 33, 165, 75, 37, 118, 135, 109, 160, 242, 80, 181, 85, 216, 208, 249, 19, 166, 34, 228, 75, 185, 71, 132, 82, 3, 9, 28, 120, 119, 22, 88, 172, 172, 69, 139, 120, 211, 146, 139, 187, 217, 163, 189, 121, 113, 215, 195, 175, 191, 209, 55, 78, 91, 153, 32, 66, 193, 236, 50, 217, 195, 36, 169, 196, 154, 64, 12, 225, 27, 1, 93, 85],
                            [145, 203, 144, 173, 151, 211, 92, 75, 219, 43, 207, 96, 171, 211, 200, 200, 39, 58, 77, 216, 102, 128, 137, 90, 239, 230, 170, 107, 220, 173, 63, 220, 62, 201, 53, 205, 4, 43, 167, 222, 106, 121, 244, 124, 41, 244, 155, 235, 7, 171, 235, 79, 185, 112, 119, 136, 150, 202, 177, 150, 225, 70, 138, 57, 200, 11, 227, 79, 58, 185, 23, 83, 68, 236, 38, 249, 157, 77, 115, 205, 127, 143, 187, 247, 7, 69, 31, 64, 188, 147, 42, 59, 140, 87, 194, 101],
                            [137, 201, 96, 188, 205, 32, 233, 187, 13, 245, 74, 158, 157, 178, 238, 188, 211, 107, 140, 158, 100, 134, 109, 161, 104, 174, 248, 168, 61, 64, 78, 94, 67, 17, 167, 18, 229, 227, 182, 53, 222, 238, 42, 110, 199, 56, 214, 24, 23, 10, 43, 217, 124, 31, 65, 10, 102, 133, 106, 238, 20, 157, 218, 168, 120, 201, 164, 244, 167, 146, 36, 147, 139, 180, 111, 189, 89, 7, 38, 233, 123, 43, 92, 28, 18, 170, 91, 202, 45, 99, 235, 41, 104, 135, 11, 214],
                            [185, 203, 42, 88, 199, 22, 201, 159, 91, 5, 32, 59, 232, 34, 16, 44, 76, 116, 10, 238, 50, 82, 62, 201, 215, 89, 24, 77, 223, 77, 154, 49, 79, 157, 208, 96, 102, 102, 101, 122, 43, 28, 40, 227, 149, 243, 234, 225, 1, 58, 12, 174, 200, 202, 219, 240, 53, 110, 237, 2, 223, 161, 51, 196, 42, 60, 77, 124, 147, 231, 15, 212, 127, 37, 94, 140, 35, 193, 165, 246, 22, 14, 29, 244, 226, 192, 67, 145, 103, 228, 204, 107, 172, 51, 224, 164],
                            [176, 16, 182, 21, 69, 181, 52, 38, 65, 62, 60, 121, 130, 89, 150, 124, 76, 174, 116, 229, 97, 63, 26, 139, 167, 228, 34, 85, 234, 165, 151, 146, 61, 161, 157, 100, 160, 209, 185, 249, 54, 54, 7, 186, 53, 209, 7, 246, 23, 221, 108, 110, 88, 17, 199, 250, 138, 159, 19, 126, 240, 208, 194, 227, 166, 188, 106, 44, 80, 180, 124, 138, 200, 247, 149, 89, 249, 155, 148, 60, 183, 199, 15, 221, 3, 60, 159, 246, 37, 30, 50, 119, 116, 31, 60, 247],
                            [144, 183, 147, 163, 65, 61, 234, 140, 194, 161, 23, 142, 81, 172, 222, 212, 59, 167, 40, 60, 15, 93, 110, 245, 250, 164, 5, 56, 217, 46, 114, 138, 99, 204, 182, 223, 11, 62, 83, 163, 79, 201, 188, 195, 189, 106, 10, 73, 11, 204, 191, 137, 140, 69, 175, 87, 64, 163, 91, 131, 19, 203, 162, 207, 9, 84, 154, 7, 176, 245, 80, 13, 1, 74, 100, 230, 54, 122, 45, 241, 57, 32, 67, 45, 48, 29, 52, 138, 70, 13, 228, 89, 66, 87, 233, 100],
                            [142, 104, 61, 108, 30, 180, 63, 190, 49, 56, 157, 116, 223, 81, 121, 198, 197, 7, 166, 33, 113, 73, 130, 235, 217, 94, 23, 193, 232, 139, 21, 51, 254, 128, 254, 175, 201, 161, 146, 255, 228, 193, 134, 75, 84, 243, 236, 203, 24, 25, 254, 19, 218, 192, 153, 1, 64, 115, 127, 133, 64, 16, 191, 240, 212, 42, 152, 234, 240, 90, 117, 3, 241, 139, 142, 63, 21, 153, 229, 146, 247, 162, 111, 154, 50, 142, 171, 7, 72, 82, 243, 10, 146, 250, 198, 101]
                        ]
                    }],
                    "transactions": [{
                        "MoveCall": {
                            "package": "0x4c2d27c9639362c062148d01ed28cf58430cefadd43267c2e176d93259c258e2",
                            "module": "coin_flip_v2",
                            "function": "batch_settle",
                            "type_arguments": ["0x2::sui::SUI"],
                            "arguments": [{
                                "Input": 0
                            }, {
                                "Input": 1
                            }, {
                                "Input": 2
                            }]
                        }
                    }]
                },
                "sender": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd",
                "gasData": {
                    "payment": [{
                        "objectId": "0xc3c774a6ee88288ae2added6dd59a784409b7f3ef9946d1251341a3906866182",
                        "version": 32747883,
                        "digest": "Da4YCsqkR5HTkmG4WAuDzTtJmLaRHHYfopojZihGmXQj"
                    }],
                    "owner": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd",
                    "price": "750",
                    "budget": "1000000000"
                }
            },
            "txSignatures": ["AKViWjL0tmRlnVhOwpDR9WXO81j3OgjGKQXdHRAX5dx3Wm7mAQ1KeqRR1I7lIYdHE53dOGowIvxvzffp8AGXewB76729WFOPkb2gre8lHKOeWXnrTWCV1N3fu1jCmhqRhg=="]
        },
        "rawTransaction": "AQAAAAAAAwEBRk6peBX99wePjQNY3MhjmvuoxTxYfVzkIXlA6YcOjnRLKnEBAAAAAAEAwQIKZJI6lNjUogtkTE0TwgyZDBJ4jKufyz5c87pm9/ftAceYEXJ2vXcHpsKO2Vq9lunLX6AG5Q8Fv7lhUQDEPxngtduqvWDrH/1OaWdPdiTew8aeCAFfcRcRwMVDThGdjdwfIaIMrORQtIYH2gu74ZiqyKeacGRFq6lVnAiWgXcLpXvUDb6o4HVNq3FQPdiTP0k57UpfXz99G4zcb4qiHCTYCyX3eIPXZqXZCVSXM4pVLdPClwuHIJovrK/PS0Ew7cPZXF1OoY+opMGfvzg1eboaqm9DbSWAp9avVxmyf1B3Sc1NtIvqHNKXi5d15ymc/swq/ZFjlmvfmZL1VwXXJKDc6Rv5epUm7oWAkvlITt8rXcE8D0prkpR/BbWKPRVVUBnrPQyKL9IUiAW9nPzxAhRx+Bd0ohti9zUmcXN5sIMyUbcAywcKYIuf3Msm2V20UtJqXnibxY3/8sB6yWgOWdOMWK64OMZfB4ULFWNVbpNtTeHSE9hgeQuyNVsTKVcAgAEuusqZVxUTGJ3/+0oASjMHLeb/aNgRvkdqtHNu4PahFiXSDp05A2CM4L/vQDUi+zz9k1jzp14iyGLGRxCOBFWCjBonDJ6BYXZhGXM6q+tXpNZ5HrWojJgGiQZ01L7nwLX6EW87q8vUoSNgMlXn0ADjTpC/xrliPsYi39HkKrQT32W0vPPd8WxgmEirHKfq04EeUW8EknlHmjM5scoahbbCTpWB2xgioTHTOigNKJAjyF4CnGArMVQvEvDuTb9/Kt3bVoOjRtBzGEx2oRSFJTxqIpiuuSYDx1mJFtMxqdQ8cvNJL2X4q9hwYLfxRKLKVIlp6SL6VNfLUrEtadWf5g1dJiGlSyV2h22g8lC1VdjQ+ROmIuRLuUeEUgMJHHh3FlisrEWLeNOSi7vZo715cdfDr7/RN05bmSBCwewy2cMkqcSaQAzhGwFdVWCRy5Ctl9NcS9srz2Cr08jIJzpN2GaAiVrv5qpr3K0/3D7JNc0EK6feann0fCn0m+sHq+tPuXB3iJbKsZbhRoo5yAvjTzq5F1NE7Cb5nU1zzX+Pu/cHRR9AvJMqO4xXwmVgiclgvM0g6bsN9UqenbLuvNNrjJ5khm2haK74qD1ATl5DEacS5eO2Nd7uKm7HONYYFwor2XwfQQpmhWruFJ3aqHjJpPSnkiSTi7RvvVkHJul7K1wcEqpbyi1j6ylohwvWYLnLKljHFsmfWwUgO+giECxMdAruMlI+yddZGE3fTZoxT53QYGZmZXorHCjjlfPq4QE6DK7IytvwNW7tAt+hM8QqPE18k+cP1H8lXowjwaX2Fg4d9OLAQ5Fn5MxrrDPgpGCwELYVRbU0JkE+PHmCWZZ8TK505WE/Goun5CJV6qWXkj2hnWSg0bn5NjYHujXRB/YX3WxuWBHH+oqfE37w0MLjprxqLFC0fIrI95VZ+ZuUPLfHD90DPJ/2JR4yd3QfPPdgkLeTo0E96ozCoReOUaze1DunKDwPXW71+qQFONkucopjzLbfCz5To0/JvMO9agpJC8y/iYxFr1dAo1uDE8uizwlUmgew9VANAUpk5jZ6LfE5IEMtMB00ikYN5FlCV+lkYI5oPWwetD++MTiddN9RecbFB6YhcUmC69leF8HoixUz/oD+r8mhkv/kwYZLVPPsyxgZ/hPawJkBQHN/hUAQv/DUKpjq8Fp1A/GLjj8VmeWS96JvmjKOqwdIUvMKkvrGZQEATC0nyWOTYsBiFI0B7SjPWEMM763UMmfC4XbZMlnCWOIMY29pbl9mbGlwX3YyDGJhdGNoX3NldHRsZQEHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDc3VpA1NVSQADAQAAAQEAAQIAwBavdt31rc0AD3CKKcA47Aw/Y5hBcIaoncEdyEpmyN0Bw8d0pu6IKIrird7W3VmnhECbfz75lG0SUTQaOQaGYYJrsfMBAAAAACC6xGkGzT1RbjYMFk11HSyZTqsa8ckLdPo9bPGC0kHlqMAWr3bd9a3NAA9wiinAOOwMP2OYQXCGqJ3BHchKZsjd7gIAAAAAAAAAypo7AAAAAAABYQClYloy9LZkZZ1YTsKQ0fVlzvNY9zoIxikF3R0QF+Xcd1pu5gENSnqkUdSO5SGHRxOd3ThqMCL8b8336fABl3sAe+u9vVhTj5G9oK3vJRyjnll5601gldTd37tYwpoakYY=",
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "184",
            "gasUsed": {
                "computationCost": "750000",
                "storageCost": "3366800",
                "storageRebate": "10315404",
                "nonRefundableStorageFee": "104196"
            },
            "modifiedAtVersions": [{
                "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                "sequenceNumber": "32747957"
            }, {
                "objectId": "0xc3c774a6ee88288ae2added6dd59a784409b7f3ef9946d1251341a3906866182",
                "sequenceNumber": "32747883"
            }, {
                "objectId": "0x25f77883d766a5d9095497338a552dd3c2970b87209a2facafcf4b4130edc3d9",
                "sequenceNumber": "32747925"
            }, {
                "objectId": "0x60b1ac2f3e0ae87a91b155c76e211d90f670322ce6e88d03407912d29a884448",
                "sequenceNumber": "32747925"
            }],
            "sharedObjects": [{
                "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                "version": 32747957,
                "digest": "CveaMooLVorEkgutWx1DKPZdSLQgF5Kj4KtcnAa48Tng"
            }],
            "transactionDigest": "2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY",
            "mutated": [{
                "owner": {
                    "Shared": {
                        "initial_shared_version": 24193611
                    }
                },
                "reference": {
                    "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
                    "version": 32747958,
                    "digest": "3uenBzsCemEVYarpdUHJgTGvVrq2K9yLGomuC5RpDwxv"
                }
            }, {
                "owner": {
                    "AddressOwner": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd"
                },
                "reference": {
                    "objectId": "0xc3c774a6ee88288ae2added6dd59a784409b7f3ef9946d1251341a3906866182",
                    "version": 32747958,
                    "digest": "29o1hHMftQFBvnCPRRmmvef54BzuaT3vu8ykNxx1W3ej"
                }
            }],
            "deleted": [{
                "objectId": "0x25f77883d766a5d9095497338a552dd3c2970b87209a2facafcf4b4130edc3d9",
                "version": 32747958,
                "digest": "7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz"
            }, {
                "objectId": "0x60b1ac2f3e0ae87a91b155c76e211d90f670322ce6e88d03407912d29a884448",
                "version": 32747958,
                "digest": "7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz"
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd"
                },
                "reference": {
                    "objectId": "0xc3c774a6ee88288ae2added6dd59a784409b7f3ef9946d1251341a3906866182",
                    "version": 32747958,
                    "digest": "29o1hHMftQFBvnCPRRmmvef54BzuaT3vu8ykNxx1W3ej"
                }
            },
            "eventsDigest": "Fk9hhsRUrc2hP13tJ6hBphqrXYKGbGwAVw9uaEzZZdrd",
            "dependencies": ["b5c8btbbTezVVNM8omuCJ9AY4EJvD5kUQyRKe2zM6yW", "8xGR8ybryuTqGVrwJB2M2jKw8N49MKmMBoNm8uVs13aS", "G3FtrJRzsbCUQCLdJMn8KAM7n42eXKhUrWQovBnTbHbV", "GGsDqhUEP1QokmZyrJkYguJutuN1qf2XY6RmtyDtSeM3"]
        },
        "events": [{
            "id": {
                "txDigest": "2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY",
                "eventSeq": "0"
            },
            "packageId": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b",
            "transactionModule": "coin_flip_v2",
            "sender": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd",
            "type": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b::coin_flip_v2::Outcome<0x2::sui::SUI>",
            "parsedJson": {
                "challenged": false,
                "game_id": "0x25f77883d766a5d9095497338a552dd3c2970b87209a2facafcf4b4130edc3d9",
                "player": "0x195db7d7d82e4dfcc4980e1ab6827363d02018046beaac2c683b0290008e570d",
                "player_won": false,
                "pnl": "1000000000"
            },
            "bcs": "BvDGJsJvzFmaEFBUtf8e3NDwU5hVzcqBgCD6PEuvtTJKE9sv39B5pVJ3SMjmA7pE515mTkwaGgheFoxrXNjMQNgcsUxZzSmQTdonw"
        }],
        "objectChanges": [{
            "type": "mutated",
            "sender": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd",
            "owner": {
                "Shared": {
                    "initial_shared_version": 24193611
                }
            },
            "objectType": "0xdc6160acd35ecf8d86a945525b53399723f76e971f35cc6f4f699a583f94303b::coin_flip_v2::House<0x2::sui::SUI>",
            "objectId": "0x464ea97815fdf7078f8d0358dcc8639afba8c53c587d5ce4217940e9870e8e74",
            "version": "32747958",
            "previousVersion": "32747957",
            "digest": "3uenBzsCemEVYarpdUHJgTGvVrq2K9yLGomuC5RpDwxv"
        }, {
            "type": "mutated",
            "sender": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd",
            "owner": {
                "AddressOwner": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0xc3c774a6ee88288ae2added6dd59a784409b7f3ef9946d1251341a3906866182",
            "version": "32747958",
            "previousVersion": "32747883",
            "digest": "29o1hHMftQFBvnCPRRmmvef54BzuaT3vu8ykNxx1W3ej"
        }],
        "balanceChanges": [{
            "owner": {
                "AddressOwner": "0xc016af76ddf5adcd000f708a29c038ec0c3f6398417086a89dc11dc84a66c8dd"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "6198604"
        }],
        "timestampMs": "1697242011266",  // provided for current and most recent epoch
        "checkpoint": "15508610"         // provided for current and most recent epoch
    }],
    "id": "1"
}
[
    {
        digest: '718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu',
        timestampMs: '1697242012264',  // provided for current and most recent epoch
        checkpoint: '15508611'         // provided for current and most recent epoch
    },
    {
        digest: '2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY',
        timestampMs: '1697242011266',  // provided for current and most recent epoch
        checkpoint: '15508610'         // provided for current and most recent epoch
    }
]
[
    {
        digest: '718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu',
        transaction: { data: [Object], txSignatures: [Array] },
        rawTransaction: 'AQAAAAAAAwEBRk6peBX99wePjQNY3MhjmvuoxTxYfVzkIXlA6YcOjnRLKnEBAAAAAAEAIB52D8MSdbPBbVtNHKn0bBNz148pYBJGiL5xyXnLUEiAAGFgub3LmzQ8mUj/AqGBvIJl1m1Wjuwu4PMRDM4mPTTk4h8Rh/qyWSXSsF878OLAwXQ3Dcky57OkB6xHpySKP7OuvIBmVUHw/VpnghxVKctDUpT8XyakWgq5t8M5yuGDLp78AQBMLSfJY5NiwGIUjQHtKM9YQwzvrdQyZ8LhdtkyWcJY4gxjb2luX2ZsaXBfdjIGc2V0dGxlAQcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgNzdWkDU1VJAAMBAAABAQABAgA23xE2nPAOzwvmjWupZbCr4uiDvFJFkR46Kev6Cq9raQFEK16XUwUWW6KS5MzYNr7WCN2KkEHIMB+pXotBBWCG5zaJ8wEAAAAAIIKhoisd4MHkUB6/gW9bI8AY8XP3lrcB3cxWlqGVJhE2Nt8RNpzwDs8L5o1rqWWwq+Log7xSRZEeOinr+gqva2nuAgAAAAAAAGDjFgAAAAAAAAFhAMFDS6PtjxGv60GQz+0bp2yLGW2wYZeRhVZdWcv59Xh/ZU1B2+gbizdIL2tbnEe35y5r/tzYEiPkJJyZuoP9ZAEbVoYEtpNVxa0zqCICROCS/YD9Mgkx5a9DzvO9PQig8g==',
        effects: {
            messageVersion: 'v1',
            status: [Object],
            executedEpoch: '184',
            gasUsed: [Object],
            modifiedAtVersions: [Array],
            sharedObjects: [Array],
            transactionDigest: '718r5mSHbtp553BSx9XoyNTZfgi8WmUCXQBQb1TjaqVu',
            created: [Array],
            mutated: [Array],
            deleted: [Array],
            gasObject: [Object],
            eventsDigest: 'Exh92aH1g8j6Y4yZzFUJCpxUC7NDvJGhkHgMkdMwv7nP',
            dependencies: [Array]
        },
        events: [ [Object], [Object] ],
        objectChanges: [ [Object], [Object], [Object] ],
        balanceChanges: [ [Object], [Object] ],
        timestampMs: '1697242012264', // provided for current and most recent epoch
        checkpoint: '15508611'        // provided for current and most recent epoch
    },
    {
        digest: '2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY',
        transaction: { data: [Object], txSignatures: [Array] },
        rawTransaction: 'AQAAAAAAAwEBRk6peBX99wePjQNY3MhjmvuoxTxYfVzkIXlA6YcOjnRLKnEBAAAAAAEAwQIKZJI6lNjUogtkTE0TwgyZDBJ4jKufyz5c87pm9/ftAceYEXJ2vXcHpsKO2Vq9lunLX6AG5Q8Fv7lhUQDEPxngtduqvWDrH/1OaWdPdiTew8aeCAFfcRcRwMVDThGdjdwfIaIMrORQtIYH2gu74ZiqyKeacGRFq6lVnAiWgXcLpXvUDb6o4HVNq3FQPdiTP0k57UpfXz99G4zcb4qiHCTYCyX3eIPXZqXZCVSXM4pVLdPClwuHIJovrK/PS0Ew7cPZXF1OoY+opMGfvzg1eboaqm9DbSWAp9avVxmyf1B3Sc1NtIvqHNKXi5d15ymc/swq/ZFjlmvfmZL1VwXXJKDc6Rv5epUm7oWAkvlITt8rXcE8D0prkpR/BbWKPRVVUBnrPQyKL9IUiAW9nPzxAhRx+Bd0ohti9zUmcXN5sIMyUbcAywcKYIuf3Msm2V20UtJqXnibxY3/8sB6yWgOWdOMWK64OMZfB4ULFWNVbpNtTeHSE9hgeQuyNVsTKVcAgAEuusqZVxUTGJ3/+0oASjMHLeb/aNgRvkdqtHNu4PahFiXSDp05A2CM4L/vQDUi+zz9k1jzp14iyGLGRxCOBFWCjBonDJ6BYXZhGXM6q+tXpNZ5HrWojJgGiQZ01L7nwLX6EW87q8vUoSNgMlXn0ADjTpC/xrliPsYi39HkKrQT32W0vPPd8WxgmEirHKfq04EeUW8EknlHmjM5scoahbbCTpWB2xgioTHTOigNKJAjyF4CnGArMVQvEvDuTb9/Kt3bVoOjRtBzGEx2oRSFJTxqIpiuuSYDx1mJFtMxqdQ8cvNJL2X4q9hwYLfxRKLKVIlp6SL6VNfLUrEtadWf5g1dJiGlSyV2h22g8lC1VdjQ+ROmIuRLuUeEUgMJHHh3FlisrEWLeNOSi7vZo715cdfDr7/RN05bmSBCwewy2cMkqcSaQAzhGwFdVWCRy5Ctl9NcS9srz2Cr08jIJzpN2GaAiVrv5qpr3K0/3D7JNc0EK6feann0fCn0m+sHq+tPuXB3iJbKsZbhRoo5yAvjTzq5F1NE7Cb5nU1zzX+Pu/cHRR9AvJMqO4xXwmVgiclgvM0g6bsN9UqenbLuvNNrjJ5khm2haK74qD1ATl5DEacS5eO2Nd7uKm7HONYYFwor2XwfQQpmhWruFJ3aqHjJpPSnkiSTi7RvvVkHJul7K1wcEqpbyi1j6ylohwvWYLnLKljHFsmfWwUgO+giECxMdAruMlI+yddZGE3fTZoxT53QYGZmZXorHCjjlfPq4QE6DK7IytvwNW7tAt+hM8QqPE18k+cP1H8lXowjwaX2Fg4d9OLAQ5Fn5MxrrDPgpGCwELYVRbU0JkE+PHmCWZZ8TK505WE/Goun5CJV6qWXkj2hnWSg0bn5NjYHujXRB/YX3WxuWBHH+oqfE37w0MLjprxqLFC0fIrI95VZ+ZuUPLfHD90DPJ/2JR4yd3QfPPdgkLeTo0E96ozCoReOUaze1DunKDwPXW71+qQFONkucopjzLbfCz5To0/JvMO9agpJC8y/iYxFr1dAo1uDE8uizwlUmgew9VANAUpk5jZ6LfE5IEMtMB00ikYN5FlCV+lkYI5oPWwetD++MTiddN9RecbFB6YhcUmC69leF8HoixUz/oD+r8mhkv/kwYZLVPPsyxgZ/hPawJkBQHN/hUAQv/DUKpjq8Fp1A/GLjj8VmeWS96JvmjKOqwdIUvMKkvrGZQEATC0nyWOTYsBiFI0B7SjPWEMM763UMmfC4XbZMlnCWOIMY29pbl9mbGlwX3YyDGJhdGNoX3NldHRsZQEHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDc3VpA1NVSQADAQAAAQEAAQIAwBavdt31rc0AD3CKKcA47Aw/Y5hBcIaoncEdyEpmyN0Bw8d0pu6IKIrird7W3VmnhECbfz75lG0SUTQaOQaGYYJrsfMBAAAAACC6xGkGzT1RbjYMFk11HSyZTqsa8ckLdPo9bPGC0kHlqMAWr3bd9a3NAA9wiinAOOwMP2OYQXCGqJ3BHchKZsjd7gIAAAAAAAAAypo7AAAAAAABYQClYloy9LZkZZ1YTsKQ0fVlzvNY9zoIxikF3R0QF+Xcd1pu5gENSnqkUdSO5SGHRxOd3ThqMCL8b8336fABl3sAe+u9vVhTj5G9oK3vJRyjnll5601gldTd37tYwpoakYY=',
        effects: {
            messageVersion: 'v1',
            status: [Object],
            executedEpoch: '184',
            gasUsed: [Object],
            modifiedAtVersions: [Array],
            sharedObjects: [Array],
            transactionDigest: '2aJtSL1sgbyYEsGv4Jie5XPdxPX1TZgcW3VWmA8q6TxY',
            mutated: [Array],
            deleted: [Array],
            gasObject: [Object],
            eventsDigest: 'Fk9hhsRUrc2hP13tJ6hBphqrXYKGbGwAVw9uaEzZZdrd',
            dependencies: [Array]
        },
        events: [ [Object] ],
        objectChanges: [ [Object], [Object] ],
        balanceChanges: [ [Object] ],
        timestampMs: '1697242011266',  // provided for current and most recent epoch
        checkpoint: '15508610'         // provided for current and most recent epoch
    }
]

Response Data

  • Vec<SuiTransactionBlockResponse> : SuiTransactionBlockResponse[] - your response will contain the fields you asked for via the options parameter.

suix_queryTransactionBlocks

Description
Return list of transactions for a specified query criteria. Results from this request may be impacted by our pruning policy - see Reading Historical Data.

Params

  • query : <TransactionBlockResponseQuery> - the transaction query criteria. This two parts: a TransactionFilter and a SuiTransactionBlockResponseOptions . Both are optional, but you'll almost certainly want to provide both. Unprovided options default to false. Note: the FromOrToAddress , FromAndToAddress, TransactionKind, and TransactionKindIn filters are currently not supported by our Node service (or Mysten's public node). Additionally, omitting function or module and function from the MoveFunction filter does not return all transactions for the package. You should use the full filter with package, module, and function as shown in our sample code below. These issues may change with the release of RPC 2.0 later this year.
  • cursor : <TransactionDigest> - 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> - Maximum items returned per page. Defaults to maximum possible if not specified, which is 50.
  • descending_order : <boolean> - query result ordering, default to false (ascending order), oldest record first.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{   
        "jsonrpc":"2.0", 
        "method":"suix_queryTransactionBlocks",
        "params":[
            {{query}},
            "{{cursor}}",
            {{limit}},            
            {{descending_order}}
        ],
        "id":1
    }'
curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeMainnetAccessKey}}' \
-H 'Content-Type: application/json' \
-d    '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "suix_queryTransactionBlocks",
        "params": [
            {
                "filter": {
                    "MoveFunction": {
                        "package": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
                        "module": "game_8192",
                        "function": "make_move"
                    }
                },
                "options": {
                    "showEvents": true,
                    "showBalanceChanges": true,
                    "showInput": true,
                    "showRawInput": true,
                    "showObjectChanges": true,
                    "showEffects": true
                }
            },
            "FkvMpJQnxp8RcQYTSZsjZPdPrhTaCaTvF1D78kQdup4t",
            1,
            true
        ]
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.queryTransactionBlocks({
    {{query}},
    {{cursor}},
    {{limit}},
    {{order}}
});
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeMainnetAccessKey}});

await nodeClient.queryTransactionBlocks({
    filter: {
        MoveFunction: {
            package: "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
            module: "game_8192",
            function: "make_move"
        }
    },
    options: {
        showEvents: true,
        showBalanceChanges: true,
        showInput: true,
        showRawInput: true,
        showObjectChanges: true,
        showEffects: true
    },
    cursor: "3oxNQvJ68Kd2Fd1iUj5oDwsKYeZA9cm8N3WkJRqUrM7U",
    limit: 1,
    order: 'descending'
});

Example Response

{
    "jsonrpc":"2.0",
    "result":{"
        data":[
            {"digest":"JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB"}
        ],
        "nextCursor":"JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
        "hasNextPage":true
    },
    "id":1
}
{
    "jsonrpc": "2.0",
    "result": {
        "data": [{
            "digest": "JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
            "transaction": {
                "data": {
                    "messageVersion": "v1",
                    "transaction": {
                        "kind": "ProgrammableTransaction",
                        "inputs": [{
                            "type": "object",
                            "objectType": "immOrOwnedObject",
                            "objectId": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                            "version": "32346929",
                            "digest": "4YkwLHptu5VLgEWVJiCGbCsuatqEvfpU4mHCcHbuq7sF"
                        }, {
                            "type": "pure",
                            "valueType": "u64",
                            "value": "0"
                        }],
                        "transactions": [{
                            "MoveCall": {
                                "package": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
                                "module": "game_8192",
                                "function": "make_move",
                                "arguments": [{
                                    "Input": 0
                                }, {
                                    "Input": 1
                                }]
                            }
                        }]
                    },
                    "sender": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                    "gasData": {
                        "payment": [{
                            "objectId": "0x023496cbb8e88e68a2384fe5ac1998068e82fc39b5ade0f8d5947d2f716c3d89",
                            "version": 32346929,
                            "digest": "4WEW8DCbygYiiRY5GywGmjxRetTjAR1jbcyioPBkPw7k"
                        }],
                        "owner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                        "price": "750",
                        "budget": "100000000"
                    }
                },
                "txSignatures": ["ALavJUFO+A5Jpb3GnWCqakT/k9P0bwxuVo6NS/oAS46+O3aaX4d9MED6bGQvfliDh8rBkyNmDd+2bX9JSn3y0wSroH3YDnP5KN+H3OW8+E8Mbvf367chc9M9aoTvGwwEvQ=="]
            },
            "rawTransaction": "AQAAAAAAAgEA/bff0PyA+Uweh2Roc6XjW27o/GcPsLZFbF5R0gkSvpQxk+0BAAAAACA0tb7NgEhK+lfLGv0pANz/OJPbHFT8QjEpGcDRTDV+ugAIAAAAAAAAAAABAHL5x2QhFwtaeXQyup4bOy4rfPb6om65VTlsdzryR54eCWdhbWVfODE5MgltYWtlX21vdmUAAgEAAAEBAP5vXrrSQHMIiu94vxEu6sHnUNtyIfOwxio7h9VhxSfIAQI0lsu46I5oojhP5awZmAaOgvw5ta3g+NWUfS9xbD2JMZPtAQAAAAAgNBAr0W6dH11cMNr9CZ6UbF2Z+8mL2GlJVwq4MAA3sf/+b1660kBzCIrveL8RLurB51DbciHzsMYqO4fVYcUnyO4CAAAAAAAAAOH1BQAAAAAAAWEAtq8lQU74DkmlvcadYKpqRP+T0/RvDG5Wjo1L+gBLjr47dppfh30wQPpsZC9+WIOHysGTI2YN37Ztf0lKffLTBKugfdgOc/ko34fc5bz4Twxu9/frtyFz0z1qhO8bDAS9",
            "effects": {
                "messageVersion": "v1",
                "status": {
                    "status": "success"
                },
                "executedEpoch": "181",
                "gasUsed": {
                    "computationCost": "750000",
                    "storageCost": "3184400",
                    "storageRebate": "3152556",
                    "nonRefundableStorageFee": "31844"
                },
                "modifiedAtVersions": [{
                    "objectId": "0x023496cbb8e88e68a2384fe5ac1998068e82fc39b5ade0f8d5947d2f716c3d89",
                    "sequenceNumber": "32346929"
                }, {
                    "objectId": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                    "sequenceNumber": "32346929"
                }],
                "transactionDigest": "JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
                "mutated": [{
                    "owner": {
                        "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                    },
                    "reference": {
                        "objectId": "0x023496cbb8e88e68a2384fe5ac1998068e82fc39b5ade0f8d5947d2f716c3d89",
                        "version": 32346930,
                        "digest": "H8pDYydjPn3Q8bD21ntCgroVLQGXBW2k3jrn2vRNMjjx"
                    }
                }, {
                    "owner": {
                        "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                    },
                    "reference": {
                        "objectId": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                        "version": 32346930,
                        "digest": "7RHhSojAHz9RW3XtoWWaowbhKD67URuHcEDyA3WkoJce"
                    }
                }],
                "gasObject": {
                    "owner": {
                        "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                    },
                    "reference": {
                        "objectId": "0x023496cbb8e88e68a2384fe5ac1998068e82fc39b5ade0f8d5947d2f716c3d89",
                        "version": 32346930,
                        "digest": "H8pDYydjPn3Q8bD21ntCgroVLQGXBW2k3jrn2vRNMjjx"
                    }
                },
                "eventsDigest": "G7VQsWmWr5PMDV8xsnaLN6TFLR5kCgb4f5nziSV2HZi5",
                "dependencies": ["8h7Lu65EaAEgWF97VLyXC8xgi2fcSdMcSH1VpqXfscw", "DFk4n5cqYTseCWDfi94hEWkXdYtkLvfeoiZsuRGPdQnZ"]
            },
            "events": [{
                "id": {
                    "txDigest": "JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
                    "eventSeq": "0"
                },
                "packageId": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
                "transactionModule": "game_8192",
                "sender": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                "type": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::GameMoveEvent8192",
                "parsedJson": {
                    "direction": "0",
                    "game_id": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                    "game_over": true,
                    "last_tile": ["0", "3", "3"],
                    "move_count": "1718",
                    "packed_spaces": "1633752444144202034",
                    "score": "49988",
                    "top_tile": "12"
                },
                "bcs": "WMgUoFQcrP8ehCa3zUkcaFAd8xTLdG4RJm3JGPF25BNDHQfa1xCdpLgzKEktEeD68WSJ3Ewu6vfhXpabktjS4dwiM53AyBrxdx4MEdsZpMe1EFhWXjHyAFMDRVDRZJmgtA5krC"
            }, {
                "id": {
                    "txDigest": "JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
                    "eventSeq": "1"
                },
                "packageId": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e",
                "transactionModule": "game_8192",
                "sender": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                "type": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::GameOverEvent8192",
                "parsedJson": {
                    "game_id": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                    "score": "49988",
                    "top_tile": "12"
                },
                "bcs": "AJooiUDsEASKeUDpQ9kQTSgJ4k8JyusgXu9wjpW5dhNhhkVWyfSBZxH1WpXB8gppjy"
            }],
            "objectChanges": [{
                "type": "mutated",
                "sender": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                "owner": {
                    "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                },
                "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
                "objectId": "0x023496cbb8e88e68a2384fe5ac1998068e82fc39b5ade0f8d5947d2f716c3d89",
                "version": "32346930",
                "previousVersion": "32346929",
                "digest": "H8pDYydjPn3Q8bD21ntCgroVLQGXBW2k3jrn2vRNMjjx"
            }, {
                "type": "mutated",
                "sender": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8",
                "owner": {
                    "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                },
                "objectType": "0x72f9c76421170b5a797432ba9e1b3b2e2b7cf6faa26eb955396c773af2479e1e::game_8192::Game8192",
                "objectId": "0xfdb7dfd0fc80f94c1e87646873a5e35b6ee8fc670fb0b6456c5e51d20912be94",
                "version": "32346930",
                "previousVersion": "32346929",
                "digest": "7RHhSojAHz9RW3XtoWWaowbhKD67URuHcEDyA3WkoJce"
            }],
            "balanceChanges": [{
                "owner": {
                    "AddressOwner": "0xfe6f5ebad24073088aef78bf112eeac1e750db7221f3b0c62a3b87d561c527c8"
                },
                "coinType": "0x2::sui::SUI",
                "amount": "-781844"
            }]
        }],
        "nextCursor": "JdZ5NyE9BcXBwhaSWp9eRVJgJrgD46tJn7eEjouJouB",
        "hasNextPage": true
    },
    "id": 1
}
{
    data: [ { digest: 'GLnupyGybeBYhZWjFu5LsrVDrggvYro5tQzn4MKfj2Uk' } ],
    nextCursor: 'GLnupyGybeBYhZWjFu5LsrVDrggvYro5tQzn4MKfj2Uk',
    hasNextPage: true
}

{
    data: [
      {
          digest: 'GLnupyGybeBYhZWjFu5LsrVDrggvYro5tQzn4MKfj2Uk',
          transaction: [Object],
          rawTransaction: 'AQAAAAAAAgEA819wBfU/R1nJx2KeF0U7uCQlgfbdTwYKRKVacO9OAKlVDPABAAAAACCTS30hUNC8DZ3gsL4Tm/+O8zAnNvgCsgxrFewltPrgeQAIAgAAAAAAAAABAHL5x2QhFwtaeXQyup4bOy4rfPb6om65VTlsdzryR54eCWdhbWVfODE5MgltYWtlX21vdmUAAgEAAAEBAP5vXrrSQHMIiu94vxEu6sHnUNtyIfOwxio7h9VhxSfIAQI0lsu46I5oojhP5awZmAaOgvw5ta3g+NWUfS9xbD2JVQzwAQAAAAAgLYSzpJ+3ILJ/eyFLAB3pCr2EWP8HAEhJ8f+BS0kGCWL+b1660kBzCIrveL8RLurB51DbciHzsMYqO4fVYcUnyO4CAAAAAAAAAMLrCwAAAAAAAWEAHuZmxTK3T6ChMSmTygfBR7K5YqY8UHJ6xfTUww/nAm4yXMvod4Hdpqk4HpCgSdez8pY8jrdfj9MjrA4a24cAA6ugfdgOc/ko34fc5bz4Twxu9/frtyFz0z1qhO8bDAS9',
          effects: [Object],
          events: [Array],
          objectChanges: [Array],
          balanceChanges: [Array]
      }
    ],
    nextCursor: 'GLnupyGybeBYhZWjFu5LsrVDrggvYro5tQzn4MKfj2Uk',
    hasNextPage: true
}

Response Data

  • TransactionsBlocksPage : <Page_for_TransactionBlockResponse_and_TransactionDigest>, which includes a list of type SuiTransactionBlockResponse , a nextCursor field which contains an optional txDigest, and a hasNextPage field with a boolean telling you whether or not there is a next page.

Writing Transaction Blocks to Sui

📘

Note:

Using Programmable Transaction Blocks via Sui's SDK is recommended for writing to Sui.

sui_executeTransactionBlock

Description
Execute a transaction using the transaction data and signature(s).

Params

  • tx_bytes : BCS serialized transaction data bytes without its type tag, as base-64 encoded string
  • signatures : list of signatures (flag || signature || pubkey bytes, as base-64 encoded string). Signature is committed to the intent message of the transaction data
  • options : SuiTransactionBlockResponseOptions - Optional. Sui options for specifying the transaction content to be returned. Values default to false if not provided.
  • request_type : ExecuteTransactionRequestType - Optional. Request types: 1. 'WaitForEffectsCert': waits for TransactionEffectsCert and then return to client. This mode is a proxy for transaction finality. 2. 'WaitForLocalExecution': waits for TransactionEffectsCert and also makes sure the node executed the transaction locally before returning the client. The local execution makes sure this node is aware of this transaction when client fires subsequent queries. However if the node fails to execute the transaction locally in a timely manner, a bool type in the response is set to false to indicate the case. request_type defaults to 'WaitForEffectsCert' unless options.show_events or options.show_effects is true.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

## The below has two signatures - for the sender and the sponsor -
##  as it represents a transaction sponsored with Shinami's Gas Station.
##  A non-sponsored transaction would just have the sender's signature.

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_executeTransactionBlock",
      "params":
      [
            "{{tx_bytes}}",
            ["{{senderSignature}}","{{sponsorSignature}}"],
            {
                "showInput": true,
                "showRawInput": true,
                "showEffects": true,
                "showEvents": true,
                "showObjectChanges": true,
                "showBalanceChanges": true
            },
            "{{request_type}}"
      ],
      "id":1
  }'
import { createSuiClient } from "@shinami/clients"; 

const nodeClient = createSuiClient({{nodeAccessKey}});

// The below has two signatures - for the sender and the sponsor -
//  as it represents a transaction sponsored with Shinami's Gas Station.
//  A non-sponsored transaction would just have the sender's signature.
await nodeClient.executeTransactionBlock({
    transactionBlock: {{sponsoredTxBytes}},
    signature: [{{senderSignature}}, {{sponsorSignature}}],
    options: {
        showEvents: true,
        showBalanceChanges: true,
        showInput: true,
        showRawInput: true,
        showObjectChanges: true,
        showEffects: true
  },
  requestType: {{requestType}}
});

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "digest": "6VX1oTmvkB9bkebDX1byYeeGaBefLyD3K6uR8hHopLq8",
        "transaction": {
            "data": {
                "messageVersion": "v1",
                "transaction": {
                    "kind": "ProgrammableTransaction",
                    "inputs": [{
                        "type": "object",
                        "objectType": "sharedObject",
                        "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006",
                        "initialSharedVersion": "1",
                        "mutable": false
                    }],
                    "transactions": [{
                        "MoveCall": {
                            "package": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16",
                            "module": "clock",
                            "function": "access",
                            "arguments": [{
                                "Input": 0
                            }]
                        }
                    }]
                },
                "sender": "0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0",
                "gasData": {
                    "payment": [{
                        "objectId": "0xc2e47b0a2822c04a3ac5212e18fc3b904a22eaeeed63577151c04709d90dc5fc",
                        "version": 15450970,
                        "digest": "FMdVQsuY4YWFythBRsuQPovapJ7TpvR7j24Sz4neoeiS"
                    }],
                    "owner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e",
                    "price": "1000",
                    "budget": "5000000"
                }
            },
            "txSignatures": ["AJAGc5YF8pRcN0FpfZsaqOxJVunA9OMPCGQ6a8ue69QmD84SC0eKeukphVQ2bIyy7Mv9jwXTr8JgXzhDS9McwQh51Goyfzm4soRhJY9gDmt/wDZYCm81bkCP87eBm1T+Xw==", "AAkroyRVP1HdLsj5S0aBgZS5RwMlDGATo17reTgYxviYAP2jrjGScr3DoTZZwSCmHnrEilewuOLM+W4Y6/fSVgO5rDp1CB4nXagWW48gUU79IRg3kJf+6erjnVYdenXh+A=="]
        },
        "rawTransaction": "AQAAAAAAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYBAAAAAAAAAAABAPoOeAML0WZyF0wtbMTNXR0UI9A8KKdJCbKhSO2ovMoWBWNsb2NrBmFjY2VzcwABAQAA61g2ZftaNfSII0vYcVvoa6sPi6UxHZXuWo9ntgiMorABwuR7CigiwEo6xSEuGPw7kEoi6u7tY1dxUcBHCdkNxfxaw+sAAAAAACDVTH4Lff2aeF5vXdXyB7y3uglt9idRAmFFgvrtzsg3dx1jLUb/cEkQM/78TmOY3OqklD3PYlErTVc3i1q3A7xe6AMAAAAAAABAS0wAAAAAAAACYQCQBnOWBfKUXDdBaX2bGqjsSVbpwPTjDwhkOmvLnuvUJg/OEgtHinrpKYVUNmyMsuzL/Y8F06/CYF84Q0vTHMEIedRqMn85uLKEYSWPYA5rf8A2WApvNW5Aj/O3gZtU/l9hAAkroyRVP1HdLsj5S0aBgZS5RwMlDGATo17reTgYxviYAP2jrjGScr3DoTZZwSCmHnrEilewuOLM+W4Y6/fSVgO5rDp1CB4nXagWW48gUU79IRg3kJf+6erjnVYdenXh+A==",
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "187",
            "gasUsed": {
                "computationCost": "1000000",
                "storageCost": "988000",
                "storageRebate": "978120",
                "nonRefundableStorageFee": "9880"
            },
            "modifiedAtVersions": [{
                "objectId": "0xc2e47b0a2822c04a3ac5212e18fc3b904a22eaeeed63577151c04709d90dc5fc",
                "sequenceNumber": "15450970"
            }],
            "sharedObjects": [{
                "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006",
                "version": 15993926,
                "digest": "HEkEnhJMPwieu5Z6kRjnWsKomaxeoYZfwcP5HwgLFKjb"
            }],
            "transactionDigest": "6VX1oTmvkB9bkebDX1byYeeGaBefLyD3K6uR8hHopLq8",
            "mutated": [{
                "owner": {
                    "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
                },
                "reference": {
                    "objectId": "0xc2e47b0a2822c04a3ac5212e18fc3b904a22eaeeed63577151c04709d90dc5fc",
                    "version": 15993927,
                    "digest": "EeZ7EZmcunjVBDc8iMdcCR5cQo7KikYB6ywvLHKKbdSW"
                }
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
                },
                "reference": {
                    "objectId": "0xc2e47b0a2822c04a3ac5212e18fc3b904a22eaeeed63577151c04709d90dc5fc",
                    "version": 15993927,
                    "digest": "EeZ7EZmcunjVBDc8iMdcCR5cQo7KikYB6ywvLHKKbdSW"
                }
            },
            "eventsDigest": "HwAfMjJypQoC1dpzThWXEKHUy6Vq3CqF9jZDMT4azuhf",
            "dependencies": ["58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg", "DdoUFyuV3NyJ6WrngEMsqPywax14tizehvrz6SBkyPSw", "Fdhmr6PeHSeWP4YuSHNrgBSKQTk6aT3bz35fQJrKtfdu"]
        },
        "events": [{
            "id": {
                "txDigest": "6VX1oTmvkB9bkebDX1byYeeGaBefLyD3K6uR8hHopLq8",
                "eventSeq": "0"
            },
            "packageId": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16",
            "transactionModule": "clock",
            "sender": "0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0",
            "type": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent",
            "parsedJson": {
                "timestamp_ms": "1699916824477"
            },
            "bcs": "TJX9NArXXrF"
        }],
        "objectChanges": [{
            "type": "mutated",
            "sender": "0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0",
            "owner": {
                "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0xc2e47b0a2822c04a3ac5212e18fc3b904a22eaeeed63577151c04709d90dc5fc",
            "version": "15993927",
            "previousVersion": "15450970",
            "digest": "EeZ7EZmcunjVBDc8iMdcCR5cQo7KikYB6ywvLHKKbdSW"
        }],
        "balanceChanges": [{
            "owner": {
                "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "-1009880"
        }],
        "confirmedLocalExecution": true
    },
    "id": 1
}
{
    digest: '5iQ8nk55JMbMcuvbFy6bq4ruhcRpMaPsHX7pUHXj5czA',
    transaction: {
        data: {
            messageVersion: 'v1',
            transaction: [Object],
            sender: '0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0',
            gasData: [Object]
        },
        txSignatures: [
            'AK9t8A+0aeEoNclM7aI1eEmfhvtQlen7dFy9F8EV5l0fHnEQ5QYoT4PzcnY+LFZNFbdsQkMu95+e4go4rzg2Xgl51Goyfzm4soRhJY9gDmt/wDZYCm81bkCP87eBm1T+Xw==',
            'AF57SWK+MNvke9pO9oPTSGIETPrUCuxh8kjnUtP0n26yffDPe6LlJC8iGZ9QAWYOnWTftyVBdtPw5KE2j5wIRAS5rDp1CB4nXagWW48gUU79IRg3kJf+6erjnVYdenXh+A=='
        ]
    },
    rawTransaction: 'AQAAAAAAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYBAAAAAAAAAAABAPoOeAML0WZyF0wtbMTNXR0UI9A8KKdJCbKhSO2ovMoWBWNsb2NrBmFjY2VzcwABAQAA61g2ZftaNfSII0vYcVvoa6sPi6UxHZXuWo9ntgiMorABRajsP3AotZfJVnHxxrhiL3lcNRfxc9lx+e8VzhiydtxNw+sAAAAAACDODyukV8aCw9OyHzBwhgMr3lPqivCFp4gjGUEQ7Z5TIB1jLUb/cEkQM/78TmOY3OqklD3PYlErTVc3i1q3A7xe6AMAAAAAAABAS0wAAAAAAAACYQCvbfAPtGnhKDXJTO2iNXhJn4b7UJXp+3RcvRfBFeZdHx5xEOUGKE+D83J2PixWTRW3bEJDLvefnuIKOK84Nl4JedRqMn85uLKEYSWPYA5rf8A2WApvNW5Aj/O3gZtU/l9hAF57SWK+MNvke9pO9oPTSGIETPrUCuxh8kjnUtP0n26yffDPe6LlJC8iGZ9QAWYOnWTftyVBdtPw5KE2j5wIRAS5rDp1CB4nXagWW48gUU79IRg3kJf+6erjnVYdenXh+A==',
    effects: {
        messageVersion: 'v1',
        status: { status: 'success' },
        executedEpoch: '187',
        gasUsed: {
            computationCost: '1000000',
            storageCost: '988000',
            storageRebate: '978120',
            nonRefundableStorageFee: '9880'
        },
        modifiedAtVersions: [ [Object] ],
        sharedObjects: [ [Object] ],
        transactionDigest: '5iQ8nk55JMbMcuvbFy6bq4ruhcRpMaPsHX7pUHXj5czA',
        mutated: [ [Object] ],
        gasObject: { owner: [Object], reference: [Object] },
        eventsDigest: 'HCwBbMo6TzuKnyvGuVGx5mydsg6cmuihESfwpn789Zqb',
        dependencies: [
            '58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg',
            '9xWfPMSXkjhuhmBe3NW4QGiJr7Xq44pEbiD9DK5RPYVX',
            'BNi6erAWTu2vJxLh5Gi3YKWLWww2WfNSHMfM56WhBNsi'
        ]
    },
    events: [
        {
            id: [Object],
            packageId: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16',
            transactionModule: 'clock',
            sender: '0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0',
            type: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent',
            parsedJson: [Object],
            bcs: 'D6yQfLboc4w'
        }
    ],
    objectChanges: [
        {
            type: 'mutated',
            sender: '0xeb583665fb5a35f488234bd8715be86bab0f8ba5311d95ee5a8f67b6088ca2b0',
            owner: [Object],
            objectType: '0x2::coin::Coin<0x2::sui::SUI>',
            objectId: '0x45a8ec3f7028b597c95671f1c6b8622f795c3517f173d971f9ef15ce18b276dc',
            version: '15993141',
            previousVersion: '15450957',
            digest: 'Gj2PdEQHVeJJBMCKCCSZNCnoh1kAE8MSNTncCyJtULLY'
        }
    ],
    balanceChanges: [
        { owner: [Object], coinType: '0x2::sui::SUI', amount: '-1009880' }
    ],
    confirmedLocalExecution: true
}

Response Data
SuiTransactionBlockResponse : SuiTransactionBlockResponse

sui_dryRunTransactionBlock

Description
Test runs a transaction but does not execute it. Reports what the effects of executing the transaction would have been, including the gas cost summary.

Params

  • tx_bytes : TranasactionData bytes, as Base-64 encoded string. This includes everything needed to actually run a transaction, including the sender address and a gas object.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{   
        "jsonrpc":"2.0", 
        "method":"sui_dryRunTransactionBlock",
        "params":[
            "{{transactionDataBytes}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.dryRunTransactionBlock({
    transactionBlock: {{transactionDataBytes}}
});

----------

// Here is an example of how to build a TransactionData to use with 
//  sui_dryRunTransactionBlock. It uses a Move module on testnet. 
//  It uses Shinami's Gas Station to attach a gas object

import { 
    GasStationClient, 
    buildGaslessTransactionBytes, 
    createSuiClient
} from  "@shinami/clients"; 

const nodeClient = createSuiClient({{nodeTestnetAccessKey}});
const gas = new GasStationClient({{gasStationTestnetAccessKey}});

const senderAddress = {{sendersSuiAddress}};

let gaslessTx = await buildGaslessTransactionBytes({
    sui: nodeClient,
    build: async (txb) => {
        txb.moveCall({
            target: "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::access",
            arguments : [txb.object('0x6')]
        });
    }
});

// Note: this will lock the gas object for one hour
//  as our sponsorships have a one hour TTL
let sponsoredtxBlockInfo = await gas.sponsorTransactionBlock(
    gaslessTx,
    senderAddress, 
    5_000_000
);

// this can be used with sui_dryRunTransactionBlock
let transactionDataBytes = sponsoredtxBlockInfo.txBytes;


Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "183",
            "gasUsed": {
                "computationCost": "1000000",
                "storageCost": "988000",
                "storageRebate": "978120",
                "nonRefundableStorageFee": "9880"
            },
            "modifiedAtVersions": [{
                "objectId": "0xb22075c570676e78a40ccf7c2e00098b56a4154f89a3cfc6b4a99afcaa340677",
                "sequenceNumber": "15450963"
            }],
            "sharedObjects": [{
                "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006",
                "version": 15651033,
                "digest": "ADEFJbvcsGUQF4joyV6h24PyKLe2txsbR2n2T8za6abv"
            }],
            "transactionDigest": "CxXNehhL6xWKeCcKeWGWoTq9QmphyZEPaGjFnFkDhjYA",
            "mutated": [{
                "owner": {
                    "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
                },
                "reference": {
                    "objectId": "0xb22075c570676e78a40ccf7c2e00098b56a4154f89a3cfc6b4a99afcaa340677",
                    "version": 15651034,
                    "digest": "4MtrjpWDp48LRgsqc7np6CHAbnXStKZi9v8PLj5BqDUM"
                }
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
                },
                "reference": {
                    "objectId": "0xb22075c570676e78a40ccf7c2e00098b56a4154f89a3cfc6b4a99afcaa340677",
                    "version": 15651034,
                    "digest": "4MtrjpWDp48LRgsqc7np6CHAbnXStKZi9v8PLj5BqDUM"
                }
            },
            "eventsDigest": "FJKpbGq9fn1nu3pcuap86mEQ4zY7URiffcmDbmrFccXJ",
            "dependencies": ["58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg", "DcivKVaUtnv8oZXx6pfevALuLWJxENmDerDPoZXY3yNf", "Ec9K2VEpQHLSXZ2AkbxsD2jigVL5Vpu13L6En72QDhu1"]
        },
        "events": [{
            "id": {
                "txDigest": "CxXNehhL6xWKeCcKeWGWoTq9QmphyZEPaGjFnFkDhjYA",
                "eventSeq": "0"
            },
            "packageId": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16",
            "transactionModule": "clock",
            "sender": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7",
            "type": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent",
            "parsedJson": {
                "timestamp_ms": "1699575309828"
            },
            "bcs": "hGVsMtjEBh"
        }],
        "objectChanges": [{
            "type": "mutated",
            "sender": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7",
            "owner": {
                "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
            },
            "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
            "objectId": "0xb22075c570676e78a40ccf7c2e00098b56a4154f89a3cfc6b4a99afcaa340677",
            "version": "15651034",
            "previousVersion": "15450963",
            "digest": "4MtrjpWDp48LRgsqc7np6CHAbnXStKZi9v8PLj5BqDUM"
        }],
        "balanceChanges": [{
            "owner": {
                "AddressOwner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e"
            },
            "coinType": "0x2::sui::SUI",
            "amount": "-1009880"
        }],
        "input": {
            "messageVersion": "v1",
            "transaction": {
                "kind": "ProgrammableTransaction",
                "inputs": [{
                    "type": "object",
                    "objectType": "sharedObject",
                    "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006",
                    "initialSharedVersion": "1",
                    "mutable": false
                }],
                "transactions": [{
                    "MoveCall": {
                        "package": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16",
                        "module": "clock",
                        "function": "access",
                        "arguments": [{
                            "Input": 0
                        }]
                    }
                }]
            },
            "sender": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7",
            "gasData": {
                "payment": [{
                    "objectId": "0xb22075c570676e78a40ccf7c2e00098b56a4154f89a3cfc6b4a99afcaa340677",
                    "version": 15450963,
                    "digest": "7PmeCXEAwhetHHNk96gmLEMLX51adCYiomPCKe9G43Z5"
                }],
                "owner": "0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e",
                "price": "1000",
                "budget": "5000000"
            }
        }
    },
    "id": 1
}
{
    effects: {
        messageVersion: 'v1',
        status: { status: 'success' },
        executedEpoch: '183',
        gasUsed: {
            computationCost: '1000000',
            storageCost: '988000',
            storageRebate: '978120',
            nonRefundableStorageFee: '9880'
        },
        modifiedAtVersions: [ [Object] ],
        sharedObjects: [ [Object] ],
        transactionDigest: '7qNxQYynVbxNY9h1GPLZYXtUJ65pmPjAqxb19vrD86zK',
        mutated: [ [Object] ],
        gasObject: { owner: [Object], reference: [Object] },
        eventsDigest: '4XaJsFSDFw2VtPJt3XiDzXwNHXJrruHjg3F6To2SoEDE',
        dependencies: [
            '2NWMPwUimahbuK53W8XUoPWuTTdDNLeSoRN9c4BUb9Bv',
            '58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg',
            '8C5bQ19qBZwoL8L7psiYghbJSqYaBKb6qwQ7NenWeN4Z'
        ]
    },
    events: [
        {
            id: [Object],
            packageId: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16',
            transactionModule: 'clock',
            sender: '0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7',
            type: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent',
            parsedJson: [Object],
            bcs: 'E3BwRRft7NF'
        }
    ],
    objectChanges: [
        {
            type: 'mutated',
            sender: '0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7',
            owner: [Object],
            objectType: '0x2::coin::Coin<0x2::sui::SUI>',
            objectId: '0xc95329cd97f5661ea537ee12568b96135b2bcd4804017909de075814a25e32a7',
            version: '15650756',
            previousVersion: '15450435',
            digest: '28m8TTyM214ToLLG5WB5PpkoGdQcBkZDo596ReQHiF1c'
        }
    ],
    balanceChanges: [
        { owner: [Object], coinType: '0x2::sui::SUI', amount: '-1009880' }
    ],
    input: {
        messageVersion: 'v1',
        transaction: {
            kind: 'ProgrammableTransaction',
            inputs: [Array],
            transactions: [Array]
        },
        sender: '0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7',
        gasData: {
            payment: [Array],
            owner: '0x1d632d46ff70491033fefc4e6398dceaa4943dcf62512b4d57378b5ab703bc5e',
            price: '1000',
            budget: '5000000'
        }
    }
}

Response Data

sui_devInspectTransactionBlock

Description
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

Important note on Node usage and billing for this request:

devInspectTransactionBlock can accept a TransactionBlock as input (as opposed to a string or byte-array representation of a TransactionBlock you've already called .build() on). If you do this, it will call TransactionBlock.build() with the input block, which will lead to additional Node Service requests (because that's what the build() method does). These requests count towards your access key's rate limit and your daily request count (and thus your billing), just like when you explicitly call TransactionBlock.build() with a SuiClient using Shinami's Node Service URL. For more information, see our TransactionBlock.build() guide

Params

  • sender : String- the caller's Sui address
  • tx_bytes : String - TransactionKind bytes, as Base-64 encoded string. This includes only the bytes of the programmable transaction block, and not the gas data or sender address.
  • epoch : String - Optional. The epoch to perform the call, e.g "211". Will be set from the system state object if not provided.
  • gas_price : String- Optional. Gas is not charged, but gas usage is still calculated. Default to use reference gas price.

Example Request Template

The TypeScript example uses the Shinami Clients SDK.

Replace all instances of {{name}} with the actual value for that name

curl https://api.shinami.com/node/v1 \
-X POST \
-H 'X-API-Key: {{nodeAccessKey}}' \
-H 'Content-Type: application/json' \
-d '{   
        "jsonrpc":"2.0", 
        "method":"sui_devInspectTransactionBlock",
        "params":[
            "{{sender}}",
            "{{tx_bytes}}",
            "{{epoch}}",
            "{{gas_price}}"
        ],
        "id":1
    }'
import { createSuiClient } from "@shinami/clients";

const nodeClient = createSuiClient({{nodeAccessKey}});

await nodeClient.devInspectTransactionBlock({
    sender: {{senderAddress}},
    transactionBlock: {{transactionKindBytes}},
    epoch: {{epoch}},
    gasPrice: {{gasPrice}}
});


// Here is an example of how to build a TransactionKind to use with 
//  sui_devInspectTransactionBlock. It uses a Move module on testnet

import { createSuiClient, buildGaslessTransactionBytes } from "@shinami/clients";
const nodeClient = createSuiClient({{nodeTestnetAccessKey}});

// this can be passed to sui_devInspectTransactionBlock
let transactionKindBytes = await buildGaslessTransactionBytes({
    sui: nodeClient,
    build: async (txb) => {
        txb.moveCall({
            target: "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::access",
            arguments : [txb.object('0x6')]
        });
    }
  });

Example Response

{
    "jsonrpc": "2.0",
    "result": {
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "183",
            "gasUsed": {
                "computationCost": "1000000",
                "storageCost": "988000",
                "storageRebate": "0",
                "nonRefundableStorageFee": "0"
            },
            "modifiedAtVersions": [{
                "objectId": "0x6b58be0179322a2f5a3e4631d72e629fafbb16a10bf5947042b7a17d0a8baaed",
                "sequenceNumber": "0"
            }],
            "sharedObjects": [{
                "objectId": "0x0000000000000000000000000000000000000000000000000000000000000006",
                "version": 15651690,
                "digest": "6F14i8UWjTBjNFhJ1oZjSSTrDi14dvETnRQKkcvA4asU"
            }],
            "transactionDigest": "2ZVDw6Qv2GT7chaBw3C43ECxEvAQBq3VJQMspJg5FMFx",
            "mutated": [{
                "owner": {
                    "AddressOwner": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7"
                },
                "reference": {
                    "objectId": "0x6b58be0179322a2f5a3e4631d72e629fafbb16a10bf5947042b7a17d0a8baaed",
                    "version": 15651691,
                    "digest": "GcFc68NaJ7rghiFfDkxC7PzYzsRMUkgdBxE83uyTBcCu"
                }
            }],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7"
                },
                "reference": {
                    "objectId": "0x6b58be0179322a2f5a3e4631d72e629fafbb16a10bf5947042b7a17d0a8baaed",
                    "version": 15651691,
                    "digest": "GcFc68NaJ7rghiFfDkxC7PzYzsRMUkgdBxE83uyTBcCu"
                }
            },
            "eventsDigest": "8UF45LDvvpgoD5oaBUKiYgzYHxAsFV2vsEZcWoSBhb2r",
            "dependencies": ["4ERSh51TeTSW8PCPqwKfthcJSjfhWCxbCbCHrfG9ZVLG", "58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg"]
        },
        "events": [{
            "id": {
                "txDigest": "2ZVDw6Qv2GT7chaBw3C43ECxEvAQBq3VJQMspJg5FMFx",
                "eventSeq": "0"
            },
            "packageId": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16",
            "transactionModule": "clock",
            "sender": "0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7",
            "type": "0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent",
            "parsedJson": {
                "timestamp_ms": "1699575964204"
            },
            "bcs": "8PAhUzTvoZ1"
        }],
        "results": [{}]
    },
    "id": 1
}
{
    effects: {
        messageVersion: 'v1',
        status: { status: 'success' },
        executedEpoch: '183',
        gasUsed: {
            computationCost: '1000000',
            storageCost: '988000',
            storageRebate: '0',
            nonRefundableStorageFee: '0'
        },
        modifiedAtVersions: [ [Object] ],
        sharedObjects: [ [Object] ],
        transactionDigest: 'F892f1NJRvDJsp1VNHWDQSMvv747mFzmHf4jVHJsw7Ki',
        mutated: [ [Object] ],
        gasObject: { owner: [Object], reference: [Object] },
        eventsDigest: '84Qvkd6P1nxhfmYHdTSeJVKufZcLb8DLWBMK6XYtXQLs',
        dependencies: [
             '58e6vN5EwfU19H3LfNYdDdPySLFTqEqeQSj9RDrkwUrg',
             'FiRNeED2JBbF3kxkqozq3rqdNajvyaYDq6yVRHhvKnu4'
        ]
    },
    events: [
        {
            id: [Object],
            packageId: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16',
            transactionModule: 'clock',
            sender: '0xa39edfb89e6a21e89570711845c6c8f412d86bb208e571faf6ea1fc6470172d7',
            type: '0xfa0e78030bd16672174c2d6cc4cd5d1d1423d03c28a74909b2a148eda8bcca16::clock::TimeEvent',
            parsedJson: [Object],
            bcs: '9iHSrxZbK19'
        }
    ],
    results: [ {} ]
}

Response Data

  • DevInspectResults containing:
    • effects : TransactionEffects - Summary of effects that likely would be generated if the transaction is actually run. Note however, that not all dev-inspect transactions are actually usable as transactions so it might not be possible actually generate these effects from a normal transaction.
    • error?: string | null - Execution error from executing the transaction commands
    • events : SuiEvent[] - Events that likely would be generated if the transaction is actually run.
    • results ?: SuiExecutionResult[] | null - Execution results (including return values) from executing the transaction commands

🚧

Method Deprecation Warning

Transaction builder methods with the unsafe namespace are expected to be deprecated.

unsafe_moveCall

Description
Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • package_object_id : <ObjectID> - the Move package ID, e.g. 0x2
  • module : <string> - the Move module name, e.g. devnet_nft
  • function : <string> - the Move function name, e.g. mint
  • type_arguments : <[TypeTag]> - the type arguments of the Move function
  • arguments : <[SuiJsonValue]> - the arguments to be passed into the Move function, in SuiJSON format
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
  • execution_mode : <SuiTransactionBuilderMode> - Whether this is a Normal transaction or a Dev Inspect Transaction. Default to be SuiTransactionBuilderMode::Commit when it's None.
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_moveCall",
      "params":["{{signer}}",
      			"{{package_object_id}}",
      			"{{module}}",
      			"{{function}}",  
      			"{{type_arguments}}",
      			"{{arguments}}",            
      			"{{gas}}",      
      			{{gas_budget}},   
                "{{execution_mode}}"],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_mergeCoins

Description
Create an unsigned transaction to merge multiple coins into one coin.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • primary_coin : <ObjectID> - the coin object to merge into; this coin will remain after the transaction
  • coin_to_merge : <ObjectID> - the coin object to be merged; this coin will be destroyed and the balance will be added to the primary_coin
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_mergeCoins",
      "params":["{{signer}}",
      			"{{primary_coin}}",
      			"{{coin_to_merge}}",            
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_splitCoin

Description
Create an unsigned transaction to split a coin object into multiple coins.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • coin_object_id : <ObjectID> - the coin object to be spilt
  • split_amounts : <[]> - the amounts to split out from the coin
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_splitCoin",
      "params":["{{signer}}",
      			"{{coin_object_id}}",
      			{{split_amounts}},       
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_splitCoinEqual

Description
Create an unsigned transaction to split a coin object into multiple equal-size coins.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • coin_object_id : <ObjectID> - the coin object to be spilt
  • split_count : <uint164> - the number of coins to split into
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_splitCoinEqual",
      "params":["{{signer}}",
      			"{{coin_object_id}}",
      			{{split_count}},       
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_publish

Description
Create an unsigned transaction to publish a Move module.

Params

  • sender : <SuiAddress> - the transaction signer's Sui address
  • compiled_modules : <[Base64]> - the compiled bytes of a Move module, the
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_publish",
      "params":["{{sender}}",
      			"{{compiled_modules}}",           
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_transferObject

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

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • object_id : <ObjectID> - the ID of the object to be transferred
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
  • recipient : <SuiAddress> - the recipient's Sui address
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_transferObject",
      "params":["{{signer}}",
      			"{{object_id}}",     
      			"{{gas}}",  
      			{{gas_budget}},             
                "{{recipient}}"],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_transferSui

Description
Create an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used as the gas object.

Params

  • signer: <SuiAddress> - the transaction signer's Sui address
  • sui_object_id : <ObjectID> - the Sui coin object to be used in this transaction
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
  • recipient : <SuiAddress> - the recipient's Sui address
  • amount : <BigInt_for_uint64> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_transferSui",
      "params":["{{signer}}",
      			"{{sui_object_id}}", 
      			{{gas_budget}},             
      			"{{recipient}}",            
                {{amount}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_pay

Description
Send Coin to a list of addresses, where T can be any coin type, following a list of amounts, The object specified in the gas field will be used to pay the gas fee for the transaction. The gas object can not appear in input_coins. If the gas object is not specified, the RPC server will auto-select one.

Params

  • signer: <SuiAddress> - the transaction signer's Sui address
  • input_coins : <ObjectID> - the Sui coins to be used in this transaction
  • recipients : <SuiAddress> - the recipients' addresses, the length of this vector must be the same as amounts.
  • amounts : <[]> - the amounts to be transferred to recipients, following the same order
  • gas : <ObjectID> - the gas object to be used in this transaction, the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_pay",
      "params":["{{signer}}",
      			"{{input_coins}}", 
      			"{{recipients}}",             
      			{{amounts}},
            	"{{gas}}",
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_payAllSui

Description
Send all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what the method does is:

  1. accumulate all SUI from input coins and deposit all SUI to the first input coin
  2. transfer the updated first coin to the recipient and also use this first coin as gas coin object.
  3. the balance of the first input coin after tx is sum(input_coins) - actual_gas_cost.
  4. all other input coins other than the first are deleted.

Params

  • signer: <SuiAddress> - the transaction signer's Sui address
  • input_coins : <ObjectID> - the Sui coins to be used in this transaction, including the coin for gas payment.
  • recipient : <SuiAddress> - the recipient address
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_payAllSui",
      "params":["{{signer}}",
      			"{{input_coins}}", 
      			"{{recipient}}",
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_paySui

Description
Send all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what pay_all_sui does are:

  1. Accumulate all SUI from input coins and deposit all SUI to the first input coin
  2. Transfer the updated first coin to the recipient and also use this first coin as gas coin object
  3. The balance of the first input coin after tx = sum(input_coins) - sum(amounts) - actual_gas_cost
  4. All other input coins other than the first are deleted

Params

  • signer: <SuiAddress> - the transaction signer's Sui address
  • input_coins : <ObjectID> - the Sui coins to be used in this transaction, including the coin for gas payment.
  • recipients : <SuiAddress> - the recipients' addresses, the length of this vector must be the same as amounts.
  • amounts : <[]> - the amounts to be transferred to recipients, following the same order
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_paySui",
      "params":["{{signer}}",
      			"{{input_coins}}", 
      			"{{recipients}}",             
      			{{amounts}},
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_batchTransaction

Description
Create an unsigned batched transaction.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • single_transaction_params : <[RPCTransactionRequestParams]> - list of transaction request parameters (moveCallRequestParams, transferObjectRequestParams, transferSuiRequestParams)
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
	  "method":"unsafe_batchTransaction", 
	  "params":[
	    "{{signer}}",
        [
          {
            "moveCallRequestParams": {
              "{{arguments}}": [],
              "{{function}},
              "{{module}}",
              "{{package_object_id}}",
              "{{type_arguments}}": []
            }
          },
          {
            "transferObjectRequestParams": {
              "{{object_id}}",
              "{{recipient}}"
            }
          }
        ],
        "{{gas}}",
        {{gas_budget}}],
    "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_requestAddStake

Description
Add delegated stake to a validator's staking pool using multiple coins and amount.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • coins : <[ObjectID]> - Coin or LockedCoin object to delegate
  • amount : <BigInt_for_uint64> - delegation amount
    -validator : <SuiAddress> - the validator's Sui address
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"unsafe_requestAddStake",
      "params":["{{signer}}",
      			"{{coins}}", 
      			{{amount}},             
      			"{{validator}}",
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - transaction data bytes, as base-64 encoded string

unsafe_requestWithdrawStake

Description
Withdraw stake from a validator's staking pool.

Params

  • signer : <SuiAddress> - the transaction signer's Sui address
  • staked_sui : <[ObjectID]> - staked Sui object ID
  • gas : <ObjectID> - gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
  • gas_budget : <BigInt_for_uint64> - the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", 
      "method":"sui_requestWithdrawDelegation",
      "params":["{{signer}}",
      			"{{staked_sui}}",
      			"{{gas}}",            
                {{gas_budget}}],
      "id":1}'

Result

  • TransactionBytes : <TransactionBytes>
  • gas : <[ObjectRef]> - the gas object to be used
  • inputObjects : <[InputObjectKind]> - objects to be used in this transaction
  • txBytes : <[Base64]> - BCS serialized transaction data bytes without its type tag, as base-64 encoded string