@ftptech/canton-agent-wallet 0.1.11 → 0.1.13
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/dist/pay-lock.d.ts +15 -0
- package/dist/pay-lock.d.ts.map +1 -0
- package/dist/pay-lock.js +92 -0
- package/dist/pay-lock.js.map +1 -0
- package/dist/pay.d.ts.map +1 -1
- package/dist/pay.js +18 -1
- package/dist/pay.js.map +1 -1
- package/dist/store.d.ts +3 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +5 -0
- package/dist/store.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface PayLockOpts {
|
|
2
|
+
/** A holder older than this is presumed crashed and is reclaimed. Must
|
|
3
|
+
* comfortably exceed the longest legitimate payment (first-payment
|
|
4
|
+
* dead-zone + re-pay backoffs ≈ 2–3 min). Default 5 min. */
|
|
5
|
+
staleMs?: number;
|
|
6
|
+
/** How long to wait for the lock before giving up. Default 10 min
|
|
7
|
+
* (several queued payments at worst-case duration). */
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
/** Poll interval while waiting. Default 400ms. */
|
|
10
|
+
pollMs?: number;
|
|
11
|
+
}
|
|
12
|
+
/** Serialize `fn` against every other payment from the same wallet home.
|
|
13
|
+
* Always releases — including when `fn` throws. */
|
|
14
|
+
export declare function withPayLock<T>(homeDir: string, fn: () => Promise<T>, opts?: PayLockOpts): Promise<T>;
|
|
15
|
+
//# sourceMappingURL=pay-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pay-lock.d.ts","sourceRoot":"","sources":["../src/pay-lock.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,WAAW;IAC1B;;iEAE6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;4DACwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;oDACoD;AACpD,wBAAsB,WAAW,CAAC,CAAC,EACjC,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,CAAC,CAAC,CA+DZ"}
|
package/dist/pay-lock.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-wallet payment lock.
|
|
3
|
+
*
|
|
4
|
+
* v1 payments are nonce-serialized ON-LEDGER per sender: two payments from one
|
|
5
|
+
* wallet signed against the same TransferCommandCounter value can never both
|
|
6
|
+
* settle — the second is a doomed Send the facilitator refuses, and the client
|
|
7
|
+
* must re-sign (a fresh ~$0.40 TransferCommand Create) and try again. So
|
|
8
|
+
* CONCURRENT pays from the same wallet (parallel `canton-agent-wallet pay`
|
|
9
|
+
* processes, or parallel calls through one makePayingFetch) only ever race each
|
|
10
|
+
* other, burning Creates and losing rounds until the retry budget runs out.
|
|
11
|
+
*
|
|
12
|
+
* The cure is to serialize at the source: one payment dance per wallet at a
|
|
13
|
+
* time. The wallet identity IS its home directory (wallet.json), so the lock is
|
|
14
|
+
* a directory-based mutex in that same home — `mkdir` is atomic on every
|
|
15
|
+
* platform/filesystem we care about, works ACROSS PROCESSES, and needs no
|
|
16
|
+
* dependencies. A crashed holder is reclaimed via mtime staleness.
|
|
17
|
+
*
|
|
18
|
+
* Used by makePayingFetch only AFTER a request actually challenges with 402
|
|
19
|
+
* (probe first, lock second) so unpaid traffic through the wrapped fetch never
|
|
20
|
+
* queues behind a slow payment.
|
|
21
|
+
*/
|
|
22
|
+
import { mkdirSync, rmdirSync, statSync, utimesSync } from "node:fs";
|
|
23
|
+
import { join } from "node:path";
|
|
24
|
+
/** Serialize `fn` against every other payment from the same wallet home.
|
|
25
|
+
* Always releases — including when `fn` throws. */
|
|
26
|
+
export async function withPayLock(homeDir, fn, opts = {}) {
|
|
27
|
+
const staleMs = opts.staleMs ?? 300_000;
|
|
28
|
+
const timeoutMs = opts.timeoutMs ?? 600_000;
|
|
29
|
+
const pollMs = opts.pollMs ?? 400;
|
|
30
|
+
const lockDir = join(homeDir, ".pay-lock");
|
|
31
|
+
const deadline = Date.now() + timeoutMs;
|
|
32
|
+
for (;;) {
|
|
33
|
+
try {
|
|
34
|
+
mkdirSync(lockDir, { recursive: false });
|
|
35
|
+
break; // acquired
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
if (err.code !== "EEXIST")
|
|
39
|
+
throw err;
|
|
40
|
+
// Held by someone. Reclaim if the holder looks dead (stale mtime).
|
|
41
|
+
try {
|
|
42
|
+
const st = statSync(lockDir);
|
|
43
|
+
if (Date.now() - st.mtimeMs > staleMs) {
|
|
44
|
+
try {
|
|
45
|
+
rmdirSync(lockDir);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// Another waiter reclaimed it first — fine, re-loop.
|
|
49
|
+
}
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// Holder released between our mkdir and stat — retry immediately.
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (Date.now() >= deadline) {
|
|
58
|
+
throw new Error("pay lock timeout: another payment from this wallet has held the " +
|
|
59
|
+
`lock for over ${Math.round(timeoutMs / 1000)}s (${lockDir}). ` +
|
|
60
|
+
"If no other payment is running, delete that directory.");
|
|
61
|
+
}
|
|
62
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Heartbeat the mtime so a LEGITIMATELY long payment (first-payment
|
|
66
|
+
// dead-zone + retries) is not reclaimed-from-under-us by a waiter's
|
|
67
|
+
// staleness check.
|
|
68
|
+
const heartbeat = setInterval(() => {
|
|
69
|
+
try {
|
|
70
|
+
const now = new Date();
|
|
71
|
+
utimesSync(lockDir, now, now);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
// Lock dir vanished (manual cleanup) — nothing to heartbeat.
|
|
75
|
+
}
|
|
76
|
+
}, Math.max(1000, Math.floor(staleMs / 4)));
|
|
77
|
+
// Never keep the process alive just for the heartbeat.
|
|
78
|
+
heartbeat.unref?.();
|
|
79
|
+
try {
|
|
80
|
+
return await fn();
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
clearInterval(heartbeat);
|
|
84
|
+
try {
|
|
85
|
+
rmdirSync(lockDir);
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// Already gone (stale-reclaimed or manually removed) — nothing to do.
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=pay-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pay-lock.js","sourceRoot":"","sources":["../src/pay-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAcjC;oDACoD;AACpD,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAe,EACf,EAAoB,EACpB,OAAoB,EAAE;IAEtB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAExC,SAAS,CAAC;QACR,IAAI,CAAC;YACH,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK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CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,uDAAuD;IACvD,SAAS,CAAC,KAAK,EAAE,EAAE,CAAC;IAEpB,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,SAAS,CAAC,CAAC;QACzB,IAAI,CAAC;YACH,SAAS,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACP,sEAAsE;QACxE,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/pay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAQA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAInE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,OAAQ,SAAQ,gBAAgB;IAC/C,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,CAsBlC"}
|
package/dist/pay.js
CHANGED
|
@@ -8,12 +8,29 @@
|
|
|
8
8
|
import { wrapFetchWithCantonPayment } from "@ftptech/x402-canton-client";
|
|
9
9
|
import { ensureWallet } from "./onboard.js";
|
|
10
10
|
import { makeRelaySigner } from "./relay-signer.js";
|
|
11
|
+
import { withPayLock } from "./pay-lock.js";
|
|
12
|
+
import { walletDir } from "./store.js";
|
|
11
13
|
export async function makePayingFetch(opts) {
|
|
12
14
|
const wallet = await ensureWallet(opts);
|
|
13
15
|
const signer = makeRelaySigner(wallet, {
|
|
14
16
|
apiKey: opts.apiKey,
|
|
15
17
|
...(opts.hashBinding ? { hashBinding: opts.hashBinding } : {}),
|
|
16
18
|
});
|
|
17
|
-
|
|
19
|
+
const paying = wrapFetchWithCantonPayment(globalThis.fetch, signer);
|
|
20
|
+
const home = walletDir();
|
|
21
|
+
// Serialize PAYMENTS per wallet. v1 nonces are sequential per sender, so two
|
|
22
|
+
// concurrent payment dances from one wallet (parallel CLI processes or
|
|
23
|
+
// parallel calls through this fetch) only race each other: both sign the same
|
|
24
|
+
// counter value, at most one settles, the rest burn re-pay Creates losing the
|
|
25
|
+
// race round after round. Probe first WITHOUT the lock — only a request that
|
|
26
|
+
// actually challenges 402 enters the per-wallet queue, so non-paid traffic is
|
|
27
|
+
// never delayed. The probe is cheap (wrapFetch would probe anyway) and the
|
|
28
|
+
// wrapped call re-probes under the lock, so no state is carried across.
|
|
29
|
+
return async function lockedPayingFetch(input, init) {
|
|
30
|
+
const probe = await globalThis.fetch(input, init);
|
|
31
|
+
if (probe.status !== 402)
|
|
32
|
+
return probe;
|
|
33
|
+
return withPayLock(home, () => paying(input, init));
|
|
34
|
+
};
|
|
18
35
|
}
|
|
19
36
|
//# sourceMappingURL=pay.js.map
|
package/dist/pay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay.js","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAyB,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"pay.js","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,0BA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KeyFingerprint: string;
|
|
9
9
|
createdAt: string;
|
|
10
10
|
}
|
|
11
|
+
/** The wallet home directory (CANTON_AGENT_HOME or ~/.canton-agent). Exported
|
|
12
|
+
* for the per-wallet pay lock, which keys on the same directory. */
|
|
13
|
+
export declare function walletDir(): string;
|
|
11
14
|
export declare function walletPath(): string;
|
|
12
15
|
export declare function walletExists(): boolean;
|
|
13
16
|
export declare function loadWallet(): AgentWallet | null;
|
package/dist/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,UAAU,IAAI,WAAW,GAAG,IAAI,CAI/C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,CAM/C"}
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD;qEACqE;AACrE,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,UAAU,IAAI,WAAW,GAAG,IAAI,CAI/C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI,CAM/C"}
|
package/dist/store.js
CHANGED
|
@@ -11,6 +11,11 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync, chmodSync, } from "
|
|
|
11
11
|
function dir() {
|
|
12
12
|
return process.env.CANTON_AGENT_HOME || join(homedir(), ".canton-agent");
|
|
13
13
|
}
|
|
14
|
+
/** The wallet home directory (CANTON_AGENT_HOME or ~/.canton-agent). Exported
|
|
15
|
+
* for the per-wallet pay lock, which keys on the same directory. */
|
|
16
|
+
export function walletDir() {
|
|
17
|
+
return dir();
|
|
18
|
+
}
|
|
14
19
|
export function walletPath() {
|
|
15
20
|
return join(dir(), "wallet.json");
|
|
16
21
|
}
|
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,SAAS,CAAC;AAajB,SAAS,GAAG;IACV,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MA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,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAgB,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAc;IACvC,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,SAAS,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACrE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,yDAAyD;AAChF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftptech/canton-agent-wallet",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.13",
|
|
5
5
|
"description": "Self-custody Canton wallet + x402 autopay for AI agents. One CLI: create, pay, balance, withdraw, export, import. Backs the canton-x402-agent skill.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "FTP team",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@canton-network/core-ledger-proto": "~1.4.0",
|
|
21
21
|
"undici": "^7.1.0",
|
|
22
22
|
"@ftptech/x402-canton-ledger": "0.1.0",
|
|
23
|
-
"@ftptech/x402-canton-client": "0.1.
|
|
23
|
+
"@ftptech/x402-canton-client": "0.1.3"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|