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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +46 -3
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +37 -10
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +257 -11
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +249 -82
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.d.ts +2 -2
  15. package/dist/AllowLists/AllowList.js +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  17. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  18. package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
  19. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  20. package/dist/AllowLists/SimpleAllowList.js +52 -37
  21. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  22. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  23. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleDenyList.js +41 -129
  27. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  28. package/dist/Auth/PassthroughAuth.cjs +1 -1
  29. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  30. package/dist/Auth/PassthroughAuth.js +4 -4
  31. package/dist/Auth/PassthroughAuth.js.map +1 -1
  32. package/dist/Boost.cjs +1 -1
  33. package/dist/Boost.cjs.map +1 -1
  34. package/dist/Boost.d.ts +93 -1
  35. package/dist/Boost.d.ts.map +1 -1
  36. package/dist/Boost.js +151 -5
  37. package/dist/Boost.js.map +1 -1
  38. package/dist/BoostCore.cjs +2 -2
  39. package/dist/BoostCore.cjs.map +1 -1
  40. package/dist/BoostCore.d.ts +45 -7
  41. package/dist/BoostCore.d.ts.map +1 -1
  42. package/dist/BoostCore.js +352 -305
  43. package/dist/BoostCore.js.map +1 -1
  44. package/dist/BoostRegistry.cjs +1 -1
  45. package/dist/BoostRegistry.cjs.map +1 -1
  46. package/dist/BoostRegistry.d.ts +18 -4
  47. package/dist/BoostRegistry.d.ts.map +1 -1
  48. package/dist/BoostRegistry.js +36 -25
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.js +1 -1
  52. package/dist/Budgets/ManagedBudget.cjs +1 -1
  53. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  54. package/dist/Budgets/ManagedBudget.d.ts +40 -2
  55. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  56. package/dist/Budgets/ManagedBudget.js +53 -36
  57. package/dist/Budgets/ManagedBudget.js.map +1 -1
  58. package/dist/Budgets/SimpleBudget.d.ts +33 -2
  59. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  60. package/dist/Budgets/VestingBudget.d.ts +54 -2
  61. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  62. package/dist/Deployable/Contract.cjs +1 -1
  63. package/dist/Deployable/Contract.cjs.map +1 -1
  64. package/dist/Deployable/Contract.js +1 -1
  65. package/dist/Deployable/Contract.js.map +1 -1
  66. package/dist/Deployable/Deployable.cjs.map +1 -1
  67. package/dist/Deployable/Deployable.d.ts +8 -2
  68. package/dist/Deployable/Deployable.d.ts.map +1 -1
  69. package/dist/Deployable/Deployable.js +6 -0
  70. package/dist/Deployable/Deployable.js.map +1 -1
  71. package/dist/Deployable/DeployableTarget.cjs +1 -1
  72. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  73. package/dist/Deployable/DeployableTarget.d.ts +4 -3
  74. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  75. package/dist/Deployable/DeployableTarget.js +31 -28
  76. package/dist/Deployable/DeployableTarget.js.map +1 -1
  77. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  78. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  79. package/dist/Incentives/AllowListIncentive.d.ts +35 -5
  80. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  81. package/dist/Incentives/AllowListIncentive.js +33 -21
  82. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  83. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  84. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  85. package/dist/Incentives/CGDAIncentive.d.ts +89 -5
  86. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/CGDAIncentive.js +44 -23
  88. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
  90. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  91. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  92. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  93. package/dist/Incentives/ERC20Incentive.d.ts +49 -5
  94. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/ERC20Incentive.js +46 -27
  96. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
  98. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.cjs.map +1 -1
  101. package/dist/Incentives/Incentive.js +48 -32
  102. package/dist/Incentives/Incentive.js.map +1 -1
  103. package/dist/Incentives/PointsIncentive.cjs +1 -1
  104. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  105. package/dist/Incentives/PointsIncentive.d.ts +49 -5
  106. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  107. package/dist/Incentives/PointsIncentive.js +38 -21
  108. package/dist/Incentives/PointsIncentive.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.d.ts +298 -5
  112. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  113. package/dist/Validators/SignerValidator.js +151 -26
  114. package/dist/Validators/SignerValidator.js.map +1 -1
  115. package/dist/Validators/Validator.cjs +1 -1
  116. package/dist/Validators/Validator.js +1 -1
  117. package/dist/claiming.cjs +2 -0
  118. package/dist/claiming.cjs.map +1 -0
  119. package/dist/claiming.d.ts +43 -0
  120. package/dist/claiming.d.ts.map +1 -0
  121. package/dist/claiming.js +17 -0
  122. package/dist/claiming.js.map +1 -0
  123. package/dist/errors.cjs +1 -1
  124. package/dist/errors.cjs.map +1 -1
  125. package/dist/errors.d.ts +15 -1
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +30 -21
  128. package/dist/errors.js.map +1 -1
  129. package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
  130. package/dist/generated-57_Kffpz.js.map +1 -0
  131. package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
  132. package/dist/generated-wKBNvm48.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +4 -4
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +108 -124
  137. package/dist/transfers.cjs +2 -0
  138. package/dist/transfers.cjs.map +1 -0
  139. package/dist/transfers.d.ts +198 -0
  140. package/dist/transfers.d.ts.map +1 -0
  141. package/dist/transfers.js +84 -0
  142. package/dist/transfers.js.map +1 -0
  143. package/dist/utils.cjs +1 -1
  144. package/dist/utils.cjs.map +1 -1
  145. package/dist/utils.d.ts +2 -1371
  146. package/dist/utils.d.ts.map +1 -1
  147. package/dist/utils.js +26 -653
  148. package/dist/utils.js.map +1 -1
  149. package/package.json +17 -3
  150. package/src/Actions/Action.test.ts +5 -4
  151. package/src/Actions/ContractAction.test.ts +4 -6
  152. package/src/Actions/ContractAction.ts +73 -10
  153. package/src/Actions/ERC721MintAction.test.ts +2 -2
  154. package/src/Actions/ERC721MintAction.ts +70 -16
  155. package/src/Actions/EventAction.test.ts +43 -17
  156. package/src/Actions/EventAction.ts +451 -26
  157. package/src/AllowLists/SimpleAllowList.ts +51 -7
  158. package/src/AllowLists/SimpleDenyList.ts +47 -109
  159. package/src/Auth/PassthroughAuth.ts +1 -1
  160. package/src/Boost.ts +136 -1
  161. package/src/BoostCore.test.ts +4 -11
  162. package/src/BoostCore.ts +114 -45
  163. package/src/BoostRegistry.ts +39 -21
  164. package/src/Budgets/ManagedBudget.ts +69 -16
  165. package/src/Budgets/SimpleBudget.ts +57 -14
  166. package/src/Budgets/VestingBudget.ts +79 -9
  167. package/src/Deployable/Contract.ts +1 -1
  168. package/src/Deployable/Deployable.ts +8 -2
  169. package/src/Deployable/DeployableTarget.ts +19 -6
  170. package/src/Incentives/AllowListIncentive.test.ts +2 -5
  171. package/src/Incentives/AllowListIncentive.ts +59 -15
  172. package/src/Incentives/CGDAIncentive.test.ts +3 -7
  173. package/src/Incentives/CGDAIncentive.ts +123 -19
  174. package/src/Incentives/ERC1155Incentive.test.ts +2 -13
  175. package/src/Incentives/ERC1155Incentive.ts +104 -22
  176. package/src/Incentives/ERC20Incentive.test.ts +6 -17
  177. package/src/Incentives/ERC20Incentive.ts +86 -21
  178. package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
  179. package/src/Incentives/ERC20VariableIncentive.ts +71 -19
  180. package/src/Incentives/Incentive.test.ts +1 -1
  181. package/src/Incentives/PointsIncentive.test.ts +3 -6
  182. package/src/Incentives/PointsIncentive.ts +79 -17
  183. package/src/Validators/SignerValidator.test.ts +3 -7
  184. package/src/Validators/SignerValidator.ts +422 -13
  185. package/src/claiming.ts +56 -0
  186. package/src/errors.ts +19 -1
  187. package/src/index.ts +10 -7
  188. package/src/transfers.ts +284 -0
  189. package/src/utils.ts +3 -2052
  190. package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
  191. package/dist/generated-DGpIVcv5.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./BoostRegistry.cjs"),i=require("./BoostCore.cjs"),y=require("./Boost.cjs"),r=require("./errors.cjs"),e=require("./utils.cjs"),u=require("./Auth/PassthroughAuth.cjs"),l=require("./Actions/Action.cjs"),A=require("./Actions/EventAction.cjs"),p=require("./AllowLists/AllowList.cjs"),d=require("./AllowLists/SimpleAllowList.cjs"),E=require("./AllowLists/SimpleDenyList.cjs"),s=require("./Budgets/Budget.cjs"),o=require("./Budgets/ManagedBudget.cjs"),g=require("./Deployable/Deployable.cjs"),C=require("./Deployable/Contract.cjs"),P=require("./Deployable/DeployableTarget.cjs"),v=require("./Incentives/AllowListIncentive.cjs"),m=require("./Incentives/CGDAIncentive.cjs"),I=require("./Incentives/ERC20Incentive.cjs"),t=require("./Incentives/Incentive.cjs"),S=require("./Incentives/PointsIncentive.cjs"),R=require("./Validators/SignerValidator.cjs"),c=require("./Validators/Validator.cjs"),a=require("./generated-Cd-Fe7W7.cjs");exports.BOOST_REGISTRY_ADDRESS=n.BOOST_REGISTRY_ADDRESS;exports.BoostRegistry=n.BoostRegistry;exports.BOOST_CORE_ADDRESS=i.BOOST_CORE_ADDRESS;exports.BoostCore=i.BoostCore;exports.Boost=y.Boost;exports.BoostCoreNoIdentifierEmitted=r.BoostCoreNoIdentifierEmitted;exports.BudgetMustAuthorizeBoostCore=r.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=r.ContractAddressRequiredError;exports.DeployableAlreadyDeployedError=r.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=r.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=r.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=r.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=r.DeployableWagmiConfigurationRequiredError;exports.EventActionValidationError=r.EventActionValidationError;exports.FieldValueNotComparableError=r.FieldValueNotComparableError;exports.FieldValueUndefinedError=r.FieldValueUndefinedError;exports.IncentiveNotCloneableError=r.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=r.InvalidComponentInterfaceError;exports.InvalidNumericalCriteriaError=r.InvalidNumericalCriteriaError;exports.NoContractAddressUponReceiptError=r.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=r.NoEventActionStepsProvidedError;exports.TooManyEventActionStepsProvidedError=r.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=r.UnknownTransferPayloadSupplied;exports.UnrecognizedFilterTypeError=r.UnrecognizedFilterTypeError;exports.AssetType=e.AssetType;exports.ERC1155StrategyType=e.ERC1155StrategyType;exports.FilterType=e.FilterType;exports.PrimitiveType=e.PrimitiveType;exports.RegistryType=e.RegistryType;exports.SignatureType=e.SignatureType;exports.StrategyType=e.StrategyType;exports.awaitResult=e.awaitResult;exports.bytes4=e.bytes4;exports.dedupeActionSteps=e.dedupeActionSteps;exports.getDeployedContractAddress=e.getDeployedContractAddress;exports.isEventActionPayloadSimple=e.isEventActionPayloadSimple;exports.prepareAllowListIncentivePayload=e.prepareAllowListIncentivePayload;exports.prepareBoostClaimData=e.prepareBoostClaimData;exports.prepareBoostPayload=e.prepareBoostPayload;exports.prepareCGDAIncentivePayload=e.prepareCGDAIncentivePayload;exports.prepareClaimPayload=e.prepareClaimPayload;exports.prepareContractActionPayload=e.prepareContractActionPayload;exports.prepareERC1155IncentivePayload=e.prepareERC1155IncentivePayload;exports.prepareERC1155Payload=e.prepareERC1155Payload;exports.prepareERC1155Transfer=e.prepareERC1155Transfer;exports.prepareERC20IncentivePayload=e.prepareERC20IncentivePayload;exports.prepareERC20VariableIncentivePayload=e.prepareERC20VariableIncentivePayload;exports.prepareERC721MintActionPayload=e.prepareERC721MintActionPayload;exports.prepareERC721MintActionValidate=e.prepareERC721MintActionValidate;exports.prepareEventActionPayload=e.prepareEventActionPayload;exports.prepareFungiblePayload=e.prepareFungiblePayload;exports.prepareFungibleTransfer=e.prepareFungibleTransfer;exports.prepareManagedBudgetPayload=e.prepareManagedBudgetPayload;exports.preparePointsIncentivePayload=e.preparePointsIncentivePayload;exports.prepareSignerValidatorClaimDataPayload=e.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=e.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=e.prepareSignerValidatorPayload;exports.prepareSimpleAllowListPayload=e.prepareSimpleAllowListPayload;exports.prepareSimpleBudgetPayload=e.prepareSimpleBudgetPayload;exports.prepareSimpleDenyListPayload=e.prepareSimpleDenyListPayload;exports.prepareTransferPayload=e.prepareTransferPayload;exports.prepareVestingBudgetPayload=e.prepareVestingBudgetPayload;exports.PassthroughAuth=u.PassthroughAuth;exports.ActionByComponentInterface=l.ActionByComponentInterface;exports.actionFromAddress=l.actionFromAddress;exports.EventAction=A.EventAction;exports.AllowListByComponentInterface=p.AllowListByComponentInterface;exports.allowListFromAddress=p.allowListFromAddress;exports.LIST_MANAGER_ROLE=d.LIST_MANAGER_ROLE;exports.SimpleAllowList=d.SimpleAllowList;exports.SimpleDenyList=E.SimpleDenyList;exports.BudgetByComponentInterface=s.BudgetByComponentInterface;exports.budgetFromAddress=s.budgetFromAddress;exports.ManagedBudget=o.ManagedBudget;exports.ManagedBudgetRoles=o.ManagedBudgetRoles;exports.isERC1155TransferPayload=o.isERC1155TransferPayload;exports.isFungibleTransfer=o.isFungibleTransfer;exports.prepareTransfer=o.prepareTransfer;exports.Deployable=g.Deployable;exports.Contract=C.Contract;exports.DeployableTarget=P.DeployableTarget;exports.AllowListIncentive=v.AllowListIncentive;exports.CGDAIncentive=m.CGDAIncentive;exports.ERC20Incentive=I.ERC20Incentive;exports.ERC20VariableIncentive=t.ERC20VariableIncentive;exports.IncentiveByComponentInterface=t.IncentiveByComponentInterface;exports.incentiveFromAddress=t.incentiveFromAddress;exports.PointsIncentive=S.PointsIncentive;exports.SignerValidator=R.SignerValidator;exports.ValidatorByComponentInterface=c.ValidatorByComponentInterface;exports.validatorFromAddress=c.validatorFromAddress;exports.allowListIncentiveAbi=a.A;exports.boostCoreAbi=a.c;exports.boostRegistryAbi=a.ee;exports.cgdaIncentiveAbi=a.v;exports.erc20IncentiveAbi=a.f;exports.managedBudgetAbi=a.p;exports.passthroughAuthAbi=a.ze;exports.pointsIncentiveAbi=a.l;exports.signerValidatorAbi=a.M;exports.simpleAllowListAbi=a.T;exports.simpleDenyListAbi=a.S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./BoostRegistry.cjs"),a=require("./BoostCore.cjs"),p=require("./Boost.cjs"),c=require("./Actions/Action.cjs"),o=require("./Actions/EventAction.cjs"),y=require("./AllowLists/AllowList.cjs"),l=require("./AllowLists/SimpleAllowList.cjs"),u=require("./AllowLists/SimpleDenyList.cjs"),A=require("./Budgets/Budget.cjs"),t=require("./Budgets/ManagedBudget.cjs"),m=require("./Deployable/Deployable.cjs"),P=require("./Deployable/Contract.cjs"),S=require("./Deployable/DeployableTarget.cjs"),E=require("./Incentives/AllowListIncentive.cjs"),g=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),s=require("./Incentives/Incentive.cjs"),C=require("./Incentives/PointsIncentive.cjs"),n=require("./Validators/SignerValidator.cjs"),I=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-wKBNvm48.cjs");exports.BOOST_REGISTRY_ADDRESS=d.BOOST_REGISTRY_ADDRESS;exports.BoostRegistry=d.BoostRegistry;exports.BOOST_CORE_ADDRESS=a.BOOST_CORE_ADDRESS;exports.BOOST_CORE_CLAIM_FEE=a.BOOST_CORE_CLAIM_FEE;exports.BoostCore=a.BoostCore;exports.Boost=p.Boost;exports.prepareBoostPayload=p.prepareBoostPayload;exports.ActionByComponentInterface=c.ActionByComponentInterface;exports.actionFromAddress=c.actionFromAddress;exports.EventAction=o.EventAction;exports.FilterType=o.FilterType;exports.PrimitiveType=o.PrimitiveType;exports.SignatureType=o.SignatureType;exports.isEventActionPayloadSimple=o.isEventActionPayloadSimple;exports.prepareEventActionPayload=o.prepareEventActionPayload;exports.AllowListByComponentInterface=y.AllowListByComponentInterface;exports.allowListFromAddress=y.allowListFromAddress;exports.LIST_MANAGER_ROLE=l.LIST_MANAGER_ROLE;exports.SimpleAllowList=l.SimpleAllowList;exports.prepareSimpleAllowListPayload=l.prepareSimpleAllowListPayload;exports.SimpleDenyList=u.SimpleDenyList;exports.prepareSimpleDenyListPayload=u.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=A.BudgetByComponentInterface;exports.budgetFromAddress=A.budgetFromAddress;exports.ManagedBudget=t.ManagedBudget;exports.ManagedBudgetRoles=t.ManagedBudgetRoles;exports.isERC1155TransferPayload=t.isERC1155TransferPayload;exports.isFungibleTransfer=t.isFungibleTransfer;exports.prepareManagedBudgetPayload=t.prepareManagedBudgetPayload;exports.prepareTransfer=t.prepareTransfer;exports.Deployable=m.Deployable;exports.Contract=P.Contract;exports.DeployableTarget=S.DeployableTarget;exports.AllowListIncentive=E.AllowListIncentive;exports.prepareAllowListIncentivePayload=E.prepareAllowListIncentivePayload;exports.CGDAIncentive=g.CGDAIncentive;exports.prepareCGDAIncentivePayload=g.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=s.ERC20VariableIncentive;exports.IncentiveByComponentInterface=s.IncentiveByComponentInterface;exports.incentiveFromAddress=s.incentiveFromAddress;exports.PointsIncentive=C.PointsIncentive;exports.preparePointsIncentivePayload=C.preparePointsIncentivePayload;exports.SignerValidator=n.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=n.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=n.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=n.prepareSignerValidatorPayload;exports.ValidatorByComponentInterface=I.ValidatorByComponentInterface;exports.validatorFromAddress=I.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.EventActionValidationError=e.EventActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.RegistryType=i.RegistryType;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.PassthroughAuth=B.PassthroughAuth;exports.allowListIncentiveAbi=r.A;exports.boostCoreAbi=r.c;exports.boostRegistryAbi=r.ee;exports.cgdaIncentiveAbi=r.v;exports.erc20IncentiveAbi=r.f;exports.managedBudgetAbi=r.p;exports.passthroughAuthAbi=r.ze;exports.pointsIncentiveAbi=r.l;exports.signerValidatorAbi=r.M;exports.simpleAllowListAbi=r.T;exports.simpleDenyListAbi=r.S;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  export * from './BoostRegistry';
