@huma-finance/soroban-pool-credit 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 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://soroban-testnet.stellar.org:443 \
10
- --network-passphrase "Test SDF Network ; September 2015" \
11
- --contract-id CCYWDOW34SPB3FCR6A633B5GS5DPRRQKTTCT4DU7YYFDRT7XBOA2HYYY \
9
+ --rpc-url https://mainnet.sorobanrpc.com \
10
+ --network-passphrase "Public Global Stellar Network ; September 2015" \
11
+ --contract-id CANCNGJEAAN4GS6WVI3OAFWD2IAJW6WMI7TOD4UHC623QTDMD3LVTN3G \
12
12
  --output-dir ./path/to/tb-poolCredit
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://soroban-testnet.stellar.org:443 --network-passphrase \"Test SDF Network ; September 2015\" --id CCYWDOW34SPB3FCR6A633B5GS5DPRRQKTTCT4DU7YYFDRT7XBOA2HYYY --name tb-poolCredit"
33
+ "postinstall": "soroban contract bindings ts --rpc-url https://mainnet.sorobanrpc.com --network-passphrase \"Public Global Stellar Network ; September 2015\" --id CANCNGJEAAN4GS6WVI3OAFWD2IAJW6WMI7TOD4UHC623QTDMD3LVTN3G --name tb-poolCredit"
34
34
  }
