@boostxyz/sdk 0.0.0-alpha.10

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 (242) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/Actions/Action.cjs +2 -0
  4. package/dist/Actions/Action.cjs.map +1 -0
  5. package/dist/Actions/Action.d.ts +31 -0
  6. package/dist/Actions/Action.d.ts.map +1 -0
  7. package/dist/Actions/Action.js +29 -0
  8. package/dist/Actions/Action.js.map +1 -0
  9. package/dist/Actions/ContractAction.d.ts +370 -0
  10. package/dist/Actions/ContractAction.d.ts.map +1 -0
  11. package/dist/Actions/ERC721MintAction.d.ts +513 -0
  12. package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
  13. package/dist/Actions/EventAction.cjs +2 -0
  14. package/dist/Actions/EventAction.cjs.map +1 -0
  15. package/dist/Actions/EventAction.d.ts +694 -0
  16. package/dist/Actions/EventAction.d.ts.map +1 -0
  17. package/dist/Actions/EventAction.js +491 -0
  18. package/dist/Actions/EventAction.js.map +1 -0
  19. package/dist/AllowLists/AllowList.cjs +2 -0
  20. package/dist/AllowLists/AllowList.cjs.map +1 -0
  21. package/dist/AllowLists/AllowList.d.ts +32 -0
  22. package/dist/AllowLists/AllowList.d.ts.map +1 -0
  23. package/dist/AllowLists/AllowList.js +30 -0
  24. package/dist/AllowLists/AllowList.js.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -0
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
  29. package/dist/AllowLists/SimpleAllowList.js +154 -0
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -0
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
  35. package/dist/AllowLists/SimpleDenyList.js +115 -0
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +2 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.d.ts +10 -0
  40. package/dist/Auth/Auth.d.ts.map +1 -0
  41. package/dist/Auth/Auth.js +5 -0
  42. package/dist/Auth/Auth.js.map +1 -0
  43. package/dist/Auth/PassthroughAuth.cjs +2 -0
  44. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  45. package/dist/Auth/PassthroughAuth.d.ts +51 -0
  46. package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
  47. package/dist/Auth/PassthroughAuth.js +39 -0
  48. package/dist/Auth/PassthroughAuth.js.map +1 -0
  49. package/dist/Boost.cjs +2 -0
  50. package/dist/Boost.cjs.map +1 -0
  51. package/dist/Boost.d.ts +234 -0
  52. package/dist/Boost.d.ts.map +1 -0
  53. package/dist/Boost.js +162 -0
  54. package/dist/Boost.js.map +1 -0
  55. package/dist/BoostCore.cjs +3 -0
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +498 -0
  58. package/dist/BoostCore.d.ts.map +1 -0
  59. package/dist/BoostCore.js +1153 -0
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -0
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +243 -0
  64. package/dist/BoostRegistry.d.ts.map +1 -0
  65. package/dist/BoostRegistry.js +262 -0
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -0
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +31 -0
  70. package/dist/Budgets/Budget.d.ts.map +1 -0
  71. package/dist/Budgets/Budget.js +29 -0
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -0
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +1103 -0
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
  77. package/dist/Budgets/ManagedBudget.js +516 -0
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/SimpleBudget.d.ts +824 -0
  80. package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
  81. package/dist/Budgets/VestingBudget.d.ts +778 -0
  82. package/dist/Budgets/VestingBudget.d.ts.map +1 -0
  83. package/dist/Deployable/Contract.cjs +2 -0
  84. package/dist/Deployable/Contract.cjs.map +1 -0
  85. package/dist/Deployable/Contract.d.ts +125 -0
  86. package/dist/Deployable/Contract.d.ts.map +1 -0
  87. package/dist/Deployable/Contract.js +150 -0
  88. package/dist/Deployable/Contract.js.map +1 -0
  89. package/dist/Deployable/Deployable.cjs +2 -0
  90. package/dist/Deployable/Deployable.cjs.map +1 -0
  91. package/dist/Deployable/Deployable.d.ts +161 -0
  92. package/dist/Deployable/Deployable.d.ts.map +1 -0
  93. package/dist/Deployable/Deployable.js +131 -0
  94. package/dist/Deployable/Deployable.js.map +1 -0
  95. package/dist/Deployable/DeployableTarget.cjs +2 -0
  96. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  97. package/dist/Deployable/DeployableTarget.d.ts +116 -0
  98. package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
  99. package/dist/Deployable/DeployableTarget.js +132 -0
  100. package/dist/Deployable/DeployableTarget.js.map +1 -0
  101. package/dist/Incentives/AllowListIncentive.cjs +2 -0
  102. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  103. package/dist/Incentives/AllowListIncentive.d.ts +513 -0
  104. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
  105. package/dist/Incentives/AllowListIncentive.js +201 -0
  106. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  107. package/dist/Incentives/CGDAIncentive.cjs +2 -0
  108. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  109. package/dist/Incentives/CGDAIncentive.d.ts +644 -0
  110. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
  111. package/dist/Incentives/CGDAIncentive.js +271 -0
  112. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  113. package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
  114. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
  115. package/dist/Incentives/ERC20Incentive.cjs +2 -0
  116. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  117. package/dist/Incentives/ERC20Incentive.d.ts +666 -0
  118. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
  119. package/dist/Incentives/ERC20Incentive.js +312 -0
  120. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  121. package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
  122. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
  123. package/dist/Incentives/Incentive.cjs +2 -0
  124. package/dist/Incentives/Incentive.cjs.map +1 -0
  125. package/dist/Incentives/Incentive.d.ts +36 -0
  126. package/dist/Incentives/Incentive.d.ts.map +1 -0
  127. package/dist/Incentives/Incentive.js +299 -0
  128. package/dist/Incentives/Incentive.js.map +1 -0
  129. package/dist/Incentives/PointsIncentive.cjs +2 -0
  130. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  131. package/dist/Incentives/PointsIncentive.d.ts +659 -0
  132. package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
  133. package/dist/Incentives/PointsIncentive.js +215 -0
  134. package/dist/Incentives/PointsIncentive.js.map +1 -0
  135. package/dist/Validators/SignerValidator.cjs +2 -0
  136. package/dist/Validators/SignerValidator.cjs.map +1 -0
  137. package/dist/Validators/SignerValidator.d.ts +745 -0
  138. package/dist/Validators/SignerValidator.d.ts.map +1 -0
  139. package/dist/Validators/SignerValidator.js +293 -0
  140. package/dist/Validators/SignerValidator.js.map +1 -0
  141. package/dist/Validators/Validator.cjs +2 -0
  142. package/dist/Validators/Validator.cjs.map +1 -0
  143. package/dist/Validators/Validator.d.ts +31 -0
  144. package/dist/Validators/Validator.d.ts.map +1 -0
  145. package/dist/Validators/Validator.js +27 -0
  146. package/dist/Validators/Validator.js.map +1 -0
  147. package/dist/claiming.cjs +2 -0
  148. package/dist/claiming.cjs.map +1 -0
  149. package/dist/claiming.d.ts +43 -0
  150. package/dist/claiming.d.ts.map +1 -0
  151. package/dist/claiming.js +17 -0
  152. package/dist/claiming.js.map +1 -0
  153. package/dist/componentInterfaces-CKCBwG16.cjs +2 -0
  154. package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
  155. package/dist/componentInterfaces-DYkaxBda.js +13 -0
  156. package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
  157. package/dist/errors.cjs +2 -0
  158. package/dist/errors.cjs.map +1 -0
  159. package/dist/errors.d.ts +441 -0
  160. package/dist/errors.d.ts.map +1 -0
  161. package/dist/errors.js +262 -0
  162. package/dist/errors.js.map +1 -0
  163. package/dist/generated-BDeDiaCK.js +4625 -0
  164. package/dist/generated-BDeDiaCK.js.map +1 -0
  165. package/dist/generated-wKBNvm48.cjs +3 -0
  166. package/dist/generated-wKBNvm48.cjs.map +1 -0
  167. package/dist/index.cjs +2 -0
  168. package/dist/index.cjs.map +1 -0
  169. package/dist/index.d.ts +25 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.js +113 -0
  172. package/dist/index.js.map +1 -0
  173. package/dist/transfers.cjs +2 -0
  174. package/dist/transfers.cjs.map +1 -0
  175. package/dist/transfers.d.ts +198 -0
  176. package/dist/transfers.d.ts.map +1 -0
  177. package/dist/transfers.js +84 -0
  178. package/dist/transfers.js.map +1 -0
  179. package/dist/utils.cjs +2 -0
  180. package/dist/utils.cjs.map +1 -0
  181. package/dist/utils.d.ts +116 -0
  182. package/dist/utils.d.ts.map +1 -0
  183. package/dist/utils.js +30 -0
  184. package/dist/utils.js.map +1 -0
  185. package/package.json +211 -0
  186. package/src/Actions/Action.test.ts +75 -0
  187. package/src/Actions/Action.ts +61 -0
  188. package/src/Actions/ContractAction.test.ts +197 -0
  189. package/src/Actions/ContractAction.ts +301 -0
  190. package/src/Actions/ERC721MintAction.test.ts +112 -0
  191. package/src/Actions/ERC721MintAction.ts +292 -0
  192. package/src/Actions/EventAction.test.ts +205 -0
  193. package/src/Actions/EventAction.ts +811 -0
  194. package/src/AllowLists/AllowList.test.ts +64 -0
  195. package/src/AllowLists/AllowList.ts +60 -0
  196. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  197. package/src/AllowLists/SimpleAllowList.ts +284 -0
  198. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  199. package/src/AllowLists/SimpleDenyList.ts +227 -0
  200. package/src/Auth/Auth.ts +11 -0
  201. package/src/Auth/PassthroughAuth.test.ts +12 -0
  202. package/src/Auth/PassthroughAuth.ts +80 -0
  203. package/src/Boost.ts +290 -0
  204. package/src/BoostCore.test.ts +773 -0
  205. package/src/BoostCore.ts +1261 -0
  206. package/src/BoostRegistry.ts +467 -0
  207. package/src/Budgets/Budget.test.ts +27 -0
  208. package/src/Budgets/Budget.ts +61 -0
  209. package/src/Budgets/ManagedBudget.test.ts +154 -0
  210. package/src/Budgets/ManagedBudget.ts +796 -0
  211. package/src/Budgets/SimpleBudget.test.ts +152 -0
  212. package/src/Budgets/SimpleBudget.ts +564 -0
  213. package/src/Budgets/VestingBudget.test.ts +123 -0
  214. package/src/Budgets/VestingBudget.ts +602 -0
  215. package/src/Deployable/Contract.ts +229 -0
  216. package/src/Deployable/Deployable.ts +250 -0
  217. package/src/Deployable/DeployableTarget.ts +223 -0
  218. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  219. package/src/Incentives/AllowListIncentive.ts +334 -0
  220. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  221. package/src/Incentives/CGDAIncentive.ts +468 -0
  222. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  223. package/src/Incentives/ERC1155Incentive.ts +466 -0
  224. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  225. package/src/Incentives/ERC20Incentive.ts +482 -0
  226. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  227. package/src/Incentives/ERC20VariableIncentive.ts +420 -0
  228. package/src/Incentives/Incentive.test.ts +92 -0
  229. package/src/Incentives/Incentive.ts +85 -0
  230. package/src/Incentives/PointsIncentive.test.ts +139 -0
  231. package/src/Incentives/PointsIncentive.ts +365 -0
  232. package/src/Validators/SignerValidator.test.ts +159 -0
  233. package/src/Validators/SignerValidator.ts +681 -0
  234. package/src/Validators/Validator.test.ts +21 -0
  235. package/src/Validators/Validator.ts +55 -0
  236. package/src/claiming.ts +56 -0
  237. package/src/errors.ts +542 -0
  238. package/src/index.test.ts +40 -0
  239. package/src/index.ts +53 -0
  240. package/src/transfers.ts +284 -0
  241. package/src/utils.test.ts +44 -0
  242. package/src/utils.ts +198 -0
