run402 2.49.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 +3 -3
- package/cli.mjs +1 -1
- package/lib/contracts.mjs +74 -74
- package/package.json +1 -1
- package/sdk/dist/namespaces/contracts.d.ts +38 -38
- package/sdk/dist/namespaces/contracts.d.ts.map +1 -1
- package/sdk/dist/namespaces/contracts.js +44 -44
- package/sdk/dist/namespaces/contracts.js.map +1 -1
- package/sdk/dist/namespaces/transfers.d.ts +3 -3
- package/sdk/dist/namespaces/transfers.d.ts.map +1 -1
- package/sdk/dist/scoped.d.ts +8 -8
- package/sdk/dist/scoped.js +14 -14
package/README.md
CHANGED
|
@@ -175,11 +175,11 @@ run402 image generate "a serif logo" --aspect square --output logo.png
|
|
|
175
175
|
|
|
176
176
|
$0.03 per image via x402.
|
|
177
177
|
|
|
178
|
-
### On-chain (KMS
|
|
178
|
+
### On-chain (KMS signers)
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
run402 contracts provision-
|
|
182
|
-
run402 contracts call
|
|
181
|
+
run402 contracts provision-signer --chain base-mainnet
|
|
182
|
+
run402 contracts call <project_id> <signer_id> --to 0x… --abi @abi.json --fn transfer --args '["0x…","1000000"]'
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
Private keys never leave AWS KMS. $0.04/day rental + $0.000005/call.
|
package/cli.mjs
CHANGED
|
@@ -48,7 +48,7 @@ Commands:
|
|
|
48
48
|
auth Manage project user authentication (magic link, passwords, settings)
|
|
49
49
|
sender-domain Manage custom email sender domain (register, status, remove)
|
|
50
50
|
billing Email organizations, Stripe tier checkout, email packs
|
|
51
|
-
contracts KMS
|
|
51
|
+
contracts KMS signers ($0.04/day rental + $0.000005/sign)
|
|
52
52
|
agent Manage agent identity (contact info)
|
|
53
53
|
operator Operator (human/email) session — login, then overview across your wallets
|
|
54
54
|
service Run402 service health and availability (status, health)
|
package/lib/contracts.mjs
CHANGED
|
@@ -9,49 +9,49 @@ import {
|
|
|
9
9
|
validateEvmAddress,
|
|
10
10
|
} from "./argparse.mjs";
|
|
11
11
|
|
|
12
|
-
const HELP = `run402 contracts — KMS-backed Ethereum
|
|
12
|
+
const HELP = `run402 contracts — KMS-backed Ethereum signers for smart-contract calls
|
|
13
13
|
|
|
14
|
-
Pricing: $0.04/day per
|
|
15
|
-
|
|
14
|
+
Pricing: $0.04/day per signer ($1.20/month) plus $0.000005 per contract call.
|
|
15
|
+
Signer creation requires $1.20 in cash credit (30 days of rent).
|
|
16
16
|
Non-custodial: see https://run402.com/humans/terms.html#non-custodial-kms-wallets
|
|
17
17
|
|
|
18
18
|
Usage:
|
|
19
19
|
run402 contracts <subcommand> [args...]
|
|
20
20
|
|
|
21
21
|
Subcommands:
|
|
22
|
-
provision-
|
|
23
|
-
Provision a KMS
|
|
24
|
-
get-
|
|
25
|
-
Get
|
|
26
|
-
list-
|
|
27
|
-
List all KMS
|
|
28
|
-
set-recovery <project_id> <
|
|
22
|
+
provision-signer <project_id> --chain <base-mainnet|base-sepolia> [--recovery 0x...]
|
|
23
|
+
Provision a KMS signer ($0.04/day, requires $1.20 prepay).
|
|
24
|
+
get-signer <project_id> <signer_id>
|
|
25
|
+
Get signer metadata + live native balance.
|
|
26
|
+
list-signers <project_id>
|
|
27
|
+
List all KMS signers for the project (includes deleted).
|
|
28
|
+
set-recovery <project_id> <signer_id> [--address 0x... | --clear]
|
|
29
29
|
Set/clear the optional recovery address.
|
|
30
|
-
set-alert <project_id> <
|
|
30
|
+
set-alert <project_id> <signer_id> --threshold-wei <n>
|
|
31
31
|
Set the low-balance alert threshold (in wei).
|
|
32
|
-
call <project_id> <
|
|
32
|
+
call <project_id> <signer_id> --to 0x... --abi <json> --fn <name> --args <json> [--value-wei <n>] [--idempotency-key <k>]
|
|
33
33
|
Submit a contract write call (chain gas + $0.000005 KMS sign fee).
|
|
34
|
-
deploy <project_id> <
|
|
34
|
+
deploy <project_id> <signer_id> --bytecode 0x... [--chain <base-mainnet|base-sepolia>] [--value-wei <n>] [--idempotency-key <k>]
|
|
35
35
|
Deploy a contract (chain gas + $0.000005 KMS sign fee). Returns deterministic CREATE address synchronously.
|
|
36
36
|
read --chain <chain> --to 0x... --abi <json> --fn <name> --args <json>
|
|
37
37
|
Read-only contract call (free).
|
|
38
38
|
status <project_id> <call_id>
|
|
39
39
|
Get call status, gas used, gas cost USD-micros, receipt.
|
|
40
|
-
drain <project_id> <
|
|
41
|
-
Drain native balance to a destination address. Works on suspended
|
|
42
|
-
delete <project_id> <
|
|
40
|
+
drain <project_id> <signer_id> --to 0x... --confirm
|
|
41
|
+
Drain native balance to a destination address. Works on suspended signers.
|
|
42
|
+
delete <project_id> <signer_id> --confirm
|
|
43
43
|
Schedule the KMS key for deletion (refused if balance >= dust).
|
|
44
44
|
|
|
45
45
|
Examples:
|
|
46
|
-
run402 contracts provision-
|
|
46
|
+
run402 contracts provision-signer proj_abc --chain base-mainnet
|
|
47
47
|
run402 contracts call proj_abc cwlt_xyz --to 0x1234... --abi '[{"type":"function","name":"ping","inputs":[],"outputs":[]}]' --fn ping --args '[]'
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
50
|
const SUB_HELP = {
|
|
51
|
-
"provision-
|
|
51
|
+
"provision-signer": `run402 contracts provision-signer — Provision a KMS-backed signer
|
|
52
52
|
|
|
53
53
|
Usage:
|
|
54
|
-
run402 contracts provision-
|
|
54
|
+
run402 contracts provision-signer <project_id> --chain <chain> [options]
|
|
55
55
|
|
|
56
56
|
Arguments:
|
|
57
57
|
<project_id> Target project ID
|
|
@@ -59,39 +59,39 @@ Arguments:
|
|
|
59
59
|
Options:
|
|
60
60
|
--chain <chain> Required: base-mainnet or base-sepolia
|
|
61
61
|
--recovery 0x... Optional recovery address (can be set later)
|
|
62
|
-
--yes Skip confirmation when project already has a
|
|
62
|
+
--yes Skip confirmation when project already has a signer
|
|
63
63
|
`,
|
|
64
|
-
"set-recovery": `run402 contracts set-recovery — Set or clear the
|
|
64
|
+
"set-recovery": `run402 contracts set-recovery — Set or clear the signer recovery address
|
|
65
65
|
|
|
66
66
|
Usage:
|
|
67
|
-
run402 contracts set-recovery <project_id> <
|
|
67
|
+
run402 contracts set-recovery <project_id> <signer_id> [options]
|
|
68
68
|
`,
|
|
69
69
|
"set-alert": `run402 contracts set-alert — Set the low-balance alert threshold
|
|
70
70
|
|
|
71
71
|
Usage:
|
|
72
|
-
run402 contracts set-alert <project_id> <
|
|
72
|
+
run402 contracts set-alert <project_id> <signer_id> --threshold-wei <n>
|
|
73
73
|
`,
|
|
74
74
|
call: `run402 contracts call — Submit a contract write call
|
|
75
75
|
|
|
76
76
|
Usage:
|
|
77
|
-
run402 contracts call <project_id> <
|
|
77
|
+
run402 contracts call <project_id> <signer_id> --to 0x... --abi <json>
|
|
78
78
|
--fn <name> --args <json> [options]
|
|
79
79
|
`,
|
|
80
|
-
deploy: `run402 contracts deploy — Deploy a smart contract from a KMS
|
|
80
|
+
deploy: `run402 contracts deploy — Deploy a smart contract from a KMS signer
|
|
81
81
|
|
|
82
82
|
KMS-signs a contract-creation transaction (to: null + data: bytecode) and broadcasts.
|
|
83
|
-
Returns the deterministic CREATE address synchronously — known from (
|
|
83
|
+
Returns the deterministic CREATE address synchronously — known from (signer, nonce)
|
|
84
84
|
before the tx confirms. Cost: chain gas at-cost + $0.000005 KMS sign fee.
|
|
85
85
|
|
|
86
86
|
Usage:
|
|
87
|
-
run402 contracts deploy <project_id> <
|
|
87
|
+
run402 contracts deploy <project_id> <signer_id> --bytecode 0x... [options]
|
|
88
88
|
|
|
89
89
|
Options:
|
|
90
90
|
--bytecode 0x... Full creation calldata as 0x-prefixed hex (creation
|
|
91
91
|
bytecode + ABI-encoded constructor args, concatenated
|
|
92
92
|
client-side via viem/ethers). Required. ≤ 128 KB.
|
|
93
93
|
--chain <chain> base-mainnet (default) or base-sepolia. Must match
|
|
94
|
-
the
|
|
94
|
+
the signer's chain.
|
|
95
95
|
--value-wei <n> Optional native-token value in wei to attach.
|
|
96
96
|
--idempotency-key <k> Optional. Same key + same bytecode returns the
|
|
97
97
|
existing call without re-broadcasting.
|
|
@@ -108,38 +108,38 @@ Usage:
|
|
|
108
108
|
drain: `run402 contracts drain — Drain native balance to a destination address
|
|
109
109
|
|
|
110
110
|
Usage:
|
|
111
|
-
run402 contracts drain <project_id> <
|
|
111
|
+
run402 contracts drain <project_id> <signer_id> --to 0x... --confirm
|
|
112
112
|
`,
|
|
113
113
|
delete: `run402 contracts delete — Schedule the KMS key for deletion
|
|
114
114
|
|
|
115
115
|
Usage:
|
|
116
|
-
run402 contracts delete <project_id> <
|
|
116
|
+
run402 contracts delete <project_id> <signer_id> --confirm
|
|
117
117
|
`,
|
|
118
|
-
"get-
|
|
118
|
+
"get-signer": `run402 contracts get-signer — Get signer metadata + live balance
|
|
119
119
|
|
|
120
120
|
Usage:
|
|
121
|
-
run402 contracts get-
|
|
121
|
+
run402 contracts get-signer <project_id> <signer_id>
|
|
122
122
|
|
|
123
123
|
Arguments:
|
|
124
|
-
<project_id> Project ID that owns the
|
|
125
|
-
<
|
|
124
|
+
<project_id> Project ID that owns the signer
|
|
125
|
+
<signer_id> Signer ID (e.g. cwlt_abc123)
|
|
126
126
|
|
|
127
127
|
Examples:
|
|
128
|
-
run402 contracts get-
|
|
128
|
+
run402 contracts get-signer prj_abc123 cwlt_abc123
|
|
129
129
|
`,
|
|
130
|
-
"list-
|
|
130
|
+
"list-signers": `run402 contracts list-signers — List all KMS signers for a project
|
|
131
131
|
|
|
132
132
|
Usage:
|
|
133
|
-
run402 contracts list-
|
|
133
|
+
run402 contracts list-signers <project_id>
|
|
134
134
|
|
|
135
135
|
Arguments:
|
|
136
|
-
<project_id> Project ID to list
|
|
136
|
+
<project_id> Project ID to list signers for
|
|
137
137
|
|
|
138
138
|
Notes:
|
|
139
|
-
- Includes deleted
|
|
139
|
+
- Includes deleted signers
|
|
140
140
|
|
|
141
141
|
Examples:
|
|
142
|
-
run402 contracts list-
|
|
142
|
+
run402 contracts list-signers prj_abc123
|
|
143
143
|
`,
|
|
144
144
|
status: `run402 contracts status — Get a contract call's status and receipt
|
|
145
145
|
|
|
@@ -171,13 +171,13 @@ function validateWeiFlag(flag, value) {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
async function
|
|
174
|
+
async function provisionSigner(projectId, args) {
|
|
175
175
|
const parsedArgs = normalizeArgv(args);
|
|
176
176
|
const valueFlags = ["--chain", "--recovery"];
|
|
177
177
|
assertKnownFlags(parsedArgs, [...valueFlags, "--yes", "--help", "-h"], valueFlags);
|
|
178
178
|
const extra = positionalArgs(parsedArgs, valueFlags);
|
|
179
179
|
if (extra.length > 0) {
|
|
180
|
-
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts provision-
|
|
180
|
+
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts provision-signer: ${extra[0]}` });
|
|
181
181
|
}
|
|
182
182
|
const chain = flagValue(parsedArgs, "--chain");
|
|
183
183
|
if (!chain) {
|
|
@@ -189,22 +189,22 @@ async function provisionWallet(projectId, args) {
|
|
|
189
189
|
assertAllowedValue(chain, ["base-mainnet", "base-sepolia"], "--chain");
|
|
190
190
|
const recovery = flagValue(parsedArgs, "--recovery");
|
|
191
191
|
if (recovery) validateEvmAddress(recovery, "--recovery");
|
|
192
|
-
// Soft default of one
|
|
193
|
-
let
|
|
192
|
+
// Soft default of one signer — confirm if project already has one.
|
|
193
|
+
let activeSigners = null;
|
|
194
194
|
try {
|
|
195
|
-
const list = await getSdk().contracts.
|
|
196
|
-
|
|
195
|
+
const list = await getSdk().contracts.listSigners(projectId);
|
|
196
|
+
activeSigners = (list.signers || []).filter((s) => s.status === "active").length;
|
|
197
197
|
} catch { /* best-effort */ }
|
|
198
|
-
if (
|
|
198
|
+
if (activeSigners !== null && activeSigners >= 1 && !hasFlag(parsedArgs, "--yes")) {
|
|
199
199
|
fail({
|
|
200
200
|
code: "CONFIRMATION_REQUIRED",
|
|
201
|
-
message: `This project already has ${
|
|
202
|
-
details: {
|
|
201
|
+
message: `This project already has ${activeSigners} active signer(s). Adding another costs $0.04/day each ($1.20/month). Re-run with --yes to confirm.`,
|
|
202
|
+
details: { active_signers: activeSigners },
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
try {
|
|
207
|
-
const data = await getSdk().contracts.
|
|
207
|
+
const data = await getSdk().contracts.provisionSigner(projectId, {
|
|
208
208
|
chain,
|
|
209
209
|
recoveryAddress: recovery ?? undefined,
|
|
210
210
|
});
|
|
@@ -214,37 +214,37 @@ async function provisionWallet(projectId, args) {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
async function
|
|
217
|
+
async function getSigner(projectId, signerId, args = []) {
|
|
218
218
|
const parsedArgs = normalizeArgv(args);
|
|
219
219
|
assertKnownFlags(parsedArgs, ["--help", "-h"]);
|
|
220
220
|
const extra = positionalArgs(parsedArgs);
|
|
221
221
|
if (extra.length > 0) {
|
|
222
|
-
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts get-
|
|
222
|
+
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts get-signer: ${extra[0]}` });
|
|
223
223
|
}
|
|
224
224
|
try {
|
|
225
|
-
const data = await getSdk().contracts.
|
|
225
|
+
const data = await getSdk().contracts.getSigner(projectId, signerId);
|
|
226
226
|
console.log(JSON.stringify(data, null, 2));
|
|
227
227
|
} catch (err) {
|
|
228
228
|
reportSdkError(err);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
async function
|
|
232
|
+
async function listSigners(projectId, args = []) {
|
|
233
233
|
const parsedArgs = normalizeArgv(args);
|
|
234
234
|
assertKnownFlags(parsedArgs, ["--help", "-h"]);
|
|
235
235
|
const extra = positionalArgs(parsedArgs);
|
|
236
236
|
if (extra.length > 0) {
|
|
237
|
-
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts list-
|
|
237
|
+
fail({ code: "BAD_USAGE", message: `Unexpected argument for contracts list-signers: ${extra[0]}` });
|
|
238
238
|
}
|
|
239
239
|
try {
|
|
240
|
-
const data = await getSdk().contracts.
|
|
240
|
+
const data = await getSdk().contracts.listSigners(projectId);
|
|
241
241
|
console.log(JSON.stringify(data, null, 2));
|
|
242
242
|
} catch (err) {
|
|
243
243
|
reportSdkError(err);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
async function setRecovery(projectId,
|
|
247
|
+
async function setRecovery(projectId, signerId, args) {
|
|
248
248
|
const parsedArgs = normalizeArgv(args);
|
|
249
249
|
const valueFlags = ["--address"];
|
|
250
250
|
assertKnownFlags(parsedArgs, [...valueFlags, "--clear", "--help", "-h"], valueFlags);
|
|
@@ -265,14 +265,14 @@ async function setRecovery(projectId, walletId, args) {
|
|
|
265
265
|
}
|
|
266
266
|
if (address) validateEvmAddress(address, "--address");
|
|
267
267
|
try {
|
|
268
|
-
await getSdk().contracts.setRecovery(projectId,
|
|
269
|
-
console.log(JSON.stringify({
|
|
268
|
+
await getSdk().contracts.setRecovery(projectId, signerId, clear ? null : address);
|
|
269
|
+
console.log(JSON.stringify({ signer_id: signerId, recovery_address: clear ? null : address, updated: true }));
|
|
270
270
|
} catch (err) {
|
|
271
271
|
reportSdkError(err);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
async function setAlert(projectId,
|
|
275
|
+
async function setAlert(projectId, signerId, args) {
|
|
276
276
|
const parsedArgs = normalizeArgv(args);
|
|
277
277
|
const valueFlags = ["--threshold-wei"];
|
|
278
278
|
assertKnownFlags(parsedArgs, [...valueFlags, "--help", "-h"], valueFlags);
|
|
@@ -286,14 +286,14 @@ async function setAlert(projectId, walletId, args) {
|
|
|
286
286
|
}
|
|
287
287
|
validateWeiFlag("--threshold-wei", threshold);
|
|
288
288
|
try {
|
|
289
|
-
await getSdk().contracts.setLowBalanceAlert(projectId,
|
|
290
|
-
console.log(JSON.stringify({
|
|
289
|
+
await getSdk().contracts.setLowBalanceAlert(projectId, signerId, threshold);
|
|
290
|
+
console.log(JSON.stringify({ signer_id: signerId, threshold_wei: threshold, updated: true }));
|
|
291
291
|
} catch (err) {
|
|
292
292
|
reportSdkError(err);
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
async function call(projectId,
|
|
296
|
+
async function call(projectId, signerId, args) {
|
|
297
297
|
const parsedArgs = normalizeArgv(args);
|
|
298
298
|
const valueFlags = ["--to", "--abi", "--fn", "--args", "--value-wei", "--chain", "--idempotency-key"];
|
|
299
299
|
assertKnownFlags(parsedArgs, [...valueFlags, "--help", "-h"], valueFlags);
|
|
@@ -322,7 +322,7 @@ async function call(projectId, walletId, args) {
|
|
|
322
322
|
validateEvmAddress(to, "--to");
|
|
323
323
|
try {
|
|
324
324
|
const data = await getSdk().contracts.call(projectId, {
|
|
325
|
-
|
|
325
|
+
signerId,
|
|
326
326
|
chain,
|
|
327
327
|
contractAddress: to,
|
|
328
328
|
abiFragment,
|
|
@@ -337,7 +337,7 @@ async function call(projectId, walletId, args) {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
async function deploy(projectId,
|
|
340
|
+
async function deploy(projectId, signerId, args) {
|
|
341
341
|
const parsedArgs = normalizeArgv(args);
|
|
342
342
|
const valueFlags = ["--bytecode", "--value-wei", "--chain", "--idempotency-key"];
|
|
343
343
|
assertKnownFlags(parsedArgs, [...valueFlags, "--help", "-h"], valueFlags);
|
|
@@ -360,7 +360,7 @@ async function deploy(projectId, walletId, args) {
|
|
|
360
360
|
if (value !== null) validateWeiFlag("--value-wei", value);
|
|
361
361
|
try {
|
|
362
362
|
const data = await getSdk().contracts.deploy(projectId, {
|
|
363
|
-
|
|
363
|
+
signerId,
|
|
364
364
|
chain,
|
|
365
365
|
bytecode,
|
|
366
366
|
value: value ?? undefined,
|
|
@@ -424,7 +424,7 @@ async function status(projectId, callId, args = []) {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
async function drain(projectId,
|
|
427
|
+
async function drain(projectId, signerId, args) {
|
|
428
428
|
const parsedArgs = normalizeArgv(args);
|
|
429
429
|
const valueFlags = ["--to"];
|
|
430
430
|
assertKnownFlags(parsedArgs, [...valueFlags, "--confirm", "--help", "-h"], valueFlags);
|
|
@@ -442,14 +442,14 @@ async function drain(projectId, walletId, args) {
|
|
|
442
442
|
}
|
|
443
443
|
validateEvmAddress(to, "--to");
|
|
444
444
|
try {
|
|
445
|
-
const data = await getSdk().contracts.drain(projectId,
|
|
445
|
+
const data = await getSdk().contracts.drain(projectId, signerId, to);
|
|
446
446
|
console.log(JSON.stringify(data, null, 2));
|
|
447
447
|
} catch (err) {
|
|
448
448
|
reportSdkError(err);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
async function
|
|
452
|
+
async function deleteSigner(projectId, signerId, args) {
|
|
453
453
|
const parsedArgs = normalizeArgv(args);
|
|
454
454
|
assertKnownFlags(parsedArgs, ["--confirm", "--help", "-h"]);
|
|
455
455
|
const extra = positionalArgs(parsedArgs);
|
|
@@ -460,7 +460,7 @@ async function deleteWallet(projectId, walletId, args) {
|
|
|
460
460
|
fail({ code: "BAD_USAGE", message: "Required: --confirm" });
|
|
461
461
|
}
|
|
462
462
|
try {
|
|
463
|
-
const data = await getSdk().contracts.
|
|
463
|
+
const data = await getSdk().contracts.deleteSigner(projectId, signerId);
|
|
464
464
|
console.log(JSON.stringify(data, null, 2));
|
|
465
465
|
} catch (err) {
|
|
466
466
|
reportSdkError(err);
|
|
@@ -471,9 +471,9 @@ export async function run(sub, args) {
|
|
|
471
471
|
if (!sub || sub === "--help" || sub === "-h") { console.log(HELP); process.exit(0); }
|
|
472
472
|
if (Array.isArray(args) && (args.includes("--help") || args.includes("-h"))) { console.log(SUB_HELP[sub] || HELP); process.exit(0); }
|
|
473
473
|
switch (sub) {
|
|
474
|
-
case "provision-
|
|
475
|
-
case "get-
|
|
476
|
-
case "list-
|
|
474
|
+
case "provision-signer": await provisionSigner(args[0], args.slice(1)); break;
|
|
475
|
+
case "get-signer": await getSigner(args[0], args[1], args.slice(2)); break;
|
|
476
|
+
case "list-signers": await listSigners(args[0], args.slice(1)); break;
|
|
477
477
|
case "set-recovery": await setRecovery(args[0], args[1], args.slice(2)); break;
|
|
478
478
|
case "set-alert": await setAlert(args[0], args[1], args.slice(2)); break;
|
|
479
479
|
case "call": await call(args[0], args[1], args.slice(2)); break;
|
|
@@ -481,7 +481,7 @@ export async function run(sub, args) {
|
|
|
481
481
|
case "read": await read(args); break;
|
|
482
482
|
case "status": await status(args[0], args[1], args.slice(2)); break;
|
|
483
483
|
case "drain": await drain(args[0], args[1], args.slice(2)); break;
|
|
484
|
-
case "delete": await
|
|
484
|
+
case "delete": await deleteSigner(args[0], args[1], args.slice(2)); break;
|
|
485
485
|
default:
|
|
486
486
|
console.error(`Unknown subcommand: ${sub}\n`);
|
|
487
487
|
console.log(HELP);
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `contracts` namespace — AWS KMS-backed Ethereum
|
|
2
|
+
* `contracts` namespace — AWS KMS-backed Ethereum signers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Signers sign smart-contract write transactions. Private keys never leave
|
|
5
|
+
* KMS. Pricing: $0.04/day rental ($1.20/month) plus $0.000005 per sign.
|
|
6
|
+
* Non-custodial.
|
|
7
7
|
*
|
|
8
8
|
* NOTE: The contracts API surface is frozen — this namespace preserves the
|
|
9
9
|
* existing request/response shapes verbatim.
|
|
10
10
|
*/
|
|
11
11
|
import type { Client } from "../kernel.js";
|
|
12
12
|
export type EvmChain = "base-mainnet" | "base-sepolia";
|
|
13
|
-
export type
|
|
13
|
+
export type SignerStatus = "active" | "suspended" | "deleted";
|
|
14
14
|
export type ContractCallStatus = "submitted" | "confirmed" | "failed";
|
|
15
|
-
export interface
|
|
16
|
-
|
|
15
|
+
export interface SignerSummary {
|
|
16
|
+
signer_id: string;
|
|
17
17
|
address: string;
|
|
18
18
|
chain: EvmChain;
|
|
19
|
-
status:
|
|
19
|
+
status: SignerStatus;
|
|
20
20
|
balance_wei: string;
|
|
21
21
|
threshold_wei: string | null;
|
|
22
22
|
recovery_address: string | null;
|
|
23
23
|
created_at: string;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
26
|
-
|
|
25
|
+
export interface ListSignersResult {
|
|
26
|
+
signers: SignerSummary[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
29
|
-
|
|
28
|
+
export interface ProvisionSignerResult {
|
|
29
|
+
signer_id: string;
|
|
30
30
|
address: string;
|
|
31
31
|
chain: EvmChain;
|
|
32
|
-
status?:
|
|
32
|
+
status?: SignerStatus;
|
|
33
33
|
balance_wei?: string;
|
|
34
34
|
threshold_wei?: string | null;
|
|
35
35
|
recovery_address?: string | null;
|
|
@@ -51,17 +51,17 @@ export interface DrainResult {
|
|
|
51
51
|
status: ContractCallStatus;
|
|
52
52
|
tx_hash: string | null;
|
|
53
53
|
}
|
|
54
|
-
export interface
|
|
55
|
-
|
|
54
|
+
export interface DeleteSignerResult {
|
|
55
|
+
signer_id: string;
|
|
56
56
|
deleted_at?: string;
|
|
57
57
|
scheduled_deletion_at?: string;
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
59
|
+
export interface ProvisionSignerOptions {
|
|
60
60
|
chain: EvmChain;
|
|
61
61
|
recoveryAddress?: string;
|
|
62
62
|
}
|
|
63
63
|
export interface ContractCallOptions {
|
|
64
|
-
|
|
64
|
+
signerId: string;
|
|
65
65
|
chain: EvmChain;
|
|
66
66
|
contractAddress?: string;
|
|
67
67
|
to?: string;
|
|
@@ -74,9 +74,9 @@ export interface ContractCallOptions {
|
|
|
74
74
|
idempotencyKey?: string;
|
|
75
75
|
}
|
|
76
76
|
export interface ContractDeployOptions {
|
|
77
|
-
/** The cwlt_… ID of the KMS
|
|
78
|
-
|
|
79
|
-
/** The chain to deploy to. Must match the
|
|
77
|
+
/** The cwlt_… ID of the KMS signer that will sign + own the new contract. */
|
|
78
|
+
signerId: string;
|
|
79
|
+
/** The chain to deploy to. Must match the signer's chain. */
|
|
80
80
|
chain: EvmChain;
|
|
81
81
|
/**
|
|
82
82
|
* Full creation calldata as a 0x-prefixed hex string: creation bytecode
|
|
@@ -93,7 +93,7 @@ export interface ContractDeployOptions {
|
|
|
93
93
|
}
|
|
94
94
|
export interface ContractDeployResult extends ContractCallResult {
|
|
95
95
|
/**
|
|
96
|
-
* The deterministic CREATE address derived from `(
|
|
96
|
+
* The deterministic CREATE address derived from `(signer.address, nonce)`.
|
|
97
97
|
* Returned synchronously — the caller knows where the new contract will
|
|
98
98
|
* live without waiting for confirmation. The reconciler verifies this
|
|
99
99
|
* matches the on-chain receipt's `contractAddress` on confirmation.
|
|
@@ -112,31 +112,31 @@ export interface ContractReadOptions {
|
|
|
112
112
|
}
|
|
113
113
|
export declare class Contracts {
|
|
114
114
|
private readonly client;
|
|
115
|
-
readonly setAlert: (projectId: string,
|
|
116
|
-
readonly delete: (projectId: string,
|
|
115
|
+
readonly setAlert: (projectId: string, signerId: string, thresholdWei: string) => Promise<void>;
|
|
116
|
+
readonly delete: (projectId: string, signerId: string) => Promise<DeleteSignerResult>;
|
|
117
117
|
readonly status: (projectId: string, callId: string) => Promise<ContractCallResult>;
|
|
118
118
|
constructor(client: Client);
|
|
119
|
-
/** Provision a new KMS-backed
|
|
120
|
-
|
|
121
|
-
/** Get a
|
|
122
|
-
|
|
123
|
-
/** List all
|
|
124
|
-
|
|
119
|
+
/** Provision a new KMS-backed signer. */
|
|
120
|
+
provisionSigner(projectId: string, opts: ProvisionSignerOptions): Promise<ProvisionSignerResult>;
|
|
121
|
+
/** Get a signer's metadata + live balance. */
|
|
122
|
+
getSigner(projectId: string, signerId: string): Promise<SignerSummary>;
|
|
123
|
+
/** List all signers owned by the project, including deleted ones. */
|
|
124
|
+
listSigners(projectId: string): Promise<ListSignersResult>;
|
|
125
125
|
/** Set or clear the recovery address used for auto-drain on day-90 deletion. */
|
|
126
|
-
setRecovery(projectId: string,
|
|
126
|
+
setRecovery(projectId: string, signerId: string, recoveryAddress: string | null): Promise<void>;
|
|
127
127
|
/** Set the low-balance threshold (in wei) for email alerts. */
|
|
128
|
-
setLowBalanceAlert(projectId: string,
|
|
128
|
+
setLowBalanceAlert(projectId: string, signerId: string, thresholdWei: string): Promise<void>;
|
|
129
129
|
/** Submit a smart-contract write call. Idempotent on `idempotencyKey`. */
|
|
130
130
|
call(projectId: string, opts: ContractCallOptions): Promise<ContractCallResult>;
|
|
131
131
|
/**
|
|
132
|
-
* Deploy a contract from the
|
|
132
|
+
* Deploy a contract from the signer (KMS-signs a contract-creation tx).
|
|
133
133
|
*
|
|
134
134
|
* The `bytecode` is the full creation calldata — creation bytecode
|
|
135
135
|
* concatenated with ABI-encoded constructor args (the caller does the
|
|
136
136
|
* encoding via viem/ethers etc.; run402 does NOT compile Solidity).
|
|
137
137
|
*
|
|
138
138
|
* Returns synchronously with the deterministic CREATE address derived
|
|
139
|
-
* from `(
|
|
139
|
+
* from `(signer.address, nonce)` — no need to wait for confirmation
|
|
140
140
|
* to know where the contract will live. Reconciler verifies on receipt.
|
|
141
141
|
*
|
|
142
142
|
* Same pricing as `call`: chain gas at-cost + $0.000005 KMS sign fee.
|
|
@@ -148,15 +148,15 @@ export declare class Contracts {
|
|
|
148
148
|
/** Look up a previously submitted call by id. */
|
|
149
149
|
callStatus(projectId: string, callId: string): Promise<ContractCallResult>;
|
|
150
150
|
/**
|
|
151
|
-
* Drain the
|
|
152
|
-
* Works on suspended
|
|
151
|
+
* Drain the signer's native-token balance to a destination address.
|
|
152
|
+
* Works on suspended signers. Requires `X-Confirm-Drain: <signer_id>`
|
|
153
153
|
* confirmation header (sent automatically by the SDK).
|
|
154
154
|
*/
|
|
155
|
-
drain(projectId: string,
|
|
155
|
+
drain(projectId: string, signerId: string, destinationAddress: string): Promise<DrainResult>;
|
|
156
156
|
/**
|
|
157
157
|
* Schedule the KMS key for deletion (7-day AWS minimum window). Refused
|
|
158
|
-
* if the
|
|
158
|
+
* if the signer has on-chain balance >= dust — drain first.
|
|
159
159
|
*/
|
|
160
|
-
|
|
160
|
+
deleteSigner(projectId: string, signerId: string): Promise<DeleteSignerResult>;
|
|
161
161
|
}
|
|
162
162
|
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/namespaces/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,cAAc,CAAC;AAGvD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/namespaces/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,cAAc,CAAC;AAGvD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,E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,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAkBlG;;;OAGG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAerF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `contracts` namespace — AWS KMS-backed Ethereum
|
|
2
|
+
* `contracts` namespace — AWS KMS-backed Ethereum signers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Signers sign smart-contract write transactions. Private keys never leave
|
|
5
|
+
* KMS. Pricing: $0.04/day rental ($1.20/month) plus $0.000005 per sign.
|
|
6
|
+
* Non-custodial.
|
|
7
7
|
*
|
|
8
8
|
* NOTE: The contracts API surface is frozen — this namespace preserves the
|
|
9
9
|
* existing request/response shapes verbatim.
|
|
@@ -19,57 +19,57 @@ export class Contracts {
|
|
|
19
19
|
constructor(client) {
|
|
20
20
|
this.client = client;
|
|
21
21
|
this.setAlert = this.setLowBalanceAlert.bind(this);
|
|
22
|
-
this.delete = this.
|
|
22
|
+
this.delete = this.deleteSigner.bind(this);
|
|
23
23
|
this.status = this.callStatus.bind(this);
|
|
24
24
|
}
|
|
25
|
-
/** Provision a new KMS-backed
|
|
26
|
-
async
|
|
27
|
-
assertStringInSet(opts.chain, EVM_CHAINS, "chain", "provisioning KMS
|
|
25
|
+
/** Provision a new KMS-backed signer. */
|
|
26
|
+
async provisionSigner(projectId, opts) {
|
|
27
|
+
assertStringInSet(opts.chain, EVM_CHAINS, "chain", "provisioning KMS signer");
|
|
28
28
|
if (opts.recoveryAddress) {
|
|
29
|
-
assertEvmAddress(opts.recoveryAddress, "recoveryAddress", "provisioning KMS
|
|
29
|
+
assertEvmAddress(opts.recoveryAddress, "recoveryAddress", "provisioning KMS signer");
|
|
30
30
|
}
|
|
31
31
|
const project = await this.client.getProject(projectId);
|
|
32
32
|
if (!project)
|
|
33
|
-
throw new ProjectNotFound(projectId, "provisioning KMS
|
|
33
|
+
throw new ProjectNotFound(projectId, "provisioning KMS signer");
|
|
34
34
|
const body = { chain: opts.chain };
|
|
35
35
|
if (opts.recoveryAddress)
|
|
36
36
|
body.recovery_address = opts.recoveryAddress;
|
|
37
|
-
return this.client.request("/contracts/v1/
|
|
37
|
+
return this.client.request("/contracts/v1/signers", {
|
|
38
38
|
method: "POST",
|
|
39
39
|
headers: { Authorization: `Bearer ${project.service_key}` },
|
|
40
40
|
body,
|
|
41
|
-
context: "provisioning KMS
|
|
41
|
+
context: "provisioning KMS signer",
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
/** Get a
|
|
45
|
-
async
|
|
44
|
+
/** Get a signer's metadata + live balance. */
|
|
45
|
+
async getSigner(projectId, signerId) {
|
|
46
46
|
const project = await this.client.getProject(projectId);
|
|
47
47
|
if (!project)
|
|
48
|
-
throw new ProjectNotFound(projectId, "fetching
|
|
49
|
-
return this.client.request(`/contracts/v1/
|
|
48
|
+
throw new ProjectNotFound(projectId, "fetching signer");
|
|
49
|
+
return this.client.request(`/contracts/v1/signers/${encodeURIComponent(signerId)}`, {
|
|
50
50
|
headers: { Authorization: `Bearer ${project.service_key}` },
|
|
51
|
-
context: "fetching
|
|
51
|
+
context: "fetching signer",
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
/** List all
|
|
55
|
-
async
|
|
54
|
+
/** List all signers owned by the project, including deleted ones. */
|
|
55
|
+
async listSigners(projectId) {
|
|
56
56
|
const project = await this.client.getProject(projectId);
|
|
57
57
|
if (!project)
|
|
58
|
-
throw new ProjectNotFound(projectId, "listing
|
|
59
|
-
return this.client.request("/contracts/v1/
|
|
58
|
+
throw new ProjectNotFound(projectId, "listing signers");
|
|
59
|
+
return this.client.request("/contracts/v1/signers", {
|
|
60
60
|
headers: { Authorization: `Bearer ${project.service_key}` },
|
|
61
|
-
context: "listing
|
|
61
|
+
context: "listing signers",
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/** Set or clear the recovery address used for auto-drain on day-90 deletion. */
|
|
65
|
-
async setRecovery(projectId,
|
|
65
|
+
async setRecovery(projectId, signerId, recoveryAddress) {
|
|
66
66
|
if (recoveryAddress !== null) {
|
|
67
67
|
assertEvmAddress(recoveryAddress, "recoveryAddress", "setting recovery address");
|
|
68
68
|
}
|
|
69
69
|
const project = await this.client.getProject(projectId);
|
|
70
70
|
if (!project)
|
|
71
71
|
throw new ProjectNotFound(projectId, "setting recovery address");
|
|
72
|
-
await this.client.request(`/contracts/v1/
|
|
72
|
+
await this.client.request(`/contracts/v1/signers/${encodeURIComponent(signerId)}/recovery-address`, {
|
|
73
73
|
method: "POST",
|
|
74
74
|
headers: { Authorization: `Bearer ${project.service_key}` },
|
|
75
75
|
body: { recovery_address: recoveryAddress },
|
|
@@ -77,12 +77,12 @@ export class Contracts {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
/** Set the low-balance threshold (in wei) for email alerts. */
|
|
80
|
-
async setLowBalanceAlert(projectId,
|
|
80
|
+
async setLowBalanceAlert(projectId, signerId, thresholdWei) {
|
|
81
81
|
assertWeiString(thresholdWei, "thresholdWei", "setting low-balance threshold");
|
|
82
82
|
const project = await this.client.getProject(projectId);
|
|
83
83
|
if (!project)
|
|
84
84
|
throw new ProjectNotFound(projectId, "setting low-balance threshold");
|
|
85
|
-
await this.client.request(`/contracts/v1/
|
|
85
|
+
await this.client.request(`/contracts/v1/signers/${encodeURIComponent(signerId)}/alert`, {
|
|
86
86
|
method: "POST",
|
|
87
87
|
headers: { Authorization: `Bearer ${project.service_key}` },
|
|
88
88
|
body: { threshold_wei: thresholdWei },
|
|
@@ -112,7 +112,7 @@ export class Contracts {
|
|
|
112
112
|
if (opts.idempotencyKey)
|
|
113
113
|
headers["Idempotency-Key"] = opts.idempotencyKey;
|
|
114
114
|
const body = {
|
|
115
|
-
|
|
115
|
+
signer_id: opts.signerId,
|
|
116
116
|
chain: opts.chain,
|
|
117
117
|
contract_address: contractAddress,
|
|
118
118
|
abi_fragment: abiFragment,
|
|
@@ -131,14 +131,14 @@ export class Contracts {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Deploy a contract from the
|
|
134
|
+
* Deploy a contract from the signer (KMS-signs a contract-creation tx).
|
|
135
135
|
*
|
|
136
136
|
* The `bytecode` is the full creation calldata — creation bytecode
|
|
137
137
|
* concatenated with ABI-encoded constructor args (the caller does the
|
|
138
138
|
* encoding via viem/ethers etc.; run402 does NOT compile Solidity).
|
|
139
139
|
*
|
|
140
140
|
* Returns synchronously with the deterministic CREATE address derived
|
|
141
|
-
* from `(
|
|
141
|
+
* from `(signer.address, nonce)` — no need to wait for confirmation
|
|
142
142
|
* to know where the contract will live. Reconciler verifies on receipt.
|
|
143
143
|
*
|
|
144
144
|
* Same pricing as `call`: chain gas at-cost + $0.000005 KMS sign fee.
|
|
@@ -166,7 +166,7 @@ export class Contracts {
|
|
|
166
166
|
if (opts.idempotencyKey)
|
|
167
167
|
headers["Idempotency-Key"] = opts.idempotencyKey;
|
|
168
168
|
const body = {
|
|
169
|
-
|
|
169
|
+
signer_id: opts.signerId,
|
|
170
170
|
chain: opts.chain,
|
|
171
171
|
bytecode: opts.bytecode,
|
|
172
172
|
};
|
|
@@ -221,40 +221,40 @@ export class Contracts {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Drain the
|
|
225
|
-
* Works on suspended
|
|
224
|
+
* Drain the signer's native-token balance to a destination address.
|
|
225
|
+
* Works on suspended signers. Requires `X-Confirm-Drain: <signer_id>`
|
|
226
226
|
* confirmation header (sent automatically by the SDK).
|
|
227
227
|
*/
|
|
228
|
-
async drain(projectId,
|
|
229
|
-
assertEvmAddress(destinationAddress, "destinationAddress", "draining
|
|
228
|
+
async drain(projectId, signerId, destinationAddress) {
|
|
229
|
+
assertEvmAddress(destinationAddress, "destinationAddress", "draining signer");
|
|
230
230
|
const project = await this.client.getProject(projectId);
|
|
231
231
|
if (!project)
|
|
232
|
-
throw new ProjectNotFound(projectId, "draining
|
|
233
|
-
return this.client.request(`/contracts/v1/
|
|
232
|
+
throw new ProjectNotFound(projectId, "draining signer");
|
|
233
|
+
return this.client.request(`/contracts/v1/signers/${encodeURIComponent(signerId)}/drain`, {
|
|
234
234
|
method: "POST",
|
|
235
235
|
headers: {
|
|
236
236
|
Authorization: `Bearer ${project.service_key}`,
|
|
237
|
-
"X-Confirm-Drain":
|
|
237
|
+
"X-Confirm-Drain": signerId,
|
|
238
238
|
},
|
|
239
239
|
body: { destination_address: destinationAddress },
|
|
240
|
-
context: "draining
|
|
240
|
+
context: "draining signer",
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
244
|
* Schedule the KMS key for deletion (7-day AWS minimum window). Refused
|
|
245
|
-
* if the
|
|
245
|
+
* if the signer has on-chain balance >= dust — drain first.
|
|
246
246
|
*/
|
|
247
|
-
async
|
|
247
|
+
async deleteSigner(projectId, signerId) {
|
|
248
248
|
const project = await this.client.getProject(projectId);
|
|
249
249
|
if (!project)
|
|
250
|
-
throw new ProjectNotFound(projectId, "deleting
|
|
251
|
-
return this.client.request(`/contracts/v1/
|
|
250
|
+
throw new ProjectNotFound(projectId, "deleting signer");
|
|
251
|
+
return this.client.request(`/contracts/v1/signers/${encodeURIComponent(signerId)}`, {
|
|
252
252
|
method: "DELETE",
|
|
253
253
|
headers: {
|
|
254
254
|
Authorization: `Bearer ${project.service_key}`,
|
|
255
|
-
"X-Confirm-Delete":
|
|
255
|
+
"X-Confirm-Delete": signerId,
|
|
256
256
|
},
|
|
257
|
-
context: "deleting
|
|
257
|
+
context: "deleting signer",
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/namespaces/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxF,MAAM,UAAU,GAAwB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;AAoHzE,MAAM,OAAO,SAAS;IAKS;IAJpB,QAAQ,CAA+E;IACvF,MAAM,CAAuE;IAC7E,MAAM,CAAqE;IAEpF,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/namespaces/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxF,MAAM,UAAU,GAAwB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;AAoHzE,MAAM,OAAO,SAAS;IAKS;IAJpB,QAAQ,CAA+E;IACvF,MAAM,CAAuE;IAC7E,MAAM,CAAqE;IAEpF,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC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AAC,QAAQ,CAAC,QAAQ,EAC7D;YACE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,OAAO,CAAC,WAAW,EAAE;gBAC9C,iBAAiB,EAAE,QAAQ;aAC5B;YACD,IAAI,EAAE,EAAE,mBAAmB,EAAE,kBAAkB,EAAE;YACjD,OAAO,EAAE,iBAAiB;SAC3B,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,QAAgB;QACpD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,eAAe,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,yBAAyB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EACvD;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,OAAO,CAAC,WAAW,EAAE;gBAC9C,kBAAkB,EAAE,QAAQ;aAC7B;YACD,OAAO,EAAE,iBAAiB;SAC3B,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -120,8 +120,8 @@ export interface CiBindingPreview {
|
|
|
120
120
|
github_subject_pattern: string;
|
|
121
121
|
created_at: string;
|
|
122
122
|
}
|
|
123
|
-
export interface
|
|
124
|
-
/** Always an empty array in Phase 1A. Reserved for future project-scoped KMS
|
|
123
|
+
export interface SignerPreview {
|
|
124
|
+
/** Always an empty array in Phase 1A. Reserved for future project-scoped KMS signers. */
|
|
125
125
|
address: string;
|
|
126
126
|
chain: string;
|
|
127
127
|
}
|
|
@@ -155,7 +155,7 @@ export interface ProjectTransferPreview {
|
|
|
155
155
|
secret_names: string[];
|
|
156
156
|
mailbox_summary: MailboxSummary;
|
|
157
157
|
ci_bindings_to_be_revoked: CiBindingPreview[];
|
|
158
|
-
|
|
158
|
+
signers: SignerPreview[];
|
|
159
159
|
github_repo_note: string;
|
|
160
160
|
billing_implications: BillingImplications;
|
|
161
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../src/namespaces/transfers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,iIAAiI;AACjI,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzE,mDAAmD;AACnD,MAAM,WAAW,qBAAqB;IACpC,4GAA4G;IAC5G,SAAS,EAAE,MAAM,CAAC;IAClB,4FAA4F;IAC5F,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,cAAc,EAAE,qBAAqB,CAAC;QACtC,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,KAAK,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE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{ AiUsageResult, GenerateImageOptions, GenerateImageResult, ModerateResult, TranslateOptions, TranslateResult } from "./namespaces/ai.js";
|
|
24
24
|
import type { AuthSettings, AuthSettingsResult, AuthSessionResult, AuthUserAdminResult, CreateAuthUserOptions, MagicLinkOptions, MagicLinkVerifyResult, PasskeyDeleteOptions, PasskeyListOptions, PasskeyLoginOptions, PasskeyLoginVerifyOptions, PasskeyOptionsResult, PasskeyRecord, PasskeyRegistrationOptions, PasskeyRegistrationVerifyOptions, SetPasswordOptions } from "./namespaces/auth.js";
|
|
25
25
|
import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./namespaces/assets.types.js";
|
|
26
|
-
import type { ContractCallOptions, ContractDeployOptions, ContractReadOptions,
|
|
26
|
+
import type { ContractCallOptions, ContractDeployOptions, ContractReadOptions, ProvisionSignerOptions } from "./namespaces/contracts.js";
|
|
27
27
|
import type { CustomDomainAddResult, CustomDomainListResult, CustomDomainRemoveResult, CustomDomainStatusResult } from "./namespaces/domains.js";
|
|
28
28
|
import type { CreateMailboxResult, DeleteMailboxResult, EmailDetail, EmailSummary, ListDeliveriesOptions, ListEmailsOptions, MailboxInfo, MailboxWebhookSummary, MailboxWebhooksResult, RawEmailResult, RedriveDeliveryResult, RegisterWebhookOptions, SendEmailOptions, SendEmailResult, UpdateWebhookOptions, WebhookDeliveriesResult } from "./namespaces/email.js";
|
|
29
29
|
import type { DeleteFunctionResult, FunctionDeployOptions, FunctionDeployResult, FunctionInvokeOptions, FunctionInvokeResult, FunctionListResult, FunctionLogsOptions, FunctionLogsResult, FunctionRebuildBatchResult, FunctionRebuildResult, FunctionUpdateOptions, FunctionUpdateResult } from "./namespaces/functions.types.js";
|
|
@@ -128,16 +128,16 @@ declare class ScopedContracts {
|
|
|
128
128
|
private readonly parent;
|
|
129
129
|
private readonly projectId;
|
|
130
130
|
constructor(parent: Run402, projectId: string);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
setRecovery(
|
|
135
|
-
setLowBalanceAlert(
|
|
131
|
+
provisionSigner(opts: ProvisionSignerOptions): Promise<unknown>;
|
|
132
|
+
getSigner(signerId: string): Promise<unknown>;
|
|
133
|
+
listSigners(): Promise<unknown>;
|
|
134
|
+
setRecovery(signerId: string, recoveryAddress: string | null): Promise<void>;
|
|
135
|
+
setLowBalanceAlert(signerId: string, thresholdWei: string): Promise<void>;
|
|
136
136
|
call(opts: ContractCallOptions): Promise<unknown>;
|
|
137
137
|
deploy(opts: ContractDeployOptions): Promise<unknown>;
|
|
138
138
|
callStatus(callId: string): Promise<unknown>;
|
|
139
|
-
drain(
|
|
140
|
-
|
|
139
|
+
drain(signerId: string, destinationAddress: string): Promise<unknown>;
|
|
140
|
+
deleteSigner(signerId: string): Promise<unknown>;
|
|
141
141
|
read(opts: ContractReadOptions): Promise<unknown>;
|
|
142
142
|
}
|
|
143
143
|
/**
|
package/sdk/dist/scoped.js
CHANGED
|
@@ -227,20 +227,20 @@ class ScopedContracts {
|
|
|
227
227
|
this.parent = parent;
|
|
228
228
|
this.projectId = projectId;
|
|
229
229
|
}
|
|
230
|
-
|
|
231
|
-
return this.parent.contracts.
|
|
230
|
+
provisionSigner(opts) {
|
|
231
|
+
return this.parent.contracts.provisionSigner(this.projectId, opts);
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
return this.parent.contracts.
|
|
233
|
+
getSigner(signerId) {
|
|
234
|
+
return this.parent.contracts.getSigner(this.projectId, signerId);
|
|
235
235
|
}
|
|
236
|
-
|
|
237
|
-
return this.parent.contracts.
|
|
236
|
+
listSigners() {
|
|
237
|
+
return this.parent.contracts.listSigners(this.projectId);
|
|
238
238
|
}
|
|
239
|
-
setRecovery(
|
|
240
|
-
return this.parent.contracts.setRecovery(this.projectId,
|
|
239
|
+
setRecovery(signerId, recoveryAddress) {
|
|
240
|
+
return this.parent.contracts.setRecovery(this.projectId, signerId, recoveryAddress);
|
|
241
241
|
}
|
|
242
|
-
setLowBalanceAlert(
|
|
243
|
-
return this.parent.contracts.setLowBalanceAlert(this.projectId,
|
|
242
|
+
setLowBalanceAlert(signerId, thresholdWei) {
|
|
243
|
+
return this.parent.contracts.setLowBalanceAlert(this.projectId, signerId, thresholdWei);
|
|
244
244
|
}
|
|
245
245
|
call(opts) {
|
|
246
246
|
return this.parent.contracts.call(this.projectId, opts);
|
|
@@ -251,11 +251,11 @@ class ScopedContracts {
|
|
|
251
251
|
callStatus(callId) {
|
|
252
252
|
return this.parent.contracts.callStatus(this.projectId, callId);
|
|
253
253
|
}
|
|
254
|
-
drain(
|
|
255
|
-
return this.parent.contracts.drain(this.projectId,
|
|
254
|
+
drain(signerId, destinationAddress) {
|
|
255
|
+
return this.parent.contracts.drain(this.projectId, signerId, destinationAddress);
|
|
256
256
|
}
|
|
257
|
-
|
|
258
|
-
return this.parent.contracts.
|
|
257
|
+
deleteSigner(signerId) {
|
|
258
|
+
return this.parent.contracts.deleteSigner(this.projectId, signerId);
|
|
259
259
|
}
|
|
260
260
|
// `read` is not project-scoped — pass through.
|
|
261
261
|
read(opts) {
|