@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 @@
1
+ {"version":3,"file":"SignerValidator.d.ts","sourceRoot":"","sources":["../../src/Validators/SignerValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAOnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,iBAAiB,EAEvB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB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C3B,uBAAuB;CAY3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,sCAAsC,CAAC,EAC3D,MAAM,EACN,aAAa,EACb,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,OAAO,GACR,EAAE,8BAA8B,GAAG,OAAO,CAAC,GAAG,CAAC,CAqD/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAAC,EAChD,MAAM,EACN,SAAS,EACT,iBAAiB,GAClB,EAAE,0BAA0B,iBAe5B;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,OAAO,EACP,eAAe,GAChB,EAAE,sBAAsB,iBAQxB"}
@@ -0,0 +1,293 @@
1
+ import { M as r, aN as u, aO as h, aP as y, aQ as m, aR as p, aS as g, aT as w, aU as A } from "../generated-BDeDiaCK.js";
2
+ import { encodeAbiParameters as s } from "viem";
3
+ import { signTypedData as D } from "viem/accounts";
4
+ import { DeployableTarget as v } from "../Deployable/DeployableTarget.js";
5
+ import { RegistryType as V } from "../utils.js";
6
+ const R = "0x610120604052348015610010575f80fd5b503073ffffffffffffffffffffffffffffffffffffffff16608081815250504660a0818152505060608061004861013960201b60201c565b6100635761005a61014160201b60201c565b80925081935050505b5f61007261013960201b60201c565b610083578280519060200120610087565b5f801b5b90505f61009861013960201b60201c565b6100a95782805190602001206100ad565b5f801b5b90508160c081815250508060e081815250505f6100ce61013960201b60201c565b610118576040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815283602082015282604082015246606082015230608082015260a081209150505b80610100818152505050505050506101346101b860201b60201c565b61024d565b5f6001905090565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f6101c761022460201b60201c565b9050805460018116156101e15763f92ee8a95f526004601cfd5b8160c01c808260011c1461021f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805160a05160c05160e05161010051611ecc61028a5f395f610f6101525f6110a001525f61107d01525f61110f01525f6111330152611ecc5ff3fe6080604052600436106100f2575f3560e01c8063736c0d5b11610089578063d3de6e7511610058578063d3de6e75146102c4578063f04e283e14610300578063f2fde38b1461031c578063fee81cf414610338576100f2565b8063736c0d5b1461020657806384b0196e146102425780638da5cb5b14610272578063a1d2756f1461029c576100f2565b8063439fab91116100c5578063439fab911461018e57806354d1f13d146101b6578063703b6900146101c0578063715018a6146101fc576100f2565b806301ffc9a7146100f6578063256929621461013257806328d6183b1461013c5780634359d28a14610166575b5f80fd5b348015610101575f80fd5b5061011c60048036038101906101179190611232565b610374565b6040516101299190611277565b60405180910390f35b61013a6103ed565b005b348015610147575f80fd5b5061015061043e565b60405161015d919061129f565b60405180910390f35b348015610171575f80fd5b5061018c6004803603810190610187919061136e565b610465565b005b348015610199575f80fd5b506101b460048036038101906101af9190611441565b61056e565b005b6101be6106e5565b005b3480156101cb575f80fd5b506101e660048036038101906101e19190611519565b61071e565b6040516101f39190611277565b60405180910390f35b610204610911565b005b348015610211575f80fd5b5061022c6004803603810190610227919061159d565b610924565b6040516102399190611277565b60405180910390f35b34801561024d575f80fd5b50610256610940565b604051610269979695949392919061175f565b60405180910390f35b34801561027d575f80fd5b5061028661098b565b60405161029391906117e1565b60405180910390f35b3480156102a7575f80fd5b506102c260048036038101906102bd919061159d565b6109b3565b005b3480156102cf575f80fd5b506102ea60048036038101906102e59190611958565b6109fe565b6040516102f791906119d8565b60405180910390f35b61031a6004803603810190610315919061159d565b610a67565b005b6103366004803603810190610331919061159d565b610aa5565b005b348015610343575f80fd5b5061035e6004803603810190610359919061159d565b610ace565b60405161036b91906119f1565b60405180910390f35b5f7fb8ce7b22000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103e657506103e582610ae7565b5b9050919050565b5f6103f6610b60565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fb8ce7b2200000000000000000000000000000000000000000000000000000000905090565b61046d610b6a565b8181905084849050146104ac576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610567578282828181106104cc576104cb611a0a565b5b90506020020160208101906104e19190611a61565b5f808787858181106104f6576104f5611a0a565b5b905060200201602081019061050b919061159d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b5050505050565b5f610577610ba1565b905080546003825580156105a95760018160011c14303b106105a05763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906105bb9190611b87565b915091506105e2825f815181106105d5576105d4611a0a565b5b6020026020010151610bca565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f5b82518110156106a85760015f8085848151811061064457610643611a0a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610624565b50505080156106e0576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83838101906107b59190611c6e565b90505f815f01518060200190518101906107cf9190611dc8565b90505f6107e68983604001518986602001516109fe565b905087826040015160ff1611610839578160400151886040517f17c66bc7000000000000000000000000000000000000000000000000000000008152600401610830929190611e1e565b60405180910390fd5b5f80835f015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166108bb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108d181896001610ca09092919063ffffffff16565b610903818360200151845f015173ffffffffffffffffffffffffffffffffffffffff16610d029092919063ffffffff16565b935050505095945050505050565b610919610b6a565b6109225f610e05565b565b5f602052805f5260405f205f915054906101000a900460ff1681565b5f6060805f805f60607f0f000000000000000000000000000000000000000000000000000000000000009650610974610ecb565b809650819750505046935030925090919293949596565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b6109bb610b6a565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f610a5d7ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f8686868680519060200120604051602001610a42959493929190611e45565b60405160208183030381529060405280519060200120610f42565b9050949350505050565b610a6f610b6a565b63389a75e1600c52805f526020600c208054421115610a9557636f5e88185f526004601cfd5b5f815550610aa281610e05565b50565b610aad610b6a565b8060601b610ac257637448fbae5f526004601cfd5b610acb81610e05565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5912b89c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b595750610b5882610fbe565b5b9050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610b9f576382b429005f526004601cfd5b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd2611037565b15610c4a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0c57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f633f57fc5c60e01b90505f634de1225a60e01b90506007831115610ccb57815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001188015610cf557835f528560045260245ffd5b8183555050505050505050565b5f8360601b60601c93508315610dfe57604051835f5260208301516040526040835103610d6f576040830151601b8160ff1c016020528060011b60011c6060526020600160805f60015afa805187183d1517610d6c57600193505f60605282604052505050610dfe565b50505b6041835103610db55760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610db357600192505f606052816040525050610dfe565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa5060208260443d01868b5afa83835114169450505050505b9392505050565b610e0d611037565b15610e72577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610ec8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f610f4b61103b565b15610f5f57610f58611043565b9050610f9b565b7f00000000000000000000000000000000000000000000000000000000000000009050610f8a61110b565b15610f9a57610f97611043565b90505b5b6719010000000000005f5280601a5281603a52604260182090505f603a52919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611030575061102f82611163565b5b9050919050565b5f90565b5f6001905090565b5f8061104d61103b565b1561107b575f8061105c610ecb565b91509150818051906020012093508080519060200120925050506110c2565b7f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090505b6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815282602082015281604082015246606082015230608082015260a081209250505090565b5f807f000000000000000000000000000000000000000000000000000000000000000090505f7f0000000000000000000000000000000000000000000000000000000000000000905080301482461416159250505090565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611211816111dd565b811461121b575f80fd5b50565b5f8135905061122c81611208565b92915050565b5f60208284031215611247576112466111d5565b5b5f6112548482850161121e565b91505092915050565b5f8115159050919050565b6112718161125d565b82525050565b5f60208201905061128a5f830184611268565b92915050565b611299816111dd565b82525050565b5f6020820190506112b25f830184611290565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d9576112d86112b8565b5b8235905067ffffffffffffffff8111156112f6576112f56112bc565b5b602083019150836020820283011115611312576113116112c0565b5b9250929050565b5f8083601f84011261132e5761132d6112b8565b5b8235905067ffffffffffffffff81111561134b5761134a6112bc565b5b602083019150836020820283011115611367576113666112c0565b5b9250929050565b5f805f8060408587031215611386576113856111d5565b5b5f85013567ffffffffffffffff8111156113a3576113a26111d9565b5b6113af878288016112c4565b9450945050602085013567ffffffffffffffff8111156113d2576113d16111d9565b5b6113de87828801611319565b925092505092959194509250565b5f8083601f840112611401576114006112b8565b5b8235905067ffffffffffffffff81111561141e5761141d6112bc565b5b60208301915083600182028301111561143a576114396112c0565b5b9250929050565b5f8060208385031215611457576114566111d5565b5b5f83013567ffffffffffffffff811115611474576114736111d9565b5b611480858286016113ec565b92509250509250929050565b5f819050919050565b61149e8161148c565b81146114a8575f80fd5b50565b5f813590506114b981611495565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114e8826114bf565b9050919050565b6114f8816114de565b8114611502575f80fd5b50565b5f81359050611513816114ef565b92915050565b5f805f805f60808688031215611532576115316111d5565b5b5f61153f888289016114ab565b9550506020611550888289016114ab565b945050604061156188828901611505565b935050606086013567ffffffffffffffff811115611582576115816111d9565b5b61158e888289016113ec565b92509250509295509295909350565b5f602082840312156115b2576115b16111d5565b5b5f6115bf84828501611505565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6115fc816115c8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61164482611602565b61164e818561160c565b935061165e81856020860161161c565b6116678161162a565b840191505092915050565b61167b8161148c565b82525050565b61168a816114de565b82525050565b5f819050919050565b6116a281611690565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116da8161148c565b82525050565b5f6116eb83836116d1565b60208301905092915050565b5f602082019050919050565b5f61170d826116a8565b61171781856116b2565b9350611722836116c2565b805f5b8381101561175257815161173988826116e0565b9750611744836116f7565b925050600181019050611725565b5085935050505092915050565b5f60e0820190506117725f83018a6115f3565b8181036020830152611784818961163a565b90508181036040830152611798818861163a565b90506117a76060830187611672565b6117b46080830186611681565b6117c160a0830185611699565b81810360c08301526117d38184611703565b905098975050505050505050565b5f6020820190506117f45f830184611681565b92915050565b5f60ff82169050919050565b61180f816117fa565b8114611819575f80fd5b50565b5f8135905061182a81611806565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61186a8261162a565b810181811067ffffffffffffffff8211171561188957611888611834565b5b80604052505050565b5f61189b6111cc565b90506118a78282611861565b919050565b5f67ffffffffffffffff8211156118c6576118c5611834565b5b6118cf8261162a565b9050602081019050919050565b828183375f83830152505050565b5f6118fc6118f7846118ac565b611892565b90508281526020810184848401111561191857611917611830565b5b6119238482856118dc565b509392505050565b5f82601f83011261193f5761193e6112b8565b5b813561194f8482602086016118ea565b91505092915050565b5f805f80608085870312156119705761196f6111d5565b5b5f61197d878288016114ab565b945050602061198e8782880161181c565b935050604061199f87828801611505565b925050606085013567ffffffffffffffff8111156119c0576119bf6111d9565b5b6119cc8782880161192b565b91505092959194509250565b5f6020820190506119eb5f830184611699565b92915050565b5f602082019050611a045f830184611672565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b611a408161125d565b8114611a4a575f80fd5b50565b5f81359050611a5b81611a37565b92915050565b5f60208284031215611a7657611a756111d5565b5b5f611a8384828501611a4d565b91505092915050565b5f67ffffffffffffffff821115611aa657611aa5611834565b5b602082029050602081019050919050565b5f611ac9611ac484611a8c565b611892565b90508083825260208201905060208402830185811115611aec57611aeb6112c0565b5b835b81811015611b155780611b018882611505565b845260208401935050602081019050611aee565b5050509392505050565b5f82601f830112611b3357611b326112b8565b5b8135611b43848260208601611ab7565b91505092915050565b5f611b56826114bf565b9050919050565b611b6681611b4c565b8114611b70575f80fd5b50565b5f81359050611b8181611b5d565b92915050565b5f8060408385031215611b9d57611b9c6111d5565b5b5f83013567ffffffffffffffff811115611bba57611bb96111d9565b5b611bc685828601611b1f565b9250506020611bd785828601611b73565b9150509250929050565b5f80fd5b5f80fd5b5f60408284031215611bfe57611bfd611be1565b5b611c086040611892565b90505f82013567ffffffffffffffff811115611c2757611c26611be5565b5b611c338482850161192b565b5f83015250602082013567ffffffffffffffff811115611c5657611c55611be5565b5b611c628482850161192b565b60208301525092915050565b5f60208284031215611c8357611c826111d5565b5b5f82013567ffffffffffffffff811115611ca057611c9f6111d9565b5b611cac84828501611be9565b91505092915050565b5f81519050611cc3816114ef565b92915050565b5f611cdb611cd6846118ac565b611892565b905082815260208101848484011115611cf757611cf6611830565b5b611d0284828561161c565b509392505050565b5f82601f830112611d1e57611d1d6112b8565b5b8151611d2e848260208601611cc9565b91505092915050565b5f81519050611d4581611806565b92915050565b5f60608284031215611d6057611d5f611be1565b5b611d6a6060611892565b90505f611d7984828501611cb5565b5f83015250602082015167ffffffffffffffff811115611d9c57611d9b611be5565b5b611da884828501611d0a565b6020830152506040611dbc84828501611d37565b60408301525092915050565b5f60208284031215611ddd57611ddc6111d5565b5b5f82015167ffffffffffffffff811115611dfa57611df96111d9565b5b611e0684828501611d4b565b91505092915050565b611e18816117fa565b82525050565b5f604082019050611e315f830185611e0f565b611e3e6020830184611672565b9392505050565b5f60a082019050611e585f830188611699565b611e656020830187611672565b611e726040830186611e0f565b611e7f6060830185611681565b611e8c6080830184611699565b969550505050505056fea26469706673582212205fce26f05c322d5e151f6b16e70e28b485c147f70dd352b6a7a116eaca9f369f64736f6c634300081a0033", t = class t extends v {
7
+ constructor() {
8
+ super(...arguments), this.abi = r;
9
+ }
10
+ /**
11
+ * The set of authorized signers
12
+ *
13
+ * @public
14
+ * @async
15
+ * @param {Address} address
16
+ * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]
17
+ * @returns {unknown}
18
+ */
19
+ async signers(f, b) {
20
+ return await u(this._config, {
21
+ address: this.assertValidAddress(),
22
+ args: [f],
23
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
24
+ ...b
25
+ });
26
+ }
27
+ /**
28
+ * Retrieve the hash and signer data for a given hash
29
+ *
30
+ * @public
31
+ * @async
32
+ * @param {SignerValidatorSignaturePayload} payload
33
+ * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]
34
+ * @returns {unknown}
35
+ */
36
+ async hashSignerData(f, b) {
37
+ return await h(this._config, {
38
+ address: this.assertValidAddress(),
39
+ args: [
40
+ f.boostId,
41
+ f.incentiveQuantity,
42
+ f.claimant,
43
+ f.incentiveData
44
+ ],
45
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
46
+ ...b
47
+ });
48
+ }
49
+ /**
50
+ * 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.
51
+ *
52
+ * @public
53
+ * @async
54
+ * @param {SignerValidatorValidatePayload} payload
55
+ * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
56
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
57
+ */
58
+ async validate(f, b) {
59
+ return await this.awaitResult(this.validateRaw(f, b));
60
+ }
61
+ /**
62
+ * 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.
63
+ *
64
+ * @public
65
+ * @async
66
+ * @param {SignerValidatorValidatePayload} payload
67
+ * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
68
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
69
+ */
70
+ async validateRaw(f, b) {
71
+ const { request: a, result: e } = await y(
72
+ this._config,
73
+ {
74
+ address: this.assertValidAddress(),
75
+ args: [
76
+ f.boostId,
77
+ f.incentiveId,
78
+ f.claimant,
79
+ f.claimData
80
+ ],
81
+ ...this.optionallyAttachAccount(),
82
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
83
+ ...b
84
+ }
85
+ );
86
+ return { hash: await m(this._config, a), result: e };
87
+ }
88
+ /**
89
+ * Set the authorized status of a signer
90
+ *
91
+ * @public
92
+ * @async
93
+ * @param {Address[]} addresses - The list of signers to update
94
+ * @param {boolean[]} allowed - The authorized status of each signer
95
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
96
+ * @returns {unknown}
97
+ */
98
+ async setAuthorized(f, b, a) {
99
+ return await this.awaitResult(
100
+ this.setAuthorizedRaw(f, b, a)
101
+ );
102
+ }
103
+ /**
104
+ * Set the authorized status of a signer
105
+ *
106
+ * @public
107
+ * @async
108
+ * @param {Address[]} addresses - The list of signers to update
109
+ * @param {boolean[]} allowed - The authorized status of each signer
110
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
111
+ * @returns {unknown}
112
+ */
113
+ async setAuthorizedRaw(f, b, a) {
114
+ const { request: e, result: d } = await p(
115
+ this._config,
116
+ {
117
+ address: this.assertValidAddress(),
118
+ args: [f, b],
119
+ ...this.optionallyAttachAccount(),
120
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
121
+ ...a
122
+ }
123
+ );
124
+ return { hash: await g(this._config, e), result: d };
125
+ }
126
+ /**
127
+ * Update the authorized caller of the validator function
128
+ *
129
+ * @public
130
+ * @async
131
+ * @param {Address} address
132
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
133
+ * @returns {unknown}
134
+ */
135
+ async setValidatorCallerRaw(f, b) {
136
+ const { request: a, result: e } = await w(
137
+ this._config,
138
+ {
139
+ address: this.assertValidAddress(),
140
+ args: [f],
141
+ ...this.optionallyAttachAccount(),
142
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
143
+ ...b
144
+ }
145
+ );
146
+ return { hash: await A(
147
+ this._config,
148
+ a
149
+ ), result: e };
150
+ }
151
+ /**
152
+ * Update the authorized caller of the validator function
153
+ *
154
+ * @public
155
+ * @async
156
+ * @param {Address} address
157
+ * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
158
+ * @returns {unknown}
159
+ */
160
+ async setValidatorCaller(f, b) {
161
+ return await this.awaitResult(this.setValidatorCallerRaw(f, b));
162
+ }
163
+ /**
164
+ * Properly encodes the data needed to claim
165
+ *
166
+ * @public
167
+ * @async
168
+ * @param {SignerValidatorClaimDataParams} params
169
+ * @returns {Promise<Hex>}
170
+ */
171
+ async encodeClaimData(f) {
172
+ return await C({
173
+ ...f,
174
+ validator: this.assertValidAddress()
175
+ });
176
+ }
177
+ /**
178
+ * @inheritdoc
179
+ *
180
+ * @public
181
+ * @param {?SignerValidatorPayload} [_payload]
182
+ * @param {?DeployableOptions} [_options]
183
+ * @returns {GenericDeployableParams}
184
+ */
185
+ buildParameters(f, b) {
186
+ const [a, e] = this.validateDeploymentConfig(
187
+ f,
188
+ b
189
+ );
190
+ return {
191
+ abi: r,
192
+ bytecode: R,
193
+ args: [P(a)],
194
+ ...this.optionallyAttachAccount(e.account)
195
+ };
196
+ }
197
+ };
198
+ t.base = "0x9d08826e771BD939088d5eAc28E0c8864dcb98cf", t.registryType = V.VALIDATOR;
199
+ let n = t;
200
+ async function C({
201
+ signer: c,
202
+ incentiveData: f,
203
+ chainId: b,
204
+ validator: a,
205
+ incentiveQuantity: e,
206
+ claimant: d,
207
+ boostId: i
208
+ }) {
209
+ const o = await D({
210
+ ...{
211
+ domain: {
212
+ name: "SignerValidator",
213
+ version: "1",
214
+ chainId: b,
215
+ verifyingContract: a
216
+ },
217
+ types: {
218
+ SignerValidatorData: [
219
+ { name: "boostId", type: "uint256" },
220
+ { name: "incentiveQuantity", type: "uint8" },
221
+ { name: "claimant", type: "address" },
222
+ { name: "incentiveData", type: "bytes" }
223
+ ]
224
+ },
225
+ primaryType: "SignerValidatorData",
226
+ message: {
227
+ boostId: i,
228
+ incentiveQuantity: e,
229
+ claimant: d,
230
+ incentiveData: f
231
+ }
232
+ },
233
+ privateKey: c.key
234
+ }), l = N({
235
+ signer: c.account,
236
+ signature: o,
237
+ incentiveQuantity: e
238
+ // Adjust incentive quantity as necessary
239
+ });
240
+ return s(
241
+ [
242
+ {
243
+ type: "tuple",
244
+ name: "BoostClaimData",
245
+ components: [
246
+ { type: "bytes", name: "validatorData" },
247
+ { type: "bytes", name: "incentiveData" }
248
+ ]
249
+ }
250
+ ],
251
+ [{ validatorData: l, incentiveData: f }]
252
+ );
253
+ }
254
+ function N({
255
+ signer: c,
256
+ signature: f,
257
+ incentiveQuantity: b
258
+ }) {
259
+ return s(
260
+ [
261
+ {
262
+ type: "tuple",
263
+ name: "SignerValidatorInputParams",
264
+ components: [
265
+ { type: "address", name: "signer" },
266
+ { type: "bytes", name: "signature" },
267
+ { type: "uint8", name: "incentiveQuantity" }
268
+ ]
269
+ }
270
+ ],
271
+ [{ signer: c, signature: f, incentiveQuantity: b }]
272
+ );
273
+ }
274
+ function P({
275
+ signers: c,
276
+ validatorCaller: f
277
+ }) {
278
+ return s(
279
+ [
280
+ { type: "address[]", name: "signers" },
281
+ { type: "address", name: "validatorCaller" }
282
+ ],
283
+ [c, f]
284
+ );
285
+ }
286
+ export {
287
+ n as SignerValidator,
288
+ C as prepareSignerValidatorClaimDataPayload,
289
+ N as prepareSignerValidatorInputParams,
290
+ P as prepareSignerValidatorPayload,
291
+ r as signerValidatorAbi
292
+ };
293
+ //# sourceMappingURL=SignerValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignerValidator.js","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { signTypedData } from 'viem/accounts';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIGNER_VALIDATOR_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]\n * @returns {unknown}\n */\n public async signers(\n address: Address,\n params?: ReadParams<typeof signerValidatorAbi, 'signers'>,\n ) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]\n * @returns {unknown}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * 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.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * 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.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCallerRaw(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCaller(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const domain = {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n };\n const typedData = {\n domain,\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n };\n\n const trustedSignature = await signTypedData({\n ...typedData,\n privateKey: signer.key,\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","signTypedData","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":";;;;;4rhBAmSaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,QACXC,GACAC,GACA;AACO,WAAA,MAAMC,EAA2B,KAAK,SAAS;AAAA,MACpD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,CAAO;AAAA;AAAA,MAEd,GAAIC;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,eACXE,GACAF,GACA;AACO,WAAA,MAAMG,EAAkC,KAAK,SAAS;AAAA,MAC3D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM;AAAA,QACJD,EAAQ;AAAA,QACRA,EAAQ;AAAA,QACRA,EAAQ;AAAA,QACRA,EAAQ;AAAA,MACV;AAAA;AAAA,MAEA,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,SACdE,GACAF,GACA;AACA,WAAO,MAAM,KAAK,YAAY,KAAK,YAAYE,GAASF,CAAM,CAAC;AAAA,EACjE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAgB,YACdE,GACAF,GACA;AACA,UAAM,EAAE,SAAAI,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM;AAAA,UACJJ,EAAQ;AAAA,UACRA,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AAE,MAAM,WAAW,MAAM,kBAAkB;AAAA,IAC7C;AAAA,IACA,CAACE,GAASC,CAAe;AAAA,EAAA;AAE7B;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-wKBNvm48.cjs"),c=require("../componentInterfaces-CKCBwG16.cjs"),d=require("@wagmi/core"),s=require("../errors.cjs"),a=require("./SignerValidator.cjs"),e={[c.ASignerValidator]:a.SignerValidator};async function l(r,t){const n=await d.readContract(r.config,{abi:i.re,functionName:"getComponentInterface",address:t}),o=e[n];if(!o)throw new s.InvalidComponentInterfaceError(Object.keys(e),n);return new o(r,t)}exports.SignerValidator=a.SignerValidator;exports.ValidatorByComponentInterface=e;exports.validatorFromAddress=l;
2
+ //# sourceMappingURL=Validator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validator.cjs","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {unknown}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"qQAuBaA,EAAgC,CAC3C,CAACC,EAAuB,gBAAA,EAAGC,EAAA,eAC7B,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,GACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA8BM,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA6B,EACzCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
@@ -0,0 +1,31 @@
1
+ import type { Address } from 'viem';
2
+ import type { DeployableOptions } from '../Deployable/Deployable';
3
+ import { SignerValidator } from './SignerValidator';
4
+ export { SignerValidator };
5
+ /**
6
+ * A union type representing all valid protocol Validator implementations
7
+ *
8
+ * @export
9
+ * @typedef {Validator}
10
+ */
11
+ export type Validator = SignerValidator;
12
+ /**
13
+ * A map of Validator component interfaces to their constructors.
14
+ *
15
+ * @type {{ "0xd8725ea2": typeof SignerValidator; }}
16
+ */
17
+ export declare const ValidatorByComponentInterface: {
18
+ [x: string]: typeof SignerValidator;
19
+ };
20
+ /**
21
+ * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
22
+ *
23
+ * @export
24
+ * @async
25
+ * @param {DeployableOptions} options
26
+ * @param {Address} address
27
+ * @returns {unknown}
28
+ * @throws {@link InvalidComponentInterfaceError}
29
+ */
30
+ export declare function validatorFromAddress(options: DeployableOptions, address: Address): Promise<SignerValidator>;
31
+ //# sourceMappingURL=Validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../src/Validators/Validator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,4BAejB"}
@@ -0,0 +1,27 @@
1
+ import { r as a } from "../generated-BDeDiaCK.js";
2
+ import { d as i } from "../componentInterfaces-DYkaxBda.js";
3
+ import { readContract as m } from "@wagmi/core";
4
+ import { InvalidComponentInterfaceError as c } from "../errors.js";
5
+ import { SignerValidator as f } from "./SignerValidator.js";
6
+ const e = {
7
+ [i]: f
8
+ };
9
+ async function I(r, o) {
10
+ const t = await m(r.config, {
11
+ abi: a,
12
+ functionName: "getComponentInterface",
13
+ address: o
14
+ }), n = e[t];
15
+ if (!n)
16
+ throw new c(
17
+ Object.keys(e),
18
+ t
19
+ );
20
+ return new n(r, o);
21
+ }
22
+ export {
23
+ f as SignerValidator,
24
+ e as ValidatorByComponentInterface,
25
+ I as validatorFromAddress
26
+ };
27
+ //# sourceMappingURL=Validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Validator.js","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {unknown}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;AAuBO,MAAMA,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAC7B;AAYsB,eAAAC,EACpBC,GACAC,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaH,EAAQ,QAAQ;AAAA,IACtD,KAAKI;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,EAAA,CACD,GACKI,IAAOT,EAA8BM,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA6B;AAAA,MACzCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");var r=(e=>(e[e.POOL=0]="POOL",e[e.MINT=1]="MINT",e[e.RAFFLE=2]="RAFFLE",e))(r||{});const n=({target:e,data:o=a.zeroHash})=>a.encodeAbiParameters([{type:"address",name:"target"},{type:"bytes",name:"data"}],[e,o]);exports.StrategyType=r;exports.prepareClaimPayload=n;
2
+ //# sourceMappingURL=claiming.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claiming.cjs","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {*}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":"wGAQY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SAHUA,IAAAA,GAAA,CAAA,CAAA,EAoCL,MAAMC,EAAsB,CAAC,CAClC,OAAAC,EACA,KAAAC,EAAOC,EAAA,QACT,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,QAAS,KAAM,MAAO,CAChC,EACA,CAACH,EAAQC,CAAI,CAAA"}
@@ -0,0 +1,43 @@
1
+ import { type Address, type Hex } from 'viem';
2
+ /**
3
+ * Enum representing incentive disbursement strategies.
4
+ *
5
+ * @export
6
+ * @enum {number}
7
+ */
8
+ export declare enum StrategyType {
9
+ POOL = 0,
10
+ MINT = 1,
11
+ RAFFLE = 2
12
+ }
13
+ /**
14
+ * The object representation of an `Incentive.ClaimPayload`
15
+ *
16
+ * @export
17
+ * @interface ClaimPayload
18
+ * @typedef {ClaimPayload}
19
+ */
20
+ export interface ClaimPayload {
21
+ /**
22
+ * The address of the recipient
23
+ *
24
+ * @type {Address}
25
+ */
26
+ target: Address;
27
+ /**
28
+ * The implementation-specific data for the claim, if needed
29
+ *
30
+ * @type {?Hex}
31
+ */
32
+ data?: Hex;
33
+ }
34
+ /**
35
+ * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.
36
+ *
37
+ * @param {ClaimPayload} param0
38
+ * @param {Address} param0.target - The address of the recipient
39
+ * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed
40
+ * @returns {*}
41
+ */
42
+ export declare const prepareClaimPayload: ({ target, data, }: ClaimPayload) => `0x${string}`;
43
+ //# sourceMappingURL=claiming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claiming.d.ts","sourceRoot":"","sources":["../src/claiming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAiC,MAAM,MAAM,CAAC;AAE7E;;;;;GAKG;AACH,oBAAY,YAAY;IACtB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,sBAG7B,YAAY,kBAQd,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { encodeAbiParameters as e, zeroHash as o } from "viem";
2
+ var m = /* @__PURE__ */ ((r) => (r[r.POOL = 0] = "POOL", r[r.MINT = 1] = "MINT", r[r.RAFFLE = 2] = "RAFFLE", r))(m || {});
3
+ const s = ({
4
+ target: r,
5
+ data: a = o
6
+ }) => e(
7
+ [
8
+ { type: "address", name: "target" },
9
+ { type: "bytes", name: "data" }
10
+ ],
11
+ [r, a]
12
+ );
13
+ export {
14
+ m as StrategyType,
15
+ s as prepareClaimPayload
16
+ };
17
+ //# sourceMappingURL=claiming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claiming.js","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {*}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":";AAQY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,SAAS,CAAT,IAAA,UAHUA,IAAAA,KAAA,CAAA,CAAA;AAoCL,MAAMC,IAAsB,CAAC;AAAA,EAClC,QAAAC;AAAA,EACA,MAAAC,IAAOC;AACT,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,SAAS,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,CAACH,GAAQC,CAAI;AAAA;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e="0xa39e44d9",n="0x8c901437",t="0x6060409d",i="0x7687b0ed",c="0xa0109882",A="0xc5b24b8e",o="0xb8ce7b22",s="0x8ba1fc24",a="0x3d30a22c";exports.ACGDAIncentive=e;exports.AERC20Incentive=n;exports.AERC20VariableIncentive=t;exports.AEventAction=i;exports.AManagedBudget=c;exports.APointsIncentive=A;exports.ASignerValidator=o;exports.ASimpleAllowList=s;exports.ASimpleDenyList=a;
2
+ //# sourceMappingURL=componentInterfaces-CKCBwG16.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-CKCBwG16.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ const n = "0xa39e44d9", e = "0x8c901437", s = "0x6060409d", t = "0x7687b0ed", a = "0xa0109882", c = "0xc5b24b8e", o = "0xb8ce7b22", i = "0x8ba1fc24", A = "0x3d30a22c";
2
+ export {
3
+ t as A,
4
+ i as a,
5
+ A as b,
6
+ a as c,
7
+ o as d,
8
+ c as e,
9
+ e as f,
10
+ n as g,
11
+ s as h
12
+ };
13
+ //# sourceMappingURL=componentInterfaces-DYkaxBda.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-DYkaxBda.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class y extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class v extends Error{constructor(r,t){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:t}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=t}}class m extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class b extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class g extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class h extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class x extends Error{constructor(){super("Must supply at least one action step")}}class f extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class o extends Error{constructor(r,{fieldValue:t,criteria:s,log:n}){super(r),this.fieldValue=t,this.criteria=s,this.log=n}}class C extends o{constructor(r){super("Field value is undefined",r)}}class A extends o{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class I extends o{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class w extends o{constructor(r){super("Invalid FilterType provided",r)}}exports.BoostCoreNoIdentifierEmitted=i;exports.BudgetMustAuthorizeBoostCore=b;exports.ContractAddressRequiredError=d;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.EventActionValidationError=o;exports.FieldValueNotComparableError=I;exports.FieldValueUndefinedError=C;exports.IncentiveNotCloneableError=h;exports.InvalidComponentInterfaceError=v;exports.InvalidNumericalCriteriaError=A;exports.MustInitializeBudgetError=g;exports.NoContractAddressUponReceiptError=y;exports.NoEventActionStepsProvidedError=x;exports.TooManyEventActionStepsProvidedError=f;exports.UnknownTransferPayloadSupplied=m;exports.UnrecognizedFilterTypeError=w;
2
+ //# sourceMappingURL=errors.cjs.map