@sodax/types 1.5.6-beta → 2.0.0-rc.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/README.md +49 -21
- package/dist/backend/backendApi.d.ts +75 -0
- package/dist/backend/backendApi.d.ts.map +1 -0
- package/dist/backend/backendApi.js +2 -0
- package/dist/backend/backendApi.js.map +1 -0
- package/dist/backend/index.d.ts +1 -80
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +1 -1
- package/dist/backend/index.js.map +1 -1
- package/dist/{btc/index.d.ts → bitcoin/bitcoin.d.ts} +31 -31
- package/dist/bitcoin/bitcoin.d.ts.map +1 -0
- package/dist/{btc/index.js → bitcoin/bitcoin.js} +5 -4
- package/dist/bitcoin/bitcoin.js.map +1 -0
- package/dist/bitcoin/index.d.ts +2 -0
- package/dist/bitcoin/index.d.ts.map +1 -0
- package/dist/bitcoin/index.js +2 -0
- package/dist/bitcoin/index.js.map +1 -0
- package/dist/chains/chain-keys.d.ts +31 -0
- package/dist/chains/chain-keys.d.ts.map +1 -0
- package/dist/chains/chain-keys.js +39 -0
- package/dist/chains/chain-keys.js.map +1 -0
- package/dist/chains/chains.d.ts +3491 -0
- package/dist/chains/chains.d.ts.map +1 -0
- package/dist/chains/chains.js +712 -0
- package/dist/chains/chains.js.map +1 -0
- package/dist/chains/index.d.ts +3 -0
- package/dist/chains/index.d.ts.map +1 -0
- package/dist/chains/index.js +3 -0
- package/dist/chains/index.js.map +1 -0
- package/dist/chains/tokens.d.ts +4390 -0
- package/dist/chains/tokens.d.ts.map +1 -0
- package/dist/chains/tokens.js +2139 -0
- package/dist/chains/tokens.js.map +1 -0
- package/dist/common/common.d.ts +282 -0
- package/dist/common/common.d.ts.map +1 -0
- package/dist/common/common.js +30 -0
- package/dist/common/common.js.map +1 -0
- package/dist/common/constants.d.ts +70 -0
- package/dist/common/constants.d.ts.map +1 -0
- package/dist/common/constants.js +31 -0
- package/dist/common/constants.js.map +1 -0
- package/dist/common/index.d.ts +2 -274
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +2 -1
- package/dist/common/index.js.map +1 -1
- package/dist/dex/dex.d.ts +268 -0
- package/dist/dex/dex.d.ts.map +1 -0
- package/dist/dex/dex.js +128 -0
- package/dist/dex/dex.js.map +1 -0
- package/dist/dex/index.d.ts +2 -0
- package/dist/dex/index.d.ts.map +1 -0
- package/dist/dex/index.js +2 -0
- package/dist/dex/index.js.map +1 -0
- package/dist/dex/pancakeswap-infinity.d.ts +539 -0
- package/dist/dex/pancakeswap-infinity.d.ts.map +1 -0
- package/dist/dex/pancakeswap-infinity.js +3 -0
- package/dist/dex/pancakeswap-infinity.js.map +1 -0
- package/dist/evm/evm.d.ts +48 -0
- package/dist/evm/evm.d.ts.map +1 -0
- package/dist/evm/evm.js +2 -0
- package/dist/evm/evm.js.map +1 -0
- package/dist/evm/index.d.ts +1 -39
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +1 -1
- package/dist/evm/index.js.map +1 -1
- package/dist/icon/icon.d.ts +55 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.js +2 -0
- package/dist/icon/icon.js.map +1 -0
- package/dist/icon/index.d.ts +1 -35
- package/dist/icon/index.d.ts.map +1 -1
- package/dist/icon/index.js +1 -1
- package/dist/icon/index.js.map +1 -1
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/injective/index.d.ts +1 -67
- package/dist/injective/index.d.ts.map +1 -1
- package/dist/injective/index.js +1 -16
- package/dist/injective/index.js.map +1 -1
- package/dist/injective/injective.d.ts +103 -0
- package/dist/injective/injective.d.ts.map +1 -0
- package/dist/injective/injective.js +2 -0
- package/dist/injective/injective.js.map +1 -0
- package/dist/moneyMarket/index.d.ts +2 -0
- package/dist/moneyMarket/index.d.ts.map +1 -0
- package/dist/moneyMarket/index.js +2 -0
- package/dist/moneyMarket/index.js.map +1 -0
- package/dist/moneyMarket/moneyMarket.d.ts +2440 -0
- package/dist/moneyMarket/moneyMarket.d.ts.map +1 -0
- package/dist/moneyMarket/moneyMarket.js +194 -0
- package/dist/moneyMarket/moneyMarket.js.map +1 -0
- package/dist/near/index.d.ts +1 -69
- package/dist/near/index.d.ts.map +1 -1
- package/dist/near/index.js +1 -1
- package/dist/near/index.js.map +1 -1
- package/dist/near/near-api-js.d.ts +6119 -0
- package/dist/near/near-api-js.d.ts.map +1 -0
- package/dist/near/near-api-js.js +2 -0
- package/dist/near/near-api-js.js.map +1 -0
- package/dist/near/near.d.ts +75 -0
- package/dist/near/near.d.ts.map +1 -0
- package/dist/near/near.js +2 -0
- package/dist/near/near.js.map +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +2 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/shared.d.ts +17 -0
- package/dist/shared/shared.d.ts.map +1 -0
- package/dist/shared/shared.js +6 -0
- package/dist/shared/shared.js.map +1 -0
- package/dist/sodax-config/index.d.ts +2 -0
- package/dist/sodax-config/index.d.ts.map +1 -0
- package/dist/sodax-config/index.js +2 -0
- package/dist/sodax-config/index.js.map +1 -0
- package/dist/sodax-config/sodax-config.d.ts +6070 -0
- package/dist/{constants/index.d.ts.map → sodax-config/sodax-config.d.ts.map} +1 -1
- package/dist/sodax-config/sodax-config.js +22 -0
- package/dist/sodax-config/sodax-config.js.map +1 -0
- package/dist/solana/index.d.ts +1 -99
- package/dist/solana/index.d.ts.map +1 -1
- package/dist/solana/index.js +1 -1
- package/dist/solana/index.js.map +1 -1
- package/dist/solana/solana-web3.d.ts +390 -0
- package/dist/solana/solana-web3.d.ts.map +1 -0
- package/dist/solana/solana-web3.js +2 -0
- package/dist/solana/solana-web3.js.map +1 -0
- package/dist/solana/solana.d.ts +111 -0
- package/dist/solana/solana.d.ts.map +1 -0
- package/dist/solana/solana.js +2 -0
- package/dist/solana/solana.js.map +1 -0
- package/dist/stacks/index.d.ts +1 -16
- package/dist/stacks/index.d.ts.map +1 -1
- package/dist/stacks/index.js +1 -1
- package/dist/stacks/index.js.map +1 -1
- package/dist/stacks/stacks.d.ts +211 -0
- package/dist/stacks/stacks.d.ts.map +1 -0
- package/dist/stacks/stacks.js +2 -0
- package/dist/stacks/stacks.js.map +1 -0
- package/dist/stellar/index.d.ts +1 -69
- package/dist/stellar/index.d.ts.map +1 -1
- package/dist/stellar/index.js +1 -1
- package/dist/stellar/index.js.map +1 -1
- package/dist/stellar/stellar.d.ts +97 -0
- package/dist/stellar/stellar.d.ts.map +1 -0
- package/dist/stellar/stellar.js +2 -0
- package/dist/stellar/stellar.js.map +1 -0
- package/dist/sui/index.d.ts +1 -32
- package/dist/sui/index.d.ts.map +1 -1
- package/dist/sui/index.js +1 -1
- package/dist/sui/index.js.map +1 -1
- package/dist/sui/sui.d.ts +312 -0
- package/dist/sui/sui.d.ts.map +1 -0
- package/dist/sui/sui.js +2 -0
- package/dist/sui/sui.js.map +1 -0
- package/dist/swap/index.d.ts +2 -0
- package/dist/swap/index.d.ts.map +1 -0
- package/dist/swap/index.js +2 -0
- package/dist/swap/index.js.map +1 -0
- package/dist/swap/swap.d.ts +3369 -0
- package/dist/swap/swap.d.ts.map +1 -0
- package/dist/swap/swap.js +242 -0
- package/dist/swap/swap.js.map +1 -0
- package/dist/utils/deep-partial.d.ts +9 -0
- package/dist/utils/deep-partial.d.ts.map +1 -0
- package/dist/utils/deep-partial.js +2 -0
- package/dist/utils/deep-partial.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/utils.d.ts +61 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +144 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/wallet/index.d.ts +3 -0
- package/dist/wallet/index.d.ts.map +1 -0
- package/dist/wallet/index.js +3 -0
- package/dist/wallet/index.js.map +1 -0
- package/dist/wallet/providers.d.ts +24 -0
- package/dist/wallet/providers.d.ts.map +1 -0
- package/dist/wallet/providers.js +2 -0
- package/dist/wallet/providers.js.map +1 -0
- package/dist/wallet/wallet.d.ts +19 -0
- package/dist/wallet/wallet.d.ts.map +1 -0
- package/dist/wallet/wallet.js +2 -0
- package/dist/wallet/wallet.js.map +1 -0
- package/package.json +17 -9
- package/dist/btc/index.d.ts.map +0 -1
- package/dist/btc/index.js.map +0 -1
- package/dist/constants/index.d.ts +0 -7228
- package/dist/constants/index.js +0 -3204
- package/dist/constants/index.js.map +0 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -1,275 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type HubChainId = (typeof HUB_CHAIN_IDS)[number];
|
|
4
|
-
export type SpokeChainId = (typeof CHAIN_IDS)[number];
|
|
5
|
-
export type ChainId = (typeof CHAIN_IDS)[number];
|
|
6
|
-
export declare const ChainTypeArr: readonly ["ICON", "EVM", "INJECTIVE", "SUI", "STELLAR", "SOLANA", "STACKS", "NEAR", "BITCOIN"];
|
|
7
|
-
export type ChainType = (typeof ChainTypeArr)[number];
|
|
8
|
-
export type Chain = {
|
|
9
|
-
id: string | number;
|
|
10
|
-
name: string;
|
|
11
|
-
testnet: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type XChain = Chain & {
|
|
14
|
-
xChainId: ChainId;
|
|
15
|
-
xChainType: ChainType;
|
|
16
|
-
};
|
|
17
|
-
export type Token = {
|
|
18
|
-
symbol: string;
|
|
19
|
-
name: string;
|
|
20
|
-
decimals: number;
|
|
21
|
-
address: string;
|
|
22
|
-
};
|
|
23
|
-
export type Erc20Token = {
|
|
24
|
-
name: string;
|
|
25
|
-
symbol: string;
|
|
26
|
-
decimals: number;
|
|
27
|
-
address: Address;
|
|
28
|
-
};
|
|
29
|
-
export type XToken = (Token | Erc20Token) & {
|
|
30
|
-
xChainId: ChainId;
|
|
31
|
-
};
|
|
32
|
-
export type ByteArray = Uint8Array;
|
|
33
|
-
export type Hex = `0x${string}`;
|
|
34
|
-
export type Hash = `0x${string}`;
|
|
35
|
-
export type Address = `0x${string}`;
|
|
36
|
-
export type HubAddress = Address;
|
|
37
|
-
export type OriginalAssetAddress = string;
|
|
38
|
-
export interface WalletAddressProvider {
|
|
39
|
-
getWalletAddress(): Promise<string>;
|
|
40
|
-
getPublicKey?: () => Promise<string>;
|
|
41
|
-
}
|
|
42
|
-
export type HttpUrl = `http://${string}` | `https://${string}`;
|
|
43
|
-
export type StellarRpcConfig = {
|
|
44
|
-
horizonRpcUrl?: HttpUrl;
|
|
45
|
-
sorobanRpcUrl?: HttpUrl;
|
|
46
|
-
};
|
|
47
|
-
export type BitcoinRpcConfig = {
|
|
48
|
-
rpcUrl?: string;
|
|
49
|
-
radfiApiUrl?: string;
|
|
50
|
-
radfiUmsUrl?: string;
|
|
51
|
-
};
|
|
52
|
-
export type RpcConfig = Partial<{
|
|
53
|
-
[K in ChainId]: K extends typeof STELLAR_MAINNET_CHAIN_ID ? StellarRpcConfig : K extends typeof BITCOIN_MAINNET_CHAIN_ID ? BitcoinRpcConfig : string;
|
|
54
|
-
}> & {
|
|
55
|
-
[ETHEREUM_MAINNET_CHAIN_ID]?: string | undefined;
|
|
56
|
-
};
|
|
57
|
-
export type IntentRelayChainId = (typeof ChainIdToIntentRelayChainId)[keyof typeof ChainIdToIntentRelayChainId];
|
|
58
|
-
export type IntentRelayChainIdMap = Record<ChainId, IntentRelayChainId>;
|
|
59
|
-
export type SpokeChainConfigMap = Record<SpokeChainId, SpokeChainConfig>;
|
|
60
|
-
export type HubVaultSymbol = (typeof HubVaultSymbols)[number];
|
|
61
|
-
export type EvmChainId = (typeof EVM_CHAIN_IDS)[number];
|
|
62
|
-
export type EvmSpokeChainId = (typeof EVM_CHAIN_IDS)[number];
|
|
63
|
-
export type GetSpokeChainIdType<T extends ChainType> = T extends 'EVM' ? EvmSpokeChainId : SpokeChainId;
|
|
64
|
-
export type BaseSpokeChainInfo<T extends ChainType> = {
|
|
65
|
-
name: string;
|
|
66
|
-
id: GetSpokeChainIdType<T>;
|
|
67
|
-
chainId: string | number;
|
|
68
|
-
type: T;
|
|
69
|
-
};
|
|
70
|
-
export type HubAssetInfo = {
|
|
71
|
-
asset: Address;
|
|
72
|
-
decimal: number;
|
|
73
|
-
vault: Address;
|
|
74
|
-
};
|
|
75
|
-
export type BaseHubChainConfig<T extends ChainType> = {
|
|
76
|
-
chain: HubChainInfo<T>;
|
|
77
|
-
addresses: {
|
|
78
|
-
[key: string]: Address | string | Uint8Array;
|
|
79
|
-
};
|
|
80
|
-
supportedTokens: Token[];
|
|
81
|
-
nativeToken: Address | string;
|
|
82
|
-
};
|
|
83
|
-
export type HubChainInfo<T extends ChainType> = {
|
|
84
|
-
name: string;
|
|
85
|
-
id: HubChainId;
|
|
86
|
-
type: T;
|
|
87
|
-
};
|
|
88
|
-
export type HubChainConfig = EvmHubChainConfig;
|
|
89
|
-
export type AssetInfo = {
|
|
90
|
-
chainId: bigint;
|
|
91
|
-
spokeAddress: `0x${string}`;
|
|
92
|
-
};
|
|
93
|
-
export type EvmHubChainConfig = BaseHubChainConfig<'EVM'> & {
|
|
94
|
-
addresses: {
|
|
95
|
-
assetManager: Address;
|
|
96
|
-
hubWallet: Address;
|
|
97
|
-
xTokenManager: Address;
|
|
98
|
-
icxMigration: Address;
|
|
99
|
-
balnSwap: Address;
|
|
100
|
-
sodaToken: Address;
|
|
101
|
-
sodaVault: Address;
|
|
102
|
-
stakedSoda: Address;
|
|
103
|
-
xSoda: Address;
|
|
104
|
-
stakingRouter: Address;
|
|
105
|
-
walletRouter: Address;
|
|
106
|
-
};
|
|
107
|
-
nativeToken: Address;
|
|
108
|
-
wrappedNativeToken: Address;
|
|
109
|
-
};
|
|
110
|
-
export type SpokeChainInfo<T extends ChainType> = BaseSpokeChainInfo<T>;
|
|
111
|
-
export type BaseSpokeChainConfig<T extends ChainType> = {
|
|
112
|
-
chain: SpokeChainInfo<T>;
|
|
113
|
-
addresses: {
|
|
114
|
-
[key: string]: string;
|
|
115
|
-
};
|
|
116
|
-
supportedTokens: Record<string, XToken>;
|
|
117
|
-
nativeToken: string;
|
|
118
|
-
bnUSD: string;
|
|
119
|
-
};
|
|
120
|
-
export type SonicSpokeChainConfig = BaseSpokeChainConfig<'EVM'> & {
|
|
121
|
-
addresses: {
|
|
122
|
-
walletRouter: Address;
|
|
123
|
-
wrappedSonic: Address;
|
|
124
|
-
};
|
|
125
|
-
nativeToken: Address;
|
|
126
|
-
};
|
|
127
|
-
export type SolanaChainConfig = BaseSpokeChainConfig<'SOLANA'> & {
|
|
128
|
-
addresses: {
|
|
129
|
-
assetManager: string;
|
|
130
|
-
connection: string;
|
|
131
|
-
xTokenManager: string;
|
|
132
|
-
rateLimit: string;
|
|
133
|
-
};
|
|
134
|
-
chain: SpokeChainInfo<'SOLANA'>;
|
|
135
|
-
rpcUrl: string;
|
|
136
|
-
walletAddress: string;
|
|
137
|
-
nativeToken: string;
|
|
138
|
-
gasPrice: string;
|
|
139
|
-
};
|
|
140
|
-
export type StellarAssetTrustline = {
|
|
141
|
-
assetCode: string;
|
|
142
|
-
contractId: string;
|
|
143
|
-
assetIssuer: string;
|
|
144
|
-
};
|
|
145
|
-
export type StellarSpokeChainConfig = BaseSpokeChainConfig<'STELLAR'> & {
|
|
146
|
-
addresses: {
|
|
147
|
-
assetManager: string;
|
|
148
|
-
connection: string;
|
|
149
|
-
xTokenManager: string;
|
|
150
|
-
rateLimit: string;
|
|
151
|
-
};
|
|
152
|
-
horizonRpcUrl: HttpUrl;
|
|
153
|
-
sorobanRpcUrl: HttpUrl;
|
|
154
|
-
trustlineConfigs: StellarAssetTrustline[];
|
|
155
|
-
};
|
|
156
|
-
export type BitcoinSpokeChainConfig = BaseSpokeChainConfig<'BITCOIN'> & {
|
|
157
|
-
addresses: {
|
|
158
|
-
assetManager: string;
|
|
159
|
-
};
|
|
160
|
-
rpcUrl: string;
|
|
161
|
-
network: string;
|
|
162
|
-
radfiApiUrl: string;
|
|
163
|
-
radfiApiKey: string;
|
|
164
|
-
radfiUmsUrl: string;
|
|
165
|
-
};
|
|
166
|
-
export type InjectiveSpokeChainConfig = BaseSpokeChainConfig<'INJECTIVE'> & {
|
|
167
|
-
rpcUrl: string;
|
|
168
|
-
walletAddress: string;
|
|
169
|
-
addresses: {
|
|
170
|
-
assetManager: string;
|
|
171
|
-
connection: string;
|
|
172
|
-
xTokenManager: string;
|
|
173
|
-
rateLimit: string;
|
|
174
|
-
};
|
|
175
|
-
nativeToken: string;
|
|
176
|
-
prefix: string;
|
|
177
|
-
gasPrice: string;
|
|
178
|
-
isBrowser: boolean;
|
|
179
|
-
networkId: string;
|
|
180
|
-
network: InjectiveNetworkEnv;
|
|
181
|
-
};
|
|
182
|
-
export type EvmSpokeChainConfig = BaseSpokeChainConfig<'EVM'> & {
|
|
183
|
-
addresses: {
|
|
184
|
-
assetManager: Address;
|
|
185
|
-
connection: Address;
|
|
186
|
-
};
|
|
187
|
-
nativeToken: string;
|
|
188
|
-
};
|
|
189
|
-
export type SuiSpokeChainConfig = BaseSpokeChainConfig<'SUI'> & {
|
|
190
|
-
addresses: {
|
|
191
|
-
originalAssetManager: string;
|
|
192
|
-
assetManagerConfigId: string;
|
|
193
|
-
connection: string;
|
|
194
|
-
xTokenManager: string;
|
|
195
|
-
rateLimit: string;
|
|
196
|
-
};
|
|
197
|
-
rpc_url: string;
|
|
198
|
-
};
|
|
199
|
-
export type NearSpokeChainConfig = BaseSpokeChainConfig<'NEAR'> & {
|
|
200
|
-
addresses: {
|
|
201
|
-
assetManager: string;
|
|
202
|
-
connection: string;
|
|
203
|
-
rateLimit: string;
|
|
204
|
-
intentFiller: string;
|
|
205
|
-
};
|
|
206
|
-
rpcUrl: string;
|
|
207
|
-
};
|
|
208
|
-
export type IconAddress = `hx${string}` | `cx${string}`;
|
|
209
|
-
export type IconSpokeChainConfig = BaseSpokeChainConfig<'ICON'> & {
|
|
210
|
-
addresses: {
|
|
211
|
-
assetManager: IconAddress;
|
|
212
|
-
connection: IconAddress;
|
|
213
|
-
rateLimit: IconAddress;
|
|
214
|
-
wICX: `cx${string}`;
|
|
215
|
-
};
|
|
216
|
-
nid: Hex;
|
|
217
|
-
};
|
|
218
|
-
export type StacksSpokeChainConfig = BaseSpokeChainConfig<'STACKS'> & {
|
|
219
|
-
addresses: {
|
|
220
|
-
assetManager: string;
|
|
221
|
-
connection: string;
|
|
222
|
-
rateLimit: string;
|
|
223
|
-
xTokenManager: string;
|
|
224
|
-
};
|
|
225
|
-
chain: SpokeChainInfo<'STACKS'>;
|
|
226
|
-
rpcUrl: string;
|
|
227
|
-
nativeToken: string;
|
|
228
|
-
};
|
|
229
|
-
export type SpokeChainConfig = EvmSpokeChainConfig | SonicSpokeChainConfig | InjectiveSpokeChainConfig | IconSpokeChainConfig | SuiSpokeChainConfig | StellarSpokeChainConfig | BitcoinSpokeChainConfig | SolanaChainConfig | StacksSpokeChainConfig | NearSpokeChainConfig;
|
|
230
|
-
export type SolverConfig = {
|
|
231
|
-
intentsContract: Address;
|
|
232
|
-
solverApiEndpoint: HttpUrl;
|
|
233
|
-
protocolIntentsContract?: Address;
|
|
234
|
-
};
|
|
235
|
-
export type MoneyMarketConfig = {
|
|
236
|
-
uiPoolDataProvider: Address;
|
|
237
|
-
lendingPool: Address;
|
|
238
|
-
poolAddressesProvider: Address;
|
|
239
|
-
bnUSD: Address;
|
|
240
|
-
bnUSDVault: Address;
|
|
241
|
-
bnUSDAToken: Address;
|
|
242
|
-
};
|
|
243
|
-
export type HubAsset = {
|
|
244
|
-
asset: Address;
|
|
245
|
-
decimal: number;
|
|
246
|
-
vault: Address;
|
|
247
|
-
symbol: string;
|
|
248
|
-
name: string;
|
|
249
|
-
};
|
|
250
|
-
export type TokenInfo = {
|
|
251
|
-
decimals: number;
|
|
252
|
-
depositFee: bigint;
|
|
253
|
-
withdrawalFee: bigint;
|
|
254
|
-
maxDeposit: bigint;
|
|
255
|
-
isSupported: boolean;
|
|
256
|
-
};
|
|
257
|
-
export type BridgeLimit = {
|
|
258
|
-
amount: bigint;
|
|
259
|
-
decimals: number;
|
|
260
|
-
type: 'DEPOSIT_LIMIT' | 'WITHDRAWAL_LIMIT';
|
|
261
|
-
};
|
|
262
|
-
export type ConcentratedLiquidityConfig = {
|
|
263
|
-
permit2: Address;
|
|
264
|
-
clPoolManager: Address;
|
|
265
|
-
router: Address;
|
|
266
|
-
clPositionManager: Address;
|
|
267
|
-
clPositionDescriptor: Address;
|
|
268
|
-
clQuoter: Address;
|
|
269
|
-
clTickLens: Address;
|
|
270
|
-
defaultHook: Address;
|
|
271
|
-
stataTokenFactory: Address;
|
|
272
|
-
defaultTickSpacing: number;
|
|
273
|
-
defaultBitmap: bigint;
|
|
274
|
-
};
|
|
1
|
+
export * from './common.js';
|
|
2
|
+
export * from './constants.js';
|
|
275
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
package/dist/common/index.js
CHANGED
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import type { Address } from '../shared/shared.js';
|
|
2
|
+
import { StatATokenAddresses } from '../chains/tokens.js';
|
|
3
|
+
import type { PoolKey } from './pancakeswap-infinity.js';
|
|
4
|
+
export type { EncodedPoolKey, PoolKey, Slot0, CLPositionConfig, } from './pancakeswap-infinity.js';
|
|
5
|
+
export type ConcentratedLiquidityConfig = {
|
|
6
|
+
permit2: Address;
|
|
7
|
+
clPoolManager: Address;
|
|
8
|
+
router: Address;
|
|
9
|
+
clPositionManager: Address;
|
|
10
|
+
clPositionDescriptor: Address;
|
|
11
|
+
clQuoter: Address;
|
|
12
|
+
clTickLens: Address;
|
|
13
|
+
defaultHook: Address;
|
|
14
|
+
stataTokenFactory: Address;
|
|
15
|
+
defaultTickSpacing: number;
|
|
16
|
+
defaultBitmap: bigint;
|
|
17
|
+
};
|
|
18
|
+
export declare const concentratedLiquidityConfig: {
|
|
19
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
20
|
+
readonly clPoolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
21
|
+
readonly router: "0x5bFB058c65E4c1DEC1cFF0Ff2cBd8522b4c3feBB";
|
|
22
|
+
readonly clPositionManager: "0xcc08a04d9E5766c7A20FE6bb32cAa40EA0e7e9e1";
|
|
23
|
+
readonly clPositionDescriptor: "0x83Ff9FC474DBe927BA5BB822571e0814122655bB";
|
|
24
|
+
readonly clQuoter: "0x5f46CB668D39496b41CE8E19D6A7fE893826E363";
|
|
25
|
+
readonly clTickLens: "0xb3e77dD9b1f206A2b797B3fE900b50cC92A38d26";
|
|
26
|
+
readonly defaultHook: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
27
|
+
readonly stataTokenFactory: "0x9120956787FcE7D7082C52CDCAafb7F4B88272d4";
|
|
28
|
+
readonly defaultTickSpacing: 10;
|
|
29
|
+
readonly defaultBitmap: 16383n;
|
|
30
|
+
};
|
|
31
|
+
export declare const dexPools: {
|
|
32
|
+
readonly AETH_BNUSD: {
|
|
33
|
+
readonly currency0: "0x3E102c7D9b46c92aBcd4c2e1C70f362B47a201A6";
|
|
34
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
35
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
36
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
37
|
+
readonly fee: 8388608;
|
|
38
|
+
readonly parameters: {
|
|
39
|
+
readonly tickSpacing: 10;
|
|
40
|
+
readonly hooksRegistration: {
|
|
41
|
+
readonly beforeInitialize: true;
|
|
42
|
+
readonly afterInitialize: true;
|
|
43
|
+
readonly beforeAddLiquidity: true;
|
|
44
|
+
readonly afterAddLiquidity: true;
|
|
45
|
+
readonly beforeRemoveLiquidity: true;
|
|
46
|
+
readonly afterRemoveLiquidity: true;
|
|
47
|
+
readonly beforeSwap: true;
|
|
48
|
+
readonly afterSwap: true;
|
|
49
|
+
readonly beforeDonate: true;
|
|
50
|
+
readonly afterDonate: true;
|
|
51
|
+
readonly beforeSwapReturnsDelta: true;
|
|
52
|
+
readonly afterSwapReturnsDelta: true;
|
|
53
|
+
readonly afterMintReturnsDelta: true;
|
|
54
|
+
readonly afterBurnReturnsDelta: true;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly BTC_BNUSD: {
|
|
59
|
+
readonly currency0: "0x8aDe79C255761971f4057253712b916AB2494275";
|
|
60
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
61
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
62
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
63
|
+
readonly fee: 8388608;
|
|
64
|
+
readonly parameters: {
|
|
65
|
+
readonly tickSpacing: 10;
|
|
66
|
+
readonly hooksRegistration: {
|
|
67
|
+
readonly beforeInitialize: true;
|
|
68
|
+
readonly afterInitialize: true;
|
|
69
|
+
readonly beforeAddLiquidity: true;
|
|
70
|
+
readonly afterAddLiquidity: true;
|
|
71
|
+
readonly beforeRemoveLiquidity: true;
|
|
72
|
+
readonly afterRemoveLiquidity: true;
|
|
73
|
+
readonly beforeSwap: true;
|
|
74
|
+
readonly afterSwap: true;
|
|
75
|
+
readonly beforeDonate: true;
|
|
76
|
+
readonly afterDonate: true;
|
|
77
|
+
readonly beforeSwapReturnsDelta: true;
|
|
78
|
+
readonly afterSwapReturnsDelta: true;
|
|
79
|
+
readonly afterMintReturnsDelta: true;
|
|
80
|
+
readonly afterBurnReturnsDelta: true;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly ASODA_BNUSD: {
|
|
85
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
86
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
87
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
88
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
89
|
+
readonly fee: 8388608;
|
|
90
|
+
readonly parameters: {
|
|
91
|
+
readonly tickSpacing: 10;
|
|
92
|
+
readonly hooksRegistration: {
|
|
93
|
+
readonly beforeInitialize: true;
|
|
94
|
+
readonly afterInitialize: true;
|
|
95
|
+
readonly beforeAddLiquidity: true;
|
|
96
|
+
readonly afterAddLiquidity: true;
|
|
97
|
+
readonly beforeRemoveLiquidity: true;
|
|
98
|
+
readonly afterRemoveLiquidity: true;
|
|
99
|
+
readonly beforeSwap: true;
|
|
100
|
+
readonly afterSwap: true;
|
|
101
|
+
readonly beforeDonate: true;
|
|
102
|
+
readonly afterDonate: true;
|
|
103
|
+
readonly beforeSwapReturnsDelta: true;
|
|
104
|
+
readonly afterSwapReturnsDelta: true;
|
|
105
|
+
readonly afterMintReturnsDelta: true;
|
|
106
|
+
readonly afterBurnReturnsDelta: true;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly ASODA_XSODA: {
|
|
111
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
112
|
+
readonly currency1: "0xADC6561Cc8FC31767B4917CCc97F510D411378d9";
|
|
113
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
114
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
115
|
+
readonly fee: 8388608;
|
|
116
|
+
readonly parameters: {
|
|
117
|
+
readonly tickSpacing: 10;
|
|
118
|
+
readonly hooksRegistration: {
|
|
119
|
+
readonly beforeInitialize: true;
|
|
120
|
+
readonly afterInitialize: true;
|
|
121
|
+
readonly beforeAddLiquidity: true;
|
|
122
|
+
readonly afterAddLiquidity: true;
|
|
123
|
+
readonly beforeRemoveLiquidity: true;
|
|
124
|
+
readonly afterRemoveLiquidity: true;
|
|
125
|
+
readonly beforeSwap: true;
|
|
126
|
+
readonly afterSwap: true;
|
|
127
|
+
readonly beforeDonate: true;
|
|
128
|
+
readonly afterDonate: true;
|
|
129
|
+
readonly beforeSwapReturnsDelta: true;
|
|
130
|
+
readonly afterSwapReturnsDelta: true;
|
|
131
|
+
readonly afterMintReturnsDelta: true;
|
|
132
|
+
readonly afterBurnReturnsDelta: true;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export type DexConfig = {
|
|
138
|
+
concentratedLiquidityConfig: ConcentratedLiquidityConfig;
|
|
139
|
+
dexPools: Record<string, PoolKey>;
|
|
140
|
+
statATokenAddresses: Record<Address, Address> & typeof StatATokenAddresses;
|
|
141
|
+
};
|
|
142
|
+
export declare const dexConfig: {
|
|
143
|
+
readonly concentratedLiquidityConfig: {
|
|
144
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
145
|
+
readonly clPoolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
146
|
+
readonly router: "0x5bFB058c65E4c1DEC1cFF0Ff2cBd8522b4c3feBB";
|
|
147
|
+
readonly clPositionManager: "0xcc08a04d9E5766c7A20FE6bb32cAa40EA0e7e9e1";
|
|
148
|
+
readonly clPositionDescriptor: "0x83Ff9FC474DBe927BA5BB822571e0814122655bB";
|
|
149
|
+
readonly clQuoter: "0x5f46CB668D39496b41CE8E19D6A7fE893826E363";
|
|
150
|
+
readonly clTickLens: "0xb3e77dD9b1f206A2b797B3fE900b50cC92A38d26";
|
|
151
|
+
readonly defaultHook: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
152
|
+
readonly stataTokenFactory: "0x9120956787FcE7D7082C52CDCAafb7F4B88272d4";
|
|
153
|
+
readonly defaultTickSpacing: 10;
|
|
154
|
+
readonly defaultBitmap: 16383n;
|
|
155
|
+
};
|
|
156
|
+
readonly dexPools: {
|
|
157
|
+
readonly AETH_BNUSD: {
|
|
158
|
+
readonly currency0: "0x3E102c7D9b46c92aBcd4c2e1C70f362B47a201A6";
|
|
159
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
160
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
161
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
162
|
+
readonly fee: 8388608;
|
|
163
|
+
readonly parameters: {
|
|
164
|
+
readonly tickSpacing: 10;
|
|
165
|
+
readonly hooksRegistration: {
|
|
166
|
+
readonly beforeInitialize: true;
|
|
167
|
+
readonly afterInitialize: true;
|
|
168
|
+
readonly beforeAddLiquidity: true;
|
|
169
|
+
readonly afterAddLiquidity: true;
|
|
170
|
+
readonly beforeRemoveLiquidity: true;
|
|
171
|
+
readonly afterRemoveLiquidity: true;
|
|
172
|
+
readonly beforeSwap: true;
|
|
173
|
+
readonly afterSwap: true;
|
|
174
|
+
readonly beforeDonate: true;
|
|
175
|
+
readonly afterDonate: true;
|
|
176
|
+
readonly beforeSwapReturnsDelta: true;
|
|
177
|
+
readonly afterSwapReturnsDelta: true;
|
|
178
|
+
readonly afterMintReturnsDelta: true;
|
|
179
|
+
readonly afterBurnReturnsDelta: true;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly BTC_BNUSD: {
|
|
184
|
+
readonly currency0: "0x8aDe79C255761971f4057253712b916AB2494275";
|
|
185
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
186
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
187
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
188
|
+
readonly fee: 8388608;
|
|
189
|
+
readonly parameters: {
|
|
190
|
+
readonly tickSpacing: 10;
|
|
191
|
+
readonly hooksRegistration: {
|
|
192
|
+
readonly beforeInitialize: true;
|
|
193
|
+
readonly afterInitialize: true;
|
|
194
|
+
readonly beforeAddLiquidity: true;
|
|
195
|
+
readonly afterAddLiquidity: true;
|
|
196
|
+
readonly beforeRemoveLiquidity: true;
|
|
197
|
+
readonly afterRemoveLiquidity: true;
|
|
198
|
+
readonly beforeSwap: true;
|
|
199
|
+
readonly afterSwap: true;
|
|
200
|
+
readonly beforeDonate: true;
|
|
201
|
+
readonly afterDonate: true;
|
|
202
|
+
readonly beforeSwapReturnsDelta: true;
|
|
203
|
+
readonly afterSwapReturnsDelta: true;
|
|
204
|
+
readonly afterMintReturnsDelta: true;
|
|
205
|
+
readonly afterBurnReturnsDelta: true;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly ASODA_BNUSD: {
|
|
210
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
211
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
212
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
213
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
214
|
+
readonly fee: 8388608;
|
|
215
|
+
readonly parameters: {
|
|
216
|
+
readonly tickSpacing: 10;
|
|
217
|
+
readonly hooksRegistration: {
|
|
218
|
+
readonly beforeInitialize: true;
|
|
219
|
+
readonly afterInitialize: true;
|
|
220
|
+
readonly beforeAddLiquidity: true;
|
|
221
|
+
readonly afterAddLiquidity: true;
|
|
222
|
+
readonly beforeRemoveLiquidity: true;
|
|
223
|
+
readonly afterRemoveLiquidity: true;
|
|
224
|
+
readonly beforeSwap: true;
|
|
225
|
+
readonly afterSwap: true;
|
|
226
|
+
readonly beforeDonate: true;
|
|
227
|
+
readonly afterDonate: true;
|
|
228
|
+
readonly beforeSwapReturnsDelta: true;
|
|
229
|
+
readonly afterSwapReturnsDelta: true;
|
|
230
|
+
readonly afterMintReturnsDelta: true;
|
|
231
|
+
readonly afterBurnReturnsDelta: true;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly ASODA_XSODA: {
|
|
236
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
237
|
+
readonly currency1: "0xADC6561Cc8FC31767B4917CCc97F510D411378d9";
|
|
238
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
239
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
240
|
+
readonly fee: 8388608;
|
|
241
|
+
readonly parameters: {
|
|
242
|
+
readonly tickSpacing: 10;
|
|
243
|
+
readonly hooksRegistration: {
|
|
244
|
+
readonly beforeInitialize: true;
|
|
245
|
+
readonly afterInitialize: true;
|
|
246
|
+
readonly beforeAddLiquidity: true;
|
|
247
|
+
readonly afterAddLiquidity: true;
|
|
248
|
+
readonly beforeRemoveLiquidity: true;
|
|
249
|
+
readonly afterRemoveLiquidity: true;
|
|
250
|
+
readonly beforeSwap: true;
|
|
251
|
+
readonly afterSwap: true;
|
|
252
|
+
readonly beforeDonate: true;
|
|
253
|
+
readonly afterDonate: true;
|
|
254
|
+
readonly beforeSwapReturnsDelta: true;
|
|
255
|
+
readonly afterSwapReturnsDelta: true;
|
|
256
|
+
readonly afterMintReturnsDelta: true;
|
|
257
|
+
readonly afterBurnReturnsDelta: true;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
readonly statATokenAddresses: {
|
|
263
|
+
readonly '0xac8540fee419c7ceb985889eaba1e84b42a53e8a': "0x21685E341DE7844135329914Be6Bd8D16982d834";
|
|
264
|
+
readonly '0x8ade79c255761971f4057253712b916ab2494275': "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d";
|
|
265
|
+
readonly '0x3e102c7d9b46c92abcd4c2e1c70f362b47a201a6': "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
//# sourceMappingURL=dex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dex.d.ts","sourceRoot":"","sources":["../../src/dex/dex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAGzD,YAAY,EACV,cAAc,EACd,OAAO,EACP,KAAK,EACL,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CAYQ,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GuB,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,mBAAmB,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO,mBAAmB,CAAC;CAC5E,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIQ,CAAC"}
|