@boostxyz/sdk 0.0.0-alpha.8 → 1.1.0-alpha.22
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.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +7 -7
- package/dist/Actions/ContractAction.d.ts +57 -14
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +50 -23
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +420 -45
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -225
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.d.ts +6 -4
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +45 -23
- package/dist/AllowLists/AllowList.js.map +1 -1
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +123 -39
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +75 -76
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +11 -200
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +105 -14
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +137 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BVZExPPu.js +1462 -0
- package/dist/BoostCore-BVZExPPu.js.map +1 -0
- package/dist/BoostCore-D-E-cnGI.cjs +3 -0
- package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +759 -82
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1148
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +83 -28
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +170 -93
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +112 -192
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +89 -290
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +277 -91
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +6 -8
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +3 -5
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +13 -13
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +30 -27
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-BZt5cjbe.cjs +2 -0
- package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
- package/dist/EventAction-C_-hJXWm.js +1541 -0
- package/dist/EventAction-C_-hJXWm.js.map +1 -0
- package/dist/Incentive-BhHaK3PZ.cjs +2 -0
- package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
- package/dist/Incentive-Cqg1w6wD.js +312 -0
- package/dist/Incentive-Cqg1w6wD.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +73 -21
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +61 -36
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +323 -26
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +73 -39
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +291 -43
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +278 -33
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +79 -47
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +346 -420
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +271 -32
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +4 -4
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +16 -280
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +89 -23
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +66 -36
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
- package/dist/SimpleDenyList-CGaWjuld.js +132 -0
- package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +310 -17
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +164 -36
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +44 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +257 -21
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +183 -26
- package/dist/errors.js.map +1 -1
- package/dist/{generated-Cbv8zFkf.js → generated-CKt2yCQd.js} +3615 -1868
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -126
- package/dist/index.js.map +1 -1
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +25 -1380
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +36 -648
- package/dist/utils.js.map +1 -1
- package/package.json +34 -10
- package/src/Actions/Action.test.ts +19 -17
- package/src/Actions/ContractAction.test.ts +14 -16
- package/src/Actions/ContractAction.ts +84 -22
- package/src/Actions/ERC721MintAction.test.ts +8 -8
- package/src/Actions/ERC721MintAction.ts +83 -30
- package/src/Actions/EventAction.test.ts +759 -113
- package/src/Actions/EventAction.ts +991 -116
- package/src/AllowLists/AllowList.test.ts +7 -7
- package/src/AllowLists/AllowList.ts +5 -3
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +4 -4
- package/src/AllowLists/SimpleAllowList.ts +86 -65
- package/src/AllowLists/SimpleDenyList.test.ts +4 -4
- package/src/AllowLists/SimpleDenyList.ts +87 -126
- package/src/Auth/PassthroughAuth.test.ts +1 -1
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +147 -15
- package/src/BoostCore.test.ts +326 -278
- package/src/BoostCore.ts +425 -242
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +168 -50
- package/src/Budgets/Budget.test.ts +2 -2
- package/src/Budgets/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.test.ts +82 -19
- package/src/Budgets/ManagedBudget.ts +106 -315
- package/src/Budgets/VestingBudget.test.ts +7 -7
- package/src/Budgets/VestingBudget.ts +110 -112
- package/src/Deployable/Contract.ts +5 -6
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +32 -21
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +7 -10
- package/src/Incentives/AllowListIncentive.ts +88 -30
- package/src/Incentives/CGDAIncentive.test.ts +11 -12
- package/src/Incentives/CGDAIncentive.ts +161 -37
- package/src/Incentives/ERC1155Incentive.test.ts +5 -16
- package/src/Incentives/ERC1155Incentive.ts +132 -51
- package/src/Incentives/ERC20Incentive.test.ts +15 -23
- package/src/Incentives/ERC20Incentive.ts +131 -46
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +12 -35
- package/src/Incentives/ERC20VariableIncentive.ts +118 -43
- package/src/Incentives/Incentive.test.ts +5 -2
- package/src/Incentives/Incentive.ts +7 -6
- package/src/Incentives/PointsIncentive.test.ts +26 -30
- package/src/Incentives/PointsIncentive.ts +110 -34
- package/src/Validators/SignerValidator.test.ts +9 -13
- package/src/Validators/SignerValidator.ts +437 -26
- package/src/Validators/Validator.test.ts +2 -2
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +56 -0
- package/src/errors.ts +346 -22
- package/src/index.test.ts +118 -36
- package/src/index.ts +15 -7
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +2 -2
- package/src/utils.ts +61 -2061
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-DYkaxBda.js +0 -13
- package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
- package/dist/generated-BzszviNp.cjs +0 -3
- package/dist/generated-BzszviNp.cjs.map +0 -1
- package/dist/generated-Cbv8zFkf.js.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -521
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./BoostRegistry.cjs"),a=require("./BoostCore-D-E-cnGI.cjs"),y=require("./Boost.cjs"),E=require("./Actions/Action.cjs"),o=require("./EventAction-BZt5cjbe.cjs"),p=require("./AllowLists/AllowList.cjs"),c=require("./AllowLists/SimpleAllowList.cjs"),A=require("./SimpleDenyList-BUR17Tt1.cjs"),u=require("./Budgets/Budget.cjs"),t=require("./Budgets/ManagedBudget.cjs"),R=require("./Deployable/Deployable.cjs"),m=require("./Deployable/Contract.cjs"),D=require("./Deployable/DeployableTarget.cjs"),C=require("./Deployable/DeployableTargetWithRBAC.cjs"),g=require("./Incentives/AllowListIncentive.cjs"),I=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),l=require("./Incentive-BhHaK3PZ.cjs"),P=require("./Incentives/PointsIncentive.cjs"),d=require("./Validators/SignerValidator.cjs"),S=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),n=require("./utils.cjs"),b=require("./claiming.cjs"),i=require("./transfers.cjs"),B=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-CyTNlOwM.cjs");exports.BOOST_REGISTRY_ADDRESS=s.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=s.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=s.BoostRegistry;exports.BOOST_CORE_ADDRESS=a.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=a.BOOST_CORE_ADDRESSES;exports.BOOST_CORE_CLAIM_FEE=a.BOOST_CORE_CLAIM_FEE;exports.BoostCore=a.BoostCore;exports.ERC20VariableCriteriaIncentive=a.ERC20VariableCriteriaIncentive;exports.prepareERC20VariableCriteriaIncentivePayload=a.prepareERC20VariableCriteriaIncentivePayload;exports.Boost=y.Boost;exports.prepareBoostPayload=y.prepareBoostPayload;exports.ActionByComponentInterface=E.ActionByComponentInterface;exports.actionFromAddress=E.actionFromAddress;exports.EventAction=o.EventAction;exports.FilterType=o.FilterType;exports.PrimitiveType=o.PrimitiveType;exports.SignatureType=o.SignatureType;exports.anyActionParameter=o.anyActionParameter;exports.isEventActionPayloadSimple=o.isEventActionPayloadSimple;exports.prepareEventActionPayload=o.prepareEventActionPayload;exports.AllowListByComponentInterface=p.AllowListByComponentInterface;exports.OpenAllowList=p.OpenAllowList;exports.allowListFromAddress=p.allowListFromAddress;exports.LIST_MANAGER_ROLE=c.LIST_MANAGER_ROLE;exports.SimpleAllowList=c.SimpleAllowList;exports.prepareSimpleAllowListPayload=c.prepareSimpleAllowListPayload;exports.SimpleDenyList=A.SimpleDenyList;exports.prepareSimpleDenyListPayload=A.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=u.BudgetByComponentInterface;exports.budgetFromAddress=u.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=R.Deployable;exports.Contract=m.Contract;exports.DeployableTarget=D.DeployableTarget;exports.DeployableTargetWithRBAC=C.DeployableTargetWithRBAC;exports.Roles=C.Roles;exports.AllowListIncentive=g.AllowListIncentive;exports.prepareAllowListIncentivePayload=g.prepareAllowListIncentivePayload;exports.CGDAIncentive=I.CGDAIncentive;exports.prepareCGDAIncentivePayload=I.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=l.ERC20VariableIncentive;exports.IncentiveByComponentInterface=l.IncentiveByComponentInterface;exports.incentiveFromAddress=l.incentiveFromAddress;exports.prepareERC20VariableIncentivePayload=l.prepareERC20VariableIncentivePayload;exports.PointsIncentive=P.PointsIncentive;exports.preparePointsIncentivePayload=P.preparePointsIncentivePayload;exports.SignerValidator=d.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=d.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=d.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=d.prepareSignerValidatorPayload;exports.ValidatorByComponentInterface=S.ValidatorByComponentInterface;exports.validatorFromAddress=S.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.RegistryType=n.RegistryType;exports.assertValidAddressByChainId=n.assertValidAddressByChainId;exports.awaitResult=n.awaitResult;exports.bytes4=n.bytes4;exports.getDeployedContractAddress=n.getDeployedContractAddress;exports.StrategyType=b.StrategyType;exports.prepareClaimPayload=b.prepareClaimPayload;exports.AssetType=i.AssetType;exports.prepareERC1155Payload=i.prepareERC1155Payload;exports.prepareERC1155Transfer=i.prepareERC1155Transfer;exports.prepareFungiblePayload=i.prepareFungiblePayload;exports.prepareFungibleTransfer=i.prepareFungibleTransfer;exports.prepareTransferPayload=i.prepareTransferPayload;exports.PassthroughAuth=B.PassthroughAuth;exports.allowListIncentiveAbi=r.R;exports.boostCoreAbi=r.T;exports.boostRegistryAbi=r.ie;exports.cgdaIncentiveAbi=r.b;exports.erc20IncentiveAbi=r.y;exports.erc20VariableIncentiveAbi=r.f;exports.managedBudgetAbi=r.d;exports.passthroughAuthAbi=r.xe;exports.pointsIncentiveAbi=r.w;exports.rbacAbi=r.z;exports.signerValidatorAbi=r.x;exports.simpleAllowListAbi=r.N;exports.simpleDenyListAbi=r.g;
|
|
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';
|
|
@@ -15,11 +11,20 @@ export * from './Budgets/ManagedBudget';
|
|
|
15
11
|
export * from './Deployable/Deployable';
|
|
16
12
|
export * from './Deployable/Contract';
|
|
17
13
|
export * from './Deployable/DeployableTarget';
|
|
14
|
+
export * from './Deployable/DeployableTargetWithRBAC';
|
|
18
15
|
export * from './Incentives/AllowListIncentive';
|
|
19
16
|
export * from './Incentives/CGDAIncentive';
|
|
20
17
|
export * from './Incentives/ERC20Incentive';
|
|
18
|
+
export * from './Incentives/ERC20VariableIncentive';
|
|
19
|
+
export * from './Incentives/ERC20VariableCriteriaIncentive';
|
|
21
20
|
export * from './Incentives/Incentive';
|
|
22
21
|
export * from './Incentives/PointsIncentive';
|
|
23
22
|
export * from './Validators/SignerValidator';
|
|
24
23
|
export * from './Validators/Validator';
|
|
24
|
+
export * from './errors';
|
|
25
|
+
export * from './utils';
|
|
26
|
+
export * from './claiming';
|
|
27
|
+
export * from './transfers';
|
|
28
|
+
export * from './Auth/Auth';
|
|
29
|
+
export * from './Auth/PassthroughAuth';
|
|
25
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAC9C,cAAc,uCAAuC,CAAC;AAItD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAE5D,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAI5B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,130 +1,147 @@
|
|
|
1
|
-
import { BOOST_REGISTRY_ADDRESS as o,
|
|
2
|
-
import {
|
|
3
|
-
import { Boost as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
1
|
+
import { BOOST_REGISTRY_ADDRESS as o, BOOST_REGISTRY_ADDRESSES as a, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
|
+
import { a as n, b as p, B as s, c as l, E as d, p as E } from "./BoostCore-BVZExPPu.js";
|
|
3
|
+
import { Boost as y, prepareBoostPayload as c } from "./Boost.js";
|
|
4
|
+
import { ActionByComponentInterface as f, actionFromAddress as C } from "./Actions/Action.js";
|
|
5
|
+
import { E as g, F as I, P as v, S as P, a as S, i as R, p as u } from "./EventAction-C_-hJXWm.js";
|
|
6
|
+
import { AllowListByComponentInterface as B, OpenAllowList as D, allowListFromAddress as T } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as L, SimpleAllowList as O, prepareSimpleAllowListPayload as V } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { S as _, p as h } from "./SimpleDenyList-CGaWjuld.js";
|
|
9
|
+
import { BudgetByComponentInterface as N, budgetFromAddress as U } from "./Budgets/Budget.js";
|
|
10
|
+
import { ManagedBudget as z, ManagedBudgetRoles as k, isERC1155TransferPayload as q, isFungibleTransfer as W, prepareManagedBudgetPayload as Y, prepareTransfer as j } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as J } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as Q } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as Z } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { DeployableTargetWithRBAC as ee, Roles as re } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
15
|
+
import { AllowListIncentive as ae, prepareAllowListIncentivePayload as te } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as ne, prepareCGDAIncentivePayload as pe } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as le, prepareERC20IncentivePayload as de } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { E as me, I as ye, i as ce, p as Ae } from "./Incentive-Cqg1w6wD.js";
|
|
19
|
+
import { PointsIncentive as Ce, preparePointsIncentivePayload as be } from "./Incentives/PointsIncentive.js";
|
|
20
|
+
import { SignerValidator as Ie, prepareSignerValidatorClaimDataPayload as ve, prepareSignerValidatorInputParams as Pe, prepareSignerValidatorPayload as Se } from "./Validators/SignerValidator.js";
|
|
21
|
+
import { ValidatorByComponentInterface as ue, validatorFromAddress as xe } from "./Validators/Validator.js";
|
|
22
|
+
import { BoostCoreNoIdentifierEmitted as De, BoostNotFoundError as Te, BudgetMustAuthorizeBoostCore as Fe, ContractAddressRequiredError as Le, DecodedArgsError as Oe, DecodedArgsMalformedError as Ve, DeployableAlreadyDeployedError as we, DeployableBuildParametersUnspecifiedError as _e, DeployableMissingPayloadError as he, DeployableUnknownOwnerProvidedError as Me, DeployableWagmiConfigurationRequiredError as Ne, FieldActionValidationError as Ue, FieldValueNotComparableError as Ge, FieldValueUndefinedError as ze, FunctionDataDecodeError as ke, IncentiveCriteriaNotFoundError as qe, IncentiveNotCloneableError as We, InvalidComponentInterfaceError as Ye, InvalidCriteriaTypeError as je, InvalidNumericalCriteriaError as He, InvalidProtocolChainIdError as Je, MustInitializeBudgetError as Ke, NoConnectedChainIdError as Qe, NoContractAddressUponReceiptError as Xe, NoEventActionStepsProvidedError as Ze, NoMatchingLogsError as $e, TooManyEventActionStepsProvidedError as er, UnknownTransferPayloadSupplied as rr, UnparseableAbiParamError as or, UnrecognizedFilterTypeError as ar, ValidationAbiMissingError as tr } from "./errors.js";
|
|
23
|
+
import { RegistryType as nr, assertValidAddressByChainId as pr, awaitResult as sr, bytes4 as lr, getDeployedContractAddress as dr } from "./utils.js";
|
|
24
|
+
import { StrategyType as mr, prepareClaimPayload as yr } from "./claiming.js";
|
|
25
|
+
import { AssetType as Ar, prepareERC1155Payload as fr, prepareERC1155Transfer as Cr, prepareFungiblePayload as br, prepareFungibleTransfer as gr, prepareTransferPayload as Ir } from "./transfers.js";
|
|
26
|
+
import { PassthroughAuth as Pr } from "./Auth/PassthroughAuth.js";
|
|
27
|
+
import { R as Rr, T as ur, i as xr, b as Br, y as Dr, f as Tr, d as Fr, a as Lr, w as Or, z as Vr, x as wr, N as _r, g as hr } from "./generated-CKt2yCQd.js";
|
|
25
28
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
f as ActionByComponentInterface,
|
|
30
|
+
B as AllowListByComponentInterface,
|
|
31
|
+
ae as AllowListIncentive,
|
|
32
|
+
Ar as AssetType,
|
|
33
|
+
n as BOOST_CORE_ADDRESS,
|
|
34
|
+
p as BOOST_CORE_ADDRESSES,
|
|
35
|
+
s as BOOST_CORE_CLAIM_FEE,
|
|
31
36
|
o as BOOST_REGISTRY_ADDRESS,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
D as
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_ as
|
|
87
|
-
mr as
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
37
|
+
a as BOOST_REGISTRY_ADDRESSES,
|
|
38
|
+
y as Boost,
|
|
39
|
+
l as BoostCore,
|
|
40
|
+
De as BoostCoreNoIdentifierEmitted,
|
|
41
|
+
Te as BoostNotFoundError,
|
|
42
|
+
t as BoostRegistry,
|
|
43
|
+
N as BudgetByComponentInterface,
|
|
44
|
+
Fe as BudgetMustAuthorizeBoostCore,
|
|
45
|
+
ne as CGDAIncentive,
|
|
46
|
+
Q as Contract,
|
|
47
|
+
Le as ContractAddressRequiredError,
|
|
48
|
+
Oe as DecodedArgsError,
|
|
49
|
+
Ve as DecodedArgsMalformedError,
|
|
50
|
+
J as Deployable,
|
|
51
|
+
we as DeployableAlreadyDeployedError,
|
|
52
|
+
_e as DeployableBuildParametersUnspecifiedError,
|
|
53
|
+
he as DeployableMissingPayloadError,
|
|
54
|
+
Z as DeployableTarget,
|
|
55
|
+
ee as DeployableTargetWithRBAC,
|
|
56
|
+
Me as DeployableUnknownOwnerProvidedError,
|
|
57
|
+
Ne as DeployableWagmiConfigurationRequiredError,
|
|
58
|
+
le as ERC20Incentive,
|
|
59
|
+
d as ERC20VariableCriteriaIncentive,
|
|
60
|
+
me as ERC20VariableIncentive,
|
|
61
|
+
g as EventAction,
|
|
62
|
+
Ue as FieldActionValidationError,
|
|
63
|
+
Ge as FieldValueNotComparableError,
|
|
64
|
+
ze as FieldValueUndefinedError,
|
|
65
|
+
I as FilterType,
|
|
66
|
+
ke as FunctionDataDecodeError,
|
|
67
|
+
ye as IncentiveByComponentInterface,
|
|
68
|
+
qe as IncentiveCriteriaNotFoundError,
|
|
69
|
+
We as IncentiveNotCloneableError,
|
|
70
|
+
Ye as InvalidComponentInterfaceError,
|
|
71
|
+
je as InvalidCriteriaTypeError,
|
|
72
|
+
He as InvalidNumericalCriteriaError,
|
|
73
|
+
Je as InvalidProtocolChainIdError,
|
|
74
|
+
L as LIST_MANAGER_ROLE,
|
|
75
|
+
z as ManagedBudget,
|
|
76
|
+
k as ManagedBudgetRoles,
|
|
77
|
+
Ke as MustInitializeBudgetError,
|
|
78
|
+
Qe as NoConnectedChainIdError,
|
|
79
|
+
Xe as NoContractAddressUponReceiptError,
|
|
80
|
+
Ze as NoEventActionStepsProvidedError,
|
|
81
|
+
$e as NoMatchingLogsError,
|
|
82
|
+
D as OpenAllowList,
|
|
83
|
+
Pr as PassthroughAuth,
|
|
84
|
+
Ce as PointsIncentive,
|
|
85
|
+
v as PrimitiveType,
|
|
86
|
+
nr as RegistryType,
|
|
87
|
+
re as Roles,
|
|
88
|
+
P as SignatureType,
|
|
89
|
+
Ie as SignerValidator,
|
|
90
|
+
O as SimpleAllowList,
|
|
91
|
+
_ as SimpleDenyList,
|
|
92
|
+
mr as StrategyType,
|
|
93
|
+
er as TooManyEventActionStepsProvidedError,
|
|
94
|
+
rr as UnknownTransferPayloadSupplied,
|
|
95
|
+
or as UnparseableAbiParamError,
|
|
96
|
+
ar as UnrecognizedFilterTypeError,
|
|
97
|
+
tr as ValidationAbiMissingError,
|
|
98
|
+
ue as ValidatorByComponentInterface,
|
|
99
|
+
C as actionFromAddress,
|
|
100
|
+
T as allowListFromAddress,
|
|
101
|
+
Rr as allowListIncentiveAbi,
|
|
102
|
+
S as anyActionParameter,
|
|
103
|
+
pr as assertValidAddressByChainId,
|
|
104
|
+
sr as awaitResult,
|
|
105
|
+
ur as boostCoreAbi,
|
|
106
|
+
xr as boostRegistryAbi,
|
|
107
|
+
U as budgetFromAddress,
|
|
108
|
+
lr as bytes4,
|
|
109
|
+
Br as cgdaIncentiveAbi,
|
|
110
|
+
Dr as erc20IncentiveAbi,
|
|
111
|
+
Tr as erc20VariableIncentiveAbi,
|
|
112
|
+
dr as getDeployedContractAddress,
|
|
113
|
+
ce as incentiveFromAddress,
|
|
114
|
+
q as isERC1155TransferPayload,
|
|
115
|
+
R as isEventActionPayloadSimple,
|
|
116
|
+
W as isFungibleTransfer,
|
|
117
|
+
Fr as managedBudgetAbi,
|
|
118
|
+
Lr as passthroughAuthAbi,
|
|
119
|
+
Or as pointsIncentiveAbi,
|
|
120
|
+
te as prepareAllowListIncentivePayload,
|
|
121
|
+
c as prepareBoostPayload,
|
|
122
|
+
pe as prepareCGDAIncentivePayload,
|
|
123
|
+
yr as prepareClaimPayload,
|
|
124
|
+
fr as prepareERC1155Payload,
|
|
125
|
+
Cr as prepareERC1155Transfer,
|
|
126
|
+
de as prepareERC20IncentivePayload,
|
|
127
|
+
E as prepareERC20VariableCriteriaIncentivePayload,
|
|
128
|
+
Ae as prepareERC20VariableIncentivePayload,
|
|
129
|
+
u as prepareEventActionPayload,
|
|
130
|
+
br as prepareFungiblePayload,
|
|
131
|
+
gr as prepareFungibleTransfer,
|
|
132
|
+
Y as prepareManagedBudgetPayload,
|
|
133
|
+
be as preparePointsIncentivePayload,
|
|
134
|
+
ve as prepareSignerValidatorClaimDataPayload,
|
|
135
|
+
Pe as prepareSignerValidatorInputParams,
|
|
136
|
+
Se as prepareSignerValidatorPayload,
|
|
137
|
+
V as prepareSimpleAllowListPayload,
|
|
138
|
+
h as prepareSimpleDenyListPayload,
|
|
139
|
+
j as prepareTransfer,
|
|
140
|
+
Ir as prepareTransferPayload,
|
|
141
|
+
Vr as rbacAbi,
|
|
142
|
+
wr as signerValidatorAbi,
|
|
143
|
+
_r as simpleAllowListAbi,
|
|
144
|
+
hr as simpleDenyListAbi,
|
|
145
|
+
xe as validatorFromAddress
|
|
129
146
|
};
|
|
130
147
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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 {Hex}\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 {Hex}
|
|
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"}
|