/** * Stellar Transaction Submission * * Submits signed Soroban transactions and polls for confirmation. */ import type { IStellarNetwork } from './types'; /** * Submit a signed Soroban transaction and poll until confirmed. * * @param signedXdr - Base64-encoded XDR of the signed transaction * @param network - Stellar network name * @param sorobanRpcUrl - Optional override Soroban RPC endpoint (e.g. a keyed * Alchemy URL); becomes the primary with the SDK's public endpoints kept as * failover. Omit to use the public endpoints. * @returns The transaction hash once the network confirms it as successful * @throws {@link AugustTimeoutError} when the transaction is not confirmed * within the poll budget (`MAX_POLL_ATTEMPTS`). * @throws {@link AugustSDKError} when the RPC rejects the submission or the * transaction confirms as failed. Its `context` carries `{ network, status }` * plus, when the result XDR decodes, a `resultCode` string holding the * transaction-level reason (e.g. `"txBadSeq"`, `"txTooLate"`); `resultCode` * is `undefined` when the code cannot be decoded. * * Side effect: a transaction whose `resultCode` is `txFailed` — the operation * itself ran and failed — and whose envelope shows a vault `redeem` is relayed * to that vault's curator (fire-and-forget, deduped — see * {@link reportRedeemFailure}). Nothing else alerts: an RPC-rejected * broadcast is a retryable race, a poll timeout is indeterminate (the * transaction may yet succeed), and any other result code means the redeem * never executed. * @example * ```ts * try { * const hash = await submitStellarTransaction(signedXdr, 'mainnet'); * } catch (err) { * if (err instanceof AugustSDKError && err.context?.resultCode === 'txBadSeq') { * // stale sequence number — rebuild the transaction and resubmit * } * } * ``` */ export declare function submitStellarTransaction(signedXdr: string, network: IStellarNetwork, sorobanRpcUrl?: string): Promise;