Skip to content
API reference

Types

Every type the SDK exports, in alphabetical order, generated from its TSDoc.

Every type @umbra/nimbus-solana-web exports is listed here once, in alphabetical order. Each entry is generated from the SDK's own declarations and TSDoc when this site is built. Hover over a type in any code block on this site to see the same information.

The SDK also exports Wallet, which is the Wallet Standard's own type and is not listed here. NimbusSdkError is a class, listed with the errors. The four types ProverWorkerAnswer, ProverWorkerDeps, ProverWorkerRequest and WitnessGraphHandle, come from the ./prover-worker entry.

Balance

One balance a session's identity holds: what its notes of one mint in one zone come to, in one state.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reads.ts.

BeginAttemptRefusal

Why an attempt was refused.

type BeginAttemptRefusal =
  | { readonly kind: "unknown-intent" }
  | { readonly kind: "intent-settled"; readonly intent: Intent }
  | { readonly kind: "not-held"; readonly intent: Intent }
  | { readonly kind: "pool-frozen"; readonly intent: Intent }
  | { readonly kind: "append-pool-full"; readonly pool: number }
  | {
      readonly kind: "append-pool-not-open";
      readonly pool: number;
      readonly status: Exclude<PoolStatus, "open">;
    }
  | { readonly kind: "input-invalid"; readonly leaf: LeafId }
  | { readonly kind: "would-pay-twice"; readonly attempt: Attempt }
  | {
      readonly kind: "padding-of-another-intent";
      readonly nullifier: Uint8Array;
      readonly intentId: Uint8Array;
    };

Generated from the TSDoc in sdks/typescript/nimbus-storage-solana/src/notes/attempts.ts.

ConfirmationCommitment

The commitment a flow waits for before it reports a transaction landed: confirmed, by a supermajority, or finalized, which no fork reverts.

type ConfirmationCommitment = Extract<
  SolanaCommitment,
  "confirmed" | "finalized"
>;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/transaction.ts.

ConnectedWallet

A connected wallet: the signer the SDK takes, and the transaction version the wallet signs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/wallets.ts.

DepositContext

The context deposit, refundStrandedDeposit and resolvePendingDeposit run in.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

DepositOptions

How deposit runs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

DepositResult

What depositing came to:

  • submitted: the deposit was sent; submission.submission says where it ended up. Only landed deposited; unknown may still land, which resolvePendingDeposit settles; failed, expired or refused deposited nothing.
  • declined: the wallet declined to sign; nothing was sent.
  • store-refused, intent-refused, attempt-refused: the note store would not open, begin the deposit or record its attempt; nothing was deposited. Read detail or refusal for why.
  • Version 0 only: funding-failed, the funding transaction did not land, nothing moved; funding-unknown, it may still land, so wait before retrying, which then funds only what is missing; deposit-unsendable, the funding landed but the deposit could not be sent, its value now in the platform wallet, which a retried deposit counts or refundStrandedDeposit returns.
type DepositResult = DepositOutcome<IndexedDbBackend>;

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

DepositStage

One stage of a one-call deposit, as its observe hook is handed it: what the stage produced since the hook was last called, public values only.

type DepositStage =
  | {
      readonly stage: "prepared";
      readonly intentId: Uint8Array;
      readonly mint: Uint8Array;
      readonly recipient: Uint8Array;
      readonly amounts: DepositAmounts;
      readonly contextDigest: Uint8Array;
      readonly executionSlot: bigint;
      readonly proofWindow: bigint;
      readonly transactionVersion: TransactionVersion;
      readonly funding: { readonly lamports: bigint; readonly tokens: bigint };
    }
  | { readonly stage: "endorsed"; readonly committeeSignature: Uint8Array }
  | {
      readonly stage: "proved";
      readonly proof: Uint8Array;
      readonly nullifierProof: Uint8Array;
    }
  | SignedTransactionStage<"funding-signed">
  | SentTransactionStage<"funding-sent">
  | ConfirmedTransactionStage<"funding-confirmed">
  | (SignedTransactionStage<"signed"> & { readonly attempt: number })
  | SentTransactionStage<"sent">
  | ConfirmedTransactionStage<"confirmed">;

Types used: TransactionVersion

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/deposit/types.ts.

DepositSubmission

