@openpond/wallet
v0.1.1
Published
Viem-first wallet clients for policy-bound OpenPond signing leases
Maintainers
Readme
@openpond/wallet
Viem-first wallet clients for agents using policy-bound OpenPond signing leases.
The package gives application code familiar EVM primitives without placing a private key, Turnkey API key, or reusable signing credential in the runtime. Viem prepares and encodes transaction intents; an OpenPond-compatible lease broker authenticates the runtime, enforces policy, and dispatches signing to the configured wallet provider.
Install
npm install @openpond/wallet viemOpenPond sandbox
import { createOpenPondWalletFromEnv } from "@openpond/wallet/node";
import { erc20Abi, parseUnits } from "@openpond/wallet";
import { base } from "viem/chains";
const wallet = createOpenPondWalletFromEnv({
address: "0x...",
chain: base,
});
const submission = await wallet.writeContract({
address: "0x...",
abi: erc20Abi,
functionName: "transfer",
args: ["0x...", parseUnits("10", 6)],
});
console.log(submission.requestId);The Node entrypoint discovers the sandbox's lease proxy URL, short-lived proxy token, team ID, and sandbox ID. It never reads or accepts a Turnkey private credential.
Core API
Use createOpenPondWallet in browsers, workers, tests, and other runtimes where configuration is supplied explicitly.
import { createOpenPondWallet } from "@openpond/wallet";
const wallet = createOpenPondWallet({
address,
chain,
transport,
lease: {
proxyUrl,
proxyToken,
teamId,
sandboxId,
},
});The context exposes a normal viem public client plus sendTransaction, transfer, and ABI-typed writeContract helpers. Submissions return an honest broker request ID and an optional transaction hash. A Turnkey activity/status ID is never mislabeled as an on-chain hash.
Security model
- No private-key or Turnkey-credential configuration is supported.
- Every write goes through one lease capability request.
- The broker remains responsible for capability, wallet, chain, destination, function, value, expiry, run, and sandbox enforcement.
- The package is not a policy engine and cannot broaden a lease.
License
MIT
