@boostxyz/sdk 7.1.0 → 7.3.0

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/index.js CHANGED
@@ -1,194 +1,198 @@
1
- import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as i } from "./BoostRegistry.js";
1
+ import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as i, BoostRegistry as o } from "./BoostRegistry.js";
2
2
  import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as p, FEE_DENOMINATOR as l } from "./BoostCore.js";
3
3
  import { Boost as c, prepareBoostPayload as g } from "./Boost.js";
4
4
  import { ActionByComponentInterface as E, actionFromAddress as A } from "./Actions/Action.js";
5
- import { EventAction as y, FilterType as b, PrimitiveType as I, SignatureType as v, ValueType as f, anyActionParameter as P, decodeAndReorderLogArgs as R, detectSignatureType as u, isEventActionPayloadSimple as V, packFieldIndexes as S, prepareEventActionPayload as B, transactionSenderClaimant as x, unpackFieldIndexes as T } from "./Actions/EventAction.js";
6
- import { AllowListByComponentInterface as F, OpenAllowList as L, allowListFromAddress as h } from "./AllowLists/AllowList.js";
7
- import { LIST_MANAGER_ROLE as O, SimpleAllowList as N, prepareSimpleAllowListPayload as w } from "./AllowLists/SimpleAllowList.js";
8
- import { S as U, p as W } from "./SimpleDenyList-BlLgvhjE.js";
9
- import { B as k, M as z, a as q, T as Y, b as j, p as H, c as J } from "./Budget-B-grnRq9.js";
10
- import { ManagedBudget as Q, ManagedBudgetRoles as X, isERC1155TransferPayload as Z, isFungibleTransfer as $, prepareManagedBudgetPayload as ee, prepareTransfer as re } from "./Budgets/ManagedBudget.js";
11
- import { Deployable as oe } from "./Deployable/Deployable.js";
12
- import { Contract as te } from "./Deployable/Contract.js";
13
- import { DeployableTarget as de } from "./Deployable/DeployableTarget.js";
14
- import { DeployableTargetWithRBAC as le, Roles as se } from "./Deployable/DeployableTargetWithRBAC.js";
15
- import { AllowListIncentive as ge, prepareAllowListIncentivePayload as me } from "./Incentives/AllowListIncentive.js";
16
- import { CGDAIncentive as Ae, prepareCGDAIncentivePayload as Ce } from "./Incentives/CGDAIncentive.js";
17
- import { ERC20Incentive as be, prepareERC20IncentivePayload as Ie } from "./Incentives/ERC20Incentive.js";
18
- import { E as fe, I as Pe, i as Re, p as ue } from "./Incentive-Bz_g-nID.js";
19
- import { ERC20VariableIncentive as Se, prepareERC20VariableIncentivePayload as Be } from "./Incentives/ERC20VariableIncentive.js";
20
- import { ERC20VariableCriteriaIncentive as Te, gasRebateIncentiveCriteria as De, prepareERC20VariableCriteriaIncentivePayload as Fe } from "./Incentives/ERC20VariableCriteriaIncentive.js";
21
- import { ERC20PeggedVariableCriteriaIncentive as he, prepareERC20PeggedVariableCriteriaIncentivePayload as Me } from "./Incentives/ERC20PeggedVariableCriteriaIncentive.js";
22
- import { ERC20VariableCriteriaIncentiveV2 as Ne, gasRebateIncentiveCriteriaV2 as we, prepareERC20VariableCriteriaIncentiveV2Payload as _e } from "./Incentives/ERC20VariableCriteriaIncentiveV2.js";
23
- import { ERC20PeggedVariableCriteriaIncentiveV2 as We, prepareERC20PeggedVariableCriteriaIncentiveV2Payload as Ge } from "./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js";
24
- import { PointsIncentive as ze, preparePointsIncentivePayload as qe } from "./Incentives/PointsIncentive.js";
25
- import { SignerValidator as je, prepareSignerValidatorClaimDataPayload as He, prepareSignerValidatorInputParams as Je, prepareSignerValidatorPayload as Ke } from "./Validators/SignerValidator.js";
26
- import { LimitedSignerValidator as Xe, prepareLimitedSignerValidatorClaimDataPayload as Ze, prepareLimitedSignerValidatorInputParams as $e, prepareLimitedSignerValidatorPayload as er } from "./Validators/LimitedSignerValidator.js";
27
- import { BoostValidatorEOA as ar, ValidatorByComponentInterface as or, decodeClaimData as ir, validatorFromAddress as tr } from "./Validators/Validator.js";
28
- import { BoostCoreNoIdentifierEmitted as dr, BoostNotFoundError as pr, BudgetMustAuthorizeBoostCore as lr, ContractAddressRequiredError as sr, DecodedArgsError as cr, DecodedArgsMalformedError as gr, DeployableAlreadyDeployedError as mr, DeployableBuildParametersUnspecifiedError as Er, DeployableMissingPayloadError as Ar, DeployableUnknownOwnerProvidedError as Cr, DeployableWagmiConfigurationRequiredError as yr, FieldActionValidationError as br, FieldValueNotComparableError as Ir, FieldValueUndefinedError as vr, FunctionDataDecodeError as fr, IncentiveCriteriaNotFoundError as Pr, IncentiveNotCloneableError as Rr, InvalidComponentInterfaceError as ur, InvalidCriteriaTypeError as Vr, InvalidNumericalCriteriaError as Sr, InvalidProtocolChainIdError as Br, InvalidTupleDecodingError as xr, InvalidTupleEncodingError as Tr, MustInitializeBudgetError as Dr, NoConnectedChainIdError as Fr, NoContractAddressUponReceiptError as Lr, NoEventActionStepsProvidedError as hr, NoMatchingLogsError as Mr, TooManyEventActionStepsProvidedError as Or, UnknownTransferPayloadSupplied as Nr, UnparseableAbiParamError as wr, UnrecognizedFilterTypeError as _r, ValidationAbiMissingError as Ur } from "./errors.js";
29
- import { CheatCodes as Gr, RegistryType as kr, TRANSFER_SIGNATURE as zr, assertValidAddressByChainId as qr, awaitResult as Yr, bytes4 as jr, getDeployedContractAddress as Hr, getErc20Balance as Jr } from "./utils.js";
30
- import { StrategyType as Qr, prepareClaimPayload as Xr } from "./claiming.js";
31
- import { AssetType as $r, prepareERC1155Payload as ea, prepareERC1155Transfer as ra, prepareFungiblePayload as aa, prepareFungibleTransfer as oa, prepareTransferPayload as ia } from "./transfers.js";
32
- import { PassthroughAuth as na } from "./Auth/PassthroughAuth.js";
33
- import { _ as pa, M as la, A as sa, E as ca, T as ga, g as ma, y as Ea, d as Aa, c as Ca, m as ya, R as ba, D as Ia, C as va, p as fa, r as Pa, a as Ra, z as ua, S as Va, G as Sa, F as Ba, k as xa, b as Ta } from "./generated-CINzoGbl.js";
5
+ import { EventAction as y, FilterType as I, PrimitiveType as b, SignatureType as v, ValueType as f, anyActionParameter as P, decodeAndReorderLogArgs as u, detectSignatureType as R, getScalarValueFromTuple as V, isCriteriaFieldIndexTuple as S, isEventActionPayloadSimple as x, packCriteriaFieldIndexes as B, packFieldIndexes as T, prepareEventActionPayload as D, transactionSenderClaimant as F, unpackCriteriaFieldIndexes as L, unpackFieldIndexes as h } from "./Actions/EventAction.js";
6
+ import { AllowListByComponentInterface as O, OpenAllowList as N, allowListFromAddress as w } from "./AllowLists/AllowList.js";
7
+ import { LIST_MANAGER_ROLE as U, SimpleAllowList as W, prepareSimpleAllowListPayload as k } from "./AllowLists/SimpleAllowList.js";
8
+ import { S as z, p as q } from "./SimpleDenyList-BlLgvhjE.js";
9
+ import { B as j, M as H, a as J, T as K, b as Q, p as X, c as Z } from "./Budget-B-grnRq9.js";
10
+ import { ManagedBudget as ee, ManagedBudgetRoles as re, isERC1155TransferPayload as ae, isFungibleTransfer as ie, prepareManagedBudgetPayload as oe, prepareTransfer as te } from "./Budgets/ManagedBudget.js";
11
+ import { Deployable as de } from "./Deployable/Deployable.js";
12
+ import { Contract as le } from "./Deployable/Contract.js";
13
+ import { DeployableTarget as ce } from "./Deployable/DeployableTarget.js";
14
+ import { DeployableTargetWithRBAC as me, Roles as Ee } from "./Deployable/DeployableTargetWithRBAC.js";
15
+ import { AllowListIncentive as Ce, prepareAllowListIncentivePayload as ye } from "./Incentives/AllowListIncentive.js";
16
+ import { CGDAIncentive as be, prepareCGDAIncentivePayload as ve } from "./Incentives/CGDAIncentive.js";
17
+ import { ERC20Incentive as Pe, prepareERC20IncentivePayload as ue } from "./Incentives/ERC20Incentive.js";
18
+ import { E as Ve, I as Se, i as xe, p as Be } from "./Incentive-Bz_g-nID.js";
19
+ import { ERC20VariableIncentive as De, prepareERC20VariableIncentivePayload as Fe } from "./Incentives/ERC20VariableIncentive.js";
20
+ import { ERC20VariableCriteriaIncentive as he, gasRebateIncentiveCriteria as Me, prepareERC20VariableCriteriaIncentivePayload as Oe } from "./Incentives/ERC20VariableCriteriaIncentive.js";
21
+ import { ERC20PeggedVariableCriteriaIncentive as we, prepareERC20PeggedVariableCriteriaIncentivePayload as _e } from "./Incentives/ERC20PeggedVariableCriteriaIncentive.js";
22
+ import { ERC20VariableCriteriaIncentiveV2 as We, gasRebateIncentiveCriteriaV2 as ke, prepareERC20VariableCriteriaIncentiveV2Payload as Ge } from "./Incentives/ERC20VariableCriteriaIncentiveV2.js";
23
+ import { ERC20PeggedVariableCriteriaIncentiveV2 as qe, prepareERC20PeggedVariableCriteriaIncentiveV2Payload as Ye } from "./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js";
24
+ import { PointsIncentive as He, preparePointsIncentivePayload as Je } from "./Incentives/PointsIncentive.js";
25
+ import { SignerValidator as Qe, prepareSignerValidatorClaimDataPayload as Xe, prepareSignerValidatorInputParams as Ze, prepareSignerValidatorPayload as $e } from "./Validators/SignerValidator.js";
26
+ import { LimitedSignerValidator as rr, prepareLimitedSignerValidatorClaimDataPayload as ar, prepareLimitedSignerValidatorInputParams as ir, prepareLimitedSignerValidatorPayload as or } from "./Validators/LimitedSignerValidator.js";
27
+ import { BoostValidatorEOA as nr, ValidatorByComponentInterface as dr, decodeClaimData as pr, validatorFromAddress as lr } from "./Validators/Validator.js";
28
+ import { BoostCoreNoIdentifierEmitted as cr, BoostNotFoundError as gr, BudgetMustAuthorizeBoostCore as mr, ContractAddressRequiredError as Er, DecodedArgsError as Ar, DecodedArgsMalformedError as Cr, DeployableAlreadyDeployedError as yr, DeployableBuildParametersUnspecifiedError as Ir, DeployableMissingPayloadError as br, DeployableUnknownOwnerProvidedError as vr, DeployableWagmiConfigurationRequiredError as fr, FieldActionValidationError as Pr, FieldValueNotComparableError as ur, FieldValueUndefinedError as Rr, FunctionDataDecodeError as Vr, IncentiveCriteriaNotFoundError as Sr, IncentiveNotCloneableError as xr, InvalidComponentInterfaceError as Br, InvalidCriteriaTypeError as Tr, InvalidNumericalCriteriaError as Dr, InvalidProtocolChainIdError as Fr, InvalidTupleDecodingError as Lr, InvalidTupleEncodingError as hr, MustInitializeBudgetError as Mr, NoConnectedChainIdError as Or, NoContractAddressUponReceiptError as Nr, NoEventActionStepsProvidedError as wr, NoMatchingLogsError as _r, TooManyEventActionStepsProvidedError as Ur, UnknownTransferPayloadSupplied as Wr, UnparseableAbiParamError as kr, UnrecognizedFilterTypeError as Gr, ValidationAbiMissingError as zr } from "./errors.js";
29
+ import { CheatCodes as Yr, RegistryType as jr, TRANSFER_SIGNATURE as Hr, assertValidAddressByChainId as Jr, awaitResult as Kr, bytes4 as Qr, getDeployedContractAddress as Xr, getErc20Balance as Zr } from "./utils.js";
30
+ import { StrategyType as ea, prepareClaimPayload as ra } from "./claiming.js";
31
+ import { AssetType as ia, prepareERC1155Payload as oa, prepareERC1155Transfer as ta, prepareFungiblePayload as na, prepareFungibleTransfer as da, prepareTransferPayload as pa } from "./transfers.js";
32
+ import { PassthroughAuth as sa } from "./Auth/PassthroughAuth.js";
33
+ import { _ as ga, M as ma, A as Ea, E as Aa, T as Ca, g as ya, y as Ia, d as ba, c as va, m as fa, R as Pa, D as ua, C as Ra, p as Va, r as Sa, a as xa, z as Ba, S as Ta, G as Da, F as Fa, k as La, b as ha } from "./generated-CINzoGbl.js";
34
34
  export {
35
35
  E as ActionByComponentInterface,
36
- F as AllowListByComponentInterface,
37
- ge as AllowListIncentive,
38
- $r as AssetType,
36
+ O as AllowListByComponentInterface,
37
+ Ce as AllowListIncentive,
38
+ ia as AssetType,
39
39
  n as BOOST_CORE_ADDRESS,
40
40
  d as BOOST_CORE_ADDRESSES,
41
41
  a as BOOST_REGISTRY_ADDRESS,
42
- o as BOOST_REGISTRY_ADDRESSES,
42
+ i as BOOST_REGISTRY_ADDRESSES,
43
43
  c as Boost,
44
44
  p as BoostCore,
45
- dr as BoostCoreNoIdentifierEmitted,
46
- pr as BoostNotFoundError,
47
- i as BoostRegistry,
48
- ar as BoostValidatorEOA,
49
- k as BudgetByComponentInterface,
50
- lr as BudgetMustAuthorizeBoostCore,
51
- Ae as CGDAIncentive,
52
- Gr as CheatCodes,
53
- te as Contract,
54
- sr as ContractAddressRequiredError,
55
- cr as DecodedArgsError,
56
- gr as DecodedArgsMalformedError,
57
- oe as Deployable,
58
- mr as DeployableAlreadyDeployedError,
59
- Er as DeployableBuildParametersUnspecifiedError,
60
- Ar as DeployableMissingPayloadError,
61
- de as DeployableTarget,
62
- le as DeployableTargetWithRBAC,
63
- Cr as DeployableUnknownOwnerProvidedError,
64
- yr as DeployableWagmiConfigurationRequiredError,
65
- be as ERC20Incentive,
66
- fe as ERC20PeggedIncentive,
67
- he as ERC20PeggedVariableCriteriaIncentive,
68
- We as ERC20PeggedVariableCriteriaIncentiveV2,
69
- Te as ERC20VariableCriteriaIncentive,
70
- Ne as ERC20VariableCriteriaIncentiveV2,
71
- Se as ERC20VariableIncentive,
45
+ cr as BoostCoreNoIdentifierEmitted,
46
+ gr as BoostNotFoundError,
47
+ o as BoostRegistry,
48
+ nr as BoostValidatorEOA,
49
+ j as BudgetByComponentInterface,
50
+ mr as BudgetMustAuthorizeBoostCore,
51
+ be as CGDAIncentive,
52
+ Yr as CheatCodes,
53
+ le as Contract,
54
+ Er as ContractAddressRequiredError,
55
+ Ar as DecodedArgsError,
56
+ Cr as DecodedArgsMalformedError,
57
+ de as Deployable,
58
+ yr as DeployableAlreadyDeployedError,
59
+ Ir as DeployableBuildParametersUnspecifiedError,
60
+ br as DeployableMissingPayloadError,
61
+ ce as DeployableTarget,
62
+ me as DeployableTargetWithRBAC,
63
+ vr as DeployableUnknownOwnerProvidedError,
64
+ fr as DeployableWagmiConfigurationRequiredError,
65
+ Pe as ERC20Incentive,
66
+ Ve as ERC20PeggedIncentive,
67
+ we as ERC20PeggedVariableCriteriaIncentive,
68
+ qe as ERC20PeggedVariableCriteriaIncentiveV2,
69
+ he as ERC20VariableCriteriaIncentive,
70
+ We as ERC20VariableCriteriaIncentiveV2,
71
+ De as ERC20VariableIncentive,
72
72
  y as EventAction,
73
73
  l as FEE_DENOMINATOR,
74
- br as FieldActionValidationError,
75
- Ir as FieldValueNotComparableError,
76
- vr as FieldValueUndefinedError,
77
- b as FilterType,
78
- fr as FunctionDataDecodeError,
79
- Pe as IncentiveByComponentInterface,
80
- Pr as IncentiveCriteriaNotFoundError,
81
- Rr as IncentiveNotCloneableError,
82
- ur as InvalidComponentInterfaceError,
83
- Vr as InvalidCriteriaTypeError,
84
- Sr as InvalidNumericalCriteriaError,
85
- Br as InvalidProtocolChainIdError,
86
- xr as InvalidTupleDecodingError,
87
- Tr as InvalidTupleEncodingError,
88
- O as LIST_MANAGER_ROLE,
89
- Xe as LimitedSignerValidator,
90
- Q as ManagedBudget,
91
- X as ManagedBudgetRoles,
92
- z as ManagedBudgetWithFees,
93
- q as ManagedBudgetWithFeesV2,
94
- Dr as MustInitializeBudgetError,
95
- Fr as NoConnectedChainIdError,
96
- Lr as NoContractAddressUponReceiptError,
97
- hr as NoEventActionStepsProvidedError,
98
- Mr as NoMatchingLogsError,
99
- L as OpenAllowList,
100
- na as PassthroughAuth,
101
- ze as PointsIncentive,
102
- I as PrimitiveType,
103
- kr as RegistryType,
104
- se as Roles,
74
+ Pr as FieldActionValidationError,
75
+ ur as FieldValueNotComparableError,
76
+ Rr as FieldValueUndefinedError,
77
+ I as FilterType,
78
+ Vr as FunctionDataDecodeError,
79
+ Se as IncentiveByComponentInterface,
80
+ Sr as IncentiveCriteriaNotFoundError,
81
+ xr as IncentiveNotCloneableError,
82
+ Br as InvalidComponentInterfaceError,
83
+ Tr as InvalidCriteriaTypeError,
84
+ Dr as InvalidNumericalCriteriaError,
85
+ Fr as InvalidProtocolChainIdError,
86
+ Lr as InvalidTupleDecodingError,
87
+ hr as InvalidTupleEncodingError,
88
+ U as LIST_MANAGER_ROLE,
89
+ rr as LimitedSignerValidator,
90
+ ee as ManagedBudget,
91
+ re as ManagedBudgetRoles,
92
+ H as ManagedBudgetWithFees,
93
+ J as ManagedBudgetWithFeesV2,
94
+ Mr as MustInitializeBudgetError,
95
+ Or as NoConnectedChainIdError,
96
+ Nr as NoContractAddressUponReceiptError,
97
+ wr as NoEventActionStepsProvidedError,
98
+ _r as NoMatchingLogsError,
99
+ N as OpenAllowList,
100
+ sa as PassthroughAuth,
101
+ He as PointsIncentive,
102
+ b as PrimitiveType,
103
+ jr as RegistryType,
104
+ Ee as Roles,
105
105
  v as SignatureType,
106
- je as SignerValidator,
107
- N as SimpleAllowList,
108
- U as SimpleDenyList,
109
- Qr as StrategyType,
110
- zr as TRANSFER_SIGNATURE,
111
- Or as TooManyEventActionStepsProvidedError,
112
- Y as TransparentBudget,
113
- Nr as UnknownTransferPayloadSupplied,
114
- wr as UnparseableAbiParamError,
115
- _r as UnrecognizedFilterTypeError,
116
- Ur as ValidationAbiMissingError,
117
- or as ValidatorByComponentInterface,
106
+ Qe as SignerValidator,
107
+ W as SimpleAllowList,
108
+ z as SimpleDenyList,
109
+ ea as StrategyType,
110
+ Hr as TRANSFER_SIGNATURE,
111
+ Ur as TooManyEventActionStepsProvidedError,
112
+ K as TransparentBudget,
113
+ Wr as UnknownTransferPayloadSupplied,
114
+ kr as UnparseableAbiParamError,
115
+ Gr as UnrecognizedFilterTypeError,
116
+ zr as ValidationAbiMissingError,
117
+ dr as ValidatorByComponentInterface,
118
118
  f as ValueType,
119
119
  A as actionFromAddress,
120
- h as allowListFromAddress,
121
- pa as allowListIncentiveAbi,
120
+ w as allowListFromAddress,
121
+ ga as allowListIncentiveAbi,
122
122
  P as anyActionParameter,
123
- qr as assertValidAddressByChainId,
124
- Yr as awaitResult,
125
- la as boostCoreAbi,
126
- sa as boostRegistryAbi,
127
- j as budgetFromAddress,
128
- jr as bytes4,
129
- ca as cgdaIncentiveAbi,
130
- R as decodeAndReorderLogArgs,
131
- ir as decodeClaimData,
132
- u as detectSignatureType,
133
- ga as erc20IncentiveAbi,
134
- ma as erc20PeggedIncentiveAbi,
135
- Ea as erc20PeggedVariableCriteriaIncentiveAbi,
136
- Aa as erc20PeggedVariableCriteriaIncentiveV2Abi,
137
- Ca as erc20VariableCriteriaIncentiveAbi,
138
- ya as erc20VariableCriteriaIncentiveV2Abi,
139
- ba as erc20VariableIncentiveAbi,
140
- De as gasRebateIncentiveCriteria,
141
- we as gasRebateIncentiveCriteriaV2,
142
- Hr as getDeployedContractAddress,
143
- Jr as getErc20Balance,
144
- Re as incentiveFromAddress,
145
- Z as isERC1155TransferPayload,
146
- V as isEventActionPayloadSimple,
147
- $ as isFungibleTransfer,
148
- Ia as limitedSignerValidatorAbi,
149
- va as managedBudgetAbi,
150
- fa as managedBudgetWithFeesAbi,
151
- Pa as managedBudgetWithFeesV2Abi,
152
- S as packFieldIndexes,
153
- Ra as passthroughAuthAbi,
154
- ua as pointsIncentiveAbi,
155
- me as prepareAllowListIncentivePayload,
123
+ Jr as assertValidAddressByChainId,
124
+ Kr as awaitResult,
125
+ ma as boostCoreAbi,
126
+ Ea as boostRegistryAbi,
127
+ Q as budgetFromAddress,
128
+ Qr as bytes4,
129
+ Aa as cgdaIncentiveAbi,
130
+ u as decodeAndReorderLogArgs,
131
+ pr as decodeClaimData,
132
+ R as detectSignatureType,
133
+ Ca as erc20IncentiveAbi,
134
+ ya as erc20PeggedIncentiveAbi,
135
+ Ia as erc20PeggedVariableCriteriaIncentiveAbi,
136
+ ba as erc20PeggedVariableCriteriaIncentiveV2Abi,
137
+ va as erc20VariableCriteriaIncentiveAbi,
138
+ fa as erc20VariableCriteriaIncentiveV2Abi,
139
+ Pa as erc20VariableIncentiveAbi,
140
+ Me as gasRebateIncentiveCriteria,
141
+ ke as gasRebateIncentiveCriteriaV2,
142
+ Xr as getDeployedContractAddress,
143
+ Zr as getErc20Balance,
144
+ V as getScalarValueFromTuple,
145
+ xe as incentiveFromAddress,
146
+ S as isCriteriaFieldIndexTuple,
147
+ ae as isERC1155TransferPayload,
148
+ x as isEventActionPayloadSimple,
149
+ ie as isFungibleTransfer,
150
+ ua as limitedSignerValidatorAbi,
151
+ Ra as managedBudgetAbi,
152
+ Va as managedBudgetWithFeesAbi,
153
+ Sa as managedBudgetWithFeesV2Abi,
154
+ B as packCriteriaFieldIndexes,
155
+ T as packFieldIndexes,
156
+ xa as passthroughAuthAbi,
157
+ Ba as pointsIncentiveAbi,
158
+ ye as prepareAllowListIncentivePayload,
156
159
  g as prepareBoostPayload,
157
- Ce as prepareCGDAIncentivePayload,
158
- Xr as prepareClaimPayload,
159
- ea as prepareERC1155Payload,
160
- ra as prepareERC1155Transfer,
161
- Ie as prepareERC20IncentivePayload,
162
- ue as prepareERC20PeggedIncentivePayload,
163
- Me as prepareERC20PeggedVariableCriteriaIncentivePayload,
164
- Ge as prepareERC20PeggedVariableCriteriaIncentiveV2Payload,
165
- Fe as prepareERC20VariableCriteriaIncentivePayload,
166
- _e as prepareERC20VariableCriteriaIncentiveV2Payload,
167
- Be as prepareERC20VariableIncentivePayload,
168
- B as prepareEventActionPayload,
169
- aa as prepareFungiblePayload,
170
- oa as prepareFungibleTransfer,
171
- Ze as prepareLimitedSignerValidatorClaimDataPayload,
172
- $e as prepareLimitedSignerValidatorInputParams,
173
- er as prepareLimitedSignerValidatorPayload,
174
- ee as prepareManagedBudgetPayload,
175
- H as prepareManagedBudgetWithFeesPayload,
176
- J as prepareManagedBudgetWithFeesV2Payload,
177
- qe as preparePointsIncentivePayload,
178
- He as prepareSignerValidatorClaimDataPayload,
179
- Je as prepareSignerValidatorInputParams,
180
- Ke as prepareSignerValidatorPayload,
181
- w as prepareSimpleAllowListPayload,
182
- W as prepareSimpleDenyListPayload,
183
- re as prepareTransfer,
184
- ia as prepareTransferPayload,
185
- Va as rbacAbi,
186
- Sa as signerValidatorAbi,
187
- Ba as simpleAllowListAbi,
188
- xa as simpleDenyListAbi,
189
- x as transactionSenderClaimant,
190
- Ta as transparentBudgetAbi,
191
- T as unpackFieldIndexes,
192
- tr as validatorFromAddress
160
+ ve as prepareCGDAIncentivePayload,
161
+ ra as prepareClaimPayload,
162
+ oa as prepareERC1155Payload,
163
+ ta as prepareERC1155Transfer,
164
+ ue as prepareERC20IncentivePayload,
165
+ Be as prepareERC20PeggedIncentivePayload,
166
+ _e as prepareERC20PeggedVariableCriteriaIncentivePayload,
167
+ Ye as prepareERC20PeggedVariableCriteriaIncentiveV2Payload,
168
+ Oe as prepareERC20VariableCriteriaIncentivePayload,
169
+ Ge as prepareERC20VariableCriteriaIncentiveV2Payload,
170
+ Fe as prepareERC20VariableIncentivePayload,
171
+ D as prepareEventActionPayload,
172
+ na as prepareFungiblePayload,
173
+ da as prepareFungibleTransfer,
174
+ ar as prepareLimitedSignerValidatorClaimDataPayload,
175
+ ir as prepareLimitedSignerValidatorInputParams,
176
+ or as prepareLimitedSignerValidatorPayload,
177
+ oe as prepareManagedBudgetPayload,
178
+ X as prepareManagedBudgetWithFeesPayload,
179
+ Z as prepareManagedBudgetWithFeesV2Payload,
180
+ Je as preparePointsIncentivePayload,
181
+ Xe as prepareSignerValidatorClaimDataPayload,
182
+ Ze as prepareSignerValidatorInputParams,
183
+ $e as prepareSignerValidatorPayload,
184
+ k as prepareSimpleAllowListPayload,
185
+ q as prepareSimpleDenyListPayload,
186
+ te as prepareTransfer,
187
+ pa as prepareTransferPayload,
188
+ Ta as rbacAbi,
189
+ Da as signerValidatorAbi,
190
+ Fa as simpleAllowListAbi,
191
+ La as simpleDenyListAbi,
192
+ F as transactionSenderClaimant,
193
+ ha as transparentBudgetAbi,
194
+ L as unpackCriteriaFieldIndexes,
195
+ h as unpackFieldIndexes,
196
+ lr as validatorFromAddress
193
197
  };
