@boostxyz/sdk 8.0.0-canary.3 → 8.0.0-canary.4

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 (161) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +2 -2
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.js +45 -45
  5. package/dist/{AllowList-DQf-8HQC.js → AllowList-CTRuUBCQ.js} +41 -41
  6. package/dist/{AllowList-DQf-8HQC.js.map → AllowList-CTRuUBCQ.js.map} +1 -1
  7. package/dist/{AllowList-DaX239DR.cjs → AllowList-GEmUfOR1.cjs} +2 -2
  8. package/dist/{AllowList-DaX239DR.cjs.map → AllowList-GEmUfOR1.cjs.map} +1 -1
  9. package/dist/AllowLists/AllowList.cjs +1 -1
  10. package/dist/AllowLists/AllowList.js +4 -4
  11. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  12. package/dist/AllowLists/SimpleAllowList.js +7 -7
  13. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  14. package/dist/AllowLists/SimpleDenyList.js +3 -3
  15. package/dist/Auth/PassthroughAuth.cjs +1 -1
  16. package/dist/Auth/PassthroughAuth.js +2 -2
  17. package/dist/BoostCore.cjs +2 -2
  18. package/dist/BoostCore.cjs.map +1 -1
  19. package/dist/BoostCore.d.ts +137 -2
  20. package/dist/BoostCore.d.ts.map +1 -1
  21. package/dist/BoostCore.js +336 -206
  22. package/dist/BoostCore.js.map +1 -1
  23. package/dist/BoostRegistry.cjs +1 -1
  24. package/dist/BoostRegistry.js +21 -21
  25. package/dist/{Budget-LnAQ_Slw.js → Budget-BH0s7Bxu.js} +52 -52
  26. package/dist/{Budget-LnAQ_Slw.js.map → Budget-BH0s7Bxu.js.map} +1 -1
  27. package/dist/{Budget-WIB8IJoM.cjs → Budget-CwNhsa3m.cjs} +2 -2
  28. package/dist/{Budget-WIB8IJoM.cjs.map → Budget-CwNhsa3m.cjs.map} +1 -1
  29. package/dist/Budgets/Budget.cjs +1 -1
  30. package/dist/Budgets/Budget.js +3 -3
  31. package/dist/Budgets/ManagedBudget.cjs +1 -1
  32. package/dist/Budgets/ManagedBudget.js +26 -26
  33. package/dist/Deployable/DeployableTarget.cjs +1 -1
  34. package/dist/Deployable/DeployableTarget.js +1 -1
  35. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  36. package/dist/Deployable/DeployableTargetWithRBAC.js +17 -17
  37. package/dist/{Incentive-gT7z-4v3.cjs → Incentive-B2ZBE5LU.cjs} +2 -2
  38. package/dist/{Incentive-gT7z-4v3.cjs.map → Incentive-B2ZBE5LU.cjs.map} +1 -1
  39. package/dist/{Incentive-D_IBex5V.js → Incentive-BCSV7OtF.js} +41 -41
  40. package/dist/{Incentive-D_IBex5V.js.map → Incentive-BCSV7OtF.js.map} +1 -1
  41. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  42. package/dist/Incentives/AllowListIncentive.js +17 -17
  43. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  44. package/dist/Incentives/CGDAIncentive.js +14 -14
  45. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  46. package/dist/Incentives/ERC20Incentive.js +13 -13
  47. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  48. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +71 -71
  49. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  50. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +35 -35
  51. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  52. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +9 -9
  53. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  54. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +12 -12
  55. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  56. package/dist/Incentives/ERC20VariableIncentive.js +8 -8
  57. package/dist/Incentives/Incentive.cjs +1 -1
  58. package/dist/Incentives/Incentive.js +3 -3
  59. package/dist/Incentives/PointsIncentive.cjs +1 -1
  60. package/dist/Incentives/PointsIncentive.js +28 -28
  61. package/dist/{SimpleDenyList-D5AoBdVi.cjs → SimpleDenyList-6_sxnZB0.cjs} +2 -2
  62. package/dist/{SimpleDenyList-D5AoBdVi.cjs.map → SimpleDenyList-6_sxnZB0.cjs.map} +1 -1
  63. package/dist/{SimpleDenyList-CtdXM49y.js → SimpleDenyList-CrjjFnn5.js} +17 -17
  64. package/dist/{SimpleDenyList-CtdXM49y.js.map → SimpleDenyList-CrjjFnn5.js.map} +1 -1
  65. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  66. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  67. package/dist/Validators/LimitedSignerValidator.d.ts +9 -9
  68. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
  69. package/dist/Validators/LimitedSignerValidator.js +19 -19
  70. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  71. package/dist/Validators/LimitedSignerValidatorV2.cjs +2 -0
  72. package/dist/Validators/LimitedSignerValidatorV2.cjs.map +1 -0
  73. package/dist/Validators/LimitedSignerValidatorV2.d.ts +842 -0
  74. package/dist/Validators/LimitedSignerValidatorV2.d.ts.map +1 -0
  75. package/dist/Validators/LimitedSignerValidatorV2.js +301 -0
  76. package/dist/Validators/LimitedSignerValidatorV2.js.map +1 -0
  77. package/dist/Validators/PayableLimitedSignerValidator.cjs +2 -0
  78. package/dist/Validators/PayableLimitedSignerValidator.cjs.map +1 -0
  79. package/dist/Validators/PayableLimitedSignerValidator.d.ts.map +1 -1
  80. package/dist/{Validator-BEUqV28V.js → Validators/PayableLimitedSignerValidator.js} +56 -102
  81. package/dist/Validators/PayableLimitedSignerValidator.js.map +1 -0
  82. package/dist/Validators/PayableLimitedSignerValidatorV2.cjs +2 -0
  83. package/dist/Validators/PayableLimitedSignerValidatorV2.cjs.map +1 -0
  84. package/dist/Validators/PayableLimitedSignerValidatorV2.d.ts +855 -0
  85. package/dist/Validators/PayableLimitedSignerValidatorV2.d.ts.map +1 -0
  86. package/dist/Validators/PayableLimitedSignerValidatorV2.js +372 -0
  87. package/dist/Validators/PayableLimitedSignerValidatorV2.js.map +1 -0
  88. package/dist/Validators/SignerValidator.cjs +1 -1
  89. package/dist/Validators/SignerValidator.cjs.map +1 -1
  90. package/dist/Validators/SignerValidator.d.ts +4 -2
  91. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  92. package/dist/Validators/SignerValidator.js +12 -12
  93. package/dist/Validators/SignerValidator.js.map +1 -1
  94. package/dist/Validators/SignerValidatorV2.cjs +2 -0
  95. package/dist/Validators/SignerValidatorV2.cjs.map +1 -0
  96. package/dist/Validators/SignerValidatorV2.d.ts +728 -0
  97. package/dist/Validators/SignerValidatorV2.d.ts.map +1 -0
  98. package/dist/Validators/SignerValidatorV2.js +299 -0
  99. package/dist/Validators/SignerValidatorV2.js.map +1 -0
  100. package/dist/Validators/Validator.cjs +1 -1
  101. package/dist/Validators/Validator.cjs.map +1 -1
  102. package/dist/Validators/Validator.d.ts +19 -4
  103. package/dist/Validators/Validator.d.ts.map +1 -1
  104. package/dist/Validators/Validator.js +79 -14
  105. package/dist/Validators/Validator.js.map +1 -1
  106. package/dist/componentInterfaces-43ygGrVO.js +28 -0
  107. package/dist/componentInterfaces-43ygGrVO.js.map +1 -0
  108. package/dist/componentInterfaces-JU4NBkEc.cjs +2 -0
  109. package/dist/componentInterfaces-JU4NBkEc.cjs.map +1 -0
  110. package/dist/{deployments-Dw5Suk_D.js → deployments-COm00j8v.js} +48 -39
  111. package/dist/{deployments-Dw5Suk_D.js.map → deployments-COm00j8v.js.map} +1 -1
  112. package/dist/deployments-uLDgrxCp.cjs +2 -0
  113. package/dist/deployments-uLDgrxCp.cjs.map +1 -0
  114. package/dist/deployments.json +30 -21
  115. package/dist/generated-CkZm1EVH.cjs +3 -0
  116. package/dist/generated-CkZm1EVH.cjs.map +1 -0
  117. package/dist/{generated-krkFnwbV.js → generated-DRbljODL.js} +2314 -1284
  118. package/dist/generated-DRbljODL.js.map +1 -0
  119. package/dist/index.cjs +1 -1
  120. package/dist/index.d.ts +3 -0
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +185 -165
  123. package/dist/index.js.map +1 -1
  124. package/package.json +25 -1
  125. package/src/BoostCore.test.ts +77 -11
  126. package/src/BoostCore.ts +165 -4
  127. package/src/Budgets/ManagedBudgetWithFees.test.ts +14 -14
  128. package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +3 -3
  129. package/src/Incentives/AllowListIncentive.test.ts +5 -5
  130. package/src/Incentives/CGDAIncentive.test.ts +6 -6
  131. package/src/Incentives/ERC1155Incentive.test.ts +2 -2
  132. package/src/Incentives/ERC20Incentive.test.ts +6 -6
  133. package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.test.ts +5 -5
  134. package/src/Incentives/ERC20VariableCriteriaIncentiveV2.test.ts +5 -5
  135. package/src/Incentives/ERC20VariableIncentive.test.ts +7 -8
  136. package/src/Incentives/PointsIncentive.test.ts +5 -5
  137. package/src/Validators/LimitedSignerValidator.test.ts +1 -1
  138. package/src/Validators/LimitedSignerValidator.ts +9 -10
  139. package/src/Validators/LimitedSignerValidatorV2.test.ts +231 -0
  140. package/src/Validators/LimitedSignerValidatorV2.ts +707 -0
  141. package/src/Validators/PayableLimitedSignerValidator.test.ts +1 -1
  142. package/src/Validators/PayableLimitedSignerValidator.ts +0 -1
  143. package/src/Validators/PayableLimitedSignerValidatorV2.test.ts +202 -0
  144. package/src/Validators/PayableLimitedSignerValidatorV2.ts +688 -0
  145. package/src/Validators/SignerValidator.ts +4 -2
  146. package/src/Validators/SignerValidatorV2.test.ts +163 -0
  147. package/src/Validators/SignerValidatorV2.ts +635 -0
  148. package/src/Validators/Validator.ts +45 -2
  149. package/src/index.ts +3 -0
  150. package/dist/Validator-BEUqV28V.js.map +0 -1
  151. package/dist/Validator-FxcxYKhR.cjs +0 -2
  152. package/dist/Validator-FxcxYKhR.cjs.map +0 -1
  153. package/dist/componentInterfaces-BZ3fSNkT.cjs +0 -2
  154. package/dist/componentInterfaces-BZ3fSNkT.cjs.map +0 -1
  155. package/dist/componentInterfaces-D2s6AXlV.js +0 -25
  156. package/dist/componentInterfaces-D2s6AXlV.js.map +0 -1
  157. package/dist/deployments-DimWVnA4.cjs +0 -2
  158. package/dist/deployments-DimWVnA4.cjs.map +0 -1
  159. package/dist/generated-Cf82M-QP.cjs +0 -3
  160. package/dist/generated-Cf82M-QP.cjs.map +0 -1
  161. package/dist/generated-krkFnwbV.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignerValidatorV2.d.ts","sourceRoot":"","sources":["../../src/Validators/SignerValidatorV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,oBAAoB,EAOrB,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,oBAAoB,EAAE,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;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OtB;;;;;;;;;OASG;IACU,gBAAgB,CAC3B,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,WAAW;;;;IAmBtB;;;;;;;;OAQG;IACU,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,WAAW;;;;IAgBzE;;;;;;;;OAQG;IACU,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,WAAW;IAItE;;;;;;;OAOG;IACU,eAAe,CAC1B,MAAM,EAAE,IAAI,CAAC,gCAAgC,EAAE,WAAW,CAAC,GAC1D,OAAO,CAAC,GAAG,CAAC;IAOf;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,wBAAwB,EACnC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,wCAAwC,CAAC,EAC7D,MAAM,EACN,aAAa,EACb,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,gCAAgC,GAAG,OAAO,CAAC,GAAG,CAAC,CAmDjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CAAC,EAClD,MAAM,EACN,SAAS,EACT,iBAAiB,GAClB,EAAE,4BAA4B,iBAe9B;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,OAAO,EACP,eAAe,GAChB,EAAE,wBAAwB,iBAQ1B"}
