AURA

Overview

AuraClient constructor, properties, transaction sending, and dual-form instruction pattern.

Pre-alpha — not production ready

@aura-protocol/sdk-ts targets Solana devnet only. APIs may change without notice. Do not use for real funds until a stable release and audit are published.

AuraClient is the low-level AURA SDK client. It gives you full control over every instruction parameter, supports composing multiple instructions into a single transaction, and exposes the complete 67-instruction surface.

If you want sensible defaults and plain-number inputs, use the Aura high-level API instead. Access it from a client instance via aura.lowLevel.

Constructor

import { Connection } from '@solana/web3.js';
import { AuraClient, AURA_PROGRAM_ID } from '@aura-protocol/sdk-ts';

const connection = new Connection(
  'https://devnet.helius-rpc.com/?api-key=YOUR_KEY',
  'confirmed',
);

// Default — targets devnet AURA_PROGRAM_ID
const client = new AuraClient({ connection });

// Custom program ID (e.g. localnet)
const localClient = new AuraClient({
  connection: new Connection('http://localhost:8899', 'confirmed'),
  programId: myLocalProgramId,
});

AuraClientOptions:

OptionTypeRequiredDescription
connectionConnectionSolana RPC connection
programIdPublicKeyOverride program ID (defaults to devnet AURA_PROGRAM_ID)
confirmOptionsConfirmOptionsAnchor confirm options

Properties

PropertyTypeDescription
connectionConnectionUnderlying Solana RPC connection
programIdPublicKeyAURA program ID in use
confirmOptionsConfirmOptionsAnchor confirm options
providerAnchorProviderRead-only Anchor provider (never used to sign)
programProgram<AuraCore>Anchor program instance for building typed instructions
coderBorshInstructionCoderBorsh coder for decoding raw instruction data

Dual-Form Instructions

Every instruction on AuraClient is available in two forms:

*Instruction() — returns a TransactionInstruction for composing into custom transactions, batching, or signing with external wallets.

Method without suffix — builds, signs, and sends in one call, returning the transaction signature.

// Form 1: instruction only — compose freely
const { treasury, instruction } = await client.createTreasuryInstruction({
  owner: owner.publicKey,
  args,
});
const tx = new Transaction().add(instruction).add(anotherInstruction);

// Form 2: build + send in one call
const { treasury, signature } = await client.createTreasury(owner, args);
console.log('Signature:', signature);

sendInstructions

Send one or more instructions in a single transaction. Returns the signature immediately — does not wait for confirmation.

const now = new BN(Math.floor(Date.now() / 1000));

const pauseIx = await client.pauseExecutionInstruction(
  { owner: owner.publicKey, treasury },
  true,
  now,
);
const cancelIx = await client.cancelPendingInstruction(
  { owner: owner.publicKey, treasury },
  now,
);

const signature = await client.sendInstructions(owner, [pauseIx, cancelIx]);
console.log('Batched tx:', signature);
ParameterTypeDescription
payerSignerFee payer and primary signer
instructionsTransactionInstruction[]Instructions to include
extraSignersSigner[]Additional signers (optional)
optionsSendOptionsSend options e.g. skipPreflight (optional)

On this page