Where a deposit's transaction ended up.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/deposit/types.ts.

HistoryPage

One page of the wallet's history.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-storage-solana/src/records/history.ts.

HistoryPosition

Where a page of readHistory starts, as the note store lists its rows: from-start, the newest, as when options.after is omitted; or after a row's key, as a page's next.position names it when another page follows, to be passed back unchanged.

type HistoryPosition = ListPosition;

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reads.ts.

LeaseRefusal

Why a lease was refused.

type LeaseRefusal =
  | { readonly kind: "unknown-intent" }
  | { readonly kind: "intent-settled"; readonly intent: Intent }
  | { readonly kind: "held"; readonly intent: Intent }
  | { readonly kind: "inputs-frozen"; readonly intent: Intent }
  | { readonly kind: "not-registered"; readonly registration: Registration }
  | { readonly kind: "two-owner-addresses"; readonly leaf: LeafId }
  | { readonly kind: "two-zones"; readonly leaf: LeafId }
  | {
      readonly kind: "note-unavailable";
      readonly leaf: LeafId;
      readonly reason:
        | "absent"
        | "other-mint"
        | "nullifier-unknown"
        | "not-selectable"
        | "invalid-at-execution-slot"
        | "leased";
    };

Generated from the TSDoc in sdks/typescript/nimbus-storage-solana/src/notes/leases.ts.

LoadNimbusSdkOptions

What a caller may add to, or override in, the cluster's preset.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/load.ts.

MarkAttemptSentRefusal

Why marking an attempt sent was refused.

type MarkAttemptSentRefusal =
  | { readonly kind: "unknown-attempt" }
  | { readonly kind: "not-begun"; readonly attempt: Attempt }
  | { readonly kind: "intent-settled"; readonly intent: Intent }
  | { readonly kind: "not-held"; readonly intent: Intent }
  | { readonly kind: "signature-required"; readonly attempt: Attempt }
  | { readonly kind: "volatile-backend" };

Generated from the TSDoc in sdks/typescript/nimbus-storage-solana/src/notes/attempts.ts.

MergeFailureCause

Why merging a wallet's notes stopped before the payment could be made.

type MergeFailureCause =
  | Extract<SpendPreparation<unknown>, { readonly kind: "refused" }>
  | Extract<SpendRelay, { readonly kind: "relay-refused" | "unsent" }>
  | Extract<RelayProgress, { readonly kind: "failed" }>
  | {
      readonly kind: "timeout";
      readonly relayId: string;
      readonly finalizedSlot: bigint;
    }
  | { readonly kind: "stale-handle" };

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/spend/types.ts.

NimbusBrowserPlatform

Every browser function the SDK calls: the platform, and the globals that are always the browser's own.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusCluster

A cluster the SDK ships a preset for.

type NimbusCluster = "mainnet" | "devnet";

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/presets.ts.

NimbusContextOptions

What a context may route differently from the defaults.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

NimbusEndpoints

Where each party the SDK reaches answers.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusFlowRouting

Where a flow's transaction is routed, every value chosen.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

NimbusGatewayEndpoint

An endpoint the deployment's gateway fronts, which answers 401 to a request without a gateway token.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusGatewayToken

The gateway token a session sends, as openNimbusSession's gatewayToken option set it.

type NimbusGatewayToken =
  | { readonly kind: "none" }
  | { readonly kind: "held"; readonly token: Secret<string> }
  | { readonly kind: "issued"; readonly issue: () => Promise<string> };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/gateway.ts.

NimbusMint

A mint the cluster's deployment supports, as @umbra/solana-deployments' mints.json lists it.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusNodeEndpoint

One node of a committee and where it answers.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusPlatform

The browser's functions the SDK calls. Each defaults to the browser's own global.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusProving

How the prover runs in its worker.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusProvingKeys

Where the circuits' proving keys and witness calculators come from, and what each key proves.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusProvingKeyStatement

The statement one of the manifest's proving keys proves, named as the pool program selects its verifying key: the circuit, and the parameters its circuit fixes.

type NimbusProvingKeyStatement =
  | {
      readonly circuit: "registration";
      readonly quorumThreshold: number;
      readonly quorumNodes: number;
    }
  | {
      readonly circuit: "transaction";
      readonly quorumThreshold: number;
      readonly quorumNodes: number;
      readonly shape: CircuitShape;
    }
  | { readonly circuit: "nullifier_non_membership"; readonly inputs: number };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusRegistrationStanding

