Intents

Token Transfer

Execute token transfer operations using the Okto Gateway. This endpoint handles token transfers between addresses.

Dev Tools Available!

For quick testing purposes, we provide development tools like the Okto Auth Token Generator. This tool helps you generate authentication tokens instantly, making it easier to test our APIs.

POST Request

Endpoint

POST https://sandbox-okto-gateway.oktostage.com/rpc

Headers

NameTypeDescription
Content-TypestringMust be application/json
AuthorizationstringBearer token for authentication

Request Body

{
  "method": "execute",
  "jsonrpc": "2.0",
  "id": "<request-id>",
  "params": [
    {
      "callData": "string",                    // Encoded function call data
      "callGasLimit": "string",                // Gas limit for the call
      "maxFeePerGas": "string",                // Maximum fee per gas
      "maxPriorityFeePerGas": "string",        // Maximum priority fee per gas
      "nonce": "string",                       // Transaction nonce
      "paymaster": "string",                   // Paymaster contract address
      "paymasterData": "string",               // Data for paymaster
      "paymasterPostOpGasLimit": "string",     // Gas limit for post-operation
      "paymasterVerificationGasLimit": "string", // Gas limit for verification
      "preVerificationGas": "string",          // Gas for pre-verification
      "sender": "string",                      // Sender's address
      "verificationGasLimit": "string",        // Gas limit for verification
      "signature": "string"                    // Transaction signature
    }
  ]
}
Tip:Request Parameters
Show
  • callData: The encoded function call data for the token transfer
  • callGasLimit: Gas limit for the actual function call
  • maxFeePerGas and maxPriorityFeePerGas: Gas fee parameters
  • nonce: Unique identifier for the transaction
  • paymaster: Address of the paymaster contract
  • paymasterData: Data required for paymaster operations
  • paymasterPostOpGasLimit: Gas limit for post-operation checks
  • paymasterVerificationGasLimit: Gas limit for paymaster verification
  • preVerificationGas: Gas required for pre-verification steps
  • sender: Address of the transaction sender
  • verificationGasLimit: Gas limit for transaction verification
  • signature: Cryptographic signature of the transaction

Response

{
  "jsonrpc": "2.0",
  "id": "<request-id>",
  "result": {
    "jobId": "string"    // Unique identifier for the transfer job
  }
}

Example

curl --location 'https://sandbox-okto-gateway.oktostage.com/rpc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-token>' \
--data '{
  "jsonrpc": "2.0",
  "method": "execute",
  "params": [
    {
      "callData": "0x8dd7712f...",
      "callGasLimit": "0x493e0",
      "maxFeePerGas": "0x77359400",
      "maxPriorityFeePerGas": "0x77359400",
      "nonce": "0x000000000000000000000000000000003771fa868b094787bd6cc8d837a7403a",
      "paymaster": "0x5408faa7f005c46b85d82060c532b820f534437c",
      "paymasterData": "0x000000...",
      "paymasterPostOpGasLimit": "0x1ab41",
      "paymasterVerificationGasLimit": "0x493e0",
      "preVerificationGas": "0x14DEF",
      "sender": "0x666068e042eb125ddd0f25460d14b8bc33c8bbec",
      "verificationGasLimit": "0x61a80",
      "signature": "0x962a8b..."
    }
  ],
  "id": "292dc62e-1876-41c3-b402-1d5ceb7bafe3"
}'

Response Examples

{
  "jsonrpc": "2.0",
  "id": "25456a8f-8b66-4405-ad18-906aad82eba3",
  "result": {
    "jobId": "9c424737-e204-461b-b93a-ca8e3dfd655c"
  }
}

On this page