@@ -0,0 +1,824 @@
1
+ import { simpleBudgetAbi } from '@boostxyz/evm';
2
+ import { type Address, type ContractEventName } from 'viem';
3
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
+ import { DeployableTarget } from '../Deployable/DeployableTarget';
5
+ import { type ERC1155TransferPayload, type FungibleTransferPayload } from '../transfers';
6
+ import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
7
+ export { simpleBudgetAbi };
8
+ export type { ERC1155TransferPayload, FungibleTransferPayload };
9
+ /**
10
+ * The object representation of a `SimpleBudgetPayload.InitPayload`
11
+ *
12
+ * @export
13
+ * @interface SimpleBudgetPayload
14
+ * @typedef {SimpleBudgetPayload}
15
+ */
16
+ export interface SimpleBudgetPayload {
17
+ /**
18
+ * The budget's owner
19
+ *
20
+ * @type {Address}
21
+ */
22
+ owner: Address;
23
+ /**
24
+ * List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
25
+ *
26
+ * @type {Address[]}
27
+ */
28
+ authorized: Address[];
29
+ }
30
+ /**
31
+ * A generic `viem.Log` event with support for `SimpleBudget` event types.
32
+ *
33
+ * @export
34
+ * @typedef {SimpleBudgetLog}
35
+ * @template {ContractEventName<typeof simpleBudgetAbi>} [event=ContractEventName<
36
+ * typeof simpleBudgetAbi
37
+ * >]
38
+ */
39
+ export type SimpleBudgetLog<event extends ContractEventName<typeof simpleBudgetAbi> = ContractEventName<typeof simpleBudgetAbi>> = GenericLog<typeof simpleBudgetAbi, event>;
40
+ /**
41
+ * Typeguard to determine if a transfer payload is a Fungible Transfer
42
+ *
43
+ * @export
44
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
45
+ * @returns {transfer is FungibleTransferPayload}
46
+ */
47
+ export declare function isFungibleTransfer(transfer: FungibleTransferPayload | ERC1155TransferPayload): transfer is FungibleTransferPayload;
48
+ /**
49
+ * Typeguard to determine if a transfer payload is an ERC1155 Transfer
50
+ *
51
+ * @export
52
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
53
+ * @returns {transfer is ERC1155TransferPayload}
54
+ */
55
+ export declare function isERC1155TransferPayload(transfer: FungibleTransferPayload | ERC1155TransferPayload): transfer is ERC1155TransferPayload;
56
+ /**
57
+ * Given either a Fungible transfer, or ERC1155 transfer, will properly encode parameters for transfers, claims, disbursements, allocations, etc.
58
+ *
59
+ * @export
60
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
61
+ * @returns {*}
62
+ * @throws {@link UnknownTransferPayloadSupplied}
63
+ */
64
+ export declare function prepareTransfer(transfer: FungibleTransferPayload | ERC1155TransferPayload): `0x${string}`;
65
+ /**
66
+ * A minimal budget implementation that simply holds and distributes tokens (ERC20-like and native)
67
+ * This type of budget supports ETH, ERC20, and ERC1155 assets only
68
+ *
69
+ * @export
70
+ * @class SimpleBudget
71
+ * @typedef {SimpleBudget}
72
+ * @extends {DeployableTarget<SimpleBudgetPayload>}
73
+ */
74
+ export declare class SimpleBudget extends DeployableTarget<SimpleBudgetPayload, typeof simpleBudgetAbi> {
75
+ readonly abi: readonly [{
76
+ readonly type: "constructor";
77
+ readonly inputs: readonly [];
78
+ readonly stateMutability: "nonpayable";
79
+ }, {
80
+ readonly type: "error";
81
+ readonly inputs: readonly [];
82
+ readonly name: "AlreadyInitialized";
83
+ }, {
84
+ readonly type: "error";
85
+ readonly inputs: readonly [];
86
+ readonly name: "CloneAlreadyInitialized";
87
+ }, {
88
+ readonly type: "error";
89
+ readonly inputs: readonly [];
90
+ readonly name: "InitializerNotImplemented";
91
+ }, {
92
+ readonly type: "error";
93
+ readonly inputs: readonly [{
94
+ readonly name: "asset";
95
+ readonly internalType: "address";
96
+ readonly type: "address";
97
+ }, {
98
+ readonly name: "available";
99
+ readonly internalType: "uint256";
100
+ readonly type: "uint256";
101
+ }, {
102
+ readonly name: "required";
103
+ readonly internalType: "uint256";
104
+ readonly type: "uint256";
105
+ }];
106
+ readonly name: "InsufficientFunds";
107
+ }, {
108
+ readonly type: "error";
109
+ readonly inputs: readonly [{
110
+ readonly name: "asset";
111
+ readonly internalType: "address";
112
+ readonly type: "address";
113
+ }, {
114
+ readonly name: "amount";
115
+ readonly internalType: "uint256";
116
+ readonly type: "uint256";
117
+ }];
118
+ readonly name: "InvalidAllocation";
119
+ }, {
120
+ readonly type: "error";
121
+ readonly inputs: readonly [];
122
+ readonly name: "InvalidInitialization";
123
+ }, {
124
+ readonly type: "error";
125
+ readonly inputs: readonly [];
126
+ readonly name: "InvalidInitializationData";
127
+ }, {
128
+ readonly type: "error";
129
+ readonly inputs: readonly [];
130
+ readonly name: "LengthMismatch";
131
+ }, {
132
+ readonly type: "error";
133
+ readonly inputs: readonly [];
134
+ readonly name: "NewOwnerIsZeroAddress";
135
+ }, {
136
+ readonly type: "error";
137
+ readonly inputs: readonly [];
138
+ readonly name: "NoHandoverRequest";
139
+ }, {
140
+ readonly type: "error";
141
+ readonly inputs: readonly [];
142
+ readonly name: "NotImplemented";
143
+ }, {
144
+ readonly type: "error";
145
+ readonly inputs: readonly [];
146
+ readonly name: "NotInitializing";
147
+ }, {
148
+ readonly type: "error";
149
+ readonly inputs: readonly [];
150
+ readonly name: "Reentrancy";
151
+ }, {
152
+ readonly type: "error";
153
+ readonly inputs: readonly [{
154
+ readonly name: "asset";
155
+ readonly internalType: "address";
156
+ readonly type: "address";
157
+ }, {
158
+ readonly name: "to";
159
+ readonly internalType: "address";
160
+ readonly type: "address";
161
+ }, {
162
+ readonly name: "amount";
163
+ readonly internalType: "uint256";
164
+ readonly type: "uint256";
165
+ }];
166
+ readonly name: "TransferFailed";
167
+ }, {
168
+ readonly type: "error";
169
+ readonly inputs: readonly [];
170
+ readonly name: "Unauthorized";
171
+ }, {
172
+ readonly type: "event";
173
+ readonly anonymous: false;
174
+ readonly inputs: readonly [{
175
+ readonly name: "account";
176
+ readonly internalType: "address";
177
+ readonly type: "address";
178
+ readonly indexed: true;
179
+ }, {
180
+ readonly name: "isAuthorized";
181
+ readonly internalType: "bool";
182
+ readonly type: "bool";
183
+ readonly indexed: false;
184
+ }];
185
+ readonly name: "Authorized";
186
+ }, {
187
+ readonly type: "event";
188
+ readonly anonymous: false;
189
+ readonly inputs: readonly [{
190
+ readonly name: "asset";
191
+ readonly internalType: "address";
192
+ readonly type: "address";
193
+ readonly indexed: true;
194
+ }, {
195
+ readonly name: "to";
196
+ readonly internalType: "address";
197
+ readonly type: "address";
198
+ readonly indexed: false;
199
+ }, {
200
+ readonly name: "amount";
201
+ readonly internalType: "uint256";
202
+ readonly type: "uint256";
203
+ readonly indexed: false;
204
+ }];
205
+ readonly name: "Distributed";
206
+ }, {
207
+ readonly type: "event";
208
+ readonly anonymous: false;
209
+ readonly inputs: readonly [{
210
+ readonly name: "version";
211
+ readonly internalType: "uint64";
212
+ readonly type: "uint64";
213
+ readonly indexed: false;
214
+ }];
215
+ readonly name: "Initialized";
216
+ }, {
217
+ readonly type: "event";
218
+ readonly anonymous: false;
219
+ readonly inputs: readonly [{
220
+ readonly name: "pendingOwner";
221
+ readonly internalType: "address";
222
+ readonly type: "address";
223
+ readonly indexed: true;
224
+ }];
225
+ readonly name: "OwnershipHandoverCanceled";
226
+ }, {
227
+ readonly type: "event";
228
+ readonly anonymous: false;
229
+ readonly inputs: readonly [{
230
+ readonly name: "pendingOwner";
231
+ readonly internalType: "address";
232
+ readonly type: "address";
233
+ readonly indexed: true;
234
+ }];
235
+ readonly name: "OwnershipHandoverRequested";
236
+ }, {
237
+ readonly type: "event";
238
+ readonly anonymous: false;
239
+ readonly inputs: readonly [{
240
+ readonly name: "oldOwner";
241
+ readonly internalType: "address";
242
+ readonly type: "address";
243
+ readonly indexed: true;
244
+ }, {
245
+ readonly name: "newOwner";
246
+ readonly internalType: "address";
247
+ readonly type: "address";
248
+ readonly indexed: true;
249
+ }];
250
+ readonly name: "OwnershipTransferred";
251
+ }, {
252
+ readonly type: "fallback";
253
+ readonly stateMutability: "payable";
254
+ }, {
255
+ readonly type: "function";
256
+ readonly inputs: readonly [{
257
+ readonly name: "data_";
258
+ readonly internalType: "bytes";
259
+ readonly type: "bytes";
260
+ }];
261
+ readonly name: "allocate";
262
+ readonly outputs: readonly [{
263
+ readonly name: "";
264
+ readonly internalType: "bool";
265
+ readonly type: "bool";
266
+ }];
267
+ readonly stateMutability: "payable";
268
+ }, {
269
+ readonly type: "function";
270
+ readonly inputs: readonly [{
271
+ readonly name: "asset_";
272
+ readonly internalType: "address";
273
+ readonly type: "address";
274
+ }];
275
+ readonly name: "available";
276
+ readonly outputs: readonly [{
277
+ readonly name: "";
278
+ readonly internalType: "uint256";
279
+ readonly type: "uint256";
280
+ }];
281
+ readonly stateMutability: "view";
282
+ }, {
283
+ readonly type: "function";
284
+ readonly inputs: readonly [{
285
+ readonly name: "asset_";
286
+ readonly internalType: "address";
287
+ readonly type: "address";
288
+ }, {
289
+ readonly name: "tokenId_";
290
+ readonly internalType: "uint256";
291
+ readonly type: "uint256";
292
+ }];
293
+ readonly name: "available";
294
+ readonly outputs: readonly [{
295
+ readonly name: "";
296
+ readonly internalType: "uint256";
297
+ readonly type: "uint256";
298
+ }];
299
+ readonly stateMutability: "view";
300
+ }, {
301
+ readonly type: "function";
302
+ readonly inputs: readonly [];
303
+ readonly name: "cancelOwnershipHandover";
304
+ readonly outputs: readonly [];
305
+ readonly stateMutability: "payable";
306
+ }, {
307
+ readonly type: "function";
308
+ readonly inputs: readonly [{
309
+ readonly name: "data_";
310
+ readonly internalType: "bytes";
311
+ readonly type: "bytes";
312
+ }];
313
+ readonly name: "clawback";
314
+ readonly outputs: readonly [{
315
+ readonly name: "";
316
+ readonly internalType: "bool";
317
+ readonly type: "bool";
318
+ }];
319
+ readonly stateMutability: "nonpayable";
320
+ }, {
321
+ readonly type: "function";
322
+ readonly inputs: readonly [{
323
+ readonly name: "pendingOwner";
324
+ readonly internalType: "address";
325
+ readonly type: "address";
326
+ }];
327
+ readonly name: "completeOwnershipHandover";
328
+ readonly outputs: readonly [];
329
+ readonly stateMutability: "payable";
330
+ }, {
331
+ readonly type: "function";
332
+ readonly inputs: readonly [{
333
+ readonly name: "data_";
334
+ readonly internalType: "bytes";
335
+ readonly type: "bytes";
336
+ }];
337
+ readonly name: "disburse";
338
+ readonly outputs: readonly [{
339
+ readonly name: "";
340
+ readonly internalType: "bool";
341
+ readonly type: "bool";
342
+ }];
343
+ readonly stateMutability: "nonpayable";
344
+ }, {
345
+ readonly type: "function";
346
+ readonly inputs: readonly [{
347
+ readonly name: "data_";
348
+ readonly internalType: "bytes[]";
349
+ readonly type: "bytes[]";
350
+ }];
351
+ readonly name: "disburseBatch";
352
+ readonly outputs: readonly [{
353
+ readonly name: "";
354
+ readonly internalType: "bool";
355
+ readonly type: "bool";
356
+ }];
357
+ readonly stateMutability: "nonpayable";
358
+ }, {
359
+ readonly type: "function";
360
+ readonly inputs: readonly [{
361
+ readonly name: "asset_";
362
+ readonly internalType: "address";
363
+ readonly type: "address";
364
+ }];
365
+ readonly name: "distributed";
366
+ readonly outputs: readonly [{
367
+ readonly name: "";
368
+ readonly internalType: "uint256";
369
+ readonly type: "uint256";
370
+ }];
371
+ readonly stateMutability: "view";
372
+ }, {
373
+ readonly type: "function";
374
+ readonly inputs: readonly [{
375
+ readonly name: "asset_";
376
+ readonly internalType: "address";
377
+ readonly type: "address";
378
+ }, {
379
+ readonly name: "tokenId_";
380
+ readonly internalType: "uint256";
381
+ readonly type: "uint256";
382
+ }];
383
+ readonly name: "distributed";
384
+ readonly outputs: readonly [{
385
+ readonly name: "";
386
+ readonly internalType: "uint256";
387
+ readonly type: "uint256";
388
+ }];
389
+ readonly stateMutability: "view";
390
+ }, {
391
+ readonly type: "function";
392
+ readonly inputs: readonly [];
393
+ readonly name: "getComponentInterface";
394
+ readonly outputs: readonly [{
395
+ readonly name: "";
396
+ readonly internalType: "bytes4";
397
+ readonly type: "bytes4";
398
+ }];
399
+ readonly stateMutability: "pure";
400
+ }, {
401
+ readonly type: "function";
402
+ readonly inputs: readonly [{
403
+ readonly name: "data_";
404
+ readonly internalType: "bytes";
405
+ readonly type: "bytes";
406
+ }];
407
+ readonly name: "initialize";
408
+ readonly outputs: readonly [];
409
+ readonly stateMutability: "nonpayable";
410
+ }, {
411
+ readonly type: "function";
412
+ readonly inputs: readonly [{
413
+ readonly name: "account_";
414
+ readonly internalType: "address";
415
+ readonly type: "address";
416
+ }];
417
+ readonly name: "isAuthorized";
418
+ readonly outputs: readonly [{
419
+ readonly name: "";
420
+ readonly internalType: "bool";
421
+ readonly type: "bool";
422
+ }];
423
+ readonly stateMutability: "view";
424
+ }, {
425
+ readonly type: "function";
426
+ readonly inputs: readonly [{
427
+ readonly name: "";
428
+ readonly internalType: "address";
429
+ readonly type: "address";
430
+ }, {
431
+ readonly name: "";
432
+ readonly internalType: "address";
433
+ readonly type: "address";
434
+ }, {
435
+ readonly name: "";
436
+ readonly internalType: "uint256[]";
437
+ readonly type: "uint256[]";
438
+ }, {
439
+ readonly name: "";
440
+ readonly internalType: "uint256[]";
441
+ readonly type: "uint256[]";
442
+ }, {
443
+ readonly name: "";
444
+ readonly internalType: "bytes";
445
+ readonly type: "bytes";
446
+ }];
447
+ readonly name: "onERC1155BatchReceived";
448
+ readonly outputs: readonly [{
449
+ readonly name: "";
450
+ readonly internalType: "bytes4";
451
+ readonly type: "bytes4";
452
+ }];
453
+ readonly stateMutability: "pure";
454
+ }, {
455
+ readonly type: "function";
456
+ readonly inputs: readonly [{
457
+ readonly name: "";
458
+ readonly internalType: "address";
459
+ readonly type: "address";
460
+ }, {
461
+ readonly name: "";
462
+ readonly internalType: "address";
463
+ readonly type: "address";
464
+ }, {
465
+ readonly name: "";
466
+ readonly internalType: "uint256";
467
+ readonly type: "uint256";
468
+ }, {
469
+ readonly name: "";
470
+ readonly internalType: "uint256";
471
+ readonly type: "uint256";
472
+ }, {
473
+ readonly name: "";
474
+ readonly internalType: "bytes";
475
+ readonly type: "bytes";
476
+ }];
477
+ readonly name: "onERC1155Received";
478
+ readonly outputs: readonly [{
479
+ readonly name: "";
480
+ readonly internalType: "bytes4";
481
+ readonly type: "bytes4";
482
+ }];
483
+ readonly stateMutability: "pure";
484
+ }, {
485
+ readonly type: "function";
486
+ readonly inputs: readonly [];
487
+ readonly name: "owner";
488
+ readonly outputs: readonly [{
489
+ readonly name: "result";
490
+ readonly internalType: "address";
491
+ readonly type: "address";
492
+ }];
493
+ readonly stateMutability: "view";
494
+ }, {
495
+ readonly type: "function";
496
+ readonly inputs: readonly [{
497
+ readonly name: "pendingOwner";
498
+ readonly internalType: "address";
499
+ readonly type: "address";
500
+ }];
501
+ readonly name: "ownershipHandoverExpiresAt";
502
+ readonly outputs: readonly [{
503
+ readonly name: "result";
504
+ readonly internalType: "uint256";
505
+ readonly type: "uint256";
506
+ }];
507
+ readonly stateMutability: "view";
508
+ }, {
509
+ readonly type: "function";
510
+ readonly inputs: readonly [{
511
+ readonly name: "";
512
+ readonly internalType: "bytes";
513
+ readonly type: "bytes";
514
+ }];
515
+ readonly name: "reconcile";
516
+ readonly outputs: readonly [{
517
+ readonly name: "";
518
+ readonly internalType: "uint256";
519
+ readonly type: "uint256";
520
+ }];
521
+ readonly stateMutability: "nonpayable";
522
+ }, {
523
+ readonly type: "function";
524
+ readonly inputs: readonly [];
525
+ readonly name: "renounceOwnership";
526
+ readonly outputs: readonly [];
527
+ readonly stateMutability: "payable";
528
+ }, {
529
+ readonly type: "function";
530
+ readonly inputs: readonly [];
531
+ readonly name: "requestOwnershipHandover";
532
+ readonly outputs: readonly [];
533
+ readonly stateMutability: "payable";
534
+ }, {
535
+ readonly type: "function";
536
+ readonly inputs: readonly [{
537
+ readonly name: "account_";
538
+ readonly internalType: "address[]";
539
+ readonly type: "address[]";
540
+ }, {
541
+ readonly name: "authorized_";
542
+ readonly internalType: "bool[]";
543
+ readonly type: "bool[]";
544
+ }];
545
+ readonly name: "setAuthorized";
546
+ readonly outputs: readonly [];
547
+ readonly stateMutability: "nonpayable";
548
+ }, {
549
+ readonly type: "function";
550
+ readonly inputs: readonly [{
551
+ readonly name: "interfaceId";
552
+ readonly internalType: "bytes4";
553
+ readonly type: "bytes4";
554
+ }];
555
+ readonly name: "supportsInterface";
556
+ readonly outputs: readonly [{
557
+ readonly name: "";
558
+ readonly internalType: "bool";
559
+ readonly type: "bool";
560
+ }];
561
+ readonly stateMutability: "view";
562
+ }, {
563
+ readonly type: "function";
564
+ readonly inputs: readonly [{
565
+ readonly name: "asset_";
566
+ readonly internalType: "address";
567
+ readonly type: "address";
568
+ }];
569
+ readonly name: "total";
570
+ readonly outputs: readonly [{
571
+ readonly name: "";
572
+ readonly internalType: "uint256";
573
+ readonly type: "uint256";
574
+ }];
575
+ readonly stateMutability: "view";
576
+ }, {
577
+ readonly type: "function";
578
+ readonly inputs: readonly [{
579
+ readonly name: "asset_";
580
+ readonly internalType: "address";
581
+ readonly type: "address";
582
+ }, {
583
+ readonly name: "tokenId_";
584
+ readonly internalType: "uint256";
585
+ readonly type: "uint256";
586
+ }];
587
+ readonly name: "total";
588
+ readonly outputs: readonly [{
589
+ readonly name: "";
590
+ readonly internalType: "uint256";
591
+ readonly type: "uint256";
592
+ }];
593
+ readonly stateMutability: "view";
594
+ }, {
595
+ readonly type: "function";
596
+ readonly inputs: readonly [{
597
+ readonly name: "newOwner";
598
+ readonly internalType: "address";
599
+ readonly type: "address";
600
+ }];
601
+ readonly name: "transferOwnership";
602
+ readonly outputs: readonly [];
603
+ readonly stateMutability: "payable";
604
+ }, {
605
+ readonly type: "receive";
606
+ readonly stateMutability: "payable";
607
+ }];
608
+ /**
609
+ * @inheritdoc
610
+ *
611
+ * @public
612
+ * @static
613
+ * @type {Address}
614
+ */
615
+ static base: Address;
616
+ /**
617
+ * @inheritdoc
618
+ *
619
+ * @public
620
+ * @static
621
+ * @type {RegistryType}
622
+ */
623
+ static registryType: RegistryType;
624
+ /**
625
+ * Allocates assets to the budget.
626
+ * The caller must have already approved the contract to transfer the asset
627
+ * If the asset transfer fails, the allocation will revert
628
+ *
629
+ * @public
630
+ * @async
631
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
632
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'allocate'>} [params]
633
+ * @returns {Promise<boolean>} - True if the allocation was successful
634
+ */
635
+ allocate(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'allocate'>): Promise<boolean>;
636
+ /**
637
+ * Allocates assets to the budget.
638
+ * The caller must have already approved the contract to transfer the asset
639
+ * If the asset transfer fails, the allocation will revert
640
+ *
641
+ * @public
642
+ * @async
643
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
644
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'allocate'>} [params]
645
+ * @returns {Promise<boolean>} - True if the allocation was successful
646
+ */
647
+ allocateRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'allocate'>): Promise<{
648
+ hash: `0x${string}`;
649
+ result: boolean;
650
+ }>;
651
+ /**
652
+ * Clawbacks assets from the budget.
653
+ * Only the owner can directly clawback assets from the budget
654
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
655
+ * If the asset transfer fails, the reclamation will revert
656
+ *
657
+ * @public
658
+ * @async
659
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
660
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'clawback'>} [params]
661
+ * @returns {Promise<boolean>} - True if the request was successful
662
+ */
663
+ clawback(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'clawback'>): Promise<boolean>;
664
+ /**
665
+ * Clawbacks assets from the budget.
666
+ * Only the owner can directly clawback assets from the budget
667
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
668
+ * If the asset transfer fails, the reclamation will revert
669
+ *
670
+ * @public
671
+ * @async
672
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
673
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'clawback'>} [params]
674
+ * @returns {Promise<boolean>} - True if the request was successful
675
+ */
676
+ clawbackRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'clawback'>): Promise<{
677
+ hash: `0x${string}`;
678
+ result: boolean;
679
+ }>;
680
+ /**
681
+ * Disburses assets from the budget to a single recipient
682
+ * If the asset transfer fails, the disbursement will revert
683
+ *
684
+ * @public
685
+ * @async
686
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
687
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'disburse'>} [params]
688
+ * @returns {Promise<boolean>} - True if the disbursement was successful
689
+ */
690
+ disburse(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'disburse'>): Promise<boolean>;
691
+ /**
692
+ * Disburses assets from the budget to a single recipient
693
+ * If the asset transfer fails, the disbursement will revert
694
+ *
695
+ * @public
696
+ * @async
697
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
698
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'disburse'>} [params]
699
+ * @returns {Promise<boolean>} - True if the disbursement was successful
700
+ */
701
+ disburseRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'disburse'>): Promise<{
702
+ hash: `0x${string}`;
703
+ result: boolean;
704
+ }>;
705
+ /**
706
+ * Disburses assets from the budget to multiple recipients
707
+ *
708
+ * @public
709
+ * @async
710
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
711
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>} [params]
712
+ * @returns {Promise<boolean>} - True if all disbursements were successful
713
+ */
714
+ disburseBatch(transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>, params?: WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>): Promise<boolean>;
715
+ /**
716
+ * Disburses assets from the budget to multiple recipients
717
+ *
718
+ * @public
719
+ * @async
720
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
721
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>} [params]
722
+ * @returns {Promise<boolean>} - True if all disbursements were successful
723
+ */
724
+ disburseBatchRaw(transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>, params?: WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>): Promise<{
725
+ hash: `0x${string}`;
726
+ result: boolean;
727
+ }>;
728
+ /**
729
+ * Set the authorized status of the given accounts
730
+ * The mechanism for managing authorization is left to the implementing contract
731
+ *
732
+ * @public
733
+ * @async
734
+ * @param {Address[]} addresses - The accounts to authorize or deauthorize
735
+ * @param {boolean[]} allowed - The authorization status for the given accounts
736
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>} [params]
737
+ * @returns {Promise<void>}
738
+ */
739
+ setAuthorized(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>): Promise<void>;
740
+ /**
741
+ * Set the authorized status of the given accounts
742
+ * The mechanism for managing authorization is left to the implementing contract
743
+ *
744
+ * @public
745
+ * @async
746
+ * @param {Address[]} addresses - The accounts to authorize or deauthorize
747
+ * @param {boolean[]} allowed - The authorization status for the given accounts
748
+ * @param {?WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>} [params]
749
+ * @returns {Promise<void>}
750
+ */
751
+ setAuthorizedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>): Promise<{
752
+ hash: `0x${string}`;
753
+ result: void;
754
+ }>;
755
+ /**
756
+ * Check if the given account is authorized to use the budget
757
+ *
758
+ * @public
759
+ * @param {Address} account
760
+ * @param {?ReadParams<typeof simpleBudgetAbi, 'isAuthorized'>} [params]
761
+ * @returns {Promise<boolean>} - True if the account is authorized
762
+ */
763
+ isAuthorized(account: Address, params?: ReadParams<typeof simpleBudgetAbi, 'isAuthorized'>): Promise<boolean>;
764
+ /**
765
+ * Get the owner of the budget
766
+ *
767
+ * @public
768
+ * @param {?ReadParams<typeof simpleBudgetAbi, 'owner'>} [params]
769
+ * @returns {Promise<Address>}
770
+ */
771
+ owner(params?: ReadParams<typeof simpleBudgetAbi, 'owner'>): Promise<`0x${string}`>;
772
+ /**
773
+ * Get the total amount of assets allocated to the budget, including any that have been distributed
774
+ * If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed
775
+ *
776
+ * @public
777
+ * @param {Address} asset - The address of the asset
778
+ * @param {?(bigint | undefined)} [tokenId] - The ID of the token
779
+ * @param {?ReadParams<typeof simpleBudgetAbi, 'total'>} [params]
780
+ * @returns {Promise<bigint>} - The total amount of assets
781
+ */
782
+ total(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'total'>): Promise<never>;
783
+ /**
784
+ * Get the amount of assets available for distribution from the budget.
785
+ * If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget
786
+ *
787
+ * @public
788
+ * @param {Address} asset
789
+ * @param {?(bigint | undefined)} [tokenId]
790
+ * @param {?ReadParams<typeof simpleBudgetAbi, 'available'>} [params]
791
+ * @returns {Promise<bigint>} - The amount of assets available
792
+ */
793
+ available(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'available'>): Promise<never>;
794
+ /**
795
+ * Get the amount of assets that have been distributed from the budget.
796
+ * If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget
797
+ *
798
+ * @public
799
+ * @param {Address} asset
800
+ * @param {?(bigint | undefined)} [tokenId]
801
+ * @param {?ReadParams<typeof simpleBudgetAbi, 'distributed'>} [params]
802
+ * @returns {Promise<bigint>} - The amount of assets distributed
803
+ */
804
+ distributed(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'distributed'>): Promise<never>;
805
+ /**
806
+ * @inheritdoc
807
+ *
808
+ * @public
809
+ * @param {?SimpleBudgetPayload} [_payload]
810
+ * @param {?DeployableOptions} [_options]
811
+ * @returns {GenericDeployableParams}
812
+ */
813
+ buildParameters(_payload?: SimpleBudgetPayload, _options?: DeployableOptions): GenericDeployableParams;
814
+ }
815
+ /**
816
+ * Given a {@link SimpleBudgetPayload}, properly encode a `SimpleBudget.InitPayload` for use with {@link SimpleBudget} initialization.
817
+ *
818
+ * @param {SimpleBudgetPayload} param0
819
+ * @param {Address} param0.owner - The budget's owner
820
+ * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.
821
+ * @returns {*}
822
+ */
823
+ export declare const prepareSimpleBudgetPayload: ({ owner, authorized, }: SimpleBudgetPayload) => `0x${string}`;
824
+ //# sourceMappingURL=SimpleBudget.d.ts.map