@boostxyz/sdk 0.0.0-alpha.10

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