Where a session's identity stands in the identity tree of the pool the context API serves.

type NimbusRegistrationStanding =
  | { readonly kind: "registered"; readonly poolIndex: number }
  | { readonly kind: "unregistered"; readonly poolIndex: number };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/session.ts.

NimbusRoute

How a transaction reaches the committee and the relayer.

  • direct: the browser asks each committee member, the context API and the relayer itself.
  • coordinator: a transaction's reads, its committee requests and its relay go through the process coordinator, which makes them from beside the services, so a relayed spend's four committee requests and its relay become one exchange. Registrations, the relay's progress, the RPC, the indexer and the prover are reached directly on both routes.
type NimbusRoute = "direct" | "coordinator";

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/load.ts.

NimbusRoutingDefaults

The committee nodes and guardian cluster a context asks when its options name none.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/presets.ts.

NimbusSdk

A loaded SDK: the cluster's deployment, its mints and routing defaults, the resolved settings, and the handles every function of this package reads, the primitives' module and the artifact cache among them.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/load.ts.

NimbusSdkErrorReason

Why the SDK could not go on.

  • misconfigured: the cluster's preset leaves an endpoint or the proving keys unconfigured and the options did not supply them, or a configured value or an argument is unusable: an assetsBaseUrl that is not a directory URL, no prover worker, no endpoint for the committee node a context names, an address that is not base58, an option outside its range, a mint identifier shorter than 32 bytes, a deposit submission whose outcome is settled already, a gateway token that is not a bearer token, or no open pool. The message names each one; pass it in loadNimbusSdk's options or fix the argument. Not recoverable by retrying.
  • unreadable: a party answered, or the browser's storage held, something that cannot be read: a malformed service answer, a note store another deployment or a newer schema wrote, or a note store another tab replaced or kept writing to while it was in use. Retrying the same party is unlikely to help, though a call that met a note store being replaced may succeed when made again, since each call opens the store afresh.
  • unsupported-browser: the browser lacks a global the SDK needs (fetch, Web Crypto, navigator.locks, navigator.storage, IndexedDB, IDBKeyRange, WebAssembly), or refused to open its storage, as a private window may; or the page is not cross-origin isolated, which the server fixes by sending Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. Not recoverable in this browser or on this page.
  • wallet-unsupported: the wallet cannot connect, sign messages and sign transactions on the cluster's chain, its account's address is not its public key's, or it failed while connecting or signing, signed other bytes than it was given, or answered a signature that does not verify. A user who declines is not this error: the call answers declined. Ask the user to connect another wallet.
  • service-unavailable: a service, the RPC or the artifact host could not be reached or answered a failing status. Retry later.
  • unauthorized: a gateway service answered 401 or 403, because the session was opened without a gateway token or the gateway refused it, or the session's token issuer failed. The message names the service and never the token. Open a session with a token the gateway accepts, or have the issuer return a fresh one.
  • dependency-nonconforming: a dependency answered against its contract: a proving key or witness calculator that is not the one the manifest and the deployed program pin, a prover that refused the statement, a file of this package's assets/ whose SHA-256 is not the one the package pins, or primitives that fail their known-answer checks. The value must not be used; retrying will not help, and serving the assets/ packed with this copy of the package fixes a mismatched file.
  • recipient-unregistered: the context API answered that the wallet a deposit or a transfer pays has no registration in the pool, so no note can be sealed to it. The message carries the API's detail. Nothing was signed or sent. Ask the recipient to register, or pay another wallet; a registration that has only just landed is seen once the indexer reaches it.
  • account-unregistered: the context API answered that the session's own identity, or for a withdrawal the connected wallet, has no registration in the pool. The message carries the API's detail. Nothing was signed or sent. Run register first; a registration that has only just landed is seen once the indexer reaches it.
type NimbusSdkErrorReason =
  | "misconfigured"
  | "unreadable"
  | "unsupported-browser"
  | "wallet-unsupported"
  | "service-unavailable"
  | "unauthorized"
  | "dependency-nonconforming"
  | "recipient-unregistered"
  | "account-unregistered";

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/errors.ts.

