@huma-finance/soroban-pool-manager 0.0.17-beta.65 → 0.0.17

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 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://mainnet.sorobanrpc.com \
10
- --network-passphrase "Public Global Stellar Network ; September 2015" \
11
- --contract-id CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO \
9
+ --rpc-url https://soroban-testnet.stellar.org \
10
+ --network-passphrase "Test SDF Network ; September 2015" \
11
+ --contract-id CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7 \
12
12
  --output-dir ./path/to/tb-poolManager
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://mainnet.sorobanrpc.com --network-passphrase \"Public Global Stellar Network ; September 2015\" --id CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO --name tb-poolManager"
33
+ "postinstall": "soroban contract bindings ts --rpc-url https://soroban-testnet.stellar.org --network-passphrase \"Test SDF Network ; September 2015\" --id CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7 --name tb-poolManager"
34
34
  }
35
35
  ```
36
36
 
@@ -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 "@stellar/stellar-sdk/contract";
5
- import type { u32, u64, u128, Option } from "@stellar/stellar-sdk/contract";
6
- export * from "@stellar/stellar-sdk";
7
- export * as contract from "@stellar/stellar-sdk/contract";
8
- export * as rpc from "@stellar/stellar-sdk/rpc";
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 unknown: {
11
- readonly networkPassphrase: "Public Global Stellar Network ; September 2015";
12
- readonly contractId: "CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO";
8
+ readonly testnet: {
9
+ readonly networkPassphrase: "Test SDF Network ; September 2015";
10
+ readonly contractId: "CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7";
13
11
  };
14
12
  };
15
13
  export interface PoolManagerAddressesChangedEvent {
@@ -66,6 +64,53 @@ export interface RedemptionRequestsProcessedEvent {
66
64
  senior_tranche_price: u128;
67
65
  unprocessed_amount: u128;
68
66
  }
67
+ export declare const Errors: {
68
+ 301: {
69
+ message: string;
70
+ };
71
+ 302: {
72
+ message: string;
73
+ };
74
+ 303: {
75
+ message: string;
76
+ };
77
+ 304: {
78
+ message: string;
79
+ };
80
+ 305: {
81
+ message: string;
82
+ };
83
+ 306: {
84
+ message: string;
85
+ };
86
+ 307: {
87
+ message: string;
88
+ };
89
+ 801: {
90
+ message: string;
91
+ };
92
+ 1: {
93
+ message: string;
94
+ };
95
+ 2: {
96
+ message: string;
97
+ };
98
+ 3: {
99
+ message: string;
100
+ };
101
+ 4: {
102
+ message: string;
103
+ };
104
+ 5: {
105
+ message: string;
106
+ };
107
+ 6: {
108
+ message: string;
109
+ };
110
+ 7: {
111
+ message: string;
112
+ };
113
+ };
69
114
  export interface PoolEnabledEvent {
70
115
  by: string;
71
116
  }
@@ -148,53 +193,6 @@ export type PayPeriodDuration = {
148
193
  tag: "SemiAnnually";
149
194
  values: void;
150
195
  };
151
- export declare const Errors: {
152
- 801: {
153
- message: string;
154
- };
155
- 1: {
156
- message: string;
157
- };
158
- 2: {
159
- message: string;
160
- };
161
- 3: {
162
- message: string;
163
- };
164
- 4: {
165
- message: string;
166
- };
167
- 5: {
168
- message: string;
169
- };
170
- 6: {
171
- message: string;
172
- };
173
- 7: {
174
- message: string;
175
- };
176
- 301: {
177
- message: string;
178
- };
179
- 302: {
180
- message: string;
181
- };
182
- 303: {
183
- message: string;
184
- };
185
- 304: {
186
- message: string;
187
- };
188
- 305: {
189
- message: string;
190
- };
191
- 306: {
192
- message: string;
193
- };
194
- 307: {
195
- message: string;
196
- };
197
- };
198
196
  export type TranchesPolicyType = {
199
197
  tag: "FixedSeniorYield";
200
198
  values: void;
@@ -260,7 +258,7 @@ export interface Client {
260
258
  /**
261
259
  * 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.
262
260
  */
263
- initialize: ({ pool_name, huma_config, pool_storage, pool, }: {
261
+ initialize: ({ pool_name, huma_config, pool_storage, pool }: {
264
262
  pool_name: string;
265
263
  huma_config: string;
266
264
  pool_storage: string;
@@ -301,7 +299,7 @@ export interface Client {
301
299
  /**
302
300
  * 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.
303
301
  */
304
- set_contract_addrs: ({ caller, pool_storage, pool, }: {
302
+ set_contract_addrs: ({ caller, pool_storage, pool }: {
305
303
  caller: string;
306
304
  pool_storage: string;
307
305
  pool: string;
@@ -322,7 +320,7 @@ export interface Client {
322
320
  /**
323
321
  * Construct and simulate a set_storage_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.
324
322
  */
325
- set_storage_contract_addrs: ({ caller, pool, pool_manager, credit, }: {
323
+ set_storage_contract_addrs: ({ caller, pool, pool_manager, credit }: {
326
324
  caller: string;
327
325
  pool: string;
328
326
  pool_manager: string;
@@ -424,7 +422,7 @@ export interface Client {
424
422
  /**
425
423
  * 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.
426
424
  */
427
- set_tranche_addresses: ({ caller, junior_addr, senior_addr, }: {
425
+ set_tranche_addresses: ({ caller, junior_addr, senior_addr }: {
428
426
  caller: string;
429
427
  junior_addr: string;
430
428
  senior_addr: Option<string>;
@@ -445,7 +443,7 @@ export interface Client {
445
443
  /**
446
444
  * 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.
447
445
  */
448
- set_admin_rnr: ({ caller, pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate, }: {
446
+ set_admin_rnr: ({ caller, pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate }: {
449
447
  caller: string;
450
448
  pool_owner_reward_rate: u32;
451
449
  pool_owner_liquidity_rate: u32;
@@ -468,7 +466,7 @@ export interface Client {
468
466
  /**
469
467
  * 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.
470
468
  */
471
- set_pool_settings: ({ caller, max_credit_line, min_deposit_amount, pay_period_duration, late_payment_grace_period_days, default_grace_period_days, principal_only_payment_allowed, }: {
469
+ set_pool_settings: ({ caller, max_credit_line, min_deposit_amount, pay_period_duration, late_payment_grace_period_days, default_grace_period_days, principal_only_payment_allowed }: {
472
470
  caller: string;
473
471
  max_credit_line: u128;
474
472
  min_deposit_amount: u128;
@@ -493,7 +491,7 @@ export interface Client {
493
491
  /**
494
492
  * 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.
495
493
  */
496
- set_lp_config: ({ caller, liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, auto_redemption_after_lockup, }: {
494
+ set_lp_config: ({ caller, liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, auto_redemption_after_lockup }: {
497
495
  caller: string;
498
496
  liquidity_cap: u128;
499
497
  max_senior_junior_ratio: u32;
@@ -518,7 +516,7 @@ export interface Client {
518
516
  /**
519
517
  * 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.
520
518
  */
521
- set_fee_structure: ({ caller, yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps, }: {
519
+ set_fee_structure: ({ caller, yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps }: {
522
520
  caller: string;
523
521
  yield_bps: u32;
524
522
  late_fee_bps: u32;
@@ -541,7 +539,7 @@ export interface Client {
541
539
  /**
542
540
  * Construct and simulate a set_tranches_policy_type 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.
543
541
  */
544
- set_tranches_policy_type: ({ caller, policy_type, }: {
542
+ set_tranches_policy_type: ({ caller, policy_type }: {
545
543
  caller: string;
546
544
  policy_type: TranchesPolicyType;
547
545
  }, options?: {
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 (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
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,25 +42,17 @@ 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 !== "undefined") {
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
- unknown: {
41
- networkPassphrase: "Public Global Stellar Network ; September 2015",
42
- contractId: "CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO",
43
- },
50
+ testnet: {
51
+ networkPassphrase: "Test SDF Network ; September 2015",
52
+ contractId: "CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7",
53
+ }
44
54
  };
45
55
  exports.Errors = {
46
- 801: { message: "StartDateLaterThanEndDate" },
47
- 1: { message: "AlreadyInitialized" },
48
- 2: { message: "ProtocolIsPausedOrPoolIsNotOn" },
49
- 3: { message: "PoolOwnerOrHumaOwnerRequired" },
50
- 4: { message: "PoolOperatorRequired" },
51
- 5: { message: "AuthorizedContractCallerRequired" },
52
- 6: { message: "UnsupportedFunction" },
53
- 7: { message: "ZeroAmountProvided" },
54
56
  301: { message: "PoolOwnerOrEARequired" },
55
57
  302: { message: "AdminRewardRateTooHigh" },
56
58
  303: { message: "MinDepositAmountTooLow" },
@@ -58,12 +60,19 @@ exports.Errors = {
58
60
  305: { message: "InsufficientAmountForRequest" },
59
61
  306: { message: "InvalidBasisPointHigherThan10000" },
60
62
  307: { message: "EpochClosedTooEarly" },
63
+ 801: { message: "StartDateLaterThanEndDate" },
64
+ 1: { message: "AlreadyInitialized" },
65
+ 2: { message: "ProtocolIsPausedOrPoolIsNotOn" },
66
+ 3: { message: "PoolOwnerOrHumaOwnerRequired" },
67
+ 4: { message: "PoolOperatorRequired" },
68
+ 5: { message: "AuthorizedContractCallerRequired" },
69
+ 6: { message: "UnsupportedFunction" },
70
+ 7: { message: "ZeroAmountProvided" }
61
71
  };
62
72
  class Client extends contract_1.Client {
63
73
  options;
64
74
  constructor(options) {
65
- super(new contract_1.Spec([
66
- "AAAAAQAAAAAAAAAAAAAAIFBvb2xNYW5hZ2VyQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAgAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABM=",
75
+ super(new contract_1.Spec(["AAAAAQAAAAAAAAAAAAAAIFBvb2xNYW5hZ2VyQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAgAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABM=",
67
76
  "AAAAAQAAAAAAAAAAAAAAIFBvb2xTdG9yYWdlQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAwAAAAAAAAAGY3JlZGl0AAAAAAATAAAAAAAAAARwb29sAAAAEwAAAAAAAAAMcG9vbF9tYW5hZ2VyAAAAEw==",
68
77
  "AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAADAAAAAAAAAAAAAAAKSHVtYUNvbmZpZwAAAAAAAAAAAAAAAAALUG9vbFN0b3JhZ2UAAAAAAAAAAAAAAAAEUG9vbA==",
69
78
  "AAAAAQAAAAAAAAAAAAAAFlBvb2xPcGVyYXRvckFkZGVkRXZlbnQAAAAAAAEAAAAAAAAACG9wZXJhdG9yAAAAEw==",
@@ -129,8 +138,7 @@ class Client extends contract_1.Client {
129
138
  "AAAAAQAAAAAAAAAAAAAACEFkbWluUm5SAAAABAAAAAAAAAAVbGlxdWlkaXR5X3JhdGVfYnBzX2VhAAAAAAAABAAAAAAAAAAdbGlxdWlkaXR5X3JhdGVfYnBzX3Bvb2xfb3duZXIAAAAAAAAEAAAAAAAAABJyZXdhcmRfcmF0ZV9icHNfZWEAAAAAAAQAAAAAAAAAGnJld2FyZF9yYXRlX2Jwc19wb29sX293bmVyAAAAAAAE",
130
139
  "AAAAAQAAAAAAAAAAAAAAEFRyYW5jaGVBZGRyZXNzZXMAAAABAAAAAAAAAAVhZGRycwAAAAAAA+oAAAPoAAAAEw==",
131
140
  "AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK",
132
- "AAAAAQAAAAAAAAAAAAAAFkVwb2NoUmVkZW1wdGlvblN1bW1hcnkAAAAAAAQAAAAAAAAACGVwb2NoX2lkAAAABgAAAAAAAAAWdG90YWxfYW1vdW50X3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3JlcXVlc3RlZAAAAAAACg==",
133
- ]), options);
141
+ "AAAAAQAAAAAAAAAAAAAAFkVwb2NoUmVkZW1wdGlvblN1bW1hcnkAAAAAAAQAAAAAAAAACGVwb2NoX2lkAAAABgAAAAAAAAAWdG90YWxfYW1vdW50X3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3JlcXVlc3RlZAAAAAAACg=="]), options);
134
142
  this.options = options;
135
143
  }
136
144
  fromJSON = {
@@ -157,7 +165,7 @@ class Client extends contract_1.Client {
157
165
  withdraw_protocol_fees: (this.txFromJSON),
158
166
  withdraw_pool_owner_fees: (this.txFromJSON),
159
167
  withdraw_ea_fees: (this.txFromJSON),
160
- upgrade: (this.txFromJSON),
168
+ upgrade: (this.txFromJSON)
161
169
  };
162
170
  }
163
171
  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 "@stellar/stellar-sdk/contract";
5
- import type { u32, u64, u128, Option } from "@stellar/stellar-sdk/contract";
6
- export * from "@stellar/stellar-sdk";
7
- export * as contract from "@stellar/stellar-sdk/contract";
8
- export * as rpc from "@stellar/stellar-sdk/rpc";
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 unknown: {
11
- readonly networkPassphrase: "Public Global Stellar Network ; September 2015";
12
- readonly contractId: "CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO";
8
+ readonly testnet: {
9
+ readonly networkPassphrase: "Test SDF Network ; September 2015";
10
+ readonly contractId: "CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7";
13
11
  };
14
12
  };
15
13
  export interface PoolManagerAddressesChangedEvent {
@@ -66,6 +64,53 @@ export interface RedemptionRequestsProcessedEvent {
66
64
  senior_tranche_price: u128;
67
65
  unprocessed_amount: u128;
68
66
  }
67
+ export declare const Errors: {
68
+ 301: {
69
+ message: string;
70
+ };
71
+ 302: {
72
+ message: string;
73
+ };
74
+ 303: {
75
+ message: string;
76
+ };
77
+ 304: {
78
+ message: string;
79
+ };
80
+ 305: {
81
+ message: string;
82
+ };
83
+ 306: {
84
+ message: string;
85
+ };
86
+ 307: {
87
+ message: string;
88
+ };
89
+ 801: {
90
+ message: string;
91
+ };
92
+ 1: {
93
+ message: string;
94
+ };
95
+ 2: {
96
+ message: string;
97
+ };
98
+ 3: {
99
+ message: string;
100
+ };
101
+ 4: {
102
+ message: string;
103
+ };
104
+ 5: {
105
+ message: string;
106
+ };
107
+ 6: {
108
+ message: string;
109
+ };
110
+ 7: {
111
+ message: string;
112
+ };
113
+ };
69
114
  export interface PoolEnabledEvent {
70
115
  by: string;
71
116
  }
@@ -148,53 +193,6 @@ export type PayPeriodDuration = {
148
193
  tag: "SemiAnnually";
149
194
  values: void;
150
195
  };
151
- export declare const Errors: {
152
- 801: {
153
- message: string;
154
- };
155
- 1: {
156
- message: string;
157
- };
158
- 2: {
159
- message: string;
160
- };
161
- 3: {
162
- message: string;
163
- };
164
- 4: {
165
- message: string;
166
- };
167
- 5: {
168
- message: string;
169
- };
170
- 6: {
171
- message: string;
172
- };
173
- 7: {
174
- message: string;
175
- };
176
- 301: {
177
- message: string;
178
- };
179
- 302: {
180
- message: string;
181
- };
182
- 303: {
183
- message: string;
184
- };
185
- 304: {
186
- message: string;
187
- };
188
- 305: {
189
- message: string;
190
- };
191
- 306: {
192
- message: string;
193
- };
194
- 307: {
195
- message: string;
196
- };
197
- };
198
196
  export type TranchesPolicyType = {
199
197
  tag: "FixedSeniorYield";
200
198
  values: void;
@@ -260,7 +258,7 @@ export interface Client {
260
258
  /**
261
259
  * 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.
262
260
  */
263
- initialize: ({ pool_name, huma_config, pool_storage, pool, }: {
261
+ initialize: ({ pool_name, huma_config, pool_storage, pool }: {
264
262
  pool_name: string;
265
263
  huma_config: string;
266
264
  pool_storage: string;
@@ -301,7 +299,7 @@ export interface Client {
301
299
  /**
302
300
  * 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.
303
301
  */
304
- set_contract_addrs: ({ caller, pool_storage, pool, }: {
302
+ set_contract_addrs: ({ caller, pool_storage, pool }: {
305
303
  caller: string;
306
304
  pool_storage: string;
307
305
  pool: string;
@@ -322,7 +320,7 @@ export interface Client {
322
320
  /**
323
321
  * Construct and simulate a set_storage_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.
324
322
  */
325
- set_storage_contract_addrs: ({ caller, pool, pool_manager, credit, }: {
323
+ set_storage_contract_addrs: ({ caller, pool, pool_manager, credit }: {
326
324
  caller: string;
327
325
  pool: string;
328
326
  pool_manager: string;
@@ -424,7 +422,7 @@ export interface Client {
424
422
  /**
425
423
  * 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.
426
424
  */
427
- set_tranche_addresses: ({ caller, junior_addr, senior_addr, }: {
425
+ set_tranche_addresses: ({ caller, junior_addr, senior_addr }: {
428
426
  caller: string;
429
427
  junior_addr: string;
430
428
  senior_addr: Option<string>;
@@ -445,7 +443,7 @@ export interface Client {
445
443
  /**
446
444
  * 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.
447
445
  */
448
- set_admin_rnr: ({ caller, pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate, }: {
446
+ set_admin_rnr: ({ caller, pool_owner_reward_rate, pool_owner_liquidity_rate, ea_reward_rate, ea_liquidity_rate }: {
449
447
  caller: string;
450
448
  pool_owner_reward_rate: u32;
451
449
  pool_owner_liquidity_rate: u32;
@@ -468,7 +466,7 @@ export interface Client {
468
466
  /**
469
467
  * 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.
470
468
  */
471
- set_pool_settings: ({ caller, max_credit_line, min_deposit_amount, pay_period_duration, late_payment_grace_period_days, default_grace_period_days, principal_only_payment_allowed, }: {
469
+ set_pool_settings: ({ caller, max_credit_line, min_deposit_amount, pay_period_duration, late_payment_grace_period_days, default_grace_period_days, principal_only_payment_allowed }: {
472
470
  caller: string;
473
471
  max_credit_line: u128;
474
472
  min_deposit_amount: u128;
@@ -493,7 +491,7 @@ export interface Client {
493
491
  /**
494
492
  * 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.
495
493
  */
496
- set_lp_config: ({ caller, liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, auto_redemption_after_lockup, }: {
494
+ set_lp_config: ({ caller, liquidity_cap, max_senior_junior_ratio, fixed_senior_yield_bps, tranches_risk_adjustment_bps, withdrawal_lockout_period_days, auto_redemption_after_lockup }: {
497
495
  caller: string;
498
496
  liquidity_cap: u128;
499
497
  max_senior_junior_ratio: u32;
@@ -518,7 +516,7 @@ export interface Client {
518
516
  /**
519
517
  * 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.
520
518
  */
521
- set_fee_structure: ({ caller, yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps, }: {
519
+ set_fee_structure: ({ caller, yield_bps, late_fee_bps, front_loading_fee_flat, front_loading_fee_bps }: {
522
520
  caller: string;
523
521
  yield_bps: u32;
524
522
  late_fee_bps: u32;
@@ -541,7 +539,7 @@ export interface Client {
541
539
  /**
542
540
  * Construct and simulate a set_tranches_policy_type 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.
543
541
  */
544
- set_tranches_policy_type: ({ caller, policy_type, }: {
542
+ set_tranches_policy_type: ({ caller, policy_type }: {
545
543
  caller: string;
546
544
  policy_type: TranchesPolicyType;
547
545
  }, options?: {
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 (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
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,25 +42,17 @@ 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 !== "undefined") {
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
- unknown: {
41
- networkPassphrase: "Public Global Stellar Network ; September 2015",
42
- contractId: "CBQ7KII3OETETYM65TFJT2YPVFFK42V4WUBIMJJNWKTIZ5XOWYZW3XAO",
43
- },
50
+ testnet: {
51
+ networkPassphrase: "Test SDF Network ; September 2015",
52
+ contractId: "CCBMUKDFMSMNTMWLRUWHBPC2ZPBXXTLC3OUULPBV2GEHOE44JO6S2FQ7",
53
+ }
44
54
  };
45
55
  exports.Errors = {
46
- 801: { message: "StartDateLaterThanEndDate" },
47
- 1: { message: "AlreadyInitialized" },
48
- 2: { message: "ProtocolIsPausedOrPoolIsNotOn" },
49
- 3: { message: "PoolOwnerOrHumaOwnerRequired" },
50
- 4: { message: "PoolOperatorRequired" },
51
- 5: { message: "AuthorizedContractCallerRequired" },
52
- 6: { message: "UnsupportedFunction" },
53
- 7: { message: "ZeroAmountProvided" },
54
56
  301: { message: "PoolOwnerOrEARequired" },
55
57
  302: { message: "AdminRewardRateTooHigh" },
56
58
  303: { message: "MinDepositAmountTooLow" },
@@ -58,12 +60,19 @@ exports.Errors = {
58
60
  305: { message: "InsufficientAmountForRequest" },
59
61
  306: { message: "InvalidBasisPointHigherThan10000" },
60
62
  307: { message: "EpochClosedTooEarly" },
63
+ 801: { message: "StartDateLaterThanEndDate" },
64
+ 1: { message: "AlreadyInitialized" },
65
+ 2: { message: "ProtocolIsPausedOrPoolIsNotOn" },
66
+ 3: { message: "PoolOwnerOrHumaOwnerRequired" },
67
+ 4: { message: "PoolOperatorRequired" },
68
+ 5: { message: "AuthorizedContractCallerRequired" },
69
+ 6: { message: "UnsupportedFunction" },
70
+ 7: { message: "ZeroAmountProvided" }
61
71
  };
62
72
  class Client extends contract_1.Client {
63
73
  options;
64
74
  constructor(options) {
65
- super(new contract_1.Spec([
66
- "AAAAAQAAAAAAAAAAAAAAIFBvb2xNYW5hZ2VyQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAgAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABM=",
75
+ super(new contract_1.Spec(["AAAAAQAAAAAAAAAAAAAAIFBvb2xNYW5hZ2VyQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAgAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABM=",
67
76
  "AAAAAQAAAAAAAAAAAAAAIFBvb2xTdG9yYWdlQWRkcmVzc2VzQ2hhbmdlZEV2ZW50AAAAAwAAAAAAAAAGY3JlZGl0AAAAAAATAAAAAAAAAARwb29sAAAAEwAAAAAAAAAMcG9vbF9tYW5hZ2VyAAAAEw==",
68
77
  "AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAADAAAAAAAAAAAAAAAKSHVtYUNvbmZpZwAAAAAAAAAAAAAAAAALUG9vbFN0b3JhZ2UAAAAAAAAAAAAAAAAEUG9vbA==",
69
78
  "AAAAAQAAAAAAAAAAAAAAFlBvb2xPcGVyYXRvckFkZGVkRXZlbnQAAAAAAAEAAAAAAAAACG9wZXJhdG9yAAAAEw==",
@@ -129,8 +138,7 @@ class Client extends contract_1.Client {
129
138
  "AAAAAQAAAAAAAAAAAAAACEFkbWluUm5SAAAABAAAAAAAAAAVbGlxdWlkaXR5X3JhdGVfYnBzX2VhAAAAAAAABAAAAAAAAAAdbGlxdWlkaXR5X3JhdGVfYnBzX3Bvb2xfb3duZXIAAAAAAAAEAAAAAAAAABJyZXdhcmRfcmF0ZV9icHNfZWEAAAAAAAQAAAAAAAAAGnJld2FyZF9yYXRlX2Jwc19wb29sX293bmVyAAAAAAAE",
130
139
  "AAAAAQAAAAAAAAAAAAAAEFRyYW5jaGVBZGRyZXNzZXMAAAABAAAAAAAAAAVhZGRycwAAAAAAA+oAAAPoAAAAEw==",
131
140
  "AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK",
132
- "AAAAAQAAAAAAAAAAAAAAFkVwb2NoUmVkZW1wdGlvblN1bW1hcnkAAAAAAAQAAAAAAAAACGVwb2NoX2lkAAAABgAAAAAAAAAWdG90YWxfYW1vdW50X3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3JlcXVlc3RlZAAAAAAACg==",
133
- ]), options);
141
+ "AAAAAQAAAAAAAAAAAAAAFkVwb2NoUmVkZW1wdGlvblN1bW1hcnkAAAAAAAQAAAAAAAAACGVwb2NoX2lkAAAABgAAAAAAAAAWdG90YWxfYW1vdW50X3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3Byb2Nlc3NlZAAAAAAACgAAAAAAAAAWdG90YWxfc2hhcmVzX3JlcXVlc3RlZAAAAAAACg=="]), options);
134
142
  this.options = options;
135
143
  }
136
144
  fromJSON = {
@@ -157,7 +165,7 @@ class Client extends contract_1.Client {
157
165
  withdraw_protocol_fees: (this.txFromJSON),
158
166
  withdraw_pool_owner_fees: (this.txFromJSON),
159
167
  withdraw_ea_fees: (this.txFromJSON),
160
- upgrade: (this.txFromJSON),
168
+ upgrade: (this.txFromJSON)
161
169
  };
162
170
  }
163
171
  exports.Client = Client;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.17-beta.65+8b4a114",
2
+ "version": "0.0.17",
3
3
  "name": "@huma-finance/soroban-pool-manager",
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": "12.1.0",
16
+ "@stellar/stellar-sdk": "13.0.0",
17
17
  "buffer": "6.0.3"
18
18
  },
19
19
  "devDependencies": {
20
- "typescript": "5.3.3"
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": "8b4a1146b739d14ade932c8e1116d24b38b40823"
26
+ "gitHead": "79286f0b0f35fd77895c3e571b7d46debbcc68fc"
27
27
  }