@domfi/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/LICENSE +16 -0
  2. package/README.md +786 -0
  3. package/dist/actions.cjs +1 -0
  4. package/dist/actions.d.cts +17 -0
  5. package/dist/actions.d.ts +17 -0
  6. package/dist/actions.js +1 -0
  7. package/dist/api.cjs +1 -0
  8. package/dist/api.d.cts +664 -0
  9. package/dist/api.d.ts +664 -0
  10. package/dist/api.js +0 -0
  11. package/dist/chunk-2VSPOLVO.js +1 -0
  12. package/dist/chunk-5YZVCHRU.js +0 -0
  13. package/dist/chunk-77XMXAXE.js +1 -0
  14. package/dist/chunk-7OVWNPZQ.js +1 -0
  15. package/dist/chunk-BMYMNNJK.js +1 -0
  16. package/dist/chunk-C5Y2WM7C.js +1 -0
  17. package/dist/chunk-C64LJM7D.js +2 -0
  18. package/dist/chunk-CLOFJTBP.js +1 -0
  19. package/dist/chunk-CMREWGOI.js +1 -0
  20. package/dist/chunk-D5VE2O4F.js +1 -0
  21. package/dist/chunk-LDE3JHVE.js +1 -0
  22. package/dist/chunk-N4Q67DTE.js +1 -0
  23. package/dist/chunk-SZE5DE54.js +1 -0
  24. package/dist/chunk-XHQVWI2J.js +1 -0
  25. package/dist/chunk-YU5DN3PI.js +1 -0
  26. package/dist/config.cjs +2 -0
  27. package/dist/config.d.cts +132 -0
  28. package/dist/config.d.ts +132 -0
  29. package/dist/config.js +1 -0
  30. package/dist/contracts.cjs +1 -0
  31. package/dist/contracts.d.cts +13073 -0
  32. package/dist/contracts.d.ts +13073 -0
  33. package/dist/contracts.js +1 -0
  34. package/dist/delegation.cjs +1 -0
  35. package/dist/delegation.d.cts +7 -0
  36. package/dist/delegation.d.ts +7 -0
  37. package/dist/delegation.js +0 -0
  38. package/dist/errors.cjs +3 -0
  39. package/dist/errors.d.cts +155 -0
  40. package/dist/errors.d.ts +155 -0
  41. package/dist/errors.js +3 -0
  42. package/dist/index.cjs +2 -0
  43. package/dist/index.d.cts +216 -0
  44. package/dist/index.d.ts +216 -0
  45. package/dist/index.js +1 -0
  46. package/dist/math.cjs +1 -0
  47. package/dist/math.d.cts +273 -0
  48. package/dist/math.d.ts +273 -0
  49. package/dist/math.js +1 -0
  50. package/dist/position-BnhSFyGe.d.cts +56 -0
  51. package/dist/position-BnhSFyGe.d.ts +56 -0
  52. package/dist/rawSchemas-MAT7EZCV.js +1 -0
  53. package/dist/referrals.cjs +1 -0
  54. package/dist/referrals.d.cts +66 -0
  55. package/dist/referrals.d.ts +66 -0
  56. package/dist/referrals.js +1 -0
  57. package/dist/serde.cjs +1 -0
  58. package/dist/serde.d.cts +24 -0
  59. package/dist/serde.d.ts +24 -0
  60. package/dist/serde.js +1 -0
  61. package/dist/token.cjs +1 -0
  62. package/dist/token.d.cts +32 -0
  63. package/dist/token.d.ts +32 -0
  64. package/dist/token.js +0 -0
  65. package/dist/trading.cjs +1 -0
  66. package/dist/trading.d.cts +20 -0
  67. package/dist/trading.d.ts +20 -0
  68. package/dist/trading.js +1 -0
  69. package/dist/types-7s13ZSql.d.ts +533 -0
  70. package/dist/types-BK6dYOXr.d.cts +118 -0
  71. package/dist/types-CMtixBIP.d.cts +464 -0
  72. package/dist/types-DB1r_Ppi.d.ts +464 -0
  73. package/dist/types-DDgJiEFg.d.ts +780 -0
  74. package/dist/types-DJBX-p4X.d.cts +780 -0
  75. package/dist/types-DQft82W7.d.cts +533 -0
  76. package/dist/types-DhCzEwnS.d.ts +118 -0
  77. package/dist/types-veTDfbhq.d.ts +436 -0
  78. package/dist/types-x1MvxSdy.d.cts +436 -0
  79. package/dist/units-BYd75H7U.d.cts +22 -0
  80. package/dist/units-BYd75H7U.d.ts +22 -0
  81. package/dist/units.cjs +1 -0
  82. package/dist/units.d.cts +248 -0
  83. package/dist/units.d.ts +248 -0
  84. package/dist/units.js +1 -0
  85. package/dist/valuation.cjs +1 -0
  86. package/dist/valuation.d.cts +5 -0
  87. package/dist/valuation.d.ts +5 -0
  88. package/dist/valuation.js +1 -0
  89. package/dist/vault.cjs +1 -0
  90. package/dist/vault.d.cts +34 -0
  91. package/dist/vault.d.ts +34 -0
  92. package/dist/vault.js +1 -0
  93. package/package.json +181 -0
