@scallop-io/sui-scallop-sdk 1.5.0 → 1.5.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 +7 -5
- package/dist/index.d.ts +7 -5
- 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/common.ts +1 -1
- 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
|
@@ -49,7 +49,7 @@ declare const API_BASE_URL: "https://sui.apis.scallop.io";
|
|
|
49
49
|
declare const SDK_API_BASE_URL: "https://sdk.api.scallop.io";
|
|
50
50
|
declare const IS_VE_SCA_TEST: boolean;
|
|
51
51
|
declare const USE_TEST_ADDRESS: boolean;
|
|
52
|
-
declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "
|
|
52
|
+
declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "67c44a103fe1b8c454eb9699";
|
|
53
53
|
declare const PROTOCOL_OBJECT_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
|
|
54
54
|
declare const BORROW_FEE_PROTOCOL_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
|
|
55
55
|
declare const SCA_COIN_TYPE: "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA" | "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
|
|
@@ -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
|
@@ -49,7 +49,7 @@ declare const API_BASE_URL: "https://sui.apis.scallop.io";
|
|
|
49
49
|
declare const SDK_API_BASE_URL: "https://sdk.api.scallop.io";
|
|
50
50
|
declare const IS_VE_SCA_TEST: boolean;
|
|
51
51
|
declare const USE_TEST_ADDRESS: boolean;
|
|
52
|
-
declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "
|
|
52
|
+
declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "67c44a103fe1b8c454eb9699";
|
|
53
53
|
declare const PROTOCOL_OBJECT_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
|
|
54
54
|
declare const BORROW_FEE_PROTOCOL_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
|
|
55
55
|
declare const SCA_COIN_TYPE: "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA" | "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
|
|
@@ -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 & {
|