@huma-finance/soroban-sdk 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/API.md +7 -14
- package/dist/cjs/helpers/CreditContractHelper.d.ts +6 -18
- package/dist/cjs/helpers/CreditContractHelper.js +107 -92
- package/dist/cjs/helpers/CreditContractHelper.js.map +1 -1
- package/dist/cjs/helpers/Sep41ContractHelper.d.ts +4 -7
- package/dist/cjs/helpers/Sep41ContractHelper.js +41 -31
- package/dist/cjs/helpers/Sep41ContractHelper.js.map +1 -1
- package/dist/cjs/services/HumaContextStellar.js +16 -19
- package/dist/cjs/services/HumaContextStellar.js.map +1 -1
- package/dist/cjs/services/StellarWallet.d.ts +3 -1
- package/dist/cjs/services/StellarWallet.js +7 -3
- package/dist/cjs/services/StellarWallet.js.map +1 -1
- package/dist/cjs/utils/client.d.ts +14 -3
- package/dist/cjs/utils/client.js +59 -4
- package/dist/cjs/utils/client.js.map +1 -1
- package/dist/cjs/utils/common.d.ts +14 -1
- package/dist/cjs/utils/common.js +41 -1
- package/dist/cjs/utils/common.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/network.d.ts +7 -3
- package/dist/cjs/utils/network.js +50 -20
- package/dist/cjs/utils/network.js.map +1 -1
- package/dist/cjs/utils/transaction.d.ts +25 -0
- package/dist/cjs/utils/transaction.js +125 -0
- package/dist/cjs/utils/transaction.js.map +1 -0
- package/dist/helpers/CreditContractHelper.d.ts +6 -18
- package/dist/helpers/CreditContractHelper.js +124 -98
- package/dist/helpers/CreditContractHelper.js.map +1 -1
- package/dist/helpers/Sep41ContractHelper.d.ts +4 -7
- package/dist/helpers/Sep41ContractHelper.js +44 -30
- package/dist/helpers/Sep41ContractHelper.js.map +1 -1
- package/dist/helpers/index.js +5 -2
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/services/HumaContextStellar.js +21 -20
- package/dist/services/HumaContextStellar.js.map +1 -1
- package/dist/services/StellarWallet.d.ts +3 -1
- package/dist/services/StellarWallet.js +14 -6
- package/dist/services/StellarWallet.js.map +1 -1
- package/dist/services/index.js +5 -2
- package/dist/services/index.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/client.d.ts +14 -3
- package/dist/utils/client.js +98 -33
- package/dist/utils/client.js.map +1 -1
- package/dist/utils/common.d.ts +14 -1
- package/dist/utils/common.js +51 -6
- package/dist/utils/common.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +7 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/network.d.ts +7 -3
- package/dist/utils/network.js +64 -31
- package/dist/utils/network.js.map +1 -1
- package/dist/utils/transaction.d.ts +25 -0
- package/dist/utils/transaction.js +125 -0
- package/dist/utils/transaction.js.map +1 -0
- package/package.json +20 -15
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { POOL_NAME, StellarNetwork } from '../utils/network';
|
|
5
|
-
/**
|
|
6
|
-
* Returns an soroban contract client instance for the credit line contract
|
|
7
|
-
* associated with the given pool name on the current chain.
|
|
8
|
-
*
|
|
9
|
-
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
10
|
-
* @param {StellarNetwork} network - The stellar network.
|
|
11
|
-
* @param {StellarWallet} wallet - The stellar wallet.
|
|
12
|
-
* @returns {PoolCreditClient | undefined} A contract client instance for the CreditLine contract or undefined if it could not be found.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getCreditLineClient(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet): PoolCreditClient | undefined;
|
|
1
|
+
import { CreditRecord } from '@huma-finance/soroban-pool-credit';
|
|
2
|
+
import { StellarWallet } from '../services';
|
|
3
|
+
import { POOL_NAME, StellarNetwork } from '../utils';
|
|
15
4
|
/**
|
|
16
5
|
* Returns the current pool balance available for borrowing
|
|
17
6
|
*
|
|
@@ -59,9 +48,8 @@ export declare function getTotalDue(poolName: POOL_NAME, network: StellarNetwork
|
|
|
59
48
|
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
60
49
|
* @param {StellarNetwork} network - The stellar network.
|
|
61
50
|
* @param {StellarWallet} wallet - The stellar wallet.
|
|
62
|
-
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
63
51
|
*/
|
|
64
|
-
export declare function approveAllowanceForSentinel(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet): Promise<
|
|
52
|
+
export declare function approveAllowanceForSentinel(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet): Promise<any>;
|
|
65
53
|
/**
|
|
66
54
|
* Draws down from a pool.
|
|
67
55
|
*
|
|
@@ -73,7 +61,7 @@ export declare function approveAllowanceForSentinel(poolName: POOL_NAME, network
|
|
|
73
61
|
* @param {BigNumberish} drawdownAmount - The amount to drawdown.
|
|
74
62
|
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
75
63
|
*/
|
|
76
|
-
export declare function drawdown(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet, drawdownAmount: bigint): Promise<
|
|
64
|
+
export declare function drawdown(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet, drawdownAmount: bigint): Promise<any>;
|
|
77
65
|
/**
|
|
78
66
|
* Makes a payment.
|
|
79
67
|
*
|
|
@@ -86,4 +74,4 @@ export declare function drawdown(poolName: POOL_NAME, network: StellarNetwork, w
|
|
|
86
74
|
* @param {boolean} principalOnly - Whether this payment should ONLY apply to the principal
|
|
87
75
|
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
88
76
|
*/
|
|
89
|
-
export declare function makePayment(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet, paymentAmount: bigint, principalOnly: boolean): Promise<
|
|
77
|
+
export declare function makePayment(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet, paymentAmount: bigint, principalOnly: boolean): Promise<any>;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
8
|
-
* @param {StellarNetwork} network - The stellar network.
|
|
9
|
-
* @param {StellarWallet} wallet - The stellar wallet.
|
|
10
|
-
* @returns {PoolCreditClient | undefined} A contract client instance for the CreditLine contract or undefined if it could not be found.
|
|
11
|
-
*/
|
|
12
|
-
export function getCreditLineClient(poolName, network, wallet) {
|
|
13
|
-
return getPoolCreditClient(poolName, network, wallet);
|
|
14
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makePayment = exports.drawdown = exports.approveAllowanceForSentinel = exports.getTotalDue = exports.getAvailableCreditForPool = exports.getCreditRecordForPool = exports.getAvailableBalanceForPool = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const Sep41ContractHelper_1 = require("./Sep41ContractHelper");
|
|
15
6
|
/**
|
|
16
7
|
* Returns the current pool balance available for borrowing
|
|
17
8
|
*
|
|
@@ -19,14 +10,15 @@ export function getCreditLineClient(poolName, network, wallet) {
|
|
|
19
10
|
* @param {StellarNetwork} network - The stellar network.
|
|
20
11
|
* @param {StellarWallet} wallet - The stellar wallet.
|
|
21
12
|
*/
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
async function getAvailableBalanceForPool(poolName, network, wallet) {
|
|
14
|
+
const poolStorageContext = new utils_1.TransactionContext(poolName, network, wallet, 'poolStorage');
|
|
15
|
+
const { result } = await (0, utils_1.sendTransaction)({
|
|
16
|
+
context: poolStorageContext,
|
|
17
|
+
method: 'get_available_balance',
|
|
18
|
+
});
|
|
28
19
|
return result;
|
|
29
20
|
}
|
|
21
|
+
exports.getAvailableBalanceForPool = getAvailableBalanceForPool;
|
|
30
22
|
/**
|
|
31
23
|
* Returns the credit record of the borrower
|
|
32
24
|
*
|
|
@@ -35,25 +27,39 @@ export async function getAvailableBalanceForPool(poolName, network, wallet) {
|
|
|
35
27
|
* @param {StellarWallet} wallet - The stellar wallet.
|
|
36
28
|
* @param {string} borrower - The address of the borrower to check the credit record for.
|
|
37
29
|
*/
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
async function getCreditRecordForPool(poolName, network, wallet, borrower) {
|
|
31
|
+
const creditStorageContext = new utils_1.TransactionContext(poolName, network, wallet, 'creditStorage');
|
|
32
|
+
const { result: creditHash } = await (0, utils_1.sendTransaction)({
|
|
33
|
+
context: creditStorageContext,
|
|
34
|
+
method: 'get_credit_hash',
|
|
35
|
+
params: [
|
|
36
|
+
{
|
|
37
|
+
name: 'borrower',
|
|
38
|
+
type: utils_1.ScValType.address,
|
|
39
|
+
value: borrower,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
45
42
|
});
|
|
46
43
|
if (!creditHash) {
|
|
47
44
|
throw new Error('Could not find credit hash');
|
|
48
45
|
}
|
|
49
|
-
const { result: creditRecord } = await
|
|
50
|
-
|
|
46
|
+
const { result: creditRecord } = await (0, utils_1.sendTransaction)({
|
|
47
|
+
context: creditStorageContext,
|
|
48
|
+
method: 'get_credit_record',
|
|
49
|
+
params: [
|
|
50
|
+
{
|
|
51
|
+
name: 'credit_hash',
|
|
52
|
+
type: utils_1.ScValType.buffer,
|
|
53
|
+
value: creditHash,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
51
56
|
});
|
|
52
57
|
if (!creditRecord) {
|
|
53
58
|
throw new Error('Could not find credit record');
|
|
54
59
|
}
|
|
55
60
|
return creditRecord;
|
|
56
61
|
}
|
|
62
|
+
exports.getCreditRecordForPool = getCreditRecordForPool;
|
|
57
63
|
/**
|
|
58
64
|
* Returns the borrower's remaining credit they can use for borrowing. Note that this might not be
|
|
59
65
|
* currently available for borrowing as the credit limit might exceed the available pool balance. Use
|
|
@@ -64,30 +70,43 @@ export async function getCreditRecordForPool(poolName, network, wallet, borrower
|
|
|
64
70
|
* @param {StellarWallet} wallet - The stellar wallet.
|
|
65
71
|
* @param {string} borrower - The address of the borrower to check the available credit for.
|
|
66
72
|
*/
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
async function getAvailableCreditForPool(poolName, network, wallet, borrower) {
|
|
74
|
+
const creditStorageContext = new utils_1.TransactionContext(poolName, network, wallet, 'creditStorage');
|
|
75
|
+
const { result: creditHash } = await (0, utils_1.sendTransaction)({
|
|
76
|
+
context: creditStorageContext,
|
|
77
|
+
method: 'get_credit_hash',
|
|
78
|
+
params: [
|
|
79
|
+
{
|
|
80
|
+
name: 'borrower',
|
|
81
|
+
type: utils_1.ScValType.address,
|
|
82
|
+
value: borrower,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
74
85
|
});
|
|
75
86
|
if (!creditHash) {
|
|
76
87
|
throw new Error('Could not find credit hash');
|
|
77
88
|
}
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
const creditHashParam = {
|
|
90
|
+
name: 'credit_hash',
|
|
91
|
+
type: utils_1.ScValType.buffer,
|
|
92
|
+
value: creditHash,
|
|
93
|
+
};
|
|
94
|
+
const { result: creditConfig } = await (0, utils_1.sendTransaction)({
|
|
95
|
+
context: creditStorageContext,
|
|
96
|
+
method: 'get_credit_config',
|
|
97
|
+
params: [creditHashParam],
|
|
98
|
+
});
|
|
99
|
+
const { result: creditRecord } = await (0, utils_1.sendTransaction)({
|
|
100
|
+
context: creditStorageContext,
|
|
101
|
+
method: 'get_credit_record',
|
|
102
|
+
params: [creditHashParam],
|
|
103
|
+
});
|
|
86
104
|
if (!creditConfig || !creditRecord) {
|
|
87
105
|
throw new Error('Could not find credit config or credit record');
|
|
88
106
|
}
|
|
89
107
|
return (BigInt(creditConfig.credit_limit) - BigInt(creditRecord.unbilled_principal));
|
|
90
108
|
}
|
|
109
|
+
exports.getAvailableCreditForPool = getAvailableCreditForPool;
|
|
91
110
|
/**
|
|
92
111
|
* Returns borrower's total due amount in bigint format
|
|
93
112
|
* associated with the given pool name on the current chain.
|
|
@@ -98,13 +117,14 @@ export async function getAvailableCreditForPool(poolName, network, wallet, borro
|
|
|
98
117
|
* @param {string} borrower - The address of the borrower to check the available credit for.
|
|
99
118
|
* @returns {bigint | null} The account's total due amount in bigint format
|
|
100
119
|
*/
|
|
101
|
-
|
|
120
|
+
async function getTotalDue(poolName, network, wallet, borrower) {
|
|
102
121
|
const creditRecord = await getCreditRecordForPool(poolName, network, wallet, borrower);
|
|
103
122
|
if (!creditRecord) {
|
|
104
123
|
return null;
|
|
105
124
|
}
|
|
106
125
|
return creditRecord.next_due + creditRecord.total_past_due;
|
|
107
126
|
}
|
|
127
|
+
exports.getTotalDue = getTotalDue;
|
|
108
128
|
/**
|
|
109
129
|
* Approve allowance for sentinel if not enough allowance is approved.
|
|
110
130
|
*
|
|
@@ -113,24 +133,21 @@ export async function getTotalDue(poolName, network, wallet, borrower) {
|
|
|
113
133
|
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
114
134
|
* @param {StellarNetwork} network - The stellar network.
|
|
115
135
|
* @param {StellarWallet} wallet - The stellar wallet.
|
|
116
|
-
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
117
136
|
*/
|
|
118
|
-
|
|
137
|
+
async function approveAllowanceForSentinel(poolName, network, wallet) {
|
|
119
138
|
const totalDue = await getTotalDue(poolName, network, wallet, wallet.userInfo.publicKey);
|
|
120
139
|
if (totalDue === null) {
|
|
121
140
|
throw new Error('Could not find total due');
|
|
122
141
|
}
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
poolStorageClient.get_sentinel(),
|
|
130
|
-
]);
|
|
131
|
-
const tx = await approveSep41AllowanceIfInsufficient(network, wallet, underlyingToken, sentinel, totalDue);
|
|
142
|
+
const poolStorageContext = new utils_1.TransactionContext(poolName, network, wallet, 'poolStorage');
|
|
143
|
+
const { result: sentinel } = await (0, utils_1.sendTransaction)({
|
|
144
|
+
context: poolStorageContext,
|
|
145
|
+
method: 'get_sentinel',
|
|
146
|
+
});
|
|
147
|
+
const tx = await (0, Sep41ContractHelper_1.approveSep41Allowance)(poolName, network, wallet, sentinel);
|
|
132
148
|
return tx;
|
|
133
149
|
}
|
|
150
|
+
exports.approveAllowanceForSentinel = approveAllowanceForSentinel;
|
|
134
151
|
/**
|
|
135
152
|
* Draws down from a pool.
|
|
136
153
|
*
|
|
@@ -142,21 +159,29 @@ export async function approveAllowanceForSentinel(poolName, network, wallet) {
|
|
|
142
159
|
* @param {BigNumberish} drawdownAmount - The amount to drawdown.
|
|
143
160
|
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
144
161
|
*/
|
|
145
|
-
|
|
146
|
-
const poolCreditClient = getPoolCreditClient(poolName, network, wallet);
|
|
147
|
-
if (!poolCreditClient) {
|
|
148
|
-
throw new Error('Could not find credit contract for pool');
|
|
149
|
-
}
|
|
162
|
+
async function drawdown(poolName, network, wallet, drawdownAmount) {
|
|
150
163
|
await approveAllowanceForSentinel(poolName, network, wallet);
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
164
|
+
const poolCreditContext = new utils_1.TransactionContext(poolName, network, wallet, 'poolCredit');
|
|
165
|
+
const result = await (0, utils_1.sendTransaction)({
|
|
166
|
+
context: poolCreditContext,
|
|
167
|
+
method: 'drawdown',
|
|
168
|
+
params: [
|
|
169
|
+
{
|
|
170
|
+
name: 'borrower',
|
|
171
|
+
type: utils_1.ScValType.address,
|
|
172
|
+
value: wallet.userInfo.publicKey,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'amount',
|
|
176
|
+
type: utils_1.ScValType.u128,
|
|
177
|
+
value: drawdownAmount,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
shouldSignTransaction: true,
|
|
156
181
|
});
|
|
157
|
-
const result = await tx.signAndSend();
|
|
158
182
|
return result;
|
|
159
183
|
}
|
|
184
|
+
exports.drawdown = drawdown;
|
|
160
185
|
/**
|
|
161
186
|
* Makes a payment.
|
|
162
187
|
*
|
|
@@ -169,40 +194,41 @@ export async function drawdown(poolName, network, wallet, drawdownAmount) {
|
|
|
169
194
|
* @param {boolean} principalOnly - Whether this payment should ONLY apply to the principal
|
|
170
195
|
* @returns {Promise<SentTransaction>} - A Promise of the SentTransaction.
|
|
171
196
|
*/
|
|
172
|
-
|
|
173
|
-
const poolCreditClient = getPoolCreditClient(poolName, network, wallet);
|
|
174
|
-
if (!poolCreditClient) {
|
|
175
|
-
throw new Error('Could not find credit contract for pool');
|
|
176
|
-
}
|
|
177
|
-
const poolStorageClient = getPoolStorageClient(poolName, network, wallet);
|
|
178
|
-
if (!poolStorageClient) {
|
|
179
|
-
throw new Error('Could not find pool storage contract for pool');
|
|
180
|
-
}
|
|
197
|
+
async function makePayment(poolName, network, wallet, paymentAmount, principalOnly) {
|
|
181
198
|
await approveAllowanceForSentinel(poolName, network, wallet);
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
const poolStorageContext = new utils_1.TransactionContext(poolName, network, wallet, 'poolStorage');
|
|
200
|
+
const { result: sentinel } = await (0, utils_1.sendTransaction)({
|
|
201
|
+
context: poolStorageContext,
|
|
202
|
+
method: 'get_sentinel',
|
|
203
|
+
});
|
|
204
|
+
await (0, Sep41ContractHelper_1.approveSep41Allowance)(poolName, network, wallet, sentinel);
|
|
205
|
+
const poolCreditContext = new utils_1.TransactionContext(poolName, network, wallet, 'poolCredit');
|
|
206
|
+
const params = [
|
|
207
|
+
{
|
|
208
|
+
name: 'borrower',
|
|
209
|
+
type: utils_1.ScValType.address,
|
|
210
|
+
value: wallet.userInfo.publicKey,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'amount',
|
|
214
|
+
type: utils_1.ScValType.u128,
|
|
215
|
+
value: paymentAmount,
|
|
216
|
+
},
|
|
217
|
+
];
|
|
218
|
+
if (!principalOnly) {
|
|
219
|
+
params.unshift({
|
|
220
|
+
name: 'caller',
|
|
221
|
+
type: utils_1.ScValType.address,
|
|
222
|
+
value: wallet.userInfo.publicKey,
|
|
203
223
|
});
|
|
204
224
|
}
|
|
205
|
-
const result = await
|
|
225
|
+
const result = await (0, utils_1.sendTransaction)({
|
|
226
|
+
context: poolCreditContext,
|
|
227
|
+
method: principalOnly ? 'make_principal_payment' : 'make_payment',
|
|
228
|
+
params: params,
|
|
229
|
+
shouldSignTransaction: true,
|
|
230
|
+
});
|
|
206
231
|
return result;
|
|
207
232
|
}
|
|
233
|
+
exports.makePayment = makePayment;
|
|
208
234
|
//# sourceMappingURL=CreditContractHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditContractHelper.js","sourceRoot":"","sources":["../../src/helpers/CreditContractHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreditContractHelper.js","sourceRoot":"","sources":["../../src/helpers/CreditContractHelper.ts"],"names":[],"mappings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iB,GAAG,IAAI,0BAAkB,CAC9C,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,CACb,CAAA;IACD,MAAM,MAAM,GAAG;QACb;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,iBAAS,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS;SACjC;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iBAAS,CAAC,IAAI;YACpB,KAAK,EAAE,aAAa;SACrB;KACF,CAAA;IACD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,CAAC,OAAO,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,iBAAS,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS;SACjC,CAAC,CAAA;KACH;IACD,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAe,EAAC;QACnC,OAAO,EAAE,iBAAiB;QAC1B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,cAAc;QACjE,MAAM,EAAE,MAAM;QACd,qBAAqB,EAAE,IAAI;KAC5B,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC;AAtDD,kCAsDC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { SentTransaction } from '@stellar/stellar-sdk/lib/contract';
|
|
2
1
|
import { StellarWallet } from '../services';
|
|
3
|
-
import { StellarNetwork } from '../utils';
|
|
2
|
+
import { POOL_NAME, StellarNetwork } from '../utils';
|
|
4
3
|
/**
|
|
5
|
-
* Approves an Sep41 allowance for a spender address
|
|
4
|
+
* Approves an Sep41 allowance for a spender address.
|
|
6
5
|
* Allowance is required to do certain actions on the Huma protocol (e.g. makePayment for Autopay)
|
|
7
6
|
*
|
|
8
7
|
* @async
|
|
9
8
|
* @function
|
|
9
|
+
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
10
10
|
* @param {StellarNetwork} network - The stellar network.
|
|
11
11
|
* @param {StellarWallet} wallet - The wallet used to send the transaction.
|
|
12
|
-
* @param {string} tokenAddress - The address of the Sep41 token to approve.
|
|
13
12
|
* @param {string} spenderAddress - The address of the spender to approve an allowance for.
|
|
14
|
-
* @param {bigint} allowanceAmount - The amount of tokens to approve, if applicable. Denominated in the Sep41 tokens.
|
|
15
|
-
* @returns {Promise<SentTransaction<null> | null>} - A Promise of the transaction response, or null if the allowance was already sufficient.
|
|
16
13
|
*/
|
|
17
|
-
export declare function
|
|
14
|
+
export declare function approveSep41Allowance(poolName: POOL_NAME, network: StellarNetwork, wallet: StellarWallet, spenderAddress: string): Promise<any>;
|
|
@@ -1,41 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.approveSep41Allowance = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
2
5
|
/**
|
|
3
|
-
* Approves an Sep41 allowance for a spender address
|
|
6
|
+
* Approves an Sep41 allowance for a spender address.
|
|
4
7
|
* Allowance is required to do certain actions on the Huma protocol (e.g. makePayment for Autopay)
|
|
5
8
|
*
|
|
6
9
|
* @async
|
|
7
10
|
* @function
|
|
11
|
+
* @param {POOL_NAME} poolName - The name of the credit pool to get the contract instance for.
|
|
8
12
|
* @param {StellarNetwork} network - The stellar network.
|
|
9
13
|
* @param {StellarWallet} wallet - The wallet used to send the transaction.
|
|
10
|
-
* @param {string} tokenAddress - The address of the Sep41 token to approve.
|
|
11
14
|
* @param {string} spenderAddress - The address of the spender to approve an allowance for.
|
|
12
|
-
* @param {bigint} allowanceAmount - The amount of tokens to approve, if applicable. Denominated in the Sep41 tokens.
|
|
13
|
-
* @returns {Promise<SentTransaction<null> | null>} - A Promise of the transaction response, or null if the allowance was already sufficient.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
async function approveSep41Allowance(poolName, network, wallet, spenderAddress) {
|
|
17
|
+
const underlyingTokenContext = new utils_1.TransactionContext(poolName, network, wallet, 'underlyingToken');
|
|
18
|
+
const { result: decimals } = await (0, utils_1.sendTransaction)({
|
|
19
|
+
context: underlyingTokenContext,
|
|
20
|
+
method: 'decimals',
|
|
21
|
+
});
|
|
22
|
+
const latestLedger = await (0, utils_1.getLatestLedger)(network);
|
|
23
|
+
// @TODO find a better to advance the ledger number
|
|
24
|
+
const advanceLedgerNum = 3_000_000;
|
|
25
|
+
const result = await (0, utils_1.sendTransaction)({
|
|
26
|
+
context: underlyingTokenContext,
|
|
27
|
+
method: 'approve',
|
|
28
|
+
params: [
|
|
29
|
+
{
|
|
30
|
+
name: 'from',
|
|
31
|
+
type: utils_1.ScValType.address,
|
|
32
|
+
value: wallet.userInfo.publicKey,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'spender',
|
|
36
|
+
type: utils_1.ScValType.address,
|
|
37
|
+
value: spenderAddress,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'amount',
|
|
41
|
+
type: utils_1.ScValType.i128,
|
|
42
|
+
value: 1000_000_000 * Math.pow(10, Number(decimals)),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'expiration_ledger',
|
|
46
|
+
type: utils_1.ScValType.u32,
|
|
47
|
+
value: latestLedger.sequence + advanceLedgerNum,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
shouldSignTransaction: true,
|
|
51
|
+
});
|
|
52
|
+
return result;
|
|
40
53
|
}
|
|
54
|
+
exports.approveSep41Allowance = approveSep41Allowance;
|
|
41
55
|
//# sourceMappingURL=Sep41ContractHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sep41ContractHelper.js","sourceRoot":"","sources":["../../src/helpers/Sep41ContractHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sep41ContractHelper.js","sourceRoot":"","sources":["../../src/helpers/Sep41ContractHelper.ts"],"names":[],"mappings":";;;AACA,oCAOiB;AAEjB;;;;;;;;;;GAUG;AACI,KAAK,UAAU,qBAAqB,CACzC,QAAmB,EACnB,OAAuB,EACvB,MAAqB,EACrB,cAAsB;IAEtB,MAAM,sBAAsB,GAAG,IAAI,0BAAkB,CACnD,QAAQ,EACR,OAAO,EACP,MAAM,EACN,iBAAiB,CAClB,CAAA;IAED,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAuB,MAAM,IAAA,uBAAe,EAAC;QACrE,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE,UAAU;KACnB,CAAC,CAAA;IACF,MAAM,YAAY,GAAG,MAAM,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAA;IACnD,mDAAmD;IACnD,MAAM,gBAAgB,GAAG,SAAS,CAAA;IAElC,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAe,EAAC;QACnC,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,iBAAS,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS;aACjC;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,iBAAS,CAAC,OAAO;gBACvB,KAAK,EAAE,cAAc;aACtB;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,iBAAS,CAAC,IAAI;gBACpB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;aACrD;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE,iBAAS,CAAC,GAAG;gBACnB,KAAK,EAAE,YAAY,CAAC,QAAQ,GAAG,gBAAgB;aAChD;SACF;QACD,qBAAqB,EAAE,IAAI;KAC5B,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAlDD,sDAkDC"}
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./CreditContractHelper"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Sep41ContractHelper"), exports);
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;AAAA,iEAAsC;AACtC,gEAAqC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./helpers"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./services"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./utils"), exports);
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,qDAA0B;AAC1B,kDAAuB"}
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HumaContextStellar = void 0;
|
|
4
|
+
class HumaContextStellar {
|
|
5
|
+
#wallet;
|
|
6
|
+
#network;
|
|
7
|
+
#poolName;
|
|
8
|
+
#poolType;
|
|
4
9
|
constructor({ wallet, network, poolName, poolType, }) {
|
|
5
|
-
_HumaContextStellar_wallet.set(this, void 0);
|
|
6
|
-
_HumaContextStellar_network.set(this, void 0);
|
|
7
|
-
_HumaContextStellar_poolName.set(this, void 0);
|
|
8
|
-
_HumaContextStellar_poolType.set(this, void 0);
|
|
9
10
|
if (!wallet || !network || !poolName || !poolType) {
|
|
10
11
|
throw new Error('All parameters are required');
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
this.#wallet = wallet;
|
|
14
|
+
this.#network = network;
|
|
15
|
+
this.#poolName = poolName;
|
|
16
|
+
this.#poolType = poolType;
|
|
16
17
|
}
|
|
17
18
|
get wallet() {
|
|
18
|
-
return
|
|
19
|
+
return this.#wallet;
|
|
19
20
|
}
|
|
20
21
|
set wallet(value) {
|
|
21
|
-
|
|
22
|
+
this.#wallet = value;
|
|
22
23
|
}
|
|
23
24
|
get network() {
|
|
24
|
-
return
|
|
25
|
+
return this.#network;
|
|
25
26
|
}
|
|
26
27
|
set network(value) {
|
|
27
|
-
|
|
28
|
+
this.#network = value;
|
|
28
29
|
}
|
|
29
30
|
get poolName() {
|
|
30
|
-
return
|
|
31
|
+
return this.#poolName;
|
|
31
32
|
}
|
|
32
33
|
set poolName(value) {
|
|
33
|
-
|
|
34
|
+
this.#poolName = value;
|
|
34
35
|
}
|
|
35
36
|
get poolType() {
|
|
36
|
-
return
|
|
37
|
+
return this.#poolType;
|
|
37
38
|
}
|
|
38
39
|
set poolType(value) {
|
|
39
|
-
|
|
40
|
+
this.#poolType = value;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
exports.HumaContextStellar = HumaContextStellar;
|
|
43
44
|
//# sourceMappingURL=HumaContextStellar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HumaContextStellar.js","sourceRoot":"","sources":["../../src/services/HumaContextStellar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HumaContextStellar.js","sourceRoot":"","sources":["../../src/services/HumaContextStellar.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAC7B,OAAO,CAAe;IAEtB,QAAQ,CAAgB;IAExB,SAAS,CAAW;IAEpB,SAAS,CAAW;IAEpB,YAAY,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,GAMT;QACC,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;SAC/C;QAED,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;IAC3B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,IAAI,MAAM,CAAC,KAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IACtB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED,IAAI,OAAO,CAAC,KAAqB;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;IACvB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QAC3B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACxB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,IAAI,QAAQ,CAAC,KAAgB;QAC3B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;IACxB,CAAC;CACF;AA7DD,gDA6DC"}
|