@unlink-xyz/multisig 0.1.4 → 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/dist/browser/index.js +255 -63
- package/dist/browser/index.js.map +1 -1
- package/dist/src/frost/account.d.ts +8 -0
- package/dist/src/frost/account.d.ts.map +1 -1
- package/dist/src/frost/account.js +16 -10
- package/dist/src/frost/coordinator.d.ts +10 -2
- package/dist/src/frost/coordinator.d.ts.map +1 -1
- package/dist/src/frost/coordinator.js +48 -20
- package/dist/src/frost/listener.d.ts +13 -8
- package/dist/src/frost/listener.d.ts.map +1 -1
- package/dist/src/frost/listener.js +20 -4
- package/dist/src/frost/mock-coordinator.d.ts.map +1 -1
- package/dist/src/frost/mock-coordinator.js +4 -1
- package/dist/src/frost/serialization.d.ts +1 -0
- package/dist/src/frost/serialization.d.ts.map +1 -1
- package/dist/src/frost/serialization.js +6 -1
- package/dist/src/frost/types.d.ts +2 -0
- package/dist/src/frost/types.d.ts.map +1 -1
- package/dist/src/wallet/types.d.ts +4 -0
- package/dist/src/wallet/types.d.ts.map +1 -1
- package/dist/src/wallet/wallet.d.ts.map +1 -1
- package/dist/src/wallet/wallet.js +7 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -8
|
@@ -11,6 +11,7 @@ export declare function createMultisig(params: {
|
|
|
11
11
|
threshold: number;
|
|
12
12
|
totalShares: number;
|
|
13
13
|
gatewayUrl: string;
|
|
14
|
+
frostUrl?: string;
|
|
14
15
|
viewingKeyPair?: ViewingKeyPair;
|
|
15
16
|
}): Promise<{
|
|
16
17
|
groupId: string;
|
|
@@ -19,6 +20,7 @@ export declare function createMultisig(params: {
|
|
|
19
20
|
export declare function joinMultisig(params: {
|
|
20
21
|
code: string;
|
|
21
22
|
gatewayUrl: string;
|
|
23
|
+
frostUrl?: string;
|
|
22
24
|
viewingKeyPair?: ViewingKeyPair;
|
|
23
25
|
}): Promise<MultisigAccount>;
|
|
24
26
|
export declare function signMultisig(params: {
|
|
@@ -31,9 +33,15 @@ export declare function signMultisig(params: {
|
|
|
31
33
|
*
|
|
32
34
|
* Each sign() call creates a fresh signing session on the coordinator,
|
|
33
35
|
* so the signer can be called multiple times without nonce reuse.
|
|
36
|
+
*
|
|
37
|
+
* `metadata` and `onSessionCreated` are captured at construction time because
|
|
38
|
+
* the Signer interface from @unlink-xyz/core is fixed (sign(message) → signature),
|
|
39
|
+
* so session-level concerns cannot be passed per-call.
|
|
34
40
|
*/
|
|
35
41
|
export declare function createFrostSigner(params: {
|
|
36
42
|
account: MultisigAccount;
|
|
37
43
|
participants: number[];
|
|
44
|
+
metadata?: Record<string, string>;
|
|
45
|
+
onSessionCreated?: (code: string) => void;
|
|
38
46
|
}): Signer;
|
|
39
47
|
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/frost/account.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAC;AAU1B,OAAO,KAAK,EAIV,cAAc,EACd,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/frost/account.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAC;AAU1B,OAAO,KAAK,EAIV,cAAc,EACd,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AA6EpB,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;CAAE,CAAC,CAyDzE;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,GAAG,OAAO,CAAC,eAAe,CAAC,CAyC3B;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,GAAG,OAAO,CAAC,cAAc,CAAC,CA0C1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,OAAO,EAAE,eAAe,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,GAAG,MAAM,CAwBT"}
|
|
@@ -10,8 +10,8 @@ import { FrostCoordinator } from "./coordinator.js";
|
|
|
10
10
|
import { babyjubjub, modMul } from "./curve.js";
|
|
11
11
|
import { dkgFinalize, dkgRound1, dkgRound2 } from "./dkg.js";
|
|
12
12
|
import { aggregateSignatures, generateCommitment, generateSignatureShare, } from "./signing.js";
|
|
13
|
-
function
|
|
14
|
-
return `${gatewayUrl.replace(/\/$/, "")}/frost`;
|
|
13
|
+
function resolveFrostUrl(gatewayUrl, explicitFrostUrl) {
|
|
14
|
+
return explicitFrostUrl ?? `${gatewayUrl.replace(/\/$/, "")}/frost`;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Derive a participant's verification share from coefficient commitments.
|
|
@@ -29,7 +29,7 @@ function deriveVerificationShare(participantIndex, coefficientCommitments) {
|
|
|
29
29
|
}
|
|
30
30
|
return result;
|
|
31
31
|
}
|
|
32
|
-
function buildMultisigAccount(result, viewingKeyPair, groupId, config, participantIndex, gatewayUrl) {
|
|
32
|
+
function buildMultisigAccount(result, viewingKeyPair, groupId, config, participantIndex, gatewayUrl, frostUrl) {
|
|
33
33
|
const nullifyingKey = computeNullifyingKey(viewingKeyPair.privateKey);
|
|
34
34
|
const masterPublicKey = computeMasterPublicKey(result.groupPublicKey, nullifyingKey);
|
|
35
35
|
const address = encodeAddress({
|
|
@@ -47,6 +47,7 @@ function buildMultisigAccount(result, viewingKeyPair, groupId, config, participa
|
|
|
47
47
|
nullifyingKey,
|
|
48
48
|
masterPublicKey,
|
|
49
49
|
gatewayUrl,
|
|
50
|
+
...(frostUrl !== undefined ? { frostUrl } : {}),
|
|
50
51
|
address,
|
|
51
52
|
};
|
|
52
53
|
}
|
|
@@ -69,7 +70,7 @@ export async function createMultisig(params) {
|
|
|
69
70
|
totalShares: params.totalShares,
|
|
70
71
|
};
|
|
71
72
|
const coordinator = new FrostCoordinator({
|
|
72
|
-
baseUrl:
|
|
73
|
+
baseUrl: resolveFrostUrl(params.gatewayUrl, params.frostUrl),
|
|
73
74
|
});
|
|
74
75
|
const { code } = await coordinator.createDkgSession(config.threshold, config.totalShares);
|
|
75
76
|
// Round 1 — generate + submit eagerly so joiners see it
|
|
@@ -88,13 +89,13 @@ export async function createMultisig(params) {
|
|
|
88
89
|
if (!viewingKeyPair) {
|
|
89
90
|
throw new Error("No viewing key available after DKG — at least one participant must provide a viewingKeyPair");
|
|
90
91
|
}
|
|
91
|
-
return buildMultisigAccount(result, viewingKeyPair, code, config, 1, params.gatewayUrl);
|
|
92
|
+
return buildMultisigAccount(result, viewingKeyPair, code, config, 1, params.gatewayUrl, params.frostUrl);
|
|
92
93
|
},
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
96
|
export async function joinMultisig(params) {
|
|
96
97
|
const coordinator = new FrostCoordinator({
|
|
97
|
-
baseUrl:
|
|
98
|
+
baseUrl: resolveFrostUrl(params.gatewayUrl, params.frostUrl),
|
|
98
99
|
});
|
|
99
100
|
const { participantIndex, threshold, totalParticipants } = await coordinator.joinDkgSession(params.code);
|
|
100
101
|
const config = { threshold, totalShares: totalParticipants };
|
|
@@ -110,11 +111,11 @@ export async function joinMultisig(params) {
|
|
|
110
111
|
if (!viewingKeyPair) {
|
|
111
112
|
throw new Error("No viewing key available after DKG — at least one participant must provide a viewingKeyPair");
|
|
112
113
|
}
|
|
113
|
-
return buildMultisigAccount(result, viewingKeyPair, params.code, config, participantIndex, params.gatewayUrl);
|
|
114
|
+
return buildMultisigAccount(result, viewingKeyPair, params.code, config, participantIndex, params.gatewayUrl, params.frostUrl);
|
|
114
115
|
}
|
|
115
116
|
export async function signMultisig(params) {
|
|
116
117
|
const coordinator = new FrostCoordinator({
|
|
117
|
-
baseUrl:
|
|
118
|
+
baseUrl: resolveFrostUrl(params.account.gatewayUrl, params.account.frostUrl),
|
|
118
119
|
});
|
|
119
120
|
const { nonces, commitment } = generateCommitment(params.account.participantIndex);
|
|
120
121
|
await coordinator.submitCommitment(params.signingSessionCode, commitment);
|
|
@@ -137,15 +138,20 @@ export async function signMultisig(params) {
|
|
|
137
138
|
*
|
|
138
139
|
* Each sign() call creates a fresh signing session on the coordinator,
|
|
139
140
|
* so the signer can be called multiple times without nonce reuse.
|
|
141
|
+
*
|
|
142
|
+
* `metadata` and `onSessionCreated` are captured at construction time because
|
|
143
|
+
* the Signer interface from @unlink-xyz/core is fixed (sign(message) → signature),
|
|
144
|
+
* so session-level concerns cannot be passed per-call.
|
|
140
145
|
*/
|
|
141
146
|
export function createFrostSigner(params) {
|
|
142
147
|
return {
|
|
143
148
|
publicKey: params.account.groupPublicKey,
|
|
144
149
|
sign: async (message) => {
|
|
145
150
|
const coordinator = new FrostCoordinator({
|
|
146
|
-
baseUrl:
|
|
151
|
+
baseUrl: resolveFrostUrl(params.account.gatewayUrl, params.account.frostUrl),
|
|
147
152
|
});
|
|
148
|
-
const { code } = await coordinator.createSigningSession(params.participants, message, params.account.groupId);
|
|
153
|
+
const { code } = await coordinator.createSigningSession(params.participants, message, params.account.groupId, params.metadata);
|
|
154
|
+
params.onSessionCreated?.(code);
|
|
149
155
|
return signMultisig({
|
|
150
156
|
account: params.account,
|
|
151
157
|
message,
|
|
@@ -7,15 +7,21 @@
|
|
|
7
7
|
import type { DkgRound1Package, DkgRound2Package, SignatureShare, SigningCommitment } from "./types.js";
|
|
8
8
|
export interface CoordinatorConfig {
|
|
9
9
|
baseUrl: string;
|
|
10
|
-
/** Polling interval in ms (default
|
|
10
|
+
/** Polling interval in ms (default 3000) */
|
|
11
11
|
pollIntervalMs?: number;
|
|
12
12
|
/** Timeout in ms (default 60000) */
|
|
13
13
|
timeoutMs?: number;
|
|
14
|
+
/** Max retries for transient errors (default 3) */
|
|
15
|
+
maxRetries?: number;
|
|
16
|
+
/** Initial retry delay in ms (default 500) */
|
|
17
|
+
retryDelayMs?: number;
|
|
14
18
|
}
|
|
15
19
|
export declare class FrostCoordinator {
|
|
16
20
|
private baseUrl;
|
|
17
21
|
private pollIntervalMs;
|
|
18
22
|
private timeoutMs;
|
|
23
|
+
private maxRetries;
|
|
24
|
+
private retryDelayMs;
|
|
19
25
|
constructor(config: CoordinatorConfig);
|
|
20
26
|
createDkgSession(threshold: number, totalParticipants: number): Promise<{
|
|
21
27
|
code: string;
|
|
@@ -29,7 +35,7 @@ export declare class FrostCoordinator {
|
|
|
29
35
|
waitForRound1(code: string): Promise<DkgRound1Package[]>;
|
|
30
36
|
submitRound2(code: string, pkg: DkgRound2Package): Promise<void>;
|
|
31
37
|
waitForRound2(code: string): Promise<DkgRound2Package[]>;
|
|
32
|
-
createSigningSession(participants: number[], message: bigint, groupId?: string): Promise<{
|
|
38
|
+
createSigningSession(participants: number[], message: bigint, groupId?: string, metadata?: Record<string, string>): Promise<{
|
|
33
39
|
code: string;
|
|
34
40
|
}>;
|
|
35
41
|
submitCommitment(code: string, c: SigningCommitment): Promise<void>;
|
|
@@ -48,6 +54,7 @@ export declare class FrostCoordinator {
|
|
|
48
54
|
private pollCommitments;
|
|
49
55
|
private pollShares;
|
|
50
56
|
private pollUntilComplete;
|
|
57
|
+
private fetchWithRetry;
|
|
51
58
|
private toError;
|
|
52
59
|
}
|
|
53
60
|
export type SigningSessionInfo = {
|
|
@@ -56,5 +63,6 @@ export type SigningSessionInfo = {
|
|
|
56
63
|
participants: number[];
|
|
57
64
|
status: string;
|
|
58
65
|
groupId?: string;
|
|
66
|
+
metadata?: Record<string, string>;
|
|
59
67
|
};
|
|
60
68
|
//# sourceMappingURL=coordinator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/frost/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/frost/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAA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,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAO9D,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAe/D,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAOtD,uBAAuB,CAC3B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IASzC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAS5D,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IASnE,qBAAqB,CACzB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,kBAAkB,CAAC;YAiBhB,UAAU;YAUV,UAAU;YAUV,eAAe;YAUf,UAAU;YAUV,iBAAiB;YAejB,cAAc;YAkBd,OAAO;CAYtB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC"}
|
|
@@ -9,14 +9,18 @@ export class FrostCoordinator {
|
|
|
9
9
|
baseUrl;
|
|
10
10
|
pollIntervalMs;
|
|
11
11
|
timeoutMs;
|
|
12
|
+
maxRetries;
|
|
13
|
+
retryDelayMs;
|
|
12
14
|
constructor(config) {
|
|
13
15
|
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
14
|
-
this.pollIntervalMs = config.pollIntervalMs ??
|
|
16
|
+
this.pollIntervalMs = config.pollIntervalMs ?? 3000;
|
|
15
17
|
this.timeoutMs = config.timeoutMs ?? 120000;
|
|
18
|
+
this.maxRetries = config.maxRetries ?? 3;
|
|
19
|
+
this.retryDelayMs = config.retryDelayMs ?? 500;
|
|
16
20
|
}
|
|
17
21
|
// === DKG ===
|
|
18
22
|
async createDkgSession(threshold, totalParticipants) {
|
|
19
|
-
const resp = await
|
|
23
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups`, {
|
|
20
24
|
method: "POST",
|
|
21
25
|
headers: { "Content-Type": "application/json" },
|
|
22
26
|
body: JSON.stringify({
|
|
@@ -30,9 +34,7 @@ export class FrostCoordinator {
|
|
|
30
34
|
return { code: body.code };
|
|
31
35
|
}
|
|
32
36
|
async joinDkgSession(code) {
|
|
33
|
-
const resp = await
|
|
34
|
-
method: "POST",
|
|
35
|
-
});
|
|
37
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups/${code}/join`, { method: "POST" });
|
|
36
38
|
if (!resp.ok)
|
|
37
39
|
throw await this.toError(resp);
|
|
38
40
|
const body = (await resp.json());
|
|
@@ -43,7 +45,7 @@ export class FrostCoordinator {
|
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
47
|
async submitRound1(code, pkg) {
|
|
46
|
-
const resp = await
|
|
48
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups/${code}/round1`, {
|
|
47
49
|
method: "POST",
|
|
48
50
|
headers: { "Content-Type": "application/json" },
|
|
49
51
|
body: JSON.stringify({
|
|
@@ -58,7 +60,7 @@ export class FrostCoordinator {
|
|
|
58
60
|
return this.pollUntilComplete(() => this.pollRound1(code), deserializeDkgRound1Package);
|
|
59
61
|
}
|
|
60
62
|
async submitRound2(code, pkg) {
|
|
61
|
-
const resp = await
|
|
63
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups/${code}/round2`, {
|
|
62
64
|
method: "POST",
|
|
63
65
|
headers: { "Content-Type": "application/json" },
|
|
64
66
|
body: JSON.stringify({
|
|
@@ -73,7 +75,7 @@ export class FrostCoordinator {
|
|
|
73
75
|
return this.pollUntilComplete(() => this.pollRound2(code), deserializeDkgRound2Package);
|
|
74
76
|
}
|
|
75
77
|
// === Signing ===
|
|
76
|
-
async createSigningSession(participants, message, groupId) {
|
|
78
|
+
async createSigningSession(participants, message, groupId, metadata) {
|
|
77
79
|
const body = {
|
|
78
80
|
participants,
|
|
79
81
|
message: serializeBigint(message),
|
|
@@ -81,7 +83,10 @@ export class FrostCoordinator {
|
|
|
81
83
|
if (groupId !== undefined) {
|
|
82
84
|
body.group_id = groupId;
|
|
83
85
|
}
|
|
84
|
-
|
|
86
|
+
if (metadata !== undefined) {
|
|
87
|
+
body.metadata = metadata;
|
|
88
|
+
}
|
|
89
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions`, {
|
|
85
90
|
method: "POST",
|
|
86
91
|
headers: { "Content-Type": "application/json" },
|
|
87
92
|
body: JSON.stringify(body),
|
|
@@ -92,7 +97,7 @@ export class FrostCoordinator {
|
|
|
92
97
|
return { code: result.code };
|
|
93
98
|
}
|
|
94
99
|
async submitCommitment(code, c) {
|
|
95
|
-
const resp = await
|
|
100
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}/commitments`, {
|
|
96
101
|
method: "POST",
|
|
97
102
|
headers: { "Content-Type": "application/json" },
|
|
98
103
|
body: JSON.stringify({
|
|
@@ -107,7 +112,7 @@ export class FrostCoordinator {
|
|
|
107
112
|
return this.pollUntilComplete(() => this.pollCommitments(code), deserializeSigningCommitment);
|
|
108
113
|
}
|
|
109
114
|
async submitShare(code, share) {
|
|
110
|
-
const resp = await
|
|
115
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}/shares`, {
|
|
111
116
|
method: "POST",
|
|
112
117
|
headers: { "Content-Type": "application/json" },
|
|
113
118
|
body: JSON.stringify({
|
|
@@ -122,21 +127,21 @@ export class FrostCoordinator {
|
|
|
122
127
|
return this.pollUntilComplete(() => this.pollShares(code), deserializeSignatureShare);
|
|
123
128
|
}
|
|
124
129
|
async getSigningSessionStatus(code) {
|
|
125
|
-
const resp = await
|
|
130
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}/status`);
|
|
126
131
|
if (!resp.ok)
|
|
127
132
|
throw await this.toError(resp);
|
|
128
133
|
const body = (await resp.json());
|
|
129
134
|
return { ...body, message: deserializeBigint(body.message) };
|
|
130
135
|
}
|
|
131
136
|
async getSigningSession(code) {
|
|
132
|
-
const resp = await
|
|
137
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}`);
|
|
133
138
|
if (!resp.ok)
|
|
134
139
|
throw await this.toError(resp);
|
|
135
140
|
const body = (await resp.json());
|
|
136
141
|
return deserializeSessionInfo(body);
|
|
137
142
|
}
|
|
138
143
|
async listSigningSessions(groupId) {
|
|
139
|
-
const resp = await
|
|
144
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions?group_id=${encodeURIComponent(groupId)}`);
|
|
140
145
|
if (!resp.ok)
|
|
141
146
|
throw await this.toError(resp);
|
|
142
147
|
const body = (await resp.json());
|
|
@@ -152,31 +157,31 @@ export class FrostCoordinator {
|
|
|
152
157
|
if (sessions.length > 0) {
|
|
153
158
|
return sessions[0];
|
|
154
159
|
}
|
|
155
|
-
await sleep(this.pollIntervalMs);
|
|
160
|
+
await sleep(this.pollIntervalMs * (0.8 + Math.random() * 0.4));
|
|
156
161
|
}
|
|
157
162
|
throw new Error("Coordinator polling timeout");
|
|
158
163
|
}
|
|
159
164
|
// === Internal ===
|
|
160
165
|
async pollRound1(code) {
|
|
161
|
-
const resp = await
|
|
166
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups/${code}/round1`);
|
|
162
167
|
if (!resp.ok)
|
|
163
168
|
throw await this.toError(resp);
|
|
164
169
|
return (await resp.json());
|
|
165
170
|
}
|
|
166
171
|
async pollRound2(code) {
|
|
167
|
-
const resp = await
|
|
172
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/dkg/groups/${code}/round2`);
|
|
168
173
|
if (!resp.ok)
|
|
169
174
|
throw await this.toError(resp);
|
|
170
175
|
return (await resp.json());
|
|
171
176
|
}
|
|
172
177
|
async pollCommitments(code) {
|
|
173
|
-
const resp = await
|
|
178
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}/commitments`);
|
|
174
179
|
if (!resp.ok)
|
|
175
180
|
throw await this.toError(resp);
|
|
176
181
|
return (await resp.json());
|
|
177
182
|
}
|
|
178
183
|
async pollShares(code) {
|
|
179
|
-
const resp = await
|
|
184
|
+
const resp = await this.fetchWithRetry(`${this.baseUrl}/sign/sessions/${code}/shares`);
|
|
180
185
|
if (!resp.ok)
|
|
181
186
|
throw await this.toError(resp);
|
|
182
187
|
return (await resp.json());
|
|
@@ -188,12 +193,31 @@ export class FrostCoordinator {
|
|
|
188
193
|
if (result.complete) {
|
|
189
194
|
return result.packages.map((p) => deserializeFn(p));
|
|
190
195
|
}
|
|
191
|
-
await sleep(this.pollIntervalMs);
|
|
196
|
+
await sleep(this.pollIntervalMs * (0.8 + Math.random() * 0.4));
|
|
192
197
|
}
|
|
193
198
|
throw new Error("Coordinator polling timeout");
|
|
194
199
|
}
|
|
200
|
+
async fetchWithRetry(url, init) {
|
|
201
|
+
let lastError;
|
|
202
|
+
for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
|
|
203
|
+
if (attempt > 0) {
|
|
204
|
+
await sleep(this.retryDelayMs * 2 ** (attempt - 1));
|
|
205
|
+
}
|
|
206
|
+
const resp = await fetch(url, init);
|
|
207
|
+
if (resp.ok || !isTransientError(resp.status)) {
|
|
208
|
+
return resp;
|
|
209
|
+
}
|
|
210
|
+
lastError = await this.toError(resp);
|
|
211
|
+
}
|
|
212
|
+
throw lastError;
|
|
213
|
+
}
|
|
195
214
|
async toError(resp) {
|
|
196
215
|
const body = await resp.text();
|
|
216
|
+
const isHtml = body.trimStart().startsWith("<") ||
|
|
217
|
+
resp.headers.get("content-type")?.includes("text/html");
|
|
218
|
+
if (isHtml) {
|
|
219
|
+
return new Error(`Coordinator unavailable (HTTP ${resp.status}). The service may be temporarily overloaded — try again shortly.`);
|
|
220
|
+
}
|
|
197
221
|
return new Error(`Coordinator error ${resp.status}: ${body}`);
|
|
198
222
|
}
|
|
199
223
|
}
|
|
@@ -204,8 +228,12 @@ function deserializeSessionInfo(raw) {
|
|
|
204
228
|
participants: raw.participants,
|
|
205
229
|
status: raw.status,
|
|
206
230
|
groupId: raw.group_id ?? undefined,
|
|
231
|
+
metadata: raw.metadata,
|
|
207
232
|
};
|
|
208
233
|
}
|
|
234
|
+
function isTransientError(status) {
|
|
235
|
+
return status === 502 || status === 503 || status === 504;
|
|
236
|
+
}
|
|
209
237
|
function sleep(ms) {
|
|
210
238
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
211
239
|
}
|
|
@@ -5,20 +5,25 @@
|
|
|
5
5
|
* sessions created by the initiator's reusable signer.
|
|
6
6
|
*/
|
|
7
7
|
import type { MultisigAccount } from "./types.js";
|
|
8
|
+
/** Session info passed to listener callbacks. */
|
|
9
|
+
export type SessionEvent = {
|
|
10
|
+
code: string;
|
|
11
|
+
message: bigint;
|
|
12
|
+
metadata?: Record<string, string>;
|
|
13
|
+
};
|
|
8
14
|
export type SigningListenerParams = {
|
|
9
15
|
account: MultisigAccount;
|
|
10
16
|
/** Abort to stop the listener loop. */
|
|
11
17
|
signal?: AbortSignal;
|
|
12
18
|
/** Called when a new session is discovered. */
|
|
13
|
-
onSession?: (session:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
onSession?: (session: SessionEvent) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Called before signing. Return false to skip this session.
|
|
22
|
+
* If omitted, all sessions are signed automatically.
|
|
23
|
+
*/
|
|
24
|
+
approve?: (session: SessionEvent) => Promise<boolean> | boolean;
|
|
17
25
|
/** Called when signing a session fails. Return true to continue, false to stop. */
|
|
18
|
-
onError?: (error: unknown, session:
|
|
19
|
-
code: string;
|
|
20
|
-
message: bigint;
|
|
21
|
-
}) => boolean;
|
|
26
|
+
onError?: (error: unknown, session: SessionEvent) => boolean;
|
|
22
27
|
/** Polling interval in ms (default 1000). */
|
|
23
28
|
pollIntervalMs?: number;
|
|
24
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/frost/listener.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,eAAe,CAAC;IACzB,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/frost/listener.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,eAAe,CAAC;IACzB,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAChE,mFAAmF;IACnF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC;IAC7D,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAoEf"}
|
|
@@ -12,10 +12,10 @@ import { FrostCoordinator } from "./coordinator.js";
|
|
|
12
12
|
* Runs until the AbortSignal fires or an unrecoverable error occurs.
|
|
13
13
|
*/
|
|
14
14
|
export async function runSigningListener(params) {
|
|
15
|
-
const { account, signal, onSession, onError } = params;
|
|
15
|
+
const { account, signal, onSession, approve, onError } = params;
|
|
16
16
|
const pollIntervalMs = params.pollIntervalMs ?? 1000;
|
|
17
17
|
const coordinator = new FrostCoordinator({
|
|
18
|
-
baseUrl: `${account.gatewayUrl.replace(/\/$/, "")}/frost`,
|
|
18
|
+
baseUrl: account.frostUrl ?? `${account.gatewayUrl.replace(/\/$/, "")}/frost`,
|
|
19
19
|
pollIntervalMs,
|
|
20
20
|
});
|
|
21
21
|
const seen = new Set();
|
|
@@ -34,11 +34,27 @@ export async function runSigningListener(params) {
|
|
|
34
34
|
seen.add(session.code);
|
|
35
35
|
continue;
|
|
36
36
|
}
|
|
37
|
+
const info = {
|
|
38
|
+
code: session.code,
|
|
39
|
+
message: session.message,
|
|
40
|
+
metadata: session.metadata,
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
onSession?.(info);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
// Callback errors should not loop forever on the same session.
|
|
47
|
+
seen.add(session.code);
|
|
48
|
+
const shouldContinue = onError?.(err, info) ?? true;
|
|
49
|
+
if (!shouldContinue)
|
|
50
|
+
return;
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (approve && !(await approve(info)))
|
|
54
|
+
continue;
|
|
37
55
|
// Mark as seen BEFORE signing — FROST signing is non-idempotent
|
|
38
56
|
// (nonce published on submitCommitment), so retrying is never safe.
|
|
39
57
|
seen.add(session.code);
|
|
40
|
-
const info = { code: session.code, message: session.message };
|
|
41
|
-
onSession?.(info);
|
|
42
58
|
try {
|
|
43
59
|
await signMultisig({
|
|
44
60
|
account,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-coordinator.d.ts","sourceRoot":"","sources":["../../../src/frost/mock-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"mock-coordinator.d.ts","sourceRoot":"","sources":["../../../src/frost/mock-coordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoDH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC,CAoRD"}
|
|
@@ -161,6 +161,7 @@ export async function startMockCoordinator() {
|
|
|
161
161
|
participants: s.participants,
|
|
162
162
|
message: s.message,
|
|
163
163
|
group_id: s.groupId ?? null,
|
|
164
|
+
metadata: s.metadata ?? undefined,
|
|
164
165
|
});
|
|
165
166
|
}
|
|
166
167
|
return json(res, 200, { sessions });
|
|
@@ -183,10 +184,11 @@ export async function startMockCoordinator() {
|
|
|
183
184
|
participants: s.participants,
|
|
184
185
|
message: s.message,
|
|
185
186
|
group_id: s.groupId ?? null,
|
|
187
|
+
metadata: s.metadata ?? undefined,
|
|
186
188
|
});
|
|
187
189
|
}
|
|
188
190
|
if (method === "POST" && url === "/sign/sessions") {
|
|
189
|
-
const { participants, message, group_id } = JSON.parse(await readBody(req));
|
|
191
|
+
const { participants, message, group_id, metadata } = JSON.parse(await readBody(req));
|
|
190
192
|
if (!Array.isArray(participants) || participants.length < 2)
|
|
191
193
|
return err(res, 400, "need at least 2 participants");
|
|
192
194
|
if (participants.includes(0))
|
|
@@ -196,6 +198,7 @@ export async function startMockCoordinator() {
|
|
|
196
198
|
participants,
|
|
197
199
|
message,
|
|
198
200
|
groupId: group_id ?? undefined,
|
|
201
|
+
metadata: metadata ?? undefined,
|
|
199
202
|
commitments: [],
|
|
200
203
|
commitmentIndices: new Set(),
|
|
201
204
|
shares: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../src/frost/serialization.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAGhB,WAAW,EACX,eAAe,EAEf,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAS7D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAOxD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOxD;AAID,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,C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AAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,sBAAsB,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IACvD,cAAc,EAAE,wBAAwB,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,GACvB,yBAAyB,CA+B3B;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,yBAAyB,GAC9B,eAAe,CA+BjB"}
|
|
@@ -140,7 +140,7 @@ export function serializeMultisigAccount(account) {
|
|
|
140
140
|
for (const [idx, points] of account.coefficientCommitments) {
|
|
141
141
|
coeffEntries.push([idx, points.map(serializePoint)]);
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
const result = {
|
|
144
144
|
version: MULTISIG_ACCOUNT_VERSION,
|
|
145
145
|
groupId: account.groupId,
|
|
146
146
|
config: account.config,
|
|
@@ -161,6 +161,10 @@ export function serializeMultisigAccount(account) {
|
|
|
161
161
|
gatewayUrl: account.gatewayUrl,
|
|
162
162
|
address: account.address,
|
|
163
163
|
};
|
|
164
|
+
if (account.name !== undefined) {
|
|
165
|
+
result.name = account.name;
|
|
166
|
+
}
|
|
167
|
+
return result;
|
|
164
168
|
}
|
|
165
169
|
export function deserializeMultisigAccount(data) {
|
|
166
170
|
if (data.version !== MULTISIG_ACCOUNT_VERSION) {
|
|
@@ -171,6 +175,7 @@ export function deserializeMultisigAccount(data) {
|
|
|
171
175
|
coefficientCommitments.set(idx, serializedPoints.map(deserializePoint));
|
|
172
176
|
}
|
|
173
177
|
return {
|
|
178
|
+
...(data.name !== undefined ? { name: data.name } : {}),
|
|
174
179
|
groupId: data.groupId,
|
|
175
180
|
config: data.config,
|
|
176
181
|
participantIndex: data.participantIndex,
|
|
@@ -138,6 +138,7 @@ export type DkgResult = {
|
|
|
138
138
|
* High-level multisig account with derived keys and address.
|
|
139
139
|
*/
|
|
140
140
|
export type MultisigAccount = {
|
|
141
|
+
name?: string;
|
|
141
142
|
groupId: string;
|
|
142
143
|
config: FrostConfig;
|
|
143
144
|
participantIndex: number;
|
|
@@ -149,6 +150,7 @@ export type MultisigAccount = {
|
|
|
149
150
|
nullifyingKey: bigint;
|
|
150
151
|
masterPublicKey: bigint;
|
|
151
152
|
gatewayUrl: string;
|
|
153
|
+
frostUrl?: string;
|
|
152
154
|
address: string;
|
|
153
155
|
};
|
|
154
156
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/frost/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,iBAAiB,EAAE,KAAK,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,wBAAwB;IACxB,gBAAgB,EAAE,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C;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,KAAK,CAAC;IACtB,8EAA8E;IAC9E,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7C,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { AccountView, Signer } from "@unlink-xyz/core";
|
|
|
2
2
|
import type { MultisigAccount, ViewingKeyPair } from "../frost/types.js";
|
|
3
3
|
export type MultisigWalletConfig = {
|
|
4
4
|
gatewayUrl: string;
|
|
5
|
+
frostUrl?: string;
|
|
5
6
|
};
|
|
6
7
|
export type CreateParams = {
|
|
7
8
|
threshold: number;
|
|
@@ -15,11 +16,14 @@ export type JoinParams = {
|
|
|
15
16
|
export type CreateSignerParams = {
|
|
16
17
|
account: MultisigAccount;
|
|
17
18
|
participants: number[];
|
|
19
|
+
metadata?: Record<string, string>;
|
|
20
|
+
onSessionCreated?: (code: string) => void;
|
|
18
21
|
};
|
|
19
22
|
export type CreateSigningSessionParams = {
|
|
20
23
|
participants: number[];
|
|
21
24
|
message: bigint;
|
|
22
25
|
groupId?: string;
|
|
26
|
+
metadata?: Record<string, string>;
|
|
23
27
|
};
|
|
24
28
|
export type MultisigWallet = {
|
|
25
29
|
create(params: CreateParams): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/wallet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,k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AAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;KAC1C,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACnD,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CAAC;IACrD,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACjD,oBAAoB,CAClB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/wallet/wallet.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAKV,cAAc,EACd,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,oBAAoB,GAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/wallet/wallet.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAKV,cAAc,EACd,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,oBAAoB,GAC3B,cAAc,CAqDhB"}
|