@boostxyz/sdk 1.1.0-alpha.23 → 2.0.0-alpha.25

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 (134) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +7 -7
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts +32 -5
  6. package/dist/Actions/EventAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.js +164 -137
  8. package/dist/Actions/EventAction.js.map +1 -1
  9. package/dist/AllowLists/AllowList.cjs +1 -1
  10. package/dist/AllowLists/AllowList.js +10 -10
  11. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  12. package/dist/AllowLists/SimpleAllowList.js +10 -10
  13. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  14. package/dist/AllowLists/SimpleDenyList.js +3 -3
  15. package/dist/Auth/PassthroughAuth.cjs +1 -1
  16. package/dist/Auth/PassthroughAuth.js +1 -1
  17. package/dist/BoostCore.cjs +2 -1
  18. package/dist/BoostCore.cjs.map +1 -1
  19. package/dist/BoostCore.d.ts +564 -1
  20. package/dist/BoostCore.d.ts.map +1 -1
  21. package/dist/BoostCore.js +1322 -29
  22. package/dist/BoostCore.js.map +1 -1
  23. package/dist/BoostRegistry.cjs +1 -1
  24. package/dist/BoostRegistry.js +27 -27
  25. package/dist/Budgets/Budget.cjs +1 -1
  26. package/dist/Budgets/Budget.js +2 -2
  27. package/dist/Budgets/ManagedBudget.cjs +1 -1
  28. package/dist/Budgets/ManagedBudget.js +23 -23
  29. package/dist/Deployable/DeployableTarget.cjs +1 -1
  30. package/dist/Deployable/DeployableTarget.js +1 -1
  31. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  32. package/dist/Deployable/DeployableTargetWithRBAC.js +23 -23
  33. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  34. package/dist/Incentives/AllowListIncentive.js +8 -8
  35. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  36. package/dist/Incentives/CGDAIncentive.js +12 -12
  37. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  38. package/dist/Incentives/ERC20Incentive.js +16 -16
  39. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +2 -0
  40. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -0
  41. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +42 -15
  42. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  43. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +188 -0
  44. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -0
  45. package/dist/Incentives/ERC20VariableIncentive.cjs +2 -0
  46. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -0
  47. package/dist/Incentives/ERC20VariableIncentive.d.ts +7 -5
  48. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  49. package/dist/{Incentive-rM5nKznp.js → Incentives/ERC20VariableIncentive.js} +42 -67
  50. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -0
  51. package/dist/Incentives/Incentive.cjs +1 -1
  52. package/dist/Incentives/Incentive.cjs.map +1 -1
  53. package/dist/Incentives/Incentive.d.ts +552 -3
  54. package/dist/Incentives/Incentive.d.ts.map +1 -1
  55. package/dist/Incentives/Incentive.js +40 -16
  56. package/dist/Incentives/Incentive.js.map +1 -1
  57. package/dist/Incentives/PointsIncentive.cjs +1 -1
  58. package/dist/Incentives/PointsIncentive.js +8 -8
  59. package/dist/{SimpleDenyList-DNj5qDWM.cjs → SimpleDenyList-BdlpZdDz.cjs} +2 -2
  60. package/dist/{SimpleDenyList-DNj5qDWM.cjs.map → SimpleDenyList-BdlpZdDz.cjs.map} +1 -1
  61. package/dist/{SimpleDenyList-BDXpY74P.js → SimpleDenyList-D0cyVUVv.js} +16 -16
  62. package/dist/{SimpleDenyList-BDXpY74P.js.map → SimpleDenyList-D0cyVUVv.js.map} +1 -1
  63. package/dist/Validators/LimitedSignerValidator.cjs +2 -0
  64. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -0
  65. package/dist/Validators/LimitedSignerValidator.d.ts +806 -0
  66. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -0
  67. package/dist/Validators/LimitedSignerValidator.js +299 -0
  68. package/dist/Validators/LimitedSignerValidator.js.map +1 -0
  69. package/dist/Validators/SignerValidator.cjs +1 -1
  70. package/dist/Validators/SignerValidator.cjs.map +1 -1
  71. package/dist/Validators/SignerValidator.d.ts +2 -2
  72. package/dist/Validators/SignerValidator.js +5 -5
  73. package/dist/Validators/SignerValidator.js.map +1 -1
  74. package/dist/Validators/Validator.cjs +1 -1
  75. package/dist/Validators/Validator.cjs.map +1 -1
  76. package/dist/Validators/Validator.d.ts +22 -2
  77. package/dist/Validators/Validator.d.ts.map +1 -1
  78. package/dist/Validators/Validator.js +26 -17
  79. package/dist/Validators/Validator.js.map +1 -1
  80. package/dist/{componentInterfaces-BBCFkrZv.js → componentInterfaces-bIVo8eyA.js} +9 -9
  81. package/dist/componentInterfaces-bIVo8eyA.js.map +1 -0
  82. package/dist/{deployments-fJsWblwS.js → deployments-Ccx1MtoK.js} +5 -5
  83. package/dist/deployments-Ccx1MtoK.js.map +1 -0
  84. package/dist/{generated-CsNyWPKA.js → generated-BAKNSOjJ.js} +661 -381
  85. package/dist/generated-BAKNSOjJ.js.map +1 -0
  86. package/dist/generated-Cqn4wS01.cjs +3 -0
  87. package/dist/generated-Cqn4wS01.cjs.map +1 -0
  88. package/dist/index.cjs +1 -1
  89. package/dist/index.d.ts +1 -0
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +145 -132
  92. package/dist/index.js.map +1 -1
  93. package/dist/utils.cjs +1 -1
  94. package/dist/utils.cjs.map +1 -1
  95. package/dist/utils.d.ts +10 -0
  96. package/dist/utils.d.ts.map +1 -1
  97. package/dist/utils.js +27 -26
  98. package/dist/utils.js.map +1 -1
  99. package/package.json +21 -5
  100. package/src/Actions/EventAction.test.ts +381 -122
  101. package/src/Actions/EventAction.ts +85 -23
  102. package/src/BoostCore.test.ts +3 -3
  103. package/src/BoostCore.ts +51 -5
  104. package/src/Incentives/AllowListIncentive.test.ts +19 -21
  105. package/src/Incentives/CGDAIncentive.test.ts +20 -22
  106. package/src/Incentives/ERC1155Incentive.test.ts +14 -15
  107. package/src/Incentives/ERC20Incentive.test.ts +17 -19
  108. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +62 -10
  109. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +79 -37
  110. package/src/Incentives/ERC20VariableIncentive.test.ts +16 -18
  111. package/src/Incentives/ERC20VariableIncentive.ts +16 -8
  112. package/src/Incentives/Incentive.ts +4 -1
  113. package/src/Incentives/PointsIncentive.test.ts +3 -5
  114. package/src/Validators/LimitedSignerValidator.test.ts +223 -0
  115. package/src/Validators/LimitedSignerValidator.ts +707 -0
  116. package/src/Validators/SignerValidator.test.ts +21 -22
  117. package/src/Validators/SignerValidator.ts +2 -2
  118. package/src/Validators/Validator.test.ts +7 -1
  119. package/src/Validators/Validator.ts +30 -3
  120. package/src/index.test.ts +2 -0
  121. package/src/index.ts +1 -0
  122. package/src/utils.ts +11 -0
  123. package/dist/BoostCore-Btl5BdAs.cjs +0 -3
  124. package/dist/BoostCore-Btl5BdAs.cjs.map +0 -1
  125. package/dist/BoostCore-CD56zbYX.js +0 -2641
  126. package/dist/BoostCore-CD56zbYX.js.map +0 -1
  127. package/dist/Incentive-CcnOIc8L.cjs +0 -2
  128. package/dist/Incentive-CcnOIc8L.cjs.map +0 -1
  129. package/dist/Incentive-rM5nKznp.js.map +0 -1
  130. package/dist/componentInterfaces-BBCFkrZv.js.map +0 -1
  131. package/dist/deployments-fJsWblwS.js.map +0 -1
  132. package/dist/generated-CsNyWPKA.js.map +0 -1
  133. package/dist/generated-DHerxf1y.cjs +0 -3
  134. package/dist/generated-DHerxf1y.cjs.map +0 -1
