Send Your First Request

How to quickly send a request to Shinami's Node Service


Shinami is the leading developer platform for Sui. Our products are designed to help teams build apps faster, with better UX, and less overhead:

  • Node Service: enterprise-grade infrastructure to read and write to the Sui blockchain
  • Gas Station: abstract gas fees from your user's experience by sponsoring their transactions
  • Wallet Services - abstract away signing popups, seed phrases, and other web3 elements for a smooth UX
    • Invisible Wallet: app-controlled wallets that use your app's existing authentication
    • zkLogin wallet user-controlled wallets tied to a user's existing OAuth authentication

We can’t wait to see what you build!

Send your first request

You’ll need to have a Shinami account to follow this 3-4 minute quick-start guide.

1. Create a Shinami API Access Key 🔑

To use Shinami's products, you’ll need an access key to authenticate your requests. You can create access keys in your account dashboard. For this example, we'll set up a Node Service access key on Testnet. When you set up a Node Service access key you assign a max QPS and a max number of WebSocket connections the key is allowed. You can adjust these numbers after the key is created. For example:

After you click "+ Create key" the key will appear in the table below and you can copy the value to use in the test code below. When you click on the row for an access key, it expands to show the editor where you can change QPS and WebSocket limits and set an Allowlist for domains or IPs if desired.

2. Make a request to Sui Testnet using Shinami 🤚

You can interact with the Sui network using Shinami’s Sui JSON-RPC API and your command line.

For manual requests, we recommend interacting with the JSON-RPC via POST requests. Simply pass in the Content-Type: application/json header and your query as the POST body with the following fields:

jsonrpc: The JSON-RPC version—currently, only 2.0 is supported.

method: The Sui API method you want to execute. Shinami supports all Sui JSON-RPC methods.

params: A list of parameters to pass to the method.

id: The ID of your request. Will be returned by the response so you can keep track of which request a response belongs to.

Here is an example method you can run from your command line to return the total number of transactions known to the node. We also have a Shinami Clients TypeScript SDK, so we've provided a sample request and response for that as well.

This is sample code for a 'sui_getTotalTransactionBlocks' request.

Example Request

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

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

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

await nodeClient.getTotalTransactionBlocks();

Example Response

   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : "971804907"

Response Data

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

Next steps to build on Sui! 🏗

For a full list of methods and descriptions for Shinami's APIs, continue to the API Reference section.

We also have the following guides:

and tutorials:

If there’s anything else you need, you can reach us at [email protected].