Protocol v1.4.1 · audit-ready · open source

An open settlement layer.
Built for hooks.

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.

SDK playground

Pick a language. Settle a payment.

sdk-quickstart.ts
// 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);
Invoice 0xINV…2451 created Listening for SessionReceiver… Payment received: 12.50 AUDD Hooks: 3 ran in 0.34s ✓ Settled in tx 0x8f2…d301 (2.1s)
Architecture

Terminal-native. Server-optional.

Payments flow from the customer wallet through a deterministic SessionReceiver into the merchant's ClearingVault. Hooks fire inside the same transaction.

Customer wallet

Daimo · Coinbase · MetaMask · OPK Pay
ERC-681 / EMV

SessionReceiver

deterministic addr · no server
onFundsReceived

ClearingVault

hooks · fees · payout
Contracts on Base mainnet

Open. Audited. On-chain.

0x449B…Ae65

VaultFactory

Deploy a ClearingVault per merchant. Salt-derived addresses; same vault on every chain.

0x77F1…4C2B

SessionReceiver

One-time receiver per invoice. Forwards into the vault and fires onFundsReceived.

0x5423…0153

HookRegistry

Issuer, integrator, merchant, agent hooks. Per-vault, ordered, gas-bounded.

SDKs

Drop into any stack.

TypeScript / JS
@opk/sdk
v1.4.1 · npm
Python
opk-sdk
v1.4.1 · pypi
Go
go.opk.sh/sdk
v1.4.1
Solidity
@opk/contracts
v1.4.1 · audited
Kotlin / Android
sh.opk:terminal
v1.4.1
Swift / iOS
OPKKit
beta
REST / x402
api.opkproto.com
stable
opk CLI
brew install opk
v1.4.1

Build the next hook.

Reward NFTs, cross-merchant loyalty, agent-based commerce, on-chain accounting. Open the registry. Ship in a transaction.