@@ -0,0 +1,299 @@
1
+ import { J as o, cw as m, cx as p, cy as g, cz as A, cA as D, cB as V, cC as w, cD as R } from "../generated-DRbljODL.js";
2
+ import { encodeAbiParameters as r } from "viem";
3
+ import { i as E } from "../deployments-COm00j8v.js";
4
+ import { DeployableTarget as S } from "../Deployable/DeployableTarget.js";
5
+ import { RegistryType as T } from "../utils.js";
6
+ const C = "0x610120604052348015610010575f80fd5b50306080524660a0525f60c081905260e081905261010052610030610035565b61009a565b63409feecd19805460018116156100535763f92ee8a95f526004601cfd5b6001600160401b03808260011c14610095578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60805160a05160c05160e0516101005161170b6100c85f395f50505f50505f50505f50505f505061170b5ff3fe608060405260043610610109575f3560e01c8063703b6900116100a15780638da5cb5b11610071578063f04e283e11610057578063f04e283e14610325578063f2fde38b14610338578063fee81cf41461034b575f80fd5b80638da5cb5b146102b3578063a1d2756f14610306575f80fd5b8063703b690014610243578063715018a614610256578063736c0d5b1461025e57806384b0196e1461028c575f80fd5b80634359d28a116100dc5780634359d28a146101d0578063439fab91146101ef57806354d1f13d1461020e578063637d7cbe14610216575f80fd5b806301ffc9a71461010d578063256929621461014157806328d6183b1461014b578063394ff18114610185575b5f80fd5b348015610118575f80fd5b5061012c610127366004610f3a565b61037c565b60405190151581526020015b60405180910390f35b6101496103d7565b005b348015610156575f80fd5b506040517f81818aa3000000000000000000000000000000000000000000000000000000008152602001610138565b348015610190575f80fd5b50604080518082018252601281527f415369676e657256616c696461746f7256320000000000000000000000000000602082015290516101389190610fc5565b3480156101db575f80fd5b506101496101ea36600461101f565b610424565b3480156101fa575f80fd5b506101496102093660046110c9565b610520565b6101496106f1565b348015610221575f80fd5b50610235610230366004611273565b61072a565b604051908152602001610138565b61012c6102513660046112ef565b6107c9565b61014961095a565b348015610269575f80fd5b5061012c610278366004611354565b5f6020819052908152604090205460ff1681565b348015610297575f80fd5b506102a061096d565b604051610138979695949392919061136f565b3480156102be575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b348015610311575f80fd5b50610149610320366004611354565b610a15565b610149610333366004611354565b610a64565b610149610346366004611354565b610aa1565b348015610356575f80fd5b50610235610365366004611354565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f81818aa30000000000000000000000000000000000000000000000000000000014806103d157506103d182610ac7565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b61042c610b1c565b828114610465576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610519578282828181106104815761048161142e565b9050602002016020810190610496919061145b565b5f808787858181106104aa576104aa61142e565b90506020020160208101906104bf9190611354565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610467565b5050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156105715760018160011c14303b106105685763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f806105808486018661148a565b915091506105a6825f815181106105995761059961142e565b6020026020010151610b51565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555f5b825181101561066b5760015f808584815181106106075761060761142e565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556001016105e8565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527fa1eda84b50d3bc4f86c643d02bc2906312a706347d360b68caa9c6c5f23c5f6d9060200160405180910390a1505080156106ec576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b8151602080840191909120604080517f8fb7610832fbad31db1c5a2a863d64e24447977c1c2eee76e29788abaf1cf3a593810193909352820187905260ff8616606083015273ffffffffffffffffffffffffffffffffffffffff808616608084015260a0830191909152821660c08201525f906107bf9060e00160405160208183030381529060405280519060200120610bb4565b9695505050505050565b6002545f9073ffffffffffffffffffffffffffffffffffffffff16331461081c576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61082983850185611551565b90505f815f0151806020019051810190610843919061160a565b90505f61085f898360400151898660200151876040015161072a565b905087826040015160ff16116108b75760408083015190517f17c66bc700000000000000000000000000000000000000000000000000000000815260ff90911660048201526024810189905260440160405180910390fd5b815173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff16610916576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109226001828a610be0565b6020820151825161094d9173ffffffffffffffffffffffffffffffffffffffff909116908390610c6e565b9998505050505050505050565b610962610b1c565b61096b5f610d72565b565b7f0f000000000000000000000000000000000000000000000000000000000000006060805f808083610a03604080518082018252601181527f5369676e657256616c696461746f7256320000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b97989097965046955030945091925090565b610a1d610b1c565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610a6c610b1c565b63389a75e1600c52805f526020600c208054421115610a9257636f5e88185f526004601cfd5b5f9055610a9e81610d72565b50565b610aa9610b1c565b8060601b610abe57637448fbae5f526004601cfd5b610a9e81610d72565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5912b89c0000000000000000000000000000000000000000000000000000000014806103d157506103d182610dd7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754331461096b576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f610bbd610e6d565b6719010000000000005f908152601a91909152603a928352604260182092525090565b7f3f57fc5c000000000000000000000000000000000000000000000000000000007f4de1225a000000000000000000000000000000000000000000000000000000006007831115610c3757815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001166001188015610c6457835f528560045260245ffd5b5090555050505050565b5f73ffffffffffffffffffffffffffffffffffffffff841615610d6b57604051843b610d2957825160408114610cac5760418114610ce65750610d69565b604084015160ff81901c601b016020527f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16606052610cf9565b60608401515f1a60205260408401516060525b50835f5260208301516040526020600160805f60015afa5180861860601b3d119250505f60605280604052610d69565b631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa905060208260443d01868b5afa9151911691141691505b505b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806103d157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146103d1565b5f805f80610edf604080518082018252601181527f5369676e657256616c696461746f7256320000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8152938401929092529082015246606082015230608082015260a09020949350505050565b5f60208284031215610f4a575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d6b575f80fd5b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610d6b6020830184610f79565b5f8083601f840112610fe7575f80fd5b50813567ffffffffffffffff811115610ffe575f80fd5b6020830191508360208260051b8501011115611018575f80fd5b9250929050565b5f805f8060408587031215611032575f80fd5b843567ffffffffffffffff811115611048575f80fd5b61105487828801610fd7565b909550935050602085013567ffffffffffffffff811115611073575f80fd5b61107f87828801610fd7565b95989497509550505050565b5f8083601f84011261109b575f80fd5b50813567ffffffffffffffff8111156110b2575f80fd5b602083019150836020828501011115611018575f80fd5b5f80602083850312156110da575f80fd5b823567ffffffffffffffff8111156110f0575f80fd5b6110fc8582860161108b565b90969095509350505050565b60ff81168114610a9e575f80fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a9e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff8111828210171561118757611187611137565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156111d4576111d4611137565b604052919050565b5f67ffffffffffffffff8211156111f5576111f5611137565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f82601f830112611230575f80fd5b813561124361123e826111dc565b61118d565b818152846020838601011115611257575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a08688031215611287575f80fd5b85359450602086013561129981611108565b935060408601356112a981611116565b9250606086013567ffffffffffffffff8111156112c4575f80fd5b6112d088828901611221565b92505060808601356112e181611116565b809150509295509295909350565b5f805f805f60808688031215611303575f80fd5b8535945060208601359350604086013561131c81611116565b9250606086013567ffffffffffffffff811115611337575f80fd5b6113438882890161108b565b969995985093965092949392505050565b5f60208284031215611364575f80fd5b8135610d6b81611116565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f6113a960e0830189610f79565b82810360408401526113bb8189610f79565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b8181101561141d5783518352602093840193909201916001016113ff565b50909b9a5050505050505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561146b575f80fd5b81358015158114610d6b575f80fd5b803561148581611116565b919050565b5f806040838503121561149b575f80fd5b823567ffffffffffffffff8111156114b1575f80fd5b8301601f810185136114c1575f80fd5b803567ffffffffffffffff8111156114db576114db611137565b8060051b6114eb6020820161118d565b91825260208184018101929081019088841115611506575f80fd5b6020850194505b83851015611534578435925061152283611116565b8282526020948501949091019061150d565b80965050505050506115486020840161147a565b90509250929050565b5f60208284031215611561575f80fd5b813567ffffffffffffffff811115611577575f80fd5b820160608185031215611588575f80fd5b611590611164565b813567ffffffffffffffff8111156115a6575f80fd5b6115b286828501611221565b825250602082013567ffffffffffffffff8111156115ce575f80fd5b6115da86828501611221565b602083015250604082013591506115f082611116565b60408101919091529392505050565b805161148581611108565b5f6020828403121561161a575f80fd5b815167ffffffffffffffff811115611630575f80fd5b820160608185031215611641575f80fd5b611649611164565b815161165481611116565b8152602082015167ffffffffffffffff81111561166f575f80fd5b8201601f8101861361167f575f80fd5b805161168d61123e826111dc565b8181528760208385010111156116a1575f80fd5b8160208401602083015e5f602083830101528060208501525050506116c8604083016115ff565b604082015294935050505056fea2646970667358221220455d64480c5cafd440e468ffe8876704de6e659df6eeb612d72ef42cfd0b6d4564736f6c634300081a0033", s = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, c = class c extends S {
7
+ constructor() {
8
+ super(...arguments), this.abi = o;
9
+ }
10
+ /**
11
+ * The set of authorized signers
12
+ *
13
+ * @public
14
+ * @async
15
+ * @param {Address} address
16
+ * @param {?ReadParams} [params]
17
+ * @returns {Promise<boolean>}
18
+ */
19
+ async signers(f, a) {
20
+ return await m(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
+ ...a
25
+ });
26
+ }
27
+ /**
28
+ * Retrieve the hash and signer data for a given hash
29
+ *
30
+ * @public
31
+ * @async
32
+ * @param {SignerValidatorV2SignaturePayload} payload
33
+ * @param {?ReadParams} [params]
34
+ * @returns {Promise<Hex>}
35
+ */
36
+ async hashSignerData(f, a) {
37
+ const b = f.referrer ?? f.claimant;
38
+ return await p(this._config, {
39
+ address: this.assertValidAddress(),
40
+ args: [
41
+ f.boostId,
42
+ f.incentiveQuantity,
43
+ f.claimant,
44
+ f.incentiveData,
45
+ b
46
+ ],
47
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
48
+ ...a
49
+ });
50
+ }
51
+ /**
52
+ * 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.
53
+ *
54
+ * @public
55
+ * @async
56
+ * @param {SignerValidatorV2ValidatePayload} payload
57
+ * @param {?WriteParams} [params]
58
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
59
+ */
60
+ async validate(f, a) {
61
+ return await this.awaitResult(this.validateRaw(f, a));
62
+ }
63
+ /**
64
+ * 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.
65
+ *
66
+ * @public
67
+ * @async
68
+ * @param {SignerValidatorV2ValidatePayload} payload
69
+ * @param {?WriteParams} [params]
70
+ * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
71
+ */
72
+ async validateRaw(f, a) {
73
+ const { request: b, result: e } = await g(
74
+ this._config,
75
+ {
76
+ address: this.assertValidAddress(),
77
+ args: [
78
+ f.boostId,
79
+ f.incentiveId,
80
+ f.claimant,
81
+ f.claimData
82
+ ],
83
+ ...this.optionallyAttachAccount(),
84
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
85
+ ...a
86
+ }
87
+ );
88
+ return { hash: await A(this._config, b), result: e };
89
+ }
90
+ /**
91
+ * Set the authorized status of a signer
92
+ *
93
+ * @public
94
+ * @async
95
+ * @param {Address[]} addresses - The list of signers to update
96
+ * @param {boolean[]} allowed - The authorized status of each signer
97
+ * @param {?WriteParams} [params]
98
+ * @returns {Promise<void>}
99
+ */
100
+ async setAuthorized(f, a, b) {
101
+ return await this.awaitResult(
102
+ this.setAuthorizedRaw(f, a, b)
103
+ );
104
+ }
105
+ /**
106
+ * Set the authorized status of a signer
107
+ *
108
+ * @public
109
+ * @async
110
+ * @param {Address[]} addresses - The list of signers to update
111
+ * @param {boolean[]} allowed - The authorized status of each signer
112
+ * @param {?WriteParams} [params]
113
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
114
+ */
115
+ async setAuthorizedRaw(f, a, b) {
116
+ const { request: e, result: t } = await D(
117
+ this._config,
118
+ {
119
+ address: this.assertValidAddress(),
120
+ args: [f, a],
121
+ ...this.optionallyAttachAccount(),
122
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
123
+ ...b
124
+ }
125
+ );
126
+ return { hash: await V(
127
+ this._config,
128
+ e
129
+ ), result: t };
130
+ }
131
+ /**
132
+ * Update the authorized caller of the validator function
133
+ *
134
+ * @public
135
+ * @async
136
+ * @param {Address} address
137
+ * @param {?WriteParams} [params]
138
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
139
+ */
140
+ async setValidatorCallerRaw(f, a) {
141
+ const { request: b, result: e } = await w(this._config, {
142
+ address: this.assertValidAddress(),
143
+ args: [f],
144
+ ...this.optionallyAttachAccount(),
145
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
146
+ ...a
147
+ });
148
+ return { hash: await R(
149
+ this._config,
150
+ b
151
+ ), result: e };
152
+ }
153
+ /**
154
+ * Update the authorized caller of the validator function
155
+ *
156
+ * @public
157
+ * @async
158
+ * @param {Address} address
159
+ * @param {?WriteParams} [params]
160
+ * @returns {Promise<void>}
161
+ */
162
+ async setValidatorCaller(f, a) {
163
+ return await this.awaitResult(this.setValidatorCallerRaw(f, a));
164
+ }
165
+ /**
166
+ * Properly encodes the data needed to claim
167
+ *
168
+ * @public
169
+ * @async
170
+ * @param {SignerValidatorV2ClaimDataParams} params
171
+ * @returns {Promise<Hex>}
172
+ */
173
+ async encodeClaimData(f) {
174
+ return await I({
175
+ ...f,
176
+ validator: this.assertValidAddress()
177
+ });
178
+ }
179
+ /**
180
+ * @inheritdoc
181
+ *
182
+ * @public
183
+ * @param {?SignerValidatorV2Payload} [_payload]
184
+ * @param {?DeployableOptions} [_options]
185
+ * @returns {GenericDeployableParams}
186
+ */
187
+ buildParameters(f, a) {
188
+ const [b, e] = this.validateDeploymentConfig(
189
+ f,
190
+ a
191
+ );
192
+ return {
193
+ abi: o,
194
+ bytecode: C,
195
+ args: [_(b)],
196
+ ...this.optionallyAttachAccount(e.account)
197
+ };
198
+ }
199
+ };
200
+ c.bases = {
201
+ ...s != null && s.VITE_SIGNER_VALIDATOR_BASE ? { 31337: void 0 } : {},
202
+ ...E
203
+ }, c.registryType = T.VALIDATOR;
204
+ let l = c;
205
+ async function I({
206
+ signer: d,
207
+ incentiveData: f,
208
+ chainId: a,
209
+ validator: b,
210
+ incentiveQuantity: e,
211
+ claimant: t,
212
+ boostId: i,
213
+ referrer: u
214
+ }) {
215
+ const n = u ?? t, h = await d.privateKey.signTypedData({
216
+ domain: {
217
+ name: "SignerValidatorV2",
218
+ version: "1",
219
+ chainId: a,
220
+ verifyingContract: b
221
+ },
222
+ types: {
223
+ SignerValidatorData: [
224
+ { name: "boostId", type: "uint256" },
225
+ { name: "incentiveQuantity", type: "uint8" },
226
+ { name: "claimant", type: "address" },
227
+ { name: "incentiveData", type: "bytes" },
228
+ { name: "referrer", type: "address" }
229
+ ]
230
+ },
231
+ primaryType: "SignerValidatorData",
232
+ message: {
233
+ boostId: i,
234
+ incentiveQuantity: e,
235
+ claimant: t,
236
+ incentiveData: f,
237
+ referrer: n
238
+ }
239
+ }), y = v({
240
+ signer: d.account,
241
+ signature: h,
242
+ incentiveQuantity: e
243
+ // Adjust incentive quantity as necessary
244
+ });
245
+ return r(
246
+ [
247
+ {
248
+ type: "tuple",
249
+ name: "BoostClaimDataWithReferrer",
250
+ components: [
251
+ { type: "bytes", name: "validatorData" },
252
+ { type: "bytes", name: "incentiveData" },
253
+ { type: "address", name: "referrer" }
254
+ ]
255
+ }
256
+ ],
257
+ [{ validatorData: y, incentiveData: f, referrer: n }]
258
+ );
259
+ }
260
+ function v({
261
+ signer: d,
262
+ signature: f,
263
+ incentiveQuantity: a
264
+ }) {
265
+ return r(
266
+ [
267
+ {
268
+ type: "tuple",
269
+ name: "SignerValidatorV2InputParams",
270
+ components: [
271
+ { type: "address", name: "signer" },
272
+ { type: "bytes", name: "signature" },
273
+ { type: "uint8", name: "incentiveQuantity" }
274
+ ]
275
+ }
276
+ ],
277
+ [{ signer: d, signature: f, incentiveQuantity: a }]
278
+ );
279
+ }
280
+ function _({
281
+ signers: d,
282
+ validatorCaller: f
283
+ }) {
284
+ return r(
285
+ [
286
+ { type: "address[]", name: "signers" },
287
+ { type: "address", name: "validatorCaller" }
288
+ ],
289
+ [d, f]
290
+ );
291
+ }
292
+ export {
293
+ l as SignerValidatorV2,
294
+ I as prepareSignerValidatorV2ClaimDataPayload,
295
+ v as prepareSignerValidatorV2InputParams,
296
+ _ as prepareSignerValidatorV2Payload,
297
+ o as signerValidatorV2Abi
298
+ };
299
+ //# sourceMappingURL=SignerValidatorV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignerValidatorV2.js","sources":["../../src/Validators/SignerValidatorV2.ts"],"sourcesContent":["import {\n readSignerValidatorV2HashSignerData,\n readSignerValidatorV2Signers,\n signerValidatorV2Abi,\n simulateSignerValidatorV2SetAuthorized,\n simulateSignerValidatorV2SetValidatorCaller,\n simulateSignerValidatorV2Validate,\n writeSignerValidatorV2SetAuthorized,\n writeSignerValidatorV2SetValidatorCaller,\n writeSignerValidatorV2Validate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidatorV2.sol/SignerValidatorV2.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { SignerValidatorV2 as SignerValidatorV2Bases } from '../../dist/deployments.json';\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 { signerValidatorV2Abi };\n\n/**\n * Object reprentation of a {@link SignerValidatorV2} initialization payload\n *\n * @export\n * @interface SignerValidatorV2Payload\n * @typedef {SignerValidatorV2Payload}\n */\nexport interface SignerValidatorV2Payload {\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 prepareSignerValidatorV2} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorV2ValidatePayload\n * @typedef {SignerValidatorV2ValidatePayload}\n */\nexport interface SignerValidatorV2ValidatePayload {\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 SignerValidatorV2ClaimDataParams\n * @typedef {SignerValidatorV2ClaimDataParams}\n */\nexport interface SignerValidatorV2ClaimDataParams {\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 total number of incentives on the Boost\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 * The address of the referrer\n *\n * @type {?Address}\n */\n referrer?: Address;\n}\n\n/**\n * Object representation of a {@link SignerValidatorV2InputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorV2InputParams\n * @typedef {SignerValidatorV2InputParams}\n */\nexport interface SignerValidatorV2InputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {Hex}\n */\n signature: Hex;\n\n /**\n * The total number of incentives on the Boost\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 SignerValidatorV2SignaturePayload\n * @typedef {SignerValidatorV2SignaturePayload}\n */\nexport interface SignerValidatorV2SignaturePayload {\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 * The address of the referrer (defaults to claimant if omitted)\n *\n * @type {?Address}\n */\n referrer?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorV2Log}\n * @template {ContractEventName<\n * typeof signerValidatorV2Abi\n * >} [event=ContractEventName<typeof signerValidatorV2Abi>]\n */\nexport type SignerValidatorV2Log<\n event extends ContractEventName<\n typeof signerValidatorV2Abi\n > = ContractEventName<typeof signerValidatorV2Abi>,\n> = GenericLog<typeof signerValidatorV2Abi, 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 SignerValidatorV2\n * @typedef {SignerValidatorV2}\n * @extends {DeployableTarget<SignerValidatorV2Payload>}\n */\nexport class SignerValidatorV2 extends DeployableTarget<\n SignerValidatorV2Payload,\n typeof signerValidatorV2Abi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorV2Abi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_SIGNER_VALIDATOR_BASE\n ? { 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE }\n : {}),\n ...(SignerValidatorV2Bases as Record<number, Address>),\n };\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} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(address: Address, params?: ReadParams) {\n return await readSignerValidatorV2Signers(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 {SignerValidatorV2SignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorV2SignaturePayload,\n params?: ReadParams,\n ) {\n const referrer = payload.referrer ?? payload.claimant;\n return await readSignerValidatorV2HashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n referrer,\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 {SignerValidatorV2ValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n public async validate(\n payload: SignerValidatorV2ValidatePayload,\n params?: WriteParams,\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 {SignerValidatorV2ValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n public async validateRaw(\n payload: SignerValidatorV2ValidatePayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorV2Validate(\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 writeSignerValidatorV2Validate(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} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\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} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorV2SetAuthorized(\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 writeSignerValidatorV2SetAuthorized(\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} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(address: Address, params?: WriteParams) {\n const { request, result } =\n await simulateSignerValidatorV2SetValidatorCaller(this._config, {\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 const hash = await writeSignerValidatorV2SetValidatorCaller(\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} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(address: Address, params?: WriteParams) {\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 {SignerValidatorV2ClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorV2ClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorV2ClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorV2Payload(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 {SignerValidatorV2ClaimDataParams} 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 prepareSignerValidatorV2ClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n referrer,\n}: SignerValidatorV2ClaimDataParams): Promise<Hex> {\n const _referrer = referrer ?? claimant;\n const trustedSignature = await signer.privateKey.signTypedData({\n domain: {\n name: 'SignerValidatorV2',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n },\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 { name: 'referrer', type: 'address' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData,\n referrer: _referrer,\n },\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorV2InputParams({\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: 'BoostClaimDataWithReferrer',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n { type: 'address', name: 'referrer' },\n ],\n },\n ],\n [{ validatorData, incentiveData, referrer: _referrer }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorV2InputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorV2InputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorV2InputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorV2InputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorV2InputParams',\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 SignerValidatorV2Payload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorV2Payload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorV2Payload({\n signers,\n validatorCaller,\n}: SignerValidatorV2Payload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidatorV2","DeployableTarget","signerValidatorV2Abi","address","params","readSignerValidatorV2Signers","payload","referrer","readSignerValidatorV2HashSignerData","request","result","simulateSignerValidatorV2Validate","writeSignerValidatorV2Validate","addresses","allowed","simulateSignerValidatorV2SetAuthorized","writeSignerValidatorV2SetAuthorized","simulateSignerValidatorV2SetValidatorCaller","writeSignerValidatorV2SetValidatorCaller","prepareSignerValidatorV2ClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorV2Payload","__vite_import_meta_env__","SignerValidatorV2Bases","RegistryType","SignerValidatorV2","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","_referrer","trustedSignature","validatorData","prepareSignerValidatorV2InputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":";;;;;upYAwPaA,IAAN,MAAMA,UAA0BC,EAGrC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgC/B,MAAa,QAAQC,GAAkBC,GAAqB;AACnD,WAAA,MAAMC,EAA6B,KAAK,SAAS;AAAA,MACtD,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;AACM,UAAAG,IAAWD,EAAQ,YAAYA,EAAQ;AACtC,WAAA,MAAME,EAAoC,KAAK,SAAS;AAAA,MAC7D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM;AAAA,QACJF,EAAQ;AAAA,QACRA,EAAQ;AAAA,QACRA,EAAQ;AAAA,QACRA,EAAQ;AAAA,QACRC;AAAA,MACF;AAAA;AAAA,MAEA,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,SACXE,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,MAAa,YACXE,GACAF,GACA;AACA,UAAM,EAAE,SAAAK,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK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SAAS,MAAM,oBAAoB;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,EAAE,QAAAX,GAAQ,WAAAY,GAAW,mBAAAR,GAAmB;AAAA,EAAA;AAE7C;AAUO,SAAST,EAAgC;AAAA,EAC9C,SAAAkB;AAAA,EACA,iBAAAC;AACF,GAA6B;AACpB,SAAAH;AAAA,IACL;AAAA,MACE,EAAE,MAAM,aAAa,MAAM,UAAU;AAAA,MACrC,EAAE,MAAM,WAAW,MAAM,kBAAkB;AAAA,IAC7C;AAAA,IACA,CAACE,GAASC,CAAe;AAAA,EAAA;AAE7B;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../generated-Cf82M-QP.cjs");require("../componentInterfaces-BZ3fSNkT.cjs");require("@wagmi/core");require("viem");require("../errors.cjs");const e=require("./LimitedSignerValidator.cjs"),r=require("../Validator-FxcxYKhR.cjs"),i=require("./SignerValidator.cjs");exports.LimitedSignerValidator=e.LimitedSignerValidator;exports.BoostValidatorEOA=r.BoostValidatorEOA;exports.ValidatorByComponentInterface=r.ValidatorByComponentInterface;exports.decodeClaimData=r.decodeClaimData;exports.validatorFromAddress=r.validatorFromAddress;exports.SignerValidator=i.SignerValidator;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../generated-CkZm1EVH.cjs"),a=require("../componentInterfaces-JU4NBkEc.cjs"),y=require("@wagmi/core"),n=require("viem"),b=require("../errors.cjs"),d=require("./LimitedSignerValidator.cjs"),l=require("./LimitedSignerValidatorV2.cjs"),V=require("./PayableLimitedSignerValidator.cjs"),m=require("./PayableLimitedSignerValidatorV2.cjs"),c=require("./SignerValidator.cjs"),s=require("./SignerValidatorV2.cjs"),i={[a.ASignerValidator]:c.SignerValidator,[a.ALimitedSignerValidator]:d.LimitedSignerValidator,[a.APayableLimitedSignerValidator]:V.PayableLimitedSignerValidator,[a.ASignerValidatorV2]:s.SignerValidatorV2,[a.ALimitedSignerValidatorV2]:l.LimitedSignerValidatorV2,[a.APayableLimitedSignerValidatorV2]:m.PayableLimitedSignerValidatorV2};async function u(e,t,g){const r=await y.readContract(e.config,{abi:S.Pe,functionName:"getComponentInterface",address:t,...g}),o=i[r];if(!o)throw new b.InvalidComponentInterfaceError(Object.keys(i),r);return new o(e,t)}const f={MAINNET:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",TESTNET:"0xd63167e9db11B108940b2E8236581F961f33f396"};function L(e){return n.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],e)[0]}function p(e){return n.decodeAbiParameters([{type:"tuple",name:"BoostClaimDataWithReferrer",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"},{type:"address",name:"referrer"}]}],e)[0]}exports.LimitedSignerValidator=d.LimitedSignerValidator;exports.LimitedSignerValidatorV2=l.LimitedSignerValidatorV2;exports.PayableLimitedSignerValidator=V.PayableLimitedSignerValidator;exports.PayableLimitedSignerValidatorV2=m.PayableLimitedSignerValidatorV2;exports.SignerValidator=c.SignerValidator;exports.SignerValidatorV2=s.SignerValidatorV2;exports.BoostValidatorEOA=f;exports.ValidatorByComponentInterface=i;exports.decodeClaimData=L;exports.decodeClaimDataWithReferrer=p;exports.validatorFromAddress=u;
2
2
  //# sourceMappingURL=Validator.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"Validator.cjs","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport {\n ALimitedSignerValidator,\n ALimitedSignerValidatorV2,\n APayableLimitedSignerValidator,\n APayableLimitedSignerValidatorV2,\n ASignerValidator,\n ASignerValidatorV2,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport { type Address, type Hex, decodeAbiParameters } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { LimitedSignerValidator } from './LimitedSignerValidator';\nimport { LimitedSignerValidatorV2 } from './LimitedSignerValidatorV2';\nimport { PayableLimitedSignerValidator } from './PayableLimitedSignerValidator';\nimport { PayableLimitedSignerValidatorV2 } from './PayableLimitedSignerValidatorV2';\nimport { SignerValidator } from './SignerValidator';\nimport { SignerValidatorV2 } from './SignerValidatorV2';\n\nexport {\n SignerValidator,\n LimitedSignerValidator,\n PayableLimitedSignerValidator,\n SignerValidatorV2,\n LimitedSignerValidatorV2,\n PayableLimitedSignerValidatorV2,\n};\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator =\n | SignerValidator\n | LimitedSignerValidator\n | PayableLimitedSignerValidator\n | SignerValidatorV2\n | LimitedSignerValidatorV2\n | PayableLimitedSignerValidatorV2;\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 [ALimitedSignerValidator as Hex]: LimitedSignerValidator,\n [APayableLimitedSignerValidator as Hex]: PayableLimitedSignerValidator,\n [ASignerValidatorV2 as Hex]: SignerValidatorV2,\n [ALimitedSignerValidatorV2 as Hex]: LimitedSignerValidatorV2,\n [APayableLimitedSignerValidatorV2 as Hex]: PayableLimitedSignerValidatorV2,\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 {Promise<Validator>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\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\n/**\n * An enum of verified Boost Validator EOA (Externally Owned Account) addresses used by the Boost protocol\n * for validating transactions on mainnet and testnet environments.\n *\n * @example\n * ```typescript\n * // Initialize a SignerValidator using the pre-configured EOA address of a verified Boost validator.\n * // If no validator is provided to core.createBoost(...), then this is what will be used by default.\n * const validator = core.SignerValidator({\n * signers: [BoostValidatorEOA.[TESTNET | MAINNET]],\n * validatorCaller: core.assertValidAddress()\n * })\n * ```\n * @enum {Address}\n */\nexport const BoostValidatorEOA = {\n MAINNET: import.meta.env.VITE_BOOST_MAINNET_SIGNER_EOA as Address,\n TESTNET: import.meta.env.VITE_BOOST_TESTNET_SIGNER_EOA as Address,\n};\n\n/**\n * Decodes a claim data hex string into its validator data and incentive data components.\n *\n * @export\n * @param {Hex} data - The hex-encoded claim data to decode\n * @returns {{ validatorData: Hex; incentiveData: Hex }} The decoded claim data components\n */\nexport function decodeClaimData(data: Hex) {\n return decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n data,\n )[0];\n}\n\n/**\n * Decodes a claim data hex string into its validator data, incentive data, and referrer components.\n *\n * @export\n * @param {Hex} data - The hex-encoded claim data to decode\n * @returns {{ validatorData: Hex; incentiveData: Hex, referrer: Address }} The decoded claim data components\n */\nexport function decodeClaimDataWithReferrer(data: Hex) {\n return decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimDataWithReferrer',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n { type: 'address', name: 'referrer' },\n ],\n },\n ],\n data,\n )[0];\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","ALimitedSignerValidator","LimitedSignerValidator","APayableLimitedSignerValidator","PayableLimitedSignerValidator","ASignerValidatorV2","SignerValidatorV2","ALimitedSignerValidatorV2","LimitedSignerValidatorV2","APayableLimitedSignerValidatorV2","PayableLimitedSignerValidatorV2","validatorFromAddress","options","address","params","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError","BoostValidatorEOA","decodeClaimData","data","decodeAbiParameters","decodeClaimDataWithReferrer"],"mappings":"sfAiDaA,EAAgC,CAC3C,CAACC,EAAuB,gBAAA,EAAGC,EAAA,gBAC3B,CAACC,EAA8B,uBAAA,EAAGC,EAAA,uBAClC,CAACC,EAAqC,8BAAA,EAAGC,EAAA,8BACzC,CAACC,EAAyB,kBAAA,EAAGC,EAAA,kBAC7B,CAACC,EAAgC,yBAAA,EAAGC,EAAA,yBACpC,CAACC,EAAuC,gCAAA,EAAGC,EAAA,+BAC7C,EAYsB,eAAAC,EACpBC,EACAC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaJ,EAAQ,OAAQ,CACtD,IAAKK,EAAA,GACL,aAAc,wBACd,QAAAJ,EACA,GAAGC,CAAA,CACJ,EACKI,EAAOpB,EAA8BiB,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKrB,CAA6B,EACzCiB,CAAA,EAGG,OAAA,IAAIG,EAAKN,EAASC,CAAO,CAClC,CAiBO,MAAMO,EAAoB,CAC/B,QAAS,6CACT,QAAS,4CACX,EASO,SAASC,EAAgBC,EAAW,CAClC,OAAAC,EAAA,oBACL,CACE,CACE,KAAM,QACN,KAAM,iBACN,WAAY,CACV,CAAE,KAAM,QAAS,KAAM,eAAgB,EACvC,CAAE,KAAM,QAAS,KAAM,eAAgB,CACzC,CACF,CACF,EACAD,GACA,CAAC,CACL,CASO,SAASE,EAA4BF,EAAW,CAC9C,OAAAC,EAAA,oBACL,CACE,CACE,KAAM,QACN,KAAM,6BACN,WAAY,CACV,CAAE,KAAM,QAAS,KAAM,eAAgB,EACvC,CAAE,KAAM,QAAS,KAAM,eAAgB,EACvC,CAAE,KAAM,UAAW,KAAM,UAAW,CACtC,CACF,CACF,EACAD,GACA,CAAC,CACL"}
