vault({ vaultId }) waits for the wallet, has it sign the owner’s approval for
that vault through the Endstate wallet frame, and opens the request with the
active tap session (POST /v1/units/{unit_id}/vault-requests). Pass the id
useCanVault returned: the SDK never
picks a vault for the owner, and Endstate refuses one the brand does not allow.
Example
Returns
(args: { vaultId: string }) => Promise<VaultRequest>
Resolves with the request,
pending until the vault confirms it has the item,
once useCanVault names it as
requestId. Throws when there is no active tap session."idle" | "pending" | "success" | "error"
The outcome of the latest call for the current tap, wallet and sign-in. A new
tap, another wallet, a sign-out or a sign-in returns it to
"idle".VaultRequest | null
The request the latest call opened. Its
id is what
useCancelVault takes.Error | null
The failure, such as
vault.not_permitted, vault.in_progress or a
wallet.* code from the wallet.() => void
Returns the hook to
"idle"; a call still in flight no longer lands.
