agentwallet-sdk 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -283,6 +283,65 @@ Server verifies payment → returns 200 + data
|
|
|
283
283
|
|
|
284
284
|
Your agent's keys never leave the non-custodial wallet. All payments respect on-chain spend limits set by the wallet owner.
|
|
285
285
|
|
|
286
|
+
## Why Non-Custodial Beats Exchange Wallets
|
|
287
|
+
|
|
288
|
+
OKX OnchainOS supports 60+ chains. Coinbase Agentic Wallets are backed by a trillion-dollar exchange. Both look impressive on paper. Here's the problem: **they hold your agent's keys.**
|
|
289
|
+
|
|
290
|
+
That's not a minor implementation detail. It's the entire trust model.
|
|
291
|
+
|
|
292
|
+
### What custody actually means
|
|
293
|
+
|
|
294
|
+
When you use an exchange-based agent wallet, your agent's private key lives on their servers. Every transaction your agent signs goes through their infrastructure. They can:
|
|
295
|
+
- Freeze your agent's wallet for any reason (KYC, compliance, a bad week)
|
|
296
|
+
- Be subpoenaed for your agent's transaction history
|
|
297
|
+
- Get hacked — and your agent's keys go with it
|
|
298
|
+
- Change their API, deprecate their SDK, sunset the product
|
|
299
|
+
|
|
300
|
+
This isn't theoretical. Exchange platforms shut down products, freeze accounts, and go dark. It's happened before. It'll happen again.
|
|
301
|
+
|
|
302
|
+
### The non-custodial difference
|
|
303
|
+
|
|
304
|
+
With `agentwallet-sdk`:
|
|
305
|
+
- Your agent's private key is generated locally and **never transmitted anywhere**
|
|
306
|
+
- The wallet contract lives on-chain — no server to shut down
|
|
307
|
+
- Spend limits are enforced by EVM bytecode, not an API policy
|
|
308
|
+
- You can self-host, self-audit, and self-custody everything
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
// Your keys stay in your environment
|
|
312
|
+
const wallet = createWallet({
|
|
313
|
+
accountAddress: '0xYOUR_CONTRACT',
|
|
314
|
+
walletClient: createWalletClient({
|
|
315
|
+
account: privateKeyToAccount(process.env.AGENT_KEY), // lives here, not on OKX
|
|
316
|
+
transport: http('https://mainnet.base.org'),
|
|
317
|
+
}),
|
|
318
|
+
chain: 'base',
|
|
319
|
+
});
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
The spend limits (`$25/tx`, `$500/day`) are enforced by the contract itself — not by an exchange API that can change its terms. An agent running over-limit? The contract queues it. No custodian involved.
|
|
323
|
+
|
|
324
|
+
### When exchange wallets make sense
|
|
325
|
+
|
|
326
|
+
If you're building a quick demo, need zero infrastructure setup, or are already deep in the Coinbase or OKX ecosystem — their hosted products are fast to integrate. No judgment.
|
|
327
|
+
|
|
328
|
+
But if you're building production agents that handle real funds, run autonomously, or need to survive beyond a single platform's product lifecycle, you want the keys under your own control.
|
|
329
|
+
|
|
330
|
+
That's what this SDK is for.
|
|
331
|
+
|
|
332
|
+
### x402 without custody
|
|
333
|
+
|
|
334
|
+
The x402 protocol is becoming the standard for AI agent payments. Stripe validated it in February 2026. Coinbase built it into Base. Abstract launched their delegated facilitator model this week.
|
|
335
|
+
|
|
336
|
+
Every x402 implementation in `agentwallet-sdk` is non-custodial by design:
|
|
337
|
+
- Solana x402: direct signing from your local keypair
|
|
338
|
+
- Base x402: USDC transfer via your on-chain contract
|
|
339
|
+
- Abstract x402: EIP-712 delegated permit, signed locally — the facilitator executes it, but your key authorizes it
|
|
340
|
+
|
|
341
|
+
OKX OnchainOS supports x402 too — through their custody layer. Your call which model you trust.
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
286
345
|
## How It Works
|
|
287
346
|
|
|
288
347
|
1. **Deploy** an AgentAccountV2 (ERC-6551 token-bound account tied to an NFT)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentwallet-sdk",
|
|
3
|
-
"version": "3.4.
|
|
4
|
-
"description": "Non-custodial TypeScript SDK for AI agent wallets
|
|
3
|
+
"version": "3.4.1",
|
|
4
|
+
"description": "Non-custodial TypeScript SDK for AI agent wallets — x402 payments (Solana, Base, Abstract, Polygon), CCTP cross-chain, token swaps. Private keys never leave your environment.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|