@scallop-io/sui-scallop-sdk 2.2.3 → 2.2.4
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 +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/builders/coreBuilder.ts +25 -25
- package/src/builders/referralBuilder.ts +2 -8
- package/src/models/scallopClient.ts +27 -11
- package/src/types/builder/core.ts +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1524,6 +1524,7 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1524
1524
|
* @param sign - Decide to directly sign the transaction or return the transaction block.
|
|
1525
1525
|
* @param obligationId - The obligation object.
|
|
1526
1526
|
* @param walletAddress - The wallet address of the owner.
|
|
1527
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1527
1528
|
* @return Transaction block response or transaction block.
|
|
1528
1529
|
*/
|
|
1529
1530
|
depositCollateral(collateralCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
|
|
@@ -1537,9 +1538,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1537
1538
|
* @param obligationId - The obligation object.
|
|
1538
1539
|
* @param obligationKey - The obligation key object to verifying obligation authority.
|
|
1539
1540
|
* @param walletAddress - The wallet address of the owner.
|
|
1541
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1540
1542
|
* @return Transaction block response or transaction block.
|
|
1541
1543
|
*/
|
|
1542
|
-
withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1544
|
+
withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1543
1545
|
/**
|
|
1544
1546
|
* Deposit asset into the specific pool.
|
|
1545
1547
|
*
|
|
@@ -1583,9 +1585,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1583
1585
|
* @param obligationId - The obligation object.
|
|
1584
1586
|
* @param obligationKey - The obligation key object to verifying obligation authority.
|
|
1585
1587
|
* @param walletAddress - The wallet address of the owner.
|
|
1588
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1586
1589
|
* @return Transaction block response or transaction block.
|
|
1587
1590
|
*/
|
|
1588
|
-
borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1591
|
+
borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1589
1592
|
/**
|
|
1590
1593
|
* Repay asset into the specific pool.
|
|
1591
1594
|
*
|
|
@@ -1594,9 +1597,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1594
1597
|
* @param sign - Decide to directly sign the transaction or return the transaction block.
|
|
1595
1598
|
* @param obligationId - The obligation object.
|
|
1596
1599
|
* @param walletAddress - The wallet address of the owner.
|
|
1600
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1597
1601
|
* @return Transaction block response or transaction block.
|
|
1598
1602
|
*/
|
|
1599
|
-
repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1603
|
+
repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1600
1604
|
/**
|
|
1601
1605
|
* FlashLoan asset from the specific pool.
|
|
1602
1606
|
*
|
|
@@ -1814,7 +1818,7 @@ type CoreNormalMethods = {
|
|
|
1814
1818
|
repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
|
|
1815
1819
|
};
|
|
1816
1820
|
type CoreQuickMethods = {
|
|
1817
|
-
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
|
|
1821
|
+
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
|
|
1818
1822
|
takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
|
|
1819
1823
|
usePythPullModel?: boolean;
|
|
1820
1824
|
useOnChainXOracleList?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1524,6 +1524,7 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1524
1524
|
* @param sign - Decide to directly sign the transaction or return the transaction block.
|
|
1525
1525
|
* @param obligationId - The obligation object.
|
|
1526
1526
|
* @param walletAddress - The wallet address of the owner.
|
|
1527
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1527
1528
|
* @return Transaction block response or transaction block.
|
|
1528
1529
|
*/
|
|
1529
1530
|
depositCollateral(collateralCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
|
|
@@ -1537,9 +1538,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1537
1538
|
* @param obligationId - The obligation object.
|
|
1538
1539
|
* @param obligationKey - The obligation key object to verifying obligation authority.
|
|
1539
1540
|
* @param walletAddress - The wallet address of the owner.
|
|
1541
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1540
1542
|
* @return Transaction block response or transaction block.
|
|
1541
1543
|
*/
|
|
1542
|
-
withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1544
|
+
withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1543
1545
|
/**
|
|
1544
1546
|
* Deposit asset into the specific pool.
|
|
1545
1547
|
*
|
|
@@ -1583,9 +1585,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1583
1585
|
* @param obligationId - The obligation object.
|
|
1584
1586
|
* @param obligationKey - The obligation key object to verifying obligation authority.
|
|
1585
1587
|
* @param walletAddress - The wallet address of the owner.
|
|
1588
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1586
1589
|
* @return Transaction block response or transaction block.
|
|
1587
1590
|
*/
|
|
1588
|
-
borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1591
|
+
borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1589
1592
|
/**
|
|
1590
1593
|
* Repay asset into the specific pool.
|
|
1591
1594
|
*
|
|
@@ -1594,9 +1597,10 @@ declare class ScallopClient implements ScallopClientInterface {
|
|
|
1594
1597
|
* @param sign - Decide to directly sign the transaction or return the transaction block.
|
|
1595
1598
|
* @param obligationId - The obligation object.
|
|
1596
1599
|
* @param walletAddress - The wallet address of the owner.
|
|
1600
|
+
* @param isSponsoredTx - Whether the transaction is sponsored.
|
|
1597
1601
|
* @return Transaction block response or transaction block.
|
|
1598
1602
|
*/
|
|
1599
|
-
repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
|
|
1603
|
+
repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string, isSponsoredTx?: boolean): Promise<ScallopClientFnReturnType<S>>;
|
|
1600
1604
|
/**
|
|
1601
1605
|
* FlashLoan asset from the specific pool.
|
|
1602
1606
|
*
|
|
@@ -1814,7 +1818,7 @@ type CoreNormalMethods = {
|
|
|
1814
1818
|
repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
|
|
1815
1819
|
};
|
|
1816
1820
|
type CoreQuickMethods = {
|
|
1817
|
-
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
|
|
1821
|
+
addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
|
|
1818
1822
|
takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
|
|
1819
1823
|
usePythPullModel?: boolean;
|
|
1820
1824
|
useOnChainXOracleList?: boolean;
|