@paysponge/sdk 0.1.5 → 0.1.6

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 ADDED
@@ -0,0 +1,138 @@
1
+ # SpongeWallet SDK
2
+
3
+ SDK for creating and managing wallets for AI agents with Claude Agent SDK integration.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @paysponge/sdk
9
+ # or
10
+ bun add @paysponge/sdk
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```typescript
16
+ import { SpongeWallet } from "@paysponge/sdk";
17
+
18
+ // Connect (handles auth automatically via browser)
19
+ const wallet = await SpongeWallet.connect();
20
+
21
+ // Get addresses
22
+ const addresses = await wallet.getAddresses();
23
+ console.log(addresses.base); // 0x...
24
+ console.log(addresses.solana); // 5x...
25
+
26
+ // Check balances
27
+ const balances = await wallet.getBalances();
28
+
29
+ // Transfer tokens
30
+ await wallet.transfer({
31
+ chain: "base",
32
+ to: "0x...",
33
+ amount: "10",
34
+ currency: "USDC",
35
+ });
36
+ ```
37
+
38
+ ## Authentication
39
+
40
+ ### Device Flow (Browser)
41
+
42
+ On first run, `connect()` opens your browser for login. After approval, credentials are cached at `~/.spongewallet/credentials.json`.
43
+
44
+ ### API Key
45
+
46
+ ```typescript
47
+ const wallet = await SpongeWallet.connect({
48
+ apiKey: "sponge_test_...",
49
+ });
50
+ ```
51
+
52
+ Or via environment variable:
53
+
54
+ ```bash
55
+ SPONGE_API_KEY=sponge_test_xxx node my-bot.js
56
+ ```
57
+
58
+ ### Master Keys (Programmatic Agent Creation)
59
+
60
+ ```typescript
61
+ import { SpongeAdmin } from "@paysponge/sdk";
62
+
63
+ const admin = new SpongeAdmin({ apiKey: "sponge_master_..." });
64
+
65
+ // Create agents programmatically
66
+ const { agent, apiKey } = await admin.createAgent({ name: "bot-1" });
67
+
68
+ // Connect to the agent's wallet
69
+ const wallet = await SpongeWallet.connect({ apiKey });
70
+ ```
71
+
72
+ ## Claude Agent SDK Integration
73
+
74
+ ```typescript
75
+ import { query } from "@anthropic-ai/claude-agent-sdk";
76
+ import { SpongeWallet } from "@paysponge/sdk";
77
+
78
+ const wallet = await SpongeWallet.connect();
79
+
80
+ for await (const msg of query({
81
+ prompt: "Check my wallet balance and transfer 5 USDC to 0x...",
82
+ options: {
83
+ mcpServers: {
84
+ wallet: wallet.mcp(),
85
+ },
86
+ },
87
+ })) {
88
+ console.log(msg);
89
+ }
90
+ ```
91
+
92
+ ## Supported Chains
93
+
94
+ - **EVM**: Ethereum, Base, Sepolia, Base Sepolia, Tempo
95
+ - **Solana**: Mainnet, Devnet
96
+
97
+ ## Features
98
+
99
+ - Multi-chain wallet management (EVM + Solana)
100
+ - Token transfers and swaps (Jupiter on Solana)
101
+ - MCP server for Claude Agent SDK
102
+ - Anthropic SDK tool definitions
103
+ - Spending limits and allowlists
104
+ - x402 payment protocol support
105
+
106
+ ## Documentation
107
+
108
+ - [Getting Started](./docs/getting-started.md)
109
+ - [Authentication](./docs/authentication.md)
110
+ - [Wallets & Transfers](./docs/wallets-and-transfers.md)
111
+ - [Claude Integration](./docs/claude-integration.md)
112
+ - [Master Keys](./docs/master-keys.md)
113
+ - [API Reference](./docs/api-reference.md)
114
+
115
+ ## CLI
116
+
117
+ ```bash
118
+ # Login via browser
119
+ npx spongewallet login
120
+
121
+ # Check current session
122
+ npx spongewallet whoami
123
+
124
+ # Logout
125
+ npx spongewallet logout
126
+ ```
127
+
128
+ ## Environment Variables
129
+
130
+ | Variable | Description |
131
+ |----------|-------------|
132
+ | `SPONGE_API_KEY` | Agent API key (skips device flow) |
133
+ | `SPONGE_MASTER_KEY` | Master key for programmatic agent creation |
134
+ | `SPONGE_API_URL` | Custom API URL |
135
+
136
+ ## License
137
+
138
+ MIT
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.1.5";
1
+ export declare const SDK_VERSION = "0.1.6";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const SDK_VERSION = "0.1.5";
1
+ export const SDK_VERSION = "0.1.6";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paysponge/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "SDK for spinning up wallets for AI agents with Claude Agent SDK integration",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,8 @@
15
15
  "spongewallet": "./dist/bin/cli.js"
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "README.md"
19
20
  ],
20
21
  "scripts": {
21
22
  "generate:types": "bunx openapi-typescript openapi.json -o src/types/generated.d.ts",
@@ -63,6 +64,6 @@
63
64
  "license": "MIT",
64
65
  "repository": {
65
66
  "type": "git",
66
- "url": "https://github.com/spongewallet/sdk"
67
+ "url": "https://github.com/paysponge/spongewallet-sdk"
67
68
  }
68
69
  }