@@ -2,23 +2,26 @@ import { type Address, type Hex } from 'viem';
2
2
  import type { DeployableOptions } from '../Deployable/Deployable';
3
3
  import type { ReadParams } from '../utils';
4
4
  import { LimitedSignerValidator } from './LimitedSignerValidator';
5
+ import { LimitedSignerValidatorV2 } from './LimitedSignerValidatorV2';
5
6
  import { PayableLimitedSignerValidator } from './PayableLimitedSignerValidator';
7
+ import { PayableLimitedSignerValidatorV2 } from './PayableLimitedSignerValidatorV2';
6
8
  import { SignerValidator } from './SignerValidator';
7
- export { SignerValidator, LimitedSignerValidator };
9
+ import { SignerValidatorV2 } from './SignerValidatorV2';
10
+ export { SignerValidator, LimitedSignerValidator, PayableLimitedSignerValidator, SignerValidatorV2, LimitedSignerValidatorV2, PayableLimitedSignerValidatorV2, };
8
11
  /**
9
12
  * A union type representing all valid protocol Validator implementations
10
13
  *
11
14
  * @export
12
15
  * @typedef {Validator}
13
16
  */
14
- export type Validator = SignerValidator | LimitedSignerValidator | PayableLimitedSignerValidator;
17
+ export type Validator = SignerValidator | LimitedSignerValidator | PayableLimitedSignerValidator | SignerValidatorV2 | LimitedSignerValidatorV2 | PayableLimitedSignerValidatorV2;
15
18
  /**
16
19
  * A map of Validator component interfaces to their constructors.
17
20
  *
18
21
  * @type {{ "0xd8725ea2": typeof SignerValidator; }}
19
22
  */
