ox 0.14.37 → 0.14.39

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/_cjs/tempo/MultisigConfig.js +71 -15
  3. package/_cjs/tempo/MultisigConfig.js.map +1 -1
  4. package/_cjs/tempo/MultisigOperation.js +241 -19
  5. package/_cjs/tempo/MultisigOperation.js.map +1 -1
  6. package/_cjs/tempo/SignatureEnvelope.js +71 -108
  7. package/_cjs/tempo/SignatureEnvelope.js.map +1 -1
  8. package/_cjs/version.js +1 -1
  9. package/_esm/tempo/MultisigConfig.js +140 -71
  10. package/_esm/tempo/MultisigConfig.js.map +1 -1
  11. package/_esm/tempo/MultisigOperation.js +331 -19
  12. package/_esm/tempo/MultisigOperation.js.map +1 -1
  13. package/_esm/tempo/SignatureEnvelope.js +84 -143
  14. package/_esm/tempo/SignatureEnvelope.js.map +1 -1
  15. package/_esm/tempo/index.js +2 -2
  16. package/_esm/version.js +1 -1
  17. package/_types/tempo/KeyAuthorization.d.ts +1 -1
  18. package/_types/tempo/KeyAuthorization.d.ts.map +1 -1
  19. package/_types/tempo/MultisigConfig.d.ts +137 -73
  20. package/_types/tempo/MultisigConfig.d.ts.map +1 -1
  21. package/_types/tempo/MultisigOperation.d.ts +169 -1
  22. package/_types/tempo/MultisigOperation.d.ts.map +1 -1
  23. package/_types/tempo/SignatureEnvelope.d.ts +81 -75
  24. package/_types/tempo/SignatureEnvelope.d.ts.map +1 -1
  25. package/_types/tempo/index.d.ts +2 -2
  26. package/_types/version.d.ts +1 -1
  27. package/package.json +6 -1
  28. package/tempo/KeyAuthorization.test-d.ts +12 -0
  29. package/tempo/KeyAuthorization.test.ts +54 -0
  30. package/tempo/KeyAuthorization.ts +1 -1
  31. package/tempo/MultisigConfig.test-d/package.json +6 -0
  32. package/tempo/MultisigConfig.test-d.ts +52 -0
  33. package/tempo/MultisigConfig.test.ts +291 -263
  34. package/tempo/MultisigConfig.ts +250 -95
  35. package/tempo/MultisigOperation.test-d.ts +25 -0
  36. package/tempo/MultisigOperation.test.ts +754 -22
  37. package/tempo/MultisigOperation.ts +548 -17
  38. package/tempo/SignatureEnvelope.test-d.ts +57 -40
  39. package/tempo/SignatureEnvelope.test.ts +523 -480
  40. package/tempo/SignatureEnvelope.ts +250 -257
  41. package/tempo/index.ts +2 -2
  42. package/tempo/multisig.e2e.test.ts +113 -86
  43. package/version.ts +1 -1
@@ -3,13 +3,7 @@ import type * as Bytes from '../core/Bytes.js';
3
3
  import * as Errors from '../core/Errors.js';
4
4
  import * as Hash from '../core/Hash.js';
5
5
  import * as Hex from '../core/Hex.js';
6
- import type { Compute, OneOf } from '../core/internal/types.js';
7
- /** Maximum number of owners allowed in a native multisig config. */
8
- export declare const maxOwners = 48;
9
- /** Maximum threshold accepted by a native multisig config. */
10
- export declare const maxThreshold = 255;
11
- /** Maximum number of owner approvals in a native multisig signature. */
12
- export declare const maxSignatures = 8;
6
+ import type { Compute } from '../core/internal/types.js';
13
7
  /**
14
8
  * Maximum number of native multisig signatures in one nested authorization
15
9
  * path, including the top-level transaction signature.
@@ -17,15 +11,35 @@ export declare const maxSignatures = 8;
17
11
  export declare const maxNestingDepth = 2;
18
12
  /** Maximum encoded byte length for one primitive owner approval. */
