@getcofund/protocol 0.0.0 → 0.1.0

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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +413 -1
  3. package/dist/btc/index.d.ts +12 -0
  4. package/dist/btc/index.js +13 -0
  5. package/dist/btc/psbt.d.ts +121 -0
  6. package/dist/btc/psbt.js +377 -0
  7. package/dist/btc/reader.d.ts +42 -0
  8. package/dist/btc/reader.js +85 -0
  9. package/dist/btc/select.d.ts +48 -0
  10. package/dist/btc/select.js +59 -0
  11. package/dist/btc/spend-rules.d.ts +24 -0
  12. package/dist/btc/spend-rules.js +43 -0
  13. package/dist/btc/spend.d.ts +136 -0
  14. package/dist/btc/spend.js +180 -0
  15. package/dist/btc/types.d.ts +65 -0
  16. package/dist/btc/types.js +62 -0
  17. package/dist/btc/vault/bip341-nums.d.ts +35 -0
  18. package/dist/btc/vault/bip341-nums.js +121 -0
  19. package/dist/btc/vault/build.d.ts +5 -0
  20. package/dist/btc/vault/build.js +136 -0
  21. package/dist/btc/vault/canonical-order.d.ts +10 -0
  22. package/dist/btc/vault/canonical-order.js +18 -0
  23. package/dist/btc/vault/from-contract-id.d.ts +9 -0
  24. package/dist/btc/vault/from-contract-id.js +74 -0
  25. package/dist/btc/vault/helpers.d.ts +73 -0
  26. package/dist/btc/vault/helpers.js +129 -0
  27. package/dist/btc/vault/index.d.ts +21 -0
  28. package/dist/btc/vault/index.js +21 -0
  29. package/dist/btc/vault/limits.d.ts +9 -0
  30. package/dist/btc/vault/limits.js +9 -0
  31. package/dist/btc/vault/participant-order.d.ts +69 -0
  32. package/dist/btc/vault/participant-order.js +135 -0
  33. package/dist/btc/vault/script.d.ts +13 -0
  34. package/dist/btc/vault/script.js +39 -0
  35. package/dist/btc/vault/spend.d.ts +63 -0
  36. package/dist/btc/vault/spend.js +93 -0
  37. package/dist/btc/vault/tx-size.d.ts +66 -0
  38. package/dist/btc/vault/tx-size.js +71 -0
  39. package/dist/btc/vault/types.d.ts +49 -0
  40. package/dist/btc/vault/types.js +1 -0
  41. package/dist/btc/vault/vault-policy.d.ts +109 -0
  42. package/dist/btc/vault/vault-policy.js +213 -0
  43. package/dist/btc/vault/vaultContractUtil.d.ts +80 -0
  44. package/dist/btc/vault/vaultContractUtil.js +87 -0
  45. package/dist/btc/vault/xpub.d.ts +28 -0
  46. package/dist/btc/vault/xpub.js +41 -0
  47. package/dist/btc/witness.d.ts +101 -0
  48. package/dist/btc/witness.js +439 -0
  49. package/dist/btc-policies/activation.d.ts +76 -0
  50. package/dist/btc-policies/activation.js +153 -0
  51. package/dist/btc-policies/index.d.ts +7 -0
  52. package/dist/btc-policies/index.js +8 -0
  53. package/dist/btc-policies/policy.d.ts +55 -0
  54. package/dist/btc-policies/policy.js +210 -0
  55. package/dist/evm/abis/index.d.ts +10 -0
  56. package/dist/evm/abis/index.js +11 -0
  57. package/dist/evm/abis/policies.d.ts +279 -0
  58. package/dist/evm/abis/policies.js +363 -0
  59. package/dist/evm/abis/sponsor-guard.d.ts +201 -0
  60. package/dist/evm/abis/sponsor-guard.js +263 -0
  61. package/dist/evm/abis/state.d.ts +989 -0
  62. package/dist/evm/abis/state.js +1290 -0
  63. package/dist/evm/abis/users.d.ts +408 -0
  64. package/dist/evm/abis/users.js +532 -0
  65. package/dist/evm/abis/vault-factory.d.ts +92 -0
  66. package/dist/evm/abis/vault-factory.js +126 -0
  67. package/dist/evm/abis/vault.d.ts +343 -0
  68. package/dist/evm/abis/vault.js +444 -0
  69. package/dist/evm/address.d.ts +2 -0
  70. package/dist/evm/address.js +4 -0
  71. package/dist/evm/calls/common.d.ts +30 -0
  72. package/dist/evm/calls/common.js +51 -0
  73. package/dist/evm/calls/index.d.ts +11 -0
  74. package/dist/evm/calls/index.js +4 -0
  75. package/dist/evm/calls/policies.d.ts +25 -0
  76. package/dist/evm/calls/policies.js +173 -0
  77. package/dist/evm/calls/users.d.ts +61 -0
  78. package/dist/evm/calls/users.js +353 -0
  79. package/dist/evm/calls/vault.d.ts +25 -0
  80. package/dist/evm/calls/vault.js +184 -0
  81. package/dist/evm/chain.d.ts +74 -0
  82. package/dist/evm/chain.js +48 -0
  83. package/dist/evm/company-name.d.ts +46 -0
  84. package/dist/evm/company-name.js +64 -0
  85. package/dist/evm/deployment.d.ts +47 -0
  86. package/dist/evm/deployment.js +110 -0
  87. package/dist/evm/eip712.d.ts +271 -0
  88. package/dist/evm/eip712.js +224 -0
  89. package/dist/evm/index.d.ts +20 -0
  90. package/dist/evm/index.js +21 -0
  91. package/dist/evm/reads.d.ts +64 -0
  92. package/dist/evm/reads.js +131 -0
  93. package/dist/evm/signatures.d.ts +57 -0
  94. package/dist/evm/signatures.js +105 -0
  95. package/dist/evm/simulate/balances.d.ts +76 -0
  96. package/dist/evm/simulate/balances.js +201 -0
  97. package/dist/evm/simulate/describe.d.ts +79 -0
  98. package/dist/evm/simulate/describe.js +188 -0
  99. package/dist/evm/simulate/index.d.ts +12 -0
  100. package/dist/evm/simulate/index.js +13 -0
  101. package/dist/evm/simulate/own-node.d.ts +62 -0
  102. package/dist/evm/simulate/own-node.js +122 -0
  103. package/dist/evm/simulate/request.d.ts +86 -0
  104. package/dist/evm/simulate/request.js +235 -0
  105. package/dist/evm/simulate/revert.d.ts +29 -0
  106. package/dist/evm/simulate/revert.js +192 -0
  107. package/dist/evm/simulate/run.d.ts +51 -0
  108. package/dist/evm/simulate/run.js +214 -0
  109. package/dist/evm/stocks/decode-stock-swap.d.ts +32 -0
  110. package/dist/evm/stocks/decode-stock-swap.js +79 -0
  111. package/dist/evm/stocks/encode-swap.d.ts +45 -0
  112. package/dist/evm/stocks/encode-swap.js +45 -0
  113. package/dist/evm/stocks/index.d.ts +9 -0
  114. package/dist/evm/stocks/index.js +10 -0
  115. package/dist/evm/stocks/quote.d.ts +19 -0
  116. package/dist/evm/stocks/quote.js +46 -0
  117. package/dist/evm/stocks/stock-pools.d.ts +61 -0
  118. package/dist/evm/stocks/stock-pools.js +179 -0
  119. package/dist/evm/submitters.d.ts +32 -0
  120. package/dist/evm/submitters.js +105 -0
  121. package/dist/evm/types.d.ts +146 -0
  122. package/dist/evm/types.js +128 -0
  123. package/dist/keys/index.d.ts +6 -0
  124. package/dist/keys/index.js +7 -0
  125. package/dist/keys/keys.d.ts +63 -0
  126. package/dist/keys/keys.js +80 -0
  127. package/dist/keys/xpub-ownership.d.ts +10 -0
  128. package/dist/keys/xpub-ownership.js +13 -0
  129. package/package.json +61 -3
