Skip to main content
token means the underlying ERC-20. Pass amount as a decimal string or bigint base units; numbers are unsupported.

Shield / deposit

Steps: creatingapprovingwrapping, skipping completed setup. Each transaction is independent: approval/deployment persists if wrapping is declined. Approval targets the cToken.
approve() requires a positive amount; it cannot revoke with zero. Pre-approval may use a predicted wrapper address before deployment.

Send confidential tokens

Requires a nonzero recipient and registered wrapper. Encryption binds to the sender/cToken; ETH covers networkFee() plus gas. Confirmation alone does not prove the recipient’s decrypted balance.

Unshield / withdraw

Withdraws to the current owner. If incoming transfers invalidate the checkpoint, let the user retry from fresh state.

Confirmation semantics

Final writes wait for configured confirmations and return the mined hash, including fee-only replacements. Errors: TX_CANCELLED for cancellation, TX_REPLACED for a different operation, TX_REVERTED for reverts. Wallet/RPC causes can propagate.