20
23
  export declare const ValidatorByComponentInterface: {
21
- [x: string]: typeof LimitedSignerValidator | typeof PayableLimitedSignerValidator | typeof SignerValidator;
24
+ [x: string]: typeof LimitedSignerValidator | typeof LimitedSignerValidatorV2 | typeof PayableLimitedSignerValidator | typeof PayableLimitedSignerValidatorV2 | typeof SignerValidator | typeof SignerValidatorV2;
22
25
  };
23
26
  /**
24
27
  * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
@@ -30,7 +33,7 @@ export declare const ValidatorByComponentInterface: {
30
33
  * @returns {Promise<Validator>}
31
34
  * @throws {@link InvalidComponentInterfaceError}
32
35
  */
33
- export declare function validatorFromAddress(options: DeployableOptions, address: Address, params?: ReadParams): Promise<LimitedSignerValidator | PayableLimitedSignerValidator | SignerValidator>;
36
+ export declare function validatorFromAddress(options: DeployableOptions, address: Address, params?: ReadParams): Promise<LimitedSignerValidator | LimitedSignerValidatorV2 | PayableLimitedSignerValidator | PayableLimitedSignerValidatorV2 | SignerValidator | SignerValidatorV2>;
34
37
  /**
35
38
  * An enum of verified Boost Validator EOA (Externally Owned Account) addresses used by the Boost protocol
36
39
  * for validating transactions on mainnet and testnet environments.
@@ -61,4 +64,16 @@ export declare function decodeClaimData(data: Hex): {
61
64
  validatorData: `0x${string}`;
62
65
  incentiveData: `0x${string}`;
63
66
  };
67
+ /**
68
+ * Decodes a claim data hex string into its validator data, incentive data, and referrer components.
69
+ *
70
+ * @export
71
+ * @param {Hex} data - The hex-encoded claim data to decode
72
+ * @returns {{ validatorData: Hex; incentiveData: Hex, referrer: Address }} The decoded claim data components
73
+ */
74
+ export declare function decodeClaimDataWithReferrer(data: Hex): {
75
+ validatorData: `0x${string}`;
76
+ incentiveData: `0x${string}`;
77
+ referrer: `0x${string}`;
78
+ };
64
79
  //# sourceMappingURL=Validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../src/Validators/Validator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAuB,MAAM,MAAM,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,6B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ACxB,+BAA+B,GAChC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,eAAe,GACf,sBAAsB,GACtB,6BAA6B,GAC7B,iBAAiB,GACjB,wBAAwB,GACxB,+BAA+B,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;CAOzC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,sKAgBpB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB;aAC8B,OAAO;aACP,OAAO;CAClE,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG;;;EAcxC;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,GAAG;;;;EAepD"}
