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"
>;Not processed: a version 0 deposit is simulated at confirmed once its funding has landed, so a
funding reported at processed could leave the deposit simulating against a platform wallet
that does not hold it yet.
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.submissionsays where it ended up. Onlylandeddeposited;unknownmay still land, whichresolvePendingDepositsettles;failed,expiredorrefuseddeposited 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. Readdetailorrefusalfor 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 orrefundStrandedDepositreturns.
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
prepared: the wallet store has begun the deposit's intent and leased any notes it merges.intentIdis the store's 16-byte id for it,executionSlotthe slot the proofs bind,proofWindowthe slots the proofs stay valid for after it, andfundingwhat the connected wallet moves to the platform wallet, in lamports and in base units of the mint.endorsed: the committee's summed signature, 32 bytes;proved: the transaction proof and the absence proof, 128 bytes each, compressed. Each arrives as it completes, so they come in either order unlessserialiseproves first.- Version 0 only, when the platform wallet lacks what the deposit moves and pays:
funding-signed,funding-sentandfunding-confirmed, the funding transaction's own stages, before the deposit is signed. signed: the store has begun the attempt and every signer has signed; nothing is sent.sent: the store has marked the attempt sent and the RPC took the transaction, or answered without settling whether it did.confirmed: it landed without error atopts.commitment, which the stage reports, asfunding-confirmeddoes for the funding.
A transaction that failed, expired or is still unknown stops at its sent stage, and the outcome
says where it ended up.
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" };refused,relay-refused,unsent: the failing merge's own outcome, as a spend reports it.failed: the relayer gave the merge up or it failed on chain, asfollowRelayreports it.timeout: the merge did not land, or its note did not become spendable in the wallet store, withinmergeTimeoutslots;relayIdnames the relay, which may still land, andfinalizedSlotis the last finalized slot read.stale-handle: the wallet's store was destroyed, replaced or migrated while the merge was followed; open it again.
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
The manifest is configuration, not fetched: it pins each artifact's SHA-256 and each proving key's verifying key, so the host that serves the bytes cannot also choose what they must hash to. Every key is further checked against the verifying keys compiled into the deployed pool program before it is used.
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
Pass it to openNimbusSession; treat every field as read-only. One SDK serves any number of
sessions, and holds no secret.
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: anassetsBaseUrlthat 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 inloadNimbusSdk'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 sendingCross-Origin-Opener-Policy: same-originandCross-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 answersdeclined. 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'sassets/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 theassets/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. Runregisterfirst; 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
It holds secrets in memory: the wallet seed every key derives from, the keys a sync recognises
notes with, and the gateway token. Close it with closeNimbusSession when the user is
done; never serialise it.
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";message-altered: the unlock message in this build does not hash to its pinned digest. Not recoverable at run time: the build is wrong, and nothing may be signed from it.signature-invalid: the wallet's signature is not 64 bytes or does not verify over the unlock message for the connected wallet. Ask again; a wallet that wraps the message is unsupported.deployment-invalid: the deployment inctxcontradicts itself, such as a pool program that is notprograms.pool. Fix the configuration.binding-mismatched: the user registry binds the connected wallet to another platform wallet than this account derives. Repair is a new bind both wallets sign, never automatic.standing-mismatched: the context service's answer does not fit the registration: another pool, another cluster, a shape the circuit does not fold, a stale root or an inactive cluster. Fetch again later.context-mismatched: the context service's answer does not fit the deposit or the spend: a root the chain has retired, another sender, a payee or recipient of the other kind, witnesses that do not pair with what was asked or are of another shape, a rate absence proven against another root, or a quorum the circuit does not fold. Fetch again; a persistent refusal means the service is wrong.absence-unproven: the gap the service served does not prove the identity, or an input's nullifier, absent from the root it names. Fetch again; a persistent refusal means the service is wrong.mint-unsupported: no mint account exists at the address, a program other than SPL Token or Token-2022 owns it, or its bytes are not a mint's. Nothing can be deposited of it; choose another mint.fee-changing: the mint's Token-2022 transfer fee changes at the next epoch, too soon for a deposit prepared now to be sure which applies. Retry once the epoch has turned.amount-unfundable: the amount cannot settle: the mint's transfer fee takes the whole amount, so nothing reaches the pool token account; the fee leaves the payee nothing; the merged or selected notes cannot pay the amount and its fees; or the policy charges the change. Nothing was asked of the committee; choose another amount or fee mode.committee-mismatched: the guardians', the screener's, the fee enclave's or the data endorser's answers cannot be summed into a signature the chain accepts: a node refused, signed another digest, or holds a key the cluster does not publish. Nothing was sent. Retry; a persistent refusal means a node or the cluster's published keys are wrong.proof-mismatched: the prover proved another statement than the one prepared. The prover or its key is wrong, and retrying with them will not help.transaction-altered: the connected wallet returned a transaction whose message differs from the one built, or whose signature does not verify. Nothing was sent. Ask again; a wallet that rewrites what it is asked to sign is unsupported.transaction-unsendable: the transaction is larger than its version carries, or its simulation failed; nothing was signed or sent. A failed simulation may pass on a retry; a size will not.fee-payer-unfunded: the connected wallet pays for the flow's transaction and has no account on the cluster, or holds fewer lamports than paying for it requires: the base fee for each signature, the priority fee, the lamports the transaction moves from it, the rent of an account it creates, and the rent-exempt minimum it keeps. Raised while the flow is prepared, so nothing was proved, asked of the committee, signed or sent.detailholdsrequiredLamportsandheldLamportsas decimal strings; add SOL to the wallet and retry.relay-unavailable: the relayer's policy does not carry the spend: another program, another pool, a mint it does not relay, a fee it refuses, no tip accrual for the fee's mint, or a destination it will not create. Nothing was asked of the committee; choose another relayer.payout-unpayable: the withdrawal's destination cannot be paid: no account and no owner to create it for, an account that is not a token account of the mint, an owner whose associated token account it is not, or an owner named for a native SOL wallet other than the wallet. It is raised too when no account exists at the mint or a program other than SPL Token or Token-2022 owns it, and when a native SOL payout, after every fee, would leave the destination below the rent-exempt minimum. Nothing was asked of the committee; name another destination, or for native SOL a larger amount.relay-mismatched: what was admitted is not the relay built: another context digest, or a posted payload whose committee signature is not the committee's sum. The relay may still land, so its notes stay held until the wallet store sees it land or die; sync to learn which.zone-unauthorised: a zone signer refused, answered for another zone or side, answered with a value outside the field, or with a key the zone's authorised set does not hold at the root the statement proves against. Nothing was asked of the committee and the notes are released; ask the zone's operator, or use another zone.
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, atslot; its note arrives with the next sync.failedorexpired: nothing was deposited, and the note store was told;reportandintentare its answers,abandonedmeaning the notes the deposit merged are free again, andsettledthatreleaseReservedNoteshad stopped it, the report freeing them. At version 0 a landed funding's value stays in the platform wallet: deposit again, orrefundStrandedDeposit.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">;prepared: the platform wallet, the mint as read, what the platform wallet held, and how many instructions return it. A platform wallet holding nothing stops before this stage.signed: both wallets signed the transaction; nothing is sent.sent: the RPC took it, or answered without settling whether it did.confirmed: it landed without error atopts.commitment, which the stage reports. One that failed, expired or is still unknown stops atsent, and the outcome says where it ended up.
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">;prepared: the identity, its platform wallet and pool, whether the bind is still needed, and whether the identity is registered already or pending, with the context digest the committee signs and the slot the wallet's store was opened at. A registration with nothing left to send stops here.endorsed: the committee's summed signature, 32 bytes;proved: the 128-byte compressed proof. A pending identity has both, each as it completes, so they arrive in either order unlessserialiseproves first; a registered one has neither.signed: the transaction both wallets signed, before anything is sent, and the instructions it carries.sent: the RPC took it, or answered without settling whether it did.confirmed: it landed without error atopts.commitment, which the stage reports. One that failed, expired or is still unknown stops atsent, and the outcome says where it ended up.
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.submissionsays where it ended up. Onlylandedregistered it: readreadRegistrationthen.failed,expiredorrefusedregistered nothing, andregistermay be called again;unknownmay 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, asrefusalsays; 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;settlementsays how following it went, and the payment is known made once that islanded. Apendingsettlement may still land; a later sync settles it, and its notes stay reserved until then.refused: nothing was asked of the committee;refusal, aSpendRefusal, says why,insufficientwith what the session may spend.relay-refused: the relayer refused it, with itscode, 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;mergesCompletedstay merged, so a retry needs fewer, andcausesays 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
openNimbusSession reads the secret first, asks the wallet to sign only when it is absent, and
writes what the signature yields. Call wipeSignatureSecret when the user signs out; it does not
close a session already open.
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,syncsaying 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: falsewas 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;holdingssays what was read. Nothing was sent.declined: the wallet declined to sign; nothing was sent.submitted: the refund was sent;submissionsays where it ended up, and onlylandedreturned the value. Afailed,expiredorrefusedrefund 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
Opening a session asks only for signMessage, and only when the signature secret store holds
no secret; registering and depositing ask for signTransaction. A wallet that cannot sign a
version 1 transaction can still sign messages; the flows' version 0 route is for it.
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