NimbusSession

An opened session: the connected wallet, the seed and keys derived from its signature, its identity, its note store, and where it stood when it was opened.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/session.ts.

NimbusSettings

Everything the fillers are bound to besides the deployment and the platform, every value resolved from the preset and the options.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusSolanaFlowError

A refusal a caller can act on. Its message is fixed text and its detail holds names, counts and indices, never key material.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/context/errors.ts.

NimbusSolanaFlowErrorReason

Why the context derivation or a flow refused to go on.

type NimbusSolanaFlowErrorReason =
  | "message-altered"
  | "signature-invalid"
  | "deployment-invalid"
  | "binding-mismatched"
  | "standing-mismatched"
  | "context-mismatched"
  | "absence-unproven"
  | "mint-unsupported"
  | "fee-changing"
  | "amount-unfundable"
  | "committee-mismatched"
  | "proof-mismatched"
  | "transaction-altered"
  | "transaction-unsendable"
  | "fee-payer-unfunded"
  | "relay-unavailable"
  | "payout-unpayable"
  | "relay-mismatched"
  | "zone-unauthorised";

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/context/errors.ts.

NimbusTiming

How long the SDK waits on the chain and the relayer.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

NimbusZone

A zone other than zone 0 and the signer its authorised set holds.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

NoteStoreSyncResult

What syncing a session's note store came to.

type NoteStoreSyncResult =
  | { readonly kind: "unregistered" }
  | {
      readonly kind: "ingested";
      readonly slot: bigint;
      readonly rounds: number;
      readonly caughtUp: boolean;
    }
  | {
      readonly kind: "unavailable";
      readonly step: string;
      readonly detail: Readonly<Record<string, string>>;
    };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reads.ts.

NoteStoreSyncRound

One round of syncNoteStore, as onProgress is handed it.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reads.ts.

OpenNimbusSessionOptions

How a session is opened.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/session.ts.

OpenNimbusSessionResult

What opening a session came to.

type OpenNimbusSessionResult =
  | { readonly kind: "opened"; readonly session: NimbusSession }
  | { readonly kind: "declined" };

Types used: NimbusSession

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/session.ts.

PendingDepositResolutionResult

What resolving a pending deposit came to:

  • landed: the deposit landed, at slot; its note arrives with the next sync.
  • failed or expired: nothing was deposited, and the note store was told; report and intent are its answers, abandoned meaning the notes the deposit merged are free again, and settled that releaseReservedNotes had stopped it, the report freeing them. At version 0 a landed funding's value stays in the platform wallet: deposit again, or refundStrandedDeposit.
  • unknown: the wait ended first; it may still land until its last valid height, so call again.
  • store-refused: the note store would not open for the identity; nothing was reported.
type PendingDepositResolutionResult = DepositResolution<IndexedDbBackend>;

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

ProverWorkerAnswer

The prover worker's answer: the proof as snarkjs writes it, or why it failed.

type ProverWorkerAnswer =
  | {
      readonly kind: "proved";
      readonly proof: {
        readonly pi_a: readonly string[];
        readonly pi_b: readonly (readonly string[])[];
        readonly pi_c: readonly string[];
      };
      readonly publicSignals: readonly string[];
    }
  | {
      readonly kind: "failed";
      readonly reason: string;
      readonly message: string;
    };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/prover-worker.ts.

ProverWorkerDeps

The witness-graph and prover WASM modules, each initialised by the application before the call.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/prover-worker.ts.

ProverWorkerRequest

What the main thread asks the prover worker for.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/prover-worker.ts.

RefundStage

One stage of a one-call refund, as its observe hook is handed it: what the stage produced since the hook was last called, public values only.

type RefundStage =
  | {
      readonly stage: "prepared";
      readonly platformWallet: Uint8Array;
      readonly mint: PreparedDepositRefund["mint"];
      readonly holdings: PlatformWalletHoldings;
      readonly instructionCount: number;
    }
  | SignedTransactionStage<"signed">
  | SentTransactionStage<"sent">
  | ConfirmedTransactionStage<"confirmed">;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/deposit/refund.ts.

RegisterOptions

How register runs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

RegisterStage

One stage of a one-call registration, as its observe hook is handed it: what the stage produced since the hook was last called, public values only.