@@ -1,17 +1,82 @@
1
- import "../generated-krkFnwbV.js";
2
- import "../componentInterfaces-D2s6AXlV.js";
3
- import "@wagmi/core";
4
- import "viem";
5
- import "../errors.js";
6
- import { LimitedSignerValidator as d } from "./LimitedSignerValidator.js";
7
- import { B as s, V as l, d as n, v as V } from "../Validator-BEUqV28V.js";
8
- import { SignerValidator as x } from "./SignerValidator.js";
1
+ import { a1 as m } from "../generated-DRbljODL.js";
2
+ import { a as d, b as f, c as l, d as p, e as c, f as s } from "../componentInterfaces-43ygGrVO.js";
3
+ import { readContract as V } from "@wagmi/core";
4
+ import { decodeAbiParameters as o } from "viem";
5
+ import { InvalidComponentInterfaceError as y } from "../errors.js";
6
+ import { LimitedSignerValidator as b } from "./LimitedSignerValidator.js";
7
+ import { LimitedSignerValidatorV2 as g } from "./LimitedSignerValidatorV2.js";
8
+ import { PayableLimitedSignerValidator as S } from "./PayableLimitedSignerValidator.js";
9
+ import { PayableLimitedSignerValidatorV2 as C } from "./PayableLimitedSignerValidatorV2.js";
10
+ import { SignerValidator as D } from "./SignerValidator.js";
11
+ import { SignerValidatorV2 as A } from "./SignerValidatorV2.js";
12
+ const i = {
13
+ [d]: D,
14
+ [f]: b,
15
+ [l]: S,
16
+ [p]: A,
17
+ [c]: g,
18
+ [s]: C
19
+ };
20
+ async function x(e, a, n) {
21
+ const t = await V(e.config, {
22
+ abi: m,
23
+ functionName: "getComponentInterface",
24
+ address: a,
25
+ ...n
26
+ }), r = i[t];
27
+ if (!r)
28
+ throw new y(
29
+ Object.keys(i),
30
+ t
31
+ );
32
+ return new r(e, a);
33
+ }
34
+ const F = {
35
+ MAINNET: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",
36
+ TESTNET: "0xd63167e9db11B108940b2E8236581F961f33f396"
37
+ };
38
+ function O(e) {
39
+ return o(
40
+ [
41
+ {
42
+ type: "tuple",
43
+ name: "BoostClaimData",
44
+ components: [
45
+ { type: "bytes", name: "validatorData" },
46
+ { type: "bytes", name: "incentiveData" }
47
+ ]
48
+ }
49
+ ],
50
+ e
51
+ )[0];
52
+ }
53
+ function R(e) {
54
+ return o(
55
+ [
56
+ {
57
+ type: "tuple",
58
+ name: "BoostClaimDataWithReferrer",
59
+ components: [
60
+ { type: "bytes", name: "validatorData" },
61
+ { type: "bytes", name: "incentiveData" },
62
+ { type: "address", name: "referrer" }
63
+ ]
64
+ }
65
+ ],
66
+ e
67
+ )[0];
68
+ }
9
69
  export {
10
- s as BoostValidatorEOA,
11
- d as LimitedSignerValidator,
12
- x as SignerValidator,
13
- l as ValidatorByComponentInterface,
14
- n as decodeClaimData,
15
- V as validatorFromAddress
70
+ F as BoostValidatorEOA,
71
+ b as LimitedSignerValidator,
72
+ g as LimitedSignerValidatorV2,
73
+ S as PayableLimitedSignerValidator,
74
+ C as PayableLimitedSignerValidatorV2,
75
+ D as SignerValidator,
76
+ A as SignerValidatorV2,
77
+ i as ValidatorByComponentInterface,
78
+ O as decodeClaimData,
79
+ R as decodeClaimDataWithReferrer,
80
+ x as validatorFromAddress
16
81
  };