19
13
  export declare const maxOwnerSignatureBytes = 2049;
14
+ /** Maximum number of owners allowed in a native multisig config. */
15
+ export declare const maxOwners = 48;
16
+ /** Maximum number of owner approvals in a native multisig signature. */
17
+ export declare const maxSignatures = 8;
18
+ /** Maximum threshold accepted by a native multisig config. */
19
+ export declare const maxThreshold = 255;
20
+ /** Maximum version accepted by a native multisig config. */
21
+ export declare const maxVersion: bigint;
20
22
  /** Tempo signature type byte for native multisig signatures. */
21
23
  export declare const signatureTypeByte: "0x05";
22
24
  /** Zero 32-byte salt (the default when no salt is provided). */
23
25
  export declare const zeroSalt: `0x${string}`;
24
26
  /**
25
- * Native multisig configuration. Determines the stable multisig account
26
- * address.
27
+ * Complete native multisig configuration witness.
27
28
  */
28
- export type Config<numberType = number> = Compute<{
29
+ export type Config<bigintType = bigint, numberType = number> = Compute<{
30
+ /** Weighted owner list, strictly ascending by owner address. */
31
+ owners: readonly Owner<numberType>[];
32
+ /** Caller-chosen 32-byte salt. */
33
+ salt: Hex.Hex;
34
+ /** Minimum total owner weight required for authorization. */
35
+ threshold: numberType;
36
+ /** Configuration version. Zero identifies the initial configuration. */
37
+ version: bigintType;
38
+ }>;
39
+ /** Input accepted when constructing a native multisig configuration. */
40
+ export type Input<versionType extends bigint | number = bigint | number, numberType = number> = Compute<{
41
+ /** Weighted owner list (strictly ascending by `owner` address). */
42
+ owners: readonly Owner<numberType>[];
29
43
  /**
30
44
  * Caller-chosen 32-byte salt mixed into the derived account address.
31
45
  * Defaults to the zero salt (`MultisigConfig.zeroSalt`) when omitted.
@@ -33,8 +47,8 @@ export type Config<numberType = number> = Compute<{
33
47
  salt?: Hex.Hex | undefined;
34
48
  /** Minimum total owner weight required to authorize a transaction. */
35
49
  threshold: numberType;
36
- /** Weighted owner list (strictly ascending by `owner` address). */
37
- owners: readonly Owner<numberType>[];
50
+ /** Configuration version as a safe integer or bigint. Defaults to `0n`. */
51
+ version?: versionType | undefined;
38
52
  }>;
39
53
  /** Native multisig owner entry. */
40
54
  export type Owner<numberType = number> = {
@@ -43,16 +57,19 @@ export type Owner<numberType = number> = {
43
57
  /** Nonzero owner weight. */
44
58
  weight: numberType;
45
59
  };
60
+ /** JSON-RPC representation of a native multisig configuration. */
61
+ export type Rpc = Config<Hex.Hex, number>;
46
62
  /** RLP tuple representation of a {@link ox#MultisigConfig.Config}. */
47
63
  export type Tuple = readonly [
48
64
  salt: Hex.Hex,
65
+ version: Hex.Hex,
49
66
  threshold: Hex.Hex,
50
67
  owners: readonly Hex.Hex[][]
51
68
  ];
52
69
  /**
53
70
  * Asserts that a native multisig {@link ox#MultisigConfig.Config} is valid.
54
71
  *
55
- * Mirrors the Tempo `InitMultisig::validate` rules: owners non-empty and
72
+ * Mirrors the Tempo configuration rules: owners non-empty and
56
73
  * `<= maxOwners`, strictly ascending unique nonzero owner addresses, nonzero
57
74
  * integer owner weights, integer `threshold` between `1` and `maxThreshold`,
58
75
  * total weight `<= 255` (u8 max), and a threshold reachable by at most
@@ -72,7 +89,7 @@ export type Tuple = readonly [
72
89
  *
73
90
  * @param config - The multisig config.
74
91
  */
75
- export declare function assert<numberType = number>(config: Config<numberType>): void;
92
+ export declare function assert<versionType extends bigint | number = bigint | number, numberType = number>(config: Input<versionType, numberType>): void;
76
93
  export declare namespace assert {
77
94
  type ErrorType = InvalidConfigError | Errors.GlobalErrorType;
78
95
  }
@@ -87,11 +104,11 @@ export declare namespace assert {
87
104
  * import { MultisigConfig } from 'ox/tempo'
88
105
  *
89
106
  * const config = MultisigConfig.from({
90
- * threshold: 2,
91
107
  * owners: [
92
108
  * { owner: '0x2222222222222222222222222222222222222222', weight: 1 },
93
109
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
94
110
  * ],
111
+ * threshold: 2,
95
112
  * })
96
113
  * // owners are now sorted ascending by address
97
114
  * ```
@@ -99,7 +116,40 @@ export declare namespace assert {
99
116
  * @param config - The multisig config.
100
117
  * @returns The normalized multisig config.
101
118
  */
102
- export declare function from<numberType = number>(config: Config<numberType>): Config<numberType>;
119
+ export declare function from<numberType = number>(config: Input<0 | 0n, numberType> & {
120
+ version?: 0 | 0n | undefined;
121
+ }): Config<0n, numberType>;
122
+ export declare function from<bigintType extends bigint, numberType = number>(config: Input<bigintType, numberType> & {
123
+ version: bigintType;
124
+ }): Config<bigintType, numberType>;
125
+ export declare function from<numberType = number>(config: Input<number, numberType> & {
126
+ version: number;
127
+ }): Config<bigint, numberType>;
128
+ export declare function from<numberType = number>(config: Input<bigint | number, numberType>): Config<bigint, numberType>;
129
+ /**
130
+ * Converts a JSON-RPC multisig configuration to its domain representation.
131
+ *
132
+ * @example
133
+ * ```ts twoslash
134
+ * import { MultisigConfig } from 'ox/tempo'
135
+ *
136
+ * const config = MultisigConfig.fromRpc({
137
+ * owners: [
138
+ * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
139
+ * ],
140
+ * salt: `0x${'00'.repeat(32)}`,
141
+ * threshold: 1,
142
+ * version: '0x0',
143
+ * })
144
+ * ```
145
+ *
146
+ * @param config - The JSON-RPC multisig configuration.
147
+ * @returns The normalized multisig configuration.
148
+ */
149
+ export declare function fromRpc(config: Rpc): Config;
150
+ export declare namespace fromRpc {
151
+ type ErrorType = assert.ErrorType | Hex.toBigInt.ErrorType | Errors.GlobalErrorType;
152
+ }
103
153
  /**
104
154
  * Converts an RLP {@link ox#MultisigConfig.Tuple} back to a
105
155
  * {@link ox#MultisigConfig.Config}.
@@ -110,6 +160,7 @@ export declare function from<numberType = number>(config: Config<numberType>): C
110
160
  *
111
161
  * const config = MultisigConfig.fromTuple([
112
162
  * `0x${'00'.repeat(32)}`,
163
+ * '0x',
113
164
  * '0x01',
114
165
  * [['0x1111111111111111111111111111111111111111', '0x01']],
115
166
  * ])
@@ -125,30 +176,56 @@ export declare function fromTuple(tuple: Tuple): Config;
125
176
  * Preimage (fixed-width big-endian, **not** RLP):
126
177
  * `keccak256("tempo:multisig:account" || salt || u8(threshold) || u8(owners.length) || (owner || u8(weight)) for each owner)[12:32]`.
127
178
  *
128
- * The address is derived once from the initial (bootstrap) config and never
129
- * changes — config updates do not affect it.
179
+ * The address is derived once from the initial version-0 config. Config
180
+ * updates do not change it.
130
181
  *
131
182
  * @example
132
183
  * ```ts twoslash
133
184
  * import { MultisigConfig } from 'ox/tempo'
134
185
  *
135
186
  * const initialConfig = MultisigConfig.from({
136
- * threshold: 1,
137
187
  * owners: [
138
188
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
139
189
  * ],
190
+ * threshold: 1,
140
191
  * })
141
192
  *
142
193
  * const address = MultisigConfig.getAddress(initialConfig)
143
194
  * ```
144
195
  *
145
- * @param config - The initial (bootstrap) multisig config.
196
+ * @param config - The initial multisig config.
146
197
  * @returns The multisig account address.
147
198
  */
148
- export declare function getAddress(config: Config): Address.Address;
199
+ export declare function getAddress(config: Input): Address.Address;
149
200
  export declare namespace getAddress {
150
201
  type ErrorType = assert.ErrorType | Address.from.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.fromNumber.ErrorType | Hex.fromString.ErrorType | Hex.slice.ErrorType | Errors.GlobalErrorType;
151
202
  }
203
+ /**
204
+ * Computes the commitment for a native multisig configuration.
205
+ *
206
+ * The commitment uses raw fixed-width fields, not RLP or ABI encoding:
207
+ * `keccak256("tempo:multisig:config" || salt || uint64be(version) || uint8(threshold) || uint8(owners.length) || owners)`.
208
+ *
209
+ * @example
210
+ * ```ts twoslash
211
+ * import { MultisigConfig } from 'ox/tempo'
212
+ *
213
+ * const commitment = MultisigConfig.getCommitment({
214
+ * owners: [
215
+ * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
216
+ * ],
217
+ * threshold: 1,
218
+ * version: 1n,
219
+ * })
220
+ * ```
221
+ *
222
+ * @param config - The complete multisig configuration.
223
+ * @returns The configuration commitment.
224
+ */
225
+ export declare function getCommitment(config: Input): Hex.Hex;
226
+ export declare namespace getCommitment {
227
+ type ErrorType = assert.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.fromNumber.ErrorType | Hex.fromString.ErrorType | Errors.GlobalErrorType;
228
+ }
152
229
  /**
153
230
  * Computes the digest a native multisig owner approves (signs).
154
231
  *
@@ -156,9 +233,9 @@ export declare namespace getAddress {
156
233
  * where `inner_digest` is the transaction sign payload
157
234
  * ({@link ox#TxEnvelopeTempo.(getSignPayload:function)}).
158
235
  *
159
- * The digest is keyed on the permanent `account` derived from the initial
160
- * (bootstrap) config and the current config `version`. Bootstrap approvals use
161
- * version `0n`, which is also the default; each config update increments it.
236
+ * The digest is keyed on the permanent `account` and the supplied config
237
+ * version. Initial approvals use version `0n`; each config update increments
238
+ * it.
162
239
  *
163
240
  * For a nested multisig owner approval, the parent digest becomes the nested
164
241
  * approval's `payload`, with the nested multisig `account`.
@@ -167,11 +244,11 @@ export declare namespace getAddress {
167
244
  * ```ts twoslash
168
245
  * import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
169
246
  *
170
- * const initialConfig = MultisigConfig.from({
171
- * threshold: 1,
247
+ * const config = MultisigConfig.from({
172
248
  * owners: [
173
249
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
174
250
  * ],
251
+ * threshold: 1,
175
252
  * })
176
253
  *
177
254
  * const envelope = TxEnvelopeTempo.from({
@@ -180,66 +257,53 @@ export declare namespace getAddress {
180
257
  * })
181
258
  *
182
259
  * const digest = MultisigConfig.getSignPayload({
260
+ * account: MultisigConfig.getAddress(config),
261
+ * config,
183
262
  * payload: TxEnvelopeTempo.getSignPayload(envelope),
184
- * initialConfig,
185
263
  * })
186
264
  * ```
187
265
  *
188
- * @example
189
- * ### From `account`
190
- *
191
- * If you already have the permanent `account` (for example, recovered from a
192
- * stored envelope), pass it directly:
266
+ * @param value - The digest derivation parameters.
267
+ * @returns The owner approval digest.
268
+ */
269
+ export declare function getSignPayload(value: getSignPayload.Value): Hex.Hex;
270
+ export declare namespace getSignPayload {
271
+ type Value = {
272
+ /** The native multisig account address. */
273
+ account: Address.Address;
274
+ /** Configuration whose version applies to the approval. */
275
+ config: Pick<Config<bigint | number>, 'version'>;
276
+ /** The inner transaction sign payload (`tx.signature_hash()`). */
277
+ payload: Hex.Hex | Bytes.Bytes;
278
+ };
279
+ type ErrorType = assert.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.from.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
280
+ }
281
+ /**
282
+ * Converts a multisig configuration to its JSON-RPC representation.
193
283
  *
284
+ * @example
194
285
  * ```ts twoslash
195
- * import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
286
+ * import { MultisigConfig } from 'ox/tempo'
196
287
  *
197
- * const initialConfig = MultisigConfig.from({
198
- * threshold: 1,
288
+ * const config = MultisigConfig.toRpc({
199
289
  * owners: [
200
290
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
201
291
  * ],
202
- * })
203
- * const account = MultisigConfig.getAddress(initialConfig)
204
- *
205
- * const envelope = TxEnvelopeTempo.from({ chainId: 1, calls: [] })
206
- *
207
- * const digest = MultisigConfig.getSignPayload({
208
- * payload: TxEnvelopeTempo.getSignPayload(envelope),
209
- * account,
210
- * version: 1n
292
+ * threshold: 1,
211
293
  * })
212
294
  * ```
213
295
  *
214
- * @param value - The digest derivation parameters.
215
- * @returns The owner approval digest.
296
+ * @param config - The multisig configuration.
297
+ * @returns The JSON-RPC multisig configuration.
216
298
  */
217
- export declare function getSignPayload(value: getSignPayload.Value): Hex.Hex;
218
- export declare namespace getSignPayload {
219
- type Value = {
220
- /** The inner transaction sign payload (`tx.signature_hash()`). */
221
- payload: Hex.Hex | Bytes.Bytes;
222
- /** Current multisig config version. Defaults to `0n`. */
223
- version?: bigint | undefined;
224
- } & OneOf<{
225
- /** The native multisig account address. */
226
- account: Address.Address;
227
- } | {
228
- /**
229
- * The initial multisig config (the bootstrap config that derived the
230
- * permanent `account`). Used to derive the account automatically.
231
- * Config updates never change `account`, so the initial config can
232
- * continue deriving the account for post-update transactions.
233
- */
234
- initialConfig: Config;
235
- }>;
236
- type ErrorType = getAddress.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.from.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
299
+ export declare function toRpc(config: Input): Rpc;
300
+ export declare namespace toRpc {
301
+ type ErrorType = assert.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
237
302
  }
238
303
  /**
239
- * Converts a {@link ox#MultisigConfig.Config} to its RLP tuple form (carried
240
- * by the multisig signature `init`).
304
+ * Converts a {@link ox#MultisigConfig.Config} to its RLP tuple form.
241
305
  *
242
- * Tuple shape: `[salt, threshold, [[owner, weight], ...]]`. The
306
+ * Tuple shape: `[salt, version, threshold, [[owner, weight], ...]]`. The
243
307
  * 32-byte `salt` encodes as a full fixed-width string; other integers use
244
308
  * canonical RLP encoding (zero values encode as `0x`).
245
309
  *
@@ -248,17 +312,17 @@ export declare namespace getSignPayload {
248
312
  * import { MultisigConfig } from 'ox/tempo'
249
313
  *
250
314
  * const tuple = MultisigConfig.toTuple({
251
- * threshold: 1,
252
315
  * owners: [
253
316
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
254
317
  * ],
318
+ * threshold: 1,
255
319
  * })
256
320
  * ```
257
321
  *
258
322
  * @param config - The multisig config.
259
323
  * @returns The RLP tuple.
260
324
  */
261
- export declare function toTuple(config: Config): Tuple;
325
+ export declare function toTuple(config: Input): Tuple;
262
326
  /**
263
327
  * Validates a native multisig {@link ox#MultisigConfig.Config}. Returns `true`
264
328
  * if valid, `false` otherwise.
@@ -268,10 +332,10 @@ export declare function toTuple(config: Config): Tuple;
268
332
  * import { MultisigConfig } from 'ox/tempo'
269
333
  *
270
334
  * const valid = MultisigConfig.validate({
271
- * threshold: 1,
272
335
  * owners: [
273
336
  * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
274
337
  * ],
338
+ * threshold: 1,
275
339
  * })
276
340
  * // @log: true
277
341
  * ```
@@ -279,7 +343,7 @@ export declare function toTuple(config: Config): Tuple;
279
343
  * @param config - The multisig config.
280
344
  * @returns Whether the config is valid.
281
345
  */
282
- export declare function validate(config: Config): boolean;
346
+ export declare function validate(config: Input): boolean;
283
347
  /** Thrown when a native multisig config is invalid. */
284
348
  export declare class InvalidConfigError extends Errors.BaseError {
285
349
  readonly name = "MultisigConfig.InvalidConfigError";
@@ -1 +1 @@
1
- {"version":3,"file":"MultisigConfig.d.ts","sourceRoot":"","sources":["../../tempo/MultisigConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAC9C,OAAO,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e,CAAA;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,KAAK,CAe5C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO,CAO/C;AAED,uDAAuD;AACvD,qBAAa,kBAAmB,SAAQ,MAAM,CAAC,SAAS;IACtD,SAAkB,IAAI,uCAAsC;gBAChD,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;CAG3C"}
@@ -1,7 +1,10 @@
1
1
  import * as Address from '../core/Address.js';
2
2
  import * as Errors from '../core/Errors.js';
3
3
  import * as Hex from '../core/Hex.js';
4
+ import * as KeyAuthorization_ from './KeyAuthorization.js';
4
5
  import * as MultisigConfig from './MultisigConfig.js';
6
+ import * as SignatureEnvelope from './SignatureEnvelope.js';
7
+ import * as TxEnvelopeTempo from './TxEnvelopeTempo.js';
5
8
  /** Fields shared by every multisig operation. */
6
9
  export type Base<quantity = bigint> = {
7
10
  /** Root multisig account. */
@@ -9,7 +12,7 @@ export type Base<quantity = bigint> = {
9
12
  /** Every retained serialized owner approval. */
10
13
  approvals: readonly Hex.Hex[];
11
14
  /** Root configuration used to verify approvals. */
12
- config: MultisigConfig.Config;
15
+ config: MultisigConfig.Config<quantity>;
13
16
  /** Root configuration version. */
14
17
  configVersion: quantity;
15
18
  /** Unix creation time in milliseconds. */
@@ -59,6 +62,143 @@ export type TransactionRpc = TransactionOperation<Hex.Hex>;
59
62
  export type KeyAuthorizationRpc = KeyAuthorizationOperation<Hex.Hex>;
60
63
  /** JSON-RPC multisig operation. */
61
64
  export type Rpc = Operation<Hex.Hex>;
65
+ /**
66
+ * Derives the deterministic hash for a multisig operation.
67
+ *
68
+ * @example
69
+ * ```ts twoslash
70
+ * // @noErrors
71
+ * import { MultisigOperation } from 'ox/tempo'
72
+ *
73
+ * const hash = MultisigOperation.getHash({
74
+ * account,
75
+ * configVersion: 1n,
76
+ * transaction,
77
+ * type: 'transaction',
78
+ * })
79
+ * ```
80
+ *
81
+ * @param options - Operation payload and multisig identity.
82
+ * @returns The operation hash signed by each owner.
83
+ */
84
+ export declare function getHash(options: getHash.Options): Hex.Hex;
85
+ export declare namespace getHash {
86
+ /** Parameters for `getHash`. */
87
+ type Options = {
88
+ /** Root multisig account. */
89
+ account: Address.Address;
90
+ /** Root configuration version. */
91
+ configVersion: bigint;
92
+ } & ({
93
+ /** Canonical serialized key authorization. */
94
+ keyAuthorization: Hex.Hex;
95
+ /** Operation kind. */
96
+ type: 'keyAuthorization';
97
+ } | {
98
+ /** Canonical serialized Tempo envelope without its outer sender signature. */
99
+ transaction: Hex.Hex;
100
+ /** Operation kind. */
101
+ type: 'transaction';
102
+ });
103
+ /** Error type for `getHash`. */
104
+ type ErrorType = KeyAuthorization_.deserialize.ErrorType | KeyAuthorization_.getSignPayload.ErrorType | MultisigConfig.getSignPayload.ErrorType | TxEnvelopeTempo.deserialize.ErrorType | TxEnvelopeTempo.getSignPayload.ErrorType | Errors.GlobalErrorType;
105
+ }
106
+ /**
107
+ * Validates, deduplicates, and selects owner approvals for an operation.
108
+ *
109
+ * The function retains one canonical approval per owner. It selects the
110
+ * smallest deterministic quorum by owner weight, then orders the selected
111
+ * approvals by owner address for serialization.
112
+ *
113
+ * @example
114
+ * ```ts twoslash
115
+ * // @noErrors
116
+ * import { MultisigOperation } from 'ox/tempo'
117
+ *
118
+ * const selection = await MultisigOperation.selectApprovals({
119
+ * account,
120
+ * approvals,
121
+ * config,
122
+ * hash,
123
+ * resolveConfig,
124
+ * })
125
+ * ```
126
+ *
127
+ * @param options - Approval selection parameters.
128
+ * @returns The retained approvals and deterministic quorum selection.
129
+ */
130
+ export declare function selectApprovals(options: selectApprovals.Options): Promise<selectApprovals.ReturnValue>;
131
+ export declare namespace selectApprovals {
132
+ /** Parameters for `selectApprovals`. */
133
+ type Options = {
134
+ /** Root multisig account. */
135
+ account: Address.Address;
136
+ /** Serialized primitive or nested owner approvals. */
137
+ approvals: readonly SignatureEnvelope.Serialized[];
138
+ /** Current root multisig configuration. */
139
+ config: MultisigConfig.Config;
140
+ /** Deterministic operation hash approved by root owners. */
141
+ hash: Hex.Hex;
142
+ /** Resolves the current configuration of a nested multisig owner. */
143
+ resolveConfig?: ResolveConfig | undefined;
144
+ };
145
+ /** Resolves an initialized nested multisig configuration. */
146
+ type ResolveConfig = (options: ResolveConfigOptions) => ResolvedConfig | Promise<ResolvedConfig>;
147
+ /** Nested multisig configuration lookup parameters. */
148
+ type ResolveConfigOptions = {
149
+ /** Nested multisig account. */
150
+ account: Address.Address;
151
+ };
152
+ /** Resolved nested multisig configuration. */
153
+ type ResolvedConfig = {
154
+ /** Current nested multisig configuration. */
155
+ config: MultisigConfig.Config;
156
+ /** Current nested multisig configuration version. */
157
+ version: bigint;
158
+ };
159
+ /** Result of validating and selecting approvals. */
160
+ type ReturnValue = {
161
+ /** Every retained approval, ordered by owner address. */
162
+ approvals: readonly SignatureEnvelope.Serialized[];
163
+ /** Number of approvals selected for quorum evaluation. */
164
+ signatureCount: number;
165
+ /** Approvals selected for serialization, ordered by owner address. */
166
+ selectedApprovals: readonly SignatureEnvelope.Serialized[];
167
+ /** Required owner weight. */
168
+ threshold: number;
169
+ /** Owner weight reached by the selected approvals. */
170
+ weight: number;
171
+ };
172
+ /** Error type for `selectApprovals`. */
173
+ type ErrorType = InvalidApprovalError | MultisigConfig.assert.ErrorType | MultisigConfig.getSignPayload.ErrorType | SignatureEnvelope.CoercionError | SignatureEnvelope.extractAddress.ErrorType | SignatureEnvelope.serialize.ErrorType | SignatureEnvelope.VerificationError | Errors.GlobalErrorType;
174
+ }
175
+ /**
176
+ * Serializes a multisig transaction operation with selected owner approvals.
177
+ *
178
+ * @example
179
+ * ```ts twoslash
180
+ * // @noErrors
181
+ * import { MultisigOperation } from 'ox/tempo'
182
+ *
183
+ * const transaction = MultisigOperation.serializeTransaction(operation, {
184
+ * approvals: selection.selectedApprovals,
185
+ * })
186
+ * ```
187
+ *
188
+ * @param operation - Multisig transaction operation.
189
+ * @param options - Transaction serialization options.
190
+ * @returns The signed serialized Tempo transaction.
191
+ */
192
+ export declare function serializeTransaction(operation: TransactionOperation, options: serializeTransaction.Options): TxEnvelopeTempo.Serialized;
193
+ export declare namespace serializeTransaction {
194
+ /** Options for `serializeTransaction`. */
195
+ type Options = {
196
+ /** Selected retained approvals to attach to the transaction. */
197
+ approvals: readonly SignatureEnvelope.Serialized[];
198
+ };
199
+ /** Error type for `serializeTransaction`. */
200
+ type ErrorType = from.ErrorType | InvalidOperationError | SignatureEnvelope.sortMultisigApprovals.ErrorType | TxEnvelopeTempo.deserialize.ErrorType | TxEnvelopeTempo.getSignPayload.ErrorType | TxEnvelopeTempo.serialize.ErrorType | Errors.GlobalErrorType;
201
+ }
62
202
  /**
63
203
  * Validates and normalizes a multisig operation.
64
204
  *
@@ -122,6 +262,34 @@ export declare namespace toRpc {
122
262
  /** Error type for `toRpc`. */
123
263
  type ErrorType = from.ErrorType | Hex.fromNumber.ErrorType;
124
264
  }
265
+ /** Thrown when a multisig owner approval is invalid. */
266
+ export declare class InvalidApprovalError extends Errors.BaseError<Error | undefined> {
267
+ readonly name = "MultisigOperation.InvalidApprovalError";
268
+ /**
269
+ * Creates an invalid multisig approval error.
270
+ *
271
+ * @example
272
+ * ```ts twoslash
273
+ * import { MultisigOperation } from 'ox/tempo'
274
+ *
275
+ * throw new MultisigOperation.InvalidApprovalError({
276
+ * reason: 'signature is from a non-owner',
277
+ * })
278
+ * ```
279
+ *
280
+ * @param options - Error options.
281
+ */
282
+ constructor(options?: InvalidApprovalError.Options);
283
+ }
284
+ export declare namespace InvalidApprovalError {
285
+ /** Error construction options. */
286
+ type Options = {
287
+ /** Underlying error. */
288
+ cause?: unknown | undefined;
289
+ /** Validation failure. */
290
+ reason?: string | undefined;
291
+ };
292
+ }
125
293
  /** Thrown when a multisig operation is malformed or internally inconsistent. */
126
294
  export declare class InvalidOperationError extends Errors.BaseError<Error | undefined> {
127
295
  readonly name = "MultisigOperation.InvalidOperationError";
@@ -1 +1 @@
1
- {"version":3,"file":"MultisigOperation.d.ts","sourceRoot":"","sources":["../../tempo/MultisigOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AAErC,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AAIrD,iDAAiD;AACjD,MAAM,MAAM,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI;IACpC,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;IACxB,gDAAgD;IAChD,SAAS,EAAE,SAAS,GAAG,CAAC,GAAG,EAAE,CAAA;IAC7B,mDAAmD;IACnD,MAAM,EAAE,cAAc,CAAC,MAAM,CAAA;IAC7B,kCAAkC;IAClC,aAAa,EAAE,QAAQ,CAAA;IACvB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,IAAI,EAAE,GAAG,CAAC,GAAG,CAAA;IACb,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAA;IACb,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAA;IACtB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,+CAA+C;AAC/C,MAAM,MAAM,oBAAoB,CAAC,QAAQ,GAAG,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;IACrE,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,+BAA+B;IAC/B,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CA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