@pear-protocol/exchanges-sdk 0.6.6 → 0.6.7
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/helper/lighter/helper.js +6 -2
- package/dist/index.d.ts +2 -0
- package/package.json +3 -3
|
@@ -153,7 +153,7 @@ function createLighterHelper(sdk, demo = false) {
|
|
|
153
153
|
if (amount < MIN_FAST_WITHDRAW_USDC_UNITS) {
|
|
154
154
|
throw new Error(`Lighter fast withdrawal minimum is ${MIN_LIGHTER_FAST_WITHDRAW_USDC} USDC`);
|
|
155
155
|
}
|
|
156
|
-
const { messageToSign, txInfo } = await sdk.core.misc.lighter.prepareFastWithdraw({
|
|
156
|
+
const { messageToSign, txInfo, fee } = await sdk.core.misc.lighter.prepareFastWithdraw({
|
|
157
157
|
accountIndex: params.accountIndex,
|
|
158
158
|
toAddress: params.toAddress,
|
|
159
159
|
amount,
|
|
@@ -164,7 +164,7 @@ function createLighterHelper(sdk, demo = false) {
|
|
|
164
164
|
account: walletClient.account,
|
|
165
165
|
message: messageToSign
|
|
166
166
|
});
|
|
167
|
-
|
|
167
|
+
const { txHash } = await sdk.core.misc.lighter.submitFastWithdraw({
|
|
168
168
|
accountIndex: params.accountIndex,
|
|
169
169
|
toAddress: params.toAddress,
|
|
170
170
|
apiKeyIndex: params.apiKeyIndex,
|
|
@@ -172,6 +172,10 @@ function createLighterHelper(sdk, demo = false) {
|
|
|
172
172
|
txInfo,
|
|
173
173
|
l1Signature
|
|
174
174
|
});
|
|
175
|
+
return {
|
|
176
|
+
txHash,
|
|
177
|
+
fee
|
|
178
|
+
};
|
|
175
179
|
},
|
|
176
180
|
async withdraw(walletClient, params) {
|
|
177
181
|
if (demo) {
|
package/dist/index.d.ts
CHANGED
|
@@ -509,6 +509,8 @@ type WithdrawResult = {
|
|
|
509
509
|
};
|
|
510
510
|
type FastWithdrawResult = {
|
|
511
511
|
txHash: string;
|
|
512
|
+
/** Integer USDC units Lighter charged on top of the amount. */
|
|
513
|
+
fee: number;
|
|
512
514
|
};
|
|
513
515
|
/**
|
|
514
516
|
* The next action an L1 address must take before it can hold a Lighter trade account.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/exchanges-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "Pear Protocol Exchanges SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"test:watch": "vitest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@pear-protocol/core-sdk": "^1.17.
|
|
31
|
-
"@pear-protocol/types": "^1.26.
|
|
30
|
+
"@pear-protocol/core-sdk": "^1.17.4",
|
|
31
|
+
"@pear-protocol/types": "^1.26.1",
|
|
32
32
|
"@pear-protocol/utils": "^0.5.1",
|
|
33
33
|
"bignumber.js": "^11.1.1",
|
|
34
34
|
"partysocket": "^1.0.3",
|