@huma-finance/soroban-tranche-vault 0.0.8-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts ADDED
@@ -0,0 +1,1130 @@
1
+ import { ContractSpec, Address } from '@stellar/stellar-sdk'
2
+ import { Buffer } from 'buffer'
3
+ import {
4
+ AssembledTransaction,
5
+ ContractClient,
6
+ ContractClientOptions,
7
+ } from '@stellar/stellar-sdk/lib/contract_client/index.js'
8
+ import type {
9
+ u32,
10
+ i32,
11
+ u64,
12
+ i64,
13
+ u128,
14
+ i128,
15
+ u256,
16
+ i256,
17
+ Option,
18
+ Typepoint,
19
+ Duration,
20
+ } from '@stellar/stellar-sdk/lib/contract_client'
21
+ import { Result } from '@stellar/stellar-sdk/lib/rust_types/index.js'
22
+ export * from '@stellar/stellar-sdk'
23
+ export * from '@stellar/stellar-sdk/lib/contract_client/index.js'
24
+ export * from '@stellar/stellar-sdk/lib/rust_types/index.js'
25
+
26
+ if (typeof window !== 'undefined') {
27
+ //@ts-ignore Buffer exists
28
+ window.Buffer = window.Buffer || Buffer
29
+ }
30
+
31
+ export const networks = {
32
+ testnet: {
33
+ networkPassphrase: 'Test SDF Network ; September 2015',
34
+ contractId: 'CDXI5L5EFHBW3KYY3D6JGXJTGDOG5EZAQUDAK5LWZQVH4TEUDAO7PBGU',
35
+ },
36
+ } as const
37
+
38
+ export type ClientDataKey =
39
+ | { tag: 'Pool'; values: void }
40
+ | { tag: 'PoolManager'; values: void }
41
+ | { tag: 'PoolStorage'; values: void }
42
+ | { tag: 'UnderlyingToken'; values: void }
43
+
44
+ export const Errors = {
45
+ 1: { message: '' },
46
+ 2: { message: '' },
47
+ 21: { message: '' },
48
+ 22: { message: '' },
49
+ 23: { message: '' },
50
+ 51: { message: '' },
51
+ 52: { message: '' },
52
+ 81: { message: '' },
53
+ 82: { message: '' },
54
+ 83: { message: '' },
55
+ 84: { message: '' },
56
+ 85: { message: '' },
57
+ 86: { message: '' },
58
+ 101: { message: '' },
59
+ }
60
+ export type DataKey =
61
+ | { tag: 'Balance'; values: readonly [string] }
62
+ | { tag: 'TotalSupply'; values: void }
63
+
64
+ /**
65
+ * An epoch has been processed.
66
+ * # Fields:
67
+ * * `epoch_id` - The epoch ID.
68
+ * * `shares_requested` - The number of tranche shares that were requested for redemption.
69
+ * * `shares_processed` - The number of tranche shares that have been redeemed.
70
+ * * `amount_processed` - The amount of the underlying pool asset token redeemed in this epoch.
71
+ */
72
+ export interface EpochProcessedEvent {
73
+ amount_processed: u128
74
+ epoch_id: u64
75
+ shares_processed: u128
76
+ shares_requested: u128
77
+ }
78
+
79
+ /**
80
+ * A lender has been added.
81
+ * # Fields:
82
+ * * `account` - The address of the lender.
83
+ */
84
+ export interface LenderAddedEvent {
85
+ account: string
86
+ }
87
+
88
+ /**
89
+ * A lender has been removed.
90
+ * # Fields:
91
+ * * `account` - The address of the lender.
92
+ */
93
+ export interface LenderRemovedEvent {
94
+ account: string
95
+ }
96
+
97
+ /**
98
+ * A deposit has been made to the tranche.
99
+ * # Fields:
100
+ * * `sender` - The address that made the deposit.
101
+ * * `assets` - The amount measured in the underlying asset.
102
+ * * `shares` - The number of shares minted for this deposit.
103
+ */
104
+ export interface LiquidityDepositedEvent {
105
+ assets: u128
106
+ sender: string
107
+ shares: u128
108
+ }
109
+
110
+ /**
111
+ * A disbursement to the lender for a processed redemption.
112
+ * # Fields:
113
+ * * `account` - The account whose shares have been redeemed.
114
+ * * `amount_disbursed` - The amount of the disbursement.
115
+ */
116
+ export interface LenderFundDisbursedEvent {
117
+ account: string
118
+ amount_disbursed: u128
119
+ }
120
+
121
+ /**
122
+ * A lender has withdrawn all their assets after pool closure.
123
+ * # Fields:
124
+ * * `account` - The lender who has withdrawn.
125
+ * * `shares` - The number of shares burned.
126
+ * * `assets` - The amount that was withdrawn.
127
+ */
128
+ export interface LenderFundWithdrawnEvent {
129
+ account: string
130
+ assets: u128
131
+ shares: u128
132
+ }
133
+
134
+ /**
135
+ * A redemption request has been added.
136
+ * # Fields:
137
+ * * `epoch_id` - The epoch ID.
138
+ * * `account` - The account whose shares to be redeemed.
139
+ * * `shares` - The number of shares to be redeemed.
140
+ */
141
+ export interface RedemptionRequestAddedEvent {
142
+ account: string
143
+ epoch_id: u64
144
+ shares: u128
145
+ }
146
+
147
+ /**
148
+ * A redemption request has been canceled.
149
+ * # Fields:
150
+ * * `epoch_id` - The epoch ID.
151
+ * * `account` - The account whose request to be canceled.
152
+ * * `shares` - The number of shares to be included in the cancellation.
153
+ */
154
+ export interface RedemptionRequestCanceledEvent {
155
+ account: string
156
+ epoch_id: u64
157
+ shares: u128
158
+ }
159
+
160
+ export type TrancheVaultDataKey =
161
+ | { tag: 'TrancheIndex'; values: void }
162
+ | { tag: 'ApprovedLender'; values: readonly [string] }
163
+ | { tag: 'DepositRecord'; values: readonly [string] }
164
+ | { tag: 'LenderRedemptionRecord'; values: readonly [string] }
165
+ | { tag: 'EpochRedemptionSummary'; values: readonly [u64] }
166
+
167
+ export interface DepositRecord {
168
+ last_deposit_time: u64
169
+ principal: u128
170
+ }
171
+
172
+ export interface LenderRedemptionRecord {
173
+ next_epoch_id_to_process: u64
174
+ num_shares_requested: u128
175
+ principal_requested: u128
176
+ total_amount_processed: u128
177
+ total_amount_withdrawn: u128
178
+ }
179
+
180
+ export type PayPeriodDuration =
181
+ | { tag: 'Monthly'; values: void }
182
+ | { tag: 'Quarterly'; values: void }
183
+ | { tag: 'SemiAnnually'; values: void }
184
+
185
+ export interface PoolSettings {
186
+ default_grace_period_days: u32
187
+ late_payment_grace_period_days: u32
188
+ max_credit_line: u128
189
+ min_deposit_amount: u128
190
+ pay_period_duration: PayPeriodDuration
191
+ principal_only_payment_allowed: boolean
192
+ }
193
+
194
+ export interface LPConfig {
195
+ fixed_senior_yield_bps: u32
196
+ liquidity_cap: u128
197
+ max_senior_junior_ratio: u32
198
+ tranches_risk_adjustment_bps: u32
199
+ withdrawal_lockout_period_days: u32
200
+ }
201
+
202
+ export interface FeeStructure {
203
+ front_loading_fee_bps: u32
204
+ front_loading_fee_flat: u128
205
+ late_fee_bps: u32
206
+ yield_bps: u32
207
+ }
208
+
209
+ export type PoolStatus =
210
+ | { tag: 'Off'; values: void }
211
+ | { tag: 'On'; values: void }
212
+ | { tag: 'Closed'; values: void }
213
+
214
+ export interface CurrentEpoch {
215
+ end_time: u64
216
+ id: u64
217
+ }
218
+
219
+ export interface AdminRnR {
220
+ liquidity_rate_bps_ea: u32
221
+ liquidity_rate_bps_pool_owner: u32
222
+ reward_rate_bps_ea: u32
223
+ reward_rate_bps_pool_owner: u32
224
+ }
225
+
226
+ export interface TrancheAddresses {
227
+ addrs: Array<Option<string>>
228
+ }
229
+
230
+ export interface TrancheAssets {
231
+ assets: Array<u128>
232
+ }
233
+
234
+ export interface TokenMetadata {
235
+ decimal: u32
236
+ name: string
237
+ symbol: string
238
+ }
239
+
240
+ export interface EpochRedemptionSummary {
241
+ epoch_id: u64
242
+ total_amount_processed: u128
243
+ total_shares_processed: u128
244
+ total_shares_requested: u128
245
+ }
246
+
247
+ export interface Client {
248
+ /**
249
+ * Construct and simulate a initialize transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
250
+ */
251
+ initialize: (
252
+ {
253
+ name,
254
+ symbol,
255
+ underlying_token,
256
+ pool,
257
+ pool_storage,
258
+ pool_manager,
259
+ index,
260
+ }: {
261
+ name: string
262
+ symbol: string
263
+ underlying_token: string
264
+ pool: string
265
+ pool_storage: string
266
+ pool_manager: string
267
+ index: u32
268
+ },
269
+ options?: {
270
+ /**
271
+ * The fee to pay for the transaction. Default: BASE_FEE
272
+ */
273
+ fee?: number
274
+
275
+ /**
276
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
277
+ */
278
+ timeoutInSeconds?: number
279
+
280
+ /**
281
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
282
+ */
283
+ simulate?: boolean
284
+ },
285
+ ) => Promise<AssembledTransaction<null>>
286
+
287
+ /**
288
+ * Construct and simulate a add_approved_lender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
289
+ */
290
+ add_approved_lender: (
291
+ { caller, lender }: { caller: string; lender: string },
292
+ options?: {
293
+ /**
294
+ * The fee to pay for the transaction. Default: BASE_FEE
295
+ */
296
+ fee?: number
297
+
298
+ /**
299
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
300
+ */
301
+ timeoutInSeconds?: number
302
+
303
+ /**
304
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
305
+ */
306
+ simulate?: boolean
307
+ },
308
+ ) => Promise<AssembledTransaction<null>>
309
+
310
+ /**
311
+ * Construct and simulate a remove_approved_lender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
312
+ */
313
+ remove_approved_lender: (
314
+ { caller, lender }: { caller: string; lender: string },
315
+ options?: {
316
+ /**
317
+ * The fee to pay for the transaction. Default: BASE_FEE
318
+ */
319
+ fee?: number
320
+
321
+ /**
322
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
323
+ */
324
+ timeoutInSeconds?: number
325
+
326
+ /**
327
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
328
+ */
329
+ simulate?: boolean
330
+ },
331
+ ) => Promise<AssembledTransaction<null>>
332
+
333
+ /**
334
+ * Construct and simulate a make_initial_deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
335
+ */
336
+ make_initial_deposit: (
337
+ { caller, assets }: { caller: string; assets: u128 },
338
+ options?: {
339
+ /**
340
+ * The fee to pay for the transaction. Default: BASE_FEE
341
+ */
342
+ fee?: number
343
+
344
+ /**
345
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
346
+ */
347
+ timeoutInSeconds?: number
348
+
349
+ /**
350
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
351
+ */
352
+ simulate?: boolean
353
+ },
354
+ ) => Promise<AssembledTransaction<u128>>
355
+
356
+ /**
357
+ * Construct and simulate a deposit transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
358
+ */
359
+ deposit: (
360
+ { lender, assets }: { lender: string; assets: u128 },
361
+ options?: {
362
+ /**
363
+ * The fee to pay for the transaction. Default: BASE_FEE
364
+ */
365
+ fee?: number
366
+
367
+ /**
368
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
369
+ */
370
+ timeoutInSeconds?: number
371
+
372
+ /**
373
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
374
+ */
375
+ simulate?: boolean
376
+ },
377
+ ) => Promise<AssembledTransaction<u128>>
378
+
379
+ /**
380
+ * Construct and simulate a add_redemption_request transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
381
+ */
382
+ add_redemption_request: (
383
+ { lender, shares }: { lender: string; shares: u128 },
384
+ options?: {
385
+ /**
386
+ * The fee to pay for the transaction. Default: BASE_FEE
387
+ */
388
+ fee?: number
389
+
390
+ /**
391
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
392
+ */
393
+ timeoutInSeconds?: number
394
+
395
+ /**
396
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
397
+ */
398
+ simulate?: boolean
399
+ },
400
+ ) => Promise<AssembledTransaction<null>>
401
+
402
+ /**
403
+ * Construct and simulate a cancel_redemption_request transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
404
+ */
405
+ cancel_redemption_request: (
406
+ { lender, shares }: { lender: string; shares: u128 },
407
+ options?: {
408
+ /**
409
+ * The fee to pay for the transaction. Default: BASE_FEE
410
+ */
411
+ fee?: number
412
+
413
+ /**
414
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
415
+ */
416
+ timeoutInSeconds?: number
417
+
418
+ /**
419
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
420
+ */
421
+ simulate?: boolean
422
+ },
423
+ ) => Promise<AssembledTransaction<null>>
424
+
425
+ /**
426
+ * Construct and simulate a disburse transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
427
+ */
428
+ disburse: (
429
+ { lender }: { lender: string },
430
+ options?: {
431
+ /**
432
+ * The fee to pay for the transaction. Default: BASE_FEE
433
+ */
434
+ fee?: number
435
+
436
+ /**
437
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
438
+ */
439
+ timeoutInSeconds?: number
440
+
441
+ /**
442
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
443
+ */
444
+ simulate?: boolean
445
+ },
446
+ ) => Promise<AssembledTransaction<null>>
447
+
448
+ /**
449
+ * Construct and simulate a withdraw_after_pool_closure transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
450
+ */
451
+ withdraw_after_pool_closure: (
452
+ { lender }: { lender: string },
453
+ options?: {
454
+ /**
455
+ * The fee to pay for the transaction. Default: BASE_FEE
456
+ */
457
+ fee?: number
458
+
459
+ /**
460
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
461
+ */
462
+ timeoutInSeconds?: number
463
+
464
+ /**
465
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
466
+ */
467
+ simulate?: boolean
468
+ },
469
+ ) => Promise<AssembledTransaction<null>>
470
+
471
+ /**
472
+ * Construct and simulate a execute_redemption_summary transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
473
+ */
474
+ execute_redemption_summary: (
475
+ { summary }: { summary: EpochRedemptionSummary },
476
+ options?: {
477
+ /**
478
+ * The fee to pay for the transaction. Default: BASE_FEE
479
+ */
480
+ fee?: number
481
+
482
+ /**
483
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
484
+ */
485
+ timeoutInSeconds?: number
486
+
487
+ /**
488
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
489
+ */
490
+ simulate?: boolean
491
+ },
492
+ ) => Promise<AssembledTransaction<null>>
493
+
494
+ /**
495
+ * Construct and simulate a cancellable_redemption_shares transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
496
+ */
497
+ cancellable_redemption_shares: (
498
+ { lender }: { lender: string },
499
+ options?: {
500
+ /**
501
+ * The fee to pay for the transaction. Default: BASE_FEE
502
+ */
503
+ fee?: number
504
+
505
+ /**
506
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
507
+ */
508
+ timeoutInSeconds?: number
509
+
510
+ /**
511
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
512
+ */
513
+ simulate?: boolean
514
+ },
515
+ ) => Promise<AssembledTransaction<u128>>
516
+
517
+ /**
518
+ * Construct and simulate a withdrawable_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
519
+ */
520
+ withdrawable_assets: (
521
+ { lender }: { lender: string },
522
+ options?: {
523
+ /**
524
+ * The fee to pay for the transaction. Default: BASE_FEE
525
+ */
526
+ fee?: number
527
+
528
+ /**
529
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
530
+ */
531
+ timeoutInSeconds?: number
532
+
533
+ /**
534
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
535
+ */
536
+ simulate?: boolean
537
+ },
538
+ ) => Promise<AssembledTransaction<u128>>
539
+
540
+ /**
541
+ * Construct and simulate a get_latest_redemption_record transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
542
+ */
543
+ get_latest_redemption_record: (
544
+ { lender }: { lender: string },
545
+ options?: {
546
+ /**
547
+ * The fee to pay for the transaction. Default: BASE_FEE
548
+ */
549
+ fee?: number
550
+
551
+ /**
552
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
553
+ */
554
+ timeoutInSeconds?: number
555
+
556
+ /**
557
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
558
+ */
559
+ simulate?: boolean
560
+ },
561
+ ) => Promise<AssembledTransaction<LenderRedemptionRecord>>
562
+
563
+ /**
564
+ * Construct and simulate a total_supply transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
565
+ */
566
+ total_supply: (options?: {
567
+ /**
568
+ * The fee to pay for the transaction. Default: BASE_FEE
569
+ */
570
+ fee?: number
571
+
572
+ /**
573
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
574
+ */
575
+ timeoutInSeconds?: number
576
+
577
+ /**
578
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
579
+ */
580
+ simulate?: boolean
581
+ }) => Promise<AssembledTransaction<u128>>
582
+
583
+ /**
584
+ * Construct and simulate a balance_of transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
585
+ */
586
+ balance_of: (
587
+ { account }: { account: string },
588
+ options?: {
589
+ /**
590
+ * The fee to pay for the transaction. Default: BASE_FEE
591
+ */
592
+ fee?: number
593
+
594
+ /**
595
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
596
+ */
597
+ timeoutInSeconds?: number
598
+
599
+ /**
600
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
601
+ */
602
+ simulate?: boolean
603
+ },
604
+ ) => Promise<AssembledTransaction<u128>>
605
+
606
+ /**
607
+ * Construct and simulate a total_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
608
+ */
609
+ total_assets: (options?: {
610
+ /**
611
+ * The fee to pay for the transaction. Default: BASE_FEE
612
+ */
613
+ fee?: number
614
+
615
+ /**
616
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
617
+ */
618
+ timeoutInSeconds?: number
619
+
620
+ /**
621
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
622
+ */
623
+ simulate?: boolean
624
+ }) => Promise<AssembledTransaction<u128>>
625
+
626
+ /**
627
+ * Construct and simulate a total_assets_of transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
628
+ */
629
+ total_assets_of: (
630
+ { account }: { account: string },
631
+ options?: {
632
+ /**
633
+ * The fee to pay for the transaction. Default: BASE_FEE
634
+ */
635
+ fee?: number
636
+
637
+ /**
638
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
639
+ */
640
+ timeoutInSeconds?: number
641
+
642
+ /**
643
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
644
+ */
645
+ simulate?: boolean
646
+ },
647
+ ) => Promise<AssembledTransaction<u128>>
648
+
649
+ /**
650
+ * Construct and simulate a convert_to_shares transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
651
+ */
652
+ convert_to_shares: (
653
+ { assets }: { assets: u128 },
654
+ options?: {
655
+ /**
656
+ * The fee to pay for the transaction. Default: BASE_FEE
657
+ */
658
+ fee?: number
659
+
660
+ /**
661
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
662
+ */
663
+ timeoutInSeconds?: number
664
+
665
+ /**
666
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
667
+ */
668
+ simulate?: boolean
669
+ },
670
+ ) => Promise<AssembledTransaction<u128>>
671
+
672
+ /**
673
+ * Construct and simulate a convert_to_assets transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
674
+ */
675
+ convert_to_assets: (
676
+ { shares }: { shares: u128 },
677
+ options?: {
678
+ /**
679
+ * The fee to pay for the transaction. Default: BASE_FEE
680
+ */
681
+ fee?: number
682
+
683
+ /**
684
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
685
+ */
686
+ timeoutInSeconds?: number
687
+
688
+ /**
689
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
690
+ */
691
+ simulate?: boolean
692
+ },
693
+ ) => Promise<AssembledTransaction<u128>>
694
+
695
+ /**
696
+ * Construct and simulate a is_approved_lender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
697
+ */
698
+ is_approved_lender: (
699
+ { account }: { account: string },
700
+ options?: {
701
+ /**
702
+ * The fee to pay for the transaction. Default: BASE_FEE
703
+ */
704
+ fee?: number
705
+
706
+ /**
707
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
708
+ */
709
+ timeoutInSeconds?: number
710
+
711
+ /**
712
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
713
+ */
714
+ simulate?: boolean
715
+ },
716
+ ) => Promise<AssembledTransaction<boolean>>
717
+
718
+ /**
719
+ * Construct and simulate a get_deposit_record transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
720
+ */
721
+ get_deposit_record: (
722
+ { account }: { account: string },
723
+ options?: {
724
+ /**
725
+ * The fee to pay for the transaction. Default: BASE_FEE
726
+ */
727
+ fee?: number
728
+
729
+ /**
730
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
731
+ */
732
+ timeoutInSeconds?: number
733
+
734
+ /**
735
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
736
+ */
737
+ simulate?: boolean
738
+ },
739
+ ) => Promise<AssembledTransaction<DepositRecord>>
740
+
741
+ /**
742
+ * Construct and simulate a get_epoch_redemption_summary transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
743
+ */
744
+ get_epoch_redemption_summary: (
745
+ { epoch_id }: { epoch_id: u64 },
746
+ options?: {
747
+ /**
748
+ * The fee to pay for the transaction. Default: BASE_FEE
749
+ */
750
+ fee?: number
751
+
752
+ /**
753
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
754
+ */
755
+ timeoutInSeconds?: number
756
+
757
+ /**
758
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
759
+ */
760
+ simulate?: boolean
761
+ },
762
+ ) => Promise<AssembledTransaction<EpochRedemptionSummary>>
763
+
764
+ /**
765
+ * Construct and simulate a get_redemption_record transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
766
+ */
767
+ get_redemption_record: (
768
+ { account }: { account: string },
769
+ options?: {
770
+ /**
771
+ * The fee to pay for the transaction. Default: BASE_FEE
772
+ */
773
+ fee?: number
774
+
775
+ /**
776
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
777
+ */
778
+ timeoutInSeconds?: number
779
+
780
+ /**
781
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
782
+ */
783
+ simulate?: boolean
784
+ },
785
+ ) => Promise<AssembledTransaction<LenderRedemptionRecord>>
786
+
787
+ /**
788
+ * Construct and simulate a allowance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
789
+ */
790
+ allowance: (
791
+ { _from, _spender }: { _from: string; _spender: string },
792
+ options?: {
793
+ /**
794
+ * The fee to pay for the transaction. Default: BASE_FEE
795
+ */
796
+ fee?: number
797
+
798
+ /**
799
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
800
+ */
801
+ timeoutInSeconds?: number
802
+
803
+ /**
804
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
805
+ */
806
+ simulate?: boolean
807
+ },
808
+ ) => Promise<AssembledTransaction<i128>>
809
+
810
+ /**
811
+ * Construct and simulate a approve transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
812
+ */
813
+ approve: (
814
+ {
815
+ _from,
816
+ _spender,
817
+ _amount,
818
+ _expiration_ledger,
819
+ }: {
820
+ _from: string
821
+ _spender: string
822
+ _amount: i128
823
+ _expiration_ledger: u32
824
+ },
825
+ options?: {
826
+ /**
827
+ * The fee to pay for the transaction. Default: BASE_FEE
828
+ */
829
+ fee?: number
830
+
831
+ /**
832
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
833
+ */
834
+ timeoutInSeconds?: number
835
+
836
+ /**
837
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
838
+ */
839
+ simulate?: boolean
840
+ },
841
+ ) => Promise<AssembledTransaction<null>>
842
+
843
+ /**
844
+ * Construct and simulate a balance transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
845
+ */
846
+ balance: (
847
+ { id }: { id: string },
848
+ options?: {
849
+ /**
850
+ * The fee to pay for the transaction. Default: BASE_FEE
851
+ */
852
+ fee?: number
853
+
854
+ /**
855
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
856
+ */
857
+ timeoutInSeconds?: number
858
+
859
+ /**
860
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
861
+ */
862
+ simulate?: boolean
863
+ },
864
+ ) => Promise<AssembledTransaction<i128>>
865
+
866
+ /**
867
+ * Construct and simulate a transfer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
868
+ */
869
+ transfer: (
870
+ { from, to, amount }: { from: string; to: string; amount: i128 },
871
+ options?: {
872
+ /**
873
+ * The fee to pay for the transaction. Default: BASE_FEE
874
+ */
875
+ fee?: number
876
+
877
+ /**
878
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
879
+ */
880
+ timeoutInSeconds?: number
881
+
882
+ /**
883
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
884
+ */
885
+ simulate?: boolean
886
+ },
887
+ ) => Promise<AssembledTransaction<null>>
888
+
889
+ /**
890
+ * Construct and simulate a transfer_from transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
891
+ */
892
+ transfer_from: (
893
+ {
894
+ _spender,
895
+ _from,
896
+ _to,
897
+ _amount,
898
+ }: { _spender: string; _from: string; _to: string; _amount: i128 },
899
+ options?: {
900
+ /**
901
+ * The fee to pay for the transaction. Default: BASE_FEE
902
+ */
903
+ fee?: number
904
+
905
+ /**
906
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
907
+ */
908
+ timeoutInSeconds?: number
909
+
910
+ /**
911
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
912
+ */
913
+ simulate?: boolean
914
+ },
915
+ ) => Promise<AssembledTransaction<null>>
916
+
917
+ /**
918
+ * Construct and simulate a burn transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
919
+ */
920
+ burn: (
921
+ { from, amount }: { from: string; amount: i128 },
922
+ options?: {
923
+ /**
924
+ * The fee to pay for the transaction. Default: BASE_FEE
925
+ */
926
+ fee?: number
927
+
928
+ /**
929
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
930
+ */
931
+ timeoutInSeconds?: number
932
+
933
+ /**
934
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
935
+ */
936
+ simulate?: boolean
937
+ },
938
+ ) => Promise<AssembledTransaction<null>>
939
+
940
+ /**
941
+ * Construct and simulate a burn_from transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
942
+ */
943
+ burn_from: (
944
+ {
945
+ _spender,
946
+ _from,
947
+ _amount,
948
+ }: { _spender: string; _from: string; _amount: i128 },
949
+ options?: {
950
+ /**
951
+ * The fee to pay for the transaction. Default: BASE_FEE
952
+ */
953
+ fee?: number
954
+
955
+ /**
956
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
957
+ */
958
+ timeoutInSeconds?: number
959
+
960
+ /**
961
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
962
+ */
963
+ simulate?: boolean
964
+ },
965
+ ) => Promise<AssembledTransaction<null>>
966
+
967
+ /**
968
+ * Construct and simulate a decimals transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
969
+ */
970
+ decimals: (options?: {
971
+ /**
972
+ * The fee to pay for the transaction. Default: BASE_FEE
973
+ */
974
+ fee?: number
975
+
976
+ /**
977
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
978
+ */
979
+ timeoutInSeconds?: number
980
+
981
+ /**
982
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
983
+ */
984
+ simulate?: boolean
985
+ }) => Promise<AssembledTransaction<u32>>
986
+
987
+ /**
988
+ * Construct and simulate a name transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
989
+ */
990
+ name: (options?: {
991
+ /**
992
+ * The fee to pay for the transaction. Default: BASE_FEE
993
+ */
994
+ fee?: number
995
+
996
+ /**
997
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
998
+ */
999
+ timeoutInSeconds?: number
1000
+
1001
+ /**
1002
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1003
+ */
1004
+ simulate?: boolean
1005
+ }) => Promise<AssembledTransaction<string>>
1006
+
1007
+ /**
1008
+ * Construct and simulate a symbol transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
1009
+ */
1010
+ symbol: (options?: {
1011
+ /**
1012
+ * The fee to pay for the transaction. Default: BASE_FEE
1013
+ */
1014
+ fee?: number
1015
+
1016
+ /**
1017
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1018
+ */
1019
+ timeoutInSeconds?: number
1020
+
1021
+ /**
1022
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1023
+ */
1024
+ simulate?: boolean
1025
+ }) => Promise<AssembledTransaction<string>>
1026
+ }
1027
+ export class Client extends ContractClient {
1028
+ constructor(public readonly options: ContractClientOptions) {
1029
+ super(
1030
+ new ContractSpec([
1031
+ 'AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAAEAAAAAAAAAAAAAAAEUG9vbAAAAAAAAAAAAAAAC1Bvb2xNYW5hZ2VyAAAAAAAAAAAAAAAAC1Bvb2xTdG9yYWdlAAAAAAAAAAAAAAAAD1VuZGVybHlpbmdUb2tlb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
+ public readonly fromJSON = {
1096
+ initialize: this.txFromJSON<null>,
1097
+ add_approved_lender: this.txFromJSON<null>,
1098
+ remove_approved_lender: this.txFromJSON<null>,
1099
+ make_initial_deposit: this.txFromJSON<u128>,
1100
+ deposit: this.txFromJSON<u128>,
1101
+ add_redemption_request: this.txFromJSON<null>,
1102
+ cancel_redemption_request: this.txFromJSON<null>,
1103
+ disburse: this.txFromJSON<null>,
1104
+ withdraw_after_pool_closure: this.txFromJSON<null>,
1105
+ execute_redemption_summary: this.txFromJSON<null>,
1106
+ cancellable_redemption_shares: this.txFromJSON<u128>,
1107
+ withdrawable_assets: this.txFromJSON<u128>,
1108
+ get_latest_redemption_record: this.txFromJSON<LenderRedemptionRecord>,
1109
+ total_supply: this.txFromJSON<u128>,
1110
+ balance_of: this.txFromJSON<u128>,
1111
+ total_assets: this.txFromJSON<u128>,
1112
+ total_assets_of: this.txFromJSON<u128>,
1113
+ convert_to_shares: this.txFromJSON<u128>,
1114
+ convert_to_assets: this.txFromJSON<u128>,
1115
+ is_approved_lender: this.txFromJSON<boolean>,
1116
+ get_deposit_record: this.txFromJSON<DepositRecord>,
1117
+ get_epoch_redemption_summary: this.txFromJSON<EpochRedemptionSummary>,
1118
+ get_redemption_record: this.txFromJSON<LenderRedemptionRecord>,
1119
+ allowance: this.txFromJSON<i128>,
1120
+ approve: this.txFromJSON<null>,
1121
+ balance: this.txFromJSON<i128>,
1122
+ transfer: this.txFromJSON<null>,
1123
+ transfer_from: this.txFromJSON<null>,
1124
+ burn: this.txFromJSON<null>,
1125
+ burn_from: this.txFromJSON<null>,
1126
+ decimals: this.txFromJSON<u32>,
1127
+ name: this.txFromJSON<string>,
1128
+ symbol: this.txFromJSON<string>,
1129
+ }
1130
+ }