2
2
  export * from './BoostCore';
3
3
  export * from './Boost';
4
- export * from './errors';
5
- export * from './utils';
6
- export * from './Auth/Auth';
7
- export * from './Auth/PassthroughAuth';
8
4
  export * from './Actions/Action';
9
5
  export * from './Actions/EventAction';
10
6
  export * from './AllowLists/AllowList';
@@ -22,4 +18,8 @@ export * from './Incentives/Incentive';
22
18
  export * from './Incentives/PointsIncentive';
23
19
  export * from './Validators/SignerValidator';
24
20
  export * from './Validators/Validator';
21
+ export * from './errors';
22
+ export * from './utils';
23
+ export * from './Auth/Auth';
24
+ export * from './Auth/PassthroughAuth';
25
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAIxB,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AAIvC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAI5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAI9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAIxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAI5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAI9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAIxB,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -1,129 +1,113 @@
1
- import { BOOST_REGISTRY_ADDRESS as o, BoostRegistry as a } from "./BoostRegistry.js";
2
- import { BOOST_CORE_ADDRESS as i, BoostCore as n } from "./BoostCore.js";
3
- import { Boost as l } from "./Boost.js";
4
- import { BoostCoreNoIdentifierEmitted as s, BudgetMustAuthorizeBoostCore as y, ContractAddressRequiredError as m, DeployableAlreadyDeployedError as c, DeployableBuildParametersUnspecifiedError as A, DeployableMissingPayloadError as f, DeployableUnknownOwnerProvidedError as E, DeployableWagmiConfigurationRequiredError as g, EventActionValidationError as C, FieldValueNotComparableError as P, FieldValueUndefinedError as v, IncentiveNotCloneableError as u, InvalidComponentInterfaceError as b, InvalidNumericalCriteriaError as I, NoContractAddressUponReceiptError as R, NoEventActionStepsProvidedError as S, TooManyEventActionStepsProvidedError as x, UnknownTransferPayloadSupplied as B, UnrecognizedFilterTypeError as T } from "./errors.js";
5
- import { AssetType as L, ERC1155StrategyType as V, FilterType as w, PrimitiveType as F, RegistryType as M, SignatureType as h, StrategyType as N, awaitResult as O, bytes4 as U, dedupeActionSteps as _, getDeployedContractAddress as G, isEventActionPayloadSimple as z, prepareAllowListIncentivePayload as k, prepareBoostClaimData as q, prepareBoostPayload as W, prepareCGDAIncentivePayload as Y, prepareClaimPayload as j, prepareContractActionPayload as H, prepareERC1155IncentivePayload as J, prepareERC1155Payload as K, prepareERC1155Transfer as Q, prepareERC20IncentivePayload as X, prepareERC20VariableIncentivePayload as Z, prepareERC721MintActionPayload as $, prepareERC721MintActionValidate as ee, prepareEventActionPayload as re, prepareFungiblePayload as oe, prepareFungibleTransfer as ae, prepareManagedBudgetPayload as te, preparePointsIncentivePayload as ie, prepareSignerValidatorClaimDataPayload as ne, prepareSignerValidatorInputParams as pe, prepareSignerValidatorPayload as le, prepareSimpleAllowListPayload as de, prepareSimpleBudgetPayload as se, prepareSimpleDenyListPayload as ye, prepareTransferPayload as me, prepareVestingBudgetPayload as ce } from "./utils.js";
6
- import { PassthroughAuth as fe } from "./Auth/PassthroughAuth.js";
7
- import { ActionByComponentInterface as ge, actionFromAddress as Ce } from "./Actions/Action.js";
8
- import { EventAction as ve } from "./Actions/EventAction.js";
9
- import { AllowListByComponentInterface as be, allowListFromAddress as Ie } from "./AllowLists/AllowList.js";
10
- import { LIST_MANAGER_ROLE as Se, SimpleAllowList as xe } from "./AllowLists/SimpleAllowList.js";
11
- import { SimpleDenyList as Te } from "./AllowLists/SimpleDenyList.js";
12
- import { BudgetByComponentInterface as Le, budgetFromAddress as Ve } from "./Budgets/Budget.js";
13
- import { ManagedBudget as Fe, ManagedBudgetRoles as Me, isERC1155TransferPayload as he, isFungibleTransfer as Ne, prepareTransfer as Oe } from "./Budgets/ManagedBudget.js";
14
- import { Deployable as _e } from "./Deployable/Deployable.js";
15
- import { Contract as ze } from "./Deployable/Contract.js";
16
- import { DeployableTarget as qe } from "./Deployable/DeployableTarget.js";
17
- import { AllowListIncentive as Ye } from "./Incentives/AllowListIncentive.js";
18
- import { CGDAIncentive as He } from "./Incentives/CGDAIncentive.js";
19
- import { ERC20Incentive as Ke } from "./Incentives/ERC20Incentive.js";
20
- import { ERC20VariableIncentive as Xe, IncentiveByComponentInterface as Ze, incentiveFromAddress as $e } from "./Incentives/Incentive.js";
21
- import { PointsIncentive as rr } from "./Incentives/PointsIncentive.js";
22
- import { SignerValidator as ar } from "./Validators/SignerValidator.js";
23
- import { ValidatorByComponentInterface as ir, validatorFromAddress as nr } from "./Validators/Validator.js";
24
- import { A as lr, c as dr, e as sr, v as yr, f as mr, p as cr, z as Ar, l as fr, M as Er, T as gr, S as Cr } from "./generated-DGpIVcv5.js";
1
+ import { BOOST_REGISTRY_ADDRESS as o, BoostRegistry as t } from "./BoostRegistry.js";
2
+ import { BOOST_CORE_ADDRESS as i, BOOST_CORE_CLAIM_FEE as n, BoostCore as p } from "./BoostCore.js";
3
+ import { Boost as s, prepareBoostPayload as d } from "./Boost.js";
4
+ import { ActionByComponentInterface as A, actionFromAddress as y } from "./Actions/Action.js";
5
+ import { EventAction as f, FilterType as E, PrimitiveType as g, SignatureType as v, isEventActionPayloadSimple as I, prepareEventActionPayload as C } from "./Actions/EventAction.js";
6
+ import { AllowListByComponentInterface as b, allowListFromAddress as x } from "./AllowLists/AllowList.js";
7
+ import { LIST_MANAGER_ROLE as S, SimpleAllowList as B, prepareSimpleAllowListPayload as R } from "./AllowLists/SimpleAllowList.js";
8
+ import { SimpleDenyList as T, prepareSimpleDenyListPayload as L } from "./AllowLists/SimpleDenyList.js";
9
+ import { BudgetByComponentInterface as F, budgetFromAddress as M } from "./Budgets/Budget.js";
10
+ import { ManagedBudget as V, ManagedBudgetRoles as _, isERC1155TransferPayload as h, isFungibleTransfer as N, prepareManagedBudgetPayload as U, prepareTransfer as z } from "./Budgets/ManagedBudget.js";
11
+ import { Deployable as k } from "./Deployable/Deployable.js";
12
+ import { Contract as W } from "./Deployable/Contract.js";
13
+ import { DeployableTarget as j } from "./Deployable/DeployableTarget.js";
14
+ import { AllowListIncentive as J, prepareAllowListIncentivePayload as K } from "./Incentives/AllowListIncentive.js";
15
+ import { CGDAIncentive as X, prepareCGDAIncentivePayload as Z } from "./Incentives/CGDAIncentive.js";
16
+ import { ERC20Incentive as ee, prepareERC20IncentivePayload as re } from "./Incentives/ERC20Incentive.js";
17
+ import { ERC20VariableIncentive as te, IncentiveByComponentInterface as ae, incentiveFromAddress as ie } from "./Incentives/Incentive.js";
18
+ import { PointsIncentive as pe, preparePointsIncentivePayload as le } from "./Incentives/PointsIncentive.js";
19
+ import { SignerValidator as de, prepareSignerValidatorClaimDataPayload as me, prepareSignerValidatorInputParams as Ae, prepareSignerValidatorPayload as ye } from "./Validators/SignerValidator.js";
20
+ import { ValidatorByComponentInterface as fe, validatorFromAddress as Ee } from "./Validators/Validator.js";
21
+ import { BoostCoreNoIdentifierEmitted as ve, BudgetMustAuthorizeBoostCore as Ie, ContractAddressRequiredError as Ce, DeployableAlreadyDeployedError as ue, DeployableBuildParametersUnspecifiedError as be, DeployableMissingPayloadError as xe, DeployableUnknownOwnerProvidedError as Pe, DeployableWagmiConfigurationRequiredError as Se, EventActionValidationError as Be, FieldValueNotComparableError as Re, FieldValueUndefinedError as De, IncentiveNotCloneableError as Te, InvalidComponentInterfaceError as Le, InvalidNumericalCriteriaError as we, MustInitializeBudgetError as Fe, NoContractAddressUponReceiptError as Me, NoEventActionStepsProvidedError as Oe, TooManyEventActionStepsProvidedError as Ve, UnknownTransferPayloadSupplied as _e, UnrecognizedFilterTypeError as he } from "./errors.js";
22
+ import { RegistryType as Ue, awaitResult as ze, bytes4 as Ge, getDeployedContractAddress as ke } from "./utils.js";
23
+ import { PassthroughAuth as We } from "./Auth/PassthroughAuth.js";
24
+ import { A as je, c as He, e as Je, v as Ke, f as Qe, p as Xe, z as Ze, l as $e, M as er, T as rr, S as or } from "./generated-57_Kffpz.js";
25
25
  export {
26
- ge as ActionByComponentInterface,
27
- be as AllowListByComponentInterface,
28
- Ye as AllowListIncentive,
29
- L as AssetType,
26
+ A as ActionByComponentInterface,
27
+ b as AllowListByComponentInterface,
28
+ J as AllowListIncentive,
30
29
  i as BOOST_CORE_ADDRESS,
30
+ n as BOOST_CORE_CLAIM_FEE,
31
31
  o as BOOST_REGISTRY_ADDRESS,
32
- l as Boost,
33
- n as BoostCore,
34
- s as BoostCoreNoIdentifierEmitted,
35
- a as BoostRegistry,
36
- Le as BudgetByComponentInterface,
37
- y as BudgetMustAuthorizeBoostCore,
38
- He as CGDAIncentive,
39
- ze as Contract,
40
- m as ContractAddressRequiredError,
41
- _e as Deployable,
42
- c as DeployableAlreadyDeployedError,
43
- A as DeployableBuildParametersUnspecifiedError,
44
- f as DeployableMissingPayloadError,
45
- qe as DeployableTarget,
46
- E as DeployableUnknownOwnerProvidedError,
47
- g as DeployableWagmiConfigurationRequiredError,
48
- V as ERC1155StrategyType,
49
- Ke as ERC20Incentive,
50
- Xe as ERC20VariableIncentive,
51
- ve as EventAction,
52
- C as EventActionValidationError,
53
- P as FieldValueNotComparableError,
54
- v as FieldValueUndefinedError,
55
- w as FilterType,
56
- Ze as IncentiveByComponentInterface,
57
- u as IncentiveNotCloneableError,
58
- b as InvalidComponentInterfaceError,
59
- I as InvalidNumericalCriteriaError,
60
- Se as LIST_MANAGER_ROLE,
61
- Fe as ManagedBudget,
62
- Me as ManagedBudgetRoles,
63
- R as NoContractAddressUponReceiptError,
64
- S as NoEventActionStepsProvidedError,
65
- fe as PassthroughAuth,
66
- rr as PointsIncentive,
67
- F as PrimitiveType,
68
- M as RegistryType,
69
- h as SignatureType,
70
- ar as SignerValidator,
71
- xe as SimpleAllowList,
72
- Te as SimpleDenyList,
73
- N as StrategyType,
74
- x as TooManyEventActionStepsProvidedError,
75
- B as UnknownTransferPayloadSupplied,
76
- T as UnrecognizedFilterTypeError,
77
- ir as ValidatorByComponentInterface,
78
- Ce as actionFromAddress,
79
- Ie as allowListFromAddress,
80
- lr as allowListIncentiveAbi,
81
- O as awaitResult,
82
- dr as boostCoreAbi,
83
- sr as boostRegistryAbi,
84
- Ve as budgetFromAddress,
85
- U as bytes4,
86
- yr as cgdaIncentiveAbi,
87
- _ as dedupeActionSteps,
88
- mr as erc20IncentiveAbi,
89
- G as getDeployedContractAddress,
90
- $e as incentiveFromAddress,
91
- he as isERC1155TransferPayload,
92
- z as isEventActionPayloadSimple,
93
- Ne as isFungibleTransfer,
94
- cr as managedBudgetAbi,
95
- Ar as passthroughAuthAbi,
96
- fr as pointsIncentiveAbi,
97
- k as prepareAllowListIncentivePayload,
98
- q as prepareBoostClaimData,
99
- W as prepareBoostPayload,
100
- Y as prepareCGDAIncentivePayload,
101
- j as prepareClaimPayload,
102
- H as prepareContractActionPayload,
103
- J as prepareERC1155IncentivePayload,
104
- K as prepareERC1155Payload,
105
- Q as prepareERC1155Transfer,
106
- X as prepareERC20IncentivePayload,
107
- Z as prepareERC20VariableIncentivePayload,
108
- $ as prepareERC721MintActionPayload,
109
- ee as prepareERC721MintActionValidate,
110
- re as prepareEventActionPayload,
111
- oe as prepareFungiblePayload,
112
- ae as prepareFungibleTransfer,
113
- te as prepareManagedBudgetPayload,
114
- ie as preparePointsIncentivePayload,
115
- ne as prepareSignerValidatorClaimDataPayload,
116
- pe as prepareSignerValidatorInputParams,
117
- le as prepareSignerValidatorPayload,
118
- de as prepareSimpleAllowListPayload,
119
- se as prepareSimpleBudgetPayload,
120
- ye as prepareSimpleDenyListPayload,
121
- Oe as prepareTransfer,
122
- me as prepareTransferPayload,
123
- ce as prepareVestingBudgetPayload,
124
- Er as signerValidatorAbi,
125
- gr as simpleAllowListAbi,
126
- Cr as simpleDenyListAbi,
127
- nr as validatorFromAddress
32
+ s as Boost,
33
+ p as BoostCore,
34
+ ve as BoostCoreNoIdentifierEmitted,
35
+ t as BoostRegistry,
36
+ F as BudgetByComponentInterface,
37
+ Ie as BudgetMustAuthorizeBoostCore,
38
+ X as CGDAIncentive,
39
+ W as Contract,
40
+ Ce as ContractAddressRequiredError,
41
+ k as Deployable,
42
+ ue as DeployableAlreadyDeployedError,
43
+ be as DeployableBuildParametersUnspecifiedError,
44
+ xe as DeployableMissingPayloadError,
45
+ j as DeployableTarget,
46
+ Pe as DeployableUnknownOwnerProvidedError,
47
+ Se as DeployableWagmiConfigurationRequiredError,
48
+ ee as ERC20Incentive,
49
+ te as ERC20VariableIncentive,
50
+ f as EventAction,
51
+ Be as EventActionValidationError,
52
+ Re as FieldValueNotComparableError,
53
+ De as FieldValueUndefinedError,
54
+ E as FilterType,
55
+ ae as IncentiveByComponentInterface,
56
+ Te as IncentiveNotCloneableError,
57
+ Le as InvalidComponentInterfaceError,
58
+ we as InvalidNumericalCriteriaError,
59
+ S as LIST_MANAGER_ROLE,
60
+ V as ManagedBudget,
61
+ _ as ManagedBudgetRoles,
62
+ Fe as MustInitializeBudgetError,
63
+ Me as NoContractAddressUponReceiptError,
64
+ Oe as NoEventActionStepsProvidedError,
65
+ We as PassthroughAuth,
66
+ pe as PointsIncentive,
67
+ g as PrimitiveType,
68
+ Ue as RegistryType,
69
+ v as SignatureType,
70
+ de as SignerValidator,
71
+ B as SimpleAllowList,
72
+ T as SimpleDenyList,
73
+ Ve as TooManyEventActionStepsProvidedError,
74
+ _e as UnknownTransferPayloadSupplied,
75
+ he as UnrecognizedFilterTypeError,
76
+ fe as ValidatorByComponentInterface,
77
+ y as actionFromAddress,
78
+ x as allowListFromAddress,
79
+ je as allowListIncentiveAbi,
80
+ ze as awaitResult,
81
+ He as boostCoreAbi,
82
+ Je as boostRegistryAbi,
83
+ M as budgetFromAddress,
84
+ Ge as bytes4,
85
+ Ke as cgdaIncentiveAbi,
86
+ Qe as erc20IncentiveAbi,
87
+ ke as getDeployedContractAddress,
88
+ ie as incentiveFromAddress,
89
+ h as isERC1155TransferPayload,
90
+ I as isEventActionPayloadSimple,
91
+ N as isFungibleTransfer,
92
+ Xe as managedBudgetAbi,
93
+ Ze as passthroughAuthAbi,
94
+ $e as pointsIncentiveAbi,
95
+ K as prepareAllowListIncentivePayload,
96
+ d as prepareBoostPayload,
97
+ Z as prepareCGDAIncentivePayload,
98
+ re as prepareERC20IncentivePayload,
99
+ C as prepareEventActionPayload,
100
+ U as prepareManagedBudgetPayload,
101
+ le as preparePointsIncentivePayload,
102
+ me as prepareSignerValidatorClaimDataPayload,
103
+ Ae as prepareSignerValidatorInputParams,
104
+ ye as prepareSignerValidatorPayload,
105
+ R as prepareSimpleAllowListPayload,
106
+ L as prepareSimpleDenyListPayload,
107
+ z as prepareTransfer,
108
+ er as signerValidatorAbi,
109
+ rr as simpleAllowListAbi,
110
+ or as simpleDenyListAbi,
111
+ Ee as validatorFromAddress
128
112
  };
