@openzeppelin/miden-multisig-client 0.17.0-rc.2 → 0.17.0-rc.3
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 +167 -42
- package/dist/account/builder.d.ts +2 -2
- package/dist/account/builder.d.ts.map +1 -1
- package/dist/account/builder.js +49 -24
- package/dist/account/builder.js.map +1 -1
- package/dist/connectivity.d.ts +2 -0
- package/dist/connectivity.d.ts.map +1 -1
- package/dist/connectivity.js +7 -4
- package/dist/connectivity.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/multisig/authArgErrors.d.ts +59 -0
- package/dist/multisig/authArgErrors.d.ts.map +1 -0
- package/dist/multisig/authArgErrors.js +115 -0
- package/dist/multisig/authArgErrors.js.map +1 -0
- package/dist/multisig/helpers.d.ts +5 -0
- package/dist/multisig/helpers.d.ts.map +1 -1
- package/dist/multisig/helpers.js +7 -2
- package/dist/multisig/helpers.js.map +1 -1
- package/dist/multisig.d.ts +140 -0
- package/dist/multisig.d.ts.map +1 -1
- package/dist/multisig.js +419 -12
- package/dist/multisig.js.map +1 -1
- package/dist/procedures.d.ts +1 -1
- package/dist/procedures.js +1 -1
- package/dist/recovery/proposalNoteImport.d.ts +173 -0
- package/dist/recovery/proposalNoteImport.d.ts.map +1 -0
- package/dist/recovery/proposalNoteImport.js +411 -0
- package/dist/recovery/proposalNoteImport.js.map +1 -0
- package/dist/recovery/publicNoteBackfill.d.ts +168 -0
- package/dist/recovery/publicNoteBackfill.d.ts.map +1 -0
- package/dist/recovery/publicNoteBackfill.js +368 -0
- package/dist/recovery/publicNoteBackfill.js.map +1 -0
- package/dist/recovery/recoverNotes.d.ts +147 -0
- package/dist/recovery/recoverNotes.d.ts.map +1 -0
- package/dist/recovery/recoverNotes.js +163 -0
- package/dist/recovery/recoverNotes.js.map +1 -0
- package/dist/recovery/transportDrain.d.ts +124 -0
- package/dist/recovery/transportDrain.d.ts.map +1 -0
- package/dist/recovery/transportDrain.js +262 -0
- package/dist/recovery/transportDrain.js.map +1 -0
- package/dist/transaction/consumeNotes.d.ts.map +1 -1
- package/dist/transaction/consumeNotes.js +4 -1
- package/dist/transaction/consumeNotes.js.map +1 -1
- package/dist/transaction/p2id.d.ts.map +1 -1
- package/dist/transaction/p2id.js +4 -1
- package/dist/transaction/p2id.js.map +1 -1
- package/dist/transaction/summary.d.ts +10 -4
- package/dist/transaction/summary.d.ts.map +1 -1
- package/dist/transaction/summary.js +13 -7
- package/dist/transaction/summary.js.map +1 -1
- package/dist/transaction/updateGuardian.js +4 -1
- package/dist/transaction/updateGuardian.js.map +1 -1
- package/dist/transaction/updateProcedureThreshold.js +4 -1
- package/dist/transaction/updateProcedureThreshold.js.map +1 -1
- package/dist/transaction/updateSigners.js +4 -1
- package/dist/transaction/updateSigners.js.map +1 -1
- package/dist/transaction.d.ts +1 -1
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +1 -1
- package/dist/transaction.js.map +1 -1
- package/package.json +14 -10
- package/src/account/builder.ts +87 -35
- package/src/connectivity.ts +9 -4
- package/src/index.ts +34 -1
- package/src/multisig/authArgErrors.ts +138 -0
- package/src/multisig/helpers.ts +7 -2
- package/src/multisig.ts +513 -20
- package/src/procedures.ts +1 -1
- package/src/recovery/proposalNoteImport.ts +548 -0
- package/src/recovery/publicNoteBackfill.ts +502 -0
- package/src/recovery/recoverNotes.ts +288 -0
- package/src/recovery/transportDrain.ts +330 -0
- package/src/transaction/consumeNotes.ts +4 -1
- package/src/transaction/p2id.ts +4 -1
- package/src/transaction/summary.ts +13 -7
- package/src/transaction/updateGuardian.ts +4 -1
- package/src/transaction/updateProcedureThreshold.ts +4 -1
- package/src/transaction/updateSigners.ts +4 -1
- package/src/transaction.ts +1 -1
- package/dist/account/builder.test.d.ts +0 -2
- package/dist/account/builder.test.d.ts.map +0 -1
- package/dist/account/builder.test.js +0 -166
- package/dist/account/builder.test.js.map +0 -1
- package/dist/account/masm/account-components/auth.d.ts +0 -2
- package/dist/account/masm/account-components/auth.d.ts.map +0 -1
- package/dist/account/masm/account-components/auth.js +0 -46
- package/dist/account/masm/account-components/auth.js.map +0 -1
- package/dist/account/masm/index.d.ts +0 -2
- package/dist/account/masm/index.d.ts.map +0 -1
- package/dist/account/masm/index.js +0 -4
- package/dist/account/masm/index.js.map +0 -1
- package/dist/account/masm.d.ts +0 -2
- package/dist/account/masm.d.ts.map +0 -1
- package/dist/account/masm.js +0 -4
- package/dist/account/masm.js.map +0 -1
- package/dist/account/storage.test.d.ts +0 -2
- package/dist/account/storage.test.d.ts.map +0 -1
- package/dist/account/storage.test.js +0 -73
- package/dist/account/storage.test.js.map +0 -1
- package/dist/client.test.d.ts +0 -2
- package/dist/client.test.d.ts.map +0 -1
- package/dist/client.test.js +0 -380
- package/dist/client.test.js.map +0 -1
- package/dist/connectivity.test.d.ts +0 -2
- package/dist/connectivity.test.d.ts.map +0 -1
- package/dist/connectivity.test.js +0 -61
- package/dist/connectivity.test.js.map +0 -1
- package/dist/inspector.test.d.ts +0 -2
- package/dist/inspector.test.d.ts.map +0 -1
- package/dist/inspector.test.js +0 -425
- package/dist/inspector.test.js.map +0 -1
- package/dist/lookupAuth.test.d.ts +0 -2
- package/dist/lookupAuth.test.d.ts.map +0 -1
- package/dist/lookupAuth.test.js +0 -138
- package/dist/lookupAuth.test.js.map +0 -1
- package/dist/multisig/consumeNotesErrors.test.d.ts +0 -2
- package/dist/multisig/consumeNotesErrors.test.d.ts.map +0 -1
- package/dist/multisig/consumeNotesErrors.test.js +0 -28
- package/dist/multisig/consumeNotesErrors.test.js.map +0 -1
- package/dist/multisig/helpers.test.d.ts +0 -2
- package/dist/multisig/helpers.test.d.ts.map +0 -1
- package/dist/multisig/helpers.test.js +0 -94
- package/dist/multisig/helpers.test.js.map +0 -1
- package/dist/multisig.test.d.ts +0 -2
- package/dist/multisig.test.d.ts.map +0 -1
- package/dist/multisig.test.js +0 -4112
- package/dist/multisig.test.js.map +0 -1
- package/dist/proposal/factory.test.d.ts +0 -2
- package/dist/proposal/factory.test.d.ts.map +0 -1
- package/dist/proposal/factory.test.js +0 -32
- package/dist/proposal/factory.test.js.map +0 -1
- package/dist/proposal/metadata.test.d.ts +0 -2
- package/dist/proposal/metadata.test.d.ts.map +0 -1
- package/dist/proposal/metadata.test.js +0 -193
- package/dist/proposal/metadata.test.js.map +0 -1
- package/dist/prover/config.test.d.ts +0 -2
- package/dist/prover/config.test.d.ts.map +0 -1
- package/dist/prover/config.test.js +0 -54
- package/dist/prover/config.test.js.map +0 -1
- package/dist/prover/errors.test.d.ts +0 -2
- package/dist/prover/errors.test.d.ts.map +0 -1
- package/dist/prover/errors.test.js +0 -29
- package/dist/prover/errors.test.js.map +0 -1
- package/dist/prover/retry.test.d.ts +0 -2
- package/dist/prover/retry.test.d.ts.map +0 -1
- package/dist/prover/retry.test.js +0 -20
- package/dist/prover/retry.test.js.map +0 -1
- package/dist/prover/workflow.test.d.ts +0 -2
- package/dist/prover/workflow.test.d.ts.map +0 -1
- package/dist/prover/workflow.test.js +0 -105
- package/dist/prover/workflow.test.js.map +0 -1
- package/dist/raw-client.test.d.ts +0 -2
- package/dist/raw-client.test.d.ts.map +0 -1
- package/dist/raw-client.test.js +0 -111
- package/dist/raw-client.test.js.map +0 -1
- package/dist/rpc/config.test.d.ts +0 -2
- package/dist/rpc/config.test.d.ts.map +0 -1
- package/dist/rpc/config.test.js +0 -24
- package/dist/rpc/config.test.js.map +0 -1
- package/dist/rpc/errors.test.d.ts +0 -2
- package/dist/rpc/errors.test.d.ts.map +0 -1
- package/dist/rpc/errors.test.js +0 -34
- package/dist/rpc/errors.test.js.map +0 -1
- package/dist/rpc/retry.test.d.ts +0 -2
- package/dist/rpc/retry.test.d.ts.map +0 -1
- package/dist/rpc/retry.test.js +0 -98
- package/dist/rpc/retry.test.js.map +0 -1
- package/dist/signers/ecdsa.test.d.ts +0 -2
- package/dist/signers/ecdsa.test.d.ts.map +0 -1
- package/dist/signers/ecdsa.test.js +0 -88
- package/dist/signers/ecdsa.test.js.map +0 -1
- package/dist/signers/falcon.test.d.ts +0 -2
- package/dist/signers/falcon.test.d.ts.map +0 -1
- package/dist/signers/falcon.test.js +0 -161
- package/dist/signers/falcon.test.js.map +0 -1
- package/dist/signers/miden-wallet.ecdsa-recovery.test.d.ts +0 -2
- package/dist/signers/miden-wallet.ecdsa-recovery.test.d.ts.map +0 -1
- package/dist/signers/miden-wallet.ecdsa-recovery.test.js +0 -148
- package/dist/signers/miden-wallet.ecdsa-recovery.test.js.map +0 -1
- package/dist/signers/miden-wallet.test.d.ts +0 -2
- package/dist/signers/miden-wallet.test.d.ts.map +0 -1
- package/dist/signers/miden-wallet.test.js +0 -164
- package/dist/signers/miden-wallet.test.js.map +0 -1
- package/dist/signers/para.test.d.ts +0 -2
- package/dist/signers/para.test.d.ts.map +0 -1
- package/dist/signers/para.test.js +0 -146
- package/dist/signers/para.test.js.map +0 -1
- package/dist/transaction/index.d.ts +0 -8
- package/dist/transaction/index.d.ts.map +0 -1
- package/dist/transaction/index.js +0 -7
- package/dist/transaction/index.js.map +0 -1
- package/dist/transaction/p2id.test.d.ts +0 -2
- package/dist/transaction/p2id.test.d.ts.map +0 -1
- package/dist/transaction/p2id.test.js +0 -246
- package/dist/transaction/p2id.test.js.map +0 -1
- package/dist/transaction/rpoRandomCoin.test.d.ts +0 -2
- package/dist/transaction/rpoRandomCoin.test.d.ts.map +0 -1
- package/dist/transaction/rpoRandomCoin.test.js +0 -52
- package/dist/transaction/rpoRandomCoin.test.js.map +0 -1
- package/dist/transaction/summary.test.d.ts +0 -2
- package/dist/transaction/summary.test.d.ts.map +0 -1
- package/dist/transaction/summary.test.js +0 -26
- package/dist/transaction/summary.test.js.map +0 -1
- package/dist/transaction.test.d.ts +0 -2
- package/dist/transaction.test.d.ts.map +0 -1
- package/dist/transaction.test.js +0 -122
- package/dist/transaction.test.js.map +0 -1
- package/dist/types/proposal.test.d.ts +0 -2
- package/dist/types/proposal.test.d.ts.map +0 -1
- package/dist/types/proposal.test.js +0 -56
- package/dist/types/proposal.test.js.map +0 -1
- package/dist/utils/digest.test.d.ts +0 -2
- package/dist/utils/digest.test.d.ts.map +0 -1
- package/dist/utils/digest.test.js +0 -48
- package/dist/utils/digest.test.js.map +0 -1
- package/dist/utils/ecdsa.test.d.ts +0 -2
- package/dist/utils/ecdsa.test.d.ts.map +0 -1
- package/dist/utils/ecdsa.test.js +0 -131
- package/dist/utils/ecdsa.test.js.map +0 -1
- package/dist/utils/encoding.test.d.ts +0 -2
- package/dist/utils/encoding.test.d.ts.map +0 -1
- package/dist/utils/encoding.test.js +0 -185
- package/dist/utils/encoding.test.js.map +0 -1
- package/dist/utils/key.test.d.ts +0 -2
- package/dist/utils/key.test.d.ts.map +0 -1
- package/dist/utils/key.test.js +0 -82
- package/dist/utils/key.test.js.map +0 -1
- package/dist/utils/signature.test.d.ts +0 -2
- package/dist/utils/signature.test.d.ts.map +0 -1
- package/dist/utils/signature.test.js +0 -164
- package/dist/utils/signature.test.js.map +0 -1
- package/dist/utils/word.test.d.ts +0 -2
- package/dist/utils/word.test.d.ts.map +0 -1
- package/dist/utils/word.test.js +0 -54
- package/dist/utils/word.test.js.map +0 -1
- package/masm/account_components/auth/guarded_multisig.masm +0 -42
- package/src/account/builder.test.ts +0 -238
- package/src/account/masm/account-components/auth.ts +0 -46
- package/src/account/masm/index.ts +0 -4
- package/src/account/masm.ts +0 -4
- package/src/account/storage.test.ts +0 -90
- package/src/client.test.ts +0 -473
- package/src/connectivity.test.ts +0 -67
- package/src/inspector.test.ts +0 -542
- package/src/lookupAuth.test.ts +0 -185
- package/src/multisig/consumeNotesErrors.test.ts +0 -43
- package/src/multisig/helpers.test.ts +0 -114
- package/src/multisig.test.ts +0 -5008
- package/src/proposal/factory.test.ts +0 -40
- package/src/proposal/metadata.test.ts +0 -235
- package/src/prover/config.test.ts +0 -90
- package/src/prover/errors.test.ts +0 -61
- package/src/prover/retry.test.ts +0 -38
- package/src/prover/workflow.test.ts +0 -145
- package/src/raw-client.test.ts +0 -171
- package/src/rpc/config.test.ts +0 -45
- package/src/rpc/errors.test.ts +0 -69
- package/src/rpc/retry.test.ts +0 -144
- package/src/signers/ecdsa.test.ts +0 -111
- package/src/signers/falcon.test.ts +0 -197
- package/src/signers/miden-wallet.ecdsa-recovery.test.ts +0 -201
- package/src/signers/miden-wallet.test.ts +0 -206
- package/src/signers/para.test.ts +0 -186
- package/src/transaction/index.ts +0 -13
- package/src/transaction/p2id.test.ts +0 -371
- package/src/transaction/rpoRandomCoin.test.ts +0 -64
- package/src/transaction/summary.test.ts +0 -32
- package/src/transaction.test.ts +0 -142
- package/src/types/proposal.test.ts +0 -68
- package/src/utils/digest.test.ts +0 -55
- package/src/utils/ecdsa.test.ts +0 -164
- package/src/utils/encoding.test.ts +0 -233
- package/src/utils/key.test.ts +0 -91
- package/src/utils/signature.test.ts +0 -210
- package/src/utils/word.test.ts +0 -64
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authArgErrors.d.ts","sourceRoot":"","sources":["../../src/multisig/authArgErrors.ts"],"names":[],"mappings":"AAQA,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GACxB,gCAAgC,GAChC,yBAAyB,GACzB,4BAA4B,CAAC;AA0CjC;;;;;;;;;GASG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAA6B;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;gBAEd,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAc/F;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;IACzD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAoC;IACnE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;gBAEpB,OAAO,EAAE;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,MAAM,CAAC;QAChB,cAAc,EAAE,MAAM,CAAC;KACxB;CAiBF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//! Typed failures for auth-arg recovery.
|
|
2
|
+
//!
|
|
3
|
+
//! The surface lands here deliberately ahead of the code that raises it: nothing in this
|
|
4
|
+
//! change constructs these, and the proposal paths that do arrive in the PR that commits
|
|
5
|
+
//! the anchored fee faucet. Landing the codes first keeps them out of that PR's diff and
|
|
6
|
+
//! lets a caller pin `code` before the raiser exists — `public-api.test.ts` covers the
|
|
7
|
+
//! barrel so a dropped re-export is caught either way.
|
|
8
|
+
/** How much of an untrusted value an error message will quote. */
|
|
9
|
+
const MAX_QUOTED_CHARS = 80;
|
|
10
|
+
/**
|
|
11
|
+
* Quotes a GUARDIAN-served value without letting an unbounded string into the
|
|
12
|
+
* message. Control characters would otherwise reach a log verbatim.
|
|
13
|
+
*
|
|
14
|
+
* Applied to every served field these errors interpolate, not only the salt:
|
|
15
|
+
* proposal ids, auth args, faucet ids and the reason text all arrive in the same
|
|
16
|
+
* unvalidated JSON, so sanitising one and not the rest only narrows the hole.
|
|
17
|
+
*
|
|
18
|
+
* The value is whatever GUARDIAN served, so it is not necessarily a string and
|
|
19
|
+
* its own `toString` may throw; a value that cannot even be described must not
|
|
20
|
+
* take the error's place, because this error is the one a `switch_guardian`
|
|
21
|
+
* recovers from.
|
|
22
|
+
*
|
|
23
|
+
* Truncation happens before the control characters are stripped, so an
|
|
24
|
+
* oversized value is never copied at full length just to render 80 characters
|
|
25
|
+
* of it.
|
|
26
|
+
*/
|
|
27
|
+
function quoteUntrusted(value) {
|
|
28
|
+
const asString = coerceForMessage(value);
|
|
29
|
+
const printable = (chunk) => chunk.replace(/[^\x20-\x7e]/g, '.');
|
|
30
|
+
return asString.length > MAX_QUOTED_CHARS
|
|
31
|
+
? `${printable(asString.slice(0, MAX_QUOTED_CHARS))}... (${asString.length} code units)`
|
|
32
|
+
: printable(asString);
|
|
33
|
+
}
|
|
34
|
+
function coerceForMessage(value) {
|
|
35
|
+
if (typeof value === 'string') {
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
return String(value);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return `<undescribable ${typeof value}>`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A proposal's recorded salt is not a readable 32-byte word, so no rebuild can
|
|
47
|
+
* use it.
|
|
48
|
+
*
|
|
49
|
+
* Coded for the same reason as {@link ProposalAuthArgUnresolvableError}, and
|
|
50
|
+
* recoverable in the same one place: a `switch_guardian`'s salt is served by the
|
|
51
|
+
* GUARDIAN being switched away from, which can make it unreadable as easily as
|
|
52
|
+
* it can make it wrong. Treating only the latter as recoverable would leave that
|
|
53
|
+
* GUARDIAN able to strand a fully signed switch.
|
|
54
|
+
*/
|
|
55
|
+
export class ProposalSaltMalformedError extends Error {
|
|
56
|
+
code = 'proposal_salt_malformed';
|
|
57
|
+
proposalId;
|
|
58
|
+
/**
|
|
59
|
+
* Exactly what GUARDIAN served, so not necessarily a string and not
|
|
60
|
+
* necessarily bounded. Non-enumerable, because the default logging paths
|
|
61
|
+
* (`util.inspect`, `JSON.stringify`) would otherwise re-expose the unbounded
|
|
62
|
+
* value the message deliberately truncates. The message quotes it already.
|
|
63
|
+
*/
|
|
64
|
+
saltHex;
|
|
65
|
+
constructor(details) {
|
|
66
|
+
super(`Proposal ${quoteUntrusted(details.proposalId)} has a malformed metadata salt ` +
|
|
67
|
+
`'${quoteUntrusted(details.saltHex)}': ${quoteUntrusted(details.reason)}`, details.cause === undefined ? undefined : { cause: details.cause });
|
|
68
|
+
this.name = 'ProposalSaltMalformedError';
|
|
69
|
+
this.proposalId = details.proposalId;
|
|
70
|
+
Object.defineProperty(this, 'saltHex', {
|
|
71
|
+
value: details.saltHex,
|
|
72
|
+
enumerable: false,
|
|
73
|
+
writable: false,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A proposal's signed auth arg is not the fee-conversion commitment its recorded
|
|
79
|
+
* salt and anchored fee faucet derive, so no reconstruction from that salt
|
|
80
|
+
* succeeds. Raised before the rebuild, so the proposal fails on the value that is
|
|
81
|
+
* actually wrong rather than on an `ERR_FEE_CONVERSION_INFO_MISSING` abort at
|
|
82
|
+
* proving.
|
|
83
|
+
*
|
|
84
|
+
* `switch_guardian` is the exception, and deliberately so: it rebuilds from the
|
|
85
|
+
* summary's own auth arg, which reproduces the signed word but not the fee
|
|
86
|
+
* preimage behind it, so it executes only on a zero-fee chain.
|
|
87
|
+
*
|
|
88
|
+
* Coded because one caller acts on it rather than reporting it:
|
|
89
|
+
* `switch_guardian` recovery falls back to the summary's own auth arg when it
|
|
90
|
+
* sees this or {@link ProposalSaltMalformedError}, and must not extend that
|
|
91
|
+
* treatment to an unreadable anchor or a WASM failure.
|
|
92
|
+
*/
|
|
93
|
+
export class ProposalAuthArgUnresolvableError extends Error {
|
|
94
|
+
code = 'proposal_auth_arg_unresolvable';
|
|
95
|
+
proposalId;
|
|
96
|
+
signedAuthArgHex;
|
|
97
|
+
saltHex;
|
|
98
|
+
feeFaucetIdHex;
|
|
99
|
+
constructor(details) {
|
|
100
|
+
super(`Proposal ${quoteUntrusted(details.proposalId)} auth arg ` +
|
|
101
|
+
`${quoteUntrusted(details.signedAuthArgHex)} is not the fee-conversion commitment to ` +
|
|
102
|
+
`its metadata salt ${quoteUntrusted(details.saltHex)} under fee faucet ` +
|
|
103
|
+
`${quoteUntrusted(details.feeFaucetIdHex)}, so the signed transaction summary cannot ` +
|
|
104
|
+
`be reproduced ` +
|
|
105
|
+
'from that salt, and the proposal cannot be executed. Recreate the proposal and ' +
|
|
106
|
+
'collect signatures again, and have the original dropped server-side — while ' +
|
|
107
|
+
'GUARDIAN keeps serving it, syncing this account keeps failing on it');
|
|
108
|
+
this.name = 'ProposalAuthArgUnresolvableError';
|
|
109
|
+
this.proposalId = details.proposalId;
|
|
110
|
+
this.signedAuthArgHex = details.signedAuthArgHex;
|
|
111
|
+
this.saltHex = details.saltHex;
|
|
112
|
+
this.feeFaucetIdHex = details.feeFaucetIdHex;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=authArgErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authArgErrors.js","sourceRoot":"","sources":["../../src/multisig/authArgErrors.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,GAAG;AACH,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,uFAAuF;AACvF,uDAAuD;AAQvD,kEAAkE;AAClE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,cAAc,CAAC,KAAc;IACpC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IACzE,OAAO,QAAQ,CAAC,MAAM,GAAG,gBAAgB;QACvC,CAAC,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,QAAQ,QAAQ,CAAC,MAAM,cAAc;QACxF,CAAC,CAAC,SAAS,CA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,OAKX;QACC,KAAK,CACH,YAAY,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY;YACxD,GAAG,cAAc,CAAC,OAAO,CAAC,gBAAgB,CAAC,2CAA2C;YACtF,qBAAqB,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB;YACxE,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,6CAA6C;YACtF,gBAAgB;YAChB,iFAAiF;YACjF,8EAA8E;YAC9E,qEAAqE,CACxE,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Account } from '@miden-sdk/miden-sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Recompute a proposal's id from its serialized transaction summary. Returns
|
|
4
|
+
* normalized hex (lowercase, 0x-prefixed, zero-padded) so the result compares
|
|
5
|
+
* equal to `ExportedProposal.commitment` / `Proposal.id` directly.
|
|
6
|
+
*/
|
|
2
7
|
export declare function computeCommitmentFromTxSummary(txSummaryBase64: string): string;
|
|
3
8
|
export declare function accountIdToHex(account: Account): string;
|
|
4
9
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/multisig/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA4B,MAAM,sBAAsB,CAAC;AAGzE,wBAAgB,8BAA8B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAK9E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAWvD"}
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/multisig/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA4B,MAAM,sBAAsB,CAAC;AAGzE;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAK9E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAWvD"}
|
package/dist/multisig/helpers.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { TransactionSummary } from '@miden-sdk/miden-sdk';
|
|
2
|
-
import { base64ToUint8Array } from '../utils/encoding.js';
|
|
2
|
+
import { base64ToUint8Array, normalizeHexWord } from '../utils/encoding.js';
|
|
3
|
+
/**
|
|
4
|
+
* Recompute a proposal's id from its serialized transaction summary. Returns
|
|
5
|
+
* normalized hex (lowercase, 0x-prefixed, zero-padded) so the result compares
|
|
6
|
+
* equal to `ExportedProposal.commitment` / `Proposal.id` directly.
|
|
7
|
+
*/
|
|
3
8
|
export function computeCommitmentFromTxSummary(txSummaryBase64) {
|
|
4
9
|
const bytes = base64ToUint8Array(txSummaryBase64);
|
|
5
10
|
const summary = TransactionSummary.deserialize(bytes);
|
|
6
11
|
const commitment = summary.toCommitment();
|
|
7
|
-
return commitment.toHex();
|
|
12
|
+
return normalizeHexWord(commitment.toHex());
|
|
8
13
|
}
|
|
9
14
|
export function accountIdToHex(account) {
|
|
10
15
|
const accountId = account.id();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/multisig/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,kBAAkB,EAAQ,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/multisig/helpers.ts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|
@@ -10,6 +10,7 @@ import type { ProcedureName } from './procedures.js';
|
|
|
10
10
|
import type { MidenClient } from '@miden-sdk/miden-sdk';
|
|
11
11
|
import { Account, AdviceMap, NoteType, TransactionRequest } from '@miden-sdk/miden-sdk';
|
|
12
12
|
import { type P2ideHeightOptions } from './transaction.js';
|
|
13
|
+
import { type NoteRecoveryReport, type RecoverNotesOptions } from './recovery/recoverNotes.js';
|
|
13
14
|
import { type ResolvedProverConfig } from './prover/config.js';
|
|
14
15
|
import { type ResolvedRpcConfig } from './rpc/config.js';
|
|
15
16
|
/**
|
|
@@ -136,6 +137,11 @@ export declare class Multisig {
|
|
|
136
137
|
/**
|
|
137
138
|
* Update the GUARDIAN client used by this Multisig instance.
|
|
138
139
|
*
|
|
140
|
+
* When repointing to a different GUARDIAN provider after a switch, call
|
|
141
|
+
* {@link preservePreSwitchProposalNotes} first: pending proposals do not
|
|
142
|
+
* survive a switch, and the notes embedded in them can only be imported
|
|
143
|
+
* while the old GUARDIAN is still the current client.
|
|
144
|
+
*
|
|
139
145
|
* @param guardianClient - The new GUARDIAN HTTP client
|
|
140
146
|
*/
|
|
141
147
|
setGuardianClient(guardianClient: GuardianHttpClient): void;
|
|
@@ -177,6 +183,17 @@ export declare class Multisig {
|
|
|
177
183
|
*/
|
|
178
184
|
private isSafeToOverwriteLocalState;
|
|
179
185
|
private getOnChainCommitment;
|
|
186
|
+
/**
|
|
187
|
+
* Sync the local store with the Miden node, then reload the cached account
|
|
188
|
+
* and multisig config from it (mirrors the Rust `sync_network_only`).
|
|
189
|
+
* Without the refresh, a summary would be built against the freshly synced
|
|
190
|
+
* store while readiness thresholds and signature validation still read the
|
|
191
|
+
* stale cached config. Returns the store-backed account, or `null` when the
|
|
192
|
+
* store has no record for this account (the cached config is then kept, as
|
|
193
|
+
* in `getStoreAccount`); callers that require the account decide how to
|
|
194
|
+
* fail.
|
|
195
|
+
*/
|
|
196
|
+
private syncNetworkOnly;
|
|
180
197
|
private refreshConfigFromAccount;
|
|
181
198
|
/**
|
|
182
199
|
* Register this multisig account on the GUARDIAN server.
|
|
@@ -191,6 +208,19 @@ export declare class Multisig {
|
|
|
191
208
|
* Sync proposals from the GUARDIAN server.
|
|
192
209
|
*/
|
|
193
210
|
syncProposals(): Promise<Proposal[]>;
|
|
211
|
+
/**
|
|
212
|
+
* {@link syncProposals} variant for the recovery flow: per-proposal
|
|
213
|
+
* failures (a payload that does not parse, a metadata binding that does
|
|
214
|
+
* not verify) are isolated as skip reasons instead of failing the whole
|
|
215
|
+
* listing, so one corrupt proposal cannot block recovering notes from the
|
|
216
|
+
* healthy ones. The strict listing stays the signing-path behavior, where
|
|
217
|
+
* a malformed proposal must surface loudly. Proposals at or below the
|
|
218
|
+
* account's committed nonce are dropped (already executed or superseded,
|
|
219
|
+
* matching the Rust SDK's listing), and the shared proposal cache is left
|
|
220
|
+
* untouched. GUARDIAN being unreachable still throws — there is nothing
|
|
221
|
+
* to isolate without a listing.
|
|
222
|
+
*/
|
|
223
|
+
private syncProposalsIsolatingFailures;
|
|
194
224
|
/**
|
|
195
225
|
* List all known proposals
|
|
196
226
|
*/
|
|
@@ -235,6 +265,39 @@ export declare class Multisig {
|
|
|
235
265
|
* @param options - Optional settings: `nonce`
|
|
236
266
|
*/
|
|
237
267
|
createSwitchGuardianProposal(newGuardianEndpoint: string, newGuardianPubkey: string, options?: CreateProposalOptions): Promise<Proposal>;
|
|
268
|
+
/**
|
|
269
|
+
* Shared build step for both switch-GUARDIAN creation paths: verify the new
|
|
270
|
+
* endpoint's `/pubkey` commitment, then execute the update-guardian request
|
|
271
|
+
* for its summary and metadata. Kept in one place so the online and offline
|
|
272
|
+
* proposals for the same operation can never drift apart.
|
|
273
|
+
*/
|
|
274
|
+
private buildSwitchGuardianSummary;
|
|
275
|
+
/**
|
|
276
|
+
* Create a "switch GUARDIAN" proposal fully offline — nothing is pushed to
|
|
277
|
+
* the current GUARDIAN, so an account can leave an unreachable operator
|
|
278
|
+
* (issue #433; mirrors the Rust `create_proposal_offline`).
|
|
279
|
+
*
|
|
280
|
+
* The transaction summary is built and signed locally, the proposal is
|
|
281
|
+
* cached for `signProposalOffline` / `executeProposal`, and the returned
|
|
282
|
+
* `ExportedProposal` (which already includes the proposer's signature) can
|
|
283
|
+
* be `JSON.stringify`-ed and shared with cosigners for `importProposal`.
|
|
284
|
+
*
|
|
285
|
+
* Only switch-GUARDIAN proposals can be created offline: every other
|
|
286
|
+
* proposal type requires a GUARDIAN acknowledgment at execution, so a
|
|
287
|
+
* proposal the GUARDIAN never saw could collect signatures but never
|
|
288
|
+
* execute. The new endpoint must be reachable — its `/pubkey` commitment
|
|
289
|
+
* is verified before anything is built or signed.
|
|
290
|
+
*
|
|
291
|
+
* Note: executeProposal's best-effort canonicalization push cannot reach a
|
|
292
|
+
* proposal the current GUARDIAN never received, so even if that GUARDIAN is
|
|
293
|
+
* back up at execution time it keeps serving the account until background
|
|
294
|
+
* reconciliation (issue #305) — same outcome as executing while it is down.
|
|
295
|
+
*
|
|
296
|
+
* @param newGuardianEndpoint - The new GUARDIAN server endpoint URL
|
|
297
|
+
* @param newGuardianPubkey - The new GUARDIAN server's public key commitment (hex)
|
|
298
|
+
* @param options - Optional settings: `nonce`
|
|
299
|
+
*/
|
|
300
|
+
createSwitchGuardianProposalOffline(newGuardianEndpoint: string, newGuardianPubkey: string, options?: CreateProposalOptions): Promise<ExportedProposal>;
|
|
238
301
|
/**
|
|
239
302
|
* Create a "consume notes" proposal to consume notes sent to the multisig account.
|
|
240
303
|
*
|
|
@@ -308,6 +371,68 @@ export declare class Multisig {
|
|
|
308
371
|
* {@link importNoteFromBytes} for the returned identifier semantics.
|
|
309
372
|
*/
|
|
310
373
|
importNoteFromFile(file: Blob): Promise<string>;
|
|
374
|
+
/**
|
|
375
|
+
* Proposal-import strategy of {@link recoverNotes}: import the notes
|
|
376
|
+
* embedded in the given v2 consume-notes proposals into the local Miden
|
|
377
|
+
* store, reusing this client's Miden RPC endpoint and retry
|
|
378
|
+
* configuration.
|
|
379
|
+
*/
|
|
380
|
+
private importNotesFromProposals;
|
|
381
|
+
/**
|
|
382
|
+
* Public-backfill strategy of {@link recoverNotes}: scan a historical
|
|
383
|
+
* block range for public notes addressed at this account's standard note
|
|
384
|
+
* tag and import them with their on-chain inclusion proofs, reusing this
|
|
385
|
+
* client's Miden RPC endpoint and retry configuration.
|
|
386
|
+
*/
|
|
387
|
+
private backfillPublicNotesByTag;
|
|
388
|
+
/**
|
|
389
|
+
* Run the note-recovery strategies as a single wallet-facing flow,
|
|
390
|
+
* typically right after key-based recovery loaded the account — the TS
|
|
391
|
+
* counterpart of the Rust SDK's `MultisigClient::recover_notes`.
|
|
392
|
+
*
|
|
393
|
+
* By default every strategy runs — the private-note transport backlog
|
|
394
|
+
* drain, the proposal-embedded note import, and the historical
|
|
395
|
+
* public-note backfill over the whole chain — followed by a normal sync
|
|
396
|
+
* (chain sync plus GUARDIAN state sync) that verifies whatever was
|
|
397
|
+
* imported. Pass {@link RecoverNotesOptions} to choose strategies, bound
|
|
398
|
+
* the backfill's block range, or skip the final sync.
|
|
399
|
+
*
|
|
400
|
+
* No strategy failure aborts the flow: each primitive already reports
|
|
401
|
+
* per-note and per-source problems instead of throwing, and a strategy
|
|
402
|
+
* that cannot run at all (GUARDIAN unreachable while listing proposals,
|
|
403
|
+
* chain tip unresolvable, a broken local store) becomes a
|
|
404
|
+
* `RecoveryStepProblem` entry in the report while the remaining
|
|
405
|
+
* strategies still run. The flow is idempotent — rerunning re-imports
|
|
406
|
+
* nothing that already arrived — so a report with `retryable: true` can
|
|
407
|
+
* simply be retried. Throws only for an inverted backfill range.
|
|
408
|
+
*/
|
|
409
|
+
recoverNotes(options?: RecoverNotesOptions): Promise<NoteRecoveryReport>;
|
|
410
|
+
/**
|
|
411
|
+
* The strategy implementations {@link recoverNotes} hands to
|
|
412
|
+
* `runNoteRecovery`. The optional `cancelled` token is the pre-switch
|
|
413
|
+
* import's cooperative cancellation: `runNoteRecovery` checks it before
|
|
414
|
+
* starting each step, and the proposal-import step threads it into its
|
|
415
|
+
* listing and import loops so they stop at their next checkpoint too.
|
|
416
|
+
*/
|
|
417
|
+
private buildNoteRecoverySteps;
|
|
418
|
+
/**
|
|
419
|
+
* Import the notes embedded in the old GUARDIAN's pending consume-notes
|
|
420
|
+
* proposals while they are still reachable: pending proposals do not
|
|
421
|
+
* survive a guardian switch, making them the one recovery source
|
|
422
|
+
* {@link recoverNotes} loses once the client repoints (issue #417).
|
|
423
|
+
*
|
|
424
|
+
* Run automatically by {@link executeProposal} on the switch path, before
|
|
425
|
+
* the switch transaction executes; call it yourself before repointing a
|
|
426
|
+
* client by hand via {@link setGuardianClient}. Best-effort by contract:
|
|
427
|
+
* problems are warned, never thrown, and the flow runs under a timeout
|
|
428
|
+
* with cooperative cancellation plus a bounded settle grace, so a hung
|
|
429
|
+
* old GUARDIAN can neither block the switch nor overlap it on the shared
|
|
430
|
+
* client. Returns the recovery report, or `undefined` when the flow could
|
|
431
|
+
* not run or timed out. Mirror of the Rust SDK's
|
|
432
|
+
* `preserve_pre_switch_proposal_notes`; full rationale and semantics in
|
|
433
|
+
* "Preserving Notes Across a Guardian Switch" (docs/MULTISIG_SDK.md).
|
|
434
|
+
*/
|
|
435
|
+
preservePreSwitchProposalNotes(): Promise<NoteRecoveryReport | undefined>;
|
|
311
436
|
/**
|
|
312
437
|
* Compute the ID of the note a P2ID proposal will create when executed.
|
|
313
438
|
*
|
|
@@ -435,6 +560,21 @@ export declare class Multisig {
|
|
|
435
560
|
* cannot be reproduced, verified, or executed. The caller owns the returned
|
|
436
561
|
* anchor and must `free()` it once done.
|
|
437
562
|
*/
|
|
563
|
+
/**
|
|
564
|
+
* Reads a proposal's salt. Throws when absent, because there is nothing to fall
|
|
565
|
+
* back to.
|
|
566
|
+
*
|
|
567
|
+
* The request declares this salt through `withFeeConversionSalt`, and miden-client
|
|
568
|
+
* commits `hash(CONVERSION_INFO || SALT)` into the auth arg from it. The summary
|
|
569
|
+
* therefore carries the COMMITMENT, and a commitment is not invertible to the salt
|
|
570
|
+
* it was built from -- so `summaryAuthArg(summary)` cannot stand in here. It used
|
|
571
|
+
* to: before the request declared a salt the auth arg WAS the bare salt, which is
|
|
572
|
+
* why the fallback this replaces was correct when it was written.
|
|
573
|
+
*
|
|
574
|
+
* A declared salt also bypasses miden-client's zero-fee early return, so this holds
|
|
575
|
+
* on a chain that charges nothing exactly as on one that charges.
|
|
576
|
+
*/
|
|
577
|
+
private requireProposalSaltHex;
|
|
438
578
|
private requireProposalAnchor;
|
|
439
579
|
private buildTransactionRequestFromMetadata;
|
|
440
580
|
}
|
package/dist/multisig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../src/multisig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAoB,KAAK,cAAc,EAAE,KAAK,WAAW,EAA0B,KAAK,MAAM,EAAqC,MAAM,+BAA+B,CAAC;AACvP,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EAEd,QAAQ,EACR,gBAAgB,EAEhB,YAAY,EACb,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../src/multisig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAoB,KAAK,cAAc,EAAE,KAAK,WAAW,EAA0B,KAAK,MAAM,EAAqC,MAAM,+BAA+B,CAAC;AACvP,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EAEd,QAAQ,EACR,gBAAgB,EAEhB,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EACV,WAAW,EAEZ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