@scallop-io/sui-scallop-sdk 2.0.5 → 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 CHANGED
@@ -112,7 +112,7 @@ declare class ScallopCache {
112
112
  private interval;
113
113
  private tokens;
114
114
  private lastRefill;
115
- constructor(params: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
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: _scallop_io_sui_kit.TransactionObjectArgument;
1331
- leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
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: _scallop_io_sui_kit.TransactionObjectArgument;
1345
- leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
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: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
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: _scallop_io_sui_kit.TransactionObjectArgument;
1331
- leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
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: _scallop_io_sui_kit.TransactionObjectArgument;
1345
- leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
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
  *