Programmatic access to Furlpay's on-chain account layer: deploy Safe smart accounts from passkey (WebAuthn) signers, configure gas-sponsoring Paymasters, and manage time-locked pre-authorization escrow holds — the primitive that makes hotel and fuel pre-auths work on self-custodial cards.
- ERC-4337 account abstraction with passkey owners (no seed phrases).
- Paymaster configuration: sponsor gas outright or bill it in USDC.
- Time-locked escrow holds that lock the exact pre-auth amount instead of freezing the whole account, and auto-release if unclaimed.
- Zero runtime dependencies. Node 18+. TypeScript types included.
npm install @furlpay/account-kitimport { AccountKit } from "@furlpay/account-kit";
const kit = new AccountKit({ chain: "base" });
// 1. Deploy a Safe owned by a passkey
const safe = await kit.deploySafe(
[{ credentialId: "...", publicKey: "..." }], // WebAuthn signer(s)
1 // threshold
);
// 2. Sponsor its gas in USDC
await kit.configurePaymaster(safe.address, { mode: "erc20", feeToken: "USDC" });
// 3. Place a pre-authorization hold (for example a hotel deposit)
const hold = await kit.escrow.create(safe.address, "0xMerchant", 150);| Option | Type | Default | Description |
|---|---|---|---|
chain |
"ethereum" | "polygon" | "base" | "arbitrum" | "gnosis" |
"base" |
Target network. |
mock |
boolean |
auto | Run without RPC credentials (deterministic responses) — the default until keys are configured. |
Deploys an ERC-4337 Safe smart account owned by the given passkey signers. Returns a SafeAccount with the deployed address, owners, threshold, and enabled modules.
Attaches a Paymaster policy to the account. config.mode is "sponsor" (platform pays gas) or "erc20" (gas billed in config.feeToken, for example USDC), so users never need the native token.
Time-locked pre-authorization holds:
| Method | Description |
|---|---|
escrow.create(safe, merchant, amount) |
Lock amount for merchant; returns an EscrowHold (status held, expiry timestamp). |
escrow.capture(hold, finalAmount) |
Merchant captures up to the held amount; the remainder returns to the Safe. |
escrow.release(hold) |
Release the full hold back to the Safe. Unclaimed holds auto-release at expiry. |
PasskeySigner, SafeAccount, PaymasterConfig, EscrowHold, AccountKitOptions, and Chain are exported for downstream typing.
Without RPC credentials the kit runs in deterministic mock mode — the full API surface works offline with realistic shapes, which is what the Furlpay sandbox uses. Live deployments inject their RPC/bundler configuration; the interface is identical.
- furlpay-node — the Furlpay API SDK
- furlpay-x402 — agentic pay-per-call payments
- Documentation
See CONTRIBUTING.md. Report vulnerabilities privately per SECURITY.md.
MIT