129
113
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");var n=(e=>(e[e.ETH=0]="ETH",e[e.ERC20=1]="ERC20",e[e.ERC1155=2]="ERC1155",e))(n||{});const p=({assetType:e,address:r,target:t,data:s})=>a.encodeAbiParameters([{type:"uint8",name:"assetType"},{type:"address",name:"asset"},{type:"address",name:"target"},{type:"bytes",name:"data"}],[e,r,t,s]);function d({tokenId:e,amount:r}){return a.encodeAbiParameters(a.parseAbiParameters(["ERC1155Payload payload","struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }"]),[{tokenId:e,amount:r,data:"0x"}])}function o({tokenId:e,amount:r,asset:t,target:s}){return a.encodeAbiParameters(a.parseAbiParameters(["Transfer request","struct Transfer { uint8 assetType; address asset; address target; bytes data; }"]),[{assetType:2,asset:t,data:d({tokenId:e,amount:r}),target:s}])}function u({amount:e}){return a.encodeAbiParameters(a.parseAbiParameters(["FungiblePayload payload","struct FungiblePayload { uint256 amount; }"]),[{amount:e}])}function i({amount:e,asset:r,target:t}){return a.encodeAbiParameters(a.parseAbiParameters(["Transfer request","struct Transfer { uint8 assetType; address asset; address target; bytes data; }"]),[{assetType:r==a.zeroAddress?0:1,asset:r,data:u({amount:e}),target:t}])}exports.AssetType=n;exports.prepareERC1155Payload=d;exports.prepareERC1155Transfer=o;exports.prepareFungiblePayload=u;exports.prepareFungibleTransfer=i;exports.prepareTransferPayload=p;
2
+ //# sourceMappingURL=transfers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfers.cjs","sources":["../src/transfers.ts"],"sourcesContent":["import {\n type Address,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\n\n/**\n * The various types of assets supported in Budgets and Incentives.\n *\n * @export\n * @enum {number}\n */\nexport enum AssetType {\n ETH,\n ERC20,\n ERC1155,\n}\n\n/**\n * Object representation of a generic `Transfer` struct.\n *\n * @export\n * @interface TransferPayload\n * @typedef {TransferPayload}\n */\nexport interface TransferPayload {\n /**\n * The type of the asset being transferred.\n *\n * @type {AssetType}\n */\n assetType: AssetType;\n /**\n * The address of the asset to transfer, zero address for ETH.\n *\n * @type {Address}\n */\n address: Address;\n /**\n * The account from which to transfer the assets.\n *\n * @type {Address}\n */\n target: Address;\n /**\n * An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.\n *\n * @type {Hex}\n */\n data: Hex;\n}\n\n/**\n * Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.\n * Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}\n *\n * @param {TransferPayload} param0\n * @param {AssetType} param0.assetType - The asset type being transferred.\n * @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.\n * @param {Address} param0.target - The address of the account being transferred from\n * @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer\n * @returns {Hex}\n */\nexport const prepareTransferPayload = ({\n assetType,\n address,\n target,\n data,\n}: TransferPayload) => {\n return encodeAbiParameters(\n [\n { type: 'uint8', name: 'assetType' },\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [assetType, address, target, data],\n );\n};\n\n/**\n * Object representation of\n *\n * @export\n * @interface ERC1155Payload\n * @typedef {ERC1155Payload}\n */\nexport interface ERC1155Payload {\n /**\n * The ERC1155 token ID for the incentive\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.\n *\n * @export\n * @param {ERC1155Payload} param0\n * @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive\n * @param {bigint} param0.amount - The amount to transfer\n * @returns {Hex}\n */\nexport function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'ERC1155Payload payload',\n 'struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }',\n ]),\n [{ tokenId, amount, data: '0x' }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.\n *\n * @export\n * @interface ERC1155TransferPayload\n * @typedef {ERC1155TransferPayload}\n */\nexport interface ERC1155TransferPayload {\n /**\n * The token ID to transfer\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset to target\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {ERC1155TransferPayload} param0\n * @param {bigint} param0.tokenId - The token ID to transfer\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset to target\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareERC1155Transfer({\n tokenId,\n amount,\n asset,\n target,\n}: ERC1155TransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: AssetType.ERC1155,\n asset,\n data: prepareERC1155Payload({ tokenId, amount }),\n target,\n },\n ],\n );\n}\n\n/**\n * An object representation of the `FungiblePayload` struct\n *\n * @export\n * @interface FungiblePayload\n * @typedef {FungiblePayload}\n */\nexport interface FungiblePayload {\n /**\n * The amount being transferred\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Encodes an amount for the `FungiblePayload` struct\n *\n * @export\n * @param {FungiblePayload} param0\n * @param {bigint} param0.amount - The amount being transferred\n * @returns {*}\n */\nexport function prepareFungiblePayload({ amount }: FungiblePayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'FungiblePayload payload',\n 'struct FungiblePayload { uint256 amount; }',\n ]),\n [{ amount }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.\n *\n * @export\n * @interface FungibleTransferPayload\n * @typedef {FungibleTransferPayload}\n */\nexport interface FungibleTransferPayload {\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset. Use zero address for ETH transfers.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for a Fungible transfer, used for Budget allocations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {FungibleTransferPayload} param0\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareFungibleTransfer({\n amount,\n asset,\n target,\n}: FungibleTransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: asset == zeroAddress ? AssetType.ETH : AssetType.ERC20,\n asset,\n data: prepareFungiblePayload({ amount }),\n target,\n },\n ],\n );\n}\n"],"names":["AssetType","AssetType2","prepareTransferPayload","assetType","address","target","data","encodeAbiParameters","prepareERC1155Payload","tokenId","amount","parseAbiParameters","prepareERC1155Transfer","asset","prepareFungiblePayload","prepareFungibleTransfer","zeroAddress"],"mappings":"wGAcY,IAAAA,GAAAA,IACVA,EAAAC,EAAA,IAAA,CAAA,EAAA,MACAD,EAAAC,EAAA,MAAA,CAAA,EAAA,QACAD,EAAAC,EAAA,QAAA,CAAA,EAAA,UAHUD,IAAAA,GAAA,CAAA,CAAA,EAmDL,MAAME,EAAyB,CAAC,CACrC,UAAAC,EACA,QAAAC,EACA,OAAAC,EACA,KAAAC,CACF,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,QAAS,KAAM,WAAY,EACnC,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,QAAS,KAAM,MAAO,CAChC,EACA,CAACJ,EAAWC,EAASC,EAAQC,CAAI,CAAA,EAmC9B,SAASE,EAAsB,CAAE,QAAAC,EAAS,OAAAC,GAA0B,CAClE,OAAAH,EAAA,oBACLI,qBAAmB,CACjB,yBACA,wEAAA,CACD,EACD,CAAC,CAAE,QAAAF,EAAS,OAAAC,EAAQ,KAAM,KAAM,CAAA,CAEpC,CAgDO,SAASE,EAAuB,CACrC,QAAAH,EACA,OAAAC,EACA,MAAAG,EACA,OAAAR,CACF,EAA2B,CAClB,OAAAE,EAAA,oBACLI,qBAAmB,CACjB,mBACA,iFAAA,CACD,EACD,CACE,CACE,UAAW,EACX,MAAAE,EACA,KAAML,EAAsB,CAAE,QAAAC,EAAS,OAAAC,EAAQ,EAC/C,OAAAL,CACF,CACF,CAAA,CAEJ,CA0BgB,SAAAS,EAAuB,CAAE,OAAAJ,GAA2B,CAC3D,OAAAH,EAAA,oBACLI,qBAAmB,CACjB,0BACA,4CAAA,CACD,EACD,CAAC,CAAE,OAAAD,CAAA,CAAQ,CAAA,CAEf,CAyCO,SAASK,EAAwB,CACtC,OAAAL,EACA,MAAAG,EACA,OAAAR,CACF,EAA4B,CACnB,OAAAE,EAAA,oBACLI,qBAAmB,CACjB,mBACA,iFAAA,CACD,EACD,CACE,CACE,UAAWE,GAASG,cAAc,EAAgB,EAClD,MAAAH,EACA,KAAMC,EAAuB,CAAE,OAAAJ,EAAQ,EACvC,OAAAL,CACF,CACF,CAAA,CAEJ"}
@@ -0,0 +1,198 @@
1
+ import { type Address, type Hex } from 'viem';
2
+ /**
3
+ * The various types of assets supported in Budgets and Incentives.
4
+ *
5
+ * @export
6
+ * @enum {number}
7
+ */
8
+ export declare enum AssetType {
9
+ ETH = 0,
10
+ ERC20 = 1,
11
+ ERC1155 = 2
12
+ }
13
+ /**
14
+ * Object representation of a generic `Transfer` struct.
15
+ *
16
+ * @export
17
+ * @interface TransferPayload
18
+ * @typedef {TransferPayload}
19
+ */
20
+ export interface TransferPayload {
21
+ /**
22
+ * The type of the asset being transferred.
23
+ *
24
+ * @type {AssetType}
25
+ */
26
+ assetType: AssetType;
27
+ /**
28
+ * The address of the asset to transfer, zero address for ETH.
29
+ *
30
+ * @type {Address}
31
+ */
32
+ address: Address;
33
+ /**
34
+ * The account from which to transfer the assets.
35
+ *
36
+ * @type {Address}
37
+ */
38
+ target: Address;
39
+ /**
40
+ * An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.
41
+ *
42
+ * @type {Hex}
43
+ */
44
+ data: Hex;
45
+ }
46
+ /**
47
+ * Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.
48
+ * Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}
49
+ *
50
+ * @param {TransferPayload} param0
51
+ * @param {AssetType} param0.assetType - The asset type being transferred.
52
+ * @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.
53
+ * @param {Address} param0.target - The address of the account being transferred from
54
+ * @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer
55
+ * @returns {Hex}
56
+ */
57
+ export declare const prepareTransferPayload: ({ assetType, address, target, data, }: TransferPayload) => `0x${string}`;
58
+ /**
59
+ * Object representation of
60
+ *
61
+ * @export
62
+ * @interface ERC1155Payload
63
+ * @typedef {ERC1155Payload}
64
+ */
65
+ export interface ERC1155Payload {
66
+ /**
67
+ * The ERC1155 token ID for the incentive
68
+ *
69
+ * @type {bigint}
70
+ */
71
+ tokenId: bigint;
72
+ /**
73
+ * The amount to transfer
74
+ *
75
+ * @type {bigint}
76
+ */
77
+ amount: bigint;
78
+ }
79
+ /**
80
+ * Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.
81
+ *
82
+ * @export
83
+ * @param {ERC1155Payload} param0
84
+ * @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive
85
+ * @param {bigint} param0.amount - The amount to transfer
86
+ * @returns {Hex}
87
+ */
88
+ export declare function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload): `0x${string}`;
89
+ /**
90
+ * An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.
91
+ *
92
+ * @export
93
+ * @interface ERC1155TransferPayload
94
+ * @typedef {ERC1155TransferPayload}
95
+ */
96
+ export interface ERC1155TransferPayload {
97
+ /**
98
+ * The token ID to transfer
99
+ *
100
+ * @type {bigint}
101
+ */
102
+ tokenId: bigint;
103
+ /**
104
+ * The amount to transfer
105
+ *
106
+ * @type {bigint}
107
+ */
108
+ amount: bigint;
109
+ /**
110
+ * The address of the asset to target
111
+ *
112
+ * @type {Address}
113
+ */
114
+ asset: Address;
115
+ /**
116
+ * The account to transfer from
117
+ *
118
+ * @type {Address}
119
+ */
120
+ target: Address;
121
+ }
122
+ /**
123
+ * Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.
124
+ * The caller must have already approved the contract to transfer the asset.
125
+ *
126
+ * @export
127
+ * @param {ERC1155TransferPayload} param0
128
+ * @param {bigint} param0.tokenId - The token ID to transfer
129
+ * @param {bigint} param0.amount - The amount to transfer
130
+ * @param {Address} param0.asset - The address of the asset to target
131
+ * @param {Address} param0.target - The account to transfer from
132
+ * @returns {Hex}
133
+ */
134
+ export declare function prepareERC1155Transfer({ tokenId, amount, asset, target, }: ERC1155TransferPayload): `0x${string}`;
135
+ /**
136
+ * An object representation of the `FungiblePayload` struct
137
+ *
138
+ * @export
139
+ * @interface FungiblePayload
140
+ * @typedef {FungiblePayload}
141
+ */
142
+ export interface FungiblePayload {
143
+ /**
144
+ * The amount being transferred
145
+ *
146
+ * @type {bigint}
147
+ */
148
+ amount: bigint;
149
+ }
150
+ /**
151
+ * Encodes an amount for the `FungiblePayload` struct
152
+ *
153
+ * @export
154
+ * @param {FungiblePayload} param0
155
+ * @param {bigint} param0.amount - The amount being transferred
156
+ * @returns {*}
157
+ */
158
+ export declare function prepareFungiblePayload({ amount }: FungiblePayload): `0x${string}`;
159
+ /**
160
+ * An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.
161
+ *
162
+ * @export
163
+ * @interface FungibleTransferPayload
164
+ * @typedef {FungibleTransferPayload}
165
+ */
166
+ export interface FungibleTransferPayload {
167
+ /**
168
+ * The amount to transfer
169
+ *
170
+ * @type {bigint}
171
+ */
172
+ amount: bigint;
173
+ /**
174
+ * The address of the asset. Use zero address for ETH transfers.
175
+ *
176
+ * @type {Address}
177
+ */
178
+ asset: Address;
179
+ /**
180
+ * The account to transfer from
181
+ *
182
+ * @type {Address}
183
+ */
184
+ target: Address;
185
+ }
186
+ /**
187
+ * Encodes parameters for a Fungible transfer, used for Budget allocations.
188
+ * The caller must have already approved the contract to transfer the asset.
189
+ *
190
+ * @export
191
+ * @param {FungibleTransferPayload} param0
192
+ * @param {bigint} param0.amount - The amount to transfer
193
+ * @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.
194
+ * @param {Address} param0.target - The account to transfer from
195
+ * @returns {Hex}
196
+ */
197
+ export declare function prepareFungibleTransfer({ amount, asset, target, }: FungibleTransferPayload): `0x${string}`;
198
+ //# sourceMappingURL=transfers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../src/transfers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAEd;;;;;GAKG;AACH,oBAAY,SAAS;IACnB,GAAG,IAAA;IACH,KAAK,IAAA;IACL,OAAO,IAAA;CACR;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,0CAKhC,eAAe,kBAUjB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,iBAQxE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,sBAAsB,iBAexB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe,iBAQjE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,iBAezB"}
@@ -0,0 +1,84 @@
1
+ import { encodeAbiParameters as t, parseAbiParameters as n, zeroAddress as d } from "viem";
2
+ var u = /* @__PURE__ */ ((a) => (a[a.ETH = 0] = "ETH", a[a.ERC20 = 1] = "ERC20", a[a.ERC1155 = 2] = "ERC1155", a))(u || {});
3
+ const y = ({
4
+ assetType: a,
5
+ address: e,
6
+ target: r,
7
+ data: s
8
+ }) => t(
9
+ [
10
+ { type: "uint8", name: "assetType" },
11
+ { type: "address", name: "asset" },
12
+ { type: "address", name: "target" },
13
+ { type: "bytes", name: "data" }
14
+ ],
15
+ [a, e, r, s]
16
+ );
17
+ function o({ tokenId: a, amount: e }) {
18
+ return t(
19
+ n([
20
+ "ERC1155Payload payload",
21
+ "struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }"
22
+ ]),
23
+ [{ tokenId: a, amount: e, data: "0x" }]
24
+ );
25
+ }
26
+ function l({
27
+ tokenId: a,
28
+ amount: e,
29
+ asset: r,
30
+ target: s
31
+ }) {
32
+ return t(
33
+ n([
34
+ "Transfer request",
35
+ "struct Transfer { uint8 assetType; address asset; address target; bytes data; }"
36
+ ]),
37
+ [
38
+ {
39
+ assetType: 2,
40
+ asset: r,
41
+ data: o({ tokenId: a, amount: e }),
42
+ target: s
43
+ }
44
+ ]
45
+ );
46
+ }
47
+ function p({ amount: a }) {
48
+ return t(
49
+ n([
50
+ "FungiblePayload payload",
51
+ "struct FungiblePayload { uint256 amount; }"
52
+ ]),
53
+ [{ amount: a }]
54
+ );
55
+ }
56
+ function f({
57
+ amount: a,
58
+ asset: e,
59
+ target: r
60
+ }) {
61
+ return t(
62
+ n([
63
+ "Transfer request",
64
+ "struct Transfer { uint8 assetType; address asset; address target; bytes data; }"
65
+ ]),
66
+ [
67
+ {
68
+ assetType: e == d ? 0 : 1,
69
+ asset: e,
70
+ data: p({ amount: a }),
71
+ target: r
72
+ }
73
+ ]
74
+ );
75
+ }
76
+ export {
77
+ u as AssetType,
78
+ o as prepareERC1155Payload,
79
+ l as prepareERC1155Transfer,
80
+ p as prepareFungiblePayload,
81
+ f as prepareFungibleTransfer,
82
+ y as prepareTransferPayload
83
+ };
84
+ //# sourceMappingURL=transfers.js.map