@huma-finance/soroban-tranche-vault 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 +54 -0
- package/dist/cjs/index.d.ts +940 -0
- package/dist/cjs/index.js +153 -0
- package/dist/esm/index.d.ts +940 -0
- package/dist/esm/index.js +135 -0
- package/dist/esm/package.json +1 -0
- package/dist/scripts/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/scripts/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/scripts/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +940 -0
- package/package.json +25 -0
- package/scripts/build.mjs +37 -0
- package/scripts/tsconfig.cjs.json +7 -0
- package/scripts/tsconfig.esm.json +7 -0
- package/scripts/tsconfig.types.json +8 -0
- package/src/index.ts +1130 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,940 @@
|
|
|
1
|
+
import { AssembledTransaction, ContractClient, ContractClientOptions } from '@stellar/stellar-sdk/lib/contract_client/index.js';
|
|
2
|
+
import type { u32, u64, u128, i128, Option } from '@stellar/stellar-sdk/lib/contract_client';
|
|
3
|
+
export * from '@stellar/stellar-sdk';
|
|
4
|
+
export * from '@stellar/stellar-sdk/lib/contract_client/index.js';
|
|
5
|
+
export * from '@stellar/stellar-sdk/lib/rust_types/index.js';
|
|
6
|
+
export declare const networks: {
|
|
7
|
+
readonly testnet: {
|
|
8
|
+
readonly networkPassphrase: "Test SDF Network ; September 2015";
|
|
9
|
+
readonly contractId: "CDXI5L5EFHBW3KYY3D6JGXJTGDOG5EZAQUDAK5LWZQVH4TEUDAO7PBGU";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type ClientDataKey = {
|
|
13
|
+
tag: 'Pool';
|
|
14
|
+
values: void;
|
|
15
|
+
} | {
|
|
16
|
+
tag: 'PoolManager';
|
|
17
|
+
values: void;
|
|
18
|
+
} | {
|
|
19
|
+
tag: 'PoolStorage';
|
|
20
|
+
values: void;
|
|
21
|
+
} | {
|
|
22
|
+
tag: 'UnderlyingToken';
|
|
23
|
+
values: void;
|
|
24
|
+
};
|
|
25
|
+
export declare const Errors: {
|
|
26
|
+
1: {
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
2: {
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
32
|
+
21: {
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
22: {
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
23: {
|
|
39
|
+
message: string;
|
|
40
|
+
};
|
|
41
|
+
51: {
|
|
42
|
+
message: string;
|
|
43
|
+
};
|
|
44
|
+
52: {
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
81: {
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
82: {
|
|
51
|
+
message: string;
|
|
52
|
+
};
|
|
53
|
+
83: {
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
84: {
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
85: {
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
86: {
|
|
63
|
+
message: string;
|
|
64
|
+
};
|
|
65
|
+
101: {
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export type DataKey = {
|
|
70
|
+
tag: 'Balance';
|
|
71
|
+
values: readonly [string];
|
|
72
|
+
} | {
|
|
73
|
+
tag: 'TotalSupply';
|
|
74
|
+
values: void;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* An epoch has been processed.
|
|
78
|
+
* # Fields:
|
|
79
|
+
* * `epoch_id` - The epoch ID.
|
|
80
|
+
* * `shares_requested` - The number of tranche shares that were requested for redemption.
|
|
81
|
+
* * `shares_processed` - The number of tranche shares that have been redeemed.
|
|
82
|
+
* * `amount_processed` - The amount of the underlying pool asset token redeemed in this epoch.
|
|
83
|
+
*/
|
|
84
|
+
export interface EpochProcessedEvent {
|
|
85
|
+
amount_processed: u128;
|
|
86
|
+
epoch_id: u64;
|
|
87
|
+
shares_processed: u128;
|
|
88
|
+
shares_requested: u128;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A lender has been added.
|
|
92
|
+
* # Fields:
|
|
93
|
+
* * `account` - The address of the lender.
|
|
94
|
+
*/
|
|
95
|
+
export interface LenderAddedEvent {
|
|
96
|
+
account: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A lender has been removed.
|
|
100
|
+
* # Fields:
|
|
101
|
+
* * `account` - The address of the lender.
|
|
102
|
+
*/
|
|
103
|
+
export interface LenderRemovedEvent {
|
|
104
|
+
account: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A deposit has been made to the tranche.
|
|
108
|
+
* # Fields:
|
|
109
|
+
* * `sender` - The address that made the deposit.
|
|
110
|
+
* * `assets` - The amount measured in the underlying asset.
|
|
111
|
+
* * `shares` - The number of shares minted for this deposit.
|
|
112
|
+
*/
|
|
113
|
+
export interface LiquidityDepositedEvent {
|
|
114
|
+
assets: u128;
|
|
115
|
+
sender: string;
|
|
116
|
+
shares: u128;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A disbursement to the lender for a processed redemption.
|
|
120
|
+
* # Fields:
|
|
121
|
+
* * `account` - The account whose shares have been redeemed.
|
|
122
|
+
* * `amount_disbursed` - The amount of the disbursement.
|
|
123
|
+
*/
|
|
124
|
+
export interface LenderFundDisbursedEvent {
|
|
125
|
+
account: string;
|
|
126
|
+
amount_disbursed: u128;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A lender has withdrawn all their assets after pool closure.
|
|
130
|
+
* # Fields:
|
|
131
|
+
* * `account` - The lender who has withdrawn.
|
|
132
|
+
* * `shares` - The number of shares burned.
|
|
133
|
+
* * `assets` - The amount that was withdrawn.
|
|
134
|
+
*/
|
|
135
|
+
export interface LenderFundWithdrawnEvent {
|
|
136
|
+
account: string;
|
|
137
|
+
assets: u128;
|
|
138
|
+
shares: u128;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* A redemption request has been added.
|
|
142
|
+
* # Fields:
|
|
143
|
+
* * `epoch_id` - The epoch ID.
|
|
144
|
+
* * `account` - The account whose shares to be redeemed.
|
|
145
|
+
* * `shares` - The number of shares to be redeemed.
|
|
146
|
+
*/
|
|
147
|
+
export interface RedemptionRequestAddedEvent {
|
|
148
|
+
account: string;
|
|
149
|
+
epoch_id: u64;
|
|
150
|
+
shares: u128;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A redemption request has been canceled.
|
|
154
|
+
* # Fields:
|
|
155
|
+
* * `epoch_id` - The epoch ID.
|
|
156
|
+
* * `account` - The account whose request to be canceled.
|
|
157
|
+
* * `shares` - The number of shares to be included in the cancellation.
|
|
158
|
+
*/
|
|
159
|
+
export interface RedemptionRequestCanceledEvent {
|
|
160
|
+
account: string;
|
|
161
|
+
epoch_id: u64;
|
|
162
|
+
shares: u128;
|
|
163
|
+
}
|
|
164
|
+
export type TrancheVaultDataKey = {
|
|
165
|
+
tag: 'TrancheIndex';
|
|
166
|
+
values: void;
|
|
167
|
+
} | {
|
|
168
|
+
tag: 'ApprovedLender';
|
|
169
|
+
values: readonly [string];
|
|
170
|
+
} | {
|
|
171
|
+
tag: 'DepositRecord';
|
|
172
|
+
values: readonly [string];
|
|
173
|
+
} | {
|
|
174
|
+
tag: 'LenderRedemptionRecord';
|
|
175
|
+
values: readonly [string];
|
|
176
|
+
} | {
|
|
177
|
+
tag: 'EpochRedemptionSummary';
|
|
178
|
+
values: readonly [u64];
|
|
179
|
+
};
|
|
180
|
+
export interface DepositRecord {
|
|
181
|
+
last_deposit_time: u64;
|
|
182
|
+
principal: u128;
|
|
183
|
+
}
|
|
184
|
+
export interface LenderRedemptionRecord {
|
|
185
|
+
next_epoch_id_to_process: u64;
|
|
186
|
+
num_shares_requested: u128;
|
|
187
|
+
principal_requested: u128;
|
|
188
|
+
total_amount_processed: u128;
|
|
189
|
+
total_amount_withdrawn: u128;
|
|
190
|
+
}
|
|
191
|
+
export type PayPeriodDuration = {
|
|
192
|
+
tag: 'Monthly';
|
|
193
|
+
values: void;
|
|
194
|
+
} | {
|
|
195
|
+
tag: 'Quarterly';
|
|
196
|
+
values: void;
|
|
197
|
+
} | {
|
|
198
|
+
tag: 'SemiAnnually';
|
|
199
|
+
values: void;
|
|
200
|
+
};
|
|
201
|
+
export interface PoolSettings {
|
|
202
|
+
default_grace_period_days: u32;
|
|
203
|
+
late_payment_grace_period_days: u32;
|
|
204
|
+
max_credit_line: u128;
|
|
205
|
+
min_deposit_amount: u128;
|
|
206
|
+
pay_period_duration: PayPeriodDuration;
|
|
207
|
+
principal_only_payment_allowed: boolean;
|
|
208
|
+
}
|
|
209
|
+
export interface LPConfig {
|
|
210
|
+
fixed_senior_yield_bps: u32;
|
|
211
|
+
liquidity_cap: u128;
|
|
212
|
+
max_senior_junior_ratio: u32;
|
|
213
|
+
tranches_risk_adjustment_bps: u32;
|
|
214
|
+
withdrawal_lockout_period_days: u32;
|
|
215
|
+
}
|
|
216
|
+
export interface FeeStructure {
|
|
217
|
+
front_loading_fee_bps: u32;
|
|
218
|
+
front_loading_fee_flat: u128;
|
|
219
|
+
late_fee_bps: u32;
|
|
220
|
+
yield_bps: u32;
|
|
221
|
+
}
|
|
222
|
+
export type PoolStatus = {
|
|
223
|
+
tag: 'Off';
|
|
224
|
+
values: void;
|
|
225
|
+
} | {
|
|
226
|
+
tag: 'On';
|
|
227
|
+
values: void;
|
|
228
|
+
} | {
|
|
229
|
+
tag: 'Closed';
|
|
230
|
+
values: void;
|
|
231
|
+
};
|
|
232
|
+
export interface CurrentEpoch {
|
|
233
|
+
end_time: u64;
|
|
234
|
+
id: u64;
|
|
235
|
+
}
|
|
236
|
+
export interface AdminRnR {
|
|
237
|
+
liquidity_rate_bps_ea: u32;
|
|
238
|
+
liquidity_rate_bps_pool_owner: u32;
|
|
239
|
+
reward_rate_bps_ea: u32;
|
|
240
|
+
reward_rate_bps_pool_owner: u32;
|
|
241
|
+
}
|
|
242
|
+
export interface TrancheAddresses {
|
|
243
|
+
addrs: Array<Option<string>>;
|
|
244
|
+
}
|
|
245
|
+
export interface TrancheAssets {
|
|
246
|
+
assets: Array<u128>;
|
|
247
|
+
}
|
|
248
|
+
export interface TokenMetadata {
|
|
249
|
+
decimal: u32;
|
|
250
|
+
name: string;
|
|
251
|
+
symbol: string;
|
|
252
|
+
}
|
|
253
|
+
export interface EpochRedemptionSummary {
|
|
254
|
+
epoch_id: u64;
|
|
255
|
+
total_amount_processed: u128;
|
|
256
|
+
total_shares_processed: u128;
|
|
257
|
+
total_shares_requested: u128;
|
|
258
|
+
}
|
|
259
|
+
export interface Client {
|
|
260
|
+
/**
|
|
261
|
+
* 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
|
+
*/
|
|
263
|
+
initialize: ({ name, symbol, underlying_token, pool, pool_storage, pool_manager, index, }: {
|
|
264
|
+
name: string;
|
|
265
|
+
symbol: string;
|
|
266
|
+
underlying_token: string;
|
|
267
|
+
pool: string;
|
|
268
|
+
pool_storage: string;
|
|
269
|
+
pool_manager: string;
|
|
270
|
+
index: u32;
|
|
271
|
+
}, options?: {
|
|
272
|
+
/**
|
|
273
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
274
|
+
*/
|
|
275
|
+
fee?: number;
|
|
276
|
+
/**
|
|
277
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
278
|
+
*/
|
|
279
|
+
timeoutInSeconds?: number;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
282
|
+
*/
|
|
283
|
+
simulate?: boolean;
|
|
284
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
285
|
+
/**
|
|
286
|
+
* Construct and simulate a add_approved_lender 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.
|
|
287
|
+
*/
|
|
288
|
+
add_approved_lender: ({ caller, lender }: {
|
|
289
|
+
caller: string;
|
|
290
|
+
lender: string;
|
|
291
|
+
}, options?: {
|
|
292
|
+
/**
|
|
293
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
294
|
+
*/
|
|
295
|
+
fee?: number;
|
|
296
|
+
/**
|
|
297
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
298
|
+
*/
|
|
299
|
+
timeoutInSeconds?: number;
|
|
300
|
+
/**
|
|
301
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
302
|
+
*/
|
|
303
|
+
simulate?: boolean;
|
|
304
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
305
|
+
/**
|
|
306
|
+
* Construct and simulate a remove_approved_lender 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.
|
|
307
|
+
*/
|
|
308
|
+
remove_approved_lender: ({ caller, lender }: {
|
|
309
|
+
caller: string;
|
|
310
|
+
lender: 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<null>>;
|
|
325
|
+
/**
|
|
326
|
+
* Construct and simulate a make_initial_deposit 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.
|
|
327
|
+
*/
|
|
328
|
+
make_initial_deposit: ({ caller, assets }: {
|
|
329
|
+
caller: string;
|
|
330
|
+
assets: u128;
|
|
331
|
+
}, options?: {
|
|
332
|
+
/**
|
|
333
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
334
|
+
*/
|
|
335
|
+
fee?: number;
|
|
336
|
+
/**
|
|
337
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
338
|
+
*/
|
|
339
|
+
timeoutInSeconds?: number;
|
|
340
|
+
/**
|
|
341
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
342
|
+
*/
|
|
343
|
+
simulate?: boolean;
|
|
344
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
345
|
+
/**
|
|
346
|
+
* Construct and simulate a deposit 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.
|
|
347
|
+
*/
|
|
348
|
+
deposit: ({ lender, assets }: {
|
|
349
|
+
lender: string;
|
|
350
|
+
assets: u128;
|
|
351
|
+
}, options?: {
|
|
352
|
+
/**
|
|
353
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
354
|
+
*/
|
|
355
|
+
fee?: number;
|
|
356
|
+
/**
|
|
357
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
358
|
+
*/
|
|
359
|
+
timeoutInSeconds?: number;
|
|
360
|
+
/**
|
|
361
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
362
|
+
*/
|
|
363
|
+
simulate?: boolean;
|
|
364
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
365
|
+
/**
|
|
366
|
+
* Construct and simulate a add_redemption_request 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.
|
|
367
|
+
*/
|
|
368
|
+
add_redemption_request: ({ lender, shares }: {
|
|
369
|
+
lender: string;
|
|
370
|
+
shares: u128;
|
|
371
|
+
}, options?: {
|
|
372
|
+
/**
|
|
373
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
374
|
+
*/
|
|
375
|
+
fee?: number;
|
|
376
|
+
/**
|
|
377
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
378
|
+
*/
|
|
379
|
+
timeoutInSeconds?: number;
|
|
380
|
+
/**
|
|
381
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
382
|
+
*/
|
|
383
|
+
simulate?: boolean;
|
|
384
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
385
|
+
/**
|
|
386
|
+
* Construct and simulate a cancel_redemption_request 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.
|
|
387
|
+
*/
|
|
388
|
+
cancel_redemption_request: ({ lender, shares }: {
|
|
389
|
+
lender: string;
|
|
390
|
+
shares: u128;
|
|
391
|
+
}, options?: {
|
|
392
|
+
/**
|
|
393
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
394
|
+
*/
|
|
395
|
+
fee?: number;
|
|
396
|
+
/**
|
|
397
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
398
|
+
*/
|
|
399
|
+
timeoutInSeconds?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
402
|
+
*/
|
|
403
|
+
simulate?: boolean;
|
|
404
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
405
|
+
/**
|
|
406
|
+
* Construct and simulate a disburse 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.
|
|
407
|
+
*/
|
|
408
|
+
disburse: ({ lender }: {
|
|
409
|
+
lender: string;
|
|
410
|
+
}, options?: {
|
|
411
|
+
/**
|
|
412
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
413
|
+
*/
|
|
414
|
+
fee?: number;
|
|
415
|
+
/**
|
|
416
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
417
|
+
*/
|
|
418
|
+
timeoutInSeconds?: number;
|
|
419
|
+
/**
|
|
420
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
421
|
+
*/
|
|
422
|
+
simulate?: boolean;
|
|
423
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
424
|
+
/**
|
|
425
|
+
* Construct and simulate a withdraw_after_pool_closure 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
|
+
*/
|
|
427
|
+
withdraw_after_pool_closure: ({ lender }: {
|
|
428
|
+
lender: string;
|
|
429
|
+
}, options?: {
|
|
430
|
+
/**
|
|
431
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
432
|
+
*/
|
|
433
|
+
fee?: number;
|
|
434
|
+
/**
|
|
435
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
436
|
+
*/
|
|
437
|
+
timeoutInSeconds?: number;
|
|
438
|
+
/**
|
|
439
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
440
|
+
*/
|
|
441
|
+
simulate?: boolean;
|
|
442
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
443
|
+
/**
|
|
444
|
+
* Construct and simulate a execute_redemption_summary 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.
|
|
445
|
+
*/
|
|
446
|
+
execute_redemption_summary: ({ summary }: {
|
|
447
|
+
summary: EpochRedemptionSummary;
|
|
448
|
+
}, options?: {
|
|
449
|
+
/**
|
|
450
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
451
|
+
*/
|
|
452
|
+
fee?: number;
|
|
453
|
+
/**
|
|
454
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
455
|
+
*/
|
|
456
|
+
timeoutInSeconds?: number;
|
|
457
|
+
/**
|
|
458
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
459
|
+
*/
|
|
460
|
+
simulate?: boolean;
|
|
461
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
462
|
+
/**
|
|
463
|
+
* Construct and simulate a cancellable_redemption_shares 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.
|
|
464
|
+
*/
|
|
465
|
+
cancellable_redemption_shares: ({ lender }: {
|
|
466
|
+
lender: string;
|
|
467
|
+
}, options?: {
|
|
468
|
+
/**
|
|
469
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
470
|
+
*/
|
|
471
|
+
fee?: number;
|
|
472
|
+
/**
|
|
473
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
474
|
+
*/
|
|
475
|
+
timeoutInSeconds?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
478
|
+
*/
|
|
479
|
+
simulate?: boolean;
|
|
480
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
481
|
+
/**
|
|
482
|
+
* Construct and simulate a withdrawable_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.
|
|
483
|
+
*/
|
|
484
|
+
withdrawable_assets: ({ lender }: {
|
|
485
|
+
lender: string;
|
|
486
|
+
}, options?: {
|
|
487
|
+
/**
|
|
488
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
489
|
+
*/
|
|
490
|
+
fee?: number;
|
|
491
|
+
/**
|
|
492
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
493
|
+
*/
|
|
494
|
+
timeoutInSeconds?: number;
|
|
495
|
+
/**
|
|
496
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
497
|
+
*/
|
|
498
|
+
simulate?: boolean;
|
|
499
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
500
|
+
/**
|
|
501
|
+
* Construct and simulate a get_latest_redemption_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.
|
|
502
|
+
*/
|
|
503
|
+
get_latest_redemption_record: ({ lender }: {
|
|
504
|
+
lender: string;
|
|
505
|
+
}, options?: {
|
|
506
|
+
/**
|
|
507
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
508
|
+
*/
|
|
509
|
+
fee?: number;
|
|
510
|
+
/**
|
|
511
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
512
|
+
*/
|
|
513
|
+
timeoutInSeconds?: number;
|
|
514
|
+
/**
|
|
515
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
516
|
+
*/
|
|
517
|
+
simulate?: boolean;
|
|
518
|
+
}) => Promise<AssembledTransaction<LenderRedemptionRecord>>;
|
|
519
|
+
/**
|
|
520
|
+
* Construct and simulate a total_supply 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.
|
|
521
|
+
*/
|
|
522
|
+
total_supply: (options?: {
|
|
523
|
+
/**
|
|
524
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
525
|
+
*/
|
|
526
|
+
fee?: number;
|
|
527
|
+
/**
|
|
528
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
529
|
+
*/
|
|
530
|
+
timeoutInSeconds?: number;
|
|
531
|
+
/**
|
|
532
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
533
|
+
*/
|
|
534
|
+
simulate?: boolean;
|
|
535
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
536
|
+
/**
|
|
537
|
+
* Construct and simulate a balance_of 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.
|
|
538
|
+
*/
|
|
539
|
+
balance_of: ({ account }: {
|
|
540
|
+
account: string;
|
|
541
|
+
}, options?: {
|
|
542
|
+
/**
|
|
543
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
544
|
+
*/
|
|
545
|
+
fee?: number;
|
|
546
|
+
/**
|
|
547
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
548
|
+
*/
|
|
549
|
+
timeoutInSeconds?: number;
|
|
550
|
+
/**
|
|
551
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
552
|
+
*/
|
|
553
|
+
simulate?: boolean;
|
|
554
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
555
|
+
/**
|
|
556
|
+
* Construct and simulate a total_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.
|
|
557
|
+
*/
|
|
558
|
+
total_assets: (options?: {
|
|
559
|
+
/**
|
|
560
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
561
|
+
*/
|
|
562
|
+
fee?: number;
|
|
563
|
+
/**
|
|
564
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
565
|
+
*/
|
|
566
|
+
timeoutInSeconds?: number;
|
|
567
|
+
/**
|
|
568
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
569
|
+
*/
|
|
570
|
+
simulate?: boolean;
|
|
571
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
572
|
+
/**
|
|
573
|
+
* Construct and simulate a total_assets_of 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.
|
|
574
|
+
*/
|
|
575
|
+
total_assets_of: ({ account }: {
|
|
576
|
+
account: string;
|
|
577
|
+
}, options?: {
|
|
578
|
+
/**
|
|
579
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
580
|
+
*/
|
|
581
|
+
fee?: number;
|
|
582
|
+
/**
|
|
583
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
584
|
+
*/
|
|
585
|
+
timeoutInSeconds?: number;
|
|
586
|
+
/**
|
|
587
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
588
|
+
*/
|
|
589
|
+
simulate?: boolean;
|
|
590
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
591
|
+
/**
|
|
592
|
+
* Construct and simulate a convert_to_shares 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.
|
|
593
|
+
*/
|
|
594
|
+
convert_to_shares: ({ assets }: {
|
|
595
|
+
assets: u128;
|
|
596
|
+
}, options?: {
|
|
597
|
+
/**
|
|
598
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
599
|
+
*/
|
|
600
|
+
fee?: number;
|
|
601
|
+
/**
|
|
602
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
603
|
+
*/
|
|
604
|
+
timeoutInSeconds?: number;
|
|
605
|
+
/**
|
|
606
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
607
|
+
*/
|
|
608
|
+
simulate?: boolean;
|
|
609
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
610
|
+
/**
|
|
611
|
+
* Construct and simulate a convert_to_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.
|
|
612
|
+
*/
|
|
613
|
+
convert_to_assets: ({ shares }: {
|
|
614
|
+
shares: u128;
|
|
615
|
+
}, options?: {
|
|
616
|
+
/**
|
|
617
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
618
|
+
*/
|
|
619
|
+
fee?: number;
|
|
620
|
+
/**
|
|
621
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
622
|
+
*/
|
|
623
|
+
timeoutInSeconds?: number;
|
|
624
|
+
/**
|
|
625
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
626
|
+
*/
|
|
627
|
+
simulate?: boolean;
|
|
628
|
+
}) => Promise<AssembledTransaction<u128>>;
|
|
629
|
+
/**
|
|
630
|
+
* Construct and simulate a is_approved_lender 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.
|
|
631
|
+
*/
|
|
632
|
+
is_approved_lender: ({ account }: {
|
|
633
|
+
account: string;
|
|
634
|
+
}, options?: {
|
|
635
|
+
/**
|
|
636
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
637
|
+
*/
|
|
638
|
+
fee?: number;
|
|
639
|
+
/**
|
|
640
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
641
|
+
*/
|
|
642
|
+
timeoutInSeconds?: number;
|
|
643
|
+
/**
|
|
644
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
645
|
+
*/
|
|
646
|
+
simulate?: boolean;
|
|
647
|
+
}) => Promise<AssembledTransaction<boolean>>;
|
|
648
|
+
/**
|
|
649
|
+
* Construct and simulate a get_deposit_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.
|
|
650
|
+
*/
|
|
651
|
+
get_deposit_record: ({ account }: {
|
|
652
|
+
account: string;
|
|
653
|
+
}, options?: {
|
|
654
|
+
/**
|
|
655
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
656
|
+
*/
|
|
657
|
+
fee?: number;
|
|
658
|
+
/**
|
|
659
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
660
|
+
*/
|
|
661
|
+
timeoutInSeconds?: number;
|
|
662
|
+
/**
|
|
663
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
664
|
+
*/
|
|
665
|
+
simulate?: boolean;
|
|
666
|
+
}) => Promise<AssembledTransaction<DepositRecord>>;
|
|
667
|
+
/**
|
|
668
|
+
* Construct and simulate a get_epoch_redemption_summary 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.
|
|
669
|
+
*/
|
|
670
|
+
get_epoch_redemption_summary: ({ epoch_id }: {
|
|
671
|
+
epoch_id: u64;
|
|
672
|
+
}, options?: {
|
|
673
|
+
/**
|
|
674
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
675
|
+
*/
|
|
676
|
+
fee?: number;
|
|
677
|
+
/**
|
|
678
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
679
|
+
*/
|
|
680
|
+
timeoutInSeconds?: number;
|
|
681
|
+
/**
|
|
682
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
683
|
+
*/
|
|
684
|
+
simulate?: boolean;
|
|
685
|
+
}) => Promise<AssembledTransaction<EpochRedemptionSummary>>;
|
|
686
|
+
/**
|
|
687
|
+
* Construct and simulate a get_redemption_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.
|
|
688
|
+
*/
|
|
689
|
+
get_redemption_record: ({ account }: {
|
|
690
|
+
account: string;
|
|
691
|
+
}, options?: {
|
|
692
|
+
/**
|
|
693
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
694
|
+
*/
|
|
695
|
+
fee?: number;
|
|
696
|
+
/**
|
|
697
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
698
|
+
*/
|
|
699
|
+
timeoutInSeconds?: number;
|
|
700
|
+
/**
|
|
701
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
702
|
+
*/
|
|
703
|
+
simulate?: boolean;
|
|
704
|
+
}) => Promise<AssembledTransaction<LenderRedemptionRecord>>;
|
|
705
|
+
/**
|
|
706
|
+
* Construct and simulate a allowance 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.
|
|
707
|
+
*/
|
|
708
|
+
allowance: ({ _from, _spender }: {
|
|
709
|
+
_from: string;
|
|
710
|
+
_spender: string;
|
|
711
|
+
}, options?: {
|
|
712
|
+
/**
|
|
713
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
714
|
+
*/
|
|
715
|
+
fee?: number;
|
|
716
|
+
/**
|
|
717
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
718
|
+
*/
|
|
719
|
+
timeoutInSeconds?: number;
|
|
720
|
+
/**
|
|
721
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
722
|
+
*/
|
|
723
|
+
simulate?: boolean;
|
|
724
|
+
}) => Promise<AssembledTransaction<i128>>;
|
|
725
|
+
/**
|
|
726
|
+
* Construct and simulate a approve 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.
|
|
727
|
+
*/
|
|
728
|
+
approve: ({ _from, _spender, _amount, _expiration_ledger, }: {
|
|
729
|
+
_from: string;
|
|
730
|
+
_spender: string;
|
|
731
|
+
_amount: i128;
|
|
732
|
+
_expiration_ledger: u32;
|
|
733
|
+
}, options?: {
|
|
734
|
+
/**
|
|
735
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
736
|
+
*/
|
|
737
|
+
fee?: number;
|
|
738
|
+
/**
|
|
739
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
740
|
+
*/
|
|
741
|
+
timeoutInSeconds?: number;
|
|
742
|
+
/**
|
|
743
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
744
|
+
*/
|
|
745
|
+
simulate?: boolean;
|
|
746
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
747
|
+
/**
|
|
748
|
+
* Construct and simulate a balance 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.
|
|
749
|
+
*/
|
|
750
|
+
balance: ({ id }: {
|
|
751
|
+
id: string;
|
|
752
|
+
}, options?: {
|
|
753
|
+
/**
|
|
754
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
755
|
+
*/
|
|
756
|
+
fee?: number;
|
|
757
|
+
/**
|
|
758
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
759
|
+
*/
|
|
760
|
+
timeoutInSeconds?: number;
|
|
761
|
+
/**
|
|
762
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
763
|
+
*/
|
|
764
|
+
simulate?: boolean;
|
|
765
|
+
}) => Promise<AssembledTransaction<i128>>;
|
|
766
|
+
/**
|
|
767
|
+
* Construct and simulate a transfer 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.
|
|
768
|
+
*/
|
|
769
|
+
transfer: ({ from, to, amount }: {
|
|
770
|
+
from: string;
|
|
771
|
+
to: string;
|
|
772
|
+
amount: i128;
|
|
773
|
+
}, options?: {
|
|
774
|
+
/**
|
|
775
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
776
|
+
*/
|
|
777
|
+
fee?: number;
|
|
778
|
+
/**
|
|
779
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
780
|
+
*/
|
|
781
|
+
timeoutInSeconds?: number;
|
|
782
|
+
/**
|
|
783
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
784
|
+
*/
|
|
785
|
+
simulate?: boolean;
|
|
786
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
787
|
+
/**
|
|
788
|
+
* Construct and simulate a transfer_from 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.
|
|
789
|
+
*/
|
|
790
|
+
transfer_from: ({ _spender, _from, _to, _amount, }: {
|
|
791
|
+
_spender: string;
|
|
792
|
+
_from: string;
|
|
793
|
+
_to: string;
|
|
794
|
+
_amount: i128;
|
|
795
|
+
}, options?: {
|
|
796
|
+
/**
|
|
797
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
798
|
+
*/
|
|
799
|
+
fee?: number;
|
|
800
|
+
/**
|
|
801
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
802
|
+
*/
|
|
803
|
+
timeoutInSeconds?: number;
|
|
804
|
+
/**
|
|
805
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
806
|
+
*/
|
|
807
|
+
simulate?: boolean;
|
|
808
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
809
|
+
/**
|
|
810
|
+
* Construct and simulate a burn 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.
|
|
811
|
+
*/
|
|
812
|
+
burn: ({ from, amount }: {
|
|
813
|
+
from: string;
|
|
814
|
+
amount: i128;
|
|
815
|
+
}, options?: {
|
|
816
|
+
/**
|
|
817
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
818
|
+
*/
|
|
819
|
+
fee?: number;
|
|
820
|
+
/**
|
|
821
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
822
|
+
*/
|
|
823
|
+
timeoutInSeconds?: number;
|
|
824
|
+
/**
|
|
825
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
826
|
+
*/
|
|
827
|
+
simulate?: boolean;
|
|
828
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
829
|
+
/**
|
|
830
|
+
* Construct and simulate a burn_from 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.
|
|
831
|
+
*/
|
|
832
|
+
burn_from: ({ _spender, _from, _amount, }: {
|
|
833
|
+
_spender: string;
|
|
834
|
+
_from: string;
|
|
835
|
+
_amount: i128;
|
|
836
|
+
}, options?: {
|
|
837
|
+
/**
|
|
838
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
839
|
+
*/
|
|
840
|
+
fee?: number;
|
|
841
|
+
/**
|
|
842
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
843
|
+
*/
|
|
844
|
+
timeoutInSeconds?: number;
|
|
845
|
+
/**
|
|
846
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
847
|
+
*/
|
|
848
|
+
simulate?: boolean;
|
|
849
|
+
}) => Promise<AssembledTransaction<null>>;
|
|
850
|
+
/**
|
|
851
|
+
* Construct and simulate a decimals 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.
|
|
852
|
+
*/
|
|
853
|
+
decimals: (options?: {
|
|
854
|
+
/**
|
|
855
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
856
|
+
*/
|
|
857
|
+
fee?: number;
|
|
858
|
+
/**
|
|
859
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
860
|
+
*/
|
|
861
|
+
timeoutInSeconds?: number;
|
|
862
|
+
/**
|
|
863
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
864
|
+
*/
|
|
865
|
+
simulate?: boolean;
|
|
866
|
+
}) => Promise<AssembledTransaction<u32>>;
|
|
867
|
+
/**
|
|
868
|
+
* Construct and simulate a name 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.
|
|
869
|
+
*/
|
|
870
|
+
name: (options?: {
|
|
871
|
+
/**
|
|
872
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
873
|
+
*/
|
|
874
|
+
fee?: number;
|
|
875
|
+
/**
|
|
876
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
877
|
+
*/
|
|
878
|
+
timeoutInSeconds?: number;
|
|
879
|
+
/**
|
|
880
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
881
|
+
*/
|
|
882
|
+
simulate?: boolean;
|
|
883
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
884
|
+
/**
|
|
885
|
+
* Construct and simulate a symbol 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.
|
|
886
|
+
*/
|
|
887
|
+
symbol: (options?: {
|
|
888
|
+
/**
|
|
889
|
+
* The fee to pay for the transaction. Default: BASE_FEE
|
|
890
|
+
*/
|
|
891
|
+
fee?: number;
|
|
892
|
+
/**
|
|
893
|
+
* The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
|
|
894
|
+
*/
|
|
895
|
+
timeoutInSeconds?: number;
|
|
896
|
+
/**
|
|
897
|
+
* Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
|
|
898
|
+
*/
|
|
899
|
+
simulate?: boolean;
|
|
900
|
+
}) => Promise<AssembledTransaction<string>>;
|
|
901
|
+
}
|
|
902
|
+
export declare class Client extends ContractClient {
|
|
903
|
+
readonly options: ContractClientOptions;
|
|
904
|
+
constructor(options: ContractClientOptions);
|
|
905
|
+
readonly fromJSON: {
|
|
906
|
+
initialize: (json: string) => AssembledTransaction<null>;
|
|
907
|
+
add_approved_lender: (json: string) => AssembledTransaction<null>;
|
|
908
|
+
remove_approved_lender: (json: string) => AssembledTransaction<null>;
|
|
909
|
+
make_initial_deposit: (json: string) => AssembledTransaction<bigint>;
|
|
910
|
+
deposit: (json: string) => AssembledTransaction<bigint>;
|
|
911
|
+
add_redemption_request: (json: string) => AssembledTransaction<null>;
|
|
912
|
+
cancel_redemption_request: (json: string) => AssembledTransaction<null>;
|
|
913
|
+
disburse: (json: string) => AssembledTransaction<null>;
|
|
914
|
+
withdraw_after_pool_closure: (json: string) => AssembledTransaction<null>;
|
|
915
|
+
execute_redemption_summary: (json: string) => AssembledTransaction<null>;
|
|
916
|
+
cancellable_redemption_shares: (json: string) => AssembledTransaction<bigint>;
|
|
917
|
+
withdrawable_assets: (json: string) => AssembledTransaction<bigint>;
|
|
918
|
+
get_latest_redemption_record: (json: string) => AssembledTransaction<LenderRedemptionRecord>;
|
|
919
|
+
total_supply: (json: string) => AssembledTransaction<bigint>;
|
|
920
|
+
balance_of: (json: string) => AssembledTransaction<bigint>;
|
|
921
|
+
total_assets: (json: string) => AssembledTransaction<bigint>;
|
|
922
|
+
total_assets_of: (json: string) => AssembledTransaction<bigint>;
|
|
923
|
+
convert_to_shares: (json: string) => AssembledTransaction<bigint>;
|
|
924
|
+
convert_to_assets: (json: string) => AssembledTransaction<bigint>;
|
|
925
|
+
is_approved_lender: (json: string) => AssembledTransaction<boolean>;
|
|
926
|
+
get_deposit_record: (json: string) => AssembledTransaction<DepositRecord>;
|
|
927
|
+
get_epoch_redemption_summary: (json: string) => AssembledTransaction<EpochRedemptionSummary>;
|
|
928
|
+
get_redemption_record: (json: string) => AssembledTransaction<LenderRedemptionRecord>;
|
|
929
|
+
allowance: (json: string) => AssembledTransaction<bigint>;
|
|
930
|
+
approve: (json: string) => AssembledTransaction<null>;
|
|
931
|
+
balance: (json: string) => AssembledTransaction<bigint>;
|
|
932
|
+
transfer: (json: string) => AssembledTransaction<null>;
|
|
933
|
+
transfer_from: (json: string) => AssembledTransaction<null>;
|
|
934
|
+
burn: (json: string) => AssembledTransaction<null>;
|
|
935
|
+
burn_from: (json: string) => AssembledTransaction<null>;
|
|
936
|
+
decimals: (json: string) => AssembledTransaction<number>;
|
|
937
|
+
name: (json: string) => AssembledTransaction<string>;
|
|
938
|
+
symbol: (json: string) => AssembledTransaction<string>;
|
|
939
|
+
};
|
|
940
|
+
}
|