type RegisterStage =
  | {
      readonly stage: "prepared";
      readonly identityCommitment: bigint;
      readonly platformWallet: Uint8Array;
      readonly poolIndex: number;
      readonly bind: PlatformWalletBindingPlan;
      readonly identity:
        | { readonly kind: "registered" }
        | {
            readonly kind: "pending";
            readonly contextDigest: Uint8Array;
            readonly birthday: bigint;
          };
    }
  | { readonly stage: "endorsed"; readonly committeeSignature: Uint8Array }
  | { readonly stage: "proved"; readonly proof: Uint8Array }
  | (SignedTransactionStage<"signed"> & {
      readonly wrote: readonly RegistrationWrite[];
    })
  | SentTransactionStage<"sent">
  | ConfirmedTransactionStage<"confirmed">;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/register/types.ts.

RegistrationContext

The context register runs in.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

RegistrationContextOptions

What a registration context may route differently: a registration asks no screener.

type RegistrationContextOptions = Omit<
  NimbusContextOptions,
  "screenerNodeIndex"
>;

Types used: NimbusContextOptions

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

RegistrationResult

What registering came to:

  • complete: the identity was registered and bound already; nothing was sent.
  • submitted: the transaction was sent; submission.submission says where it ended up. Only landed registered it: read readRegistration then. failed, expired or refused registered nothing, and register may be called again; unknown may still land, so read the standing again before retrying.
  • declined: a wallet declined to sign; nothing was sent.
  • store-refused: the note store would not open for this identity, as refusal says; nothing was asked of any service.
type RegistrationResult = RegistrationOutcome<IndexedDbBackend>;

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

ReleasedNotes

What releasing came to: the spends whose notes are free now, those whose notes free once an attempt that may have been sent lands or can no longer land, and those left alone because a tab is still running them.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reserved.ts.

ReservedSpend

One spend holding a session's notes: a withdrawal, a transfer or a merge, which the store does not tell apart; an escape; or a deposit that merges some of the session's notes, spending them into one new note beside the one it deposits. A deposit that merges none holds no notes and is not one.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reserved.ts.

ReservedSpendState

Where a spend holding notes stands, which decides what releasing it does:

  • unsent: nothing of it has left the device; releasing it frees its notes at once.
  • sent: an attempt of it may have reached the relayer or the chain; releasing it stops any new attempt, and its notes free once that attempt lands or can no longer land.
  • releasing: released while an attempt may still land; its notes free once it lands or can no longer land.
type ReservedSpendState = "unsent" | "sent" | "releasing";

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reserved.ts.

SentTransactionOptions

What every flow the connected wallet signs and sends may vary.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SettledSpendOutcome

What a withdrawal or a transfer came to:

  • relayed: the relayer admitted it; settlement says how following it went, and the payment is known made once that is landed. A pending settlement may still land; a later sync settles it, and its notes stay reserved until then.
  • refused: nothing was asked of the committee; refusal, a SpendRefusal, says why, insufficient with what the session may spend.
  • relay-refused: the relayer refused it, with its code, creating no relay; its notes are released at once, so a retry may spend them.
  • unsent: the note store would not mark it sent, so nothing was posted.
  • merge-failed: the notes had to be merged first and a merge did not settle; mergesCompleted stay merged, so a retry needs fewer, and cause says why.
type SettledSpendOutcome =
  | Exclude<SpendOutcome, { readonly kind: "relayed" }>
  | (Extract<SpendOutcome, { readonly kind: "relayed" }> & {
      readonly settlement: SpendSettlement;
    });

Types used: SpendSettlement

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SettledStage

The stage a withdrawal or a transfer reports once following its relay settled, with how.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SignatureSecretKey

Which wallet, cluster and chain a stored secret belongs to.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/signature-secret-store.ts.

SignatureSecretReading

What reading a stored secret came to.

type SignatureSecretReading =
  | { readonly kind: "found"; readonly signatureSecret: Secret<Uint8Array> }
  | { readonly kind: "absent" };

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/signature-secret-store.ts.

SignatureSecretStore

Where the signature secret is kept between page loads: three functions over one place.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/signature-secret-store.ts.

SignatureSecretStoreOptions

How a Web Storage store names its entries.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/signature-secret-store.ts.

SpendOptions

