pinpet-sdk 2.1.28 → 2.1.30
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/pinpet-sdk.cjs.js +262 -301
- package/dist/pinpet-sdk.esm.js +262 -301
- package/dist/pinpet-sdk.js +262 -301
- package/dist/pinpet-sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/idl/pinpet.json +94 -99
- package/src/idl/pinpet_del.json +3730 -0
- package/src/modules/chain.js +86 -79
- package/src/modules/simulator/buy_sell_token.js +16 -14
- package/src/modules/simulator/long_shrot_stop.js +12 -12
- package/src/modules/simulator/utils.js +3 -3
- package/src/modules/simulator.js +22 -23
- package/src/modules/token.js +21 -63
- package/src/modules/trading.js +8 -8
package/src/modules/trading.js
CHANGED
|
@@ -79,8 +79,8 @@ class TradingModule {
|
|
|
79
79
|
)
|
|
80
80
|
: null;
|
|
81
81
|
|
|
82
|
-
// 6. Get fee recipient accounts from curve account
|
|
83
|
-
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint);
|
|
82
|
+
// 6. Get fee recipient accounts from curve account (skipBalances: only need addresses)
|
|
83
|
+
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint, { skipBalances: true });
|
|
84
84
|
const feeRecipientAccount = new PublicKey(curveAccountInfo.feeRecipient);
|
|
85
85
|
const baseFeeRecipientAccount = new PublicKey(curveAccountInfo.baseFeeRecipient);
|
|
86
86
|
|
|
@@ -215,8 +215,8 @@ class TradingModule {
|
|
|
215
215
|
)
|
|
216
216
|
: null;
|
|
217
217
|
|
|
218
|
-
// 6. Get fee recipient accounts from curve account
|
|
219
|
-
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint);
|
|
218
|
+
// 6. Get fee recipient accounts from curve account (skipBalances: only need addresses)
|
|
219
|
+
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint, { skipBalances: true });
|
|
220
220
|
const feeRecipientAccount = new PublicKey(curveAccountInfo.feeRecipient);
|
|
221
221
|
const baseFeeRecipientAccount = new PublicKey(curveAccountInfo.baseFeeRecipient);
|
|
222
222
|
|
|
@@ -595,8 +595,8 @@ class TradingModule {
|
|
|
595
595
|
this.sdk.programId
|
|
596
596
|
);
|
|
597
597
|
|
|
598
|
-
// 4. 从 curve account 获取手续费接收账户 / Get fee recipient accounts from curve account
|
|
599
|
-
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint);
|
|
598
|
+
// 4. 从 curve account 获取手续费接收账户 / Get fee recipient accounts from curve account (skipBalances: only need addresses)
|
|
599
|
+
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint, { skipBalances: true });
|
|
600
600
|
const feeRecipientAccount = new PublicKey(curveAccountInfo.feeRecipient);
|
|
601
601
|
const baseFeeRecipientAccount = new PublicKey(curveAccountInfo.baseFeeRecipient);
|
|
602
602
|
|
|
@@ -744,8 +744,8 @@ class TradingModule {
|
|
|
744
744
|
this.sdk.programId
|
|
745
745
|
);
|
|
746
746
|
|
|
747
|
-
// 4. 从 curve account 获取手续费接收账户 / Get fee recipient accounts from curve account
|
|
748
|
-
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint);
|
|
747
|
+
// 4. 从 curve account 获取手续费接收账户 / Get fee recipient accounts from curve account (skipBalances: only need addresses)
|
|
748
|
+
const curveAccountInfo = await this.sdk.chain.getCurveAccount(mint, { skipBalances: true });
|
|
749
749
|
const feeRecipientAccount = new PublicKey(curveAccountInfo.feeRecipient);
|
|
750
750
|
const baseFeeRecipientAccount = new PublicKey(curveAccountInfo.baseFeeRecipient);
|
|
751
751
|
|