SDK Changes (Beta)

TypeScript SDK changes in Kora v2.2.0-beta — new constructor, Kit plugin, and bundle methods.

The @solana/kora SDK has been updated with new APIs for the v2.2.0-beta release. Install the beta SDK:

pnpm add @solana/kora@beta

Bundle Methods

The SDK now supports all bundle operations:

// Estimate bundle fees
const estimate = await client.estimateBundleFee({
  transactions: [base64Tx1, base64Tx2],
  fee_token: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
});

// Sign a bundle without submitting
const { signed_transactions } = await client.signBundle({
  transactions: [base64Tx1, base64Tx2, base64Tx3],
  signer_key: koraSignerAddress,
});

// Sign and submit a bundle to Jito
const { bundle_uuid } = await client.signAndSendBundle({
  transactions: [base64Tx1, base64Tx2, base64Tx3],
  signer_key: koraSignerAddress,
});

getVersion

const { version } = await client.getVersion();
console.log('Kora server version:', version);