35
35
  ```
36
36
 
@@ -0,0 +1,429 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ 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";
9
+ export declare const networks: {
10
+ readonly unknown: {
11
+ readonly networkPassphrase: "Public Global Stellar Network ; September 2015";
12
+ readonly contractId: "CANCNGJEAAN4GS6WVI3OAFWD2IAJW6WMI7TOD4UHC623QTDMD3LVTN3G";
13
+ };
14
+ };
15
+ export interface CreditAddressesChangedEvent {
16
+ credit_storage: string;
17
+ pool: string;
18
+ pool_storage: string;
19
+ }
20
+ export type ClientDataKey = {
21
+ tag: "Pool";
22
+ values: void;
23
+ } | {
24
+ tag: "PoolStorage";
25
+ values: void;
26
+ } | {
27
+ tag: "CreditStorage";
28
+ values: void;
29
+ };
30
+ export interface DrawdownMadeEvent {
31
+ borrow_amount: u128;
32
+ borrower: string;
33
+ net_amount_to_borrower: u128;
34
+ }
35
+ export interface PaymentMadeEvent {
36
+ amount: u128;
37
+ borrower: string;
38
+ late_fee_paid: u128;
39
+ next_due_date: u64;
40
+ principal_due: u128;
41
+ principal_due_paid: u128;
42
+ principal_past_due_paid: u128;
43
+ unbilled_principal_paid: u128;
44
+ yield_due: u128;
45
+ yield_due_paid: u128;
46
+ yield_past_due_paid: u128;
47
+ }
48
+ export interface PrincipalPaymentMadeEvent {
49
+ amount: u128;
50
+ borrower: string;
51
+ next_due_date: u64;
52
+ principal_due: u128;
53
+ principal_due_paid: u128;
54
+ unbilled_principal: u128;
55
+ unbilled_principal_paid: u128;
56
+ }
57
+ export interface CreditClosedAfterPayOffEvent {
58
+ credit_hash: Buffer;
59
+ }
60
+ export declare const Errors: {
61
+ 601: {
62
+ message: string;
63
+ };
64
+ 602: {
65
+ message: string;
66
+ };
67
+ 603: {
68
+ message: string;
69
+ };
70
+ 604: {
71
+ message: string;
72
+ };
73
+ 605: {
74
+ message: string;
75
+ };
76
+ 606: {
77
+ message: string;
78
+ };
79
+ 607: {
80
+ message: string;
81
+ };
82
+ 608: {
83
+ message: string;
84
+ };
85
+ 609: {
86
+ message: string;
87
+ };
88
+ 610: {
89
+ message: string;
90
+ };
91
+ 801: {
92
+ message: string;
93
+ };
94
+ 1: {
95
+ message: string;
96
+ };
97
+ 2: {
98
+ message: string;
99
+ };
100
+ 3: {
101
+ message: string;
102
+ };
103
+ 4: {
104
+ message: string;
105
+ };
106
+ 5: {
107
+ message: string;
108
+ };
109
+ 6: {
110
+ message: string;
111
+ };
112
+ 7: {
113
+ message: string;
114
+ };
115
+ 221: {
116
+ message: string;
117
+ };
118
+ };
119
+ export type PayPeriodDuration = {
120
+ tag: "Monthly";
121
+ values: void;
122
+ } | {
123
+ tag: "Quarterly";
124
+ values: void;
125
+ } | {
126
+ tag: "SemiAnnually";
127
+ values: void;
128
+ };
129
+ export interface BillRefreshedEvent {
130
+ credit_hash: Buffer;
131
+ new_due_date: u64;
132
+ next_due: u128;
133
+ total_past_due: u128;
134
+ }
135
+ export type CreditState = {
136
+ tag: "Deleted";
137
+ values: void;
138
+ } | {
139
+ tag: "Approved";
140
+ values: void;
141
+ } | {
142
+ tag: "GoodStanding";
143
+ values: void;
144
+ } | {
145
+ tag: "Delayed";
146
+ values: void;
147
+ } | {
148
+ tag: "Defaulted";
149
+ values: void;
150
+ };
151
+ export interface CreditConfig {
152
+ committed_amount: u128;
153
+ credit_limit: u128;
154
+ num_periods: u32;
155
+ pay_period_duration: PayPeriodDuration;
156
+ revolving: boolean;
157
+ yield_bps: u32;
158
+ }
159
+ export interface CreditRecord {
160
+ missed_periods: u32;
161
+ next_due: u128;
162
+ next_due_date: u64;
163
+ remaining_periods: u32;
164
+ state: CreditState;
165
+ total_past_due: u128;
166
+ unbilled_principal: u128;
167
+ yield_due: u128;
168
+ }
169
+ export interface DueDetail {
170
+ accrued: u128;
171
+ committed: u128;
172
+ late_fee: u128;
173
+ late_fee_updated_date: u64;
174
+ paid: u128;
175
+ principal_past_due: u128;
176
+ yield_past_due: u128;
177
+ }
178
+ export type TranchesPolicyType = {
179
+ tag: "FixedSeniorYield";
180
+ values: void;
181
+ } | {
182
+ tag: "RiskAdjusted";
183
+ values: void;
184
+ };
185
+ export interface PoolSettings {
186
+ default_grace_period_days: u32;
187
+ late_payment_grace_period_days: u32;
188
+ max_credit_line: u128;
189
+ min_deposit_amount: u128;
190
+ pay_period_duration: PayPeriodDuration;
191
+ principal_only_payment_allowed: boolean;
192
+ }
193
+ export interface LPConfig {
194
+ auto_redemption_after_lockup: boolean;
195
+ fixed_senior_yield_bps: u32;
196
+ liquidity_cap: u128;
197
+ max_senior_junior_ratio: u32;
198
+ tranches_risk_adjustment_bps: u32;
199
+ withdrawal_lockout_period_days: u32;
200
+ }
201
+ export interface FeeStructure {
202
+ front_loading_fee_bps: u32;
203
+ front_loading_fee_flat: u128;
204
+ late_fee_bps: u32;
205
+ yield_bps: u32;
206
+ }
207
+ export type PoolStatus = {
208
+ tag: "Off";
209
+ values: void;
210
+ } | {
211
+ tag: "On";
212
+ values: void;
213
+ } | {
214
+ tag: "Closed";
215
+ values: void;
216
+ };
217
+ export interface Epoch {
218
+ end_time: u64;
219
+ id: u64;
220
+ }
221
+ export interface AdminRnR {
222
+ liquidity_rate_bps_ea: u32;
223
+ liquidity_rate_bps_pool_owner: u32;
224
+ reward_rate_bps_ea: u32;
225
+ reward_rate_bps_pool_owner: u32;
226
+ }
227
+ export interface TrancheAddresses {
228
+ addrs: Array<Option<string>>;
229
+ }
230
+ export interface TrancheAssets {
231
+ assets: Array<u128>;
232
+ }
233
+ export interface Client {
234
+ /**
235
+ * 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.
236
+ */
237
+ initialize: ({ pool, pool_storage, credit_storage, }: {
238
+ pool: string;
239
+ pool_storage: string;
240
+ credit_storage: string;
241
+ }, options?: {
242
+ /**
243
+ * The fee to pay for the transaction. Default: BASE_FEE
244
+ */
245
+ fee?: number;
246
+ /**
247
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
248
+ */
249
+ timeoutInSeconds?: number;
250
+ /**
251
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
252
+ */
253
+ simulate?: boolean;
254
+ }) => Promise<AssembledTransaction<null>>;
255
+ /**
256
+ * 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.
257
+ */
258
+ set_contract_addrs: ({ caller, pool_storage, pool, credit_storage, }: {
259
+ caller: string;
260
+ pool_storage: string;
261
+ pool: string;
262
+ credit_storage: string;
263
+ }, options?: {
264
+ /**
265
+ * The fee to pay for the transaction. Default: BASE_FEE
266
+ */
267
+ fee?: number;
268
+ /**
269
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
270
+ */
271
+ timeoutInSeconds?: number;
272
+ /**
273
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
274
+ */
275
+ simulate?: boolean;
276
+ }) => Promise<AssembledTransaction<null>>;
277
+ /**
278
+ * Construct and simulate a drawdown 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.
279
+ */
280
+ drawdown: ({ borrower, amount }: {
281
+ borrower: string;
282
+ amount: u128;
283
+ }, options?: {
284
+ /**
285
+ * The fee to pay for the transaction. Default: BASE_FEE
286
+ */
287
+ fee?: number;
288
+ /**
289
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
290
+ */
291
+ timeoutInSeconds?: number;
292
+ /**
293
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
294
+ */
295
+ simulate?: boolean;
296
+ }) => Promise<AssembledTransaction<u128>>;
297
+ /**
298
+ * Construct and simulate a make_payment 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.
299
+ */
300
+ make_payment: ({ caller, borrower, amount, }: {
301
+ caller: string;
302
+ borrower: string;
303
+ amount: u128;
304
+ }, options?: {
305
+ /**
306
+ * The fee to pay for the transaction. Default: BASE_FEE
307
+ */
308
+ fee?: number;
309
+ /**
310
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
311
+ */
312
+ timeoutInSeconds?: number;
313
+ /**
314
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
315
+ */
316
+ simulate?: boolean;
317
+ }) => Promise<AssembledTransaction<readonly [u128, boolean]>>;
318
+ /**
319
+ * Construct and simulate a make_principal_payment transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
320
+ */
321
+ make_principal_payment: ({ borrower, amount }: {
322
+ borrower: string;
323
+ amount: u128;
324
+ }, options?: {
325
+ /**
326
+ * The fee to pay for the transaction. Default: BASE_FEE
327
+ */
328
+ fee?: number;
329
+ /**
330
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
331
+ */
332
+ timeoutInSeconds?: number;
333
+ /**
334
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
335
+ */
336
+ simulate?: boolean;
337
+ }) => Promise<AssembledTransaction<readonly [u128, boolean]>>;
338
+ /**
339
+ * 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.
340
+ */
341
+ upgrade: ({ new_wasm_hash }: {
342
+ new_wasm_hash: Buffer;
343
+ }, options?: {
344
+ /**
345
+ * The fee to pay for the transaction. Default: BASE_FEE
346
+ */
347
+ fee?: number;
348
+ /**
349
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
350
+ */
351
+ timeoutInSeconds?: number;
352
+ /**
353
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
354
+ */
355
+ simulate?: boolean;
356
+ }) => Promise<AssembledTransaction<null>>;
357
+ /**
358
+ * Construct and simulate a get_due_info 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.
359
+ */
360
+ get_due_info: ({ borrower }: {
361
+ borrower: string;
362
+ }, options?: {
363
+ /**
364
+ * The fee to pay for the transaction. Default: BASE_FEE
365
+ */
366
+ fee?: number;
367
+ /**
368
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
369
+ */
370
+ timeoutInSeconds?: number;
371
+ /**
372
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
373
+ */
374
+ simulate?: boolean;
375
+ }) => Promise<AssembledTransaction<readonly [CreditRecord, DueDetail]>>;
376
+ /**
377
+ * Construct and simulate a get_next_bill_refresh_date 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.
378
+ */
379
+ get_next_bill_refresh_date: ({ borrower }: {
380
+ borrower: string;
381
+ }, options?: {
382
+ /**
383
+ * The fee to pay for the transaction. Default: BASE_FEE
384
+ */
385
+ fee?: number;
386
+ /**
387
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
388
+ */
389
+ timeoutInSeconds?: number;
390
+ /**
391
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
392
+ */
393
+ simulate?: boolean;
394
+ }) => Promise<AssembledTransaction<u64>>;
395
+ /**
396
+ * Construct and simulate a get_amt_available_for_drawdown 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.
397
+ */
398
+ get_amt_available_for_drawdown: ({ borrower }: {
399
+ borrower: string;
400
+ }, options?: {
401
+ /**
402
+ * The fee to pay for the transaction. Default: BASE_FEE
403
+ */
404
+ fee?: number;
405
+ /**
406
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
407
+ */
408
+ timeoutInSeconds?: number;
409
+ /**
410
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
411
+ */
412
+ simulate?: boolean;
413
+ }) => Promise<AssembledTransaction<u128>>;
414
+ }
415
+ export declare class Client extends ContractClient {
416
+ readonly options: ContractClientOptions;
417
+ constructor(options: ContractClientOptions);
418
+ readonly fromJSON: {
419
+ initialize: (json: string) => AssembledTransaction<null>;
420
+ set_contract_addrs: (json: string) => AssembledTransaction<null>;
421
+ drawdown: (json: string) => AssembledTransaction<bigint>;
422
+ make_payment: (json: string) => AssembledTransaction<readonly [bigint, boolean]>;
423
+ make_principal_payment: (json: string) => AssembledTransaction<readonly [bigint, boolean]>;
424
+ upgrade: (json: string) => AssembledTransaction<null>;
425
+ get_due_info: (json: string) => AssembledTransaction<readonly [CreditRecord, DueDetail]>;
426
+ get_next_bill_refresh_date: (json: string) => AssembledTransaction<bigint>;
427
+ get_amt_available_for_drawdown: (json: string) => AssembledTransaction<bigint>;
428
+ };
429
+ }
@@ -0,0 +1,119 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
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
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Client = exports.Errors = exports.networks = exports.rpc = exports.contract = void 0;
30
+ const buffer_1 = require("buffer");
31
+ const contract_1 = require("@stellar/stellar-sdk/contract");
32
+ __exportStar(require("@stellar/stellar-sdk"), exports);
33
+ exports.contract = __importStar(require("@stellar/stellar-sdk/contract"));
34
+ exports.rpc = __importStar(require("@stellar/stellar-sdk/rpc"));
35
+ if (typeof window !== "undefined") {
36
+ //@ts-ignore Buffer exists
37
+ window.Buffer = window.Buffer || buffer_1.Buffer;
38
+ }
39
+ exports.networks = {
40
+ unknown: {
41
+ networkPassphrase: "Public Global Stellar Network ; September 2015",
42
+ contractId: "CANCNGJEAAN4GS6WVI3OAFWD2IAJW6WMI7TOD4UHC623QTDMD3LVTN3G",
43
+ },
44
+ };
45
+ exports.Errors = {
46
+ 601: { message: "BorrowerOrSentinelRequired" },
47
+ 602: { message: "AttemptedDrawdownOnNonRevolvingCredit" },
48
+ 603: { message: "CreditLimitExceeded" },
49
+ 604: { message: "DrawdownNotAllowedInFinalPeriodAndBeyond" },
50
+ 605: { message: "InsufficientPoolBalanceForDrawdown" },
51
+ 606: { message: "FirstDrawdownTooEarly" },
52
+ 607: { message: "CreditNotInStateForDrawdown" },
53
+ 608: { message: "DrawdownNotAllowedAfterDueDateWithUnpaidDue" },
54
+ 609: { message: "CreditNotInStateForMakingPayment" },
55
+ 610: { message: "CreditNotInStateForMakingPrincipalPayment" },
56
+ 801: { message: "StartDateLaterThanEndDate" },
57
+ 1: { message: "AlreadyInitialized" },
58
+ 2: { message: "ProtocolIsPausedOrPoolIsNotOn" },
59
+ 3: { message: "PoolOwnerOrHumaOwnerRequired" },
60
+ 4: { message: "PoolOperatorRequired" },
61
+ 5: { message: "AuthorizedContractCallerRequired" },
62
+ 6: { message: "UnsupportedFunction" },
63
+ 7: { message: "ZeroAmountProvided" },
64
+ 221: { message: "BorrowAmountLessThanPlatformFees" },
65
+ };
66
+ class Client extends contract_1.Client {
67
+ options;
68
+ constructor(options) {
69
+ super(new contract_1.Spec([
70
+ "AAAAAQAAAAAAAAAAAAAAG0NyZWRpdEFkZHJlc3Nlc0NoYW5nZWRFdmVudAAAAAADAAAAAAAAAA5jcmVkaXRfc3RvcmFnZQAAAAAAEwAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABM=",
71
+ "AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAADAAAAAAAAAAAAAAAEUG9vbAAAAAAAAAAAAAAAC1Bvb2xTdG9yYWdlAAAAAAAAAAAAAAAADUNyZWRpdFN0b3JhZ2UAAAA=",
72
+ "AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAwAAAAAAAAAEcG9vbAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABMAAAAAAAAADmNyZWRpdF9zdG9yYWdlAAAAAAATAAAAAA==",
73
+ "AAAAAAAAAAAAAAASc2V0X2NvbnRyYWN0X2FkZHJzAAAAAAAEAAAAAAAAAAZjYWxsZXIAAAAAABMAAAAAAAAADHBvb2xfc3RvcmFnZQAAABMAAAAAAAAABHBvb2wAAAATAAAAAAAAAA5jcmVkaXRfc3RvcmFnZQAAAAAAEwAAAAA=",
74
+ "AAAAAAAAAAAAAAAIZHJhd2Rvd24AAAACAAAAAAAAAAhib3Jyb3dlcgAAABMAAAAAAAAABmFtb3VudAAAAAAACgAAAAEAAAAK",
75
+ "AAAAAAAAAAAAAAAMbWFrZV9wYXltZW50AAAAAwAAAAAAAAAGY2FsbGVyAAAAAAATAAAAAAAAAAhib3Jyb3dlcgAAABMAAAAAAAAABmFtb3VudAAAAAAACgAAAAEAAAPtAAAAAgAAAAoAAAAB",
76
+ "AAAAAAA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VjdHVyZQAAAAQAAAAAAAAAFWZyb250X2xvYWRpbmdfZmVlX2JwcwAAAAAAAAQAAAAAAAAAFmZyb250X2xvYWRpbmdfZmVlX2ZsYXQAAAAAAAoAAAAAAAAADGxhdGVfZmVlX2JwcwAAAAQAAAAAAAAACXlpZWxkX2JwcwAAAAAAAAQ=",
99
+ "AAAAAgAAAAAAAAAAAAAAClBvb2xTdGF0dXMAAAAAAAMAAAAAAAAAAAAAAANPZmYAAAAAAAAAAAAAAAACT24AAAAAAAAAAAAAAAAABkNsb3NlZAAA",
100
+ "AAAAAQAAAAAAAAAAAAAABUVwb2NoAAAAAAAAAgAAAAAAAAAIZW5kX3RpbWUAAAAGAAAAAAAAAAJpZAAAAAAABg==",
101
+ "AAAAAQAAAAAAAAAAAAAACEFkbWluUm5SAAAABAAAAAAAAAAVbGlxdWlkaXR5X3JhdGVfYnBzX2VhAAAAAAAABAAAAAAAAAAdbGlxdWlkaXR5X3JhdGVfYnBzX3Bvb2xfb3duZXIAAAAAAAAEAAAAAAAAABJyZXdhcmRfcmF0ZV9icHNfZWEAAAAAAAQAAAAAAAAAGnJld2FyZF9yYXRlX2Jwc19wb29sX293bmVyAAAAAAAE",
102
+ "AAAAAQAAAAAAAAAAAAAAEFRyYW5jaGVBZGRyZXNzZXMAAAABAAAAAAAAAAVhZGRycwAAAAAAA+oAAAPoAAAAEw==",
103
+ "AAAAAQAAAAAAAAAAAAAADVRyYW5jaGVBc3NldHMAAAAAAAABAAAAAAAAAAZhc3NldHMAAAAAA+oAAAAK",
104
+ ]), options);
105
+ this.options = options;
106
+ }
107
+ fromJSON = {
108
+ initialize: (this.txFromJSON),
109
+ set_contract_addrs: (this.txFromJSON),
110
+ drawdown: (this.txFromJSON),
111
+ make_payment: (this.txFromJSON),
112
+ make_principal_payment: (this.txFromJSON),
113
+ upgrade: (this.txFromJSON),
114
+ get_due_info: (this.txFromJSON),
115
+ get_next_bill_refresh_date: (this.txFromJSON),
116
+ get_amt_available_for_drawdown: (this.txFromJSON),
117
+ };
118
+ }
119
+ exports.Client = Client;