@carrot-protocol/boost-http-client 0.2.16-token22-dev-998073e → 0.2.16-token22-dev-158437a
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/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/types.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare class Client {
|
|
|
42
42
|
*/
|
|
43
43
|
getBank(bankAddress: web3.PublicKey): Promise<GetBankResponse>;
|
|
44
44
|
deposit(clendGroup: web3.PublicKey, clendAccount: web3.PublicKey | null, inputTokenMint: web3.PublicKey, uiAmount: number): Promise<string>;
|
|
45
|
-
withdraw(clendAccount: web3.PublicKey, outputTokenMint: web3.PublicKey, uiAmount: number): Promise<string>;
|
|
45
|
+
withdraw(clendAccount: web3.PublicKey, outputTokenMint: web3.PublicKey, uiAmount: number, withdrawAll: boolean): Promise<string>;
|
|
46
46
|
/**
|
|
47
47
|
* Deposit collateral and create a leveraged position
|
|
48
48
|
* @param request Deposit leverage request parameters
|
package/dist/index.js
CHANGED
|
@@ -302,11 +302,12 @@ class Client {
|
|
|
302
302
|
const txSig = await this.send(depositResponse.unsignedBase64Tx, depositResponse.userRequestId);
|
|
303
303
|
return txSig;
|
|
304
304
|
}
|
|
305
|
-
async withdraw(clendAccount, outputTokenMint, uiAmount) {
|
|
305
|
+
async withdraw(clendAccount, outputTokenMint, uiAmount, withdrawAll) {
|
|
306
306
|
const req = {
|
|
307
307
|
clendAccount,
|
|
308
308
|
outputTokenMint,
|
|
309
309
|
withdrawAmountUi: uiAmount,
|
|
310
|
+
withdrawAll,
|
|
310
311
|
};
|
|
311
312
|
const body = await handleApiCall(() => this.http.post("withdraw", JSON.stringify(req)));
|
|
312
313
|
const withdrawResponse = JSON.parse(body);
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -392,11 +392,13 @@ export class Client {
|
|
|
392
392
|
clendAccount: web3.PublicKey,
|
|
393
393
|
outputTokenMint: web3.PublicKey,
|
|
394
394
|
uiAmount: number,
|
|
395
|
+
withdrawAll: boolean,
|
|
395
396
|
): Promise<string> {
|
|
396
397
|
const req: WithdrawRequest = {
|
|
397
398
|
clendAccount,
|
|
398
399
|
outputTokenMint,
|
|
399
400
|
withdrawAmountUi: uiAmount,
|
|
401
|
+
withdrawAll,
|
|
400
402
|
};
|
|
401
403
|
|
|
402
404
|
const body = await handleApiCall(() =>
|