@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9

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 (191) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +46 -3
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +37 -10
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +257 -11
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +249 -82
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.d.ts +2 -2
  15. package/dist/AllowLists/AllowList.js +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  17. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  18. package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
  19. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  20. package/dist/AllowLists/SimpleAllowList.js +52 -37
  21. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  22. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  23. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleDenyList.js +41 -129
  27. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  28. package/dist/Auth/PassthroughAuth.cjs +1 -1
  29. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  30. package/dist/Auth/PassthroughAuth.js +4 -4
  31. package/dist/Auth/PassthroughAuth.js.map +1 -1
  32. package/dist/Boost.cjs +1 -1
  33. package/dist/Boost.cjs.map +1 -1
  34. package/dist/Boost.d.ts +93 -1
  35. package/dist/Boost.d.ts.map +1 -1
  36. package/dist/Boost.js +151 -5
  37. package/dist/Boost.js.map +1 -1
  38. package/dist/BoostCore.cjs +2 -2
  39. package/dist/BoostCore.cjs.map +1 -1
  40. package/dist/BoostCore.d.ts +45 -7
  41. package/dist/BoostCore.d.ts.map +1 -1
  42. package/dist/BoostCore.js +352 -305
  43. package/dist/BoostCore.js.map +1 -1
  44. package/dist/BoostRegistry.cjs +1 -1
  45. package/dist/BoostRegistry.cjs.map +1 -1
  46. package/dist/BoostRegistry.d.ts +18 -4
  47. package/dist/BoostRegistry.d.ts.map +1 -1
  48. package/dist/BoostRegistry.js +36 -25
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.js +1 -1
  52. package/dist/Budgets/ManagedBudget.cjs +1 -1
  53. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  54. package/dist/Budgets/ManagedBudget.d.ts +40 -2
  55. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  56. package/dist/Budgets/ManagedBudget.js +53 -36
  57. package/dist/Budgets/ManagedBudget.js.map +1 -1
  58. package/dist/Budgets/SimpleBudget.d.ts +33 -2
  59. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  60. package/dist/Budgets/VestingBudget.d.ts +54 -2
  61. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  62. package/dist/Deployable/Contract.cjs +1 -1
  63. package/dist/Deployable/Contract.cjs.map +1 -1
  64. package/dist/Deployable/Contract.js +1 -1
  65. package/dist/Deployable/Contract.js.map +1 -1
  66. package/dist/Deployable/Deployable.cjs.map +1 -1
  67. package/dist/Deployable/Deployable.d.ts +8 -2
  68. package/dist/Deployable/Deployable.d.ts.map +1 -1
  69. package/dist/Deployable/Deployable.js +6 -0
  70. package/dist/Deployable/Deployable.js.map +1 -1
  71. package/dist/Deployable/DeployableTarget.cjs +1 -1
  72. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  73. package/dist/Deployable/DeployableTarget.d.ts +4 -3
  74. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  75. package/dist/Deployable/DeployableTarget.js +31 -28
  76. package/dist/Deployable/DeployableTarget.js.map +1 -1
  77. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  78. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  79. package/dist/Incentives/AllowListIncentive.d.ts +35 -5
  80. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  81. package/dist/Incentives/AllowListIncentive.js +33 -21
  82. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  83. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  84. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  85. package/dist/Incentives/CGDAIncentive.d.ts +89 -5
  86. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/CGDAIncentive.js +44 -23
  88. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
  90. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  91. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  92. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  93. package/dist/Incentives/ERC20Incentive.d.ts +49 -5
  94. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/ERC20Incentive.js +46 -27
  96. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
  98. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.cjs.map +1 -1
  101. package/dist/Incentives/Incentive.js +48 -32
  102. package/dist/Incentives/Incentive.js.map +1 -1
  103. package/dist/Incentives/PointsIncentive.cjs +1 -1
  104. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  105. package/dist/Incentives/PointsIncentive.d.ts +49 -5
  106. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  107. package/dist/Incentives/PointsIncentive.js +38 -21
  108. package/dist/Incentives/PointsIncentive.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.d.ts +298 -5
  112. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  113. package/dist/Validators/SignerValidator.js +151 -26
  114. package/dist/Validators/SignerValidator.js.map +1 -1
  115. package/dist/Validators/Validator.cjs +1 -1
  116. package/dist/Validators/Validator.js +1 -1
  117. package/dist/claiming.cjs +2 -0
  118. package/dist/claiming.cjs.map +1 -0
  119. package/dist/claiming.d.ts +43 -0
  120. package/dist/claiming.d.ts.map +1 -0
  121. package/dist/claiming.js +17 -0
  122. package/dist/claiming.js.map +1 -0
  123. package/dist/errors.cjs +1 -1
  124. package/dist/errors.cjs.map +1 -1
  125. package/dist/errors.d.ts +15 -1
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +30 -21
  128. package/dist/errors.js.map +1 -1
  129. package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
  130. package/dist/generated-57_Kffpz.js.map +1 -0
  131. package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
  132. package/dist/generated-wKBNvm48.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +4 -4
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +108 -124
  137. package/dist/transfers.cjs +2 -0
  138. package/dist/transfers.cjs.map +1 -0
  139. package/dist/transfers.d.ts +198 -0
  140. package/dist/transfers.d.ts.map +1 -0
  141. package/dist/transfers.js +84 -0
  142. package/dist/transfers.js.map +1 -0
  143. package/dist/utils.cjs +1 -1
  144. package/dist/utils.cjs.map +1 -1
  145. package/dist/utils.d.ts +2 -1371
  146. package/dist/utils.d.ts.map +1 -1
  147. package/dist/utils.js +26 -653
  148. package/dist/utils.js.map +1 -1
  149. package/package.json +17 -3
  150. package/src/Actions/Action.test.ts +5 -4
  151. package/src/Actions/ContractAction.test.ts +4 -6
  152. package/src/Actions/ContractAction.ts +73 -10
  153. package/src/Actions/ERC721MintAction.test.ts +2 -2
  154. package/src/Actions/ERC721MintAction.ts +70 -16
  155. package/src/Actions/EventAction.test.ts +43 -17
  156. package/src/Actions/EventAction.ts +451 -26
  157. package/src/AllowLists/SimpleAllowList.ts +51 -7
  158. package/src/AllowLists/SimpleDenyList.ts +47 -109
  159. package/src/Auth/PassthroughAuth.ts +1 -1
  160. package/src/Boost.ts +136 -1
  161. package/src/BoostCore.test.ts +4 -11
  162. package/src/BoostCore.ts +114 -45
  163. package/src/BoostRegistry.ts +39 -21
  164. package/src/Budgets/ManagedBudget.ts +69 -16
  165. package/src/Budgets/SimpleBudget.ts +57 -14
  166. package/src/Budgets/VestingBudget.ts +79 -9
  167. package/src/Deployable/Contract.ts +1 -1
  168. package/src/Deployable/Deployable.ts +8 -2
  169. package/src/Deployable/DeployableTarget.ts +19 -6
  170. package/src/Incentives/AllowListIncentive.test.ts +2 -5
  171. package/src/Incentives/AllowListIncentive.ts +59 -15
  172. package/src/Incentives/CGDAIncentive.test.ts +3 -7
  173. package/src/Incentives/CGDAIncentive.ts +123 -19
  174. package/src/Incentives/ERC1155Incentive.test.ts +2 -13
  175. package/src/Incentives/ERC1155Incentive.ts +104 -22
  176. package/src/Incentives/ERC20Incentive.test.ts +6 -17
  177. package/src/Incentives/ERC20Incentive.ts +86 -21
  178. package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
  179. package/src/Incentives/ERC20VariableIncentive.ts +71 -19
  180. package/src/Incentives/Incentive.test.ts +1 -1
  181. package/src/Incentives/PointsIncentive.test.ts +3 -6
  182. package/src/Incentives/PointsIncentive.ts +79 -17
  183. package/src/Validators/SignerValidator.test.ts +3 -7
  184. package/src/Validators/SignerValidator.ts +422 -13
  185. package/src/claiming.ts +56 -0
  186. package/src/errors.ts +19 -1
  187. package/src/index.ts +10 -7
  188. package/src/transfers.ts +284 -0
  189. package/src/utils.ts +3 -2052
  190. package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
  191. package/dist/generated-DGpIVcv5.js.map +0 -1
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type Config, type ReadContractParameters, type WatchContractEventParameters, type WriteContractParameters } from '@wagmi/core';
2
2
  import type { ExtractAbiEvent } from 'abitype';
