@scallop-io/sui-scallop-sdk 1.5.0 → 1.5.2
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 +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +25 -25
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/src/builders/coreBuilder.ts +10 -14
- package/src/builders/oracle.ts +10 -2
- package/src/constants/enum.ts +5 -57
- package/src/constants/poolAddress.ts +184 -345
- package/src/constants/testAddress.ts +298 -43
- package/src/constants/xoracle.ts +18 -19
- package/src/models/scallopAddress.ts +45 -0
- package/src/models/scallopQuery.ts +4 -10
- package/src/queries/coreQuery.ts +4 -4
- package/src/queries/xOracleQuery.ts +15 -7
- package/src/types/address.ts +4 -0
- package/src/types/model.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -728,10 +728,7 @@ declare class ScallopQuery {
|
|
|
728
728
|
* @param obligationId - The obligation id.
|
|
729
729
|
* @return Obligation data.
|
|
730
730
|
*/
|
|
731
|
-
queryObligation(obligationId: SuiObjectArg
|
|
732
|
-
version: SuiObjectArg;
|
|
733
|
-
market: SuiObjectArg;
|
|
734
|
-
}): Promise<ObligationQueryInterface | undefined>;
|
|
731
|
+
queryObligation(obligationId: SuiObjectArg): Promise<ObligationQueryInterface | undefined>;
|
|
735
732
|
/**
|
|
736
733
|
* Get all asset coin amounts.
|
|
737
734
|
*
|
|
@@ -2873,6 +2870,9 @@ interface AddressesInterface {
|
|
|
2873
2870
|
id: string;
|
|
2874
2871
|
treasury: string;
|
|
2875
2872
|
metaData: string;
|
|
2873
|
+
coinType: string;
|
|
2874
|
+
symbol: string;
|
|
2875
|
+
decimals: number;
|
|
2876
2876
|
oracle: {
|
|
2877
2877
|
[K in SupportOracleType]: K extends (typeof SUPPORT_ORACLES)[0] ? string : K extends (typeof SUPPORT_ORACLES)[1] ? string : K extends (typeof SUPPORT_ORACLES)[2] ? {
|
|
2878
2878
|
feed: string;
|
|
@@ -2956,6 +2956,7 @@ interface AddressesInterface {
|
|
|
2956
2956
|
id: string;
|
|
2957
2957
|
coins: Partial<Record<SupportSCoin, {
|
|
2958
2958
|
coinType: string;
|
|
2959
|
+
symbol: string;
|
|
2959
2960
|
treasury: string;
|
|
2960
2961
|
metaData: string;
|
|
2961
2962
|
}>>;
|
|
@@ -3012,6 +3013,7 @@ type ScallopClientParams = ScallopParams & ScallopBuilderParams & ScallopQueryPa
|
|
|
3012
3013
|
type ScallopBuilderParams = ScallopParams & {
|
|
3013
3014
|
pythEndpoints?: string[];
|
|
3014
3015
|
usePythPullModel?: boolean;
|
|
3016
|
+
useOnChainXOracleList?: boolean;
|
|
3015
3017
|
} & ScallopQueryParams;
|
|
3016
3018
|
type ScallopQueryParams = ScallopParams & ScallopUtilsParams;
|
|
3017
3019
|
type ScallopUtilsParams = ScallopParams & {
|
package/dist/index.d.ts
CHANGED
|
@@ -728,10 +728,7 @@ declare class ScallopQuery {
|
|
|
728
728
|
* @param obligationId - The obligation id.
|
|
729
729
|
* @return Obligation data.
|
|
730
730
|
*/
|
|
731
|
-
queryObligation(obligationId: SuiObjectArg
|
|
732
|
-
version: SuiObjectArg;
|
|
733
|
-
market: SuiObjectArg;
|
|
734
|
-
}): Promise<ObligationQueryInterface | undefined>;
|
|
731
|
+
queryObligation(obligationId: SuiObjectArg): Promise<ObligationQueryInterface | undefined>;
|
|
735
732
|
/**
|
|
736
733
|
* Get all asset coin amounts.
|
|
737
734
|
*
|
|
@@ -2873,6 +2870,9 @@ interface AddressesInterface {
|
|
|
2873
2870
|
id: string;
|
|
2874
2871
|
treasury: string;
|
|
2875
2872
|
metaData: string;
|
|
2873
|
+
coinType: string;
|
|
2874
|
+
symbol: string;
|
|
2875
|
+
decimals: number;
|
|
2876
2876
|
oracle: {
|
|
2877
2877
|
[K in SupportOracleType]: K extends (typeof SUPPORT_ORACLES)[0] ? string : K extends (typeof SUPPORT_ORACLES)[1] ? string : K extends (typeof SUPPORT_ORACLES)[2] ? {
|
|
2878
2878
|
feed: string;
|
|
@@ -2956,6 +2956,7 @@ interface AddressesInterface {
|
|
|
2956
2956
|
id: string;
|
|
2957
2957
|
coins: Partial<Record<SupportSCoin, {
|
|
2958
2958
|
coinType: string;
|
|
2959
|
+
symbol: string;
|
|
2959
2960
|
treasury: string;
|
|
2960
2961
|
metaData: string;
|
|
2961
2962
|
}>>;
|
|
@@ -3012,6 +3013,7 @@ type ScallopClientParams = ScallopParams & ScallopBuilderParams & ScallopQueryPa
|
|
|
3012
3013
|
type ScallopBuilderParams = ScallopParams & {
|
|
3013
3014
|
pythEndpoints?: string[];
|
|
3014
3015
|
usePythPullModel?: boolean;
|
|
3016
|
+
useOnChainXOracleList?: boolean;
|
|
3015
3017
|
} & ScallopQueryParams;
|
|
3016
3018
|
type ScallopQueryParams = ScallopParams & ScallopUtilsParams;
|
|
3017
3019
|
type ScallopUtilsParams = ScallopParams & {
|