Unified result type returned by all mutating SDK methods.

Mutating methods never throw — errors are surfaced through this type. Always check status before using hash.

const result = await sdk.fundCAddress(options, keypair);

if (result.status === 'failed') {
console.error('Transfer failed:', result.error);
return;
}

// Poll for confirmation
const txResult = await server.getTransaction(result.hash);
interface TransactionResult {
    error?: string;
    hash: string;
    status: "failed" | "pending" | "success";
}

Properties

Properties

error?: string

Human-readable error description when status === 'failed'. Absent when the transaction is pending or successful.

hash: string

Transaction hash on the Stellar network. Empty string ('') when status is 'failed' and the transaction was never submitted.

status: "failed" | "pending" | "success"

Current status of the transaction:

  • 'pending' — submitted and waiting for ledger inclusion.
  • 'success' — included and successful (rare, usually stays 'pending').
  • 'failed' — rejected before submission or returned an error.