@@ -0,0 +1,444 @@
1
+ // Generated from the Foundry artifact `out/CFHelpersVaultTemplatev1.sol/CFHelpersVaultTemplatev1.json`
2
+ // of cofund-solidity. Do not hand-edit: re-run
3
+ // `packages/protocol/scripts/gen-evm-abis.mjs` against a `forge build` of
4
+ // the contracts instead.
5
+ export const vaultAbi = [
6
+ {
7
+ type: "constructor",
8
+ inputs: [
9
+ {
10
+ name: "_expectedState",
11
+ type: "address",
12
+ internalType: "address",
13
+ },
14
+ ],
15
+ stateMutability: "nonpayable",
16
+ },
17
+ {
18
+ type: "function",
19
+ name: "clientId",
20
+ inputs: [],
21
+ outputs: [
22
+ {
23
+ name: "",
24
+ type: "bytes32",
25
+ internalType: "bytes32",
26
+ },
27
+ ],
28
+ stateMutability: "view",
29
+ },
30
+ {
31
+ type: "function",
32
+ name: "eip712Domain",
33
+ inputs: [],
34
+ outputs: [
35
+ {
36
+ name: "fields",
37
+ type: "bytes1",
38
+ internalType: "bytes1",
39
+ },
40
+ {
41
+ name: "name",
42
+ type: "string",
43
+ internalType: "string",
44
+ },
45
+ {
46
+ name: "version",
47
+ type: "string",
48
+ internalType: "string",
49
+ },
50
+ {
51
+ name: "chainId",
52
+ type: "uint256",
53
+ internalType: "uint256",
54
+ },
55
+ {
56
+ name: "verifyingContract",
57
+ type: "address",
58
+ internalType: "address",
59
+ },
60
+ {
61
+ name: "salt",
62
+ type: "bytes32",
63
+ internalType: "bytes32",
64
+ },
65
+ {
66
+ name: "extensions",
67
+ type: "uint256[]",
68
+ internalType: "uint256[]",
69
+ },
70
+ ],
71
+ stateMutability: "view",
72
+ },
73
+ {
74
+ type: "function",
75
+ name: "executeTransaction",
76
+ inputs: [
77
+ {
78
+ name: "company",
79
+ type: "string",
80
+ internalType: "string",
81
+ },
82
+ {
83
+ name: "policyId",
84
+ type: "string",
85
+ internalType: "string",
86
+ },
87
+ {
88
+ name: "messageType",
89
+ type: "string",
90
+ internalType: "string",
91
+ },
92
+ {
93
+ name: "wrapper",
94
+ type: "address",
95
+ internalType: "address",
96
+ },
97
+ {
98
+ name: "func",
99
+ type: "string",
100
+ internalType: "string",
101
+ },
102
+ {
103
+ name: "instructions",
104
+ type: "bytes",
105
+ internalType: "bytes",
106
+ },
107
+ {
108
+ name: "allowances",
109
+ type: "tuple[]",
110
+ internalType: "struct CFHelpersVaultTemplatev1.Allowance[]",
111
+ components: [
112
+ {
113
+ name: "asset",
114
+ type: "address",
115
+ internalType: "address",
116
+ },
117
+ {
118
+ name: "amount",
119
+ type: "uint256",
120
+ internalType: "uint256",
121
+ },
122
+ ],
123
+ },
124
+ {
125
+ name: "authId",
126
+ type: "string",
127
+ internalType: "string",
128
+ },
129
+ {
130
+ name: "signatures",
131
+ type: "bytes[]",
132
+ internalType: "bytes[]",
133
+ },
134
+ ],
135
+ outputs: [
136
+ {
137
+ name: "",
138
+ type: "bool",
139
+ internalType: "bool",
140
+ },
141
+ ],
142
+ stateMutability: "nonpayable",
143
+ },
144
+ {
145
+ type: "function",
146
+ name: "executeTransfer",
147
+ inputs: [
148
+ {
149
+ name: "company",
150
+ type: "string",
151
+ internalType: "string",
152
+ },
153
+ {
154
+ name: "policyId",
155
+ type: "string",
156
+ internalType: "string",
157
+ },
158
+ {
159
+ name: "messageType",
160
+ type: "string",
161
+ internalType: "string",
162
+ },
163
+ {
164
+ name: "amount",
165
+ type: "uint256",
166
+ internalType: "uint256",
167
+ },
168
+ {
169
+ name: "token",
170
+ type: "address",
171
+ internalType: "address",
172
+ },
173
+ {
174
+ name: "recipient",
175
+ type: "address",
176
+ internalType: "address",
177
+ },
178
+ {
179
+ name: "authId",
180
+ type: "string",
181
+ internalType: "string",
182
+ },
183
+ {
184
+ name: "signatures",
185
+ type: "bytes[]",
186
+ internalType: "bytes[]",
187
+ },
188
+ ],
189
+ outputs: [
190
+ {
191
+ name: "",
192
+ type: "bool",
193
+ internalType: "bool",
194
+ },
195
+ ],
196
+ stateMutability: "nonpayable",
197
+ },
198
+ {
199
+ type: "function",
200
+ name: "expectedState",
201
+ inputs: [],
202
+ outputs: [
203
+ {
204
+ name: "",
205
+ type: "address",
206
+ internalType: "address",
207
+ },
208
+ ],
209
+ stateMutability: "view",
210
+ },
211
+ {
212
+ type: "function",
213
+ name: "factory",
214
+ inputs: [],
215
+ outputs: [
216
+ {
217
+ name: "",
218
+ type: "address",
219
+ internalType: "address",
220
+ },
221
+ ],
222
+ stateMutability: "view",
223
+ },
224
+ {
225
+ type: "function",
226
+ name: "initialize",
227
+ inputs: [
228
+ {
229
+ name: "_clientId",
230
+ type: "bytes32",
231
+ internalType: "bytes32",
232
+ },
233
+ {
234
+ name: "_state",
235
+ type: "address",
236
+ internalType: "address",
237
+ },
238
+ ],
239
+ outputs: [],
240
+ stateMutability: "nonpayable",
241
+ },
242
+ {
243
+ type: "function",
244
+ name: "state",
245
+ inputs: [],
246
+ outputs: [
247
+ {
248
+ name: "",
249
+ type: "address",
250
+ internalType: "contract ICofundHelperState",
251
+ },
252
+ ],
253
+ stateMutability: "view",
254
+ },
255
+ {
256
+ type: "event",
257
+ name: "TransactionExecuted",
258
+ inputs: [
259
+ {
260
+ name: "policyId",
261
+ type: "string",
262
+ indexed: true,
263
+ internalType: "string",
264
+ },
265
+ {
266
+ name: "messageType",
267
+ type: "string",
268
+ indexed: false,
269
+ internalType: "string",
270
+ },
271
+ {
272
+ name: "func",
273
+ type: "string",
274
+ indexed: false,
275
+ internalType: "string",
276
+ },
277
+ {
278
+ name: "wrapper",
279
+ type: "address",
280
+ indexed: false,
281
+ internalType: "address",
282
+ },
283
+ {
284
+ name: "authId",
285
+ type: "string",
286
+ indexed: false,
287
+ internalType: "string",
288
+ },
289
+ ],
290
+ anonymous: false,
291
+ },
292
+ {
293
+ type: "event",
294
+ name: "TransferExecuted",
295
+ inputs: [
296
+ {
297
+ name: "policyId",
298
+ type: "string",
299
+ indexed: true,
300
+ internalType: "string",
301
+ },
302
+ {
303
+ name: "messageType",
304
+ type: "string",
305
+ indexed: false,
306
+ internalType: "string",
307
+ },
308
+ {
309
+ name: "amount",
310
+ type: "uint256",
311
+ indexed: false,
312
+ internalType: "uint256",
313
+ },
314
+ {
315
+ name: "token",
316
+ type: "address",
317
+ indexed: false,
318
+ internalType: "address",
319
+ },
320
+ {
321
+ name: "recipient",
322
+ type: "address",
323
+ indexed: false,
324
+ internalType: "address",
325
+ },
326
+ {
327
+ name: "authId",
328
+ type: "string",
329
+ indexed: false,
330
+ internalType: "string",
331
+ },
332
+ ],
333
+ anonymous: false,
334
+ },
335
+ {
336
+ type: "error",
337
+ name: "AlreadyInitialized",
338
+ inputs: [],
339
+ },
340
+ {
341
+ type: "error",
342
+ name: "AmountExceedsPolicy",
343
+ inputs: [],
344
+ },
345
+ {
346
+ type: "error",
347
+ name: "ECDSAInvalidSignature",
348
+ inputs: [],
349
+ },
350
+ {
351
+ type: "error",
352
+ name: "ECDSAInvalidSignatureLength",
353
+ inputs: [
354
+ {
355
+ name: "length",
356
+ type: "uint256",
357
+ internalType: "uint256",
358
+ },
359
+ ],
360
+ },
361
+ {
362
+ type: "error",
363
+ name: "ECDSAInvalidSignatureS",
364
+ inputs: [
365
+ {
366
+ name: "s",
367
+ type: "bytes32",
368
+ internalType: "bytes32",
369
+ },
370
+ ],
371
+ },
372
+ {
373
+ type: "error",
374
+ name: "InactivePolicy",
375
+ inputs: [],
376
+ },
377
+ {
378
+ type: "error",
379
+ name: "InvalidAmount",
380
+ inputs: [],
381
+ },
382
+ {
383
+ type: "error",
384
+ name: "InvalidCompany",
385
+ inputs: [],
386
+ },
387
+ {
388
+ type: "error",
389
+ name: "InvalidPolicyType",
390
+ inputs: [],
391
+ },
392
+ {
393
+ type: "error",
394
+ name: "InvalidSignature",
395
+ inputs: [],
396
+ },
397
+ {
398
+ type: "error",
399
+ name: "InvalidSigner",
400
+ inputs: [],
401
+ },
402
+ {
403
+ type: "error",
404
+ name: "InvalidToken",
405
+ inputs: [],
406
+ },
407
+ {
408
+ type: "error",
409
+ name: "InvalidType",
410
+ inputs: [],
411
+ },
412
+ {
413
+ type: "error",
414
+ name: "RecipientNotAllowed",
415
+ inputs: [],
416
+ },
417
+ {
418
+ type: "error",
419
+ name: "SafeERC20FailedOperation",
420
+ inputs: [
421
+ {
422
+ name: "token",
423
+ type: "address",
424
+ internalType: "address",
425
+ },
426
+ ],
427
+ },
428
+ {
429
+ type: "error",
430
+ name: "ThresholdNotMet",
431
+ inputs: [],
432
+ },
433
+ {
434
+ type: "error",
435
+ name: "UnauthorizedCaller",
436
+ inputs: [
437
+ {
438
+ name: "reason",
439
+ type: "string",
440
+ internalType: "string",
441
+ },
442
+ ],
443
+ },
444
+ ];
@@ -0,0 +1,2 @@
1
+ /** Whether two EVM addresses are the same, whatever their casing. */
2
+ export declare function sameAddress(a: string, b: string): boolean;
@@ -0,0 +1,4 @@
1
+ /** Whether two EVM addresses are the same, whatever their casing. */
2
+ export function sameAddress(a, b) {
3
+ return a.toLowerCase() === b.toLowerCase();
4
+ }
@@ -0,0 +1,30 @@
1
+ import type { Address, Hex } from "viem";
2
+ import { type EvmReader } from "../chain.ts";
3
+ import type { EvmDeployment } from "../deployment.ts";
4
+ /** Where a call is built for: the deployment, and a reader on its chain. */
5
+ export type EvmContext = {
6
+ deployment: EvmDeployment;
7
+ reader: EvmReader;
8
+ };
9
+ /** The clock a deadline is checked on: unix seconds; the chain's latest block when unset. */
10
+ export type DeadlineOptions = {
11
+ now?: bigint;
12
+ };
13
+ /** A uint256 message field (decimal digits), as a bigint. */
14
+ export declare function uint(value: string | number | bigint, what: string): bigint;
15
+ /** `authId` is spent for the cofund: State's replay store reverts `KeyExists`. */
16
+ export declare function requireAuthIdUnspent({ deployment, reader }: EvmContext, clientId: Hex, authId: string): Promise<void>;
17
+ /** The errors a contract raises for a signer that is not an active admin, by case. */
18
+ export type AdminErrors = {
19
+ /** The address holds no seat in the cofund. */
20
+ unknown: string;
21
+ inactive: string;
22
+ notAdmin: string;
23
+ };
24
+ /**
25
+ * `signer`'s seat, which must be an active admin's: its user id, or the
26
+ * contract's refusal for each way it is not.
27
+ */
28
+ export declare function requireActiveAdmin({ deployment, reader }: EvmContext, clientId: Hex, signer: Address, errors: AdminErrors, what: string): Promise<string>;
29
+ /** `Users._requireWindow`: open now, and at most `MAX_INVITE_LIFETIME` out. Both bounds inclusive. */
30
+ export declare function requireWindow(reader: EvmReader, expiresAt: bigint, { now }: DeadlineOptions): Promise<void>;
@@ -0,0 +1,51 @@
1
+ import { readLatestTimestamp } from "../chain.js";
2
+ import { readAuthIdSpent, readUser, readUserIdByAddress } from "../reads.js";
3
+ import { refuse } from "../signatures.js";
4
+ const UINT = /^\d{1,78}$/;
5
+ /** A uint256 message field (decimal digits), as a bigint. */
6
+ export function uint(value, what) {
7
+ if (typeof value === "bigint") {
8
+ return value;
9
+ }
10
+ const text = String(value);
11
+ if (!UINT.test(text)) {
12
+ throw new Error(`${what} is not a uint256: ${text}`);
13
+ }
14
+ return BigInt(text);
15
+ }
16
+ /** `authId` is spent for the cofund: State's replay store reverts `KeyExists`. */
17
+ export async function requireAuthIdUnspent({ deployment, reader }, clientId, authId) {
18
+ if (await readAuthIdSpent(reader, deployment, clientId, authId)) {
19
+ refuse("KeyExists", `authId "${authId}" is already spent for this cofund`);
20
+ }
21
+ }
22
+ /**
23
+ * `signer`'s seat, which must be an active admin's: its user id, or the
24
+ * contract's refusal for each way it is not.
25
+ */
26
+ export async function requireActiveAdmin({ deployment, reader }, clientId, signer, errors, what) {
27
+ const userId = await readUserIdByAddress(reader, deployment, clientId, signer);
28
+ if (userId === null) {
29
+ refuse(errors.unknown, `${what} ${signer} holds no seat in this cofund`);
30
+ }
31
+ const user = await readUser(reader, deployment, clientId, userId);
32
+ if (!user?.active) {
33
+ refuse(errors.inactive, `${what} ${signer} (${userId}) is not active`);
34
+ }
35
+ if (!user.isAdmin) {
36
+ refuse(errors.notAdmin, `${what} ${signer} (${userId}) is not an admin`);
37
+ }
38
+ return userId;
39
+ }
40
+ /** `Users._requireWindow`: open now, and at most `MAX_INVITE_LIFETIME` out. Both bounds inclusive. */
41
+ export async function requireWindow(reader, expiresAt, { now }) {
42
+ const at = now ?? (await readLatestTimestamp(reader));
43
+ if (at > expiresAt) {
44
+ refuse("InviteExpired", `it expired at ${expiresAt}; it is ${at} now`);
45
+ }
46
+ if (expiresAt > at + MAX_INVITE_LIFETIME) {
47
+ refuse("InvalidParams", `it expires at ${expiresAt}, more than 30 days after ${at}`);
48
+ }
49
+ }
50
+ /** `CFHelpersUsersv1.MAX_INVITE_LIFETIME`. */
51
+ const MAX_INVITE_LIFETIME = 30n * 24n * 60n * 60n;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * One builder per contract entry point, each returning the `{ to, data }`
3
+ * to submit, after checking it as the contract will: every signature
4
+ * recovers to the address State holds for its signer, the set meets the
5
+ * contract's rule, and a deadline is still open. A call the contract would
6
+ * revert is refused with a `CallRefusedError` naming its error.
7
+ */
8
+ export type { DeadlineOptions, EvmContext } from "./common.ts";
9
+ export { activateTransactionPolicyCall, activateTransferPolicyCall, deactivatePolicyCall, } from "./policies.ts";
10
+ export { addUserCall, completeOnboardingCall, createClientCall, removeUserCall, rotateUserCall, } from "./users.ts";
11
+ export { executeTransactionCall, executeTransferCall } from "./vault.ts";
@@ -0,0 +1,4 @@
1
+ // biome-ignore lint/performance/noBarrelFile: the calls' part of the `./evm` entry
2
+ export { activateTransactionPolicyCall, activateTransferPolicyCall, deactivatePolicyCall, } from "./policies.js";
3
+ export { addUserCall, completeOnboardingCall, createClientCall, removeUserCall, rotateUserCall, } from "./users.js";
4
+ export { executeTransactionCall, executeTransferCall } from "./vault.js";
@@ -0,0 +1,25 @@
1
+ import { type Hex } from "viem";
2
+ import { type EvmCall } from "../chain.ts";
3
+ import { type PolicyDeactivationMessage, type TransactionPolicyActivationMessage, type TransferPolicyActivationMessage } from "../eip712.ts";
4
+ import { type EvmContext } from "./common.ts";
5
+ /**
6
+ * `activateTransferPolicy`: a transfer policy (signers, threshold, token, cap,
7
+ * recipient allowlist), on active admins' `TransferPolicyActivation`.
8
+ */
9
+ export declare function activateTransferPolicyCall(ctx: EvmContext, input: {
10
+ message: TransferPolicyActivationMessage;
11
+ signatures: Hex[];
12
+ }): Promise<EvmCall>;
13
+ /**
14
+ * `activateTransactionPolicy`: a transaction policy (signers, threshold, the
15
+ * wrapper and its function), on active admins' `TransactionPolicyActivation`.
16
+ */
17
+ export declare function activateTransactionPolicyCall(ctx: EvmContext, input: {
18
+ message: TransactionPolicyActivationMessage;
19
+ signatures: Hex[];
20
+ }): Promise<EvmCall>;
21
+ /** `deactivatePolicy`: an active policy off, on one active admin's `PolicyDeactivation`. */
22
+ export declare function deactivatePolicyCall(ctx: EvmContext, input: {
23
+ message: PolicyDeactivationMessage;
24
+ signature: Hex;
25
+ }): Promise<EvmCall>;