@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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CaipNetwork } from '@reown/appkit-common';
|
|
2
|
+
export type Interface = {
|
|
3
|
+
getUTXOs: (params: GetUTXOsParams) => Promise<UTXO[]>;
|
|
4
|
+
};
|
|
5
|
+
export type GetUTXOsParams = {
|
|
6
|
+
network: CaipNetwork;
|
|
7
|
+
address: string;
|
|
8
|
+
};
|
|
9
|
+
export type UTXO = {
|
|
10
|
+
txid: string;
|
|
11
|
+
vout: number;
|
|
12
|
+
value: number;
|
|
13
|
+
status: {
|
|
14
|
+
confirmed: boolean;
|
|
15
|
+
block_height: number;
|
|
16
|
+
block_hash: string;
|
|
17
|
+
block_time: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const BitcoinApi: Interface;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
1
2
|
import { ChainId } from './chain';
|
|
2
3
|
export declare const etherTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
4
|
+
export declare const SOL_NATIVE_MINT: PublicKey;
|
|
5
|
+
export declare const WSOL_NATIVE_MINT: PublicKey;
|
|
3
6
|
declare const DEFAULT_BASIC_TOKEN: {
|
|
4
7
|
symbol: string;
|
|
5
8
|
address: string;
|
|
@@ -22,5 +22,11 @@ export declare enum ChainId {
|
|
|
22
22
|
PLUME_TESTNET = 98864,
|
|
23
23
|
NEOX = 47763,
|
|
24
24
|
MORPH = 2818,
|
|
25
|
-
RISE_TESTNET = 11155931
|
|
25
|
+
RISE_TESTNET = 11155931,
|
|
26
|
+
ZETACHAIN = 7000,
|
|
27
|
+
ZETACHAIN_TESTNET = 7001,
|
|
28
|
+
SOLANA = 1399811149,
|
|
29
|
+
SOLANA_DEVNET = 1399811151,
|
|
30
|
+
BTC_SIGNET = 18333,
|
|
31
|
+
BTC = 183333
|
|
26
32
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ChainId } from './chain';
|
|
2
|
+
export declare const zetachainTestnet: {
|
|
3
|
+
blockExplorers: {
|
|
4
|
+
readonly default: {
|
|
5
|
+
readonly name: "ZetaScan";
|
|
6
|
+
readonly url: "https://zetachain-testnet.blockscout.com";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
contracts: {
|
|
10
|
+
readonly multicall3: {
|
|
11
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
12
|
+
readonly blockCreated: 2715217;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ensTlds?: readonly string[] | undefined;
|
|
16
|
+
name: "ZetaChain testnet";
|
|
17
|
+
nativeCurrency: {
|
|
18
|
+
readonly decimals: 18;
|
|
19
|
+
readonly name: "tZETA";
|
|
20
|
+
readonly symbol: "tZETA";
|
|
21
|
+
};
|
|
22
|
+
rpcUrls: {
|
|
23
|
+
readonly default: {
|
|
24
|
+
readonly http: readonly ["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
sourceId?: number | undefined;
|
|
28
|
+
testnet: true;
|
|
29
|
+
custom?: Record<string, unknown> | undefined;
|
|
30
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
31
|
+
formatters?: undefined;
|
|
32
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
33
|
+
id: ChainId.ZETACHAIN_TESTNET;
|
|
34
|
+
chainNamespace: "eip155";
|
|
35
|
+
caipNetworkId: "eip155:7001";
|
|
36
|
+
assets?: {
|
|
37
|
+
imageId: string | undefined;
|
|
38
|
+
imageUrl: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
export declare const btcSignet: {
|
|
42
|
+
blockExplorers: {
|
|
43
|
+
readonly default: {
|
|
44
|
+
readonly name: "mempool";
|
|
45
|
+
readonly url: "https://mempool.space/";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
contracts?: import("@reown/appkit/networks").Prettify<{
|
|
49
|
+
[key: string]: import("viem").ChainContract | {
|
|
50
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
} & {
|
|
53
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
54
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
55
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
56
|
+
universalSignatureVerifier?: import("viem").ChainContract | undefined;
|
|
57
|
+
}> | undefined;
|
|
58
|
+
ensTlds?: readonly string[] | undefined;
|
|
59
|
+
name: "Bitcoin Signet";
|
|
60
|
+
nativeCurrency: {
|
|
61
|
+
readonly name: "sBTC";
|
|
62
|
+
readonly symbol: "sBTC";
|
|
63
|
+
readonly decimals: 8;
|
|
64
|
+
};
|
|
65
|
+
rpcUrls: {
|
|
66
|
+
readonly default: {
|
|
67
|
+
readonly http: readonly ["https://rpc.walletconnect.org/v1"];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
sourceId?: number | undefined;
|
|
71
|
+
testnet: true;
|
|
72
|
+
custom?: Record<string, unknown> | undefined;
|
|
73
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
74
|
+
formatters?: undefined;
|
|
75
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
76
|
+
id: "000000000933ea01ad0ee984209779ba1";
|
|
77
|
+
chainNamespace: "bip122";
|
|
78
|
+
caipNetworkId: "bip122:000000000933ea01ad0ee984209779ba1";
|
|
79
|
+
assets?: {
|
|
80
|
+
imageId: string | undefined;
|
|
81
|
+
imageUrl: string | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
export { basicTokenMap, etherTokenAddress, SOL_NATIVE_MINT, WSOL_NATIVE_MINT, } from './basicToken';
|
|
1
2
|
export { ChainId } from './chain';
|
|
2
|
-
export { etherTokenAddress, basicTokenMap } from './basicToken';
|
|
3
3
|
export { default as contractConfig } from './contractConfig';
|
|
4
|
+
export { btcSignet, zetachainTestnet } from './defineChain';
|
|
4
5
|
export { platformIdMap } from './platform';
|
package/dist/types/gql/gql.d.ts
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
3
3
|
*/
|
|
4
4
|
export declare function graphql(source: '\n query FetchErc20SwapCrossChainList($where: Erc20listV2Filter) {\n erc20_swapCrossChainList(where: $where) {\n name\n address\n symbol\n decimals\n slippage\n chainId\n logoImg\n tokenlists {\n name\n status\n }\n domains {\n name\n }\n funcLabels {\n key\n }\n attributeLabels {\n key\n }\n }\n }\n '): typeof import('./graphql').FetchErc20SwapCrossChainListDocument;
|
|
5
|
+
/**
|
|
6
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
7
|
+
*/
|
|
8
|
+
export declare function graphql(source: '\n query Cross_chain_zetachain_token_list(\n $where: Cross_chain_zetachain_tokentokenlistFilter\n ) {\n cross_chain_zetachain_token_list(where: $where) {\n id\n name\n address\n symbol\n decimals\n logo\n chainId\n position\n slippage\n }\n }\n '): typeof import('./graphql').Cross_Chain_Zetachain_Token_ListDocument;
|
|
5
9
|
/**
|
|
6
10
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
7
11
|
*/
|
|
@@ -66,6 +70,26 @@ export declare function graphql(source: '\n query FetchPoolPairList(\n $
|
|
|
66
70
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
67
71
|
*/
|
|
68
72
|
export declare function graphql(source: '\n query FetchUserSwapOrderHistories($where: User_swapswapFilter) {\n user_swap_orderHistories(where: $where) {\n count\n page\n list {\n chainId\n createdAt\n fromAmount\n fromTokenDecimals\n fromTokenPrice\n fromTokenSymbol\n fromTokenAddress\n fromTokenLogoImg\n hash\n status\n toAmount\n toTokenDecimals\n toTokenPrice\n toTokenSymbol\n toTokenAddress\n toTokenLogoImg\n minAmount\n nonce\n extra\n user\n }\n }\n }\n '): typeof import('./graphql').FetchUserSwapOrderHistoriesDocument;
|
|
73
|
+
/**
|
|
74
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
75
|
+
*/
|
|
76
|
+
export declare function graphql(source: '\n query Cross_chain_swap_zetachain_routes(\n $where: Cross_chain_swap_zetachainrouteParams\n ) {\n cross_chain_swap_zetachain_routes(where: $where) {\n routeId\n fromChainId\n fromTokenAddress\n fromAmount\n fromAmountWithOutDecimals\n fromAmountUSD\n toChainId\n toTokenAddress\n toAmount\n toAmountWithOutDecimals\n toAmountUSD\n fromAddress\n toAddress\n slippage\n approveTarget\n fees\n omniPlan\n encodeParams\n }\n }\n '): typeof import('./graphql').Cross_Chain_Swap_Zetachain_RoutesDocument;
|
|
77
|
+
/**
|
|
78
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
79
|
+
*/
|
|
80
|
+
export declare function graphql(source: '\n query Cross_chain_swap_zetachain_transactionEncode(\n $data: Cross_chain_swap_zetachaintransactionEncodeParams\n ) {\n cross_chain_swap_zetachain_transactionEncode(data: $data) {\n data\n to\n value\n from\n chainId\n }\n }\n '): typeof import('./graphql').Cross_Chain_Swap_Zetachain_TransactionEncodeDocument;
|
|
81
|
+
/**
|
|
82
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
83
|
+
*/
|
|
84
|
+
export declare function graphql(source: '\n query Cross_chain_swap_zetachain_orderCreate(\n $data: Cross_chain_swap_zetachainorderCreateData\n ) {\n cross_chain_swap_zetachain_orderCreate(data: $data) {\n success\n }\n }\n '): typeof import('./graphql').Cross_Chain_Swap_Zetachain_OrderCreateDocument;
|
|
85
|
+
/**
|
|
86
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
87
|
+
*/
|
|
88
|
+
export declare function graphql(source: '\n query Cross_chain_swap_zetachain_orderList(\n $where: Cross_chain_swap_zetachainorderListData\n ) {\n cross_chain_swap_zetachain_orderList(where: $where) {\n list {\n id\n externalId\n fromChainId\n fromTokenAddress\n fromAmount\n fromAmountWithOutDecimals\n fromAmountUSD\n toChainId\n toTokenAddress\n toAmount\n toAmountWithOutDecimals\n toAmountUSD\n fromAddress\n toAddress\n fromHash\n toHash\n slippage\n refundChainId\n refundHash\n refundAmount\n refundUser\n refundToken\n refundCridgeContract\n status\n statusCode\n subStatus\n omniPlan\n fees\n createdAt\n startTime\n endTime\n }\n count\n page\n pageSize\n }\n }\n '): typeof import('./graphql').Cross_Chain_Swap_Zetachain_OrderListDocument;
|
|
89
|
+
/**
|
|
90
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
91
|
+
*/
|
|
92
|
+
export declare function graphql(source: '\n query Cross_chain_swap_zetachain_swapOrderList(\n $where: Cross_chain_swap_zetachainswapOrderListData\n ) {\n cross_chain_swap_zetachain_swapOrderList(where: $where) {\n list {\n key\n user\n chainId\n hash\n createdAt\n fromTokenAddress\n toTokenAddress\n fromAmount\n toAmount\n minAmount\n maxAmount\n fromTokenPrice\n toTokenPrice\n fromTokenSymbol\n toTokenSymbol\n fromTokenDecimals\n toTokenDecimals\n status\n nonce\n extra\n }\n count\n page\n pageSize\n }\n }\n '): typeof import('./graphql').Cross_Chain_Swap_Zetachain_SwapOrderListDocument;
|
|
69
93
|
/**
|
|
70
94
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
71
95
|
*/
|