@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.3

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 (54) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.d.ts +25 -10
  5. package/dist/Actions/EventAction.d.ts.map +1 -1
  6. package/dist/Actions/EventAction.js +94 -76
  7. package/dist/AllowLists/AllowList.cjs +1 -1
  8. package/dist/AllowLists/AllowList.js +1 -1
  9. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  10. package/dist/AllowLists/SimpleAllowList.js +1 -1
  11. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  12. package/dist/AllowLists/SimpleDenyList.js +1 -1
  13. package/dist/Auth/PassthroughAuth.cjs +1 -1
  14. package/dist/Auth/PassthroughAuth.js +1 -1
  15. package/dist/BoostCore.cjs +1 -1
  16. package/dist/BoostCore.js +85 -85
  17. package/dist/BoostRegistry.cjs +1 -1
  18. package/dist/BoostRegistry.js +3 -3
  19. package/dist/Budgets/Budget.cjs +1 -1
  20. package/dist/Budgets/Budget.js +1 -1
  21. package/dist/Budgets/ManagedBudget.cjs +1 -1
  22. package/dist/Budgets/ManagedBudget.js +22 -22
  23. package/dist/Deployable/DeployableTarget.cjs +1 -1
  24. package/dist/Deployable/DeployableTarget.js +1 -1
  25. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  26. package/dist/Incentives/AllowListIncentive.js +1 -1
  27. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  28. package/dist/Incentives/CGDAIncentive.js +1 -1
  29. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  30. package/dist/Incentives/ERC20Incentive.js +5 -5
  31. package/dist/Incentives/Incentive.cjs +1 -1
  32. package/dist/Incentives/Incentive.js +3 -3
  33. package/dist/Incentives/PointsIncentive.cjs +1 -1
  34. package/dist/Incentives/PointsIncentive.js +1 -1
  35. package/dist/Validators/SignerValidator.cjs +1 -1
  36. package/dist/Validators/SignerValidator.js +1 -1
  37. package/dist/Validators/Validator.cjs +1 -1
  38. package/dist/Validators/Validator.js +1 -1
  39. package/dist/errors.cjs +1 -1
  40. package/dist/errors.d.ts +171 -1
  41. package/dist/errors.d.ts.map +1 -1
  42. package/dist/errors.js +131 -40
  43. package/dist/generated-Cd-Fe7W7.cjs +2 -0
  44. package/dist/{generated-x_abr3Yv.js → generated-DGpIVcv5.js} +1153 -2768
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.d.ts +1 -5
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +126 -1353
  49. package/dist/utils.cjs +1 -1
  50. package/dist/utils.d.ts +44 -13
  51. package/dist/utils.d.ts.map +1 -1
  52. package/dist/utils.js +132 -119
  53. package/package.json +1 -1
  54. package/dist/generated-BaaleHW-.cjs +0 -2
package/dist/utils.js CHANGED
@@ -4,41 +4,41 @@ import { signTypedData as Z } from "viem/accounts";
4
4
  import { NoContractAddressUponReceiptError as j } from "./errors.js";
5
5
  var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, B = { exports: {} };
