cancelUnvault({ requestId }) waits for the wallet and sends the owner’s
cancel of a waiting unvault from it, with the cost covered by Endstate. It
resolves once the network included the send, and the item stays vaulted. It
needs no tap session, only a wallet that holds the item now.
The owner can cancel while the unvault waits, including while it is on hold.
Once the item is ready to ship the call rejects with
submission.not_executable, and error.details.cancellable_at is the time a
cancel opens again if the vault has not dispatched the item: 7 days after the
waiting period ended. It is present only while the item is ready to ship and
not dispatched.
Example
Outcome
The hook holds the outcome of its latest call, anddata.resourceId names the
vault request that outcome is for. On a page that shows several vaulted items,
render one component per item with key={requestId}, so each item has its own
outcome.
The outcome belongs to the wallet that sent it and to the sign-in. Another
wallet, a sign-out, a sign-in or reset() returns the hook to "idle". A new
tap does not, because an unvault takes no tap.
Returns
(args: { requestId: string }) => Promise<WalletSubmission>
Resolves with
{ transactionHash, address, resourceId }. Rejects with
submission.not_executable when no unvault is waiting or the item is ready
to ship, and with auth.forbidden when this wallet does not hold the item."idle" | "pending" | "success" | "error"
The outcome of the latest call for the current wallet and sign-in.
WalletSubmission | null
The latest cancel the wallet sent.
data.resourceId is the vault request
it was sent for.Error | null
The failure that moved
status to "error". A refusal is an
EndstateWalletError with
the API’s code and details.() => void
Returns the hook to
"idle".
