Skip to content
Alchemy Logo

prepareCalls (Solana)

function prepareCalls(client, params): Promise<SolanaPrepareCallsResult>;

Defined in: packages/wallet-apis/src/actions/solana/prepareCalls.ts:77

Prepares Solana instructions for execution by building a versioned transaction. Returns the compiled transaction and a signature request that needs to be signed before submitting to sendPreparedCalls.

const result = await client.prepareCalls({
  calls: [
    {
      programId: "11111111111111111111111111111111",
      data: "0x...",
    },
  ],
  capabilities: {
    paymaster: { policyId: "your-policy-id" },
  },
});

ParameterTypeDescription

client

InnerSolanaWalletApiClient

The Solana wallet API client

params

SolanaPrepareCallsParams

Parameters for preparing Solana calls

Promise<SolanaPrepareCallsResult>

The prepared Solana transaction with signature request

Was this page helpful?