Skip to main content

Setup

privacy

Adds oms.privacy to an OMSWallet:

PrivacyOptions

Options for privacy().

PrivacyActions.networks

Networks with private balances.

Balances

PrivacyActions.getBalances

Private balances of the active wallet with a non-zero amount.

GetPrivateBalancesParams

PrivateBalance

A token in a private balance. The native token is 0x0000000000000000000000000000000000000000.

Quotes

PrivacyActions.quoteShield

Quotes moving tokens from the wallet into its private balance; shield runs it.

PrivacyActions.quoteUnshield

Quotes moving tokens from the private balance to an address; unshield runs it.

PrivacyActions.quotePrivateSend

Quotes sending tokens from the wallet to an address without an on-chain link between the two; privateSend runs it.

QuoteShieldParams

QuoteUnshieldParams

QuotePrivateSendParams

PrivacyQuote

The terms of one shield, unshield or private send for the active wallet. Pass it to the matching call before expiresAt; each quote can be used once. Quotes are frozen and only come from the quote* calls.

PrivacyQuoteKind

Shield and private send

PrivacyActions.shield

PrivacyActions.privateSend

DepositOptions

PrivateSendOptions

DeliveryPollingOptions

PrivacyProgressEvent

PrivacyTransactionStep

A wallet transaction step. Steps that are not needed are skipped.

PrivacyTransaction

NetworkFee

A network fee paid for one wallet transaction.

ShieldResult

PrivateSendResult

Unshield, delivery and recovery

PrivacyActions.unshield

Sends no wallet transaction: the privacy service submits the withdrawal.

UnshieldResult

PrivacyActions.getDeliveryStatus

GetDeliveryStatusParams

DeliveryStatus

PrivacyActions.recover

Pays all recoverable funds of a token back to the active wallet.

RecoverParams

RecoverResult

Errors

OMSWalletPrivacyError

An error from oms.privacy. txnIds lists every wallet transaction the operation had created when it failed, so for shield and privateSend an app can tell “no wallet transaction was sent” (empty) from “a deposit may have been sent” and reconcile with wallet.getTransactionStatus and oms.privacy.getBalances. unshield and recover send no wallet transaction, so their txnIds is always empty; the message says whether the withdrawal may have been submitted. cause is only set to an OMSWalletError from the wallet.

isOMSWalletPrivacyError

OMSWalletPrivacyErrorCode

OMSWalletPrivacyErrorParams

OMSWalletPrivacyStage

Which part of an operation had run when it failed.