How withdraw and transfer run. The relayer sends their transaction, so they take no priority fee, version or commitment.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SpendRefusal

Why a spend's preparation stopped short, writing nothing to any service.

type SpendRefusal =
  | { readonly kind: "insufficient"; readonly available: bigint }
  | { readonly kind: "store-refused"; readonly refusal: WalletStoreRefusal }
  | { readonly kind: "not-registered"; readonly registration: Registration }
  | { readonly kind: "lease-refused"; readonly refusal: LeaseRefusal }
  | { readonly kind: "attempt-refused"; readonly refusal: BeginAttemptRefusal }
  | { readonly kind: "stale-handle" }
  | {
      readonly kind: "store-unavailable";
      readonly detail: Readonly<Record<string, string>>;
    };

Types used: WalletStoreRefusal, LeaseRefusal, BeginAttemptRefusal

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/spend/types.ts.

SpendSettlement

What following a relayed spend came to:

  • landed: it reached the commitment followed, and the note store was synced after, sync saying how that went;
  • failed: the relayer reported it rejected, expired or failed, with its failure code;
  • pending: the follow's status reads ran out first, with the last state read; a later sync still settles it;
  • not-followed: follow: false was passed.
type SpendSettlement =
  | {
      readonly kind: "landed";
      readonly signature: Uint8Array;
      readonly sync: NoteStoreSyncResult;
    }
  | {
      readonly kind: "failed";
      readonly state: "rejected" | "expired" | "failed";
      readonly failureCode: string;
    }
  | { readonly kind: "pending"; readonly state: string }
  | { readonly kind: "not-followed" };

Types used: NoteStoreSyncResult

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

StrandedDepositRefundOptions

How refundStrandedDeposit runs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

StrandedDepositRefundResult

What refunding a stranded deposit came to:

  • nothing-held: the platform wallet holds nothing of the mint and no lamports; holdings says what was read. Nothing was sent.
  • declined: the wallet declined to sign; nothing was sent.
  • submitted: the refund was sent; submission says where it ended up, and only landed returned the value. A failed, expired or refused refund may be run again.
type StrandedDepositRefundResult = RefundOutcome;

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SyncedStage

The stage a flow reports once it has synced the note store before it starts, with how the sync went.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SyncFirstOptions

Whether a flow first syncs the note store, until it is caught up.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

SyncNoteStoreOptions

How much syncNoteStore reads, and what it reports as it goes.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/reads.ts.

TransactionSubmission

Where a sent transaction ended up. Only landed applied it; failed charged its fee and applied nothing else; expired and refused never land from this send; unknown may still land until its last valid block height, so a caller waits it out before sending the same value again.

type TransactionSubmission =
  | {
      readonly kind: "landed";
      readonly signature: Uint8Array;
      readonly slot: bigint;
    }
  | {
      readonly kind: "failed";
      readonly signature: Uint8Array;
      readonly slot: bigint;
      readonly error: string;
    }
  | { readonly kind: "expired"; readonly signature: Uint8Array }
  | {
      readonly kind: "refused";
      readonly signature: Uint8Array;
      readonly detail: string;
    }
  | {
      readonly kind: "unknown";
      readonly signature: Uint8Array;
      readonly lastValidBlockHeight: bigint;
      readonly detail: string;
    };

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/transaction.ts.

TransactionVersion

The transaction format a flow compiles: version 1 (SIMD-0385), the default, or version 0, for a wallet that cannot sign version 1.

type TransactionVersion = 0 | 1;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/transaction.ts.

TransferContext

The context transfer runs in.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

TransferOptions

How transfer runs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

TransferResult

What transferring came to, each variant as SettledSpendOutcome lists it; a relayed transfer's note is the recipient's once its settlement is landed.

type TransferResult = SettledSpendOutcome;

Types used: SettledSpendOutcome

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

TransferStage

One stage of a one-call transfer, as its observe hook is handed it; see SpendStage. Its prepared stage's payee is the recipient's wallet address.

type TransferStage = SpendStage<Extract<SpendPayee, { readonly kind: "note" }>>;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/transfer/types.ts.

WalletConnectionResult

What asking a wallet to connect came to.

  • connected: the wallet connected, with an account on the SDK's cluster.
  • no-account: the wallet connected but offered no account on the SDK's cluster.
  • declined: the user refused to connect.