3
- import type { Abi, AbiEvent, Address, ContractEventName, ContractFunctionName, GetLogsParameters, Hash, Hex, Log, PrivateKeyAccount, WaitForTransactionReceiptParameters } from 'viem';
3
+ import type { Abi, AbiEvent, ContractEventName, ContractFunctionName, GetLogsParameters, Hash, Log, WaitForTransactionReceiptParameters } from 'viem';
4
+ export type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
4
5
  /**
5
6
  * Helper type that encapsulates common writeContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.
6
7
  * See (writeContract)[https://viem.sh/docs/contract/writeContract]
@@ -112,1374 +113,4 @@ export declare enum RegistryType {
112
113
  INCENTIVE = 3,
113
114
  VALIDATOR = 4
114
115
  }
115
- /**
116
- * Enum representing incentive disbursement strategies.
117
- *
118
- * @export
119
- * @enum {number}
120
- */
121
- export declare enum StrategyType {
122
- POOL = 0,
123
- MINT = 1,
124
- RAFFLE = 2
125
- }
126
- /**
127
- * Enum representing inventive disbursement strategies for {@link ERC1155Incentive}
128
- *
129
- * @export
130
- * @enum {number}
131
- */
132
- export declare enum ERC1155StrategyType {
133
- POOL = 0,
134
- MINT = 1
135
- }
136
- /**
137
- * Object representation of `BoostLib.Target` struct. Used for low level Boost creation operations.
138
- * This is used to pass the base contract and its initialization parameters in an efficient manner
139
- *
140
- * @export
141
- * @typedef {Target}
142
- */
143
- export type Target = {
144
- isBase: boolean;
145
- instance: Address;
146
- parameters: Hex;
147
- };
148
- /**
149
- * Filter types used to determine how criteria are evaluated.
150
- *
151
- * @export
152
- * @enum {number}
153
- */
154
- export declare enum FilterType {
155
- EQUAL = 0,
156
- NOT_EQUAL = 1,
157
- GREATER_THAN = 2,
158
- LESS_THAN = 3,
159
- CONTAINS = 4
160
- }
161
- /**
162
- * The primitive types supported for filtering.
163
- *
164
- * @export
165
- * @enum {number}
166
- */
167
- export declare enum PrimitiveType {
168
- UINT = 0,
169
- ADDRESS = 1,
170
- BYTES = 2,
171
- STRING = 3
172
- }
173
- /**
174
- * Object representation of a `Criteria` struct used in event actions.
175
- *
176
- * @export
177
- * @interface Criteria
178
- * @typedef {Criteria}
179
- */
180
- export interface Criteria {
181
- /**
182
- * The filter type used in this criteria.
183
- *
184
- * @type {FilterType}
185
- */
186
- filterType: FilterType;
187
- /**
188
- * The primitive type of the field being filtered.
189
- *
190
- * @type {PrimitiveType}
191
- */
192
- fieldType: PrimitiveType;
193
- /**
194
- * The index in the logs argument array where the field is located.
195
- *
196
- * @type {number}
197
- */
198
- fieldIndex: number;
199
- /**
200
- * The filter data used for complex filtering.
201
- *
202
- * @type {Hex}
203
- */
204
- filterData: Hex;
205
- }
206
- /**
207
- * Whether a given signature is an event or function
208
- *
209
- * @export
210
- * @enum {number}
211
- */
212
- export declare enum SignatureType {
213
- EVENT = 0,
214
- FUNC = 1
215
- }
216
- /**
217
- * The payload describing how claimants are identified
218
- *
219
- * @export
220
- * @interface ActionClaimant
221
- * @typedef {ActionClaimant}
222
- */
223
- export interface ActionClaimant {
224
- /**
225
- * Whether claimaint is inferred from event or function
226
- *
227
- * @type {SignatureType}
228
- */
229
- signatureType: SignatureType;
230
- /**
231
- * The 4 byte signature of the event or function
232
- *
233
- * @type {Hex}
234
- */
235
- signature: Hex;
236
- /**
237
- * The index corresponding to claimant.
238
- *
239
- * @type {number}
240
- */
241
- fieldIndex: number;
242
- /**
243
- * The address of the target contract
244
- *
245
- * @type {Address}
246
- */
247
- targetContract: Address;
248
- }
249
- /**
250
- * Object representation of an `ActionStep` struct used in event actions.
251
- *
252
- * @export
253
- * @interface ActionStep
254
- * @typedef {ActionStep}
255
- */
256
- export interface ActionStep {
257
- /**
258
- * The signature of the event.
259
- *
260
- * @type {Hex}
261
- */
262
- signature: Hex;
263
- /**
264
- * Whether claimaint is inferred from event or function
265
- *
266
- * @type {SignatureType}
267
- */
268
- signatureType: SignatureType;
269
- /**
270
- * The type of action being performed.
271
- *
272
- * @type {number}
273
- */
274
- actionType: number;
275
- /**
276
- * The address of the target contract.
277
- *
278
- * @type {Address}
279
- */
280
- targetContract: Address;
281
- /**
282
- * The criteria used for this action step.
283
- *
284
- * @type {Criteria}
285
- */
286
- actionParameter: Criteria;
287
- }
288
- /**
289
- * You can either supply a simplified version of the payload, or one that explicitly declares action steps.
290
- *
291
- * @export
292
- * @typedef {EventActionPayload}
293
- */
294
- export type EventActionPayload = EventActionPayloadSimple | EventActionPayloadRaw;
295
- export interface EventActionPayloadSimple {
296
- /**
297
- * The payload describing how claimants are identified
298
- *
299
- * @type {ActionClaimant}
300
- */
301
- actionClaimant: ActionClaimant;
302
- /**
303
- * Up to 4 action steps.
304
- * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload
305
- * Any more than 4 will throw an error.
306
- *
307
- * @type {ActionStep[]}
308
- */
309
- actionSteps: ActionStep[];
310
- }
311
- /**
312
- * Typeguard to determine if a user is supplying a simple or raw EventActionPayload
313
- *
314
- * @param {*} opts
315
- * @returns {opts is EventActionPayloadSimple}
316
- */
317
- export declare function isEventActionPayloadSimple(opts: EventActionPayload): opts is EventActionPayloadSimple;
318
- /**
319
- * Object representation of an `InitPayload` struct used to initialize event actions.
320
- *
321
- * @export
322
- * @interface EventActionPayloadRaw
323
- * @typedef {EventActionPayloadRaw}
324
- */
325
- export interface EventActionPayloadRaw {
326
- /**
327
- * The payload describing how claimants are identified
328
- *
329
- * @type {ActionClaimant}
330
- */
331
- actionClaimant: ActionClaimant;
332
- /**
333
- * The first action step.
334
- *
335
- * @type {ActionStep}
336
- */
337
- actionStepOne: ActionStep;
338
- /**
339
- * The second action step.
340
- *
341
- * @type {ActionStep}
342
- */
343
- actionStepTwo: ActionStep;
344
- /**
345
- * The third action step.
346
- *
347
- * @type {ActionStep}
348
- */
349
- actionStepThree: ActionStep;
350
- /**
351
- * The fourth action step.
352
- *
353
- * @type {ActionStep}
354
- */
355
- actionStepFour: ActionStep;
356
- }
357
- /**
358
- * Function to properly encode an event action payload.
359
- *
360
- * @param {InitPayload} param0
361
- * @param {ActionStep} param0.actionStepOne - The first action step to initialize.
362
- * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.
363
- * @param {ActionStep} param0.actionStepThree - The third action step to initialize.
364
- * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.
365
- * @returns {Hex}
366
- */
367
- export declare const prepareEventActionPayload: ({ actionClaimant, actionStepOne, actionStepTwo, actionStepThree, actionStepFour, }: EventActionPayloadRaw) => `0x${string}`;
368
- /**
369
- * Object representation of the `ERC20Incentive.InitPayload`.
370
- *
371
- * @export
372
- * @interface ERC20IncentivePayload
373
- * @typedef {ERC20IncentivePayload}
374
- */
375
- export interface ERC20IncentivePayload {
376
- /**
377
- * The address of the incentivized asset.
378
- *
379
- * @type {Address}
380
- */
381
- asset: Address;
382
- /**
383
- * The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`
384
- *
385
- * @type {StrategyType}
386
- */
387
- strategy: StrategyType;
388
- /**
389
- * The amount of the asset to distribute.
390
- *
391
- * @type {bigint}
392
- */
393
- reward: bigint;
394
- /**
395
- * How many times can this incentive be claimed.
396
- *
397
- * @type {bigint}
398
- */
399
- limit: bigint;
400
- }
401
- /**
402
- * Object representing the payload for signing before validaton.
403
- *
404
- * @export
405
- * @interface SignerValidatorSignaturePayload
406
- * @typedef {SignerValidatorSignaturePayload}
407
- */
408
- export interface SignerValidatorSignaturePayload {
409
- /**
410
- * The ID of the boost.
411
- *
412
- * @type {bigint}
413
- */
414
- boostId: bigint;
415
- /**
416
- * The ID of the incentive.
417
- *
418
- * @type {number}
419
- */
420
- incentiveQuantity: number;
421
- /**
422
- * The address of the claimant.
423
- *
424
- * @type {Address}
425
- */
426
- claimant: Address;
427
- /**
428
- * The claim data.
429
- *
430
- * @type {Hex}
431
- */
432
- incentiveData: Hex;
433
- }
434
- /**
435
- * Object reprentation of a {@link SignerValidator} initialization payload
436
- *
437
- * @export
438
- * @interface SignerValidatorPayload
439
- * @typedef {SignerValidatorPayload}
440
- */
441
- export interface SignerValidatorPayload {
442
- /**
443
- * The list of authorized signers. The first address in the list will be the initial owner of the contract.
444
- *
445
- * @type {Address[]}
446
- */
447
- signers: Address[];
448
- /**
449
- * The authorized caller of the {@link prepareSignerValidator} function
450
- * @type {Address}
451
- */
452
- validatorCaller: Address;
453
- }
454
- /**
455
- * Description placeholder
456
- *
457
- * @export
458
- * @interface SignerValidatorValidatePayload
459
- * @typedef {SignerValidatorValidatePayload}
460
- */
461
- export interface SignerValidatorValidatePayload {
462
- /**
463
- * The ID of the boost.
464
- *
465
- * @type {bigint}
466
- */
467
- boostId: bigint;
468
- /**
469
- * The ID of the incentive.
470
- *
471
- * @type {bigint}
472
- */
473
- incentiveId: bigint;
474
- /**
475
- * The address of the claimant.
476
- *
477
- * @type {Address}
478
- */
479
- claimant: Address;
480
- /**
481
- * The claim data.
482
- *
483
- * @type {Hex}
484
- */
485
- claimData: Hex;
486
- }
487
- /**
488
- * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.
489
- *
490
- * @param {SignerValidatorPayload} param0
491
- * @param {Address[]} param0.signers
492
- * @param {Address} param0.validatorCaller
493
- * @returns {Hex}
494
- */
495
- export declare const prepareSignerValidatorPayload: ({ signers, validatorCaller, }: SignerValidatorPayload) => `0x${string}`;
496
- /**
497
- * Object representation of a {@link BoostClaimData} initialization payload
498
- *
499
- * @export
500
- * @interface BoostClaimData
501
- * @typedef {BoostClaimData}
502
- */
503
- export interface BoostClaimData {
504
- /**
505
- * The validator data.
506
- *
507
- * @type {Hex}
508
- */
509
- validatorData: Hex;
510
- /**
511
- * The incentive data.
512
- *
513
- * @type {Hex}
514
- */
515
- incentiveData: Hex;
516
- }
517
- /**
518
- * Given a {@link BoostClaimData}, properly encode the initialization payload.
519
- *
520
- * @param {BoostClaimData} param0
521
- * @param {Hex} param0.validatorData
522
- * @param {Hex} param0.incentiveData
523
- * @returns {Hex}
524
- */
525
- export declare const prepareBoostClaimData: ({ validatorData, incentiveData, }: BoostClaimData) => `0x${string}`;
526
- /**
527
- * Object representation of a {@link SignerValidatorInputParams} initialization payload
528
- *
529
- * @export
530
- * @interface SignerValidatorInputParams
531
- * @typedef {SignerValidatorInputParams}
532
- */
533
- export interface SignerValidatorInputParams {
534
- /**
535
- * The signer address.
536
- *
537
- * @type {Address}
538
- */
539
- signer: Address;
540
- /**
541
- * The signature data.
542
- *
543
- * @type {string}
544
- */
545
- signature: Hex;
546
- /**
547
- * The incentive quantity.
548
- *
549
- * @type {number}
550
- */
551
- incentiveQuantity: number;
552
- }
553
- /**
554
- * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.
555
- *
556
- * @param {SignerValidatorInputParams} param0
557
- * @param {Address} param0.signer
558
- * @param {Hex} param0.signature
559
- * @param {number} param0.incentiveQuantity
560
- * @returns {Hex}
561
- */
562
- export declare const prepareSignerValidatorInputParams: ({ signer, signature, incentiveQuantity, }: SignerValidatorInputParams) => `0x${string}`;
563
- /**
564
- * Signer Validator Claim Data Payload
565
- *
566
- * @export
567
- * @interface SignerValidatorClaimDataParams
568
- * @typedef {SignerValidatorClaimDataParams}
569
- */
570
- export interface SignerValidatorClaimDataParams {
571
- /**
572
- * The signer with which to sign the input
573
- *
574
- * @type {{
575
- * account: Address;
576
- * key: Hex;
577
- * privateKey: PrivateKeyAccount;
578
- * }}
579
- */
580
- signer: {
581
- account: Address;
582
- key: Hex;
583
- privateKey: PrivateKeyAccount;
584
- };
585
- /**
586
- * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}
587
- *
588
- * @type {Hex}
589
- */
590
- incentiveData: Hex;
591
- /**
592
- * The chain id to target
593
- *
594
- * @type {number}
595
- */
596
- chainId: number;
597
- /**
598
- * The address of the validator
599
- *
600
- * @type {Address}
601
- */
602
- validator: Address;
603
- /**
604
- * The incentive quantity.
605
- *
606
- * @type {number}
607
- */
608
- incentiveQuantity: number;
609
- /**
610
- * The address of the claimant
611
- *
612
- * @type {Address}
613
- */
614
- claimant: Address;
615
- /**
616
- * The ID of the boost
617
- *
618
- * @type {bigint}
619
- */
620
- boostId: bigint;
621
- }
622
- /**
623
- * Signer Validator Claim Data Payload Preparation
624
- *
625
- * @export
626
- * @async
627
- * @param {SignerValidatorClaimDataParams} param0
628
- * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer
629
- * @param {Hex} param0.incentiveData
630
- * @param {number} param0.chainId
631
- * @param {Address} param0.validator
632
- * @param {number} param0.incentiveQuantity
633
- * @param {Address} param0.claimant
634
- * @param {bigint} param0.boostId
635
- * @returns {Promise<Hex>}
636
- */
637
- export declare function prepareSignerValidatorClaimDataPayload({ signer, incentiveData, chainId, validator, incentiveQuantity, claimant, boostId, }: SignerValidatorClaimDataParams): Promise<Hex>;
638
- /**
639
- * Object representation of a {@link SimpleAllowList} initialization payload.
640
- *
641
- * @export
642
- * @interface SimpleAllowListPayload
643
- * @typedef {SimpleAllowListPayload}
644
- */
645
- export interface SimpleAllowListPayload {
646
- /**
647
- * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.
648
- *
649
- * @type {Address}
650
- */
651
- owner: Address;
652
- /**
653
- * List of allowed addresses.
654
- *
655
- * @type {Address[]}
656
- */
657
- allowed: Address[];
658
- }
659
- /**
660
- * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.
661
- *
662
- * @param {SimpleAllowListPayload} param0
663
- * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.
664
- * @param {Address[]} param0.allowed - List of allowed addresses.
665
- * @returns {Hex}
666
- */
667
- export declare const prepareSimpleAllowListPayload: ({ owner, allowed, }: SimpleAllowListPayload) => `0x${string}`;
668
- /**
669
- * Object representation of a {@link SimpleDenyList} initialization payload.
670
- *
671
- * @export
672
- * @interface SimpleDenyListPayload
673
- * @typedef {SimpleDenyListPayload}
674
- */
675
- export interface SimpleDenyListPayload {
676
- /**
677
- * The allow list's owner
678
- *
679
- * @type {Address}
680
- */
681
- owner: Address;
682
- /**
683
- * List of denied addresses.
684
- *
685
- * @type {Address[]}
686
- */
687
- denied: Address[];
688
- }
689
- /**
690
- * Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.
691
- *
692
- * @param {SimpleDenyListPayload} param0
693
- * @param {Address} param0.owner - The allow list's owner
694
- * @param {Address[]} param0.denied - List of denied addresses.
695
- * @returns {Hex}
696
- */
697
- export declare const prepareSimpleDenyListPayload: ({ owner, denied, }: SimpleDenyListPayload) => `0x${string}`;
698
- /**
699
- * Object representation of `BoostCore.InitPayload` struct.
700
- *
701
- * @export
702
- * @interface BoostPayload
703
- * @typedef {BoostPayload}
704
- */
705
- export interface BoostPayload {
706
- /**
707
- * Address to valid budget.
708
- *
709
- * @type {Address}
710
- */
711
- budget: Address;
712
- /**
713
- * Target for existing action, or base with initialization payload.
714
- *
715
- * @type {Target}
716
- */
717
- action: Target;
718
- /**
719
- * Target for existing validator, or base with initialization payload.
720
- *
721
- * @type {Target}
722
- */
723
- validator: Target;
724
- /**
725
- * Target for existing allowList, or base with initialization payload.
726
- *
727
- * @type {Target}
728
- */
729
- allowList: Target;
730
- /**
731
- * Targets for new incentives, with initialization payloads.
732
- *
733
- * @type {Target[]}
734
- */
735
- incentives: Target[];
736
- /**
737
- * The base protocol fee (in bps)
738
- *
739
- * @type {?bigint}
740
- */
741
- protocolFee?: bigint;
742
- /**
743
- * The base referral fee (in bps)
744
- *
745
- * @type {?bigint}
746
- */
747
- referralFee?: bigint;
748
- /**
749
- * Optional maximum amount of participants in the Boost.
750
- *
751
- * @type {?bigint}
752
- */
753
- maxParticipants?: bigint;
754
- /**
755
- * The owner of the Boost.
756
- *
757
- * @type {Address}
758
- */
759
- owner: Address;
760
- }
761
- /**
762
- * Given a valid {@link BoostPayload}, properly encode and compress the payload for use with `createBoost`
763
- *
764
- * @export
765
- * @param {BoostPayload} param0
766
- * @param {Address} param0.budget - Address to valid budget.
767
- * @param {Target} param0.action - Target for existing action, or base with initialization payload.
768
- * @param {Target} param0.validator - Target for existing validator, or base with initialization payload.
769
- * @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.
770
- * @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.
771
- * @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)
772
- * @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)
773
- * @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.
774
- * @param {Address} param0.owner - The owner of the Boost.
775
- * @returns {Hex}
776
- */
777
- export declare function prepareBoostPayload({ budget, action, validator, allowList, incentives, protocolFee, referralFee, maxParticipants, owner, }: BoostPayload): Hex;
778
- /**
779
- * Object representation of
780
- *
781
- * @export
782
- * @interface ERC1155Payload
783
- * @typedef {ERC1155Payload}
784
- */
785
- export interface ERC1155Payload {
786
- /**
787
- * The ERC1155 token ID for the incentive
788
- *
789
- * @type {bigint}
790
- */
791
- tokenId: bigint;
792
- /**
793
- * The amount to transfer
794
- *
795
- * @type {bigint}
796
- */
797
- amount: bigint;
798
- }
799
- /**
800
- * Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.
801
- *
802
- * @export
803
- * @param {ERC1155Payload} param0
804
- * @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive
805
- * @param {bigint} param0.amount - The amount to transfer
806
- * @returns {Hex}
807
- */
808
- export declare function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload): `0x${string}`;
809
- /**
810
- * The object representation of a `PointsIncentive.InitPayload`
811
- *
812
- * @export
813
- * @interface PointsIncentivePayload
814
- * @typedef {PointsIncentivePayload}
815
- */
816
- export interface PointsIncentivePayload {
817
- /**
818
- * The address of the points contract
819
- *
820
- * @type {Address}
821
- */
822
- venue: Address;
823
- /**
824
- * The selector for the issuance function on the points contract
825
- *
826
- * @type {Hex}
827
- */
828
- selector: Hex;
829
- /**
830
- * The reward amount issued for each claim
831
- *
832
- * @type {bigint}
833
- */
834
- reward: bigint;
835
- /**
836
- * The maximum number of claims that can be made (one per address)
837
- *
838
- * @type {bigint}
839
- */
840
- limit: bigint;
841
- }
842
- /**
843
- * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.
844
- *
845
- * @param {PointsIncentivePayload} param0
846
- * @param {Address} param0.venue - The address of the points contract
847
- * @param {Hex} param0.selector - The selector for the issuance function on the points contract
848
- * @param {bigint} param0.reward - The reward amount issued for each claim
849
- * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)
850
- * @returns {*}
851
- */
852
- export declare const preparePointsIncentivePayload: ({ venue, selector, reward, limit, }: PointsIncentivePayload) => `0x${string}`;
853
- /**
854
- * The configuration parameters for the CGDAIncentive
855
- *
856
- * @export
857
- * @interface CGDAParameters
858
- * @typedef {CGDAParameters}
859
- */
860
- export interface CGDAParameters {
861
- /**
862
- * The amount to subtract from the current reward after each claim
863
- *
864
- * @type {bigint}
865
- */
866
- rewardDecay: bigint;
867
- /**
868
- * The amount by which the reward increases for each hour without a claim (continuous linear increase)
869
- *
870
- * @type {bigint}
871
- */
872
- rewardBoost: bigint;
873
- /**
874
- * The timestamp of the last claim
875
- *
876
- * @type {bigint}
877
- */
878
- lastClaimTime: bigint;
879
- /**
880
- * The current reward amount
881
- *
882
- * @type {bigint}
883
- */
884
- currentReward: bigint;
885
- }
886
- /**
887
- * The object representation of a `CGDAIncentive.InitPayload`
888
- *
889
- * @export
890
- * @interface CGDAIncentivePayload
891
- * @typedef {CGDAIncentivePayload}
892
- */
893
- export interface CGDAIncentivePayload {
894
- /**
895
- * The address of the ERC20-like token
896
- *
897
- * @type {Address}
898
- */
899
- asset: Address;
900
- /**
901
- * The initial reward amount
902
- *
903
- * @type {bigint}
904
- */
905
- initialReward: bigint;
906
- /**
907
- * The amount to subtract from the current reward after each claim
908
- *
909
- * @type {bigint}
910
- */
911
- rewardDecay: bigint;
912
- /**
913
- * The amount by which the reward increases for each hour without a claim (continuous linear increase)
914
- *
915
- * @type {bigint}
916
- */
917
- rewardBoost: bigint;
918
- /**
919
- * The total budget for the incentive
920
- *
921
- * @type {bigint}
922
- */
923
- totalBudget: bigint;
924
- }
925
- /**
926
- * Given a {@link CGDAIncentivePayload}, properly encode a `CGDAIncentive.InitPayload` for use with {@link CGDAIncentive} initialization.
927
- *
928
- * @param {CGDAIncentivePayload} param0
929
- * @param {Address} param0.asset - The address of the ERC20-like token
930
- * @param {bigint} param0.initialReward - The initial reward amount
931
- * @param {bigint} param0.rewardDecay - The amount to subtract from the current reward after each claim
932
- * @param {bigint} param0.rewardBoost - The amount by which the reward increases for each hour without a claim (continuous linear increase)
933
- * @param {bigint} param0.totalBudget - The total budget for the incentive
934
- * @returns {Hex}
935
- */
936
- export declare const prepareCGDAIncentivePayload: ({ asset, initialReward, rewardDecay, rewardBoost, totalBudget, }: CGDAIncentivePayload) => `0x${string}`;
937
- /**
938
- * The object representation of a `ERC1155Incentive.InitPayload`
939
- *
940
- * @export
941
- * @interface ERC1155IncentivePayload
942
- * @typedef {ERC1155IncentivePayload}
943
- */
944
- export interface ERC1155IncentivePayload {
945
- /**
946
- * The address of the `ERC1155` asset
947
- *
948
- * @type {Address}
949
- */
950
- asset: Address;
951
- /**
952
- * Should be `Strategy.POOL`
953
- *
954
- * @type {ERC1155StrategyType}
955
- */
956
- strategy: ERC1155StrategyType;
957
- /**
958
- * The token ID to target
959
- *
960
- * @type {bigint}
961
- */
962
- tokenId: bigint;
963
- /**
964
- * The maximum number of claims that can be made (one per address)
965
- *
966
- * @type {bigint}
967
- */
968
- limit: bigint;
969
- /**
970
- * Any extra data to accompany the claim, if applicable.
971
- *
972
- * @type {Hex}
973
- */
974
- extraData: Hex;
975
- }
976
- /**
977
- * Given a {@link ERC1155IncentivePayload}, properly encode a `ERC1155Incentive.InitPayload` for use with {@link ERC1155Incentive} initialization.
978
- *
979
- * @param {ERC1155IncentivePayload} param0
980
- * @param {Address} param0.asset - The address of the `ERC1155` asset
981
- * @param {ERC1155StrategyType} param0.strategy - Should be `Strategy.POOL`
982
- * @param {bigint} param0.tokenId - The token ID to target
983
- * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)
984
- * @param {Hex} param0.extraData - Any extra data to accompany the claim, if applicable.
985
- * @returns {Hex}
986
- */
987
- export declare const prepareERC1155IncentivePayload: ({ asset, strategy, tokenId, limit, extraData, }: ERC1155IncentivePayload) => `0x${string}`;
988
- /**
989
- * The object representation of a `AllowListIncentive.InitPayload`
990
- *
991
- * @export
992
- * @interface AllowListIncentivePayload
993
- * @typedef {AllowListIncentivePayload}
994
- */
995
- export interface AllowListIncentivePayload {
996
- /**
997
- * The address to the allowlist to add claimers to.
998
- *
999
- * @type {Address}
1000
- */
1001
- allowList: Address;
1002
- /**
1003
- * The maximum number of claims that can be made (one per address)
1004
- *
1005
- * @type {bigint}
1006
- */
1007
- limit: bigint;
1008
- }
1009
- /**
1010
- * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.
1011
- *
1012
- * @param {AllowListIncentivePayload} param0
1013
- * @param {Address} param0.allowList - The address to the allowlist to add claimers to.
1014
- * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)
1015
- * @returns {Hex}
1016
- */
1017
- export declare const prepareAllowListIncentivePayload: ({ allowList, limit, }: AllowListIncentivePayload) => `0x${string}`;
1018
- /**
1019
- * The object representation of a `ERC20Incentive.InitPayload`
1020
- *
1021
- * @export
1022
- * @interface ERC20IncentivePayload
1023
- * @typedef {ERC20IncentivePayload}
1024
- */
1025
- export interface ERC20IncentivePayload {
1026
- /**
1027
- * The address of the incentivized asset.
1028
- *
1029
- * @type {Address}
1030
- */
1031
- asset: Address;
1032
- /**
1033
- * The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`
1034
- *
1035
- * @type {StrategyType}
1036
- */
1037
- strategy: StrategyType;
1038
- /**
1039
- * The amount of the asset to distribute.
1040
- *
1041
- * @type {bigint}
1042
- */
1043
- reward: bigint;
1044
- /**
1045
- * How many times can this incentive be claimed.
1046
- *
1047
- * @type {bigint}
1048
- */
1049
- limit: bigint;
1050
- }
1051
- /**
1052
- * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.
1053
- *
1054
- * @param {ERC20IncentivePayload} param0
1055
- * @param {Address} param0.asset - The address of the incentivized asset.
1056
- * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`
1057
- * @param {bigint} param0.reward - The amount of the asset to distribute.
1058
- * @param {bigint} param0.limit - How many times can this incentive be claimed.
1059
- * @returns {*}
1060
- */
1061
- export declare const prepareERC20IncentivePayload: ({ asset, strategy, reward, limit, }: ERC20IncentivePayload) => `0x${string}`;
1062
- /**
1063
- * The object representation of a `ERC20VariableIncentivePayload.InitPayload`
1064
- *
1065
- * @export
1066
- * @interface ERC20VariableIncentivePayload
1067
- * @typedef {ERC20VariableIncentivePayload}
1068
- */
1069
- export interface ERC20VariableIncentivePayload {
1070
- /**
1071
- * The address of the incentivized asset.
1072
- *
1073
- * @type {Address}
1074
- */
1075
- asset: Address;
1076
- /**
1077
- * The amount of the asset to distribute.
1078
- *
1079
- * @type {bigint}
1080
- */
1081
- reward: bigint;
1082
- /**
1083
- * How many times can this incentive be claimed.
1084
- *
1085
- * @type {bigint}
1086
- */
1087
- limit: bigint;
1088
- }
1089
- /**
1090
- * Given a {@link ERC20VariableIncentivePayload}, properly encode a ` ERC20VariableIncentive.InitPayload` for use with {@link ERC20VariableIncentive} initialization.
1091
- *
1092
- * @param {ERC20VariableIncentivePayload} param0
1093
- * @param {Address} param0.asset - The address of the incentivized asset.
1094
- * @param {bigint} param0.reward - The amount of the asset to distribute.
1095
- * @param {bigint} param0.limit - How many times can this incentive be claimed.
1096
- * @returns {*}
1097
- */
1098
- export declare const prepareERC20VariableIncentivePayload: ({ asset, reward, limit, }: ERC20VariableIncentivePayload) => `0x${string}`;
1099
- /**
1100
- * The object representation of a `ContractAction.InitPayload`
1101
- *
1102
- * @export
1103
- * @interface ContractActionPayload
1104
- * @typedef {ContractActionPayload}
1105
- */
1106
- export interface ContractActionPayload {
1107
- /**
1108
- * The chain ID on which the target exists
1109
- *
1110
- * @type {bigint}
1111
- */
1112
- chainId: bigint;
1113
- /**
1114
- * The target contract address
1115
- *
1116
- * @type {Address}
1117
- */
1118
- target: Address;
1119
- /**
1120
- * The selector for the function to be called
1121
- *
1122
- * @type {Hex}
1123
- */
1124
- selector: Hex;
1125
- /**
1126
- * The native token value to send with the function call
1127
- *
1128
- * @type {bigint}
1129
- */
1130
- value: bigint;
1131
- }
1132
- /**
1133
- * `ERC721MintActionPayload` is a re-exported `ContractActionPayload`
1134
- *
1135
- * @export
1136
- * @typedef {ERC721MintActionPayload}
1137
- */
1138
- export type ERC721MintActionPayload = ContractActionPayload;
1139
- /**
1140
- * The object representation of a `SimpleBudgetPayload.InitPayload`
1141
- *
1142
- * @export
1143
- * @interface SimpleBudgetPayload
1144
- * @typedef {SimpleBudgetPayload}
1145
- */
1146
- export interface SimpleBudgetPayload {
1147
- /**
1148
- * The budget's owner
1149
- *
1150
- * @type {Address}
1151
- */
1152
- owner: Address;
1153
- /**
1154
- * List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1155
- *
1156
- * @type {Address[]}
1157
- */
1158
- authorized: Address[];
1159
- }
1160
- /**
1161
- * Given a {@link SimpleBudgetPayload}, properly encode a `SimpleBudget.InitPayload` for use with {@link SimpleBudget} initialization.
1162
- *
1163
- * @param {SimpleBudgetPayload} param0
1164
- * @param {Address} param0.owner - The budget's owner
1165
- * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1166
- * @returns {*}
1167
- */
1168
- export declare const prepareSimpleBudgetPayload: ({ owner, authorized, }: SimpleBudgetPayload) => `0x${string}`;
1169
- /**
1170
- * The object representation of a `ManagedBudgetPayload.InitPayload`
1171
- *
1172
- * @export
1173
- * @interface ManagedBudgetPayload
1174
- * @typedef {ManagedBudgetPayload}
1175
- */
1176
- export interface ManagedBudgetPayload {
1177
- /**
1178
- * The budget's owner
1179
- *
1180
- * @type {Address}
1181
- */
1182
- owner: Address;
1183
- /**
1184
- * List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1185
- *
1186
- * @type {Address[]}
1187
- */
1188
- authorized: Address[];
1189
- /**
1190
- * List of roles to assign to the corresponding account by index.
1191
- *
1192
- * @type {bigint[]}
1193
- */
1194
- roles: bigint[];
1195
- }
1196
- /**
1197
- * Given a {@link ManagedBudgetPayload}, properly encode a `ManagedBudget.InitPayload` for use with {@link ManagedBudget} initialization.
1198
- *
1199
- * @param {ManagedBudgetPayload} param0
1200
- * @param {Address} param0.owner - The budget's owner
1201
- * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1202
- * @param {{}} param0.roles - List of roles to assign to the corresponding account by index.
1203
- * @returns {*}
1204
- */
1205
- export declare const prepareManagedBudgetPayload: ({ owner, authorized, roles, }: ManagedBudgetPayload) => `0x${string}`;
1206
- /**
1207
- * The object representation of a `VestingBudget.InitPayload`
1208
- *
1209
- * @export
1210
- * @interface VestingBudgetPayload
1211
- * @typedef {VestingBudgetPayload}
1212
- */
1213
- export interface VestingBudgetPayload {
1214
- /**
1215
- * The budget's owner.
1216
- *
1217
- * @type {Address}
1218
- */
1219
- owner: Address;
1220
- /**
1221
- * List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1222
- *
1223
- * @type {Address[]}
1224
- */
1225
- authorized: Address[];
1226
- /**
1227
- * The timestamp at which the vesting schedule begins
1228
- *
1229
- * @type {bigint}
1230
- */
1231
- start: bigint;
1232
- /**
1233
- * The duration of the vesting schedule (in seconds)
1234
- *
1235
- * @type {bigint}
1236
- */
1237
- duration: bigint;
1238
- /**
1239
- * The duration of the cliff period (in seconds)
1240
- *
1241
- * @type {bigint}
1242
- */
1243
- cliff: bigint;
1244
- }
1245
- /**
1246
- * Given a {@link VestingBudgetPayload}, properly encode a `VestingBudget.InitPayload` for use with {@link VestingBudget} initialization.
1247
- *
1248
- * @param {VestingBudgetPayload} param0
1249
- * @param {Address} param0.owner - The budget's owner.
1250
- * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
1251
- * @param {bigint} param0.start - The timestamp at which the vesting schedule begins
1252
- * @param {bigint} param0.duration - The duration of the vesting schedule (in seconds)
1253
- * @param {bigint} param0.cliff - The duration of the cliff period (in seconds)
1254
- * @returns {Hex}
1255
- */
1256
- export declare const prepareVestingBudgetPayload: ({ owner, authorized, start, duration, cliff, }: VestingBudgetPayload) => `0x${string}`;
1257
- /**
1258
- * Given a {@link ContractActionPayload}, properly encode a `ContractAction.InitPayload` for use with {@link ContractAction} initialization.
1259
- *
1260
- * @param {ContractActionPayload} param0
1261
- * @param {bigint} param0.chainId - The chain ID on which the target exists
1262
- * @param {Address} param0.target - The target contract address
1263
- * @param {Hex} param0.selector - The selector for the function to be called
1264
- * @param {bigint} param0.value - The native token value to send with the function call
1265
- * @returns {Hex}
1266
- */
1267
- export declare const prepareContractActionPayload: ({ chainId, target, selector, value, }: ContractActionPayload) => `0x${string}`;
1268
- /**
1269
- * Given a {@link ContractActionPayload}, properly encode a `ContractAction.InitPayload` for use with {@link ERC721MintAction} initialization.
1270
- *
1271
- * @param {ContractActionPayload} param0
1272
- * @param {bigint} param0.chainId - The chain ID on which the target exists
1273
- * @param {Address} param0.target - The target contract address
1274
- * @param {Hex} param0.selector - The selector for the function to be called
1275
- * @param {bigint} param0.value - The native token value to send with the function call
1276
- * @returns {*}
1277
- */
1278
- export declare const prepareERC721MintActionPayload: ({ chainId, target, selector, value, }: ContractActionPayload) => `0x${string}`;
1279
- /**
1280
- * The object representation of an `Incentive.ClaimPayload`
1281
- *
1282
- * @export
1283
- * @interface ClaimPayload
1284
- * @typedef {ClaimPayload}
1285
- */
1286
- export interface ClaimPayload {
1287
- /**
1288
- * The address of the recipient
1289
- *
1290
- * @type {Address}
1291
- */
1292
- target: Address;
1293
- /**
1294
- * The implementation-specific data for the claim, if needed
1295
- *
1296
- * @type {?Hex}
1297
- */
1298
- data?: Hex;
1299
- }
1300
- /**
1301
- * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.
1302
- *
1303
- * @param {ClaimPayload} param0
1304
- * @param {Address} param0.target - The address of the recipient
1305
- * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed
1306
- * @returns {*}
1307
- */
1308
- export declare const prepareClaimPayload: ({ target, data, }: ClaimPayload) => `0x${string}`;
1309
- /**
1310
- * The various types of assets supported in Budgets and Incentives.
1311
- *
1312
- * @export
1313
- * @enum {number}
1314
- */
1315
- export declare enum AssetType {
1316
- ETH = 0,
1317
- ERC20 = 1,
1318
- ERC1155 = 2
1319
- }
1320
- /**
1321
- * Object representation of a generic `Transfer` struct.
1322
- *
1323
- * @export
1324
- * @interface TransferPayload
1325
- * @typedef {TransferPayload}
1326
- */
1327
- export interface TransferPayload {
1328
- /**
1329
- * The type of the asset being transferred.
1330
- *
1331
- * @type {AssetType}
1332
- */
1333
- assetType: AssetType;
1334
- /**
1335
- * The address of the asset to transfer, zero address for ETH.
1336
- *
1337
- * @type {Address}
1338
- */
1339
- address: Address;
1340
- /**
1341
- * The account from which to transfer the assets.
1342
- *
1343
- * @type {Address}
1344
- */
1345
- target: Address;
1346
- /**
1347
- * An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.
1348
- *
1349
- * @type {Hex}
1350
- */
1351
- data: Hex;
1352
- }
1353
- /**
1354
- * Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.
1355
- * Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}
1356
- *
1357
- * @param {TransferPayload} param0
1358
- * @param {AssetType} param0.assetType - The asset type being transferred.
1359
- * @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.
1360
- * @param {Address} param0.target - The address of the account being transferred from
1361
- * @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer
1362
- * @returns {Hex}
1363
- */
1364
- export declare const prepareTransferPayload: ({ assetType, address, target, data, }: TransferPayload) => `0x${string}`;
1365
- /**
1366
- * An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.
1367
- *
1368
- * @export
1369
- * @interface ERC1155TransferPayload
1370
- * @typedef {ERC1155TransferPayload}
1371
- */
1372
- export interface ERC1155TransferPayload {
1373
- /**
1374
- * The token ID to transfer
1375
- *
1376
- * @type {bigint}
1377
- */
1378
- tokenId: bigint;
1379
- /**
1380
- * The amount to transfer
1381
- *
1382
- * @type {bigint}
1383
- */
1384
- amount: bigint;
1385
- /**
1386
- * The address of the asset to target
1387
- *
1388
- * @type {Address}
1389
- */
1390
- asset: Address;
1391
- /**
1392
- * The account to transfer from
1393
- *
1394
- * @type {Address}
1395
- */
1396
- target: Address;
1397
- }
1398
- /**
1399
- * Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.
1400
- * The caller must have already approved the contract to transfer the asset.
1401
- *
1402
- * @export
1403
- * @param {ERC1155TransferPayload} param0
1404
- * @param {bigint} param0.tokenId - The token ID to transfer
1405
- * @param {bigint} param0.amount - The amount to transfer
1406
- * @param {Address} param0.asset - The address of the asset to target
1407
- * @param {Address} param0.target - The account to transfer from
1408
- * @returns {Hex}
1409
- */
1410
- export declare function prepareERC1155Transfer({ tokenId, amount, asset, target, }: ERC1155TransferPayload): `0x${string}`;
1411
- /**
1412
- * An object representation of the `FungiblePayload` struct
1413
- *
1414
- * @export
1415
- * @interface FungiblePayload
1416
- * @typedef {FungiblePayload}
1417
- */
1418
- export interface FungiblePayload {
1419
- /**
1420
- * The amount being transferred
1421
- *
1422
- * @type {bigint}
1423
- */
1424
- amount: bigint;
1425
- }
1426
- /**
1427
- * Encodes an amount for the `FungiblePayload` struct
1428
- *
1429
- * @export
1430
- * @param {FungiblePayload} param0
1431
- * @param {bigint} param0.amount - The amount being transferred
1432
- * @returns {*}
1433
- */
1434
- export declare function prepareFungiblePayload({ amount }: FungiblePayload): `0x${string}`;
1435
- /**
1436
- * An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.
1437
- *
1438
- * @export
1439
- * @interface FungibleTransferPayload
1440
- * @typedef {FungibleTransferPayload}
1441
- */
1442
- export interface FungibleTransferPayload {
1443
- /**
1444
- * The amount to transfer
1445
- *
1446
- * @type {bigint}
1447
- */
1448
- amount: bigint;
1449
- /**
1450
- * The address of the asset. Use zero address for ETH transfers.
1451
- *
1452
- * @type {Address}
1453
- */
1454
- asset: Address;
1455
- /**
1456
- * The account to transfer from
1457
- *
1458
- * @type {Address}
1459
- */
1460
- target: Address;
1461
- }
1462
- /**
1463
- * Encodes parameters for a Fungible transfer, used for Budget allocations.
1464
- * The caller must have already approved the contract to transfer the asset.
1465
- *
1466
- * @export
1467
- * @param {FungibleTransferPayload} param0
1468
- * @param {bigint} param0.amount - The amount to transfer
1469
- * @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.
1470
- * @param {Address} param0.target - The account to transfer from
1471
- * @returns {Hex}
1472
- */
1473
- export declare function prepareFungibleTransfer({ amount, asset, target, }: FungibleTransferPayload): `0x${string}`;
1474
- /**
1475
- * Encodes a payload to validate that an action has been completed successfully.
1476
- *
1477
- *
1478
- * @export
1479
- * @param {Address} holder - The holder address
1480
- * @param {bigint} payload - The token ID
1481
- * @returns {Hex} - The first 20 bytes of the payload will be the holder address and the remaining bytes must be an encoded token ID (uint256)
1482
- */
1483
- export declare function prepareERC721MintActionValidate(holder: Address, payload: bigint): `0x${string}`;
1484
- export declare function dedupeActionSteps(_steps: ActionStep[]): ActionStep[];
1485
116
  //# sourceMappingURL=utils.d.ts.map