@@ -0,0 +1,436 @@
1
+ import { R as ReadOptions, e as ResultEnvelope, f as VaultHistoryPageOptions, C as CursorPagination } from './types-7s13ZSql.js';
2
+ import { ReferralCodeIdInput } from './referrals.js';
3
+ import { W as WaitReceiptOptions, T as TransactionReceipt } from './types-DDgJiEFg.js';
4
+ import { Address, Hex, VaultAsset, VaultShare, Ratio, DecimalString, VaultSharePrice } from './units.js';
5
+
6
+ /** Normalized vault operation type from REST/indexed events. */
7
+ type VaultOperationType = "Deposit" | "DepositLocked" | "DepositUnlocked" | "WithdrawRequested" | "Withdraw" | "WithdrawCanceled" | "LockedDepositTransferIn" | "LockedDepositTransferOut" | "unknown";
8
+ /** Vault event returned by REST read models. */
9
+ type VaultEvent = {
10
+ time: number;
11
+ blockNumber: number;
12
+ txIndex: number;
13
+ logIndex: number;
14
+ txHash?: Hex;
15
+ id?: string;
16
+ opType: VaultOperationType;
17
+ rawOpType?: string;
18
+ assets?: VaultAsset;
19
+ shares?: VaultShare;
20
+ currentEpoch?: number;
21
+ unlockEpoch?: number;
22
+ lockDurationSeconds?: number;
23
+ };
24
+ /** Current vault aggregate statistics. */
25
+ type VaultStats = {
26
+ accPnlPerToken: Ratio;
27
+ currentEpoch: number;
28
+ currentValueLocked: VaultAsset;
29
+ epochStart: number;
30
+ totalShares: VaultShare;
31
+ apr: DecimalString;
32
+ sharePrice: VaultSharePrice;
33
+ collateralizationRatio: DecimalString;
34
+ overCollateralization: DecimalString;
35
+ };
36
+ /** Vault account summary including locked, unlocked, pending, and historical events. */
37
+ type VaultAccount = {
38
+ totalAssets: VaultAsset;
39
+ totalShares: VaultShare;
40
+ totalLockedShares: VaultShare;
41
+ lockedDeposits: VaultEvent[];
42
+ unlockedDeposits: VaultEvent[];
43
+ pendingWithdraws: VaultEvent[];
44
+ history: VaultEvent[];
45
+ historyPagination: CursorPagination;
46
+ };
47
+ /** Paginated vault account history. */
48
+ type VaultAccountHistory = {
49
+ history: VaultEvent[];
50
+ pagination: CursorPagination;
51
+ };
52
+ /** Options for vault account summary reads. */
53
+ type VaultAccountOptions = VaultHistoryPageOptions;
54
+ /** Options for vault account history reads. */
55
+ type VaultAccountHistoryOptions = VaultHistoryPageOptions;
56
+ /** Vault events emitted by a specific transaction. */
57
+ type VaultTransactionEvents = {
58
+ txHash: Hex;
59
+ events: VaultEvent[];
60
+ };
61
+ /** Onchain vault operation name used by prepared transactions and outcomes. */
62
+ type VaultVerb = "deposit" | "mint" | "makeWithdrawRequest" | "cancelWithdrawRequest" | "withdraw" | "redeem" | "depositWithDiscountAndLock" | "mintWithDiscountAndLock" | "unlockDeposit";
63
+ /** Options for preparing a vault transaction. */
64
+ type VaultPrepareOptions = ReadOptions & {
65
+ account?: Address;
66
+ skipApprovalCheck?: boolean;
67
+ };
68
+ /** Options for simulating a prepared vault transaction. */
69
+ type VaultSimulateOptions = ReadOptions & {
70
+ account?: Address;
71
+ };
72
+ type VaultPreparedSendControls = Pick<ReadOptions, "signal"> & {
73
+ account?: Address;
74
+ gas?: bigint;
75
+ nonce?: number;
76
+ maxFeePerGas?: bigint;
77
+ };
78
+ /** Send options for a prepared vault transaction. */
79
+ type VaultPreparedSendOptions = VaultPreparedSendControls & {
80
+ skipApprovalCheck?: never;
81
+ };
82
+ /** Send options for direct vault helper methods. */
83
+ type VaultDirectSendOptions = VaultPreparedSendControls;
84
+ /** Alias for prepared vault send options. */
85
+ type VaultSendOptions = VaultPreparedSendOptions;
86
+ /** Controls for waiting on vault transaction receipts. */
87
+ type VaultWaitReceiptOptions = WaitReceiptOptions;
88
+ /** Controls for tracking vault transactions through REST indexing. */
89
+ type VaultTrackOptions = VaultWaitReceiptOptions & {
90
+ intervalMs?: number;
91
+ maxAttempts?: number;
92
+ maxDurationMs?: number;
93
+ limit?: number;
94
+ };
95
+ /** Vault deposit parameters. */
96
+ type VaultDepositParams = {
97
+ assets: VaultAsset;
98
+ receiver: Address;
99
+ minShares?: VaultShare;
100
+ referralCodeId?: ReferralCodeIdInput;
101
+ };
102
+ /** Vault mint parameters. */
103
+ type VaultMintParams = {
104
+ shares: VaultShare;
105
+ receiver: Address;
106
+ maxAssets?: VaultAsset;
107
+ };
108
+ /** Vault withdrawal-request parameters. */
109
+ type VaultMakeWithdrawRequestParams = {
110
+ shares: VaultShare;
111
+ owner: Address;
112
+ };
113
+ /** Vault cancel-withdrawal-request parameters. */
114
+ type VaultCancelWithdrawRequestParams = {
115
+ shares: VaultShare;
116
+ owner: Address;
117
+ unlockEpoch: number;
118
+ };
119
+ /** Vault withdraw parameters. */
120
+ type VaultWithdrawParams = {
121
+ assets: VaultAsset;
122
+ receiver: Address;
123
+ owner: Address;
124
+ maxShares?: VaultShare;
125
+ };
126
+ /** Vault redeem parameters. */
127
+ type VaultRedeemParams = {
128
+ shares: VaultShare;
129
+ receiver: Address;
130
+ owner: Address;
131
+ minAssets?: VaultAsset;
132
+ };
133
+ /** Discounted locked vault deposit parameters. */
134
+ type VaultDepositWithDiscountAndLockParams = {
135
+ assets: VaultAsset;
136
+ lockDurationSeconds: number;
137
+ receiver: Address;
138
+ minShares: VaultShare;
139
+ referralCodeId?: ReferralCodeIdInput;
140
+ };
141
+ /** Discounted locked vault mint parameters. */
142
+ type VaultMintWithDiscountAndLockParams = {
143
+ shares: VaultShare;
144
+ lockDurationSeconds: number;
145
+ receiver: Address;
146
+ maxAssetsDeposited: VaultAsset;
147
+ };
148
+ /** Vault locked-deposit unlock parameters. */
149
+ type VaultUnlockDepositParams = {
150
+ depositId: bigint;
151
+ receiver: Address;
152
+ };
153
+ /** Approval action required before a vault transaction can be sent. */
154
+ type VaultApprovalAction = "none" | "approve";
155
+ /** Asset, share, or NFT approval state needed by a vault transaction. */
156
+ type VaultApprovalNeed = {
157
+ kind: "asset";
158
+ token: Address;
159
+ owner: Address;
160
+ spender: Address;
161
+ currentAllowance: VaultAsset;
162
+ requiredAllowance: VaultAsset;
163
+ action: VaultApprovalAction;
164
+ } | {
165
+ kind: "share";
166
+ token: Address;
167
+ owner: Address;
168
+ spender: Address;
169
+ currentAllowance: VaultShare;
170
+ requiredAllowance: VaultShare;
171
+ action: VaultApprovalAction;
172
+ } | {
173
+ kind: "nft";
174
+ token: Address;
175
+ owner: Address;
176
+ spender: Address;
177
+ depositId: bigint;
178
+ currentApproved: Address;
179
+ operatorApproved: boolean;
180
+ action: VaultApprovalAction;
181
+ };
182
+ /** Non-fatal preflight warning produced while preparing a vault transaction. */
183
+ type VaultPreflightWarning = {
184
+ code: string;
185
+ message: string;
186
+ severity: "info" | "warning" | "error";
187
+ };
188
+ /** Normalized vault operation parameters used by preflight reports. */
189
+ type VaultNormalizedParams = {
190
+ kind: "deposit";
191
+ params: VaultDepositParams;
192
+ } | {
193
+ kind: "mint";
194
+ params: VaultMintParams;
195
+ } | {
196
+ kind: "makeWithdrawRequest";
197
+ params: VaultMakeWithdrawRequestParams;
198
+ } | {
199
+ kind: "cancelWithdrawRequest";
200
+ params: VaultCancelWithdrawRequestParams;
201
+ } | {
202
+ kind: "withdraw";
203
+ params: VaultWithdrawParams;
204
+ } | {
205
+ kind: "redeem";
206
+ params: VaultRedeemParams;
207
+ } | {
208
+ kind: "depositWithDiscountAndLock";
209
+ params: VaultDepositWithDiscountAndLockParams;
210
+ } | {
211
+ kind: "mintWithDiscountAndLock";
212
+ params: VaultMintWithDiscountAndLockParams;
213
+ } | {
214
+ kind: "unlockDeposit";
215
+ params: VaultUnlockDepositParams;
216
+ };
217
+ /** Summary of a prepared vault transaction before simulation or send. */
218
+ type VaultPreflightReport = {
219
+ normalizedParams: VaultNormalizedParams;
220
+ approvals: VaultApprovalNeed[];
221
+ warnings: VaultPreflightWarning[];
222
+ };
223
+ /** Simulation result for a prepared vault transaction. */
224
+ type VaultSimResult<Verb extends VaultVerb = VaultVerb> = {
225
+ verb: Verb;
226
+ request: {
227
+ to: Address;
228
+ data: Hex;
229
+ value?: bigint;
230
+ account: Address;
231
+ };
232
+ result?: unknown;
233
+ warnings: VaultPreflightWarning[];
234
+ };
235
+ /** Shared receipt-parsed vault outcome fields. */
236
+ type VaultOutcomeBase<Verb extends VaultVerb, EventName extends string> = {
237
+ eventName: EventName;
238
+ verb: Verb;
239
+ owner: Address;
240
+ txHash: Hex;
241
+ blockNumber: bigint;
242
+ txIndex: number;
243
+ logIndex: number;
244
+ };
245
+ /** Locked deposit data parsed from vault events. */
246
+ type VaultLockedDeposit = {
247
+ owner: Address;
248
+ shares: VaultShare;
249
+ assetsDeposited: VaultAsset;
250
+ assetsDiscount: VaultAsset;
251
+ atTimestamp: number;
252
+ lockDurationSeconds: number;
253
+ };
254
+ /** Receipt outcome parsed from vault deposit or mint events. */
255
+ type VaultDepositOutcome<Verb extends "deposit" | "mint" = "deposit" | "mint"> = VaultOutcomeBase<Verb, "Deposit"> & {
256
+ sender: Address;
257
+ assets: VaultAsset;
258
+ shares: VaultShare;
259
+ };
260
+ /** Receipt outcome parsed from vault withdrawal request events. */
261
+ type VaultWithdrawRequestOutcome = VaultOutcomeBase<"makeWithdrawRequest", "WithdrawRequested"> & {
262
+ sender: Address;
263
+ shares: VaultShare;
264
+ currEpoch: number;
265
+ unlockEpoch: number;
266
+ };
267
+ /** Receipt outcome parsed from vault withdrawal cancellation events. */
268
+ type VaultWithdrawCancelOutcome = VaultOutcomeBase<"cancelWithdrawRequest", "WithdrawCanceled"> & {
269
+ sender: Address;
270
+ shares: VaultShare;
271
+ currEpoch: number;
272
+ unlockEpoch: number;
273
+ };
274
+ /** Receipt outcome parsed from vault withdraw or redeem events. */
275
+ type VaultWithdrawOutcome<Verb extends "withdraw" | "redeem" = "withdraw" | "redeem"> = VaultOutcomeBase<Verb, "Withdraw"> & {
276
+ sender: Address;
277
+ receiver: Address;
278
+ assets: VaultAsset;
279
+ shares: VaultShare;
280
+ };
281
+ /** Receipt outcome parsed from discounted locked deposit events. */
282
+ type VaultLockedDepositOutcome<Verb extends "depositWithDiscountAndLock" | "mintWithDiscountAndLock" = "depositWithDiscountAndLock" | "mintWithDiscountAndLock"> = VaultOutcomeBase<Verb, "DepositLocked"> & {
283
+ sender: Address;
284
+ depositId: bigint;
285
+ lockedDeposit: VaultLockedDeposit;
286
+ };
287
+ /** Receipt outcome parsed from locked deposit unlock events. */
288
+ type VaultUnlockOutcome = VaultOutcomeBase<"unlockDeposit", "DepositUnlocked"> & {
289
+ sender: Address;
290
+ receiver: Address;
291
+ depositId: bigint;
292
+ lockedDeposit: VaultLockedDeposit;
293
+ };
294
+ /** Any receipt-parsed vault outcome. */
295
+ type VaultReceiptOutcome = VaultDepositOutcome | VaultWithdrawRequestOutcome | VaultWithdrawCancelOutcome | VaultWithdrawOutcome | VaultLockedDepositOutcome | VaultUnlockOutcome;
296
+ /** Receipt outcome mapped to a specific vault verb. */
297
+ type VaultOutcomeForVerb<Verb extends VaultVerb> = Verb extends "deposit" | "mint" ? VaultDepositOutcome<Verb> : Verb extends "makeWithdrawRequest" ? VaultWithdrawRequestOutcome : Verb extends "cancelWithdrawRequest" ? VaultWithdrawCancelOutcome : Verb extends "withdraw" | "redeem" ? VaultWithdrawOutcome<Verb> : Verb extends "depositWithDiscountAndLock" | "mintWithDiscountAndLock" ? VaultLockedDepositOutcome<Verb> : Verb extends "unlockDeposit" ? VaultUnlockOutcome : never;
298
+ /** Vault outcome matched with the REST/indexed event for the same transaction. */
299
+ type VaultIndexedOutcome<Verb extends VaultVerb = VaultVerb> = {
300
+ outcome: VaultOutcomeForVerb<Verb>;
301
+ event: VaultEvent;
302
+ };
303
+ /** Indexed vault outcome mapped to a specific vault verb. */
304
+ type VaultIndexedOutcomeForVerb<Verb extends VaultVerb> = VaultIndexedOutcome<Verb>;
305
+ /** Vault outcome with both transaction receipt and indexed REST event. */
306
+ type VaultTrackedOutcome<Verb extends VaultVerb = VaultVerb> = {
307
+ receipt: TransactionReceipt;
308
+ outcome: VaultOutcomeForVerb<Verb>;
309
+ indexed: VaultIndexedOutcome<Verb>;
310
+ };
311
+ /** Tracked vault outcome mapped to a specific vault verb. */
312
+ type VaultTrackedOutcomeForVerb<Verb extends VaultVerb> = VaultTrackedOutcome<Verb>;
313
+ /** Handle returned by direct vault send methods and prepared vault sends. */
314
+ type VaultTxHandle<Verb extends VaultVerb = VaultVerb> = {
315
+ kind: "vault_tx";
316
+ verb: Verb;
317
+ hash: Hex;
318
+ /**
319
+ * Waits for the vault transaction receipt.
320
+ *
321
+ * @throws TimeoutError, AbortError, or TransportError while waiting for the transaction receipt.
322
+ */
323
+ waitReceipt(opts?: VaultWaitReceiptOptions): Promise<TransactionReceipt>;
324
+ /**
325
+ * Parses the domain outcome from the vault transaction receipt.
326
+ *
327
+ * @throws ContractRevertError for reverted receipts, ValidationError for unexpected receipt logs, or receipt wait errors.
328
+ */
329
+ outcome(opts?: VaultWaitReceiptOptions): Promise<VaultOutcomeForVerb<Verb>>;
330
+ /**
331
+ * Waits until the vault outcome is visible in REST read models.
332
+ *
333
+ * @throws ContractRevertError for reverted receipts, or ReadModelNotReadyError, ValidationError, TimeoutError, AbortError, ApiError, or TransportError.
334
+ */
335
+ waitIndexed(opts?: VaultTrackOptions): Promise<VaultIndexedOutcomeForVerb<Verb>>;
336
+ /**
337
+ * Waits for receipt parsing and REST indexing, returning both sources.
338
+ *
339
+ * @throws ContractRevertError for reverted receipts, or ReadModelNotReadyError, ValidationError, TimeoutError, AbortError, ApiError, or TransportError.
340
+ */
341
+ track(opts?: VaultTrackOptions): Promise<VaultTrackedOutcomeForVerb<Verb>>;
342
+ };
343
+ /** Prepared vault transaction that can be summarized, simulated, or sent. */
344
+ type PreparedVaultTx<Verb extends VaultVerb = VaultVerb> = {
345
+ verb: Verb;
346
+ to: Address;
347
+ data: Hex;
348
+ value?: bigint;
349
+ preparedAccount?: Address;
350
+ requiredApprovals: {
351
+ status: "checked";
352
+ approvals: VaultApprovalNeed[];
353
+ } | {
354
+ status: "unchecked";
355
+ };
356
+ /**
357
+ * Returns the preflight summary for this prepared vault transaction.
358
+ *
359
+ * @throws ValidationError for invalid prepared vault parameters.
360
+ */
361
+ summary(): Promise<VaultPreflightReport>;
362
+ /**
363
+ * Simulates the prepared vault transaction.
364
+ *
365
+ * @throws ValidationError, TimeoutError, AbortError, ContractRevertError, TransportError, or provider errors.
366
+ */
367
+ simulate(opts?: VaultSimulateOptions): Promise<VaultSimResult<Verb>>;
368
+ /**
369
+ * Sends the prepared vault transaction with the SDK-configured wallet client.
370
+ *
371
+ * @throws ValidationError, TimeoutError, AbortError, ContractRevertError, wallet errors, or transport SDK errors.
372
+ */
373
+ send(opts?: VaultPreparedSendOptions): Promise<VaultTxHandle<Verb>>;
374
+ };
375
+ /**
376
+ * Vault REST read client.
377
+ *
378
+ * @throws ReadModelNotReadyError when strict readiness policy rejects stale or unsafe read models.
379
+ * @throws ValidationError when SDK input or remote payload validation fails.
380
+ * @throws TimeoutError when a configured read timeout expires.
381
+ * @throws AbortError when the caller-provided signal aborts the request.
382
+ * @throws ApiError or TransportError for REST API and transport failures.
383
+ */
384
+ type VaultReadClient = {
385
+ /** Reads current aggregate vault statistics. */
386
+ stats(opts?: ReadOptions): Promise<ResultEnvelope<VaultStats>>;
387
+ /** Reads a vault account summary for `wallet`. */
388
+ account(wallet: Address, opts?: VaultAccountOptions): Promise<ResultEnvelope<VaultAccount>>;
389
+ /** Reads one page of vault account history for `wallet`. */
390
+ accountHistory(wallet: Address, opts?: VaultAccountHistoryOptions): Promise<ResultEnvelope<VaultAccountHistory>>;
391
+ /** Reads vault events indexed for a transaction hash. */
392
+ transactionEvents(txHash: Hex, opts?: ReadOptions): Promise<ResultEnvelope<VaultTransactionEvents>>;
393
+ /** Iterates individual vault account history events across pages. */
394
+ accountHistoryIterator(wallet: Address, opts?: VaultAccountHistoryOptions): AsyncIterable<VaultEvent>;
395
+ };
396
+ /** Full vault client with REST reads, preparation helpers, and direct send helpers. */
397
+ type VaultClient = VaultReadClient & {
398
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
399
+ prepareDeposit(params: VaultDepositParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"deposit">>;
400
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
401
+ prepareMint(params: VaultMintParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"mint">>;
402
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
403
+ prepareMakeWithdrawRequest(params: VaultMakeWithdrawRequestParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"makeWithdrawRequest">>;
404
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
405
+ prepareCancelWithdrawRequest(params: VaultCancelWithdrawRequestParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"cancelWithdrawRequest">>;
406
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
407
+ prepareWithdraw(params: VaultWithdrawParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"withdraw">>;
408
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
409
+ prepareRedeem(params: VaultRedeemParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"redeem">>;
410
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
411
+ prepareDepositWithDiscountAndLock(params: VaultDepositWithDiscountAndLockParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"depositWithDiscountAndLock">>;
412
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
413
+ prepareMintWithDiscountAndLock(params: VaultMintWithDiscountAndLockParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"mintWithDiscountAndLock">>;
414
+ /** @throws ValidationError, MissingPublicClientError, TimeoutError, AbortError, or TransportError during vault preflight and approval reads. */
415
+ prepareUnlockDeposit(params: VaultUnlockDepositParams, opts?: VaultPrepareOptions): Promise<PreparedVaultTx<"unlockDeposit">>;
416
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
417
+ deposit(params: VaultDepositParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"deposit">>;
418
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
419
+ mint(params: VaultMintParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"mint">>;
420
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
421
+ makeWithdrawRequest(params: VaultMakeWithdrawRequestParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"makeWithdrawRequest">>;
422
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
423
+ cancelWithdrawRequest(params: VaultCancelWithdrawRequestParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"cancelWithdrawRequest">>;
424
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
425
+ withdraw(params: VaultWithdrawParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"withdraw">>;
426
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
427
+ redeem(params: VaultRedeemParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"redeem">>;
428
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
429
+ depositWithDiscountAndLock(params: VaultDepositWithDiscountAndLockParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"depositWithDiscountAndLock">>;
430
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
431
+ mintWithDiscountAndLock(params: VaultMintWithDiscountAndLockParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"mintWithDiscountAndLock">>;
432
+ /** @throws ValidationError, MissingWalletClientError, MissingPublicClientError, TimeoutError, AbortError, ContractRevertError, or TransportError while preparing and submitting. */
433
+ unlockDeposit(params: VaultUnlockDepositParams, opts?: VaultDirectSendOptions): Promise<VaultTxHandle<"unlockDeposit">>;
434
+ };
435
+
436
+ export type { VaultDirectSendOptions as A, VaultIndexedOutcomeForVerb as B, VaultLockedDeposit as C, VaultLockedDepositOutcome as D, VaultNormalizedParams as E, VaultOperationType as F, VaultOutcomeBase as G, VaultPreflightReport as H, VaultPreflightWarning as I, VaultPrepareOptions as J, VaultPreparedSendOptions as K, VaultReceiptOutcome as L, VaultSendOptions as M, VaultSimResult as N, VaultSimulateOptions as O, PreparedVaultTx as P, VaultTrackedOutcomeForVerb as Q, VaultUnlockOutcome as R, VaultWaitReceiptOptions as S, VaultWithdrawCancelOutcome as T, VaultWithdrawOutcome as U, VaultVerb as V, VaultWithdrawRequestOutcome as W, VaultOutcomeForVerb as a, VaultDepositParams as b, VaultMintParams as c, VaultMakeWithdrawRequestParams as d, VaultCancelWithdrawRequestParams as e, VaultWithdrawParams as f, VaultRedeemParams as g, VaultDepositWithDiscountAndLockParams as h, VaultMintWithDiscountAndLockParams as i, VaultUnlockDepositParams as j, VaultClient as k, VaultReadClient as l, VaultAccount as m, VaultAccountHistory as n, VaultEvent as o, VaultStats as p, VaultTransactionEvents as q, VaultTxHandle as r, VaultTrackOptions as s, VaultTrackedOutcome as t, VaultIndexedOutcome as u, VaultAccountHistoryOptions as v, VaultAccountOptions as w, VaultApprovalAction as x, VaultApprovalNeed as y, VaultDepositOutcome as z };