@huma-finance/soroban-credit-storage 0.0.8-beta.2

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 ADDED
@@ -0,0 +1,54 @@
1
+ # tb-creditStorage JS
2
+
3
+ JS library for interacting with [Soroban](https://soroban.stellar.org/) smart contract `tb-creditStorage` via Soroban RPC.
4
+
5
+ This library was automatically generated by Soroban CLI using a command similar to:
6
+
7
+ ```bash
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 CCQMDMB2J6XRPZKG4QYNSXNN6W56HH5QCQXM6MDIW7ZEJRYSLL2ZEG2U \
12
+ --output-dir ./path/to/tb-creditStorage
13
+ ```
14
+
15
+ The network passphrase and contract ID are exported from [index.ts](./src/index.ts) in the `networks` constant. If you are the one who generated this library and you know that this contract is also deployed to other networks, feel free to update `networks` with other valid options. This will help your contract consumers use this library more easily.
16
+
17
+ # To publish or not to publish
18
+
19
+ This library is suitable for publishing to NPM. You can publish it to NPM using the `npm publish` command.
20
+
21
+ But you don't need to publish this library to NPM to use it. You can add it to your project's `package.json` using a file path:
22
+
23
+ ```json
24
+ "dependencies": {
25
+ "tb-creditStorage": "./path/to/this/folder"
26
+ }
27
+ ```
28
+
29
+ However, we've actually encountered [frustration](https://github.com/stellar/soroban-example-dapp/pull/117#discussion_r1232873560) using local libraries with NPM in this way. Though it seems a bit messy, we suggest generating the library directly to your `node_modules` folder automatically after each install by using a `postinstall` script. We've had the least trouble with this approach. NPM will automatically remove what it sees as erroneous directories during the `install` step, and then regenerate them when it gets to your `postinstall` step, which will keep the library up-to-date with your contract.
30
+
31
+ ```json
32
+ "scripts": {
33
+ "postinstall": "soroban contract bindings ts --rpc-url https://soroban-testnet.stellar.org:443 --network-passphrase \"Test SDF Network ; September 2015\" --id CCQMDMB2J6XRPZKG4QYNSXNN6W56HH5QCQXM6MDIW7ZEJRYSLL2ZEG2U --name tb-creditStorage"
34
+ }
35
+ ```
36
+
37
+ Obviously you need to adjust the above command based on the actual command you used to generate the library.
38
+
39
+ # Use it
40
+
41
+ Now that you have your library up-to-date and added to your project, you can import it in a file and see inline documentation for all of its exported methods:
42
+
43
+ ```js
44
+ import { Contract, networks } from "tb-creditStorage"
45
+
46
+ const contract = new Contract({
47
+ ...networks.futurenet, // for example; check which networks this library exports
48
+ rpcUrl: '...', // use your own, or find one for testing at https://soroban.stellar.org/docs/reference/rpc#public-rpc-providers
49
+ })
50
+
51
+ contract.|
52
+ ```
53
+
54
+ As long as your editor is configured to show JavaScript/TypeScript documentation, you can pause your typing at that `|` to get a list of all exports and inline-documentation for each. It exports a separate [async](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) function for each method in the smart contract, with documentation for each generated from the comments the contract's author included in the original source code.
@@ -0,0 +1,342 @@
1
+ /// <reference types="node" />
2
+ import { Buffer } from 'buffer';
3
+ import { AssembledTransaction, ContractClient, ContractClientOptions } from '@stellar/stellar-sdk/lib/contract_client/index.js';
4
+ import type { u32, u64, u128 } from '@stellar/stellar-sdk/lib/contract_client';
5
+ export * from '@stellar/stellar-sdk';
6
+ export * from '@stellar/stellar-sdk/lib/contract_client/index.js';
7
+ export * from '@stellar/stellar-sdk/lib/rust_types/index.js';
8
+ export declare const networks: {
9
+ readonly testnet: {
10
+ readonly networkPassphrase: "Test SDF Network ; September 2015";
11
+ readonly contractId: "CCQMDMB2J6XRPZKG4QYNSXNN6W56HH5QCQXM6MDIW7ZEJRYSLL2ZEG2U";
12
+ };
13
+ };
14
+ export type ClientDataKey = {
15
+ tag: 'Credit';
16
+ values: void;
17
+ } | {
18
+ tag: 'CreditManager';
19
+ values: void;
20
+ };
21
+ export declare const Errors: {
22
+ 77: {
23
+ message: string;
24
+ };
25
+ };
26
+ export type CreditDataKey = {
27
+ tag: 'CreditConfig';
28
+ values: readonly [Buffer];
29
+ } | {
30
+ tag: 'CreditRecord';
31
+ values: readonly [Buffer];
32
+ } | {
33
+ tag: 'DueDetail';
34
+ values: readonly [Buffer];
35
+ } | {
36
+ tag: 'Borrower';
37
+ values: readonly [Buffer];
38
+ };
39
+ export type PayPeriodDuration = {
40
+ tag: 'Monthly';
41
+ values: void;
42
+ } | {
43
+ tag: 'Quarterly';
44
+ values: void;
45
+ } | {
46
+ tag: 'SemiAnnually';
47
+ values: void;
48
+ };
49
+ export type CreditState = {
50
+ tag: 'Deleted';
51
+ values: void;
52
+ } | {
53
+ tag: 'Approved';
54
+ values: void;
55
+ } | {
56
+ tag: 'GoodStanding';
57
+ values: void;
58
+ } | {
59
+ tag: 'Delayed';
60
+ values: void;
61
+ } | {
62
+ tag: 'Defaulted';
63
+ values: void;
64
+ };
65
+ /**
66
+ * `CreditConfig` keeps track of the static settings of a credit.
67
+ * A `CreditConfig` is created after the approval of each credit.
68
+ * # Fields:
69
+ * * `credit_limit` - The maximum amount that can be borrowed.
70
+ * * `committed_amount` - The amount that the borrower has committed to use. If the used credit
71
+ * is less than this amount, the borrower will be charged yield using this amount.
72
+ * * `pay_period_duration` - The duration of each pay period, e.g., monthly, quarterly, or semi-annually.
73
+ * * `num_of_periods` - The number of periods before the credit expires.
74
+ * * `yield_bps` - The expected yield expressed in basis points, where 1% is 100, and 100% is 10,000. It means different things
75
+ * for different credit types:
76
+ * 1. For credit line, it is APR.
77
+ * 2. For factoring, it is factoring fee for the given period.
78
+ * 3. For dynamic yield credit, it is the estimated APY.
79
+ * * `revolving` - A flag indicating if repeated borrowing is allowed.
80
+ */
81
+ export interface CreditConfig {
82
+ committed_amount: u128;
83
+ credit_limit: u128;
84
+ num_periods: u32;
85
+ pay_period_duration: PayPeriodDuration;
86
+ revolving: boolean;
87
+ yield_bps: u32;
88
+ }
89
+ export interface CreditRecord {
90
+ missed_periods: u32;
91
+ next_due: u128;
92
+ next_due_date: u64;
93
+ remaining_periods: u32;
94
+ state: CreditState;
95
+ total_past_due: u128;
96
+ unbilled_principal: u128;
97
+ yield_due: u128;
98
+ }
99
+ export interface DueDetail {
100
+ accrued: u128;
101
+ committed: u128;
102
+ late_fee: u128;
103
+ late_fee_updated_date: u64;
104
+ paid: u128;
105
+ principal_past_due: u128;
106
+ yield_past_due: u128;
107
+ }
108
+ export interface Client {
109
+ /**
110
+ * 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.
111
+ */
112
+ initialize: ({ credit, credit_manager }: {
113
+ credit: string;
114
+ credit_manager: string;
115
+ }, options?: {
116
+ /**
117
+ * The fee to pay for the transaction. Default: BASE_FEE
118
+ */
119
+ fee?: number;
120
+ /**
121
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
122
+ */
123
+ timeoutInSeconds?: number;
124
+ /**
125
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
126
+ */
127
+ simulate?: boolean;
128
+ }) => Promise<AssembledTransaction<null>>;
129
+ /**
130
+ * Construct and simulate a set_credit_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.
131
+ */
132
+ set_credit_config: ({ credit_hash, cc }: {
133
+ credit_hash: Buffer;
134
+ cc: CreditConfig;
135
+ }, options?: {
136
+ /**
137
+ * The fee to pay for the transaction. Default: BASE_FEE
138
+ */
139
+ fee?: number;
140
+ /**
141
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
142
+ */
143
+ timeoutInSeconds?: number;
144
+ /**
145
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
146
+ */
147
+ simulate?: boolean;
148
+ }) => Promise<AssembledTransaction<null>>;
149
+ /**
150
+ * Construct and simulate a set_credit_record 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.
151
+ */
152
+ set_credit_record: ({ caller, credit_hash, cr, }: {
153
+ caller: string;
154
+ credit_hash: Buffer;
155
+ cr: CreditRecord;
156
+ }, options?: {
157
+ /**
158
+ * The fee to pay for the transaction. Default: BASE_FEE
159
+ */
160
+ fee?: number;
161
+ /**
162
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
163
+ */
164
+ timeoutInSeconds?: number;
165
+ /**
166
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
167
+ */
168
+ simulate?: boolean;
169
+ }) => Promise<AssembledTransaction<null>>;
170
+ /**
171
+ * Construct and simulate a set_due_detail 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.
172
+ */
173
+ set_due_detail: ({ caller, credit_hash, dd, }: {
174
+ caller: string;
175
+ credit_hash: Buffer;
176
+ dd: DueDetail;
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_borrower 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_borrower: ({ credit_hash, addr }: {
195
+ credit_hash: Buffer;
196
+ addr: string;
197
+ }, options?: {
198
+ /**
199
+ * The fee to pay for the transaction. Default: BASE_FEE
200
+ */
201
+ fee?: number;
202
+ /**
203
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
204
+ */
205
+ timeoutInSeconds?: number;
206
+ /**
207
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
208
+ */
209
+ simulate?: boolean;
210
+ }) => Promise<AssembledTransaction<null>>;
211
+ /**
212
+ * Construct and simulate a get_credit_hash 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.
213
+ */
214
+ get_credit_hash: ({ borrower }: {
215
+ borrower: string;
216
+ }, options?: {
217
+ /**
218
+ * The fee to pay for the transaction. Default: BASE_FEE
219
+ */
220
+ fee?: number;
221
+ /**
222
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
223
+ */
224
+ timeoutInSeconds?: number;
225
+ /**
226
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
227
+ */
228
+ simulate?: boolean;
229
+ }) => Promise<AssembledTransaction<Buffer>>;
230
+ /**
231
+ * Construct and simulate a get_credit_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.
232
+ */
233
+ get_credit_config: ({ credit_hash }: {
234
+ credit_hash: Buffer;
235
+ }, options?: {
236
+ /**
237
+ * The fee to pay for the transaction. Default: BASE_FEE
238
+ */
239
+ fee?: number;
240
+ /**
241
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
242
+ */
243
+ timeoutInSeconds?: number;
244
+ /**
245
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
246
+ */
247
+ simulate?: boolean;
248
+ }) => Promise<AssembledTransaction<CreditConfig>>;
249
+ /**
250
+ * Construct and simulate a get_credit_record 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.
251
+ */
252
+ get_credit_record: ({ credit_hash }: {
253
+ credit_hash: Buffer;
254
+ }, options?: {
255
+ /**
256
+ * The fee to pay for the transaction. Default: BASE_FEE
257
+ */
258
+ fee?: number;
259
+ /**
260
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
261
+ */
262
+ timeoutInSeconds?: number;
263
+ /**
264
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
265
+ */
266
+ simulate?: boolean;
267
+ }) => Promise<AssembledTransaction<CreditRecord>>;
268
+ /**
269
+ * Construct and simulate a get_due_detail 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.
270
+ */
271
+ get_due_detail: ({ credit_hash }: {
272
+ credit_hash: Buffer;
273
+ }, options?: {
274
+ /**
275
+ * The fee to pay for the transaction. Default: BASE_FEE
276
+ */
277
+ fee?: number;
278
+ /**
279
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
280
+ */
281
+ timeoutInSeconds?: number;
282
+ /**
283
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
284
+ */
285
+ simulate?: boolean;
286
+ }) => Promise<AssembledTransaction<DueDetail>>;
287
+ /**
288
+ * Construct and simulate a get_borrower 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.
289
+ */
290
+ get_borrower: ({ credit_hash }: {
291
+ credit_hash: Buffer;
292
+ }, options?: {
293
+ /**
294
+ * The fee to pay for the transaction. Default: BASE_FEE
295
+ */
296
+ fee?: number;
297
+ /**
298
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
299
+ */
300
+ timeoutInSeconds?: number;
301
+ /**
302
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
303
+ */
304
+ simulate?: boolean;
305
+ }) => Promise<AssembledTransaction<string>>;
306
+ /**
307
+ * Construct and simulate a require_borrower 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.
308
+ */
309
+ require_borrower: ({ borrower }: {
310
+ borrower: string;
311
+ }, options?: {
312
+ /**
313
+ * The fee to pay for the transaction. Default: BASE_FEE
314
+ */
315
+ fee?: number;
316
+ /**
317
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
318
+ */
319
+ timeoutInSeconds?: number;
320
+ /**
321
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
322
+ */
323
+ simulate?: boolean;
324
+ }) => Promise<AssembledTransaction<Buffer>>;
325
+ }
326
+ export declare class Client extends ContractClient {
327
+ readonly options: ContractClientOptions;
328
+ constructor(options: ContractClientOptions);
329
+ readonly fromJSON: {
330
+ initialize: (json: string) => AssembledTransaction<null>;
331
+ set_credit_config: (json: string) => AssembledTransaction<null>;
332
+ set_credit_record: (json: string) => AssembledTransaction<null>;
333
+ set_due_detail: (json: string) => AssembledTransaction<null>;
334
+ set_borrower: (json: string) => AssembledTransaction<null>;
335
+ get_credit_hash: (json: string) => AssembledTransaction<Buffer>;
336
+ get_credit_config: (json: string) => AssembledTransaction<CreditConfig>;
337
+ get_credit_record: (json: string) => AssembledTransaction<CreditRecord>;
338
+ get_due_detail: (json: string) => AssembledTransaction<DueDetail>;
339
+ get_borrower: (json: string) => AssembledTransaction<string>;
340
+ require_borrower: (json: string) => AssembledTransaction<Buffer>;
341
+ };
342
+ }
@@ -0,0 +1,79 @@
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.Errors = 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: 'CCQMDMB2J6XRPZKG4QYNSXNN6W56HH5QCQXM6MDIW7ZEJRYSLL2ZEG2U',
32
+ },
33
+ };
34
+ exports.Errors = {
35
+ 77: { message: '' },
36
+ };
37
+ class Client extends index_js_1.ContractClient {
38
+ options;
39
+ constructor(options) {
40
+ super(new stellar_sdk_1.ContractSpec([
41
+ 'AAAAAgAAAAAAAAAAAAAADUNsaWVudERhdGFLZXkAAAAAAAACAAAAAAAAAAAAAAAGQ3JlZGl0AAAAAAAAAAAAAAAAAA1DcmVkaXRNYW5hZ2VyAAAA',
42
+ 'AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAAAgAAAAAAAAAGY3JlZGl0AAAAAAATAAAAAAAAAA5jcmVkaXRfbWFuYWdlcgAAAAAAEwAAAAA=',
43
+ 'AAAAAAAAAAAAAAARc2V0X2NyZWRpdF9jb25maWcAAAAAAAACAAAAAAAAAAtjcmVkaXRfaGFzaAAAAAPuAAAAIAAAAAAAAAACY2MAAAAAB9AAAAAMQ3JlZGl0Q29uZmlnAAAAAA==',
44
+ 'AAAAAAAAAAAAAAARc2V0X2NyZWRpdF9yZWNvcmQAAAAAAAADAAAAAAAAAAZjYWxsZXIAAAAAABMAAAAAAAAAC2NyZWRpdF9oYXNoAAAAA+4AAA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gYm9ycm93aW5nIGlzIGFsbG93ZWQuAAAAAAAAAAAMQ3JlZGl0Q29uZmlnAAAABgAAAAAAAAAQY29tbWl0dGVkX2Ftb3VudAAAAAoAAAAAAAAADGNyZWRpdF9saW1pdAAAAAoAAAAAAAAAC251bV9wZXJpb2RzAAAAAAQAAAAAAAAAE3BheV9wZXJpb2RfZHVyYXRpb24AAAAH0AAAABFQYXlQZXJpb2REdXJhdGlvbgAAAAAAAAAAAAAJcmV2b2x2aW5nAAAAAAAAAQAAAAAAAAAJeWllbGRfYnBzAAAAAAAABA==',
60
+ 'AAAAAQAAAAAAAAAAAAAADENyZWRpdFJlY29yZAAAAAgAAAAAAAAADm1pc3NlZF9wZXJpb2RzAAAAAAAEAAAAAAAAAAhuZXh0X2R1ZQAAAAoAAAAAAAAADW5leHRfZHVlX2RhdGUAAAAAAAAGAAAAAAAAABFyZW1haW5pbmdfcGVyaW9kcwAAAAAAAAQAAAAAAAAABXN0YXRlAAAAAAAH0AAAAAtDcmVkaXRTdGF0ZQAAAAAAAAAADnRvdGFsX3Bhc3RfZHVlAAAAAAAKAAAAAAAAABJ1bmJpbGxlZF9wcmluY2lwYWwAAAAAAAoAAAAAAAAACXlpZWxkX2R1ZQAAAAAAAAo=',
61
+ 'AAAAAQAAAAAAAAAAAAAACUR1ZURldGFpbAAAAAAAAAcAAAAAAAAAB2FjY3J1ZWQAAAAACgAAAAAAAAAJY29tbWl0dGVkAAAAAAAACgAAAAAAAAAIbGF0ZV9mZWUAAAAKAAAAAAAAABVsYXRlX2ZlZV91cGRhdGVkX2RhdGUAAAAAAAAGAAAAAAAAAARwYWlkAAAACgAAAAAAAAAScHJpbmNpcGFsX3Bhc3RfZHVlAAAAAAAKAAAAAAAAAA55aWVsZF9wYXN0X2R1ZQAAAAAACg==',
62
+ ]), options);
63
+ this.options = options;
64
+ }
65
+ fromJSON = {
66
+ initialize: (this.txFromJSON),
67
+ set_credit_config: (this.txFromJSON),
68
+ set_credit_record: (this.txFromJSON),
69
+ set_due_detail: (this.txFromJSON),
70
+ set_borrower: (this.txFromJSON),
71
+ get_credit_hash: (this.txFromJSON),
72
+ get_credit_config: (this.txFromJSON),
73
+ get_credit_record: (this.txFromJSON),
74
+ get_due_detail: (this.txFromJSON),
75
+ get_borrower: (this.txFromJSON),
76
+ require_borrower: (this.txFromJSON),
77
+ };
78
+ }
79
+ exports.Client = Client;