An ERC-681 + EMV stack on Base. Deploy a vault, authorize a terminal, attach a hook. Every payment fires IVaultHook.onFundsReceived on-chain, in real time.
// 1. install: npm i @opk/sdk import { OPK } from "@opk/sdk"; const opk = new OPK({ network: "base-mainnet", vault: "0x449B…Ae65", }); // 2. create an invoice const invoice = await opk.createInvoice({ amount: "12.50", token: "AUDD", }); // 3. customer taps or scans await invoice.waitForSettlement(); console.log(invoice.tx);
Payments flow from the customer wallet through a deterministic SessionReceiver into the merchant's ClearingVault. Hooks fire inside the same transaction.
Deploy a ClearingVault per merchant. Salt-derived addresses; same vault on every chain.
One-time receiver per invoice. Forwards into the vault and fires onFundsReceived.
Issuer, integrator, merchant, agent hooks. Per-vault, ordered, gas-bounded.
Reward NFTs, cross-merchant loyalty, agent-based commerce, on-chain accounting. Open the registry. Ship in a transaction.