6
6
  (function(e, t) {
7
- (function(n, o) {
8
- e.exports = o(n, 1), t.LibZip = e.exports.LibZip, t.ERC1967Factory = e.exports.ERC1967Factory;
9
- })(typeof window < "u" ? window : q, function(n, o) {
7
+ (function(n, r) {
8
+ e.exports = r(n, 1), t.LibZip = e.exports.LibZip, t.ERC1967Factory = e.exports.ERC1967Factory;
9
+ })(typeof window < "u" ? window : q, function(n, r) {
10
10
  var y = {}, C = {};
11
11
  y.LibZip = C;
12
- function E(r) {
13
- if ((typeof r == "string" || r instanceof String) && (r = r.match(/^[\s\uFEFF\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\s\uFEFF\xA0]*$/))) {
14
- if (r[2].length % 2)
12
+ function E(o) {
13
+ if ((typeof o == "string" || o instanceof String) && (o = o.match(/^[\s\uFEFF\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\s\uFEFF\xA0]*$/))) {
14
+ if (o[2].length % 2)
15
15
  throw new Error("Hex string length must be a multiple of 2.");
16
- return r[2];
16
+ return o[2];
17
17
  }
18
18
  throw new Error("Data must be a hex string.");
19
19
  }
20
- function h(r) {
21
- return (r | 256).toString(16).slice(1);
20
+ function P(o) {
21
+ return (o | 256).toString(16).slice(1);
22
22
  }
23
- function w(r, i) {
24
- return parseInt(r.substr(i, 2), 16);
23
+ function h(o, i) {
24
+ return parseInt(o.substr(i, 2), 16);
25
25
  }
26
- function x(r) {
27
- for (var i = [], a = 0; a < r.length; a += 2)
28
- i.push(w(r, a));
26
+ function w(o) {
27
+ for (var i = [], a = 0; a < o.length; a += 2)
28
+ i.push(h(o, a));
29
29
  return i;
30
30
  }
31
- function A(r) {
32
- for (var i = "0x", a = 0; a < r.length; i += h(r[a++]))
31
+ function x(o) {
32
+ for (var i = "0x", a = 0; a < o.length; i += P(o[a++]))
33
33
  ;
34
34
  return i;
35
35
  }
36
- C.flzCompress = function(r) {
37
- var i = x(E(r)), a = i.length - 4, d = [], s = [], c = 0, p = 2, l = 0, m, I, O, P, R, f, T, F, N, L;
36
+ C.flzCompress = function(o) {
37
+ var i = w(E(o)), a = i.length - 4, d = [], s = [], c = 0, p = 2, l = 0, m, I, O, A, R, f, T, F, S, N;
38
38
  function v(g) {
39
39
  return i[g] | i[++g] << 8 | i[++g] << 16;
40
40
  }
41
- function S(g) {
41
+ function L(g) {
42
42
  return 2654435769 * g >> 19 & 8191;
43
43
  }
44
44
  function V(g, U) {
@@ -51,37 +51,37 @@ var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
51
51
  }
52
52
  for (; p < a - 9; ) {
53
53
  do
54
- T = d[O = S(I = v(p))] || 0, R = (P = (d[O] = p) - T) < 8192 ? v(T) : 16777216;
54
+ T = d[O = L(I = v(p))] || 0, R = (A = (d[O] = p) - T) < 8192 ? v(T) : 16777216;
55
55
  while (p < a - 9 && p++ && I != R);
56
56
  if (p >= a - 9)
57
57
  break;
58
- for (--p > c && V(p - c, c), f = 0, F = T + 3, N = p + 3, L = a - N; f < L; f++)
59
- L *= i[F + f] === i[N + f];
60
- for (p += f, --P; f > 262; f -= 262)
61
- s[l++] = 224 + (P >> 8), s[l++] = 253, s[l++] = P & 255;
62
- f < 7 ? (s[l++] = (f << 5) + (P >> 8), s[l++] = P & 255) : (s[l++] = 224 + (P >> 8), s[l++] = f - 7, s[l++] = P & 255), d[S(v(p))] = p++, d[S(v(p))] = p++, c = p;
58
+ for (--p > c && V(p - c, c), f = 0, F = T + 3, S = p + 3, N = a - S; f < N; f++)
59
+ N *= i[F + f] === i[S + f];
60
+ for (p += f, --A; f > 262; f -= 262)
61
+ s[l++] = 224 + (A >> 8), s[l++] = 253, s[l++] = A & 255;
62
+ f < 7 ? (s[l++] = (f << 5) + (A >> 8), s[l++] = A & 255) : (s[l++] = 224 + (A >> 8), s[l++] = f - 7, s[l++] = A & 255), d[L(v(p))] = p++, d[L(v(p))] = p++, c = p;
63
63
  }
64
- return V(a + 4 - c, c), A(s);
65
- }, C.flzDecompress = function(r) {
66
- for (var i = x(E(r)), a = 0, d = 0, s, c, p, l, m = []; a < i.length; )
64
+ return V(a + 4 - c, c), x(s);
65
+ }, C.flzDecompress = function(o) {
66
+ for (var i = w(E(o)), a = 0, d = 0, s, c, p, l, m = []; a < i.length; )
67
67
  if (p = i[a] >> 5)
68
68
  for (c = 256 * (i[a] & 31) + i[a + 2 - (p = p < 7)], s = p ? 2 + (i[a] >> 5) : 9 + i[a + 1], a = a + 3 - p, l = d - c - 1; s--; )
69
69
  m[d++] = m[l++];
70
70
  else
71
71
  for (s = 1 + i[a++]; s--; )
72
72
  m[d++] = i[a++];
73
- return A(m);
74
- }, C.cdCompress = function(r) {
75
- r = E(r);
73
+ return x(m);
74
+ }, C.cdCompress = function(o) {
75
+ o = E(o);
76
76
  var i = "0x", a = 0, d = 0, s = 0, c;
77
77
  function p(m) {
78
- i += h((i.length < 4 * 2 + 2) * 255 ^ m);
78
+ i += P((i.length < 4 * 2 + 2) * 255 ^ m);
79
79
  }
80
80
  function l(m, I) {
81
81
  p(0), p(I - 1 + m * 128);
82
82
  }
83
- for (; s < r.length; s += 2) {
84
- if (c = w(r, s), !c) {
83
+ for (; s < o.length; s += 2) {
84
+ if (c = h(o, s), !c) {
85
85
  d && (l(1, d), d = 0), ++a === 128 && (l(0, 128), a = 0);
86
86
  continue;
87
87
  }
@@ -92,24 +92,24 @@ var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
92
92
  d && (l(1, d), d = 0), a && (l(0, a), a = 0), p(c);
93
93
  }
94
94
  return d && (l(1, d), d = 0), a && (l(0, a), a = 0), i;
95
- }, C.cdDecompress = function(r) {
96
- r = E(r);
97
- for (var i = "0x", a = 0, d, s, c; a < r.length; ) {
98
- if (s = (a < 4 * 2) * 255 ^ w(r, a), a += 2, !s) {
99
- for (s = (a < 4 * 2) * 255 ^ w(r, a), c = (s & 127) + 1, a += 2, d = 0; d < c; ++d)
100
- i += h((s >> 7 && d < 32) * 255);
95
+ }, C.cdDecompress = function(o) {
96
+ o = E(o);
97
+ for (var i = "0x", a = 0, d, s, c; a < o.length; ) {
98
+ if (s = (a < 4 * 2) * 255 ^ h(o, a), a += 2, !s) {
99
+ for (s = (a < 4 * 2) * 255 ^ h(o, a), c = (s & 127) + 1, a += 2, d = 0; d < c; ++d)
100
+ i += P((s >> 7 && d < 32) * 255);
101
101
  continue;
102
102
  }
103
- i += h(s);
103
+ i += P(s);
104
104
  }
105
105
  return i;
106
106
  };
107
107
  var D = {};
108
- return y.ERC1967Factory = D, D.address = "0x0000000000006396FF2a80c067f99B3d2Ab4Df24", D.abi = JSON.parse('[{0:[],1:"DeploymentFailed"96"SaltDoesNotStartWithCaller"96"Unauthorized"96"UpgradeFailed",2:3959790,9791],1:"AdminChanged",2:10959790,9792,9791],1:"Deployed",2:10959790,9792],1:"Upgraded",2:10},{0:[{90],1:"adminOf",12:[{9199{0:[{90,{91],1:"changeAdmin",12:[],13:"nonpayable",2:15},{0:[{92,{91],1:"deploy",12:[{9098,{0:[{92,{91,{94],1:"deployAndCall",12:[{9098,{0:[{92,{91,{93],1:"deployDeterministic",12:[{9098,{0:[{92,{91,{93,{94],1:"deployDeterministicAndCall",12:[{9098,{0:[],1:"initCodeHash",12:[{6:19,1:"result",2:19}99{0:[{93],1:"predictDeterministicAddress",12:[{6:7,1:"predicted",2:7}99{0:[{90,{92],1:"upgrade",12:[98,{0:[{90,{92,{94],1:"upgradeAndCall",12:[98]'.replace(/9\d/g, function(r) {
109
- return ["6:7,1:8,2:7}", "6:7,1:9,2:7}", "6:7,1:11,2:7}", "6:19,1:20,2:19}", "6:17,1:18,2:17}", "},{4:false,0:[", ",2:3},{0:[],1:", "{5:true,", "],13:16,2:15}", "],13:14,2:15},"][r - 90];
110
- }).replace(/\d+/g, function(r) {
111
- return '"' + "inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt".split(",")[r] + '"';
112
- })), o || (n.solady = y), y;
108
+ return y.ERC1967Factory = D, D.address = "0x0000000000006396FF2a80c067f99B3d2Ab4Df24", D.abi = JSON.parse('[{0:[],1:"DeploymentFailed"96"SaltDoesNotStartWithCaller"96"Unauthorized"96"UpgradeFailed",2:3959790,9791],1:"AdminChanged",2:10959790,9792,9791],1:"Deployed",2:10959790,9792],1:"Upgraded",2:10},{0:[{90],1:"adminOf",12:[{9199{0:[{90,{91],1:"changeAdmin",12:[],13:"nonpayable",2:15},{0:[{92,{91],1:"deploy",12:[{9098,{0:[{92,{91,{94],1:"deployAndCall",12:[{9098,{0:[{92,{91,{93],1:"deployDeterministic",12:[{9098,{0:[{92,{91,{93,{94],1:"deployDeterministicAndCall",12:[{9098,{0:[],1:"initCodeHash",12:[{6:19,1:"result",2:19}99{0:[{93],1:"predictDeterministicAddress",12:[{6:7,1:"predicted",2:7}99{0:[{90,{92],1:"upgrade",12:[98,{0:[{90,{92,{94],1:"upgradeAndCall",12:[98]'.replace(/9\d/g, function(o) {
109
+ return ["6:7,1:8,2:7}", "6:7,1:9,2:7}", "6:7,1:11,2:7}", "6:19,1:20,2:19}", "6:17,1:18,2:17}", "},{4:false,0:[", ",2:3},{0:[],1:", "{5:true,", "],13:16,2:15}", "],13:14,2:15},"][o - 90];
110
+ }).replace(/\d+/g, function(o) {
111
+ return '"' + "inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt".split(",")[o] + '"';
112
+ })), r || (n.solady = y), y;
113
113
  });
114
114
  })(B, B.exports);
115
115
  var W = B.exports;
@@ -117,27 +117,30 @@ function ue(e) {
117
117
  return G(_(e) ? H(e) : H(z(e)), 0, 4);
118
118
  }
119
119
  async function le(e, t, n) {
120
- const o = await M(e, {
120
+ const r = await M(e, {
121
121
  ...n,
122
122
  hash: await t
123
123
  });
124
- if (!o.contractAddress)
125
- throw new j(o);
126
- return o.contractAddress;
124
+ if (!r.contractAddress)
125
+ throw new j(r);
126
+ return r.contractAddress;
127
127
  }
128
128
  async function ye(e, t, n) {
129
- const { hash: o, result: y } = await t;
129
+ const { hash: r, result: y } = await t;
130
130
  return await M(e, {
131
131
  ...n,
132
- hash: o
132
+ hash: r
133
133
  }), y;
134
134
  }
135
- var Y = /* @__PURE__ */ ((e) => (e[e.ACTION = 0] = "ACTION", e[e.ALLOW_LIST = 1] = "ALLOW_LIST", e[e.BUDGET = 2] = "BUDGET", e[e.INCENTIVE = 3] = "INCENTIVE", e[e.VALIDATOR = 4] = "VALIDATOR", e))(Y || {}), J = /* @__PURE__ */ ((e) => (e[e.POOL = 0] = "POOL", e[e.MINT = 1] = "MINT", e[e.RAFFLE = 2] = "RAFFLE", e))(J || {}), K = /* @__PURE__ */ ((e) => (e[e.POOL = 0] = "POOL", e[e.MINT = 1] = "MINT", e))(K || {}), X = /* @__PURE__ */ ((e) => (e[e.EQUAL = 0] = "EQUAL", e[e.NOT_EQUAL = 1] = "NOT_EQUAL", e[e.GREATER_THAN = 2] = "GREATER_THAN", e[e.LESS_THAN = 3] = "LESS_THAN", e[e.CONTAINS = 4] = "CONTAINS", e))(X || {}), $ = /* @__PURE__ */ ((e) => (e[e.UINT = 0] = "UINT", e[e.ADDRESS = 1] = "ADDRESS", e[e.BYTES = 2] = "BYTES", e[e.STRING = 3] = "STRING", e))($ || {}), ee = /* @__PURE__ */ ((e) => (e[e.EVENT = 0] = "EVENT", e[e.FUNC = 1] = "FUNC", e))(ee || {});
136
- const ce = ({
135
+ var J = /* @__PURE__ */ ((e) => (e[e.ACTION = 0] = "ACTION", e[e.ALLOW_LIST = 1] = "ALLOW_LIST", e[e.BUDGET = 2] = "BUDGET", e[e.INCENTIVE = 3] = "INCENTIVE", e[e.VALIDATOR = 4] = "VALIDATOR", e))(J || {}), Y = /* @__PURE__ */ ((e) => (e[e.POOL = 0] = "POOL", e[e.MINT = 1] = "MINT", e[e.RAFFLE = 2] = "RAFFLE", e))(Y || {}), K = /* @__PURE__ */ ((e) => (e[e.POOL = 0] = "POOL", e[e.MINT = 1] = "MINT", e))(K || {}), X = /* @__PURE__ */ ((e) => (e[e.EQUAL = 0] = "EQUAL", e[e.NOT_EQUAL = 1] = "NOT_EQUAL", e[e.GREATER_THAN = 2] = "GREATER_THAN", e[e.LESS_THAN = 3] = "LESS_THAN", e[e.CONTAINS = 4] = "CONTAINS", e))(X || {}), $ = /* @__PURE__ */ ((e) => (e[e.UINT = 0] = "UINT", e[e.ADDRESS = 1] = "ADDRESS", e[e.BYTES = 2] = "BYTES", e[e.STRING = 3] = "STRING", e))($ || {}), ee = /* @__PURE__ */ ((e) => (e[e.EVENT = 0] = "EVENT", e[e.FUNC = 1] = "FUNC", e))(ee || {});
136
+ function ce(e) {
137
+ return Array.isArray(e.actionSteps);
138
+ }
139
+ const me = ({
137
140
  actionClaimant: e,
138
141
  actionStepOne: t,
139
142
  actionStepTwo: n,
140
- actionStepThree: o,
143
+ actionStepThree: r,
141
144
  actionStepFour: y
142
145
  }) => u(
143
146
  [
@@ -243,11 +246,11 @@ const ce = ({
243
246
  actionClaimant: e,
244
247
  actionStepOne: t,
245
248
  actionStepTwo: n,
246
- actionStepThree: o,
249
+ actionStepThree: r,
247
250
  actionStepFour: y
248
251
  }
249
252
  ]
250
- ), me = ({
253
+ ), fe = ({
251
254
  signers: e,
252
255
  validatorCaller: t
253
256
  }) => u(
@@ -256,7 +259,7 @@ const ce = ({
256
259
  { type: "address", name: "validatorCaller" }
257
260
  ],
258
261
  [e, t]
259
- ), fe = ({
262
+ ), ge = ({
260
263
  validatorData: e,
261
264
  incentiveData: t
262
265
  }) => u(
@@ -283,22 +286,22 @@ const ce = ({
283
286
  ],
284
287
  [{ signer: e, signature: t, incentiveQuantity: n }]
285
288
  );
286
- async function ge({
289
+ async function be({
287
290
  signer: e,
288
291
  incentiveData: t,
289
292
  chainId: n,
290
- validator: o,
293
+ validator: r,
291
294
  incentiveQuantity: y,
292
295
  claimant: C,
293
296
  boostId: E
294
297
  }) {
295
- const x = await Z({
298
+ const w = await Z({
296
299
  ...{
297
300
  domain: {
298
301
  name: "SignerValidator",
299
302
  version: "1",
300
303
  chainId: n,
301
- verifyingContract: o
304
+ verifyingContract: r
302
305
  },
303
306
  types: {
304
307
  SignerValidatorData: [
@@ -317,9 +320,9 @@ async function ge({
317
320
  }
318
321
  },
319
322
  privateKey: e.key
320
- }), A = te({
323
+ }), x = te({
321
324
  signer: e.account,
322
- signature: x,
325
+ signature: w,
323
326
  incentiveQuantity: y
324
327
  // Adjust incentive quantity as necessary
325
328
  });
@@ -334,10 +337,10 @@ async function ge({
334
337
  ]
335
338
  }
336
339
  ],
337
- [{ validatorData: A, incentiveData: t }]
340
+ [{ validatorData: x, incentiveData: t }]
338
341
  );
339
342
  }
340
- const be = ({
343
+ const Ce = ({
341
344
  owner: e,
342
345
  allowed: t
343
346
  }) => u(
@@ -346,7 +349,7 @@ const be = ({
346
349
  { type: "address[]", name: "allowed" }
347
350
  ],
348
351
  [e, t]
349
- ), Ce = ({
352
+ ), Ee = ({
350
353
  owner: e,
351
354
  denied: t
352
355
  }) => u(
@@ -356,16 +359,16 @@ const be = ({
356
359
  ],
357
360
  [e, t]
358
361
  );
359
- function Ee({
362
+ function Ae({
360
363
  budget: e,
361
364
  action: t,
362
365
  validator: n,
363
- allowList: o,
366
+ allowList: r,
364
367
  incentives: y,
365
368
  protocolFee: C = 0n,
366
369
  referralFee: E = 0n,
367
- maxParticipants: h = 0n,
368
- owner: w
370
+ maxParticipants: P = 0n,
371
+ owner: h
369
372
  }) {
370
373
  return W.LibZip.cdCompress(
371
374
  u(
@@ -379,12 +382,12 @@ function Ee({
379
382
  budget: e,
380
383
  action: t,
381
384
  validator: n,
382
- allowList: o,
385
+ allowList: r,
383
386
  incentives: y,
384
387
  protocolFee: C,
385
388
  referralFee: E,
386
- maxParticipants: h,
387
- owner: w
389
+ maxParticipants: P,
390
+ owner: h
388
391
  }
389
392
  ]
390
393
  )
@@ -403,7 +406,7 @@ const Pe = ({
403
406
  venue: e,
404
407
  selector: t,
405
408
  reward: n,
406
- limit: o
409
+ limit: r
407
410
  }) => u(
408
411
  [
409
412
  { type: "address", name: "venue" },
@@ -411,12 +414,12 @@ const Pe = ({
411
414
  { type: "uint256", name: "reward" },
412
415
  { type: "uint256", name: "limit" }
413
416
  ],
414
- [e, t, n, o]
417
+ [e, t, n, r]
415
418
  ), he = ({
416
419
  asset: e,
417
420
  initialReward: t,
418
421
  rewardDecay: n,
419
- rewardBoost: o,
422
+ rewardBoost: r,
420
423
  totalBudget: y
421
424
  }) => u(
422
425
  [
@@ -426,19 +429,19 @@ const Pe = ({
426
429
  { type: "uint256", name: "rewardBoost" },
427
430
  { type: "uint256", name: "totalBudget" }
428
431
  ],
429
- [e, t, n, o, y]
432
+ [e, t, n, r, y]
430
433
  ), we = ({
431
434
  asset: e,
432
435
  strategy: t,
433
436
  tokenId: n,
434
- limit: o,
437
+ limit: r,
435
438
  extraData: y
436
439
  }) => u(
437
440
  b([
438
441
  "InitPayload payload",
439
442
  "struct InitPayload { address asset; uint8 strategy; uint256 tokenId; uint256 limit; bytes extraData; }"
440
443
  ]),
441
- [{ asset: e, strategy: t, tokenId: n, limit: o, extraData: y }]
444
+ [{ asset: e, strategy: t, tokenId: n, limit: r, extraData: y }]
442
445
  ), xe = ({
443
446
  allowList: e,
444
447
  limit: t
@@ -448,11 +451,11 @@ const Pe = ({
448
451
  { type: "uint256", name: "limit" }
449
452
  ],
450
453
  [e, t]
451
- ), Ae = ({
454
+ ), De = ({
452
455
  asset: e,
453
456
  strategy: t,
454
457
  reward: n,
455
- limit: o
458
+ limit: r
456
459
  }) => u(
457
460
  [
458
461
  { type: "address", name: "asset" },
@@ -460,8 +463,8 @@ const Pe = ({
460
463
  { type: "uint256", name: "reward" },
461
464
  { type: "uint256", name: "limit" }
462
465
  ],
463
- [e, t, n, o]
464
- ), De = ({
466
+ [e, t, n, r]
467
+ ), Ie = ({
465
468
  asset: e,
466
469
  reward: t,
467
470
  limit: n
@@ -472,7 +475,7 @@ const Pe = ({
472
475
  { type: "uint256", name: "limit" }
473
476
  ],
474
477
  [e, t, n]
475
- ), Ie = ({
478
+ ), Te = ({
476
479
  owner: e,
477
480
  authorized: t
478
481
  }) => u(
@@ -481,7 +484,7 @@ const Pe = ({
481
484
  "struct SimpleBudgetPayload { address owner; address[] authorized; }"
482
485
  ]),
483
486
  [{ owner: e, authorized: t }]
484
- ), Te = ({
487
+ ), ve = ({
485
488
  owner: e,
486
489
  authorized: t,
487
490
  roles: n
@@ -491,35 +494,35 @@ const Pe = ({
491
494
  "struct ManagedBudgetPayload { address owner; address[] authorized; uint256[] roles; }"
492
495
  ]),
493
496
  [{ owner: e, authorized: t, roles: n }]
494
- ), ve = ({
497
+ ), Se = ({
495
498
  owner: e,
496
499
  authorized: t,
497
500
  start: n,
498
- duration: o,
501
+ duration: r,
499
502
  cliff: y
500
503
  }) => u(
501
504
  b([
502
505
  "VestingBudgetPayload payload",
503
506
  "struct VestingBudgetPayload { address owner; address[] authorized; uint64 start; uint64 duration; uint64 cliff; }"
504
507
  ]),
505
- [{ owner: e, authorized: t, start: n, duration: o, cliff: y }]
508
+ [{ owner: e, authorized: t, start: n, duration: r, cliff: y }]
506
509
  ), ne = ({
507
510
  chainId: e,
508
511
  target: t,
509
512
  selector: n,
510
- value: o
513
+ value: r
511
514
  }) => u(
512
515
  b([
513
516
  "ContractActionPayload payload",
514
517
  "struct ContractActionPayload { uint256 chainId; address target; bytes4 selector; uint256 value; }"
515
518
  ]),
516
- [{ chainId: e, target: t, selector: n, value: o }]
519
+ [{ chainId: e, target: t, selector: n, value: r }]
517
520
  ), Ne = ({
518
521
  chainId: e,
519
522
  target: t,
520
523
  selector: n,
521
- value: o
522
- }) => ne({ chainId: e, target: t, selector: n, value: o }), Le = ({
524
+ value: r
525
+ }) => ne({ chainId: e, target: t, selector: n, value: r }), Le = ({
523
526
  target: e,
524
527
  data: t = k
525
528
  }) => u(
@@ -530,11 +533,11 @@ const Pe = ({
530
533
  [e, t]
531
534
  );
532
535
  var re = /* @__PURE__ */ ((e) => (e[e.ETH = 0] = "ETH", e[e.ERC20 = 1] = "ERC20", e[e.ERC1155 = 2] = "ERC1155", e))(re || {});
533
- const Se = ({
536
+ const Be = ({
534
537
  assetType: e,
535
538
  address: t,
536
539
  target: n,
537
- data: o
540
+ data: r
538
541
  }) => u(
539
542
  [
540
543
  { type: "uint8", name: "assetType" },
@@ -542,13 +545,13 @@ const Se = ({
542
545
  { type: "address", name: "target" },
543
546
  { type: "bytes", name: "data" }
544
547
  ],
545
- [e, t, n, o]
548
+ [e, t, n, r]
546
549
  );
547
- function Be({
550
+ function Oe({
548
551
  tokenId: e,
549
552
  amount: t,
550
553
  asset: n,
551
- target: o
554
+ target: r
552
555
  }) {
553
556
  return u(
554
557
  b([
@@ -560,7 +563,7 @@ function Be({
560
563
  assetType: 2,
561
564
  asset: n,
562
565
  data: ae({ tokenId: e, amount: t }),
563
- target: o
566
+ target: r
564
567
  }
565
568
  ]
566
569
  );
@@ -574,7 +577,7 @@ function oe({ amount: e }) {
574
577
  [{ amount: e }]
575
578
  );
576
579
  }
577
- function Oe({
580
+ function Re({
578
581
  amount: e,
579
582
  asset: t,
580
583
  target: n
@@ -594,7 +597,7 @@ function Oe({
594
597
  ]
595
598
  );
596
599
  }
597
- function Re(e, t) {
600
+ function Fe(e, t) {
598
601
  return u(
599
602
  [
600
603
  { type: "address", name: "holder" },
@@ -603,41 +606,51 @@ function Re(e, t) {
603
606
  [e, z(t)]
604
607
  );
605
608
  }
609
+ function Ve(e) {
610
+ const t = [], n = {};
611
+ for (let r of e) {
612
+ const y = JSON.stringify(r);
613
+ n[y] || (t.push(r), n[y] = !0);
614
+ }
615
+ return t;
616
+ }
606
617
  export {
607
618
  re as AssetType,
608
619
  K as ERC1155StrategyType,
609
620
  X as FilterType,
610
621
  $ as PrimitiveType,
611
- Y as RegistryType,
622
+ J as RegistryType,
612
623
  ee as SignatureType,
613
- J as StrategyType,
624
+ Y as StrategyType,
614
625
  ye as awaitResult,
615
626
  ue as bytes4,
627
+ Ve as dedupeActionSteps,
616
628
  le as getDeployedContractAddress,
629
+ ce as isEventActionPayloadSimple,
617
630
  xe as prepareAllowListIncentivePayload,
618
- fe as prepareBoostClaimData,
619
- Ee as prepareBoostPayload,
631
+ ge as prepareBoostClaimData,
632
+ Ae as prepareBoostPayload,
620
633
  he as prepareCGDAIncentivePayload,
621
634
  Le as prepareClaimPayload,
622
635
  ne as prepareContractActionPayload,
623
636
  we as prepareERC1155IncentivePayload,
624
637
  ae as prepareERC1155Payload,
625
- Be as prepareERC1155Transfer,
626
- Ae as prepareERC20IncentivePayload,
627
- De as prepareERC20VariableIncentivePayload,
638
+ Oe as prepareERC1155Transfer,
639
+ De as prepareERC20IncentivePayload,
640
+ Ie as prepareERC20VariableIncentivePayload,
628
641
  Ne as prepareERC721MintActionPayload,
629
- Re as prepareERC721MintActionValidate,
630
- ce as prepareEventActionPayload,
642
+ Fe as prepareERC721MintActionValidate,
643
+ me as prepareEventActionPayload,
631
644
  oe as prepareFungiblePayload,
632
- Oe as prepareFungibleTransfer,
633
- Te as prepareManagedBudgetPayload,
645
+ Re as prepareFungibleTransfer,
646
+ ve as prepareManagedBudgetPayload,
634
647
  Pe as preparePointsIncentivePayload,
635
- ge as prepareSignerValidatorClaimDataPayload,
648
+ be as prepareSignerValidatorClaimDataPayload,
636
649
  te as prepareSignerValidatorInputParams,
637
- me as prepareSignerValidatorPayload,
638
- be as prepareSimpleAllowListPayload,
639
- Ie as prepareSimpleBudgetPayload,
640
- Ce as prepareSimpleDenyListPayload,
641
- Se as prepareTransferPayload,
642
- ve as prepareVestingBudgetPayload
650
+ fe as prepareSignerValidatorPayload,
651
+ Ce as prepareSimpleAllowListPayload,
652
+ Te as prepareSimpleBudgetPayload,
653
+ Ee as prepareSimpleDenyListPayload,
654
+ Be as prepareTransferPayload,
655
+ Se as prepareVestingBudgetPayload
643
656
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boostxyz/sdk",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.3",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "files": [