@huma-finance/soroban-pool-storage 0.0.16 → 0.0.17-beta.66
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 +18 -20
- package/dist/cjs/index.js +26 -18
- package/dist/index.d.ts +18 -20
- package/dist/index.js +26 -18
- package/package.json +4 -4
- package/src/index.ts +605 -772
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@ This library was automatically generated by Soroban CLI using a command similar
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
soroban contract bindings ts \
|
|
9
|
-
--rpc-url https://
|
|
10
|
-
--network-passphrase "
|
|
11
|
-
--contract-id
|
|
9
|
+
--rpc-url https://soroban-testnet.stellar.org \
|
|
10
|
+
--network-passphrase "Test SDF Network ; September 2015" \
|
|
11
|
+
--contract-id CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS \
|
|
12
12
|
--output-dir ./path/to/tb-poolStorage
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -30,7 +30,7 @@ However, we've actually encountered [frustration](https://github.com/stellar/sor
|
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
"scripts": {
|
|
33
|
-
"postinstall": "soroban contract bindings ts --rpc-url https://
|
|
33
|
+
"postinstall": "soroban contract bindings ts --rpc-url https://soroban-testnet.stellar.org --network-passphrase \"Test SDF Network ; September 2015\" --id CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS --name tb-poolStorage"
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Buffer } from "buffer";
|
|
4
|
-
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from
|
|
5
|
-
import type { u32, u64, u128, Option } from
|
|
6
|
-
export * from
|
|
7
|
-
export * as contract from
|
|
8
|
-
export * as rpc from
|
|
2
|
+
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from '@stellar/stellar-sdk/contract';
|
|
3
|
+
import type { u32, u64, u128, Option } from '@stellar/stellar-sdk/contract';
|
|
4
|
+
export * from '@stellar/stellar-sdk';
|
|
5
|
+
export * as contract from '@stellar/stellar-sdk/contract';
|
|
6
|
+
export * as rpc from '@stellar/stellar-sdk/rpc';
|
|
9
7
|
export declare const networks: {
|
|
10
|
-
readonly
|
|
11
|
-
readonly networkPassphrase: "
|
|
12
|
-
readonly contractId: "
|
|
8
|
+
readonly testnet: {
|
|
9
|
+
readonly networkPassphrase: "Test SDF Network ; September 2015";
|
|
10
|
+
readonly contractId: "CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS";
|
|
13
11
|
};
|
|
14
12
|
};
|
|
15
13
|
export declare const Errors: {
|
|
@@ -139,7 +137,7 @@ export interface Client {
|
|
|
139
137
|
/**
|
|
140
138
|
* 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.
|
|
141
139
|
*/
|
|
142
|
-
initialize: ({ addrs, tranche_addrs, tranches_policy
|
|
140
|
+
initialize: ({ addrs, tranche_addrs, tranches_policy }: {
|
|
143
141
|
addrs: Array<string>;
|
|
144
142
|
tranche_addrs: Array<Option<string>>;
|
|
145
143
|
tranches_policy: TranchesPolicyType;
|
|
@@ -160,7 +158,7 @@ export interface Client {
|
|
|
160
158
|
/**
|
|
161
159
|
* 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.
|
|
162
160
|
*/
|
|
163
|
-
set_contract_addrs: ({ pool, pool_manager, credit
|
|
161
|
+
set_contract_addrs: ({ pool, pool_manager, credit }: {
|
|
164
162
|
pool: string;
|
|
165
163
|
pool_manager: string;
|
|
166
164
|
credit: string;
|
|
@@ -181,7 +179,7 @@ export interface Client {
|
|
|
181
179
|
/**
|
|
182
180
|
* 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.
|
|
183
181
|
*/
|
|
184
|
-
set_huma_config: ({ huma_config, huma_owner, sentinel
|
|
182
|
+
set_huma_config: ({ huma_config, huma_owner, sentinel }: {
|
|
185
183
|
huma_config: string;
|
|
186
184
|
huma_owner: string;
|
|
187
185
|
sentinel: string;
|
|
@@ -259,7 +257,7 @@ export interface Client {
|
|
|
259
257
|
/**
|
|
260
258
|
* 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.
|
|
261
259
|
*/
|
|
262
|
-
set_tranche_addresses: ({ junior_addr, senior_addr
|
|
260
|
+
set_tranche_addresses: ({ junior_addr, senior_addr }: {
|
|
263
261
|
junior_addr: string;
|
|
264
262
|
senior_addr: Option<string>;
|
|
265
263
|
}, options?: {
|
|
@@ -337,7 +335,7 @@ export interface Client {
|
|
|
337
335
|
/**
|
|
338
336
|
* 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.
|
|
339
337
|
*/
|
|
340
|
-
set_admin_rnr: ({ pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate
|
|
338
|
+
set_admin_rnr: ({ pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate }: {
|
|
341
339
|
pool_owner_reward_rate: u32;
|
|
342
340
|
pool_owner_liquidity_rate: u32;
|
|
343
341
|
ea_reward_rate: u32;
|
|
@@ -359,7 +357,7 @@ export interface Client {
|
|
|
359
357
|
/**
|
|
360
358
|
* 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.
|
|
361
359
|
*/
|
|
362
|
-
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
|
|
360
|
+
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 }: {
|
|
363
361
|
max_credit_line: u128;
|
|
364
362
|
min_deposit_amount: u128;
|
|
365
363
|
pay_period_duration: PayPeriodDuration;
|
|
@@ -383,7 +381,7 @@ export interface Client {
|
|
|
383
381
|
/**
|
|
384
382
|
* 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.
|
|
385
383
|
*/
|
|
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
|
|
384
|
+
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 }: {
|
|
387
385
|
liquidity_cap: u128;
|
|
388
386
|
max_senior_junior_ratio: u32;
|
|
389
387
|
fixed_senior_yield_bps: u32;
|
|
@@ -407,7 +405,7 @@ export interface Client {
|
|
|
407
405
|
/**
|
|
408
406
|
* 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.
|
|
409
407
|
*/
|
|
410
|
-
set_fee_structure: ({ yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps
|
|
408
|
+
set_fee_structure: ({ yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps }: {
|
|
411
409
|
yield_bps: u32;
|
|
412
410
|
late_fee_bps: u32;
|
|
413
411
|
front_loading_fee_flat: u128;
|
|
@@ -509,7 +507,7 @@ export interface Client {
|
|
|
509
507
|
/**
|
|
510
508
|
* 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.
|
|
511
509
|
*/
|
|
512
|
-
update_assets: ({ caller, tranche_assets
|
|
510
|
+
update_assets: ({ caller, tranche_assets }: {
|
|
513
511
|
caller: string;
|
|
514
512
|
tranche_assets: TrancheAssets;
|
|
515
513
|
}, options?: {
|
|
@@ -936,7 +934,7 @@ export interface Client {
|
|
|
936
934
|
/**
|
|
937
935
|
* 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
936
|
*/
|
|
939
|
-
check_liquidity_requirements: ({ lender, tranche_vault, balance
|
|
937
|
+
check_liquidity_requirements: ({ lender, tranche_vault, balance }: {
|
|
940
938
|
lender: string;
|
|
941
939
|
tranche_vault: string;
|
|
942
940
|
balance: u128;
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Client = exports.Errors = exports.networks = exports.rpc = exports.contract = void 0;
|
|
30
40
|
const buffer_1 = require("buffer");
|
|
@@ -32,15 +42,15 @@ const contract_1 = require("@stellar/stellar-sdk/contract");
|
|
|
32
42
|
__exportStar(require("@stellar/stellar-sdk"), exports);
|
|
33
43
|
exports.contract = __importStar(require("@stellar/stellar-sdk/contract"));
|
|
34
44
|
exports.rpc = __importStar(require("@stellar/stellar-sdk/rpc"));
|
|
35
|
-
if (typeof window !==
|
|
45
|
+
if (typeof window !== 'undefined') {
|
|
36
46
|
//@ts-ignore Buffer exists
|
|
37
47
|
window.Buffer = window.Buffer || buffer_1.Buffer;
|
|
38
48
|
}
|
|
39
49
|
exports.networks = {
|
|
40
|
-
|
|
41
|
-
networkPassphrase: "
|
|
42
|
-
contractId: "
|
|
43
|
-
}
|
|
50
|
+
testnet: {
|
|
51
|
+
networkPassphrase: "Test SDF Network ; September 2015",
|
|
52
|
+
contractId: "CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS",
|
|
53
|
+
}
|
|
44
54
|
};
|
|
45
55
|
exports.Errors = {
|
|
46
56
|
201: { message: "InvalidTrancheAddress" },
|
|
@@ -54,13 +64,12 @@ exports.Errors = {
|
|
|
54
64
|
4: { message: "PoolOperatorRequired" },
|
|
55
65
|
5: { message: "AuthorizedContractCallerRequired" },
|
|
56
66
|
6: { message: "UnsupportedFunction" },
|
|
57
|
-
7: { message: "ZeroAmountProvided" }
|
|
67
|
+
7: { message: "ZeroAmountProvided" }
|
|
58
68
|
};
|
|
59
69
|
class Client extends contract_1.Client {
|
|
60
70
|
options;
|
|
61
71
|
constructor(options) {
|
|
62
|
-
super(new contract_1.Spec([
|
|
63
|
-
"AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAFYWRkcnMAAAAAAAPqAAAAEwAAAAAAAAANdHJhbmNoZV9hZGRycwAAAAAAA+oAAAPoAAAAEwAAAAAAAAAPdHJhbmNoZXNfcG9saWN5AAAAB9AAAAASVHJhbmNoZXNQb2xpY3lUeXBlAAAAAAAA",
|
|
72
|
+
super(new contract_1.Spec(["AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAFYWRkcnMAAAAAAAPqAAAAEwAAAAAAAAANdHJhbmNoZV9hZGRycwAAAAAAA+oAAAPoAAAAEwAAAAAAAAAPdHJhbmNoZXNfcG9saWN5AAAAB9AAAAASVHJhbmNoZXNQb2xpY3lUeXBlAAAAAAAA",
|
|
64
73
|
"AAAAAAAAAAAAAAASc2V0X2NvbnRyYWN0X2FkZHJzAAAAAAADAAAAAAAAAARwb29sAAAAEwAAAAAAAAAMcG9vbF9tYW5hZ2VyAAAAEwAAAAAAAAAGY3JlZGl0AAAAAAATAAAAAA==",
|
|
65
74
|
"AAAAAAAAAAAAAAAPc2V0X2h1bWFfY29uZmlnAAAAAAMAAAAAAAAAC2h1bWFfY29uZmlnAAAAABMAAAAAAAAACmh1bWFfb3duZXIAAAAAABMAAAAAAAAACHNlbnRpbmVsAAAAEwAAAAA=",
|
|
66
75
|
"AAAAAAAAAAAAAAAOc2V0X3Bvb2xfb3duZXIAAAAAAAEAAAAAAAAACnBvb2xfb3duZXIAAAAAABMAAAAA",
|
|
@@ -124,8 +133,7 @@ class Client extends contract_1.Client {
|
|
|
124
133
|
"AAAAAQAAAAAAAAAAAAAABUVwb2NoAAAAAAAAAgAAAAAAAAAIZW5kX3RpbWUAAAAGAAAAAAAAAAJpZAAAAAAABg==",
|
|
125
134
|
"AAAAAQAAAAAAAAAAAAAACEFkbWluUm5SAAAABAAAAAAAAAAVbGlxdWlkaXR5X3JhdGVfYnBzX2VhAAAAAAAABAAAAAAAAAAdbGlxdWlkaXR5X3JhdGVfYnBzX3Bvb2xfb3duZXIAAAAAAAAEAAAAAAAAABJyZXdhcmRfcmF0ZV9icHNfZWEAAAAAAAQAAAAAAAAAGnJld2FyZF9yYXRlX2Jwc19wb29sX293bmVyAAAAAAAE",
|
|
126
135
|
"AAAAAQAAAAAAAAAAAAAAEFRyYW5jaGVBZGRyZXNzZXMAAAABAAAAAAAAAAVhZGRycwAAAAAAA+oAAAPoAAAAEw==",
|
|
127
|
-
"AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK",
|
|
128
|
-
]), options);
|
|
136
|
+
"AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK"]), options);
|
|
129
137
|
this.options = options;
|
|
130
138
|
}
|
|
131
139
|
fromJSON = {
|
|
@@ -175,7 +183,7 @@ class Client extends contract_1.Client {
|
|
|
175
183
|
check_pool_owner_liquidity_req: (this.txFromJSON),
|
|
176
184
|
check_ea_liquidity_req: (this.txFromJSON),
|
|
177
185
|
get_pool_owner_min_liquidity_req: (this.txFromJSON),
|
|
178
|
-
get_ea_min_liquidity_req: (this.txFromJSON)
|
|
186
|
+
get_ea_min_liquidity_req: (this.txFromJSON)
|
|
179
187
|
};
|
|
180
188
|
}
|
|
181
189
|
exports.Client = Client;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Buffer } from "buffer";
|
|
4
|
-
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from
|
|
5
|
-
import type { u32, u64, u128, Option } from
|
|
6
|
-
export * from
|
|
7
|
-
export * as contract from
|
|
8
|
-
export * as rpc from
|
|
2
|
+
import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions } from '@stellar/stellar-sdk/contract';
|
|
3
|
+
import type { u32, u64, u128, Option } from '@stellar/stellar-sdk/contract';
|
|
4
|
+
export * from '@stellar/stellar-sdk';
|
|
5
|
+
export * as contract from '@stellar/stellar-sdk/contract';
|
|
6
|
+
export * as rpc from '@stellar/stellar-sdk/rpc';
|
|
9
7
|
export declare const networks: {
|
|
10
|
-
readonly
|
|
11
|
-
readonly networkPassphrase: "
|
|
12
|
-
readonly contractId: "
|
|
8
|
+
readonly testnet: {
|
|
9
|
+
readonly networkPassphrase: "Test SDF Network ; September 2015";
|
|
10
|
+
readonly contractId: "CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS";
|
|
13
11
|
};
|
|
14
12
|
};
|
|
15
13
|
export declare const Errors: {
|
|
@@ -139,7 +137,7 @@ export interface Client {
|
|
|
139
137
|
/**
|
|
140
138
|
* 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.
|
|
141
139
|
*/
|
|
142
|
-
initialize: ({ addrs, tranche_addrs, tranches_policy
|
|
140
|
+
initialize: ({ addrs, tranche_addrs, tranches_policy }: {
|
|
143
141
|
addrs: Array<string>;
|
|
144
142
|
tranche_addrs: Array<Option<string>>;
|
|
145
143
|
tranches_policy: TranchesPolicyType;
|
|
@@ -160,7 +158,7 @@ export interface Client {
|
|
|
160
158
|
/**
|
|
161
159
|
* 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.
|
|
162
160
|
*/
|
|
163
|
-
set_contract_addrs: ({ pool, pool_manager, credit
|
|
161
|
+
set_contract_addrs: ({ pool, pool_manager, credit }: {
|
|
164
162
|
pool: string;
|
|
165
163
|
pool_manager: string;
|
|
166
164
|
credit: string;
|
|
@@ -181,7 +179,7 @@ export interface Client {
|
|
|
181
179
|
/**
|
|
182
180
|
* 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.
|
|
183
181
|
*/
|
|
184
|
-
set_huma_config: ({ huma_config, huma_owner, sentinel
|
|
182
|
+
set_huma_config: ({ huma_config, huma_owner, sentinel }: {
|
|
185
183
|
huma_config: string;
|
|
186
184
|
huma_owner: string;
|
|
187
185
|
sentinel: string;
|
|
@@ -259,7 +257,7 @@ export interface Client {
|
|
|
259
257
|
/**
|
|
260
258
|
* 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.
|
|
261
259
|
*/
|
|
262
|
-
set_tranche_addresses: ({ junior_addr, senior_addr
|
|
260
|
+
set_tranche_addresses: ({ junior_addr, senior_addr }: {
|
|
263
261
|
junior_addr: string;
|
|
264
262
|
senior_addr: Option<string>;
|
|
265
263
|
}, options?: {
|
|
@@ -337,7 +335,7 @@ export interface Client {
|
|
|
337
335
|
/**
|
|
338
336
|
* 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.
|
|
339
337
|
*/
|
|
340
|
-
set_admin_rnr: ({ pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate
|
|
338
|
+
set_admin_rnr: ({ pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate }: {
|
|
341
339
|
pool_owner_reward_rate: u32;
|
|
342
340
|
pool_owner_liquidity_rate: u32;
|
|
343
341
|
ea_reward_rate: u32;
|
|
@@ -359,7 +357,7 @@ export interface Client {
|
|
|
359
357
|
/**
|
|
360
358
|
* 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.
|
|
361
359
|
*/
|
|
362
|
-
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
|
|
360
|
+
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 }: {
|
|
363
361
|
max_credit_line: u128;
|
|
364
362
|
min_deposit_amount: u128;
|
|
365
363
|
pay_period_duration: PayPeriodDuration;
|
|
@@ -383,7 +381,7 @@ export interface Client {
|
|
|
383
381
|
/**
|
|
384
382
|
* 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.
|
|
385
383
|
*/
|
|
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
|
|
384
|
+
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 }: {
|
|
387
385
|
liquidity_cap: u128;
|
|
388
386
|
max_senior_junior_ratio: u32;
|
|
389
387
|
fixed_senior_yield_bps: u32;
|
|
@@ -407,7 +405,7 @@ export interface Client {
|
|
|
407
405
|
/**
|
|
408
406
|
* 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.
|
|
409
407
|
*/
|
|
410
|
-
set_fee_structure: ({ yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps
|
|
408
|
+
set_fee_structure: ({ yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps }: {
|
|
411
409
|
yield_bps: u32;
|
|
412
410
|
late_fee_bps: u32;
|
|
413
411
|
front_loading_fee_flat: u128;
|
|
@@ -509,7 +507,7 @@ export interface Client {
|
|
|
509
507
|
/**
|
|
510
508
|
* 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.
|
|
511
509
|
*/
|
|
512
|
-
update_assets: ({ caller, tranche_assets
|
|
510
|
+
update_assets: ({ caller, tranche_assets }: {
|
|
513
511
|
caller: string;
|
|
514
512
|
tranche_assets: TrancheAssets;
|
|
515
513
|
}, options?: {
|
|
@@ -936,7 +934,7 @@ export interface Client {
|
|
|
936
934
|
/**
|
|
937
935
|
* 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
936
|
*/
|
|
939
|
-
check_liquidity_requirements: ({ lender, tranche_vault, balance
|
|
937
|
+
check_liquidity_requirements: ({ lender, tranche_vault, balance }: {
|
|
940
938
|
lender: string;
|
|
941
939
|
tranche_vault: string;
|
|
942
940
|
balance: u128;
|
package/dist/index.js
CHANGED
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Client = exports.Errors = exports.networks = exports.rpc = exports.contract = void 0;
|
|
30
40
|
const buffer_1 = require("buffer");
|
|
@@ -32,15 +42,15 @@ const contract_1 = require("@stellar/stellar-sdk/contract");
|
|
|
32
42
|
__exportStar(require("@stellar/stellar-sdk"), exports);
|
|
33
43
|
exports.contract = __importStar(require("@stellar/stellar-sdk/contract"));
|
|
34
44
|
exports.rpc = __importStar(require("@stellar/stellar-sdk/rpc"));
|
|
35
|
-
if (typeof window !==
|
|
45
|
+
if (typeof window !== 'undefined') {
|
|
36
46
|
//@ts-ignore Buffer exists
|
|
37
47
|
window.Buffer = window.Buffer || buffer_1.Buffer;
|
|
38
48
|
}
|
|
39
49
|
exports.networks = {
|
|
40
|
-
|
|
41
|
-
networkPassphrase: "
|
|
42
|
-
contractId: "
|
|
43
|
-
}
|
|
50
|
+
testnet: {
|
|
51
|
+
networkPassphrase: "Test SDF Network ; September 2015",
|
|
52
|
+
contractId: "CB6ZOVS6IBOGNMGD4CTS3B3RC3673BARPYRFZIMZZ4NY5MG3TKZ6DWVS",
|
|
53
|
+
}
|
|
44
54
|
};
|
|
45
55
|
exports.Errors = {
|
|
46
56
|
201: { message: "InvalidTrancheAddress" },
|
|
@@ -54,13 +64,12 @@ exports.Errors = {
|
|
|
54
64
|
4: { message: "PoolOperatorRequired" },
|
|
55
65
|
5: { message: "AuthorizedContractCallerRequired" },
|
|
56
66
|
6: { message: "UnsupportedFunction" },
|
|
57
|
-
7: { message: "ZeroAmountProvided" }
|
|
67
|
+
7: { message: "ZeroAmountProvided" }
|
|
58
68
|
};
|
|
59
69
|
class Client extends contract_1.Client {
|
|
60
70
|
options;
|
|
61
71
|
constructor(options) {
|
|
62
|
-
super(new contract_1.Spec([
|
|
63
|
-
"AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAFYWRkcnMAAAAAAAPqAAAAEwAAAAAAAAANdHJhbmNoZV9hZGRycwAAAAAAA+oAAAPoAAAAEwAAAAAAAAAPdHJhbmNoZXNfcG9saWN5AAAAB9AAAAASVHJhbmNoZXNQb2xpY3lUeXBlAAAAAAAA",
|
|
72
|
+
super(new contract_1.Spec(["AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAFYWRkcnMAAAAAAAPqAAAAEwAAAAAAAAANdHJhbmNoZV9hZGRycwAAAAAAA+oAAAPoAAAAEwAAAAAAAAAPdHJhbmNoZXNfcG9saWN5AAAAB9AAAAASVHJhbmNoZXNQb2xpY3lUeXBlAAAAAAAA",
|
|
64
73
|
"AAAAAAAAAAAAAAASc2V0X2NvbnRyYWN0X2FkZHJzAAAAAAADAAAAAAAAAARwb29sAAAAEwAAAAAAAAAMcG9vbF9tYW5hZ2VyAAAAEwAAAAAAAAAGY3JlZGl0AAAAAAATAAAAAA==",
|
|
65
74
|
"AAAAAAAAAAAAAAAPc2V0X2h1bWFfY29uZmlnAAAAAAMAAAAAAAAAC2h1bWFfY29uZmlnAAAAABMAAAAAAAAACmh1bWFfb3duZXIAAAAAABMAAAAAAAAACHNlbnRpbmVsAAAAEwAAAAA=",
|
|
66
75
|
"AAAAAAAAAAAAAAAOc2V0X3Bvb2xfb3duZXIAAAAAAAEAAAAAAAAACnBvb2xfb3duZXIAAAAAABMAAAAA",
|
|
@@ -124,8 +133,7 @@ class Client extends contract_1.Client {
|
|
|
124
133
|
"AAAAAQAAAAAAAAAAAAAABUVwb2NoAAAAAAAAAgAAAAAAAAAIZW5kX3RpbWUAAAAGAAAAAAAAAAJpZAAAAAAABg==",
|
|
125
134
|
"AAAAAQAAAAAAAAAAAAAACEFkbWluUm5SAAAABAAAAAAAAAAVbGlxdWlkaXR5X3JhdGVfYnBzX2VhAAAAAAAABAAAAAAAAAAdbGlxdWlkaXR5X3JhdGVfYnBzX3Bvb2xfb3duZXIAAAAAAAAEAAAAAAAAABJyZXdhcmRfcmF0ZV9icHNfZWEAAAAAAAQAAAAAAAAAGnJld2FyZF9yYXRlX2Jwc19wb29sX293bmVyAAAAAAAE",
|
|
126
135
|
"AAAAAQAAAAAAAAAAAAAAEFRyYW5jaGVBZGRyZXNzZXMAAAABAAAAAAAAAAVhZGRycwAAAAAAA+oAAAPoAAAAEw==",
|
|
127
|
-
"AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK",
|
|
128
|
-
]), options);
|
|
136
|
+
"AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK"]), options);
|
|
129
137
|
this.options = options;
|
|
130
138
|
}
|
|
131
139
|
fromJSON = {
|
|
@@ -175,7 +183,7 @@ class Client extends contract_1.Client {
|
|
|
175
183
|
check_pool_owner_liquidity_req: (this.txFromJSON),
|
|
176
184
|
check_ea_liquidity_req: (this.txFromJSON),
|
|
177
185
|
get_pool_owner_min_liquidity_req: (this.txFromJSON),
|
|
178
|
-
get_ea_min_liquidity_req: (this.txFromJSON)
|
|
186
|
+
get_ea_min_liquidity_req: (this.txFromJSON)
|
|
179
187
|
};
|
|
180
188
|
}
|
|
181
189
|
exports.Client = Client;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.17-beta.66+2d77d8b",
|
|
3
3
|
"name": "@huma-finance/soroban-pool-storage",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"clean": "tsc --build --clean && rm -rf dist"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@stellar/stellar-sdk": "
|
|
16
|
+
"@stellar/stellar-sdk": "13.0.0",
|
|
17
17
|
"buffer": "6.0.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"typescript": "5.
|
|
20
|
+
"typescript": "^5.6.2"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public",
|
|
24
24
|
"registry": "https://registry.npmjs.org/"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "2d77d8b4e2587941ab66fef1503f18be7ddc407f"
|
|
27
27
|
}
|