@huma-finance/soroban-sdk 0.0.27 → 0.0.28-beta.155
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 +20 -0
- package/LICENSE.md +661 -0
- package/dist/cjs/helpers/TrancheContractHelper.d.ts +15 -1
- package/dist/cjs/helpers/TrancheContractHelper.js +46 -1
- package/dist/cjs/helpers/TrancheContractHelper.js.map +1 -1
- package/dist/cjs/utils/transaction.d.ts +1 -1
- package/dist/cjs/utils/transaction.js +6 -3
- package/dist/cjs/utils/transaction.js.map +1 -1
- package/dist/helpers/TrancheContractHelper.d.ts +15 -1
- package/dist/helpers/TrancheContractHelper.js +46 -1
- package/dist/helpers/TrancheContractHelper.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/transaction.d.ts +1 -1
- package/dist/utils/transaction.js +6 -3
- package/dist/utils/transaction.js.map +1 -1
- package/package.json +15 -11
package/API.md
CHANGED
|
@@ -25,6 +25,8 @@ Note: To ensure that allowance is always available for autopay, please call appr
|
|
|
25
25
|
Allowance is required to do certain actions on the Huma protocol (e.g. makePayment for Autopay)</p></dd>
|
|
26
26
|
<dt><a href="#getYieldToWithdraw">getYieldToWithdraw(poolName, network, wallet)</a> ⇒ <code>Promise.<SentTransaction></code></dt>
|
|
27
27
|
<dd><p>Get yield available to withdraw from the pool for a lender account</p></dd>
|
|
28
|
+
<dt><a href="#deposit">deposit(poolName, network, wallet, assets, trancheType)</a> ⇒ <code>Promise.<SentTransaction></code></dt>
|
|
29
|
+
<dd><p>Deposit assets into a tranche of the pool</p></dd>
|
|
28
30
|
<dt><a href="#withdrawYields">withdrawYields(poolName, network, wallet)</a> ⇒ <code>Promise.<SentTransaction></code></dt>
|
|
29
31
|
<dd><p>Withdraw yield from the pool for a lender account</p></dd>
|
|
30
32
|
</dl>
|
|
@@ -169,6 +171,24 @@ Allowance is required to do certain actions on the Huma protocol (e.g. makePayme
|
|
|
169
171
|
| network | <code>StellarNetwork</code> | <p>The stellar network.</p> |
|
|
170
172
|
| wallet | <code>StellarWallet</code> | <p>The stellar wallet.</p> |
|
|
171
173
|
|
|
174
|
+
<a name="deposit"></a>
|
|
175
|
+
|
|
176
|
+
## deposit(poolName, network, wallet, assets, trancheType) ⇒ <code>Promise.<SentTransaction></code>
|
|
177
|
+
<p>Deposit assets into a tranche of the pool</p>
|
|
178
|
+
|
|
179
|
+
**Kind**: global function
|
|
180
|
+
**Returns**: <code>Promise.<SentTransaction></code> - <ul>
|
|
181
|
+
<li>A Promise of the SentTransaction containing the shares minted.</li>
|
|
182
|
+
</ul>
|
|
183
|
+
|
|
184
|
+
| Param | Type | Description |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| poolName | <code>POOL\_NAME</code> | <p>The name of the credit pool to deposit into.</p> |
|
|
187
|
+
| network | <code>StellarNetwork</code> | <p>The stellar network.</p> |
|
|
188
|
+
| wallet | <code>StellarWallet</code> | <p>The stellar wallet.</p> |
|
|
189
|
+
| assets | <code>bigint</code> | <p>The amount of underlying assets to deposit.</p> |
|
|
190
|
+
| trancheType | <code>'juniorTranche'</code> \| <code>'seniorTranche'</code> | <p>The tranche to deposit into.</p> |
|
|
191
|
+
|
|
172
192
|
<a name="withdrawYields"></a>
|
|
173
193
|
|
|
174
194
|
## withdrawYields(poolName, network, wallet) ⇒ <code>Promise.<SentTransaction></code>
|