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