194
198
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostxyz/sdk",
3
- "version": "7.1.0",
3
+ "version": "7.3.0",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [
@@ -41,6 +41,9 @@ import {
41
41
  transactionSenderClaimant,
42
42
  packFieldIndexes,
43
43
  unpackFieldIndexes,
44
+ packCriteriaFieldIndexes,
45
+ unpackCriteriaFieldIndexes,
46
+ isCriteriaFieldIndexTuple,
44
47
  decodeAndReorderLogArgs
45
48
  } from "./EventAction";
46
49
  import { allKnownSignatures } from "@boostxyz/test/allKnownSignatures";
@@ -1512,3 +1515,90 @@ describe('decodeAndReorderLogArgs', () => {
1512
1515
  expect(result.args[3]).toBe(5284n);
1513
1516
  });
1514
1517
  });
1518
+
1519
+ describe("criteria field index tuple support", () => {
1520
+ describe("packCriteriaFieldIndexes", () => {
1521
+ test("packs two indices into a single value", () => {
1522
+ const packed = packCriteriaFieldIndexes([3, 5])
1523
+ expect(packed).toBeGreaterThanOrEqual(32);
1524
+ expect(packed).toBeLessThanOrEqual(253);
1525
+ });
1526
+
1527
+ test("throws error if any index exceeds the allowed range (0-13)", () => {
1528
+ expect(() => packCriteriaFieldIndexes([14, 5])).toThrowError(
1529
+ "Tuple indices must be between 0-13"
1530
+ );
1531
+
1532
+ expect(() => packCriteriaFieldIndexes([5, 14])).toThrowError(
1533
+ "Tuple indices must be between 0-13"
1534
+ );
1535
+
1536
+ expect(() => packCriteriaFieldIndexes([-1, 5])).toThrowError(
1537
+ "Tuple indices must be between 0-13"
1538
+ );
1539
+ });
1540
+
1541
+ test("different input pairs result in different packed values", () => {
1542
+ const packed1 = packCriteriaFieldIndexes([1, 2]);
1543
+ const packed2 = packCriteriaFieldIndexes([2, 1]);
1544
+ const packed3 = packCriteriaFieldIndexes([1, 3]);
1545
+
1546
+ expect(packed1).not.toBe(packed2);
1547
+ expect(packed1).not.toBe(packed3);
1548
+ expect(packed2).not.toBe(packed3);
1549
+ });
1550
+ });
1551
+
1552
+ describe("unpackCriteriaFieldIndexes", () => {
1553
+ test("unpacks tuple index values (>= 32) correctly", () => {
1554
+ const packed = packCriteriaFieldIndexes([4, 7]);
1555
+
1556
+ const result = unpackCriteriaFieldIndexes(packed);
1557
+ expect(result.length).toBe(2);
1558
+ expect(result).toEqual([4, 7]);
1559
+ });
1560
+
1561
+ test("throws error if packed value is out of valid range", () => {
1562
+ expect(() => unpackCriteriaFieldIndexes(15)).toThrowError(
1563
+ "Field index must be between 32-253"
1564
+ );
1565
+
1566
+ expect(() => unpackCriteriaFieldIndexes(254)).toThrowError(
1567
+ "Field index must be between 32-253"
1568
+ );
1569
+
1570
+ expect(() => unpackCriteriaFieldIndexes(-1)).toThrowError(
1571
+ "Field index must be between 32-253"
1572
+ );
1573
+ });
1574
+ });
1575
+
1576
+ describe("isCriteriaFieldIndexTuple", () => {
1577
+ test("correctly identifies tuple indices vs simple indices", () => {
1578
+ // Test with simple index (< 32)
1579
+ expect(isCriteriaFieldIndexTuple(15)).toBe(false);
1580
+
1581
+ // Test with tuple index (>= 32)
1582
+ const packed = packCriteriaFieldIndexes([2, 3]);
1583
+ expect(isCriteriaFieldIndexTuple(packed)).toBe(true);
1584
+
1585
+ // Test edge cases
1586
+ expect(isCriteriaFieldIndexTuple(0)).toBe(false);
1587
+ expect(isCriteriaFieldIndexTuple(31)).toBe(false);
1588
+ expect(isCriteriaFieldIndexTuple(32)).toBe(true);
1589
+ });
1590
+ });
1591
+
1592
+ describe("criteria field index functions in practice", () => {
1593
+ test("round-trip packing and unpacking preserves the original values", () => {
1594
+ for (let i = 0; i <= 13; i++) {
1595
+ for (let j = 0; j <= 13; j++) {
1596
+ const original: [number, number] = [i, j];
1597
+ const packed = packCriteriaFieldIndexes(original);
1598
+ const unpacked = unpackCriteriaFieldIndexes(packed);
1599
+ expect(unpacked).toEqual(original);
1600
+ }
1601
+ }
1602
+ });
1603
+ });
1604
+ });