ox 0.14.26 → 0.14.28
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/CHANGELOG.md +12 -0
- package/_cjs/tempo/MultisigConfig.js +127 -0
- package/_cjs/tempo/MultisigConfig.js.map +1 -0
- package/_cjs/tempo/ReceivePolicyReceipt.js +80 -0
- package/_cjs/tempo/ReceivePolicyReceipt.js.map +1 -0
- package/_cjs/tempo/SignatureEnvelope.js +107 -6
- package/_cjs/tempo/SignatureEnvelope.js.map +1 -1
- package/_cjs/tempo/index.js +3 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/tempo/MultisigConfig.js +312 -0
- package/_esm/tempo/MultisigConfig.js.map +1 -0
- package/_esm/tempo/ReceivePolicyReceipt.js +176 -0
- package/_esm/tempo/ReceivePolicyReceipt.js.map +1 -0
- package/_esm/tempo/SignatureEnvelope.js +170 -6
- package/_esm/tempo/SignatureEnvelope.js.map +1 -1
- package/_esm/tempo/index.js +48 -0
- package/_esm/tempo/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/tempo/MultisigConfig.d.ts +270 -0
- package/_types/tempo/MultisigConfig.d.ts.map +1 -0
- package/_types/tempo/ReceivePolicyReceipt.d.ts +168 -0
- package/_types/tempo/ReceivePolicyReceipt.d.ts.map +1 -0
- package/_types/tempo/SignatureEnvelope.d.ts +106 -6
- package/_types/tempo/SignatureEnvelope.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +48 -0
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/package.json +11 -1
- package/tempo/MultisigConfig/package.json +6 -0
- package/tempo/MultisigConfig.test.ts +227 -0
- package/tempo/MultisigConfig.ts +423 -0
- package/tempo/ReceivePolicyReceipt/package.json +6 -0
- package/tempo/ReceivePolicyReceipt.test.ts +198 -0
- package/tempo/ReceivePolicyReceipt.ts +263 -0
- package/tempo/SignatureEnvelope.test.ts +213 -2
- package/tempo/SignatureEnvelope.ts +257 -9
- package/tempo/e2e.test.ts +217 -0
- package/tempo/index.ts +48 -0
- package/version.ts +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import * as Address from '../core/Address.js';
|
|
2
|
+
import type * as Bytes from '../core/Bytes.js';
|
|
3
|
+
import * as Errors from '../core/Errors.js';
|
|
4
|
+
import * as Hash from '../core/Hash.js';
|
|
5
|
+
import * as Hex from '../core/Hex.js';
|
|
6
|
+
import type { Compute } from '../core/internal/types.js';
|
|
7
|
+
/** Maximum number of owners allowed in a native multisig config. */
|
|
8
|
+
export declare const maxOwners = 10;
|
|
9
|
+
/** Maximum encoded byte length for one primitive owner approval. */
|
|
10
|
+
export declare const maxOwnerSignatureBytes = 2049;
|
|
11
|
+
/** Tempo signature type byte for native multisig signatures. */
|
|
12
|
+
export declare const signatureTypeByte: "0x05";
|
|
13
|
+
/** Zero 32-byte salt (the default when no salt is provided). */
|
|
14
|
+
export declare const zeroSalt: `0x${string}`;
|
|
15
|
+
/**
|
|
16
|
+
* Native multisig configuration. Determines the permanent config ID and the
|
|
17
|
+
* stable multisig account address.
|
|
18
|
+
*/
|
|
19
|
+
export type Config<numberType = number> = Compute<{
|
|
20
|
+
/**
|
|
21
|
+
* Caller-chosen 32-byte salt mixed into the permanent config ID. Defaults to
|
|
22
|
+
* the zero salt (`MultisigConfig.zeroSalt`) when omitted.
|
|
23
|
+
*/
|
|
24
|
+
salt?: Hex.Hex | undefined;
|
|
25
|
+
/** Minimum total owner weight required to authorize a transaction. */
|
|
26
|
+
threshold: numberType;
|
|
27
|
+
/** Weighted owner list (strictly ascending by `owner` address). */
|
|
28
|
+
owners: readonly Owner<numberType>[];
|
|
29
|
+
}>;
|
|
30
|
+
/** Native multisig owner entry. */
|
|
31
|
+
export type Owner<numberType = number> = {
|
|
32
|
+
/** Owner address (recovered from the owner's primitive signature). */
|
|
33
|
+
owner: Address.Address;
|
|
34
|
+
/** Nonzero owner weight. */
|
|
35
|
+
weight: numberType;
|
|
36
|
+
};
|
|
37
|
+
/** RLP tuple representation of a {@link ox#MultisigConfig.Config}. */
|
|
38
|
+
export type Tuple = readonly [
|
|
39
|
+
salt: Hex.Hex,
|
|
40
|
+
threshold: Hex.Hex,
|
|
41
|
+
owners: readonly Hex.Hex[][]
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Asserts that a native multisig {@link ox#MultisigConfig.Config} is valid.
|
|
45
|
+
*
|
|
46
|
+
* Mirrors the Tempo `validate_multisig_config` rules: owners non-empty and
|
|
47
|
+
* `<= maxOwners`, strictly ascending unique nonzero owner addresses, nonzero
|
|
48
|
+
* owner weights, `threshold >= 1`, total weight `<= u32::MAX`, and
|
|
49
|
+
* `threshold <= total weight`.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts twoslash
|
|
53
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
54
|
+
*
|
|
55
|
+
* MultisigConfig.assert({
|
|
56
|
+
* threshold: 1,
|
|
57
|
+
* owners: [
|
|
58
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
59
|
+
* ],
|
|
60
|
+
* })
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param config - The multisig config.
|
|
64
|
+
*/
|
|
65
|
+
export declare function assert<numberType = number>(config: Config<numberType>): void;
|
|
66
|
+
export declare namespace assert {
|
|
67
|
+
type ErrorType = InvalidConfigError | Errors.GlobalErrorType;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Normalizes a native multisig {@link ox#MultisigConfig.Config}.
|
|
71
|
+
*
|
|
72
|
+
* Sorts owners into strictly ascending `owner` address order (the canonical
|
|
73
|
+
* form required for config ID derivation) and asserts the config is valid.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts twoslash
|
|
77
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
78
|
+
*
|
|
79
|
+
* const config = MultisigConfig.from({
|
|
80
|
+
* threshold: 2,
|
|
81
|
+
* owners: [
|
|
82
|
+
* { owner: '0x2222222222222222222222222222222222222222', weight: 1 },
|
|
83
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
84
|
+
* ],
|
|
85
|
+
* })
|
|
86
|
+
* // owners are now sorted ascending by address
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @param config - The multisig config.
|
|
90
|
+
* @returns The normalized multisig config.
|
|
91
|
+
*/
|
|
92
|
+
export declare function from<numberType = number>(config: Config<numberType>): Config<numberType>;
|
|
93
|
+
/**
|
|
94
|
+
* Converts an RLP {@link ox#MultisigConfig.Tuple} back to a
|
|
95
|
+
* {@link ox#MultisigConfig.Config}.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts twoslash
|
|
99
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
100
|
+
*
|
|
101
|
+
* const config = MultisigConfig.fromTuple([
|
|
102
|
+
* `0x${'00'.repeat(32)}`,
|
|
103
|
+
* '0x01',
|
|
104
|
+
* [['0x1111111111111111111111111111111111111111', '0x01']],
|
|
105
|
+
* ])
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @param tuple - The RLP tuple.
|
|
109
|
+
* @returns The multisig config.
|
|
110
|
+
*/
|
|
111
|
+
export declare function fromTuple(tuple: Tuple): Config;
|
|
112
|
+
/**
|
|
113
|
+
* Derives the stable native multisig account address.
|
|
114
|
+
*
|
|
115
|
+
* `keccak256("tempo:multisig:account" || config_id)[12:32]`.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts twoslash
|
|
119
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
120
|
+
*
|
|
121
|
+
* const config = MultisigConfig.from({
|
|
122
|
+
* threshold: 1,
|
|
123
|
+
* owners: [
|
|
124
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
125
|
+
* ],
|
|
126
|
+
* })
|
|
127
|
+
*
|
|
128
|
+
* const address = MultisigConfig.getAddress({ config })
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @param value - The config or config ID to derive the address from.
|
|
132
|
+
* @returns The multisig account address.
|
|
133
|
+
*/
|
|
134
|
+
export declare function getAddress(value: getAddress.Value): Address.Address;
|
|
135
|
+
export declare namespace getAddress {
|
|
136
|
+
type Value = {
|
|
137
|
+
config: Config;
|
|
138
|
+
} | {
|
|
139
|
+
configId: Hex.Hex;
|
|
140
|
+
};
|
|
141
|
+
type ErrorType = toId.ErrorType | Address.from.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.slice.ErrorType | Errors.GlobalErrorType;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Computes the digest a native multisig owner approves (signs).
|
|
145
|
+
*
|
|
146
|
+
* `keccak256("tempo:multisig:signature" || inner_digest || account || config_id)`,
|
|
147
|
+
* where `inner_digest` is the transaction sign payload
|
|
148
|
+
* ({@link ox#TxEnvelopeTempo.(getSignPayload:function)}).
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```ts twoslash
|
|
152
|
+
* import { MultisigConfig, TxEnvelopeTempo } from 'ox/tempo'
|
|
153
|
+
*
|
|
154
|
+
* const config = MultisigConfig.from({
|
|
155
|
+
* threshold: 1,
|
|
156
|
+
* owners: [
|
|
157
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
158
|
+
* ],
|
|
159
|
+
* })
|
|
160
|
+
* const configId = MultisigConfig.toId(config)
|
|
161
|
+
* const account = MultisigConfig.getAddress({ configId })
|
|
162
|
+
*
|
|
163
|
+
* const envelope = TxEnvelopeTempo.from({
|
|
164
|
+
* chainId: 1,
|
|
165
|
+
* calls: [],
|
|
166
|
+
* })
|
|
167
|
+
*
|
|
168
|
+
* const digest = MultisigConfig.getSignPayload({
|
|
169
|
+
* payload: TxEnvelopeTempo.getSignPayload(envelope),
|
|
170
|
+
* account,
|
|
171
|
+
* configId,
|
|
172
|
+
* })
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* @param value - The digest derivation parameters.
|
|
176
|
+
* @returns The owner approval digest.
|
|
177
|
+
*/
|
|
178
|
+
export declare function getSignPayload(value: getSignPayload.Value): Hex.Hex;
|
|
179
|
+
export declare namespace getSignPayload {
|
|
180
|
+
type Value = {
|
|
181
|
+
/** The inner transaction sign payload (`tx.signature_hash()`). */
|
|
182
|
+
payload: Hex.Hex | Bytes.Bytes;
|
|
183
|
+
/** The native multisig account address. */
|
|
184
|
+
account: Address.Address;
|
|
185
|
+
/** The permanent config ID. */
|
|
186
|
+
configId: Hex.Hex;
|
|
187
|
+
};
|
|
188
|
+
type ErrorType = Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.from.ErrorType | Errors.GlobalErrorType;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Derives the permanent config ID for a native multisig
|
|
192
|
+
* {@link ox#MultisigConfig.Config}.
|
|
193
|
+
*
|
|
194
|
+
* Preimage (fixed-width big-endian, **not** RLP):
|
|
195
|
+
* `keccak256("tempo:multisig:config" || salt || be_u32(threshold) || be_u32(owners.length) || (owner || be_u32(weight)) for each owner)`.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```ts twoslash
|
|
199
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
200
|
+
*
|
|
201
|
+
* const config = MultisigConfig.from({
|
|
202
|
+
* threshold: 1,
|
|
203
|
+
* owners: [
|
|
204
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
205
|
+
* ],
|
|
206
|
+
* })
|
|
207
|
+
*
|
|
208
|
+
* const configId = MultisigConfig.toId(config)
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* @param config - The multisig config.
|
|
212
|
+
* @returns The 32-byte config ID.
|
|
213
|
+
*/
|
|
214
|
+
export declare function toId(config: Config): Hex.Hex;
|
|
215
|
+
export declare namespace toId {
|
|
216
|
+
type ErrorType = assert.ErrorType | Hash.keccak256.ErrorType | Hex.concat.ErrorType | Hex.fromNumber.ErrorType | Hex.fromString.ErrorType | Errors.GlobalErrorType;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Converts a {@link ox#MultisigConfig.Config} to its RLP tuple form (carried
|
|
220
|
+
* by the multisig signature `init`).
|
|
221
|
+
*
|
|
222
|
+
* Tuple shape: `[salt, threshold, [[owner, weight], ...]]`. The
|
|
223
|
+
* 32-byte `salt` encodes as a full fixed-width string; other integers use
|
|
224
|
+
* canonical RLP encoding (zero values encode as `0x`).
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```ts twoslash
|
|
228
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
229
|
+
*
|
|
230
|
+
* const tuple = MultisigConfig.toTuple({
|
|
231
|
+
* threshold: 1,
|
|
232
|
+
* owners: [
|
|
233
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
234
|
+
* ],
|
|
235
|
+
* })
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* @param config - The multisig config.
|
|
239
|
+
* @returns The RLP tuple.
|
|
240
|
+
*/
|
|
241
|
+
export declare function toTuple(config: Config): Tuple;
|
|
242
|
+
/**
|
|
243
|
+
* Validates a native multisig {@link ox#MultisigConfig.Config}. Returns `true`
|
|
244
|
+
* if valid, `false` otherwise.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts twoslash
|
|
248
|
+
* import { MultisigConfig } from 'ox/tempo'
|
|
249
|
+
*
|
|
250
|
+
* const valid = MultisigConfig.validate({
|
|
251
|
+
* threshold: 1,
|
|
252
|
+
* owners: [
|
|
253
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
254
|
+
* ],
|
|
255
|
+
* })
|
|
256
|
+
* // @log: true
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* @param config - The multisig config.
|
|
260
|
+
* @returns Whether the config is valid.
|
|
261
|
+
*/
|
|
262
|
+
export declare function validate(config: Config): boolean;
|
|
263
|
+
/** Thrown when a native multisig config is invalid. */
|
|
264
|
+
export declare class InvalidConfigError extends Errors.BaseError {
|
|
265
|
+
readonly name = "MultisigConfig.InvalidConfigError";
|
|
266
|
+
constructor({ reason }: {
|
|
267
|
+
reason: string;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=MultisigConfig.d.ts.map
|
|
@@ -0,0 +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,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,oEAAoE;AACpE,eAAO,MAAM,SAAS,KAAK,CAAA;AAE3B,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,OAAO,CAAA;AAE1C,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,QAAkB,CAAA;AAEhD,gEAAgE;AAChE,eAAO,MAAM,QAAQ,eAAkC,CAAA;AAWvD;;;GAGG;AACH,MAAM,MAAM,MAAM,CAAC,UAAU,GAAG,MAAM,IAAI,OAAO,CAAC;IAChD;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,SAAS,CAAA;IAC1B,sEAAsE;IACtE,SAAS,EAAE,UAAU,CAAA;IACrB,mEAAmE;IACnE,MAAM,EAAE,SAAS,KAAK,CAAC,UAAU,CAAC,EAAE,CAAA;CACrC,CAAC,CAAA;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;GAmBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAOhD;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"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as AbiEvent from '../core/AbiEvent.js';
|
|
2
|
+
import * as AbiParameters from '../core/AbiParameters.js';
|
|
3
|
+
import type * as Address from '../core/Address.js';
|
|
4
|
+
import type * as Errors from '../core/Errors.js';
|
|
5
|
+
import type * as Hex from '../core/Hex.js';
|
|
6
|
+
import type { Compute } from '../core/internal/types.js';
|
|
7
|
+
/**
|
|
8
|
+
* A TIP-1028 receive-policy claim receipt: the ABI-encoded `ClaimReceiptV1`
|
|
9
|
+
* witness emitted when an inbound transfer or mint violates the recipient's
|
|
10
|
+
* receive policy.
|
|
11
|
+
*
|
|
12
|
+
* This is the canonical, on-chain representation – the value passed to the
|
|
13
|
+
* `ReceivePolicyGuard`'s `claim` and `burn` functions. Use `decode` to read its
|
|
14
|
+
* fields.
|
|
15
|
+
*/
|
|
16
|
+
export type ReceivePolicyReceipt = Hex.Hex;
|
|
17
|
+
/** Reason an inbound transfer or mint was blocked by a receive policy. */
|
|
18
|
+
export type BlockedReason = 'none' | 'tokenFilter' | 'receivePolicy';
|
|
19
|
+
/** Kind of inbound operation that was blocked. */
|
|
20
|
+
export type Kind = 'transfer' | 'mint';
|
|
21
|
+
/** A decoded {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt}. */
|
|
22
|
+
export type Decoded = Compute<{
|
|
23
|
+
/** Receipt layout version. */
|
|
24
|
+
version: number;
|
|
25
|
+
/** TIP-20 token holding the blocked funds. */
|
|
26
|
+
token: Address.Address;
|
|
27
|
+
/** Recovery authority captured when the operation was blocked. */
|
|
28
|
+
recoveryAuthority: Address.Address;
|
|
29
|
+
/** Original sender (transfer) or issuer (mint). */
|
|
30
|
+
originator: Address.Address;
|
|
31
|
+
/** Addressed recipient (may be a virtual address). */
|
|
32
|
+
recipient: Address.Address;
|
|
33
|
+
/** Block timestamp when the operation was blocked. */
|
|
34
|
+
blockedAt: bigint;
|
|
35
|
+
/** Guard nonce assigned when the operation was blocked. */
|
|
36
|
+
blockedNonce: bigint;
|
|
37
|
+
/** Reason the operation was blocked. */
|
|
38
|
+
blockedReason: BlockedReason;
|
|
39
|
+
/** Whether the blocked operation was a transfer or mint. */
|
|
40
|
+
kind: Kind;
|
|
41
|
+
/** Application memo. */
|
|
42
|
+
memo: Hex.Hex;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Decodes a {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt} (ABI-encoded
|
|
46
|
+
* `ClaimReceiptV1` witness) into its fields.
|
|
47
|
+
*
|
|
48
|
+
* [TIP-1028](https://docs.tempo.xyz/protocol/tips/tip-1028)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts twoslash
|
|
52
|
+
* import { ReceivePolicyReceipt } from 'ox/tempo'
|
|
53
|
+
*
|
|
54
|
+
* const decoded = ReceivePolicyReceipt.decode('0x...')
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @param receipt - The receive-policy receipt.
|
|
58
|
+
* @returns The decoded fields.
|
|
59
|
+
*/
|
|
60
|
+
export declare function decode(receipt: ReceivePolicyReceipt): Decoded;
|
|
61
|
+
export declare namespace decode {
|
|
62
|
+
type ErrorType = AbiParameters.decode.ErrorType | Errors.GlobalErrorType;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Encodes decoded fields into a
|
|
66
|
+
* {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt}. Inverse of `decode`.
|
|
67
|
+
*
|
|
68
|
+
* [TIP-1028](https://docs.tempo.xyz/protocol/tips/tip-1028)
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts twoslash
|
|
72
|
+
* // @noErrors
|
|
73
|
+
* import { ReceivePolicyReceipt } from 'ox/tempo'
|
|
74
|
+
*
|
|
75
|
+
* const decoded = ReceivePolicyReceipt.decode('0x...')
|
|
76
|
+
* const receipt = ReceivePolicyReceipt.encode(decoded)
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @param decoded - The decoded fields.
|
|
80
|
+
* @returns The receive-policy receipt.
|
|
81
|
+
*/
|
|
82
|
+
export declare function encode(decoded: Decoded): ReceivePolicyReceipt;
|
|
83
|
+
export declare namespace encode {
|
|
84
|
+
type ErrorType = AbiParameters.encode.ErrorType | Errors.GlobalErrorType;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Normalizes a {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt} from either
|
|
88
|
+
* an encoded receipt (passthrough) or decoded fields.
|
|
89
|
+
*
|
|
90
|
+
* [TIP-1028](https://docs.tempo.xyz/protocol/tips/tip-1028)
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts twoslash
|
|
94
|
+
* // @noErrors
|
|
95
|
+
* import { ReceivePolicyReceipt } from 'ox/tempo'
|
|
96
|
+
*
|
|
97
|
+
* // From an encoded receipt (passthrough).
|
|
98
|
+
* const a = ReceivePolicyReceipt.from('0x...')
|
|
99
|
+
*
|
|
100
|
+
* // From decoded fields.
|
|
101
|
+
* const b = ReceivePolicyReceipt.from(ReceivePolicyReceipt.decode('0x...'))
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @param value - An encoded receipt or decoded fields.
|
|
105
|
+
* @returns The receive-policy receipt.
|
|
106
|
+
*/
|
|
107
|
+
export declare function from(value: ReceivePolicyReceipt | Decoded): ReceivePolicyReceipt;
|
|
108
|
+
export declare namespace from {
|
|
109
|
+
type ErrorType = encode.ErrorType | Errors.GlobalErrorType;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Extracts the {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt} from a
|
|
113
|
+
* `ReceivePolicyGuard` `TransferBlocked` log.
|
|
114
|
+
*
|
|
115
|
+
* Throws if the log is not a `TransferBlocked` event. Use
|
|
116
|
+
* `fromTransactionReceipt` to extract every blocked transfer in a transaction
|
|
117
|
+
* (which skips unrelated logs).
|
|
118
|
+
*
|
|
119
|
+
* [TIP-1028](https://docs.tempo.xyz/protocol/tips/tip-1028)
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts twoslash
|
|
123
|
+
* // @noErrors
|
|
124
|
+
* import { ReceivePolicyReceipt } from 'ox/tempo'
|
|
125
|
+
*
|
|
126
|
+
* const receipt = ReceivePolicyReceipt.fromLog(log)
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @param log - A `TransferBlocked` log (`data` & `topics`).
|
|
130
|
+
* @returns The receive-policy receipt.
|
|
131
|
+
*/
|
|
132
|
+
export declare function fromLog(log: fromLog.Log): ReceivePolicyReceipt;
|
|
133
|
+
export declare namespace fromLog {
|
|
134
|
+
type Log = AbiEvent.decode.Log;
|
|
135
|
+
type ErrorType = AbiEvent.decode.ErrorType | Errors.GlobalErrorType;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Extracts every {@link ox#ReceivePolicyReceipt.ReceivePolicyReceipt} from a
|
|
139
|
+
* transaction receipt's logs.
|
|
140
|
+
*
|
|
141
|
+
* A single transaction may block multiple inbound transfers (e.g. a batched
|
|
142
|
+
* transfer to several recipients), so this returns an array – one entry per
|
|
143
|
+
* `TransferBlocked` log, in log order. Returns an empty array when no transfers
|
|
144
|
+
* were blocked.
|
|
145
|
+
*
|
|
146
|
+
* [TIP-1028](https://docs.tempo.xyz/protocol/tips/tip-1028)
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts twoslash
|
|
150
|
+
* // @noErrors
|
|
151
|
+
* import { ReceivePolicyReceipt } from 'ox/tempo'
|
|
152
|
+
*
|
|
153
|
+
* const receipts = ReceivePolicyReceipt.fromTransactionReceipt(receipt)
|
|
154
|
+
* // @log: ['0x...'] (pass each to `claim` / `burn`)
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @param receipt - The transaction receipt (or any object with `logs`).
|
|
158
|
+
* @returns The receive-policy receipts, one per blocked transfer.
|
|
159
|
+
*/
|
|
160
|
+
export declare function fromTransactionReceipt(receipt: fromTransactionReceipt.Receipt): readonly ReceivePolicyReceipt[];
|
|
161
|
+
export declare namespace fromTransactionReceipt {
|
|
162
|
+
type Receipt = {
|
|
163
|
+
/** Logs emitted by the transaction. */
|
|
164
|
+
logs?: readonly AbiEvent.decode.Log[] | undefined;
|
|
165
|
+
};
|
|
166
|
+
type ErrorType = AbiEvent.getSelector.ErrorType | fromLog.ErrorType | Errors.GlobalErrorType;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=ReceivePolicyReceipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReceivePolicyReceipt.d.ts","sourceRoot":"","sources":["../../tempo/ReceivePolicyReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,KAAK,GAAG,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAA;AAE1C,0EAA0E;AAC1E,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,CAAA;AAEpE,kDAAkD;AAClD,MAAM,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AAI,CAAC;IAC5B,KAAK,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,eAAe,CAAA;CAC3D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,GAAG,oBAAoB,CAG9D;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,KAAK,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAA;IAE9B,KAAK,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,eAAe,CAAA;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,sBAAsB,CAAC,OAAO,GACtC,SAAS,oBAAoB,EAAE,CAQjC;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,KAAK,OAAO,GAAG;QACb,uCAAuC;QACvC,IAAI,CAAC,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,SAAS,CAAA;KAClD,CAAA;IAED,KAAK,SAAS,GACV,QAAQ,CAAC,WAAW,CAAC,SAAS,GAC9B,OAAO,CAAC,SAAS,GACjB,MAAM,CAAC,eAAe,CAAA;CAC3B"}
|
|
@@ -7,6 +7,7 @@ import type * as PublicKey from '../core/PublicKey.js';
|
|
|
7
7
|
import * as ox_Secp256k1 from '../core/Secp256k1.js';
|
|
8
8
|
import * as Signature from '../core/Signature.js';
|
|
9
9
|
import type * as WebAuthnP256 from '../core/WebAuthnP256.js';
|
|
10
|
+
import * as MultisigConfig from './MultisigConfig.js';
|
|
10
11
|
/** Serialized magic identifier for Tempo signature envelopes. */
|
|
11
12
|
export declare const magicBytes = "0x7777777777777777777777777777777777777777777777777777777777777777";
|
|
12
13
|
/**
|
|
@@ -48,7 +49,11 @@ export type GetType<envelope extends PartialBy<SignatureEnvelope, 'type'> | unkn
|
|
|
48
49
|
};
|
|
49
50
|
} ? 'secp256k1' : envelope extends {
|
|
50
51
|
userAddress: Address.Address;
|
|
51
|
-
} ? 'keychain' :
|
|
52
|
+
} ? 'keychain' : envelope extends {
|
|
53
|
+
account: Address.Address;
|
|
54
|
+
configId: `0x${string}`;
|
|
55
|
+
signatures: any;
|
|
56
|
+
} ? 'multisig' : never;
|
|
52
57
|
/**
|
|
53
58
|
* Represents a signature envelope that can contain different signature types.
|
|
54
59
|
*
|
|
@@ -72,11 +77,11 @@ export type GetType<envelope extends PartialBy<SignatureEnvelope, 'type'> | unkn
|
|
|
72
77
|
*
|
|
73
78
|
* [Signature Types Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#signature-types)
|
|
74
79
|
*/
|
|
75
|
-
export type SignatureEnvelope<bigintType = bigint, numberType = number> = OneOf<Secp256k1<bigintType, numberType> | P256<bigintType, numberType> | WebAuthn<bigintType, numberType> | Keychain<bigintType, numberType>>;
|
|
80
|
+
export type SignatureEnvelope<bigintType = bigint, numberType = number> = OneOf<Secp256k1<bigintType, numberType> | P256<bigintType, numberType> | WebAuthn<bigintType, numberType> | Keychain<bigintType, numberType> | Multisig<bigintType, numberType>>;
|
|
76
81
|
/**
|
|
77
82
|
* RPC-formatted signature envelope.
|
|
78
83
|
*/
|
|
79
|
-
export type SignatureEnvelopeRpc = OneOf<Secp256k1Rpc | P256Rpc | WebAuthnRpc | KeychainRpc>;
|
|
84
|
+
export type SignatureEnvelopeRpc = OneOf<Secp256k1Rpc | P256Rpc | WebAuthnRpc | KeychainRpc | MultisigRpc>;
|
|
80
85
|
/**
|
|
81
86
|
* Keychain signature version.
|
|
82
87
|
*
|
|
@@ -103,6 +108,41 @@ export type KeychainRpc = {
|
|
|
103
108
|
signature: SignatureEnvelopeRpc;
|
|
104
109
|
version?: KeychainVersion | undefined;
|
|
105
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Native multisig signature (type `0x05`).
|
|
113
|
+
*
|
|
114
|
+
* Wraps a set of primitive owner approvals (secp256k1, p256, or webAuthn) over the
|
|
115
|
+
* multisig owner approval digest. The transaction sender is the derived `account`,
|
|
116
|
+
* authorized once the recovered owner weights meet the configured threshold.
|
|
117
|
+
*
|
|
118
|
+
* [TIP-1061](https://tips.sh/1061)
|
|
119
|
+
*/
|
|
120
|
+
export type Multisig<bigintType = bigint, numberType = number> = {
|
|
121
|
+
type: 'multisig';
|
|
122
|
+
/** Native multisig account address. */
|
|
123
|
+
account: Address.Address;
|
|
124
|
+
/** Permanent config ID derived from the initial multisig config. */
|
|
125
|
+
configId: Hex.Hex;
|
|
126
|
+
/** Primitive owner approvals over the multisig owner approval digest. */
|
|
127
|
+
signatures: readonly SignatureEnvelope<bigintType, numberType>[];
|
|
128
|
+
/**
|
|
129
|
+
* Initial native multisig config for bootstrapping this account. Present only on
|
|
130
|
+
* the first (bootstrap) transaction from the derived account; absent on every
|
|
131
|
+
* subsequent transaction.
|
|
132
|
+
*/
|
|
133
|
+
init?: MultisigConfig.Config<numberType> | undefined;
|
|
134
|
+
};
|
|
135
|
+
export type MultisigRpc = {
|
|
136
|
+
type: 'multisig';
|
|
137
|
+
account: Address.Address;
|
|
138
|
+
configId: Hex.Hex;
|
|
139
|
+
/**
|
|
140
|
+
* Encoded primitive owner approvals (raw serialized signatures), matching the
|
|
141
|
+
* node's `Vec<Bytes>` representation.
|
|
142
|
+
*/
|
|
143
|
+
signatures: readonly Serialized[];
|
|
144
|
+
init?: MultisigConfig.Config | undefined;
|
|
145
|
+
};
|
|
106
146
|
export type P256<bigintType = bigint, numberType = number> = {
|
|
107
147
|
prehash: boolean;
|
|
108
148
|
publicKey: PublicKey.PublicKey;
|
|
@@ -170,7 +210,7 @@ export type Type = (typeof types)[number];
|
|
|
170
210
|
*/
|
|
171
211
|
export declare function assert(envelope: PartialBy<SignatureEnvelope, 'type'>): void;
|
|
172
212
|
export declare namespace assert {
|
|
173
|
-
type ErrorType = CoercionError | MissingPropertiesError | Signature.assert.ErrorType | Errors.GlobalErrorType;
|
|
213
|
+
type ErrorType = CoercionError | MissingPropertiesError | MultisigConfig.assert.ErrorType | Signature.assert.ErrorType | Errors.GlobalErrorType;
|
|
174
214
|
}
|
|
175
215
|
/**
|
|
176
216
|
* Extracts the address of the signer from a {@link ox#SignatureEnvelope.SignatureEnvelope}.
|
|
@@ -244,7 +284,7 @@ export declare namespace extractPublicKey {
|
|
|
244
284
|
signature: SignatureEnvelope;
|
|
245
285
|
};
|
|
246
286
|
type ReturnType = PublicKey.PublicKey;
|
|
247
|
-
type ErrorType = ox_Secp256k1.recoverPublicKey.ErrorType | Errors.GlobalErrorType;
|
|
287
|
+
type ErrorType = CoercionError | ox_Secp256k1.recoverPublicKey.ErrorType | Errors.GlobalErrorType;
|
|
248
288
|
}
|
|
249
289
|
/**
|
|
250
290
|
* Deserializes a hex-encoded signature envelope into a typed signature object.
|
|
@@ -474,6 +514,66 @@ export declare namespace serialize {
|
|
|
474
514
|
magic?: boolean | undefined;
|
|
475
515
|
};
|
|
476
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* Orders native multisig owner approvals into the strictly-ascending
|
|
519
|
+
* recovered-owner order the Tempo node requires for the multisig `signatures`
|
|
520
|
+
* array (the node enforces "recovered owners must be strictly ascending").
|
|
521
|
+
*
|
|
522
|
+
* Each approval is signed over the multisig owner approval digest
|
|
523
|
+
* ({@link ox#MultisigConfig.(getSignPayload:function)}), so the signer of
|
|
524
|
+
* every approval is recovered against that digest and the list is sorted by the
|
|
525
|
+
* recovered owner address. Works for any owner key type (secp256k1, p256,
|
|
526
|
+
* webAuthn, keychain).
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* ```ts twoslash
|
|
530
|
+
* import { Secp256k1 } from 'ox'
|
|
531
|
+
* import { MultisigConfig, SignatureEnvelope, TxEnvelopeTempo } from 'ox/tempo'
|
|
532
|
+
*
|
|
533
|
+
* const config = MultisigConfig.from({
|
|
534
|
+
* threshold: 2,
|
|
535
|
+
* owners: [
|
|
536
|
+
* { owner: '0x1111111111111111111111111111111111111111', weight: 1 },
|
|
537
|
+
* { owner: '0x2222222222222222222222222222222222222222', weight: 1 },
|
|
538
|
+
* ],
|
|
539
|
+
* })
|
|
540
|
+
* const configId = MultisigConfig.toId(config)
|
|
541
|
+
* const account = MultisigConfig.getAddress({ configId })
|
|
542
|
+
*
|
|
543
|
+
* const tx = TxEnvelopeTempo.from({ chainId: 1, calls: [] })
|
|
544
|
+
* const payload = TxEnvelopeTempo.getSignPayload(tx)
|
|
545
|
+
* const digest = MultisigConfig.getSignPayload({ payload, account, configId })
|
|
546
|
+
*
|
|
547
|
+
* const privateKeys = [Secp256k1.randomPrivateKey(), Secp256k1.randomPrivateKey()]
|
|
548
|
+
* const signatures = privateKeys.map((privateKey) =>
|
|
549
|
+
* SignatureEnvelope.from(Secp256k1.sign({ payload: digest, privateKey })),
|
|
550
|
+
* )
|
|
551
|
+
*
|
|
552
|
+
* const ordered = SignatureEnvelope.sortMultisigApprovals({ // [!code focus]
|
|
553
|
+
* account, // [!code focus]
|
|
554
|
+
* configId, // [!code focus]
|
|
555
|
+
* payload, // [!code focus]
|
|
556
|
+
* signatures, // [!code focus]
|
|
557
|
+
* }) // [!code focus]
|
|
558
|
+
* ```
|
|
559
|
+
*
|
|
560
|
+
* @param value - The approval ordering parameters.
|
|
561
|
+
* @returns The owner approvals ordered ascending by recovered owner address.
|
|
562
|
+
*/
|
|
563
|
+
export declare function sortMultisigApprovals(value: sortMultisigApprovals.Value): readonly SignatureEnvelope[];
|
|
564
|
+
export declare namespace sortMultisigApprovals {
|
|
565
|
+
type Value = {
|
|
566
|
+
/** The native multisig account address. */
|
|
567
|
+
account: Address.Address;
|
|
568
|
+
/** The permanent config ID. */
|
|
569
|
+
configId: Hex.Hex;
|
|
570
|
+
/** The inner transaction sign payload (`tx.signature_hash()`). */
|
|
571
|
+
payload: Hex.Hex | Bytes.Bytes;
|
|
572
|
+
/** The primitive owner approvals to order. */
|
|
573
|
+
signatures: readonly SignatureEnvelope[];
|
|
574
|
+
};
|
|
575
|
+
type ErrorType = MultisigConfig.getSignPayload.ErrorType | extractAddress.ErrorType | Errors.GlobalErrorType;
|
|
576
|
+
}
|
|
477
577
|
/**
|
|
478
578
|
* Converts a signature envelope to RPC format.
|
|
479
579
|
*
|
|
@@ -649,7 +749,7 @@ export declare class MissingPropertiesError extends Errors.BaseError {
|
|
|
649
749
|
constructor({ envelope, missing, type, }: {
|
|
650
750
|
envelope: unknown;
|
|
651
751
|
missing: string[];
|
|
652
|
-
type: Type;
|
|
752
|
+
type: Type | 'keychain' | 'multisig';
|
|
653
753
|
});
|
|
654
754
|
}
|
|
655
755
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureEnvelope.d.ts","sourceRoot":"","sources":["../../tempo/SignatureEnvelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,YAAY,EACZ,KAAK,EACL,SAAS,EACT,cAAc,EACf,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,KAAK,SAAS,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"SignatureEnvelope.d.ts","sourceRoot":"","sources":["../../tempo/SignatureEnvelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,YAAY,EACZ,KAAK,E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