@@ -0,0 +1,806 @@
1
+ import { limitedSignerValidatorAbi } from '@boostxyz/evm';
2
+ import { type Address, type ContractEventName, type Hex, type PrivateKeyAccount } from 'viem';
3
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
+ import { DeployableTarget } from '../Deployable/DeployableTarget';
5
+ import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
6
+ export { limitedSignerValidatorAbi };
7
+ /**
8
+ * Object reprentation of a {@link LimitedSignerValidator} initialization payload
9
+ *
10
+ * @export
11
+ * @interface LimitedSignerValidatorPayload
12
+ * @typedef {LimitedSignerValidatorPayload}
13
+ */
14
+ export interface LimitedSignerValidatorPayload {
15
+ /**
16
+ * The list of authorized signers. The first address in the list will be the initial owner of the contract.
17
+ *
18
+ * @type {Address[]}
19
+ */
20
+ signers: Address[];
21
+ /**
22
+ * The authorized caller of the {@link prepareSignerValidator} function
23
+ * @type {Address}
24
+ */
25
+ validatorCaller: Address;
26
+ /**
27
+ * The max quantity of claims a user can make for a given incentive,
28
+ * regardless of how many valid transactions they have
29
+ * @type {number}
30
+ */
31
+ maxClaimCount: number;
32
+ }
33
+ /**
34
+ * Description placeholder
35
+ *
36
+ * @export
37
+ * @interface LimitedSignerValidatorValidatePayload
38
+ * @typedef {LimitedSignerValidatorValidatePayload}
39
+ */
40
+ export interface LimitedSignerValidatorValidatePayload {
41
+ /**
42
+ * The ID of the boost.
43
+ *
44
+ * @type {bigint}
45
+ */
46
+ boostId: bigint;
47
+ /**
48
+ * The ID of the incentive.
49
+ *
50
+ * @type {bigint}
51
+ */
52
+ incentiveId: bigint;
53
+ /**
54
+ * The address of the claimant.
55
+ *
56
+ * @type {Address}
57
+ */
58
+ claimant: Address;
59
+ /**
60
+ * The claim data.
61
+ *
62
+ * @type {Hex}
63
+ */
64
+ claimData: Hex;
65
+ }
66
+ /**
67
+ * Object reprentation of a {@link LimitedSignerValidator} initialization payload
68
+ *
69
+ * @export
70
+ * @interface LimitedSignerValidatorPayload
71
+ * @typedef {LimitedSignerValidatorPayload}
72
+ */
73
+ export interface LimitedSignerValidatorPayload {
74
+ /**
75
+ * The list of authorized signers. The first address in the list will be the initial owner of the contract.
76
+ *
77
+ * @type {Address[]}
78
+ */
79
+ signers: Address[];
80
+ /**
81
+ * The authorized caller of the {@link prepareSignerValidator} function
82
+ * @type {Address}
83
+ */
84
+ validatorCaller: Address;
85
+ }
86
+ /**
87
+ * Description placeholder
88
+ *
89
+ * @export
90
+ * @interface LimitedSignerValidatorValidatePayload
91
+ * @typedef {LimitedSignerValidatorValidatePayload}
92
+ */
93
+ export interface LimitedSignerValidatorValidatePayload {
94
+ /**
95
+ * The ID of the boost.
96
+ *
97
+ * @type {bigint}
98
+ */
99
+ boostId: bigint;
100
+ /**
101
+ * The ID of the incentive.
102
+ *
103
+ * @type {bigint}
104
+ */
105
+ incentiveId: bigint;
106
+ /**
107
+ * The address of the claimant.
108
+ *
109
+ * @type {Address}
110
+ */
111
+ claimant: Address;
112
+ /**
113
+ * The claim data.
114
+ *
115
+ * @type {Hex}
116
+ */
117
+ claimData: Hex;
118
+ }
119
+ /**
120
+ * Signer Validator Claim Data Payload
121
+ *
122
+ * @export
123
+ * @interface LimitedSignerValidatorClaimDataParams
124
+ * @typedef {LimitedSignerValidatorClaimDataParams}
125
+ */
126
+ export interface LimitedSignerValidatorClaimDataParams {
127
+ /**
128
+ * The signer with which to sign the input
129
+ *
130
+ * @type {{
131
+ * account: Address;
132
+ * key: Hex;
133
+ * privateKey: PrivateKeyAccount;
134
+ * }}
135
+ */
136
+ signer: {
137
+ account: Address;
138
+ key: Hex;
139
+ privateKey: PrivateKeyAccount;
140
+ };
141
+ /**
142
+ * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}
143
+ *
144
+ * @type {Hex}
145
+ */
146
+ incentiveData: Hex;
147
+ /**
148
+ * The chain id to target
149
+ *
150
+ * @type {number}
151
+ */
152
+ chainId: number;
153
+ /**
154
+ * The address of the validator
155
+ *
156
+ * @type {Address}
157
+ */
158
+ validator: Address;
159
+ /**
160
+ * The incentive quantity.
161
+ *
162
+ * @type {number}
163
+ */
164
+ incentiveQuantity: number;
165
+ /**
166
+ * The address of the claimant
167
+ *
168
+ * @type {Address}
169
+ */
170
+ claimant: Address;
171
+ /**
172
+ * The ID of the boost
173
+ *
174
+ * @type {bigint}
175
+ */
176
+ boostId: bigint;
177
+ }
178
+ /**
179
+ * Object representation of a {@link LimitedSignerValidatorInputParams} initialization payload
180
+ *
181
+ * @export
182
+ * @interface LimitedSignerValidatorInputParams
183
+ * @typedef {LimitedSignerValidatorInputParams}
184
+ */
185
+ export interface LimitedSignerValidatorInputParams {
186
+ /**
187
+ * The signer address.
188
+ *
189
+ * @type {Address}
190
+ */
191
+ signer: Address;
192
+ /**
193
+ * The signature data.
194
+ *
195
+ * @type {string}
196
+ */
197
+ signature: Hex;
198
+ /**
199
+ * The incentive quantity.
200
+ *
201
+ * @type {number}
202
+ */
203
+ incentiveQuantity: number;
204
+ }
205
+ /**
206
+ * Object representing the payload for signing before validaton.
207
+ *
208
+ * @export
209
+ * @interface LimitedSignerValidatorSignaturePayload
210
+ * @typedef {LimitedSignerValidatorSignaturePayload}
211
+ */
212
+ export interface LimitedSignerValidatorSignaturePayload {
213
+ /**
214
+ * The ID of the boost.
215
+ *
216
+ * @type {bigint}
217
+ */
218
+ boostId: bigint;
219
+ /**
220
+ * The ID of the incentive.
221
+ *
222
+ * @type {number}
223
+ */
224
+ incentiveQuantity: number;
225
+ /**
226
+ * The address of the claimant.
227
+ *
228
+ * @type {Address}
229
+ */
230
+ claimant: Address;
231
+ /**
232
+ * The claim data.
233
+ *
234
+ * @type {Hex}
235
+ */
236
+ incentiveData: Hex;
237
+ }
238
+ /**
239
+ * A generic `viem.Log` event with support for `BoostCore` event types.
240
+ *
241
+ * @export
242
+ * @typedef {LimitedSignerValidatorLog}
243
+ * @template {ContractEventName<
244
+ * typeof limitedSignerValidatorAbi
245
+ * >} [event=ContractEventName<typeof limitedSignerValidatorAbi>]
246
+ */
247
+ export type LimitedSignerValidatorLog<event extends ContractEventName<typeof limitedSignerValidatorAbi> = ContractEventName<typeof limitedSignerValidatorAbi>> = GenericLog<typeof limitedSignerValidatorAbi, event>;
248
+ /**
249
+ * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers
250
+ *
251
+ * @export
252
+ * @class SignerValidator
253
+ * @typedef {SignerValidator}
254
+ * @extends {DeployableTarget<SignerValidatorPayload>}
255
+ */
256
+ export declare class LimitedSignerValidator extends DeployableTarget<LimitedSignerValidatorPayload, typeof limitedSignerValidatorAbi> {
257
+ /**
258
+ * @inheritdoc
259
+ *
260
+ * @public
261
+ * @readonly
262
+ * @type {*}
263
+ */
264
+ readonly abi: readonly [{
265
+ readonly type: "error";
266
+ readonly inputs: readonly [];
267
+ readonly name: "AlreadyInitialized";
268
+ }, {
269
+ readonly type: "error";
270
+ readonly inputs: readonly [];
271
+ readonly name: "CloneAlreadyInitialized";
272
+ }, {
273
+ readonly type: "error";
274
+ readonly inputs: readonly [];
275
+ readonly name: "InitializerNotImplemented";
276
+ }, {
277
+ readonly type: "error";
278
+ readonly inputs: readonly [{
279
+ readonly name: "available";
280
+ readonly internalType: "uint8";
281
+ readonly type: "uint8";
282
+ }, {
283
+ readonly name: "id";
284
+ readonly internalType: "uint256";
285
+ readonly type: "uint256";
286
+ }];
287
+ readonly name: "InvalidIncentive";
288
+ }, {
289
+ readonly type: "error";
290
+ readonly inputs: readonly [];
291
+ readonly name: "InvalidInitialization";
292
+ }, {
293
+ readonly type: "error";
294
+ readonly inputs: readonly [];
295
+ readonly name: "InvalidInitializationData";
296
+ }, {
297
+ readonly type: "error";
298
+ readonly inputs: readonly [];
299
+ readonly name: "LengthMismatch";
300
+ }, {
301
+ readonly type: "error";
302
+ readonly inputs: readonly [{
303
+ readonly name: "claimant";
304
+ readonly internalType: "address";
305
+ readonly type: "address";
306
+ }];
307
+ readonly name: "MaximumClaimed";
308
+ }, {
309
+ readonly type: "error";
310
+ readonly inputs: readonly [];
311
+ readonly name: "NewOwnerIsZeroAddress";
312
+ }, {
313
+ readonly type: "error";
314
+ readonly inputs: readonly [];
315
+ readonly name: "NoHandoverRequest";
316
+ }, {
317
+ readonly type: "error";
318
+ readonly inputs: readonly [];
319
+ readonly name: "NotInitializing";
320
+ }, {
321
+ readonly type: "error";
322
+ readonly inputs: readonly [];
323
+ readonly name: "Unauthorized";
324
+ }, {
325
+ readonly type: "error";
326
+ readonly inputs: readonly [];
327
+ readonly name: "Unauthorized";
328
+ }, {
329
+ readonly type: "event";
330
+ readonly anonymous: false;
331
+ readonly inputs: readonly [{
332
+ readonly name: "version";
333
+ readonly internalType: "uint64";
334
+ readonly type: "uint64";
335
+ readonly indexed: false;
336
+ }];
337
+ readonly name: "Initialized";
338
+ }, {
339
+ readonly type: "event";
340
+ readonly anonymous: false;
341
+ readonly inputs: readonly [{
342
+ readonly name: "pendingOwner";
343
+ readonly internalType: "address";
344
+ readonly type: "address";
345
+ readonly indexed: true;
346
+ }];
347
+ readonly name: "OwnershipHandoverCanceled";
348
+ }, {
349
+ readonly type: "event";
350
+ readonly anonymous: false;
351
+ readonly inputs: readonly [{
352
+ readonly name: "pendingOwner";
353
+ readonly internalType: "address";
354
+ readonly type: "address";
355
+ readonly indexed: true;
356
+ }];
357
+ readonly name: "OwnershipHandoverRequested";
358
+ }, {
359
+ readonly type: "event";
360
+ readonly anonymous: false;
361
+ readonly inputs: readonly [{
362
+ readonly name: "oldOwner";
363
+ readonly internalType: "address";
364
+ readonly type: "address";
365
+ readonly indexed: true;
366
+ }, {
367
+ readonly name: "newOwner";
368
+ readonly internalType: "address";
369
+ readonly type: "address";
370
+ readonly indexed: true;
371
+ }];
372
+ readonly name: "OwnershipTransferred";
373
+ }, {
374
+ readonly type: "function";
375
+ readonly inputs: readonly [];
376
+ readonly name: "cancelOwnershipHandover";
377
+ readonly outputs: readonly [];
378
+ readonly stateMutability: "payable";
379
+ }, {
380
+ readonly type: "function";
381
+ readonly inputs: readonly [{
382
+ readonly name: "pendingOwner";
383
+ readonly internalType: "address";
384
+ readonly type: "address";
385
+ }];
386
+ readonly name: "completeOwnershipHandover";
387
+ readonly outputs: readonly [];
388
+ readonly stateMutability: "payable";
389
+ }, {
390
+ readonly type: "function";
391
+ readonly inputs: readonly [];
392
+ readonly name: "eip712Domain";
393
+ readonly outputs: readonly [{
394
+ readonly name: "fields";
395
+ readonly internalType: "bytes1";
396
+ readonly type: "bytes1";
397
+ }, {
398
+ readonly name: "name";
399
+ readonly internalType: "string";
400
+ readonly type: "string";
401
+ }, {
402
+ readonly name: "version";
403
+ readonly internalType: "string";
404
+ readonly type: "string";
405
+ }, {
406
+ readonly name: "chainId";
407
+ readonly internalType: "uint256";
408
+ readonly type: "uint256";
409
+ }, {
410
+ readonly name: "verifyingContract";
411
+ readonly internalType: "address";
412
+ readonly type: "address";
413
+ }, {
414
+ readonly name: "salt";
415
+ readonly internalType: "bytes32";
416
+ readonly type: "bytes32";
417
+ }, {
418
+ readonly name: "extensions";
419
+ readonly internalType: "uint256[]";
420
+ readonly type: "uint256[]";
421
+ }];
422
+ readonly stateMutability: "view";
423
+ }, {
424
+ readonly type: "function";
425
+ readonly inputs: readonly [];
426
+ readonly name: "getComponentInterface";
427
+ readonly outputs: readonly [{
428
+ readonly name: "";
429
+ readonly internalType: "bytes4";
430
+ readonly type: "bytes4";
431
+ }];
432
+ readonly stateMutability: "pure";
433
+ }, {
434
+ readonly type: "function";
435
+ readonly inputs: readonly [{
436
+ readonly name: "boostId";
437
+ readonly internalType: "uint256";
438
+ readonly type: "uint256";
439
+ }, {
440
+ readonly name: "incentiveId";
441
+ readonly internalType: "uint256";
442
+ readonly type: "uint256";
443
+ }, {
444
+ readonly name: "claimant";
445
+ readonly internalType: "address";
446
+ readonly type: "address";
447
+ }];
448
+ readonly name: "hashClaimantData";
449
+ readonly outputs: readonly [{
450
+ readonly name: "hash";
451
+ readonly internalType: "bytes32";
452
+ readonly type: "bytes32";
453
+ }];
454
+ readonly stateMutability: "pure";
455
+ }, {
456
+ readonly type: "function";
457
+ readonly inputs: readonly [{
458
+ readonly name: "boostId";
459
+ readonly internalType: "uint256";
460
+ readonly type: "uint256";
461
+ }, {
462
+ readonly name: "incentiveQuantity";
463
+ readonly internalType: "uint8";
464
+ readonly type: "uint8";
465
+ }, {
466
+ readonly name: "claimant";
467
+ readonly internalType: "address";
468
+ readonly type: "address";
469
+ }, {
470
+ readonly name: "incentiveData";
471
+ readonly internalType: "bytes";
472
+ readonly type: "bytes";
473
+ }];
474
+ readonly name: "hashSignerData";
475
+ readonly outputs: readonly [{
476
+ readonly name: "hashedSignerData";
477
+ readonly internalType: "bytes32";
478
+ readonly type: "bytes32";
479
+ }];
480
+ readonly stateMutability: "view";
481
+ }, {
482
+ readonly type: "function";
483
+ readonly inputs: readonly [{
484
+ readonly name: "data_";
485
+ readonly internalType: "bytes";
486
+ readonly type: "bytes";
487
+ }];
488
+ readonly name: "initialize";
489
+ readonly outputs: readonly [];
490
+ readonly stateMutability: "nonpayable";
491
+ }, {
492
+ readonly type: "function";
493
+ readonly inputs: readonly [];
494
+ readonly name: "maxClaimCount";
495
+ readonly outputs: readonly [{
496
+ readonly name: "";
497
+ readonly internalType: "uint256";
498
+ readonly type: "uint256";
499
+ }];
500
+ readonly stateMutability: "view";
501
+ }, {
502
+ readonly type: "function";
503
+ readonly inputs: readonly [];
504
+ readonly name: "owner";
505
+ readonly outputs: readonly [{
506
+ readonly name: "result";
507
+ readonly internalType: "address";
508
+ readonly type: "address";
509
+ }];
510
+ readonly stateMutability: "view";
511
+ }, {
512
+ readonly type: "function";
513
+ readonly inputs: readonly [{
514
+ readonly name: "pendingOwner";
515
+ readonly internalType: "address";
516
+ readonly type: "address";
517
+ }];
518
+ readonly name: "ownershipHandoverExpiresAt";
519
+ readonly outputs: readonly [{
520
+ readonly name: "result";
521
+ readonly internalType: "uint256";
522
+ readonly type: "uint256";
523
+ }];
524
+ readonly stateMutability: "view";
525
+ }, {
526
+ readonly type: "function";
527
+ readonly inputs: readonly [{
528
+ readonly name: "";
529
+ readonly internalType: "bytes32";
530
+ readonly type: "bytes32";
531
+ }];
532
+ readonly name: "quantityClaimed";
533
+ readonly outputs: readonly [{
534
+ readonly name: "";
535
+ readonly internalType: "uint256";
536
+ readonly type: "uint256";
537
+ }];
538
+ readonly stateMutability: "view";
539
+ }, {
540
+ readonly type: "function";
541
+ readonly inputs: readonly [];
542
+ readonly name: "renounceOwnership";
543
+ readonly outputs: readonly [];
544
+ readonly stateMutability: "payable";
545
+ }, {
546
+ readonly type: "function";
547
+ readonly inputs: readonly [];
548
+ readonly name: "requestOwnershipHandover";
549
+ readonly outputs: readonly [];
550
+ readonly stateMutability: "payable";
551
+ }, {
552
+ readonly type: "function";
553
+ readonly inputs: readonly [{
554
+ readonly name: "signers_";
555
+ readonly internalType: "address[]";
556
+ readonly type: "address[]";
557
+ }, {
558
+ readonly name: "authorized_";
559
+ readonly internalType: "bool[]";
560
+ readonly type: "bool[]";
561
+ }];
562
+ readonly name: "setAuthorized";
563
+ readonly outputs: readonly [];
564
+ readonly stateMutability: "nonpayable";
565
+ }, {
566
+ readonly type: "function";
567
+ readonly inputs: readonly [{
568
+ readonly name: "newCaller";
569
+ readonly internalType: "address";
570
+ readonly type: "address";
571
+ }];
572
+ readonly name: "setValidatorCaller";
573
+ readonly outputs: readonly [];
574
+ readonly stateMutability: "nonpayable";
575
+ }, {
576
+ readonly type: "function";
577
+ readonly inputs: readonly [{
578
+ readonly name: "";
579
+ readonly internalType: "address";
580
+ readonly type: "address";
581
+ }];
582
+ readonly name: "signers";
583
+ readonly outputs: readonly [{
584
+ readonly name: "";
585
+ readonly internalType: "bool";
586
+ readonly type: "bool";
587
+ }];
588
+ readonly stateMutability: "view";
589
+ }, {
590
+ readonly type: "function";
591
+ readonly inputs: readonly [{
592
+ readonly name: "interfaceId";
593
+ readonly internalType: "bytes4";
594
+ readonly type: "bytes4";
595
+ }];
596
+ readonly name: "supportsInterface";
597
+ readonly outputs: readonly [{
598
+ readonly name: "";
599
+ readonly internalType: "bool";
600
+ readonly type: "bool";
601
+ }];
602
+ readonly stateMutability: "view";
603
+ }, {
604
+ readonly type: "function";
605
+ readonly inputs: readonly [{
606
+ readonly name: "newOwner";
607
+ readonly internalType: "address";
608
+ readonly type: "address";
609
+ }];
610
+ readonly name: "transferOwnership";
611
+ readonly outputs: readonly [];
612
+ readonly stateMutability: "payable";
613
+ }, {
614
+ readonly type: "function";
615
+ readonly inputs: readonly [{
616
+ readonly name: "boostId";
617
+ readonly internalType: "uint256";
618
+ readonly type: "uint256";
619
+ }, {
620
+ readonly name: "incentiveId";
621
+ readonly internalType: "uint256";
622
+ readonly type: "uint256";
623
+ }, {
624
+ readonly name: "claimant";
625
+ readonly internalType: "address";
626
+ readonly type: "address";
627
+ }, {
628
+ readonly name: "claimData";
629
+ readonly internalType: "bytes";
630
+ readonly type: "bytes";
631
+ }];
632
+ readonly name: "validate";
633
+ readonly outputs: readonly [{
634
+ readonly name: "";
635
+ readonly internalType: "bool";
636
+ readonly type: "bool";
637
+ }];
638
+ readonly stateMutability: "nonpayable";
639
+ }];
640
+ /**
641
+ * @inheritdoc
642
+ *
643
+ * @public
644
+ * @static
645
+ * @type {Record<number, Address>}
646
+ */
647
+ static bases: Record<number, Address>;
648
+ /**
649
+ * @inheritdoc
650
+ *
651
+ * @public
652
+ * @static
653
+ * @type {RegistryType}
654
+ */
655
+ static registryType: RegistryType;
656
+ /**
657
+ * The set of authorized signers
658
+ *
659
+ * @public
660
+ * @async
661
+ * @param {Address} address
662
+ * @param {?ReadParams} [params]
663
+ * @returns {Promise<boolean>}
664
+ */
665
+ signers(address: Address, params?: ReadParams<typeof limitedSignerValidatorAbi, 'signers'>): Promise<boolean>;
666
+ /**
667
+ * Retrieve the hash and signer data for a given hash
668
+ *
669
+ * @public
670
+ * @async
671
+ * @param {SignerValidatorSignaturePayload} payload
672
+ * @param {?ReadParams} [params]
673
+ * @returns {Promise<Hex>}
674
+ */
675
+ hashSignerData(payload: LimitedSignerValidatorSignaturePayload, params?: ReadParams<typeof limitedSignerValidatorAbi, 'hashSignerData'>): Promise<`0x${string}`>;
676
+ /**
677
+ * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
678
+ *
679
+ * @public
680
+ * @async
681
+ * @param {SignerValidatorValidatePayload} payload
682
+ * @param {?WriteParams} [params]
683
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
684
+ */
685
+ protected validate(payload: LimitedSignerValidatorValidatePayload, params?: WriteParams<typeof limitedSignerValidatorAbi, 'validate'>): Promise<boolean>;
686
+ /**
687
+ * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.
688
+ *
689
+ * @public
690
+ * @async
691
+ * @param {SignerValidatorValidatePayload} payload
692
+ * @param {?WriteParams} [params]
693
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
694
+ */
695
+ protected validateRaw(payload: LimitedSignerValidatorValidatePayload, params?: ReadParams<typeof limitedSignerValidatorAbi, 'validate'>): Promise<{
696
+ hash: `0x${string}`;
697
+ result: boolean;
698
+ }>;
699
+ /**
700
+ * Set the authorized status of a signer
701
+ *
702
+ * @public
703
+ * @async
704
+ * @param {Address[]} addresses - The list of signers to update
705
+ * @param {boolean[]} allowed - The authorized status of each signer
706
+ * @param {?WriteParams} [params]
707
+ * @returns {Promise<void>}
708
+ */
709
+ setAuthorized(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof limitedSignerValidatorAbi, 'setAuthorized'>): Promise<void>;
710
+ /**
711
+ * Set the authorized status of a signer
712
+ *
713
+ * @public
714
+ * @async
715
+ * @param {Address[]} addresses - The list of signers to update
716
+ * @param {boolean[]} allowed - The authorized status of each signer
717
+ * @param {?WriteParams} [params]
718
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
719
+ */
720
+ setAuthorizedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof limitedSignerValidatorAbi, 'setAuthorized'>): Promise<{
721
+ hash: `0x${string}`;
722
+ result: void;
723
+ }>;
724
+ /**
725
+ * Update the authorized caller of the validator function
726
+ *
727
+ * @public
728
+ * @async
729
+ * @param {Address} address
730
+ * @param {?WriteParams} [params]
731
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
732
+ */
733
+ setValidatorCallerRaw(address: Address, params?: WriteParams<typeof limitedSignerValidatorAbi, 'setValidatorCaller'>): Promise<{
734
+ hash: `0x${string}`;
735
+ result: void;
736
+ }>;
737
+ /**
738
+ * Update the authorized caller of the validator function
739
+ *
740
+ * @public
741
+ * @async
742
+ * @param {Address} address
743
+ * @param {?WriteParams} [params]
744
+ * @returns {Promise<void>}
745
+ */
746
+ setValidatorCaller(address: Address, params?: WriteParams<typeof limitedSignerValidatorAbi, 'setValidatorCaller'>): Promise<void>;
747
+ /**
748
+ * Properly encodes the data needed to claim
749
+ *
750
+ * @public
751
+ * @async
752
+ * @param {SignerValidatorClaimDataParams} params
753
+ * @returns {Promise<Hex>}
754
+ */
755
+ encodeClaimData(params: Omit<LimitedSignerValidatorClaimDataParams, 'validator'>): Promise<Hex>;
756
+ /**
757
+ * @inheritdoc
758
+ *
759
+ * @public
760
+ * @param {?SignerValidatorPayload} [_payload]
761
+ * @param {?DeployableOptions} [_options]
762
+ * @returns {GenericDeployableParams}
763
+ */
764
+ buildParameters(_payload?: LimitedSignerValidatorPayload, _options?: DeployableOptions): GenericDeployableParams;
765
+ }
766
+ /**
767
+ * Signer Validator Claim Data Payload Preparation
768
+ *
769
+ * @export
770
+ * @async
771
+ * @param {SignerValidatorClaimDataParams} param0
772
+ * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer
773
+ * @param {Hex} param0.incentiveData
774
+ * @param {number} param0.chainId
775
+ * @param {Address} param0.validator
776
+ * @param {number} param0.incentiveQuantity
777
+ * @param {Address} param0.claimant
778
+ * @param {bigint} param0.boostId
779
+ * @returns {Promise<Hex>}
780
+ */
781
+ export declare function prepareLimitedSignerValidatorClaimDataPayload({ signer, incentiveData, chainId, validator, incentiveQuantity, claimant, boostId, }: LimitedSignerValidatorClaimDataParams): Promise<Hex>;
782
+ /**
783
+ * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.
784
+ *
785
+ * @param {SignerValidatorInputParams} param0
786
+ * @param {Address} param0.signer
787
+ * @param {Hex} param0.signature
788
+ * @param {number} param0.incentiveQuantity
789
+ * @returns {Hex}
790
+ */
791
+ export declare function prepareLimitedSignerValidatorInputParams({ signer, signature, incentiveQuantity, }: LimitedSignerValidatorInputParams): `0x${string}`;
792
+ /**
793
+ * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.
794
+ *
795
+ * @param {SignerValidatorPayload} param0
796
+ SignerValidator: class TSignerValidator extends SignerValidator {
797
+ public static override bases: Record<number, Address> = {
798
+ [chainId]: signerValidatorBase,
799
+ };
800
+ },
801
+ * @param {Address[]} param0.signers
802
+ * @param {Address} param0.validatorCaller
803
+ * @returns {Hex}
804
+ */
805
+ export declare function prepareLimitedSignerValidatorPayload({ signers, validatorCaller, maxClaimCount, }: LimitedSignerValidatorPayload): `0x${string}`;
806
+ //# sourceMappingURL=LimitedSignerValidator.d.ts.map