17
82
  //# sourceMappingURL=Validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Validator.js","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport {\n ALimitedSignerValidator,\n ALimitedSignerValidatorV2,\n APayableLimitedSignerValidator,\n APayableLimitedSignerValidatorV2,\n ASignerValidator,\n ASignerValidatorV2,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport { type Address, type Hex, decodeAbiParameters } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { LimitedSignerValidator } from './LimitedSignerValidator';\nimport { LimitedSignerValidatorV2 } from './LimitedSignerValidatorV2';\nimport { PayableLimitedSignerValidator } from './PayableLimitedSignerValidator';\nimport { PayableLimitedSignerValidatorV2 } from './PayableLimitedSignerValidatorV2';\nimport { SignerValidator } from './SignerValidator';\nimport { SignerValidatorV2 } from './SignerValidatorV2';\n\nexport {\n SignerValidator,\n LimitedSignerValidator,\n PayableLimitedSignerValidator,\n SignerValidatorV2,\n LimitedSignerValidatorV2,\n PayableLimitedSignerValidatorV2,\n};\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator =\n | SignerValidator\n | LimitedSignerValidator\n | PayableLimitedSignerValidator\n | SignerValidatorV2\n | LimitedSignerValidatorV2\n | PayableLimitedSignerValidatorV2;\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 [ALimitedSignerValidator as Hex]: LimitedSignerValidator,\n [APayableLimitedSignerValidator as Hex]: PayableLimitedSignerValidator,\n [ASignerValidatorV2 as Hex]: SignerValidatorV2,\n [ALimitedSignerValidatorV2 as Hex]: LimitedSignerValidatorV2,\n [APayableLimitedSignerValidatorV2 as Hex]: PayableLimitedSignerValidatorV2,\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 {Promise<Validator>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\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\n/**\n * An enum of verified Boost Validator EOA (Externally Owned Account) addresses used by the Boost protocol\n * for validating transactions on mainnet and testnet environments.\n *\n * @example\n * ```typescript\n * // Initialize a SignerValidator using the pre-configured EOA address of a verified Boost validator.\n * // If no validator is provided to core.createBoost(...), then this is what will be used by default.\n * const validator = core.SignerValidator({\n * signers: [BoostValidatorEOA.[TESTNET | MAINNET]],\n * validatorCaller: core.assertValidAddress()\n * })\n * ```\n * @enum {Address}\n */\nexport const BoostValidatorEOA = {\n MAINNET: import.meta.env.VITE_BOOST_MAINNET_SIGNER_EOA as Address,\n TESTNET: import.meta.env.VITE_BOOST_TESTNET_SIGNER_EOA as Address,\n};\n\n/**\n * Decodes a claim data hex string into its validator data and incentive data components.\n *\n * @export\n * @param {Hex} data - The hex-encoded claim data to decode\n * @returns {{ validatorData: Hex; incentiveData: Hex }} The decoded claim data components\n */\nexport function decodeClaimData(data: Hex) {\n return decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n data,\n )[0];\n}\n\n/**\n * Decodes a claim data hex string into its validator data, incentive data, and referrer components.\n *\n * @export\n * @param {Hex} data - The hex-encoded claim data to decode\n * @returns {{ validatorData: Hex; incentiveData: Hex, referrer: Address }} The decoded claim data components\n */\nexport function decodeClaimDataWithReferrer(data: Hex) {\n return decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimDataWithReferrer',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n { type: 'address', name: 'referrer' },\n ],\n },\n ],\n data,\n )[0];\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","ALimitedSignerValidator","LimitedSignerValidator","APayableLimitedSignerValidator","PayableLimitedSignerValidator","ASignerValidatorV2","SignerValidatorV2","ALimitedSignerValidatorV2","LimitedSignerValidatorV2","APayableLimitedSignerValidatorV2","PayableLimitedSignerValidatorV2","validatorFromAddress","options","address","params","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError","BoostValidatorEOA","decodeClaimData","data","decodeAbiParameters","decodeClaimDataWithReferrer"],"mappings":";;;;;;;;;;;AAiDO,MAAMA,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAAA,EAC3B,CAACC,CAA8B,GAAGC;AAAA,EAClC,CAACC,CAAqC,GAAGC;AAAA,EACzC,CAACC,CAAyB,GAAGC;AAAA,EAC7B,CAACC,CAAgC,GAAGC;AAAA,EACpC,CAACC,CAAuC,GAAGC;AAC7C;AAYsB,eAAAC,EACpBC,GACAC,GACAC,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaJ,EAAQ,QAAQ;AAAA,IACtD,KAAKK;AAAAA,IACL,cAAc;AAAA,IACd,SAAAJ;AAAA,IACA,GAAGC;AAAA,EAAA,CACJ,GACKI,IAAOpB,EAA8BiB,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKrB,CAA6B;AAAA,MACzCiB;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKN,GAASC,CAAO;AAClC;AAiBO,MAAMO,IAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AACX;AASO,SAASC,EAAgBC,GAAW;AAClC,SAAAC;AAAA,IACL;AAAA,MACE;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,UACvC,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,QACzC;AAAA,MACF;AAAA,IACF;AAAA,IACAD;AAAA,IACA,CAAC;AACL;AASO,SAASE,EAA4BF,GAAW;AAC9C,SAAAC;AAAA,IACL;AAAA,MACE;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,UACvC,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,UACvC,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,QACtC;AAAA,MACF;AAAA,IACF;AAAA,IACAD;AAAA,IACA,CAAC;AACL;"}
