@openzeppelin/miden-multisig-client 0.16.2 → 0.17.0-rc.2
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 +144 -7
- package/dist/account/builder.d.ts.map +1 -1
- package/dist/account/builder.js +32 -25
- package/dist/account/builder.js.map +1 -1
- package/dist/account/builder.test.js +73 -21
- package/dist/account/builder.test.js.map +1 -1
- package/dist/account/layout.d.ts +31 -0
- package/dist/account/layout.d.ts.map +1 -0
- package/dist/account/layout.js +31 -0
- package/dist/account/layout.js.map +1 -0
- package/dist/account/masm/account-components/auth.d.ts +1 -4
- package/dist/account/masm/account-components/auth.d.ts.map +1 -1
- package/dist/account/masm/account-components/auth.js +36 -53
- package/dist/account/masm/account-components/auth.js.map +1 -1
- package/dist/account/masm/index.d.ts +0 -1
- package/dist/account/masm/index.d.ts.map +1 -1
- package/dist/account/masm/index.js +0 -1
- package/dist/account/masm/index.js.map +1 -1
- package/dist/account/storage.d.ts +4 -0
- package/dist/account/storage.d.ts.map +1 -1
- package/dist/account/storage.js +9 -20
- package/dist/account/storage.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -3
- package/dist/client.js.map +1 -1
- package/dist/client.test.js +68 -15
- package/dist/client.test.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/inspector.d.ts +59 -1
- package/dist/inspector.d.ts.map +1 -1
- package/dist/inspector.js +157 -29
- package/dist/inspector.js.map +1 -1
- package/dist/inspector.test.js +246 -37
- package/dist/inspector.test.js.map +1 -1
- package/dist/multisig.d.ts +106 -32
- package/dist/multisig.d.ts.map +1 -1
- package/dist/multisig.js +289 -95
- package/dist/multisig.js.map +1 -1
- package/dist/multisig.test.js +581 -58
- package/dist/multisig.test.js.map +1 -1
- package/dist/procedures.d.ts +6 -7
- package/dist/procedures.d.ts.map +1 -1
- package/dist/procedures.js +6 -7
- package/dist/procedures.js.map +1 -1
- package/dist/proposal/metadata.d.ts.map +1 -1
- package/dist/proposal/metadata.js +13 -2
- package/dist/proposal/metadata.js.map +1 -1
- package/dist/proposal/metadata.test.js +57 -0
- package/dist/proposal/metadata.test.js.map +1 -1
- package/dist/prover/workflow.d.ts +3 -2
- package/dist/prover/workflow.d.ts.map +1 -1
- package/dist/prover/workflow.js +5 -2
- package/dist/prover/workflow.js.map +1 -1
- package/dist/prover/workflow.test.js +6 -4
- package/dist/prover/workflow.test.js.map +1 -1
- package/dist/transaction/index.d.ts +1 -1
- package/dist/transaction/index.d.ts.map +1 -1
- package/dist/transaction/index.js +1 -1
- package/dist/transaction/index.js.map +1 -1
- package/dist/transaction/p2id.d.ts +17 -6
- package/dist/transaction/p2id.d.ts.map +1 -1
- package/dist/transaction/p2id.js +22 -31
- package/dist/transaction/p2id.js.map +1 -1
- package/dist/transaction/p2id.test.js +62 -24
- package/dist/transaction/p2id.test.js.map +1 -1
- package/dist/transaction/summary.d.ts +45 -2
- package/dist/transaction/summary.d.ts.map +1 -1
- package/dist/transaction/summary.js +42 -2
- package/dist/transaction/summary.js.map +1 -1
- package/dist/transaction/summary.test.d.ts +2 -0
- package/dist/transaction/summary.test.d.ts.map +1 -0
- package/dist/transaction/summary.test.js +26 -0
- package/dist/transaction/summary.test.js.map +1 -0
- package/dist/transaction/updateGuardian.d.ts.map +1 -1
- package/dist/transaction/updateGuardian.js +16 -18
- package/dist/transaction/updateGuardian.js.map +1 -1
- package/dist/transaction/updateProcedureThreshold.d.ts.map +1 -1
- package/dist/transaction/updateProcedureThreshold.js +15 -17
- package/dist/transaction/updateProcedureThreshold.js.map +1 -1
- package/dist/transaction/updateSigners.d.ts +6 -1
- package/dist/transaction/updateSigners.d.ts.map +1 -1
- package/dist/transaction/updateSigners.js +20 -17
- package/dist/transaction/updateSigners.js.map +1 -1
- package/dist/transaction.d.ts +2 -2
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +1 -1
- package/dist/transaction.js.map +1 -1
- package/dist/types/proposal.d.ts +28 -4
- package/dist/types/proposal.d.ts.map +1 -1
- package/dist/types/proposal.js +18 -0
- package/dist/types/proposal.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/signature.d.ts +11 -7
- package/dist/utils/signature.d.ts.map +1 -1
- package/dist/utils/signature.js +24 -58
- package/dist/utils/signature.js.map +1 -1
- package/dist/utils/word.d.ts +7 -0
- package/dist/utils/word.d.ts.map +1 -1
- package/dist/utils/word.js +15 -0
- package/dist/utils/word.js.map +1 -1
- package/masm/account_components/auth/guarded_multisig.masm +42 -0
- package/package.json +7 -4
- package/src/account/builder.test.ts +111 -45
- package/src/account/builder.ts +45 -33
- package/src/account/layout.ts +33 -0
- package/src/account/masm/account-components/auth.ts +36 -56
- package/src/account/masm/index.ts +0 -1
- package/src/account/storage.ts +9 -22
- package/src/client.test.ts +80 -15
- package/src/client.ts +5 -3
- package/src/index.ts +26 -1
- package/src/inspector.test.ts +330 -38
- package/src/inspector.ts +196 -33
- package/src/multisig.test.ts +679 -63
- package/src/multisig.ts +361 -107
- package/src/procedures.ts +6 -7
- package/src/proposal/metadata.test.ts +76 -0
- package/src/proposal/metadata.ts +13 -2
- package/src/prover/workflow.test.ts +9 -4
- package/src/prover/workflow.ts +15 -3
- package/src/transaction/index.ts +7 -1
- package/src/transaction/p2id.test.ts +112 -31
- package/src/transaction/p2id.ts +39 -38
- package/src/transaction/summary.test.ts +32 -0
- package/src/transaction/summary.ts +83 -4
- package/src/transaction/updateGuardian.ts +15 -25
- package/src/transaction/updateProcedureThreshold.ts +13 -29
- package/src/transaction/updateSigners.ts +38 -30
- package/src/transaction.ts +8 -1
- package/src/types/proposal.ts +43 -4
- package/src/types.ts +0 -1
- package/src/utils/signature.ts +32 -65
- package/src/utils/word.ts +17 -0
- package/dist/account/masm/auth.d.ts +0 -5
- package/dist/account/masm/auth.d.ts.map +0 -1
- package/dist/account/masm/auth.js +0 -1509
- package/dist/account/masm/auth.js.map +0 -1
- package/masm/account_components/auth/multisig.masm +0 -12
- package/masm/account_components/auth/multisig_ecdsa.masm +0 -12
- package/masm/account_components/auth/multisig_guardian.masm +0 -16
- package/masm/account_components/auth/multisig_guardian_ecdsa.masm +0 -16
- package/masm/auth/guardian.masm +0 -199
- package/masm/auth/guardian_ecdsa.masm +0 -195
- package/masm/auth/multisig.masm +0 -554
- package/masm/auth/multisig_ecdsa.masm +0 -554
- package/src/account/masm/auth.ts +0 -1512
package/dist/multisig.d.ts
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* This class wraps a Miden SDK Account and provides GUARDIAN integration
|
|
5
5
|
* for proposal management.
|
|
6
6
|
*/
|
|
7
|
-
import { GuardianHttpClient, type AbandonCandidateResponse, type AbandonStatus, type Signer } from '@openzeppelin/guardian-client';
|
|
7
|
+
import { GuardianHttpClient, type AbandonCandidateResponse, type AbandonStatus, type HistoryOptions, type HistoryPage, type Signer } from '@openzeppelin/guardian-client';
|
|
8
8
|
import type { ConsumableNote, ExportedProposal, MultisigConfig, Proposal, ProposalMetadata, ProposalType } from './types.js';
|
|
9
9
|
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
|
+
import { type P2ideHeightOptions } from './transaction.js';
|
|
12
13
|
import { type ResolvedProverConfig } from './prover/config.js';
|
|
13
14
|
import { type ResolvedRpcConfig } from './rpc/config.js';
|
|
14
15
|
/**
|
|
@@ -29,6 +30,26 @@ export interface AccountStateVerificationResult {
|
|
|
29
30
|
localCommitment: string;
|
|
30
31
|
onChainCommitment: string;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Options shared by the `create*Proposal` family (issue #387). Every optional
|
|
35
|
+
* knob lives in a single trailing options bag, so call sites never need
|
|
36
|
+
* positional `undefined` holes to reach a later option.
|
|
37
|
+
*/
|
|
38
|
+
export interface CreateProposalOptions {
|
|
39
|
+
/** Proposal nonce; defaults to `Date.now()`. */
|
|
40
|
+
nonce?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateSignerProposalOptions extends CreateProposalOptions {
|
|
43
|
+
/**
|
|
44
|
+
* New signing threshold. Defaults to the current threshold on add, and to
|
|
45
|
+
* `min(current threshold, remaining signer count)` on remove.
|
|
46
|
+
*/
|
|
47
|
+
newThreshold?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface CreateP2idProposalOptions extends CreateProposalOptions, P2ideHeightOptions {
|
|
50
|
+
/** Visibility of the created note. Defaults to `NoteType.Public` (issue #322). */
|
|
51
|
+
noteType?: NoteType;
|
|
52
|
+
}
|
|
32
53
|
export declare class Multisig {
|
|
33
54
|
account: Account;
|
|
34
55
|
threshold: number;
|
|
@@ -63,6 +84,24 @@ export declare class Multisig {
|
|
|
63
84
|
* source from the store to see the same state execution will.
|
|
64
85
|
*/
|
|
65
86
|
getStoreAccount(): Promise<Account>;
|
|
87
|
+
/**
|
|
88
|
+
* Read the current ordered signer public-key commitments from account
|
|
89
|
+
* storage (store-backed state, falling back to the snapshot).
|
|
90
|
+
*
|
|
91
|
+
* Commitments are ordered by signer index as currently stored; indices
|
|
92
|
+
* re-pack when signers are removed, so index 0 is the creation-time first
|
|
93
|
+
* key only until the first membership change. Unlike the
|
|
94
|
+
* `signerCommitments` field, which reflects the config detected at
|
|
95
|
+
* construction / last sync, this reads the account state directly.
|
|
96
|
+
* See `AccountInspector.getSignerPublicKeyCommitments` (issue #306).
|
|
97
|
+
*/
|
|
98
|
+
getSignerPublicKeyCommitments(): Promise<string[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Read the current guardian public-key commitment from account storage.
|
|
101
|
+
* The guarded-multisig always includes a guardian, so this throws (rather
|
|
102
|
+
* than returning null) when the entry is missing.
|
|
103
|
+
*/
|
|
104
|
+
getGuardianPublicKeyCommitment(): Promise<string>;
|
|
66
105
|
/**
|
|
67
106
|
* Maps a proposal type to the procedure that determines its threshold.
|
|
68
107
|
*/
|
|
@@ -75,6 +114,25 @@ export declare class Multisig {
|
|
|
75
114
|
* @returns The threshold that applies to this proposal type
|
|
76
115
|
*/
|
|
77
116
|
getEffectiveThreshold(proposalType: ProposalType): number;
|
|
117
|
+
/**
|
|
118
|
+
* Per-procedure threshold overrides whose effective signing ratio is diluted
|
|
119
|
+
* by growing the signer set to `newNumSigners`.
|
|
120
|
+
*
|
|
121
|
+
* Overrides are absolute signature counts, not ratios, and the on-chain
|
|
122
|
+
* `update_signers_and_threshold` procedure does not re-scale them: growing
|
|
123
|
+
* the approver set silently lowers every override's effective signing ratio
|
|
124
|
+
* (a 2-of-2 override becomes 2-of-n). Callers creating a proposal that grows
|
|
125
|
+
* the signer set should surface these overrides and suggest raising them via
|
|
126
|
+
* an update-procedure-threshold proposal alongside the growth.
|
|
127
|
+
*
|
|
128
|
+
* @param newNumSigners - Signer-set size the proposal produces
|
|
129
|
+
* @returns The configured overrides, or an empty list when the set does not grow
|
|
130
|
+
*/
|
|
131
|
+
overridesDilutedBySignerGrowth(newNumSigners: number): Array<{
|
|
132
|
+
procedure: ProcedureName;
|
|
133
|
+
threshold: number;
|
|
134
|
+
}>;
|
|
135
|
+
private warnOnOverrideDilution;
|
|
78
136
|
/**
|
|
79
137
|
* Update the GUARDIAN client used by this Multisig instance.
|
|
80
138
|
*
|
|
@@ -149,54 +207,52 @@ export declare class Multisig {
|
|
|
149
207
|
* Create an "add signer" proposal.
|
|
150
208
|
*
|
|
151
209
|
* @param newCommitment - Commitment of the new signer (hex)
|
|
152
|
-
* @param
|
|
153
|
-
*
|
|
210
|
+
* @param options - Optional settings: `nonce`, `newThreshold` (defaults to
|
|
211
|
+
* current threshold)
|
|
154
212
|
*/
|
|
155
|
-
createAddSignerProposal(newCommitment: string,
|
|
213
|
+
createAddSignerProposal(newCommitment: string, options?: CreateSignerProposalOptions, ...legacyArgs: never[]): Promise<Proposal>;
|
|
156
214
|
/**
|
|
157
215
|
* Create a "remove signer" proposal by executing the update_signers script to summary.
|
|
158
216
|
*
|
|
159
217
|
* @param signerToRemove - Commitment of the signer to remove (hex)
|
|
160
|
-
* @param
|
|
161
|
-
*
|
|
218
|
+
* @param options - Optional settings: `nonce`, `newThreshold` (defaults to
|
|
219
|
+
* min of current threshold and new signer count)
|
|
162
220
|
*/
|
|
163
|
-
createRemoveSignerProposal(signerToRemove: string,
|
|
221
|
+
createRemoveSignerProposal(signerToRemove: string, options?: CreateSignerProposalOptions, ...legacyArgs: never[]): Promise<Proposal>;
|
|
164
222
|
/**
|
|
165
223
|
* Create a "change threshold" proposal.
|
|
166
224
|
*
|
|
167
225
|
* @param newThreshold - The new threshold value
|
|
168
|
-
* @param
|
|
226
|
+
* @param options - Optional settings: `nonce`
|
|
169
227
|
*/
|
|
170
|
-
createChangeThresholdProposal(newThreshold: number,
|
|
171
|
-
createUpdateProcedureThresholdProposal(targetProcedure: ProcedureName, targetThreshold: number,
|
|
228
|
+
createChangeThresholdProposal(newThreshold: number, options?: CreateProposalOptions): Promise<Proposal>;
|
|
229
|
+
createUpdateProcedureThresholdProposal(targetProcedure: ProcedureName, targetThreshold: number, options?: CreateProposalOptions): Promise<Proposal>;
|
|
172
230
|
/**
|
|
173
231
|
* Create a "switch GUARDIAN" proposal to change the GUARDIAN provider.
|
|
174
232
|
*
|
|
175
233
|
* @param newGuardianEndpoint - The new GUARDIAN server endpoint URL
|
|
176
234
|
* @param newGuardianPubkey - The new GUARDIAN server's public key commitment (hex)
|
|
177
|
-
* @param
|
|
235
|
+
* @param options - Optional settings: `nonce`
|
|
178
236
|
*/
|
|
179
|
-
createSwitchGuardianProposal(newGuardianEndpoint: string, newGuardianPubkey: string,
|
|
237
|
+
createSwitchGuardianProposal(newGuardianEndpoint: string, newGuardianPubkey: string, options?: CreateProposalOptions): Promise<Proposal>;
|
|
180
238
|
/**
|
|
181
239
|
* Create a "consume notes" proposal to consume notes sent to the multisig account.
|
|
182
240
|
*
|
|
183
241
|
* @param noteIds - IDs of the notes to consume (hex strings)
|
|
184
|
-
* @param
|
|
242
|
+
* @param options - Optional settings: `nonce`
|
|
185
243
|
*/
|
|
186
|
-
createConsumeNotesProposal(noteIds: string[],
|
|
244
|
+
createConsumeNotesProposal(noteIds: string[], options?: CreateProposalOptions): Promise<Proposal>;
|
|
187
245
|
/**
|
|
188
246
|
* Create a P2ID proposal to send funds to another account.
|
|
189
247
|
*
|
|
190
248
|
* @param recipientId - Account ID of the recipient (hex string)
|
|
191
249
|
* @param faucetId - Faucet/token account ID (hex string)
|
|
192
250
|
* @param amount - Amount to send
|
|
193
|
-
* @param
|
|
194
|
-
*
|
|
195
|
-
*
|
|
251
|
+
* @param options - Optional settings: `nonce`; `noteType` selects the created
|
|
252
|
+
* note's visibility (defaults to `NoteType.Public`, issue #322);
|
|
253
|
+
* `reclaimHeight`/`timelockHeight` build a P2IDE note (issue #366)
|
|
196
254
|
*/
|
|
197
|
-
createP2idProposal(recipientId: string, faucetId: string, amount: bigint,
|
|
198
|
-
noteType?: NoteType;
|
|
199
|
-
}): Promise<Proposal>;
|
|
255
|
+
createP2idProposal(recipientId: string, faucetId: string, amount: bigint, options?: CreateP2idProposalOptions, ...legacyArgs: never[]): Promise<Proposal>;
|
|
200
256
|
/**
|
|
201
257
|
* Get notes that can be consumed by this multisig account.
|
|
202
258
|
*
|
|
@@ -206,7 +262,7 @@ export declare class Multisig {
|
|
|
206
262
|
getConsumableNotes(): Promise<ConsumableNote[]>;
|
|
207
263
|
/**
|
|
208
264
|
* Export a note created by this multisig account as serialized note-file
|
|
209
|
-
* bytes for out-of-band delivery
|
|
265
|
+
* bytes for out-of-band delivery.
|
|
210
266
|
*
|
|
211
267
|
* A private note publishes only its commitment on chain, so the recipient
|
|
212
268
|
* can never learn its contents via sync; the sender must hand them the
|
|
@@ -224,7 +280,7 @@ export declare class Multisig {
|
|
|
224
280
|
exportNoteToBytes(noteId: string): Promise<Uint8Array>;
|
|
225
281
|
/**
|
|
226
282
|
* Export a note created by this multisig account as a note file downloaded
|
|
227
|
-
* by the browser
|
|
283
|
+
* by the browser. Browser-only convenience over
|
|
228
284
|
* {@link exportNoteToBytes}; use that method directly in non-DOM
|
|
229
285
|
* environments.
|
|
230
286
|
*
|
|
@@ -233,7 +289,7 @@ export declare class Multisig {
|
|
|
233
289
|
*/
|
|
234
290
|
exportNoteToFile(noteId: string, filename?: string): Promise<void>;
|
|
235
291
|
/**
|
|
236
|
-
* Import a note file received out-of-band
|
|
292
|
+
* Import a note file received out-of-band so the note can be
|
|
237
293
|
* consumed by this multisig account.
|
|
238
294
|
*
|
|
239
295
|
* Sync the Miden client with the network afterwards so the note's on-chain
|
|
@@ -247,7 +303,7 @@ export declare class Multisig {
|
|
|
247
303
|
*/
|
|
248
304
|
importNoteFromBytes(noteBytes: Uint8Array): Promise<string>;
|
|
249
305
|
/**
|
|
250
|
-
* Import a note file received out-of-band
|
|
306
|
+
* Import a note file received out-of-band from a browser
|
|
251
307
|
* `File`/`Blob` (e.g. a file-input selection). See
|
|
252
308
|
* {@link importNoteFromBytes} for the returned identifier semantics.
|
|
253
309
|
*/
|
|
@@ -258,10 +314,9 @@ export declare class Multisig {
|
|
|
258
314
|
* The P2ID note is rebuilt deterministically from the proposal salt, so the
|
|
259
315
|
* ID is known ahead of execution. For a private P2ID this is the ID to pass
|
|
260
316
|
* to {@link exportNoteToBytes} after executing, so the note file can be delivered
|
|
261
|
-
* to the recipient out-of-band
|
|
317
|
+
* to the recipient out-of-band.
|
|
262
318
|
*
|
|
263
|
-
*
|
|
264
|
-
* current vault state, which execution itself changes.
|
|
319
|
+
* The note ID remains deterministic from the proposal metadata and salt.
|
|
265
320
|
*/
|
|
266
321
|
getP2idNoteId(proposal: Proposal): Promise<string>;
|
|
267
322
|
/**
|
|
@@ -298,6 +353,16 @@ export declare class Multisig {
|
|
|
298
353
|
* flow produces.
|
|
299
354
|
*/
|
|
300
355
|
abandonStatus(nonce: number): Promise<AbandonStatus>;
|
|
356
|
+
/**
|
|
357
|
+
* Fetch one page of this account's canonical delta history
|
|
358
|
+
* from GUARDIAN (issue #413), newest-first by nonce, with decoded
|
|
359
|
+
* input/output note summaries. Pass `options.cursor` from a previous
|
|
360
|
+
* page's `nextCursor` to resume; an absent `nextCursor` means the
|
|
361
|
+
* feed is exhausted. Served while the account is paused. Only
|
|
362
|
+
* transactions pushed through GUARDIAN appear — history of
|
|
363
|
+
* transactions executed elsewhere is not visible to it.
|
|
364
|
+
*/
|
|
365
|
+
deltaHistory(options?: HistoryOptions): Promise<HistoryPage>;
|
|
301
366
|
signProposal(proposalId: string): Promise<Proposal>;
|
|
302
367
|
private getProposalForSigning;
|
|
303
368
|
createTransactionProposalRequest(proposalId: string): Promise<TransactionRequest>;
|
|
@@ -311,20 +376,22 @@ export declare class Multisig {
|
|
|
311
376
|
* Submit an integration-built transaction (advice already injected). Mirrors
|
|
312
377
|
* the Rust `submit_transaction`; used by the custom proposal producer flow
|
|
313
378
|
* after `prepareCustomExecution` rebuilds its request with the returned advice.
|
|
379
|
+
* The transaction is executed at the proposal's anchored reference block,
|
|
380
|
+
* since the collected signatures only authorize the summary produced there.
|
|
314
381
|
*/
|
|
315
|
-
submitTransaction(request: TransactionRequest): Promise<void>;
|
|
382
|
+
submitTransaction(proposalId: string, request: TransactionRequest): Promise<void>;
|
|
316
383
|
/**
|
|
317
|
-
* Create a proposal from a producer-built transaction the SDK does not model
|
|
318
|
-
*
|
|
384
|
+
* Create a proposal from a producer-built transaction the SDK does not model.
|
|
385
|
+
* `transactionRequestBytes` is a serialized TransactionRequest;
|
|
319
386
|
* `proposalType` is a free-form, non-empty label that must not collide with a
|
|
320
387
|
* built-in type. The integration keeps its own recipe to execute later via
|
|
321
388
|
* `prepareCustomExecution`.
|
|
322
389
|
*/
|
|
323
|
-
createCustomProposal(transactionRequestBytes: Uint8Array, proposalType: string,
|
|
390
|
+
createCustomProposal(transactionRequestBytes: Uint8Array, proposalType: string, options?: CreateProposalOptions): Promise<Proposal>;
|
|
324
391
|
/**
|
|
325
392
|
* Assemble the validated execution advice (cosigner signatures + GUARDIAN
|
|
326
393
|
* acknowledgment) for a ready custom proposal, so an integration can rebuild
|
|
327
|
-
* its transaction with its own recipe and submit
|
|
394
|
+
* its transaction with its own recipe and submit.
|
|
328
395
|
*
|
|
329
396
|
* `transactionRequestBytes` is the serialized transaction request; it is used only to verify
|
|
330
397
|
* (binding check) that it reproduces the signed commitment, before the
|
|
@@ -362,6 +429,13 @@ export declare class Multisig {
|
|
|
362
429
|
signProposalOffline(proposalId: string): Promise<string>;
|
|
363
430
|
private ensureProposalCommitmentMatchesSummary;
|
|
364
431
|
private verifyProposalMetadataBinding;
|
|
432
|
+
/**
|
|
433
|
+
* Decodes a proposal's chain anchor. Throws when absent: a proposal without
|
|
434
|
+
* an anchor was created at an unknown reference block, so its signed summary
|
|
435
|
+
* cannot be reproduced, verified, or executed. The caller owns the returned
|
|
436
|
+
* anchor and must `free()` it once done.
|
|
437
|
+
*/
|
|
438
|
+
private requireProposalAnchor;
|
|
365
439
|
private buildTransactionRequestFromMetadata;
|
|
366
440
|
}
|
|
367
441
|
//# sourceMappingURL=multisig.d.ts.map
|
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,
|
|
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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