pay-lobster 2.0.0 → 3.0.0
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 +19 -1
- package/dist/abis/IERC20.json +185 -0
- package/dist/abis/PayLobsterCredit.json +952 -0
- package/dist/abis/PayLobsterEscrowV3.json +1069 -0
- package/dist/abis/PayLobsterIdentity.json +1001 -0
- package/dist/abis/PayLobsterReputation.json +707 -0
- package/dist/agent.d.ts +24 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +44 -0
- package/dist/agent.js.map +1 -1
- package/dist/cli.js +65 -0
- package/dist/cli.js.map +1 -1
- package/dist/contracts-v3.d.ts +260 -0
- package/dist/contracts-v3.d.ts.map +1 -0
- package/dist/contracts-v3.js +371 -0
- package/dist/contracts-v3.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/onramp.d.ts +123 -0
- package/dist/onramp.d.ts.map +1 -0
- package/dist/onramp.js +204 -0
- package/dist/onramp.js.map +1 -0
- package/lib/abis/IERC20.json +185 -0
- package/lib/abis/PayLobsterCredit.json +952 -0
- package/lib/abis/PayLobsterEscrowV3.json +1069 -0
- package/lib/abis/PayLobsterIdentity.json +1001 -0
- package/lib/abis/PayLobsterReputation.json +707 -0
- package/lib/agent.ts +54 -0
- package/lib/cli.ts +73 -0
- package/lib/contracts-v3.ts +511 -0
- package/lib/index.ts +23 -0
- package/lib/onramp.ts +298 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,8 +7,9 @@ The Stripe for autonomous entities. Send, receive, escrow, and build reputation
|
|
|
7
7
|
[](https://www.npmjs.com/package/pay-lobster)
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
|
|
10
|
-
## ✨ What's New in v2.
|
|
10
|
+
## ✨ What's New in v2.1
|
|
11
11
|
|
|
12
|
+
- **Card Payments**: Fund wallets with debit/credit cards via Coinbase Onramp
|
|
12
13
|
- **Multi-chain**: Base (Ethereum L2) + Solana support
|
|
13
14
|
- **x402 Protocol**: Automatic HTTP payment handling
|
|
14
15
|
- **Chain selection**: Choose which chain per transaction
|
|
@@ -95,6 +96,13 @@ const data = await response.json();
|
|
|
95
96
|
- ✅ Trust scores & ratings
|
|
96
97
|
- ✅ Agent discovery
|
|
97
98
|
|
|
99
|
+
### Card Payments (Coinbase Onramp)
|
|
100
|
+
- ✅ Debit/credit cards
|
|
101
|
+
- ✅ Apple Pay (US)
|
|
102
|
+
- ✅ Bank transfers
|
|
103
|
+
- ✅ Coinbase balance
|
|
104
|
+
- ✅ ~1.5% fees (lowest in industry)
|
|
105
|
+
|
|
98
106
|
### Advanced
|
|
99
107
|
- ✅ Subscriptions (recurring payments)
|
|
100
108
|
- ✅ Invoices (payment requests)
|
|
@@ -135,6 +143,16 @@ console.log(`Earned $${balance} USDC from tips!`);
|
|
|
135
143
|
await agent.send('@compute-agent', 5);
|
|
136
144
|
```
|
|
137
145
|
|
|
146
|
+
### Card Payments (Coinbase Onramp)
|
|
147
|
+
```typescript
|
|
148
|
+
// Generate URL for user to fund with card
|
|
149
|
+
const { url } = await agent.fundWithCard(100); // $100 USD
|
|
150
|
+
console.log('Click to add funds:', url);
|
|
151
|
+
|
|
152
|
+
// Or use CLI
|
|
153
|
+
// paylobster fund 100
|
|
154
|
+
```
|
|
155
|
+
|
|
138
156
|
### Trustless Escrow
|
|
139
157
|
```typescript
|
|
140
158
|
// Create escrow for freelance work
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "allowance",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "owner",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "spender",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "address"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"outputs": [
|
|
18
|
+
{
|
|
19
|
+
"name": "",
|
|
20
|
+
"type": "uint256",
|
|
21
|
+
"internalType": "uint256"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"stateMutability": "view"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "function",
|
|
28
|
+
"name": "approve",
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "spender",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"internalType": "address"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "value",
|
|
37
|
+
"type": "uint256",
|
|
38
|
+
"internalType": "uint256"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"outputs": [
|
|
42
|
+
{
|
|
43
|
+
"name": "",
|
|
44
|
+
"type": "bool",
|
|
45
|
+
"internalType": "bool"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"stateMutability": "nonpayable"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "function",
|
|
52
|
+
"name": "balanceOf",
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"name": "account",
|
|
56
|
+
"type": "address",
|
|
57
|
+
"internalType": "address"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"outputs": [
|
|
61
|
+
{
|
|
62
|
+
"name": "",
|
|
63
|
+
"type": "uint256",
|
|
64
|
+
"internalType": "uint256"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"stateMutability": "view"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "function",
|
|
71
|
+
"name": "totalSupply",
|
|
72
|
+
"inputs": [],
|
|
73
|
+
"outputs": [
|
|
74
|
+
{
|
|
75
|
+
"name": "",
|
|
76
|
+
"type": "uint256",
|
|
77
|
+
"internalType": "uint256"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"stateMutability": "view"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "function",
|
|
84
|
+
"name": "transfer",
|
|
85
|
+
"inputs": [
|
|
86
|
+
{
|
|
87
|
+
"name": "to",
|
|
88
|
+
"type": "address",
|
|
89
|
+
"internalType": "address"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "value",
|
|
93
|
+
"type": "uint256",
|
|
94
|
+
"internalType": "uint256"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"outputs": [
|
|
98
|
+
{
|
|
99
|
+
"name": "",
|
|
100
|
+
"type": "bool",
|
|
101
|
+
"internalType": "bool"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"stateMutability": "nonpayable"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "function",
|
|
108
|
+
"name": "transferFrom",
|
|
109
|
+
"inputs": [
|
|
110
|
+
{
|
|
111
|
+
"name": "from",
|
|
112
|
+
"type": "address",
|
|
113
|
+
"internalType": "address"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "to",
|
|
117
|
+
"type": "address",
|
|
118
|
+
"internalType": "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "value",
|
|
122
|
+
"type": "uint256",
|
|
123
|
+
"internalType": "uint256"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"outputs": [
|
|
127
|
+
{
|
|
128
|
+
"name": "",
|
|
129
|
+
"type": "bool",
|
|
130
|
+
"internalType": "bool"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"stateMutability": "nonpayable"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "event",
|
|
137
|
+
"name": "Approval",
|
|
138
|
+
"inputs": [
|
|
139
|
+
{
|
|
140
|
+
"name": "owner",
|
|
141
|
+
"type": "address",
|
|
142
|
+
"indexed": true,
|
|
143
|
+
"internalType": "address"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "spender",
|
|
147
|
+
"type": "address",
|
|
148
|
+
"indexed": true,
|
|
149
|
+
"internalType": "address"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "value",
|
|
153
|
+
"type": "uint256",
|
|
154
|
+
"indexed": false,
|
|
155
|
+
"internalType": "uint256"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"anonymous": false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "event",
|
|
162
|
+
"name": "Transfer",
|
|
163
|
+
"inputs": [
|
|
164
|
+
{
|
|
165
|
+
"name": "from",
|
|
166
|
+
"type": "address",
|
|
167
|
+
"indexed": true,
|
|
168
|
+
"internalType": "address"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "to",
|
|
172
|
+
"type": "address",
|
|
173
|
+
"indexed": true,
|
|
174
|
+
"internalType": "address"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "value",
|
|
178
|
+
"type": "uint256",
|
|
179
|
+
"indexed": false,
|
|
180
|
+
"internalType": "uint256"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"anonymous": false
|
|
184
|
+
}
|
|
185
|
+
]
|