@shroud-fi/payments
v0.1.3
Published
Sender-side stealth payment construction for ShroudFi. ETH + ERC-20 unlinkable payments on Base via EIP-5564 announcements.
Maintainers
Readme
@shroud-fi/payments
Sender-side stealth payment construction for ShroudFi. ETH + ERC-20 on Base.
npm i @shroud-fi/payments viemWhat it does
@shroud-fi/payments is the sender side of a ShroudFi payment. For each transfer it:
- Derives a fresh one-time stealth address from the recipient's
(spendPub, scanPub)meta-address. - Computes the EIP-5564 announcement and broadcasts it on-chain.
- Sends ETH or ERC-20 to that one-time address.
- Resolves recipient meta-addresses from a plain EVM wallet via the on-chain ERC-6538 registry.
The graph of who-pays-whom never reaches the public ledger — every payment lands at an unlinkable destination only the recipient can spend from.
Quick start
import { sendETHPayment, lookupMetaAddress } from '@shroud-fi/payments';
import { createTransport } from '@shroud-fi/transport';
const transport = createTransport({ chain: 'base', rpcUrl });
const meta = await lookupMetaAddress(transport, '0xRecipientWallet');
await sendETHPayment({
transport,
walletClient,
recipientMeta: meta.metaAddressEncoded,
amountWei: 10_000_000_000_000n, // 0.00001 ETH
});Exports
| Symbol | Purpose |
|---|---|
| sendETHPayment(args) | Derive stealth, announce, transfer ETH — one call. |
| sendERC20Payment(args) | Same shape for ERC-20. USDC on Base mainnet is the v1 target. |
| sweepETH · sweepERC20 | Direct sweep from stealth address to destination. Fee-free, no relayer. |
| lookupMetaAddress(transport, wallet) | Resolve a wallet's registered meta-address via ERC-6538. |
| RecipientNotOnboardedError | Thrown when a wallet has no published meta-address. Structured .wallet field for privacy-safe UX. |
Full API reference: shroudfi.live/sdk#payments
Threat model notes
- Amounts are visible. v1 ShroudFi provides recipient unlinkability, not amount privacy. Amount-fingerprinting is an active mitigation surface.
- Address rotation is mandatory. Sweeping detected payments back to a long-lived wallet collapses the privacy property — use one-shot destinations or batched sweeps.
License
MIT — see LICENSE.
Part of the ShroudFi privacy SDK for AI agents on Base.