@@ -0,0 +1,28 @@
1
+ const e = "0xc2c281ec", a = "0x53cf8555", t = "0x7cc1d5bb", n = "0x56586338", s = "0xf60c99c9", c = "0xf60c99c9", i = "0x52b8e45c", o = "0x52b8e45c", d = "0x90318111", A = "0x7687b0ed", r = "0xc8ebc758", x = "0xf1a436d9", b = "0x5fbfaa4e", g = "0xde98bbf0", l = "0xa2dceadb", V = "0x2a6b3c38", f = "0xb0fafe58", v = "0x89b50fd9", C = "0x0d36a40d", I = "0xb8ce7b22", E = "0x81818aa3", L = "0x1392d798", S = "0x3d30a22c", m = "0x2929d19c";
2
+ export {
3
+ A,
4
+ I as a,
5
+ r as b,
6
+ f as c,
7
+ E as d,
8
+ x as e,
9
+ v as f,
10
+ C as g,
11
+ t as h,
12
+ s as i,
13
+ c as j,
14
+ n as k,
15
+ e as l,
16
+ a as m,
17
+ d as n,
18
+ o,
19
+ i as p,
20
+ L as q,
21
+ S as r,
22
+ V as s,
23
+ b as t,
24
+ g as u,
25
+ l as v,
26
+ m as w
27
+ };
28
+ //# sourceMappingURL=componentInterfaces-43ygGrVO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-43ygGrVO.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e="0xc2c281ec",i="0x53cf8555",t="0x7cc1d5bb",n="0x56586338",a="0xf60c99c9",c="0xf60c99c9",A="0x52b8e45c",r="0x52b8e45c",d="0x90318111",s="0x7687b0ed",o="0xc8ebc758",g="0xf1a436d9",l="0x5fbfaa4e",V="0xde98bbf0",b="0xa2dceadb",x="0x2a6b3c38",C="0xb0fafe58",v="0x89b50fd9",I="0x0d36a40d",E="0xb8ce7b22",L="0x81818aa3",S="0x1392d798",f="0x3d30a22c",R="0x2929d19c";exports.AAllowListIncentive=e;exports.ACGDAIncentive=i;exports.AERC20Incentive=t;exports.AERC20PeggedIncentive=n;exports.AERC20PeggedVariableCriteriaIncentive=a;exports.AERC20PeggedVariableCriteriaIncentiveV2=c;exports.AERC20VariableCriteriaIncentive=A;exports.AERC20VariableCriteriaIncentiveV2=r;exports.AERC20VariableIncentive=d;exports.AEventAction=s;exports.ALimitedSignerValidator=o;exports.ALimitedSignerValidatorV2=g;exports.AManagedBudget=l;exports.AManagedBudgetWithFees=V;exports.AManagedBudgetWithFeesV2=b;exports.AOffchainAccessList=x;exports.APayableLimitedSignerValidator=C;exports.APayableLimitedSignerValidatorV2=v;exports.APointsIncentive=I;exports.ASignerValidator=E;exports.ASignerValidatorV2=L;exports.ASimpleAllowList=S;exports.ASimpleDenyList=f;exports.ATransparentBudget=R;
2
+ //# sourceMappingURL=componentInterfaces-JU4NBkEc.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-JU4NBkEc.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}