@dodoex/api 3.0.3-rise.1 → 3.0.3-zetachain.10
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.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/adapters/bitcoin/utils/BitcoinApi.d.ts +20 -0
- package/dist/types/adapters/bitcoin/utils/UnitsUtil.d.ts +4 -0
- package/dist/types/chainConfig/basicToken.d.ts +3 -0
- package/dist/types/chainConfig/chain.d.ts +7 -1
- package/dist/types/chainConfig/defineChain.d.ts +83 -0
- package/dist/types/chainConfig/index.d.ts +2 -1
- package/dist/types/chainConfig/utils.d.ts +3 -0
- package/dist/types/gql/gql.d.ts +24 -0
- package/dist/types/gql/graphql.d.ts +816 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/services/SwapWidgetApi.d.ts +2 -0
- package/dist/types/services/TokenApi/graphqlQuery.d.ts +3 -0
- package/dist/types/services/TokenApi/index.d.ts +4 -1
- package/dist/types/services/pool/pmm/pmm.d.ts +0 -1
- package/dist/types/services/swap/SwapApi.d.ts +15 -0
- package/dist/types/services/swap/graphqlQuery.d.ts +15 -0
- package/dist/types/utils/number.d.ts +0 -1
- package/package.json +13 -11
package/dist/types/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
export { setContractRequests } from '@dodoex/dodo-contract-request';
|
|
2
|
-
export {
|
|
2
|
+
export { basicTokenMap, btcSignet, ChainId, contractConfig, etherTokenAddress, platformIdMap, SOL_NATIVE_MINT, WSOL_NATIVE_MINT, zetachainTestnet, } from './chainConfig';
|
|
3
3
|
export { ABIName, CONTRACT_QUERY_KEY, default as ContractRequests, } from './helper/ContractRequests';
|
|
4
4
|
export type { ContractRequestsConfig, Query } from './helper/ContractRequests';
|
|
5
5
|
export { default as GraphQLRequests } from './helper/GraphQLRequests';
|
|
6
6
|
export { default as RestApiRequests } from './helper/RestApiRequests';
|
|
7
7
|
export { AMMV3Api } from './services/ammv3';
|
|
8
8
|
export type { TickData, Ticks } from './services/ammv3';
|
|
9
|
-
export { PMMHelper, PMMModel, PMMState, PoolApi,
|
|
9
|
+
export { getPmmModel, PMMHelper, PMMModel, PMMState, PoolApi, solveQuadraticFunctionForTarget, } from './services/pool';
|
|
10
10
|
export type { PmmModelParams, PoolType } from './services/pool';
|
|
11
11
|
export { SwapWidgetApi } from './services/SwapWidgetApi';
|
|
12
12
|
export { MiningApi, MiningStatusE } from './services/mining';
|
|
13
13
|
export type { MiningMiningInfo } from './services/mining';
|
|
14
14
|
export { TokenApi } from './services/TokenApi';
|
|
15
|
+
export type { Cross_Chain_Swap_Zetachain_OrderCreateQuery, Cross_Chain_Swap_Zetachain_RoutesQuery, Cross_Chain_Swap_Zetachain_TransactionEncodeQuery, Cross_Chain_Swap_ZetachainorderCreateData, Cross_Chain_Swap_ZetachainrouteParams, Cross_Chain_Swap_ZetachaintransactionEncodeParams, } from './gql/graphql';
|
|
15
16
|
export { SwapApi } from './services/swap/SwapApi';
|
|
16
17
|
export { SystemApi } from './services/system/SystemApi';
|
|
17
18
|
export type ExcludeNone<T> = NonNullable<T>;
|
|
@@ -151,6 +151,7 @@ export declare class SwapWidgetApi {
|
|
|
151
151
|
paperDarkContrast?: string | undefined;
|
|
152
152
|
backdrop?: string | undefined;
|
|
153
153
|
input?: string | undefined;
|
|
154
|
+
cardInput?: string | undefined;
|
|
154
155
|
tag?: string | undefined;
|
|
155
156
|
} | undefined;
|
|
156
157
|
tabActive?: {
|
|
@@ -271,6 +272,7 @@ export declare class SwapWidgetApi {
|
|
|
271
272
|
paperDarkContrast?: string | undefined;
|
|
272
273
|
backdrop?: string | undefined;
|
|
273
274
|
input?: string | undefined;
|
|
275
|
+
cardInput?: string | undefined;
|
|
274
276
|
tag?: string | undefined;
|
|
275
277
|
} | undefined;
|
|
276
278
|
tabActive?: {
|
|
@@ -2,6 +2,9 @@ export declare const tokenGraphqlQuery: {
|
|
|
2
2
|
fetchErc20SwapCrossList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchErc20SwapCrossChainListQuery, import("../../gql/graphql").Exact<{
|
|
3
3
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Erc20listV2Filter>;
|
|
4
4
|
}>>;
|
|
5
|
+
cross_chain_zetachain_token_list: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Zetachain_Token_ListQuery, import("../../gql/graphql").Exact<{
|
|
6
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Zetachain_TokentokenlistFilter>;
|
|
7
|
+
}>>;
|
|
5
8
|
fetchErc20ForecastSlippage: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchErc20ForecastSlippageQuery, import("../../gql/graphql").Exact<{
|
|
6
9
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Erc20_Extenderc20ExtendV2Filter>;
|
|
7
10
|
}>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ContractRequests, { ContractRequestsConfig } from '../../helper/ContractRequests';
|
|
2
1
|
import BigNumber from 'bignumber.js';
|
|
3
2
|
import { ChainId } from '../../chainConfig';
|
|
3
|
+
import ContractRequests, { ContractRequestsConfig } from '../../helper/ContractRequests';
|
|
4
4
|
import RestApiRequest from '../../helper/RestApiRequests';
|
|
5
5
|
export interface TokenApiProps {
|
|
6
6
|
contractRequests?: ContractRequests;
|
|
@@ -15,6 +15,9 @@ export declare class TokenApi {
|
|
|
15
15
|
fetchErc20SwapCrossList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchErc20SwapCrossChainListQuery, import("../../gql/graphql").Exact<{
|
|
16
16
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Erc20listV2Filter>;
|
|
17
17
|
}>>;
|
|
18
|
+
cross_chain_zetachain_token_list: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Zetachain_Token_ListQuery, import("../../gql/graphql").Exact<{
|
|
19
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Zetachain_TokentokenlistFilter>;
|
|
20
|
+
}>>;
|
|
18
21
|
fetchErc20ForecastSlippage: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchErc20ForecastSlippageQuery, import("../../gql/graphql").Exact<{
|
|
19
22
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Erc20_Extenderc20ExtendV2Filter>;
|
|
20
23
|
}>>;
|
|
@@ -4,5 +4,20 @@ export declare class SwapApi {
|
|
|
4
4
|
fetchUserSwapOrderHistories: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchUserSwapOrderHistoriesQuery, import("../../gql/graphql").Exact<{
|
|
5
5
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").User_SwapswapFilter>;
|
|
6
6
|
}>>;
|
|
7
|
+
cross_chain_swap_zetachain_routes: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_RoutesQuery, import("../../gql/graphql").Exact<{
|
|
8
|
+
where?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachainrouteParams>;
|
|
9
|
+
}>>;
|
|
10
|
+
cross_chain_swap_zetachain_transactionEncode: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_TransactionEncodeQuery, import("../../gql/graphql").Exact<{
|
|
11
|
+
data?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachaintransactionEncodeParams>;
|
|
12
|
+
}>>;
|
|
13
|
+
cross_chain_swap_zetachain_orderCreate: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_OrderCreateQuery, import("../../gql/graphql").Exact<{
|
|
14
|
+
data?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachainorderCreateData>;
|
|
15
|
+
}>>;
|
|
16
|
+
cross_chain_swap_zetachain_orderList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Swap_Zetachain_OrderListQuery, import("../../gql/graphql").Exact<{
|
|
17
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Swap_ZetachainorderListData>;
|
|
18
|
+
}>>;
|
|
19
|
+
cross_chain_swap_zetachain_swapOrderList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Swap_Zetachain_SwapOrderListQuery, import("../../gql/graphql").Exact<{
|
|
20
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Swap_ZetachainswapOrderListData>;
|
|
21
|
+
}>>;
|
|
7
22
|
};
|
|
8
23
|
}
|
|
@@ -2,4 +2,19 @@ export declare const swapGraphqlQuery: {
|
|
|
2
2
|
fetchUserSwapOrderHistories: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").FetchUserSwapOrderHistoriesQuery, import("../../gql/graphql").Exact<{
|
|
3
3
|
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").User_SwapswapFilter>;
|
|
4
4
|
}>>;
|
|
5
|
+
cross_chain_swap_zetachain_routes: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_RoutesQuery, import("../../gql/graphql").Exact<{
|
|
6
|
+
where?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachainrouteParams>;
|
|
7
|
+
}>>;
|
|
8
|
+
cross_chain_swap_zetachain_transactionEncode: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_TransactionEncodeQuery, import("../../gql/graphql").Exact<{
|
|
9
|
+
data?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachaintransactionEncodeParams>;
|
|
10
|
+
}>>;
|
|
11
|
+
cross_chain_swap_zetachain_orderCreate: import("../../gql/graphql").TypedDocumentString<import("../..").Cross_Chain_Swap_Zetachain_OrderCreateQuery, import("../../gql/graphql").Exact<{
|
|
12
|
+
data?: import("../../gql/graphql").InputMaybe<import("../..").Cross_Chain_Swap_ZetachainorderCreateData>;
|
|
13
|
+
}>>;
|
|
14
|
+
cross_chain_swap_zetachain_orderList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Swap_Zetachain_OrderListQuery, import("../../gql/graphql").Exact<{
|
|
15
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Swap_ZetachainorderListData>;
|
|
16
|
+
}>>;
|
|
17
|
+
cross_chain_swap_zetachain_swapOrderList: import("../../gql/graphql").TypedDocumentString<import("../../gql/graphql").Cross_Chain_Swap_Zetachain_SwapOrderListQuery, import("../../gql/graphql").Exact<{
|
|
18
|
+
where?: import("../../gql/graphql").InputMaybe<import("../../gql/graphql").Cross_Chain_Swap_ZetachainswapOrderListData>;
|
|
19
|
+
}>>;
|
|
5
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/api",
|
|
3
|
-
"version": "3.0.3-
|
|
3
|
+
"version": "3.0.3-zetachain.10",
|
|
4
4
|
"description": "DODO API Kit",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"release": "semantic-release",
|
|
22
22
|
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
23
23
|
"release.npm-publish": "npm publish --access public",
|
|
24
|
-
"release.npm-publish-beta": "npm publish --tag beta"
|
|
24
|
+
"release.npm-publish-beta": "yarn run build && npm publish --tag beta"
|
|
25
25
|
},
|
|
26
26
|
"author": "",
|
|
27
27
|
"publishConfig": {
|
|
@@ -55,14 +55,17 @@
|
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@dodoex/contract-request": "1.x",
|
|
57
57
|
"@dodoex/dodo-contract-request": "1.x",
|
|
58
|
-
"bignumber.js": "
|
|
59
|
-
"lodash": "
|
|
58
|
+
"bignumber.js": "^9.3.0",
|
|
59
|
+
"lodash": "^4.17.21",
|
|
60
|
+
"@reown/appkit": "^1.7.5",
|
|
61
|
+
"@solana/web3.js": "1.98.2",
|
|
62
|
+
"@solana/spl-token": "^0.4.13"
|
|
60
63
|
},
|
|
61
64
|
"dependencies": {
|
|
62
|
-
"@ethersproject/abi": "^5.
|
|
63
|
-
"@ethersproject/properties": "^5.
|
|
64
|
-
"@ethersproject/providers": "^5.
|
|
65
|
-
"@ethersproject/web": "^5.
|
|
65
|
+
"@ethersproject/abi": "^5.8.0",
|
|
66
|
+
"@ethersproject/properties": "^5.8.0",
|
|
67
|
+
"@ethersproject/providers": "^5.8.0",
|
|
68
|
+
"@ethersproject/web": "^5.8.0",
|
|
66
69
|
"cross-fetch": "^4.0.0",
|
|
67
70
|
"graphql": "^16.8.1",
|
|
68
71
|
"graphql-request": "^6.1.0",
|
|
@@ -73,7 +76,7 @@
|
|
|
73
76
|
"@babel/preset-env": "^7.16.11",
|
|
74
77
|
"@babel/preset-react": "^7.18.6",
|
|
75
78
|
"@babel/preset-typescript": "^7.16.7",
|
|
76
|
-
"@ethersproject/contracts": "
|
|
79
|
+
"@ethersproject/contracts": "^5.8.0",
|
|
77
80
|
"@graphql-codegen/cli": "^5.0.0",
|
|
78
81
|
"@graphql-codegen/client-preset": "^4.1.0",
|
|
79
82
|
"@rollup/plugin-babel": "^6.0.4",
|
|
@@ -102,5 +105,4 @@
|
|
|
102
105
|
"ts-jest": "^29.0.1",
|
|
103
106
|
"typescript": "^5.6.3"
|
|
104
107
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
108
|
+
}
|