Claimable Transfers (Gifts)
Send shielded funds to an Ethereum wallet address that has not registered with Privacy Boost yet. The recipient claims by proving ownership of that address; you reclaim the funds if they never do. See Claimable Transfers for the concept and trust model.Sending a gift
The most common case: you know the recipient’s wallet address but they have not joined Privacy Boost. UsegiftFundToWallet.
giftFund) so the gift ciphertext is sealed to their viewing key for the
smoothest discovery:
Funding parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenAddress | string | Yes | Token contract address |
amount | string | Yes | Amount in wei (smallest unit) |
recipient | string | giftFund only | Recipient’s 194-char privacy address (the ciphertext’s ECDH target) |
recipientWallet | string | Yes | Recipient’s Ethereum address the gift binds to (may be unregistered) |
refundAfterBlock | number | Yes | Block height after which you may reclaim an unclaimed gift |
currentBlock | number | Yes | Current chain head; pre-validates the refund delay before submitting |
Funding result
giftFund / giftFundToWallet return a TransferResult extended with two gift
fields:
Sharing the claim link
result.claimLink is a pbgift:v1:... string that carries the encrypted opening
the recipient needs. Share it out of band (message, QR code). Treat it like a
password — it reveals the gift’s amount and recipient to anyone who reads it.
Claiming a gift
The recipient registers Privacy Boost with the same wallet address, then claims. List the pending gifts addressed to the authenticated wallet:cGift (the list can shift as gifts settle):
acknowledgeUnknownSender must be true to claim. The hidden-sender model
cannot reveal who funded a gift, so the recipient explicitly acknowledges
accepting funds from an unknown sender. Surface this as a consent prompt.Refunding an unclaimed gift
A claim and a refund spend the same nullifier, so only one can ever settle. After the refund deadline passes, reclaim an unclaimed gift using the local record you saved at funding time.Gift records are what make a gift refundable. They are included in an
exported session, so persisting and restoring
the session keeps your unclaimed gifts refundable across restarts. If you ever
lose the record, you can still refund by supplying every field manually via
giftRefund({ recipientWallet, blind, refundAfterBlock, tokenId, amount, treeNumber, leafIndex }).Previewing a claim link offline
Decode and decrypt a claim link into a preview without any network call — useful to show the recipient what they are about to accept:Types
A third funding mode,
giftFundSecretBearer, binds a gift to a secret instead
of a wallet so it can be claimed before the recipient has any wallet. It is
experimental, disabled by default, and a bearer instrument (whoever holds
the link can claim). See the concept page
before considering it.