@scallop-io/sui-scallop-sdk 2.1.9 → 2.2.1-sponsored-feeds-alpha.1
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 +38 -8
- package/dist/index.d.ts +38 -8
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -3
- package/src/builders/oracles/index.ts +40 -9
- package/src/builders/vescaBuilder.ts +43 -36
- package/src/models/scallopBuilder.ts +3 -0
- package/src/models/scallopClient.ts +5 -2
- package/src/types/builder/vesca.ts +37 -36
package/dist/index.d.mts
CHANGED
|
@@ -1062,6 +1062,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
1062
1062
|
type ScallopBuilderParams = {
|
|
1063
1063
|
query?: ScallopQuery;
|
|
1064
1064
|
usePythPullModel?: boolean;
|
|
1065
|
+
sponsoredFeeds?: string[];
|
|
1065
1066
|
useOnChainXOracleList?: boolean;
|
|
1066
1067
|
} & ScallopQueryParams;
|
|
1067
1068
|
/**
|
|
@@ -1079,6 +1080,7 @@ declare class ScallopBuilder implements ScallopBuilderInterface {
|
|
|
1079
1080
|
readonly query: ScallopQuery;
|
|
1080
1081
|
readonly usePythPullModel: boolean;
|
|
1081
1082
|
readonly useOnChainXOracleList: boolean;
|
|
1083
|
+
readonly sponsoredFeeds: string[];
|
|
1082
1084
|
constructor(params: ScallopBuilderParams);
|
|
1083
1085
|
get utils(): ScallopUtils;
|
|
1084
1086
|
get constants(): ScallopConstants;
|
|
@@ -1888,7 +1890,7 @@ type VeScaNormalMethods = {
|
|
|
1888
1890
|
splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
|
|
1889
1891
|
mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
|
|
1890
1892
|
};
|
|
1891
|
-
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult
|
|
1893
|
+
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult;
|
|
1892
1894
|
type VeScaQuickMethods = {
|
|
1893
1895
|
/**
|
|
1894
1896
|
* Quick methods to automate
|
|
@@ -1906,13 +1908,41 @@ type VeScaQuickMethods = {
|
|
|
1906
1908
|
* @param lockPeriodInDays
|
|
1907
1909
|
* @param autoCheck
|
|
1908
1910
|
*/
|
|
1909
|
-
lockScaQuick(
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1911
|
+
lockScaQuick(params: {
|
|
1912
|
+
amountOrCoin?: SuiObjectArg | number;
|
|
1913
|
+
lockPeriodInDays?: number;
|
|
1914
|
+
autoCheck?: boolean;
|
|
1915
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1916
|
+
}): Promise<void>;
|
|
1917
|
+
extendLockPeriodQuick: (params: {
|
|
1918
|
+
lockPeriodInDays: number;
|
|
1919
|
+
autoCheck?: boolean;
|
|
1920
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1921
|
+
}) => Promise<void>;
|
|
1922
|
+
extendLockAmountQuick: (params: {
|
|
1923
|
+
scaAmount: number;
|
|
1924
|
+
autoCheck?: boolean;
|
|
1925
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1926
|
+
}) => Promise<void>;
|
|
1927
|
+
renewExpiredVeScaQuick: (params: {
|
|
1928
|
+
scaAmount: number;
|
|
1929
|
+
lockPeriodInDays: number;
|
|
1930
|
+
autoCheck?: boolean;
|
|
1931
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1932
|
+
}) => Promise<void>;
|
|
1933
|
+
redeemScaQuick: <T extends boolean>(params: {
|
|
1934
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1935
|
+
transferSca?: T;
|
|
1936
|
+
}) => Promise<QuickMethodReturnType<T> | undefined>;
|
|
1937
|
+
splitVeScaQuick: <T extends boolean>(params: {
|
|
1938
|
+
splitAmount: string;
|
|
1939
|
+
veScaKey: string;
|
|
1940
|
+
transferVeScaKey?: T;
|
|
1941
|
+
}) => Promise<QuickMethodReturnType<T> | undefined>;
|
|
1942
|
+
mergeVeScaQuick: (params: {
|
|
1943
|
+
targetVeScaKey: string;
|
|
1944
|
+
sourceVeScaKey: string;
|
|
1945
|
+
}) => Promise<void>;
|
|
1916
1946
|
};
|
|
1917
1947
|
type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
|
|
1918
1948
|
type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
|
package/dist/index.d.ts
CHANGED
|
@@ -1062,6 +1062,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
|
|
|
1062
1062
|
type ScallopBuilderParams = {
|
|
1063
1063
|
query?: ScallopQuery;
|
|
1064
1064
|
usePythPullModel?: boolean;
|
|
1065
|
+
sponsoredFeeds?: string[];
|
|
1065
1066
|
useOnChainXOracleList?: boolean;
|
|
1066
1067
|
} & ScallopQueryParams;
|
|
1067
1068
|
/**
|
|
@@ -1079,6 +1080,7 @@ declare class ScallopBuilder implements ScallopBuilderInterface {
|
|
|
1079
1080
|
readonly query: ScallopQuery;
|
|
1080
1081
|
readonly usePythPullModel: boolean;
|
|
1081
1082
|
readonly useOnChainXOracleList: boolean;
|
|
1083
|
+
readonly sponsoredFeeds: string[];
|
|
1082
1084
|
constructor(params: ScallopBuilderParams);
|
|
1083
1085
|
get utils(): ScallopUtils;
|
|
1084
1086
|
get constants(): ScallopConstants;
|
|
@@ -1888,7 +1890,7 @@ type VeScaNormalMethods = {
|
|
|
1888
1890
|
splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
|
|
1889
1891
|
mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
|
|
1890
1892
|
};
|
|
1891
|
-
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult
|
|
1893
|
+
type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult;
|
|
1892
1894
|
type VeScaQuickMethods = {
|
|
1893
1895
|
/**
|
|
1894
1896
|
* Quick methods to automate
|
|
@@ -1906,13 +1908,41 @@ type VeScaQuickMethods = {
|
|
|
1906
1908
|
* @param lockPeriodInDays
|
|
1907
1909
|
* @param autoCheck
|
|
1908
1910
|
*/
|
|
1909
|
-
lockScaQuick(
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1911
|
+
lockScaQuick(params: {
|
|
1912
|
+
amountOrCoin?: SuiObjectArg | number;
|
|
1913
|
+
lockPeriodInDays?: number;
|
|
1914
|
+
autoCheck?: boolean;
|
|
1915
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1916
|
+
}): Promise<void>;
|
|
1917
|
+
extendLockPeriodQuick: (params: {
|
|
1918
|
+
lockPeriodInDays: number;
|
|
1919
|
+
autoCheck?: boolean;
|
|
1920
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1921
|
+
}) => Promise<void>;
|
|
1922
|
+
extendLockAmountQuick: (params: {
|
|
1923
|
+
scaAmount: number;
|
|
1924
|
+
autoCheck?: boolean;
|
|
1925
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1926
|
+
}) => Promise<void>;
|
|
1927
|
+
renewExpiredVeScaQuick: (params: {
|
|
1928
|
+
scaAmount: number;
|
|
1929
|
+
lockPeriodInDays: number;
|
|
1930
|
+
autoCheck?: boolean;
|
|
1931
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1932
|
+
}) => Promise<void>;
|
|
1933
|
+
redeemScaQuick: <T extends boolean>(params: {
|
|
1934
|
+
veScaKey?: SuiObjectData$1 | string;
|
|
1935
|
+
transferSca?: T;
|
|
1936
|
+
}) => Promise<QuickMethodReturnType<T> | undefined>;
|
|
1937
|
+
splitVeScaQuick: <T extends boolean>(params: {
|
|
1938
|
+
splitAmount: string;
|
|
1939
|
+
veScaKey: string;
|
|
1940
|
+
transferVeScaKey?: T;
|
|
1941
|
+
}) => Promise<QuickMethodReturnType<T> | undefined>;
|
|
1942
|
+
mergeVeScaQuick: (params: {
|
|
1943
|
+
targetVeScaKey: string;
|
|
1944
|
+
sourceVeScaKey: string;
|
|
1945
|
+
}) => Promise<void>;
|
|
1916
1946
|
};
|
|
1917
1947
|
type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
|
|
1918
1948
|
type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
|