Okto Embedded WalletUsing Embedded Wallet

Invoke Any Smart Contract On-chain Via Code

Learn how to invoke any smart contract interaction on-chain using the Okto SDK.

Methods Overview

MethodsDescription
async getRawTransactionStatusFetch raw transactions based on the provided data
async executeRawTransactionExecute raw transactions based on the provided data
async executeRawTransactionWithJobStatusExecute raw transactions with job status updates based on the provided data

Get Raw Transaction Status

async getRawTransactionStatus(query) fetches the status of a raw transaction based on the provided query.

Parameters

ParameterTypeDescription
queryRawTransactionStatusQueryQuery being provided fetching the data
interface RawTransactionStatusQuery {
  order_id: string;
}

Response

Success Response

Field NameTypeDescription
resultPromise<RawTransactionStatusData>Returns information about the status of raw transaction

Execute Raw Transaction

async executeRawTransaction(data) executes a raw transaction based on the provided data.

Parameters

ParameterTypeDescription
dataPromise<ExecuteRawTransaction>Data being provided for executing raw transactions
  interface ExecuteRawTransaction {
  network_name: string;
  transaction: {
    from: string;
    to: string;
    data: string
    value: string;
  }
}

Response

Success Response

Field NameTypeDescription
resultPromise<ExecuteRawTransactionData>Returns information about the transaction

Execute Raw Transaction With Job Status

async executeRawTransactionWithJobStatus(data) executes a raw transaction and provides job status updates based on the provided data.

Parameters

ParameterTypeDescription
dataPromise<ExecuteRawTransaction>Data being provided for executing raw transactions
interface ExecuteRawTransaction {
  network_name: string;
  transaction: object;
}

Response

Success Response

Field NameTypeDescription
resultPromise<RawTransactionStatus>Returns information about the transaction

On this page