@huma-finance/soroban-pool-storage 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.
@@ -0,0 +1,817 @@
1
+ import { AssembledTransaction, ContractClient, ContractClientOptions } from '@stellar/stellar-sdk/lib/contract_client/index.js';
2
+ import type { u32, u64, u128, Option } from '@stellar/stellar-sdk/lib/contract_client';
3
+ export * from '@stellar/stellar-sdk';
4
+ export * from '@stellar/stellar-sdk/lib/contract_client/index.js';
5
+ export * from '@stellar/stellar-sdk/lib/rust_types/index.js';
6
+ export declare const networks: {
7
+ readonly testnet: {
8
+ readonly networkPassphrase: "Test SDF Network ; September 2015";
9
+ readonly contractId: "CAKPKH2G3ALGKW2E5BJFUJ6WR3RXJVGIXEAPVI5S6Q4HKSDCMKEYJSBR";
10
+ };
11
+ };
12
+ export declare const Errors: {
13
+ 8: {
14
+ message: string;
15
+ };
16
+ 1: {
17
+ message: string;
18
+ };
19
+ 96: {
20
+ message: string;
21
+ };
22
+ 97: {
23
+ message: string;
24
+ };
25
+ 79: {
26
+ message: string;
27
+ };
28
+ };
29
+ export type PayPeriodDuration = {
30
+ tag: 'Monthly';
31
+ values: void;
32
+ } | {
33
+ tag: 'Quarterly';
34
+ values: void;
35
+ } | {
36
+ tag: 'SemiAnnually';
37
+ values: void;
38
+ };
39
+ export interface PoolSettings {
40
+ default_grace_period_days: u32;
41
+ late_payment_grace_period_days: u32;
42
+ max_credit_line: u128;
43
+ min_deposit_amount: u128;
44
+ pay_period_duration: PayPeriodDuration;
45
+ principal_only_payment_allowed: boolean;
46
+ }
47
+ export interface LPConfig {
48
+ fixed_senior_yield_bps: u32;
49
+ liquidity_cap: u128;
50
+ max_senior_junior_ratio: u32;
51
+ tranches_risk_adjustment_bps: u32;
52
+ withdrawal_lockout_period_days: u32;
53
+ }
54
+ export interface FeeStructure {
55
+ front_loading_fee_bps: u32;
56
+ front_loading_fee_flat: u128;
57
+ late_fee_bps: u32;
58
+ yield_bps: u32;
59
+ }
60
+ export type PoolStatus = {
61
+ tag: 'Off';
62
+ values: void;
63
+ } | {
64
+ tag: 'On';
65
+ values: void;
66
+ } | {
67
+ tag: 'Closed';
68
+ values: void;
69
+ };
70
+ export interface CurrentEpoch {
71
+ end_time: u64;
72
+ id: u64;
73
+ }
74
+ export interface AdminRnR {
75
+ liquidity_rate_bps_ea: u32;
76
+ liquidity_rate_bps_pool_owner: u32;
77
+ reward_rate_bps_ea: u32;
78
+ reward_rate_bps_pool_owner: u32;
79
+ }
80
+ export interface TrancheAddresses {
81
+ addrs: Array<Option<string>>;
82
+ }
83
+ export interface TrancheAssets {
84
+ assets: Array<u128>;
85
+ }
86
+ export interface Client {
87
+ /**
88
+ * 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.
89
+ */
90
+ initialize: ({ addrs, protocol_on, pool_status, tranche_addrs, }: {
91
+ addrs: Array<string>;
92
+ protocol_on: boolean;
93
+ pool_status: PoolStatus;
94
+ tranche_addrs: Array<Option<string>>;
95
+ }, options?: {
96
+ /**
97
+ * The fee to pay for the transaction. Default: BASE_FEE
98
+ */
99
+ fee?: number;
100
+ /**
101
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
102
+ */
103
+ timeoutInSeconds?: number;
104
+ /**
105
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
106
+ */
107
+ simulate?: boolean;
108
+ }) => Promise<AssembledTransaction<null>>;
109
+ /**
110
+ * Construct and simulate a set_pool_manager 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.
111
+ */
112
+ set_pool_manager: ({ addr }: {
113
+ addr: string;
114
+ }, options?: {
115
+ /**
116
+ * The fee to pay for the transaction. Default: BASE_FEE
117
+ */
118
+ fee?: number;
119
+ /**
120
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
121
+ */
122
+ timeoutInSeconds?: number;
123
+ /**
124
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
125
+ */
126
+ simulate?: boolean;
127
+ }) => Promise<AssembledTransaction<null>>;
128
+ /**
129
+ * Construct and simulate a set_huma_config 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.
130
+ */
131
+ set_huma_config: ({ huma_config, huma_owner, sentinel, protocol_on, }: {
132
+ huma_config: string;
133
+ huma_owner: string;
134
+ sentinel: string;
135
+ protocol_on: boolean;
136
+ }, options?: {
137
+ /**
138
+ * The fee to pay for the transaction. Default: BASE_FEE
139
+ */
140
+ fee?: number;
141
+ /**
142
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
143
+ */
144
+ timeoutInSeconds?: number;
145
+ /**
146
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
147
+ */
148
+ simulate?: boolean;
149
+ }) => Promise<AssembledTransaction<null>>;
150
+ /**
151
+ * Construct and simulate a set_admins 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.
152
+ */
153
+ set_admins: ({ pool_owner, pool_owner_treasury, ea, }: {
154
+ pool_owner: string;
155
+ pool_owner_treasury: string;
156
+ ea: string;
157
+ }, options?: {
158
+ /**
159
+ * The fee to pay for the transaction. Default: BASE_FEE
160
+ */
161
+ fee?: number;
162
+ /**
163
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
164
+ */
165
+ timeoutInSeconds?: number;
166
+ /**
167
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
168
+ */
169
+ simulate?: boolean;
170
+ }) => Promise<AssembledTransaction<null>>;
171
+ /**
172
+ * Construct and simulate a set_tranche_addresses 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.
173
+ */
174
+ set_tranche_addresses: ({ junior_addr, senior_addr, }: {
175
+ junior_addr: string;
176
+ senior_addr: Option<string>;
177
+ }, options?: {
178
+ /**
179
+ * The fee to pay for the transaction. Default: BASE_FEE
180
+ */
181
+ fee?: number;
182
+ /**
183
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
184
+ */
185
+ timeoutInSeconds?: number;
186
+ /**
187
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
188
+ */
189
+ simulate?: boolean;
190
+ }) => Promise<AssembledTransaction<null>>;
191
+ /**
192
+ * Construct and simulate a set_pool_operator 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.
193
+ */
194
+ set_pool_operator: ({ addr, is_operator }: {
195
+ addr: string;
196
+ is_operator: boolean;
197
+ }, options?: {
198
+ /**
199
+ * The fee to pay for the transaction. Default: BASE_FEE
200
+ */
201
+ fee?: number;
202
+ /**
203
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
204
+ */
205
+ timeoutInSeconds?: number;
206
+ /**
207
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
208
+ */
209
+ simulate?: boolean;
210
+ }) => Promise<AssembledTransaction<null>>;
211
+ /**
212
+ * Construct and simulate a set_pool_status 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.
213
+ */
214
+ set_pool_status: ({ status }: {
215
+ status: PoolStatus;
216
+ }, options?: {
217
+ /**
218
+ * The fee to pay for the transaction. Default: BASE_FEE
219
+ */
220
+ fee?: number;
221
+ /**
222
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
223
+ */
224
+ timeoutInSeconds?: number;
225
+ /**
226
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
227
+ */
228
+ simulate?: boolean;
229
+ }) => Promise<AssembledTransaction<null>>;
230
+ /**
231
+ * Construct and simulate a set_epoch 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.
232
+ */
233
+ set_epoch: ({ epoch }: {
234
+ epoch: CurrentEpoch;
235
+ }, options?: {
236
+ /**
237
+ * The fee to pay for the transaction. Default: BASE_FEE
238
+ */
239
+ fee?: number;
240
+ /**
241
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
242
+ */
243
+ timeoutInSeconds?: number;
244
+ /**
245
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
246
+ */
247
+ simulate?: boolean;
248
+ }) => Promise<AssembledTransaction<null>>;
249
+ /**
250
+ * Construct and simulate a set_admin_rnr 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.
251
+ */
252
+ set_admin_rnr: ({ pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate, }: {
253
+ pool_owner_reward_rate: u32;
254
+ pool_owner_liquidity_rate: u32;
255
+ ea_reward_rate: u32;
256
+ ea_liquidity_rate: u32;
257
+ }, options?: {
258
+ /**
259
+ * The fee to pay for the transaction. Default: BASE_FEE
260
+ */
261
+ fee?: number;
262
+ /**
263
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
264
+ */
265
+ timeoutInSeconds?: number;
266
+ /**
267
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
268
+ */
269
+ simulate?: boolean;
270
+ }) => Promise<AssembledTransaction<null>>;
271
+ /**
272
+ * Construct and simulate a set_pool_settings 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.
273
+ */
274
+ set_pool_settings: ({ max_credit_line, min_deposit_amount, pay_period_duration, late_payment_grace_period_days, default_grace_period_days, principal_only_payment_allowed, }: {
275
+ max_credit_line: u128;
276
+ min_deposit_amount: u128;
277
+ pay_period_duration: PayPeriodDuration;
278
+ late_payment_grace_period_days: u32;
279
+ default_grace_period_days: u32;
280
+ principal_only_payment_allowed: boolean;
281
+ }, options?: {
282
+ /**
283
+ * The fee to pay for the transaction. Default: BASE_FEE
284
+ */
285
+ fee?: number;
286
+ /**
287
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
288
+ */
289
+ timeoutInSeconds?: number;
290
+ /**
291
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
292
+ */
293
+ simulate?: boolean;
294
+ }) => Promise<AssembledTransaction<null>>;
295
+ /**
296
+ * Construct and simulate a set_lp_config 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.
297
+ */
298
+ set_lp_config: ({ liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, }: {
299
+ liquidity_cap: u128;
300
+ max_senior_junior_ratio: u32;
301
+ fixed_senior_yield_bps: u32;
302
+ tranches_risk_adjustment_bps: u32;
303
+ withdrawal_lockout_period_days: u32;
304
+ }, options?: {
305
+ /**
306
+ * The fee to pay for the transaction. Default: BASE_FEE
307
+ */
308
+ fee?: number;
309
+ /**
310
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
311
+ */
312
+ timeoutInSeconds?: number;
313
+ /**
314
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
315
+ */
316
+ simulate?: boolean;
317
+ }) => Promise<AssembledTransaction<null>>;
318
+ /**
319
+ * Construct and simulate a set_fee_structure 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.
320
+ */
321
+ set_fee_structure: ({ yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps, }: {
322
+ yield_bps: u32;
323
+ late_fee_bps: u32;
324
+ front_loading_fee_flat: u128;
325
+ front_loading_fee_bps: u32;
326
+ }, options?: {
327
+ /**
328
+ * The fee to pay for the transaction. Default: BASE_FEE
329
+ */
330
+ fee?: number;
331
+ /**
332
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
333
+ */
334
+ timeoutInSeconds?: number;
335
+ /**
336
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
337
+ */
338
+ simulate?: boolean;
339
+ }) => Promise<AssembledTransaction<null>>;
340
+ /**
341
+ * Construct and simulate a send_tokens 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.
342
+ */
343
+ send_tokens: ({ to, amount, caller }: {
344
+ to: string;
345
+ amount: u128;
346
+ caller: string;
347
+ }, options?: {
348
+ /**
349
+ * The fee to pay for the transaction. Default: BASE_FEE
350
+ */
351
+ fee?: number;
352
+ /**
353
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
354
+ */
355
+ timeoutInSeconds?: number;
356
+ /**
357
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
358
+ */
359
+ simulate?: boolean;
360
+ }) => Promise<AssembledTransaction<null>>;
361
+ /**
362
+ * Construct and simulate a add_tranche_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.
363
+ */
364
+ add_tranche_assets: ({ addr, amount }: {
365
+ addr: string;
366
+ amount: u128;
367
+ }, options?: {
368
+ /**
369
+ * The fee to pay for the transaction. Default: BASE_FEE
370
+ */
371
+ fee?: number;
372
+ /**
373
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
374
+ */
375
+ timeoutInSeconds?: number;
376
+ /**
377
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
378
+ */
379
+ simulate?: boolean;
380
+ }) => Promise<AssembledTransaction<null>>;
381
+ /**
382
+ * Construct and simulate a reduce_tranche_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.
383
+ */
384
+ reduce_tranche_assets: ({ addr, amount }: {
385
+ addr: string;
386
+ amount: u128;
387
+ }, options?: {
388
+ /**
389
+ * The fee to pay for the transaction. Default: BASE_FEE
390
+ */
391
+ fee?: number;
392
+ /**
393
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
394
+ */
395
+ timeoutInSeconds?: number;
396
+ /**
397
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
398
+ */
399
+ simulate?: boolean;
400
+ }) => Promise<AssembledTransaction<null>>;
401
+ /**
402
+ * Construct and simulate a update_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.
403
+ */
404
+ update_assets: ({ junior_assets, senior_assets, }: {
405
+ junior_assets: u128;
406
+ senior_assets: u128;
407
+ }, options?: {
408
+ /**
409
+ * The fee to pay for the transaction. Default: BASE_FEE
410
+ */
411
+ fee?: number;
412
+ /**
413
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
414
+ */
415
+ timeoutInSeconds?: number;
416
+ /**
417
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
418
+ */
419
+ simulate?: boolean;
420
+ }) => Promise<AssembledTransaction<null>>;
421
+ /**
422
+ * Construct and simulate a get_pool_settings 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.
423
+ */
424
+ get_pool_settings: (options?: {
425
+ /**
426
+ * The fee to pay for the transaction. Default: BASE_FEE
427
+ */
428
+ fee?: number;
429
+ /**
430
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
431
+ */
432
+ timeoutInSeconds?: number;
433
+ /**
434
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
435
+ */
436
+ simulate?: boolean;
437
+ }) => Promise<AssembledTransaction<PoolSettings>>;
438
+ /**
439
+ * Construct and simulate a get_lp_config 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.
440
+ */
441
+ get_lp_config: (options?: {
442
+ /**
443
+ * The fee to pay for the transaction. Default: BASE_FEE
444
+ */
445
+ fee?: number;
446
+ /**
447
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
448
+ */
449
+ timeoutInSeconds?: number;
450
+ /**
451
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
452
+ */
453
+ simulate?: boolean;
454
+ }) => Promise<AssembledTransaction<LPConfig>>;
455
+ /**
456
+ * Construct and simulate a get_fee_structure 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.
457
+ */
458
+ get_fee_structure: (options?: {
459
+ /**
460
+ * The fee to pay for the transaction. Default: BASE_FEE
461
+ */
462
+ fee?: number;
463
+ /**
464
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
465
+ */
466
+ timeoutInSeconds?: number;
467
+ /**
468
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
469
+ */
470
+ simulate?: boolean;
471
+ }) => Promise<AssembledTransaction<FeeStructure>>;
472
+ /**
473
+ * Construct and simulate a get_admin_rnr 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.
474
+ */
475
+ get_admin_rnr: (options?: {
476
+ /**
477
+ * The fee to pay for the transaction. Default: BASE_FEE
478
+ */
479
+ fee?: number;
480
+ /**
481
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
482
+ */
483
+ timeoutInSeconds?: number;
484
+ /**
485
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
486
+ */
487
+ simulate?: boolean;
488
+ }) => Promise<AssembledTransaction<AdminRnR>>;
489
+ /**
490
+ * Construct and simulate a pool_owner 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.
491
+ */
492
+ pool_owner: (options?: {
493
+ /**
494
+ * The fee to pay for the transaction. Default: BASE_FEE
495
+ */
496
+ fee?: number;
497
+ /**
498
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
499
+ */
500
+ timeoutInSeconds?: number;
501
+ /**
502
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
503
+ */
504
+ simulate?: boolean;
505
+ }) => Promise<AssembledTransaction<string>>;
506
+ /**
507
+ * Construct and simulate a is_pool_owner_or_huma_owner 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.
508
+ */
509
+ is_pool_owner_or_huma_owner: ({ addr }: {
510
+ addr: string;
511
+ }, options?: {
512
+ /**
513
+ * The fee to pay for the transaction. Default: BASE_FEE
514
+ */
515
+ fee?: number;
516
+ /**
517
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
518
+ */
519
+ timeoutInSeconds?: number;
520
+ /**
521
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
522
+ */
523
+ simulate?: boolean;
524
+ }) => Promise<AssembledTransaction<boolean>>;
525
+ /**
526
+ * Construct and simulate a is_pool_operator 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.
527
+ */
528
+ is_pool_operator: ({ addr }: {
529
+ addr: string;
530
+ }, options?: {
531
+ /**
532
+ * The fee to pay for the transaction. Default: BASE_FEE
533
+ */
534
+ fee?: number;
535
+ /**
536
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
537
+ */
538
+ timeoutInSeconds?: number;
539
+ /**
540
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
541
+ */
542
+ simulate?: boolean;
543
+ }) => Promise<AssembledTransaction<boolean>>;
544
+ /**
545
+ * Construct and simulate a is_protocol_and_pool_on 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.
546
+ */
547
+ is_protocol_and_pool_on: (options?: {
548
+ /**
549
+ * The fee to pay for the transaction. Default: BASE_FEE
550
+ */
551
+ fee?: number;
552
+ /**
553
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
554
+ */
555
+ timeoutInSeconds?: number;
556
+ /**
557
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
558
+ */
559
+ simulate?: boolean;
560
+ }) => Promise<AssembledTransaction<boolean>>;
561
+ /**
562
+ * Construct and simulate a get_evaluation_agent 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.
563
+ */
564
+ get_evaluation_agent: (options?: {
565
+ /**
566
+ * The fee to pay for the transaction. Default: BASE_FEE
567
+ */
568
+ fee?: number;
569
+ /**
570
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
571
+ */
572
+ timeoutInSeconds?: number;
573
+ /**
574
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
575
+ */
576
+ simulate?: boolean;
577
+ }) => Promise<AssembledTransaction<string>>;
578
+ /**
579
+ * Construct and simulate a get_sentinel 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.
580
+ */
581
+ get_sentinel: (options?: {
582
+ /**
583
+ * The fee to pay for the transaction. Default: BASE_FEE
584
+ */
585
+ fee?: number;
586
+ /**
587
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
588
+ */
589
+ timeoutInSeconds?: number;
590
+ /**
591
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
592
+ */
593
+ simulate?: boolean;
594
+ }) => Promise<AssembledTransaction<string>>;
595
+ /**
596
+ * Construct and simulate a pool_owner_treasury 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.
597
+ */
598
+ pool_owner_treasury: (options?: {
599
+ /**
600
+ * The fee to pay for the transaction. Default: BASE_FEE
601
+ */
602
+ fee?: number;
603
+ /**
604
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
605
+ */
606
+ timeoutInSeconds?: number;
607
+ /**
608
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
609
+ */
610
+ simulate?: boolean;
611
+ }) => Promise<AssembledTransaction<string>>;
612
+ /**
613
+ * Construct and simulate a get_pool_status 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.
614
+ */
615
+ get_pool_status: (options?: {
616
+ /**
617
+ * The fee to pay for the transaction. Default: BASE_FEE
618
+ */
619
+ fee?: number;
620
+ /**
621
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
622
+ */
623
+ timeoutInSeconds?: number;
624
+ /**
625
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
626
+ */
627
+ simulate?: boolean;
628
+ }) => Promise<AssembledTransaction<PoolStatus>>;
629
+ /**
630
+ * Construct and simulate a get_current_epoch 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.
631
+ */
632
+ get_current_epoch: (options?: {
633
+ /**
634
+ * The fee to pay for the transaction. Default: BASE_FEE
635
+ */
636
+ fee?: number;
637
+ /**
638
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
639
+ */
640
+ timeoutInSeconds?: number;
641
+ /**
642
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
643
+ */
644
+ simulate?: boolean;
645
+ }) => Promise<AssembledTransaction<CurrentEpoch>>;
646
+ /**
647
+ * Construct and simulate a get_tranche_assets_by_addr 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.
648
+ */
649
+ get_tranche_assets_by_addr: ({ addr }: {
650
+ addr: string;
651
+ }, options?: {
652
+ /**
653
+ * The fee to pay for the transaction. Default: BASE_FEE
654
+ */
655
+ fee?: number;
656
+ /**
657
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
658
+ */
659
+ timeoutInSeconds?: number;
660
+ /**
661
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
662
+ */
663
+ simulate?: boolean;
664
+ }) => Promise<AssembledTransaction<u128>>;
665
+ /**
666
+ * Construct and simulate a get_tranche_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.
667
+ */
668
+ get_tranche_assets: (options?: {
669
+ /**
670
+ * The fee to pay for the transaction. Default: BASE_FEE
671
+ */
672
+ fee?: number;
673
+ /**
674
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
675
+ */
676
+ timeoutInSeconds?: number;
677
+ /**
678
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
679
+ */
680
+ simulate?: boolean;
681
+ }) => Promise<AssembledTransaction<TrancheAssets>>;
682
+ /**
683
+ * Construct and simulate a get_tranche_addresses 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.
684
+ */
685
+ get_tranche_addresses: (options?: {
686
+ /**
687
+ * The fee to pay for the transaction. Default: BASE_FEE
688
+ */
689
+ fee?: number;
690
+ /**
691
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
692
+ */
693
+ timeoutInSeconds?: number;
694
+ /**
695
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
696
+ */
697
+ simulate?: boolean;
698
+ }) => Promise<AssembledTransaction<TrancheAddresses>>;
699
+ /**
700
+ * Construct and simulate a check_liquidity_requirements 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.
701
+ */
702
+ check_liquidity_requirements: ({ lender, tranche_vault, balance, }: {
703
+ lender: string;
704
+ tranche_vault: string;
705
+ balance: u128;
706
+ }, options?: {
707
+ /**
708
+ * The fee to pay for the transaction. Default: BASE_FEE
709
+ */
710
+ fee?: number;
711
+ /**
712
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
713
+ */
714
+ timeoutInSeconds?: number;
715
+ /**
716
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
717
+ */
718
+ simulate?: boolean;
719
+ }) => Promise<AssembledTransaction<null>>;
720
+ /**
721
+ * Construct and simulate a get_underlying_token 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.
722
+ */
723
+ get_underlying_token: (options?: {
724
+ /**
725
+ * The fee to pay for the transaction. Default: BASE_FEE
726
+ */
727
+ fee?: number;
728
+ /**
729
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
730
+ */
731
+ timeoutInSeconds?: number;
732
+ /**
733
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
734
+ */
735
+ simulate?: boolean;
736
+ }) => Promise<AssembledTransaction<string>>;
737
+ /**
738
+ * Construct and simulate a get_available_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.
739
+ */
740
+ get_available_balance: (options?: {
741
+ /**
742
+ * The fee to pay for the transaction. Default: BASE_FEE
743
+ */
744
+ fee?: number;
745
+ /**
746
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
747
+ */
748
+ timeoutInSeconds?: number;
749
+ /**
750
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
751
+ */
752
+ simulate?: boolean;
753
+ }) => Promise<AssembledTransaction<u128>>;
754
+ /**
755
+ * Construct and simulate a reduce_admin_fees_reserve 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.
756
+ */
757
+ reduce_admin_fees_reserve: ({ caller, amount, increase, }: {
758
+ caller: string;
759
+ amount: u128;
760
+ increase: boolean;
761
+ }, options?: {
762
+ /**
763
+ * The fee to pay for the transaction. Default: BASE_FEE
764
+ */
765
+ fee?: number;
766
+ /**
767
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
768
+ */
769
+ timeoutInSeconds?: number;
770
+ /**
771
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
772
+ */
773
+ simulate?: boolean;
774
+ }) => Promise<AssembledTransaction<null>>;
775
+ }
776
+ export declare class Client extends ContractClient {
777
+ readonly options: ContractClientOptions;
778
+ constructor(options: ContractClientOptions);
779
+ readonly fromJSON: {
780
+ initialize: (json: string) => AssembledTransaction<null>;
781
+ set_pool_manager: (json: string) => AssembledTransaction<null>;
782
+ set_huma_config: (json: string) => AssembledTransaction<null>;
783
+ set_admins: (json: string) => AssembledTransaction<null>;
784
+ set_tranche_addresses: (json: string) => AssembledTransaction<null>;
785
+ set_pool_operator: (json: string) => AssembledTransaction<null>;
786
+ set_pool_status: (json: string) => AssembledTransaction<null>;
787
+ set_epoch: (json: string) => AssembledTransaction<null>;
788
+ set_admin_rnr: (json: string) => AssembledTransaction<null>;
789
+ set_pool_settings: (json: string) => AssembledTransaction<null>;
790
+ set_lp_config: (json: string) => AssembledTransaction<null>;
791
+ set_fee_structure: (json: string) => AssembledTransaction<null>;
792
+ send_tokens: (json: string) => AssembledTransaction<null>;
793
+ add_tranche_assets: (json: string) => AssembledTransaction<null>;
794
+ reduce_tranche_assets: (json: string) => AssembledTransaction<null>;
795
+ update_assets: (json: string) => AssembledTransaction<null>;
796
+ get_pool_settings: (json: string) => AssembledTransaction<PoolSettings>;
797
+ get_lp_config: (json: string) => AssembledTransaction<LPConfig>;
798
+ get_fee_structure: (json: string) => AssembledTransaction<FeeStructure>;
799
+ get_admin_rnr: (json: string) => AssembledTransaction<AdminRnR>;
800
+ pool_owner: (json: string) => AssembledTransaction<string>;
801
+ is_pool_owner_or_huma_owner: (json: string) => AssembledTransaction<boolean>;
802
+ is_pool_operator: (json: string) => AssembledTransaction<boolean>;
803
+ is_protocol_and_pool_on: (json: string) => AssembledTransaction<boolean>;
804
+ get_evaluation_agent: (json: string) => AssembledTransaction<string>;
805
+ get_sentinel: (json: string) => AssembledTransaction<string>;
806
+ pool_owner_treasury: (json: string) => AssembledTransaction<string>;
807
+ get_pool_status: (json: string) => AssembledTransaction<PoolStatus>;
808
+ get_current_epoch: (json: string) => AssembledTransaction<CurrentEpoch>;
809
+ get_tranche_assets_by_addr: (json: string) => AssembledTransaction<bigint>;
810
+ get_tranche_assets: (json: string) => AssembledTransaction<TrancheAssets>;
811
+ get_tranche_addresses: (json: string) => AssembledTransaction<TrancheAddresses>;
812
+ check_liquidity_requirements: (json: string) => AssembledTransaction<null>;
813
+ get_underlying_token: (json: string) => AssembledTransaction<string>;
814
+ get_available_balance: (json: string) => AssembledTransaction<bigint>;
815
+ reduce_admin_fees_reserve: (json: string) => AssembledTransaction<null>;
816
+ };
817
+ }