@huma-finance/soroban-pool-storage 0.0.15 → 0.0.16
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/README.md +4 -4
- package/dist/cjs/index.d.ts +1088 -0
- package/dist/cjs/index.js +181 -0
- package/dist/index.d.ts +148 -106
- package/dist/index.js +94 -57
- package/package.json +10 -4
- package/src/index.ts +239 -188
- package/tsconfig.cjs.json +22 -0
- package/tsconfig.json +93 -11
- package/tsconfig.tsbuildinfo +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/// <reference types="node"
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import { Buffer } from "buffer";
|
|
3
4
|
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from "@stellar/stellar-sdk/contract";
|
|
4
5
|
import type { u32, u64, u128, Option } from "@stellar/stellar-sdk/contract";
|
|
@@ -6,9 +7,9 @@ export * from "@stellar/stellar-sdk";
|
|
|
6
7
|
export * as contract from "@stellar/stellar-sdk/contract";
|
|
7
8
|
export * as rpc from "@stellar/stellar-sdk/rpc";
|
|
8
9
|
export declare const networks: {
|
|
9
|
-
readonly
|
|
10
|
-
readonly networkPassphrase: "
|
|
11
|
-
readonly contractId: "
|
|
10
|
+
readonly unknown: {
|
|
11
|
+
readonly networkPassphrase: "Public Global Stellar Network ; September 2015";
|
|
12
|
+
readonly contractId: "CBIJ2WP7TTSMINHJRUX52YR2T3YOD7T2X4335PW3DS4GIOOJ5JQT5WF2";
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
export declare const Errors: {
|
|
@@ -21,7 +22,10 @@ export declare const Errors: {
|
|
|
21
22
|
203: {
|
|
22
23
|
message: string;
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
204: {
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
801: {
|
|
25
29
|
message: string;
|
|
26
30
|
};
|
|
27
31
|
1: {
|
|
@@ -39,14 +43,13 @@ export declare const Errors: {
|
|
|
39
43
|
5: {
|
|
40
44
|
message: string;
|
|
41
45
|
};
|
|
46
|
+
6: {
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
7: {
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
42
52
|
};
|
|
43
|
-
/**
|
|
44
|
-
* The senior yield tracker has been refreshed.
|
|
45
|
-
* # Fields:
|
|
46
|
-
* * `total_assets` - The total assets in the senior tranche after the refresh.
|
|
47
|
-
* * `unpaid_yield` - The amount of unpaid yield to the senior tranche after the refresh.
|
|
48
|
-
* * `last_updated_date` - The last time the tracker was updated after the refresh.
|
|
49
|
-
*/
|
|
50
53
|
export interface YieldTrackerRefreshedEvent {
|
|
51
54
|
last_updated_date: u64;
|
|
52
55
|
total_assets: u128;
|
|
@@ -93,6 +96,7 @@ export interface PoolSettings {
|
|
|
93
96
|
principal_only_payment_allowed: boolean;
|
|
94
97
|
}
|
|
95
98
|
export interface LPConfig {
|
|
99
|
+
auto_redemption_after_lockup: boolean;
|
|
96
100
|
fixed_senior_yield_bps: u32;
|
|
97
101
|
liquidity_cap: u128;
|
|
98
102
|
max_senior_junior_ratio: u32;
|
|
@@ -135,9 +139,8 @@ export interface Client {
|
|
|
135
139
|
/**
|
|
136
140
|
* 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.
|
|
137
141
|
*/
|
|
138
|
-
initialize: ({ addrs,
|
|
142
|
+
initialize: ({ addrs, tranche_addrs, tranches_policy, }: {
|
|
139
143
|
addrs: Array<string>;
|
|
140
|
-
protocol_on: boolean;
|
|
141
144
|
tranche_addrs: Array<Option<string>>;
|
|
142
145
|
tranches_policy: TranchesPolicyType;
|
|
143
146
|
}, options?: {
|
|
@@ -157,10 +160,10 @@ export interface Client {
|
|
|
157
160
|
/**
|
|
158
161
|
* Construct and simulate a set_contract_addrs 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.
|
|
159
162
|
*/
|
|
160
|
-
set_contract_addrs: ({ pool, pool_manager,
|
|
163
|
+
set_contract_addrs: ({ pool, pool_manager, credit, }: {
|
|
161
164
|
pool: string;
|
|
162
165
|
pool_manager: string;
|
|
163
|
-
|
|
166
|
+
credit: string;
|
|
164
167
|
}, options?: {
|
|
165
168
|
/**
|
|
166
169
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -178,11 +181,10 @@ export interface Client {
|
|
|
178
181
|
/**
|
|
179
182
|
* 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.
|
|
180
183
|
*/
|
|
181
|
-
set_huma_config: ({ huma_config, huma_owner, sentinel,
|
|
184
|
+
set_huma_config: ({ huma_config, huma_owner, sentinel, }: {
|
|
182
185
|
huma_config: string;
|
|
183
186
|
huma_owner: string;
|
|
184
187
|
sentinel: string;
|
|
185
|
-
protocol_on: boolean;
|
|
186
188
|
}, options?: {
|
|
187
189
|
/**
|
|
188
190
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -381,12 +383,13 @@ export interface Client {
|
|
|
381
383
|
/**
|
|
382
384
|
* 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.
|
|
383
385
|
*/
|
|
384
|
-
set_lp_config: ({ liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, }: {
|
|
386
|
+
set_lp_config: ({ liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, auto_redemption_after_lockup, }: {
|
|
385
387
|
liquidity_cap: u128;
|
|
386
388
|
max_senior_junior_ratio: u32;
|
|
387
389
|
fixed_senior_yield_bps: u32;
|
|
388
390
|
tranches_risk_adjustment_bps: u32;
|
|
389
391
|
withdrawal_lockout_period_days: u32;
|
|
392
|
+
auto_redemption_after_lockup: boolean;
|
|
390
393
|
}, options?: {
|
|
391
394
|
/**
|
|
392
395
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -506,10 +509,29 @@ export interface Client {
|
|
|
506
509
|
/**
|
|
507
510
|
* 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.
|
|
508
511
|
*/
|
|
509
|
-
update_assets: ({ caller,
|
|
512
|
+
update_assets: ({ caller, tranche_assets, }: {
|
|
510
513
|
caller: string;
|
|
511
|
-
|
|
512
|
-
|
|
514
|
+
tranche_assets: TrancheAssets;
|
|
515
|
+
}, options?: {
|
|
516
|
+
/**
|
|
517
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
518
|
+
*/
|
|
519
|
+
fee?: number;
|
|
520
|
+
/**
|
|
521
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
522
|
+
*/
|
|
523
|
+
timeoutInSeconds?: number;
|
|
524
|
+
/**
|
|
525
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
526
|
+
*/
|
|
527
|
+
simulate?: boolean;
|
|
528
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
529
|
+
/**
|
|
530
|
+
* Construct and simulate a update_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.
|
|
531
|
+
*/
|
|
532
|
+
update_admin_fees_reserve: ({ amount, increase }: {
|
|
533
|
+
amount: u128;
|
|
534
|
+
increase: boolean;
|
|
513
535
|
}, options?: {
|
|
514
536
|
/**
|
|
515
537
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -543,7 +565,7 @@ export interface Client {
|
|
|
543
565
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
544
566
|
*/
|
|
545
567
|
simulate?: boolean;
|
|
546
|
-
}) => Promise<AssembledTransaction<
|
|
568
|
+
}) => Promise<AssembledTransaction<TrancheAssets>>;
|
|
547
569
|
/**
|
|
548
570
|
* Construct and simulate a refresh_yield_tracker 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.
|
|
549
571
|
*/
|
|
@@ -564,9 +586,11 @@ export interface Client {
|
|
|
564
586
|
simulate?: boolean;
|
|
565
587
|
}) => Promise<AssembledTransaction<null>>;
|
|
566
588
|
/**
|
|
567
|
-
* Construct and simulate a
|
|
589
|
+
* Construct and simulate a upgrade 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.
|
|
568
590
|
*/
|
|
569
|
-
|
|
591
|
+
upgrade: ({ new_wasm_hash }: {
|
|
592
|
+
new_wasm_hash: Buffer;
|
|
593
|
+
}, options?: {
|
|
570
594
|
/**
|
|
571
595
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
572
596
|
*/
|
|
@@ -579,11 +603,11 @@ export interface Client {
|
|
|
579
603
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
580
604
|
*/
|
|
581
605
|
simulate?: boolean;
|
|
582
|
-
}) => Promise<AssembledTransaction<
|
|
606
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
583
607
|
/**
|
|
584
|
-
* Construct and simulate a
|
|
608
|
+
* Construct and simulate a get_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.
|
|
585
609
|
*/
|
|
586
|
-
|
|
610
|
+
get_huma_owner: (options?: {
|
|
587
611
|
/**
|
|
588
612
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
589
613
|
*/
|
|
@@ -596,11 +620,11 @@ export interface Client {
|
|
|
596
620
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
597
621
|
*/
|
|
598
622
|
simulate?: boolean;
|
|
599
|
-
}) => Promise<AssembledTransaction<
|
|
623
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
600
624
|
/**
|
|
601
|
-
* Construct and simulate a
|
|
625
|
+
* Construct and simulate a get_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.
|
|
602
626
|
*/
|
|
603
|
-
|
|
627
|
+
get_pool_owner: (options?: {
|
|
604
628
|
/**
|
|
605
629
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
606
630
|
*/
|
|
@@ -613,11 +637,11 @@ export interface Client {
|
|
|
613
637
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
614
638
|
*/
|
|
615
639
|
simulate?: boolean;
|
|
616
|
-
}) => Promise<AssembledTransaction<
|
|
640
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
617
641
|
/**
|
|
618
|
-
* Construct and simulate a
|
|
642
|
+
* Construct and simulate a get_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.
|
|
619
643
|
*/
|
|
620
|
-
|
|
644
|
+
get_pool_owner_treasury: (options?: {
|
|
621
645
|
/**
|
|
622
646
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
623
647
|
*/
|
|
@@ -630,11 +654,11 @@ export interface Client {
|
|
|
630
654
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
631
655
|
*/
|
|
632
656
|
simulate?: boolean;
|
|
633
|
-
}) => Promise<AssembledTransaction<
|
|
657
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
634
658
|
/**
|
|
635
|
-
* Construct and simulate a
|
|
659
|
+
* 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.
|
|
636
660
|
*/
|
|
637
|
-
|
|
661
|
+
get_evaluation_agent: (options?: {
|
|
638
662
|
/**
|
|
639
663
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
640
664
|
*/
|
|
@@ -647,11 +671,11 @@ export interface Client {
|
|
|
647
671
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
648
672
|
*/
|
|
649
673
|
simulate?: boolean;
|
|
650
|
-
}) => Promise<AssembledTransaction<
|
|
674
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
651
675
|
/**
|
|
652
|
-
* Construct and simulate a
|
|
676
|
+
* 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.
|
|
653
677
|
*/
|
|
654
|
-
|
|
678
|
+
get_sentinel: (options?: {
|
|
655
679
|
/**
|
|
656
680
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
657
681
|
*/
|
|
@@ -666,11 +690,9 @@ export interface Client {
|
|
|
666
690
|
simulate?: boolean;
|
|
667
691
|
}) => Promise<AssembledTransaction<string>>;
|
|
668
692
|
/**
|
|
669
|
-
* Construct and simulate a
|
|
693
|
+
* 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.
|
|
670
694
|
*/
|
|
671
|
-
|
|
672
|
-
addr: string;
|
|
673
|
-
}, options?: {
|
|
695
|
+
get_underlying_token: (options?: {
|
|
674
696
|
/**
|
|
675
697
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
676
698
|
*/
|
|
@@ -683,13 +705,11 @@ export interface Client {
|
|
|
683
705
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
684
706
|
*/
|
|
685
707
|
simulate?: boolean;
|
|
686
|
-
}) => Promise<AssembledTransaction<
|
|
708
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
687
709
|
/**
|
|
688
|
-
* Construct and simulate a
|
|
710
|
+
* 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.
|
|
689
711
|
*/
|
|
690
|
-
|
|
691
|
-
addr: string;
|
|
692
|
-
}, options?: {
|
|
712
|
+
get_available_balance: (options?: {
|
|
693
713
|
/**
|
|
694
714
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
695
715
|
*/
|
|
@@ -702,11 +722,11 @@ export interface Client {
|
|
|
702
722
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
703
723
|
*/
|
|
704
724
|
simulate?: boolean;
|
|
705
|
-
}) => Promise<AssembledTransaction<
|
|
725
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
706
726
|
/**
|
|
707
|
-
* Construct and simulate a
|
|
727
|
+
* 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.
|
|
708
728
|
*/
|
|
709
|
-
|
|
729
|
+
get_pool_status: (options?: {
|
|
710
730
|
/**
|
|
711
731
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
712
732
|
*/
|
|
@@ -719,11 +739,11 @@ export interface Client {
|
|
|
719
739
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
720
740
|
*/
|
|
721
741
|
simulate?: boolean;
|
|
722
|
-
}) => Promise<AssembledTransaction<
|
|
742
|
+
}) => Promise<AssembledTransaction<PoolStatus>>;
|
|
723
743
|
/**
|
|
724
|
-
* Construct and simulate a
|
|
744
|
+
* 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.
|
|
725
745
|
*/
|
|
726
|
-
|
|
746
|
+
get_pool_settings: (options?: {
|
|
727
747
|
/**
|
|
728
748
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
729
749
|
*/
|
|
@@ -736,11 +756,11 @@ export interface Client {
|
|
|
736
756
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
737
757
|
*/
|
|
738
758
|
simulate?: boolean;
|
|
739
|
-
}) => Promise<AssembledTransaction<
|
|
759
|
+
}) => Promise<AssembledTransaction<PoolSettings>>;
|
|
740
760
|
/**
|
|
741
|
-
* Construct and simulate a
|
|
761
|
+
* 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.
|
|
742
762
|
*/
|
|
743
|
-
|
|
763
|
+
get_lp_config: (options?: {
|
|
744
764
|
/**
|
|
745
765
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
746
766
|
*/
|
|
@@ -753,11 +773,11 @@ export interface Client {
|
|
|
753
773
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
754
774
|
*/
|
|
755
775
|
simulate?: boolean;
|
|
756
|
-
}) => Promise<AssembledTransaction<
|
|
776
|
+
}) => Promise<AssembledTransaction<LPConfig>>;
|
|
757
777
|
/**
|
|
758
|
-
* Construct and simulate a
|
|
778
|
+
* 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.
|
|
759
779
|
*/
|
|
760
|
-
|
|
780
|
+
get_fee_structure: (options?: {
|
|
761
781
|
/**
|
|
762
782
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
763
783
|
*/
|
|
@@ -770,11 +790,11 @@ export interface Client {
|
|
|
770
790
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
771
791
|
*/
|
|
772
792
|
simulate?: boolean;
|
|
773
|
-
}) => Promise<AssembledTransaction<
|
|
793
|
+
}) => Promise<AssembledTransaction<FeeStructure>>;
|
|
774
794
|
/**
|
|
775
|
-
* Construct and simulate a
|
|
795
|
+
* 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.
|
|
776
796
|
*/
|
|
777
|
-
|
|
797
|
+
get_admin_rnr: (options?: {
|
|
778
798
|
/**
|
|
779
799
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
780
800
|
*/
|
|
@@ -787,7 +807,7 @@ export interface Client {
|
|
|
787
807
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
788
808
|
*/
|
|
789
809
|
simulate?: boolean;
|
|
790
|
-
}) => Promise<AssembledTransaction<
|
|
810
|
+
}) => Promise<AssembledTransaction<AdminRnR>>;
|
|
791
811
|
/**
|
|
792
812
|
* 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.
|
|
793
813
|
*/
|
|
@@ -859,12 +879,10 @@ export interface Client {
|
|
|
859
879
|
simulate?: boolean;
|
|
860
880
|
}) => Promise<AssembledTransaction<TrancheAddresses>>;
|
|
861
881
|
/**
|
|
862
|
-
* Construct and simulate a
|
|
882
|
+
* 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.
|
|
863
883
|
*/
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
tranche_vault: string;
|
|
867
|
-
balance: u128;
|
|
884
|
+
is_pool_owner_or_huma_owner: ({ addr }: {
|
|
885
|
+
addr: string;
|
|
868
886
|
}, options?: {
|
|
869
887
|
/**
|
|
870
888
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -878,13 +896,12 @@ export interface Client {
|
|
|
878
896
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
879
897
|
*/
|
|
880
898
|
simulate?: boolean;
|
|
881
|
-
}) => Promise<AssembledTransaction<
|
|
899
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
882
900
|
/**
|
|
883
|
-
* Construct and simulate a
|
|
901
|
+
* 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.
|
|
884
902
|
*/
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
balance: u128;
|
|
903
|
+
is_pool_operator: ({ addr }: {
|
|
904
|
+
addr: string;
|
|
888
905
|
}, options?: {
|
|
889
906
|
/**
|
|
890
907
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -898,11 +915,29 @@ export interface Client {
|
|
|
898
915
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
899
916
|
*/
|
|
900
917
|
simulate?: boolean;
|
|
901
|
-
}) => Promise<AssembledTransaction<
|
|
918
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
902
919
|
/**
|
|
903
|
-
* Construct and simulate a
|
|
920
|
+
* 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.
|
|
904
921
|
*/
|
|
905
|
-
|
|
922
|
+
is_protocol_and_pool_on: (options?: {
|
|
923
|
+
/**
|
|
924
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
925
|
+
*/
|
|
926
|
+
fee?: number;
|
|
927
|
+
/**
|
|
928
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
929
|
+
*/
|
|
930
|
+
timeoutInSeconds?: number;
|
|
931
|
+
/**
|
|
932
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
933
|
+
*/
|
|
934
|
+
simulate?: boolean;
|
|
935
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
936
|
+
/**
|
|
937
|
+
* 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.
|
|
938
|
+
*/
|
|
939
|
+
check_liquidity_requirements: ({ lender, tranche_vault, balance, }: {
|
|
940
|
+
lender: string;
|
|
906
941
|
tranche_vault: string;
|
|
907
942
|
balance: u128;
|
|
908
943
|
}, options?: {
|
|
@@ -920,9 +955,12 @@ export interface Client {
|
|
|
920
955
|
simulate?: boolean;
|
|
921
956
|
}) => Promise<AssembledTransaction<null>>;
|
|
922
957
|
/**
|
|
923
|
-
* Construct and simulate a
|
|
958
|
+
* Construct and simulate a check_pool_owner_liquidity_req 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.
|
|
924
959
|
*/
|
|
925
|
-
|
|
960
|
+
check_pool_owner_liquidity_req: ({ tranche_vault, balance }: {
|
|
961
|
+
tranche_vault: string;
|
|
962
|
+
balance: u128;
|
|
963
|
+
}, options?: {
|
|
926
964
|
/**
|
|
927
965
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
928
966
|
*/
|
|
@@ -935,11 +973,14 @@ export interface Client {
|
|
|
935
973
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
936
974
|
*/
|
|
937
975
|
simulate?: boolean;
|
|
938
|
-
}) => Promise<AssembledTransaction<
|
|
976
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
939
977
|
/**
|
|
940
|
-
* Construct and simulate a
|
|
978
|
+
* Construct and simulate a check_ea_liquidity_req 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.
|
|
941
979
|
*/
|
|
942
|
-
|
|
980
|
+
check_ea_liquidity_req: ({ tranche_vault, balance }: {
|
|
981
|
+
tranche_vault: string;
|
|
982
|
+
balance: u128;
|
|
983
|
+
}, options?: {
|
|
943
984
|
/**
|
|
944
985
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
945
986
|
*/
|
|
@@ -952,13 +993,12 @@ export interface Client {
|
|
|
952
993
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
953
994
|
*/
|
|
954
995
|
simulate?: boolean;
|
|
955
|
-
}) => Promise<AssembledTransaction<
|
|
996
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
956
997
|
/**
|
|
957
|
-
* Construct and simulate a
|
|
998
|
+
* Construct and simulate a get_pool_owner_min_liquidity_req 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.
|
|
958
999
|
*/
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
increase: boolean;
|
|
1000
|
+
get_pool_owner_min_liquidity_req: ({ index }: {
|
|
1001
|
+
index: u32;
|
|
962
1002
|
}, options?: {
|
|
963
1003
|
/**
|
|
964
1004
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -972,12 +1012,12 @@ export interface Client {
|
|
|
972
1012
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
973
1013
|
*/
|
|
974
1014
|
simulate?: boolean;
|
|
975
|
-
}) => Promise<AssembledTransaction<
|
|
1015
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
976
1016
|
/**
|
|
977
|
-
* Construct and simulate a
|
|
1017
|
+
* Construct and simulate a get_ea_min_liquidity_req 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.
|
|
978
1018
|
*/
|
|
979
|
-
|
|
980
|
-
|
|
1019
|
+
get_ea_min_liquidity_req: ({ index }: {
|
|
1020
|
+
index: u32;
|
|
981
1021
|
}, options?: {
|
|
982
1022
|
/**
|
|
983
1023
|
* The fee to pay for the transaction. Default: BASE_FEE
|
|
@@ -991,7 +1031,7 @@ export interface Client {
|
|
|
991
1031
|
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
992
1032
|
*/
|
|
993
1033
|
simulate?: boolean;
|
|
994
|
-
}) => Promise<AssembledTransaction<
|
|
1034
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
995
1035
|
}
|
|
996
1036
|
export declare class Client extends ContractClient {
|
|
997
1037
|
readonly options: ContractClientOptions;
|
|
@@ -1016,31 +1056,33 @@ export declare class Client extends ContractClient {
|
|
|
1016
1056
|
add_tranche_assets: (json: string) => AssembledTransaction<null>;
|
|
1017
1057
|
reduce_tranche_assets: (json: string) => AssembledTransaction<null>;
|
|
1018
1058
|
update_assets: (json: string) => AssembledTransaction<null>;
|
|
1019
|
-
|
|
1059
|
+
update_admin_fees_reserve: (json: string) => AssembledTransaction<null>;
|
|
1060
|
+
distribute_profit_to_tranches: (json: string) => AssembledTransaction<TrancheAssets>;
|
|
1020
1061
|
refresh_yield_tracker: (json: string) => AssembledTransaction<null>;
|
|
1062
|
+
upgrade: (json: string) => AssembledTransaction<null>;
|
|
1021
1063
|
get_huma_owner: (json: string) => AssembledTransaction<string>;
|
|
1022
|
-
get_pool_settings: (json: string) => AssembledTransaction<PoolSettings>;
|
|
1023
|
-
get_lp_config: (json: string) => AssembledTransaction<LPConfig>;
|
|
1024
|
-
get_fee_structure: (json: string) => AssembledTransaction<FeeStructure>;
|
|
1025
|
-
get_admin_rnr: (json: string) => AssembledTransaction<AdminRnR>;
|
|
1026
1064
|
get_pool_owner: (json: string) => AssembledTransaction<string>;
|
|
1027
|
-
|
|
1028
|
-
is_pool_operator: (json: string) => AssembledTransaction<boolean>;
|
|
1029
|
-
is_protocol_and_pool_on: (json: string) => AssembledTransaction<boolean>;
|
|
1065
|
+
get_pool_owner_treasury: (json: string) => AssembledTransaction<string>;
|
|
1030
1066
|
get_evaluation_agent: (json: string) => AssembledTransaction<string>;
|
|
1031
1067
|
get_sentinel: (json: string) => AssembledTransaction<string>;
|
|
1032
|
-
|
|
1068
|
+
get_underlying_token: (json: string) => AssembledTransaction<string>;
|
|
1069
|
+
get_available_balance: (json: string) => AssembledTransaction<bigint>;
|
|
1033
1070
|
get_pool_status: (json: string) => AssembledTransaction<PoolStatus>;
|
|
1071
|
+
get_pool_settings: (json: string) => AssembledTransaction<PoolSettings>;
|
|
1072
|
+
get_lp_config: (json: string) => AssembledTransaction<LPConfig>;
|
|
1073
|
+
get_fee_structure: (json: string) => AssembledTransaction<FeeStructure>;
|
|
1074
|
+
get_admin_rnr: (json: string) => AssembledTransaction<AdminRnR>;
|
|
1034
1075
|
get_current_epoch: (json: string) => AssembledTransaction<Epoch>;
|
|
1035
1076
|
get_tranche_assets_by_addr: (json: string) => AssembledTransaction<bigint>;
|
|
1036
1077
|
get_tranche_assets: (json: string) => AssembledTransaction<TrancheAssets>;
|
|
1037
1078
|
get_tranche_addresses: (json: string) => AssembledTransaction<TrancheAddresses>;
|
|
1079
|
+
is_pool_owner_or_huma_owner: (json: string) => AssembledTransaction<boolean>;
|
|
1080
|
+
is_pool_operator: (json: string) => AssembledTransaction<boolean>;
|
|
1081
|
+
is_protocol_and_pool_on: (json: string) => AssembledTransaction<boolean>;
|
|
1038
1082
|
check_liquidity_requirements: (json: string) => AssembledTransaction<null>;
|
|
1039
1083
|
check_pool_owner_liquidity_req: (json: string) => AssembledTransaction<null>;
|
|
1040
1084
|
check_ea_liquidity_req: (json: string) => AssembledTransaction<null>;
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
reduce_admin_fees_reserve: (json: string) => AssembledTransaction<null>;
|
|
1044
|
-
upgrade: (json: string) => AssembledTransaction<null>;
|
|
1085
|
+
get_pool_owner_min_liquidity_req: (json: string) => AssembledTransaction<bigint>;
|
|
1086
|
+
get_ea_min_liquidity_req: (json: string) => AssembledTransaction<bigint>;
|
|
1045
1087
|
};
|
|
1046
1088
|
}
|