@huma-finance/soroban-pool 0.0.11-beta.17 → 0.0.15-beta.20

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,358 @@
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: "CCUM2YAJM3EY2RTFMX5P6PDBT7ZZWPNNQLMW4CGIGQJKLTLT7J2SMAMV";
10
+ };
11
+ };
12
+ export type ClientDataKey = {
13
+ tag: "HumaConfig";
14
+ values: void;
15
+ } | {
16
+ tag: "PoolStorage";
17
+ values: void;
18
+ } | {
19
+ tag: "PoolManager";
20
+ values: void;
21
+ } | {
22
+ tag: "Credit";
23
+ values: void;
24
+ } | {
25
+ tag: "CreditManager";
26
+ values: void;
27
+ };
28
+ export interface HumaConfigChangedEvent {
29
+ huma_config: string;
30
+ }
31
+ export interface PoolAddressesChangedEvent {
32
+ credit: string;
33
+ credit_manager: string;
34
+ pool_manager: string;
35
+ pool_storage: string;
36
+ }
37
+ export interface HumaConfigChangedEvent {
38
+ huma_config: string;
39
+ }
40
+ export interface PoolAddressesChangedEvent {
41
+ pool_manager: string;
42
+ pool_storage: string;
43
+ }
44
+ export interface CreditAddressesChangedEvent {
45
+ credit: string;
46
+ credit_manager: string;
47
+ }
48
+ export interface TranchesPolicyTypeChangedEvent {
49
+ policy_type: TranchesPolicyType;
50
+ }
51
+ /**
52
+ * Event for the distribution of profit in the pool.
53
+ * # Fields:
54
+ * * `profit` - The amount of profit distributed.
55
+ * * `senior_total_assets` - The total amount of senior assets post profit distribution.
56
+ * * `junior_total_assets` - The total amount of junior assets post profit distribution.
57
+ */
58
+ export interface ProfitDistributedEvent {
59
+ junior_total_assets: u128;
60
+ profit: u128;
61
+ senior_total_assets: u128;
62
+ }
63
+ /**
64
+ * Event for the distribution of loss in the pool.
65
+ * # Fields:
66
+ * * `loss` - The amount of loss distributed.
67
+ * * `senior_total_assets` - The total amount of senior assets post loss distribution.
68
+ * * `junior_total_assets` - The total amount of junior assets post loss distribution.
69
+ * * `senior_total_loss` - The total amount of loss the senior tranche suffered post loss distribution.
70
+ * * `junior_total_loss` - The total amount of loss the junior tranche suffered post loss distribution.
71
+ */
72
+ export interface LossDistributedEvent {
73
+ junior_total_assets: u128;
74
+ junior_total_loss: u128;
75
+ loss: u128;
76
+ senior_total_assets: u128;
77
+ senior_total_loss: u128;
78
+ }
79
+ /**
80
+ * Event for the distribution of loss recovery in the pool.
81
+ * # Fields:
82
+ * * `loss_recovery` - The amount of loss recovery distributed.
83
+ * * `senior_total_assets` - The total amount of senior assets post loss recovery distribution.
84
+ * * `junior_total_assets` - The total amount of junior assets post loss recovery distribution.
85
+ * * `senior_total_loss` - The remaining amount of loss the senior tranche suffered post loss recovery distribution.
86
+ * * `junior_total_loss` - The remaining amount of loss the junior tranche suffered post loss recovery distribution.
87
+ */
88
+ export interface LossRecoveryDistributedEvent {
89
+ junior_total_assets: u128;
90
+ junior_total_loss: u128;
91
+ loss_recovery: u128;
92
+ senior_total_assets: u128;
93
+ senior_total_loss: u128;
94
+ }
95
+ export type TranchesPolicyType = {
96
+ tag: "FixedSeniorYield";
97
+ values: void;
98
+ } | {
99
+ tag: "RiskAdjusted";
100
+ values: void;
101
+ };
102
+ export interface TrancheLosses {
103
+ losses: Array<u128>;
104
+ }
105
+ export interface AccruedIncomes {
106
+ ea_income: u128;
107
+ pool_owner_income: u128;
108
+ protocol_income: u128;
109
+ }
110
+ export type PayPeriodDuration = {
111
+ tag: "Monthly";
112
+ values: void;
113
+ } | {
114
+ tag: "Quarterly";
115
+ values: void;
116
+ } | {
117
+ tag: "SemiAnnually";
118
+ values: void;
119
+ };
120
+ export interface PoolSettings {
121
+ default_grace_period_days: u32;
122
+ late_payment_grace_period_days: u32;
123
+ max_credit_line: u128;
124
+ min_deposit_amount: u128;
125
+ pay_period_duration: PayPeriodDuration;
126
+ principal_only_payment_allowed: boolean;
127
+ }
128
+ export interface LPConfig {
129
+ fixed_senior_yield_bps: u32;
130
+ liquidity_cap: u128;
131
+ max_senior_junior_ratio: u32;
132
+ tranches_risk_adjustment_bps: u32;
133
+ withdrawal_lockout_period_days: u32;
134
+ }
135
+ export interface FeeStructure {
136
+ front_loading_fee_bps: u32;
137
+ front_loading_fee_flat: u128;
138
+ late_fee_bps: u32;
139
+ yield_bps: u32;
140
+ }
141
+ export type PoolStatus = {
142
+ tag: "Off";
143
+ values: void;
144
+ } | {
145
+ tag: "On";
146
+ values: void;
147
+ } | {
148
+ tag: "Closed";
149
+ values: void;
150
+ };
151
+ export interface Epoch {
152
+ end_time: u64;
153
+ id: u64;
154
+ }
155
+ export interface AdminRnR {
156
+ liquidity_rate_bps_ea: u32;
157
+ liquidity_rate_bps_pool_owner: u32;
158
+ reward_rate_bps_ea: u32;
159
+ reward_rate_bps_pool_owner: u32;
160
+ }
161
+ export interface TrancheAddresses {
162
+ addrs: Array<Option<string>>;
163
+ }
164
+ export interface TrancheAssets {
165
+ assets: Array<u128>;
166
+ }
167
+ export interface Client {
168
+ /**
169
+ * 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.
170
+ */
171
+ initialize: ({ huma_config, pool_manager, pool_storage, credit_manager, credit, }: {
172
+ huma_config: string;
173
+ pool_manager: string;
174
+ pool_storage: string;
175
+ credit_manager: string;
176
+ credit: 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_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.
193
+ */
194
+ set_huma_config: ({ huma_config }: {
195
+ huma_config: string;
196
+ }, options?: {
197
+ /**
198
+ * The fee to pay for the transaction. Default: BASE_FEE
199
+ */
200
+ fee?: number;
201
+ /**
202
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
203
+ */
204
+ timeoutInSeconds?: number;
205
+ /**
206
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
207
+ */
208
+ simulate?: boolean;
209
+ }) => Promise<AssembledTransaction<null>>;
210
+ /**
211
+ * 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.
212
+ */
213
+ set_contract_addrs: ({ pool_storage, pool_manager, credit, credit_manager, }: {
214
+ pool_storage: string;
215
+ pool_manager: string;
216
+ credit: string;
217
+ credit_manager: string;
218
+ }, options?: {
219
+ /**
220
+ * The fee to pay for the transaction. Default: BASE_FEE
221
+ */
222
+ fee?: number;
223
+ /**
224
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
225
+ */
226
+ timeoutInSeconds?: number;
227
+ /**
228
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
229
+ */
230
+ simulate?: boolean;
231
+ }) => Promise<AssembledTransaction<null>>;
232
+ /**
233
+ * Construct and simulate a distribute_profit 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.
234
+ */
235
+ distribute_profit: ({ caller, profit }: {
236
+ caller: string;
237
+ profit: u128;
238
+ }, options?: {
239
+ /**
240
+ * The fee to pay for the transaction. Default: BASE_FEE
241
+ */
242
+ fee?: number;
243
+ /**
244
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
245
+ */
246
+ timeoutInSeconds?: number;
247
+ /**
248
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
249
+ */
250
+ simulate?: boolean;
251
+ }) => Promise<AssembledTransaction<null>>;
252
+ /**
253
+ * Construct and simulate a distribute_loss 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.
254
+ */
255
+ distribute_loss: ({ caller, loss }: {
256
+ caller: string;
257
+ loss: u128;
258
+ }, options?: {
259
+ /**
260
+ * The fee to pay for the transaction. Default: BASE_FEE
261
+ */
262
+ fee?: number;
263
+ /**
264
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
265
+ */
266
+ timeoutInSeconds?: number;
267
+ /**
268
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
269
+ */
270
+ simulate?: boolean;
271
+ }) => Promise<AssembledTransaction<null>>;
272
+ /**
273
+ * Construct and simulate a distribute_loss_recovery 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.
274
+ */
275
+ distribute_loss_recovery: ({ caller, loss_recovery }: {
276
+ caller: string;
277
+ loss_recovery: u128;
278
+ }, options?: {
279
+ /**
280
+ * The fee to pay for the transaction. Default: BASE_FEE
281
+ */
282
+ fee?: number;
283
+ /**
284
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
285
+ */
286
+ timeoutInSeconds?: number;
287
+ /**
288
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
289
+ */
290
+ simulate?: boolean;
291
+ }) => Promise<AssembledTransaction<null>>;
292
+ /**
293
+ * Construct and simulate a get_protocol_income_accrued 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.
294
+ */
295
+ get_protocol_income_accrued: (options?: {
296
+ /**
297
+ * The fee to pay for the transaction. Default: BASE_FEE
298
+ */
299
+ fee?: number;
300
+ /**
301
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
302
+ */
303
+ timeoutInSeconds?: number;
304
+ /**
305
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
306
+ */
307
+ simulate?: boolean;
308
+ }) => Promise<AssembledTransaction<u128>>;
309
+ /**
310
+ * Construct and simulate a get_pool_owner_income_accrued 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.
311
+ */
312
+ get_pool_owner_income_accrued: (options?: {
313
+ /**
314
+ * The fee to pay for the transaction. Default: BASE_FEE
315
+ */
316
+ fee?: number;
317
+ /**
318
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
319
+ */
320
+ timeoutInSeconds?: number;
321
+ /**
322
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
323
+ */
324
+ simulate?: boolean;
325
+ }) => Promise<AssembledTransaction<u128>>;
326
+ /**
327
+ * Construct and simulate a get_ea_income_accrued 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.
328
+ */
329
+ get_ea_income_accrued: (options?: {
330
+ /**
331
+ * The fee to pay for the transaction. Default: BASE_FEE
332
+ */
333
+ fee?: number;
334
+ /**
335
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
336
+ */
337
+ timeoutInSeconds?: number;
338
+ /**
339
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
340
+ */
341
+ simulate?: boolean;
342
+ }) => Promise<AssembledTransaction<u128>>;
343
+ }
344
+ export declare class Client extends ContractClient {
345
+ readonly options: ContractClientOptions;
346
+ constructor(options: ContractClientOptions);
347
+ readonly fromJSON: {
348
+ initialize: (json: string) => AssembledTransaction<null>;
349
+ set_huma_config: (json: string) => AssembledTransaction<null>;
350
+ set_contract_addrs: (json: string) => AssembledTransaction<null>;
351
+ distribute_profit: (json: string) => AssembledTransaction<null>;
352
+ distribute_loss: (json: string) => AssembledTransaction<null>;
353
+ distribute_loss_recovery: (json: string) => AssembledTransaction<null>;
354
+ get_protocol_income_accrued: (json: string) => AssembledTransaction<bigint>;
355
+ get_pool_owner_income_accrued: (json: string) => AssembledTransaction<bigint>;
356
+ get_ea_income_accrued: (json: string) => AssembledTransaction<bigint>;
357
+ };
358
+ }
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Client = exports.networks = void 0;
18
+ const stellar_sdk_1 = require("@stellar/stellar-sdk");
19
+ const buffer_1 = require("buffer");
20
+ const index_js_1 = require("@stellar/stellar-sdk/lib/contract_client/index.js");
21
+ __exportStar(require("@stellar/stellar-sdk"), exports);
22
+ __exportStar(require("@stellar/stellar-sdk/lib/contract_client/index.js"), exports);
23
+ __exportStar(require("@stellar/stellar-sdk/lib/rust_types/index.js"), exports);
24
+ if (typeof window !== "undefined") {
25
+ //@ts-ignore Buffer exists
26
+ window.Buffer = window.Buffer || buffer_1.Buffer;
27
+ }
28
+ exports.networks = {
29
+ testnet: {
30
+ networkPassphrase: "Test SDF Network ; September 2015",
31
+ contractId: "CCUM2YAJM3EY2RTFMX5P6PDBT7ZZWPNNQLMW4CGIGQJKLTLT7J2SMAMV",
32
+ },
33
+ };
34
+ class Client extends index_js_1.ContractClient {
35
+ options;
36
+ constructor(options) {
37
+ super(new stellar_sdk_1.ContractSpec([
38
+ "AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAAFAAAAAAAAAAAAAAAKSHVtYUNvbmZpZwAAAAAAAAAAAAAAAAALUG9vbFN0b3JhZ2UAAAAAAAAAAAAAAAALUG9vbE1hbmFnZXIAAAAAAAAAAAAAAAAGQ3JlZGl0AAAAAAAAAAAAAAAAAA1DcmVkaXRNYW5hZ2VyAAAA",
39
+ "AAAAAQAAAAAAAAAAAAAAFkh1bWFDb25maWdDaGFuZ2VkRXZlbnQAAAAAAAEAAAAAAAAAC2h1bWFfY29uZmlnAAAAABM=",
40
+ "AAAAAQAAAAAAAAAAAAAAGVBvb2xBZGRyZXNzZXNDaGFuZ2VkRXZlbnQAAAAAAAAEAAAAAAAAAAZjcmVkaXQAAAAAABMAAAAAAAAADmNyZWRpdF9tYW5hZ2VyAAAAAAATAAAAAAAAAAxwb29sX21hbmFnZXIAAAATAAAAAAAAAAxwb29sX3N0b3JhZ2UAAAAT",
41
+ "AAAAAQAAAAAAAAAAAAAAFkh1bWFDb25maWdDaGFuZ2VkRXZlbnQAAAAAAAEAAAAAAAAAC2h1bWFfY29uZmlnAAAAABM=",
42
+ "AAAAAQAAAAAAAAAAAAAAGVBvb2xBZGRyZXNzZXNDaGFuZ2VkRXZlbnQAAAAAAAACAAAAAAAAAAxwb29sX21hbmFnZXIAAAATAAAAAAAAAAxwb29sX3N0b3JhZ2UAAAAT",
43
+ "AAA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
+ ]), options);
73
+ this.options = options;
74
+ }
75
+ fromJSON = {
76
+ initialize: (this.txFromJSON),
77
+ set_huma_config: (this.txFromJSON),
78
+ set_contract_addrs: (this.txFromJSON),
79
+ distribute_profit: (this.txFromJSON),
80
+ distribute_loss: (this.txFromJSON),
81
+ distribute_loss_recovery: (this.txFromJSON),
82
+ get_protocol_income_accrued: (this.txFromJSON),
83
+ get_pool_owner_income_accrued: (this.txFromJSON),
84
+ get_ea_income_accrued: (this.txFromJSON),
85
+ };
86
+ }
87
+ exports.Client = Client;