@scallop-io/sui-scallop-sdk 2.2.3-pyth-sponsored-transaction-alpha.3 → 2.2.3

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
@@ -1108,6 +1108,7 @@ declare class ScallopBuilder implements ScallopBuilderInterface {
1108
1108
  * @param assetCoinName - Specific support asset coin name.
1109
1109
  * @param amount - Amount of coins to be selected.
1110
1110
  * @param sender - Sender address.
1111
+ * @param isSponsored - Whether the transaction is a sponsored transaction.
1111
1112
  * @return Take coin and left coin.
1112
1113
  */
1113
1114
  selectCoin(txBlock: ScallopTxBlock | SuiTxBlock, assetCoinName: string, amount: number, sender?: string, isSponsored?: boolean): Promise<{
@@ -1814,13 +1815,33 @@ type CoreNormalMethods = {
1814
1815
  };
1815
1816
  type CoreQuickMethods = {
1816
1817
  addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1817
- takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1818
- borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1819
- borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1818
+ takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1819
+ usePythPullModel?: boolean;
1820
+ useOnChainXOracleList?: boolean;
1821
+ sponsoredFeeds?: string[];
1822
+ isSponsoredTx?: boolean;
1823
+ }) => Promise<TransactionResult>;
1824
+ borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1825
+ usePythPullModel?: boolean;
1826
+ useOnChainXOracleList?: boolean;
1827
+ sponsoredFeeds?: string[];
1828
+ isSponsoredTx?: boolean;
1829
+ }) => Promise<TransactionResult>;
1830
+ borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1831
+ usePythPullModel?: boolean;
1832
+ useOnChainXOracleList?: boolean;
1833
+ sponsoredFeeds?: string[];
1834
+ isSponsoredTx?: boolean;
1835
+ }) => Promise<TransactionResult>;
1820
1836
  depositQuick: (amount: number, poolCoinName: string, returnSCoin?: boolean) => Promise<TransactionResult>;
1821
1837
  withdrawQuick: (amount: number, poolCoinName: string) => Promise<TransactionResult>;
1822
1838
  repayQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
1823
- updateAssetPricesQuick: (assetCoinNames?: string[]) => Promise<void>;
1839
+ updateAssetPricesQuick: (assetCoinNames?: string[], updateOracleOptions?: {
1840
+ usePythPullModel?: boolean;
1841
+ useOnChainXOracleList?: boolean;
1842
+ sponsoredFeeds?: string[];
1843
+ isSponsoredTx?: boolean;
1844
+ }) => Promise<void>;
1824
1845
  };
1825
1846
  type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
1826
1847
  type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
package/dist/index.d.ts CHANGED
@@ -1108,6 +1108,7 @@ declare class ScallopBuilder implements ScallopBuilderInterface {
1108
1108
  * @param assetCoinName - Specific support asset coin name.
1109
1109
  * @param amount - Amount of coins to be selected.
1110
1110
  * @param sender - Sender address.
1111
+ * @param isSponsored - Whether the transaction is a sponsored transaction.
1111
1112
  * @return Take coin and left coin.
1112
1113
  */
1113
1114
  selectCoin(txBlock: ScallopTxBlock | SuiTxBlock, assetCoinName: string, amount: number, sender?: string, isSponsored?: boolean): Promise<{
@@ -1814,13 +1815,33 @@ type CoreNormalMethods = {
1814
1815
  };
1815
1816
  type CoreQuickMethods = {
1816
1817
  addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1817
- takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1818
- borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1819
- borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1818
+ takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1819
+ usePythPullModel?: boolean;
1820
+ useOnChainXOracleList?: boolean;
1821
+ sponsoredFeeds?: string[];
1822
+ isSponsoredTx?: boolean;
1823
+ }) => Promise<TransactionResult>;
1824
+ borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1825
+ usePythPullModel?: boolean;
1826
+ useOnChainXOracleList?: boolean;
1827
+ sponsoredFeeds?: string[];
1828
+ isSponsoredTx?: boolean;
1829
+ }) => Promise<TransactionResult>;
1830
+ borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, updateOracleOptions?: {
1831
+ usePythPullModel?: boolean;
1832
+ useOnChainXOracleList?: boolean;
1833
+ sponsoredFeeds?: string[];
1834
+ isSponsoredTx?: boolean;
1835
+ }) => Promise<TransactionResult>;
1820
1836
  depositQuick: (amount: number, poolCoinName: string, returnSCoin?: boolean) => Promise<TransactionResult>;
1821
1837
  withdrawQuick: (amount: number, poolCoinName: string) => Promise<TransactionResult>;
1822
1838
  repayQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<void>;
1823
- updateAssetPricesQuick: (assetCoinNames?: string[]) => Promise<void>;
1839
+ updateAssetPricesQuick: (assetCoinNames?: string[], updateOracleOptions?: {
1840
+ usePythPullModel?: boolean;
1841
+ useOnChainXOracleList?: boolean;
1842
+ sponsoredFeeds?: string[];
1843
+ isSponsoredTx?: boolean;
1844
+ }) => Promise<void>;
1824
1845
  };
1825
1846
  type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
1826
1847
  type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;