@scallop-io/sui-scallop-sdk 2.0.4 → 2.0.6
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.mts +12 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +11 -11
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/src/builders/coreBuilder.ts +16 -39
- package/src/builders/sCoinBuilder.ts +2 -2
- package/src/models/scallopBuilder.ts +77 -1
- package/src/models/scallopCache.ts +1 -1
- package/src/models/scallopConstants.ts +1 -1
- package/src/queries/portfolioQuery.ts +11 -8
package/dist/index.d.mts
CHANGED
|
@@ -112,7 +112,7 @@ declare class ScallopCache {
|
|
|
112
112
|
private interval;
|
|
113
113
|
private tokens;
|
|
114
114
|
private lastRefill;
|
|
115
|
-
constructor(params
|
|
115
|
+
constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
|
|
116
116
|
private get client();
|
|
117
117
|
private refill;
|
|
118
118
|
private removeTokens;
|
|
@@ -1327,8 +1327,8 @@ declare class ScallopBuilder {
|
|
|
1327
1327
|
* @return Take coin and left coin.
|
|
1328
1328
|
*/
|
|
1329
1329
|
selectMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, marketCoinName: string, amount: number, sender?: string): Promise<{
|
|
1330
|
-
takeCoin:
|
|
1331
|
-
leftCoin:
|
|
1330
|
+
takeCoin: TransactionObjectArgument;
|
|
1331
|
+
leftCoin: TransactionObjectArgument;
|
|
1332
1332
|
totalAmount: number;
|
|
1333
1333
|
}>;
|
|
1334
1334
|
/**
|
|
@@ -1341,10 +1341,17 @@ declare class ScallopBuilder {
|
|
|
1341
1341
|
* @return Take coin and left coin.
|
|
1342
1342
|
*/
|
|
1343
1343
|
selectSCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
|
|
1344
|
-
takeCoin:
|
|
1345
|
-
leftCoin:
|
|
1344
|
+
takeCoin: TransactionObjectArgument;
|
|
1345
|
+
leftCoin: TransactionObjectArgument;
|
|
1346
1346
|
totalAmount: number;
|
|
1347
1347
|
}>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Select sCoin or market coin automatically. Prioritize sCoin first
|
|
1350
|
+
*/
|
|
1351
|
+
selectSCoinOrMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
|
|
1352
|
+
sCoin: TransactionObjectArgument | undefined;
|
|
1353
|
+
marketCoin: TransactionObjectArgument | undefined;
|
|
1354
|
+
}>;
|
|
1348
1355
|
/**
|
|
1349
1356
|
* Execute Scallop txBlock using the `signAndSendTxn` methods in suikit.
|
|
1350
1357
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ declare class ScallopCache {
|
|
|
112
112
|
private interval;
|
|
113
113
|
private tokens;
|
|
114
114
|
private lastRefill;
|
|
115
|
-
constructor(params
|
|
115
|
+
constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
|
|
116
116
|
private get client();
|
|
117
117
|
private refill;
|
|
118
118
|
private removeTokens;
|
|
@@ -1327,8 +1327,8 @@ declare class ScallopBuilder {
|
|
|
1327
1327
|
* @return Take coin and left coin.
|
|
1328
1328
|
*/
|
|
1329
1329
|
selectMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, marketCoinName: string, amount: number, sender?: string): Promise<{
|
|
1330
|
-
takeCoin:
|
|
1331
|
-
leftCoin:
|
|
1330
|
+
takeCoin: TransactionObjectArgument;
|
|
1331
|
+
leftCoin: TransactionObjectArgument;
|
|
1332
1332
|
totalAmount: number;
|
|
1333
1333
|
}>;
|
|
1334
1334
|
/**
|
|
@@ -1341,10 +1341,17 @@ declare class ScallopBuilder {
|
|
|
1341
1341
|
* @return Take coin and left coin.
|
|
1342
1342
|
*/
|
|
1343
1343
|
selectSCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
|
|
1344
|
-
takeCoin:
|
|
1345
|
-
leftCoin:
|
|
1344
|
+
takeCoin: TransactionObjectArgument;
|
|
1345
|
+
leftCoin: TransactionObjectArgument;
|
|
1346
1346
|
totalAmount: number;
|
|
1347
1347
|
}>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Select sCoin or market coin automatically. Prioritize sCoin first
|
|
1350
|
+
*/
|
|
1351
|
+
selectSCoinOrMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
|
|
1352
|
+
sCoin: TransactionObjectArgument | undefined;
|
|
1353
|
+
marketCoin: TransactionObjectArgument | undefined;
|
|
1354
|
+
}>;
|
|
1348
1355
|
/**
|
|
1349
1356
|
* Execute Scallop txBlock using the `signAndSendTxn` methods in suikit.
|
|
1350
1357
|
*
|