type WalletConnectionResult =
  | { readonly kind: "connected"; readonly connected: ConnectedWallet }
  | { readonly kind: "no-account" }
  | { readonly kind: "declined" };

Types used: ConnectedWallet

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/wallets.ts.

WalletDiscoveryOptions

Where the installed wallets are read from.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/wallets.ts.

WalletStandardAccount

The connected wallet's Solana account, as the Wallet Standard's WalletAccount describes it.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

WalletStandardSigner

A Wallet Standard wallet's connected account and the two features the SDK asks it for, each the feature's own method: solana:signMessage's signMessage and solana:signTransaction's signTransaction.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/config.ts.

WalletStoreRefusal

Why a flow's wallet store would not open for the account's identity: the store's own refusal, a handle gone stale while its header was read, unbound when no identity has been bound to it (registering binds one), or other-identity when another identity has.

type WalletStoreRefusal =
  | Exclude<OpenNoteStoreResult<unknown>, { readonly kind: "opened" }>
  | StaleHandle
  | { readonly kind: "unbound" }
  | { readonly kind: "other-identity" };

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/wallet-store.ts.

WithdrawalContext

The context withdraw runs in.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/contexts.ts.

WithdrawalResult

What withdrawing came to, each variant as SettledSpendOutcome lists it: relayed with how following it settled, refused before anything was asked of the committee, relay-refused, unsent, or merge-failed when the notes had to be merged first and a merge did not settle.

type WithdrawalResult = SettledSpendOutcome;

Types used: SettledSpendOutcome

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

WithdrawOptions

How withdraw runs.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/flows.ts.

WithdrawStage

One stage of a one-call withdrawal, as its observe hook is handed it; see SpendStage. Its prepared stage's payee is the token account paid and, when the relayer creates it, its owner.

type WithdrawStage = SpendStage<
  Extract<SpendPayee, { readonly kind: "payout" }>
>;

Generated from the TSDoc in sdks/typescript/nimbus-solana/src/flows/withdraw/types.ts.

WitnessGraphHandle

One parsed witness graph, held by the witness-graph WASM until free releases it.

Prop

Type

Generated from the TSDoc in sdks/typescript/nimbus-solana-web/src/prover-worker.ts.

Last updated

On this page

BalanceBeginAttemptRefusalConfirmationCommitmentConnectedWalletDepositContextDepositOptionsDepositResultDepositStageDepositSubmissionHistoryPageHistoryPositionLeaseRefusalLoadNimbusSdkOptionsMarkAttemptSentRefusalMergeFailureCauseNimbusBrowserPlatformNimbusClusterNimbusContextOptionsNimbusEndpointsNimbusFlowRoutingNimbusGatewayEndpointNimbusGatewayTokenNimbusMintNimbusNodeEndpointNimbusPlatformNimbusProvingNimbusProvingKeysNimbusProvingKeyStatementNimbusRegistrationStandingNimbusRouteNimbusRoutingDefaultsNimbusSdkNimbusSdkErrorReasonNimbusSessionNimbusSettingsNimbusSolanaFlowErrorNimbusSolanaFlowErrorReasonNimbusTimingNimbusZoneNoteStoreSyncResultNoteStoreSyncRoundOpenNimbusSessionOptionsOpenNimbusSessionResultPendingDepositResolutionResultProverWorkerAnswerProverWorkerDepsProverWorkerRequestRefundStageRegisterOptionsRegisterStageRegistrationContextRegistrationContextOptionsRegistrationResultReleasedNotesReservedSpendReservedSpendStateSentTransactionOptionsSettledSpendOutcomeSettledStageSignatureSecretKeySignatureSecretReadingSignatureSecretStoreSignatureSecretStoreOptionsSpendOptionsSpendRefusalSpendSettlementStrandedDepositRefundOptionsStrandedDepositRefundResultSyncedStageSyncFirstOptionsSyncNoteStoreOptionsTransactionSubmissionTransactionVersionTransferContextTransferOptionsTransferResultTransferStageWalletConnectionResultWalletDiscoveryOptionsWalletStandardAccountWalletStandardSignerWalletStoreRefusalWithdrawalContextWithdrawalResultWithdrawOptionsWithdrawStageWitnessGraphHandle