@talismn/chaindata-provider 1.3.4 → 1.3.6

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.
Files changed (59) hide show
  1. package/dist/index.d.mts +4167 -0
  2. package/dist/index.d.ts +4167 -0
  3. package/dist/index.js +7195 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +7061 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +25 -27
  8. package/dist/declarations/src/chaindata/index.d.ts +0 -6
  9. package/dist/declarations/src/chaindata/miniMetadata.d.ts +0 -17
  10. package/dist/declarations/src/chaindata/networks/DotNetwork.d.ts +0 -87
  11. package/dist/declarations/src/chaindata/networks/EthNetwork.d.ts +0 -52
  12. package/dist/declarations/src/chaindata/networks/Network.d.ts +0 -131
  13. package/dist/declarations/src/chaindata/networks/NetworkBase.d.ts +0 -21
  14. package/dist/declarations/src/chaindata/networks/SolNetwork.d.ts +0 -35
  15. package/dist/declarations/src/chaindata/networks/index.d.ts +0 -5
  16. package/dist/declarations/src/chaindata/shared/EthereumAddress.d.ts +0 -3
  17. package/dist/declarations/src/chaindata/shared/HexString.d.ts +0 -3
  18. package/dist/declarations/src/chaindata/shared/SolanaAddress.d.ts +0 -3
  19. package/dist/declarations/src/chaindata/shared/index.d.ts +0 -3
  20. package/dist/declarations/src/chaindata/tokens/EvmErc20Token.d.ts +0 -30
  21. package/dist/declarations/src/chaindata/tokens/EvmNativeToken.d.ts +0 -28
  22. package/dist/declarations/src/chaindata/tokens/EvmUniswapV2Token.d.ts +0 -39
  23. package/dist/declarations/src/chaindata/tokens/SolNativeToken.d.ts +0 -28
  24. package/dist/declarations/src/chaindata/tokens/SolSplToken.d.ts +0 -30
  25. package/dist/declarations/src/chaindata/tokens/SubstrateAssetsToken.d.ts +0 -33
  26. package/dist/declarations/src/chaindata/tokens/SubstrateDTaoToken.d.ts +0 -34
  27. package/dist/declarations/src/chaindata/tokens/SubstrateForeignAssetsToken.d.ts +0 -32
  28. package/dist/declarations/src/chaindata/tokens/SubstrateHydrationToken.d.ts +0 -36
  29. package/dist/declarations/src/chaindata/tokens/SubstrateNativeToken.d.ts +0 -31
  30. package/dist/declarations/src/chaindata/tokens/SubstratePsp22Token.d.ts +0 -30
  31. package/dist/declarations/src/chaindata/tokens/SubstrateTokensToken.d.ts +0 -32
  32. package/dist/declarations/src/chaindata/tokens/Token.d.ts +0 -797
  33. package/dist/declarations/src/chaindata/tokens/TokenBase.d.ts +0 -14
  34. package/dist/declarations/src/chaindata/tokens/index.d.ts +0 -14
  35. package/dist/declarations/src/chaindata/tokens/utils.d.ts +0 -1
  36. package/dist/declarations/src/chaindata/utils.d.ts +0 -428
  37. package/dist/declarations/src/constants.d.ts +0 -10
  38. package/dist/declarations/src/getBlockExplorerUrls.d.ts +0 -23
  39. package/dist/declarations/src/index.d.ts +0 -11
  40. package/dist/declarations/src/legacy/Chain.d.ts +0 -91
  41. package/dist/declarations/src/legacy/EvmNetwork.d.ts +0 -64
  42. package/dist/declarations/src/legacy/TalismanChaindataDatabase.d.ts +0 -13
  43. package/dist/declarations/src/log.d.ts +0 -2
  44. package/dist/declarations/src/provider/ChaindataProvider.d.ts +0 -601
  45. package/dist/declarations/src/provider/ChaindataProviderInterface.d.ts +0 -30
  46. package/dist/declarations/src/state/combinedChaindata.d.ts +0 -11
  47. package/dist/declarations/src/state/defaultChaindata.d.ts +0 -322
  48. package/dist/declarations/src/state/githubChaindata.d.ts +0 -321
  49. package/dist/declarations/src/state/net.d.ts +0 -321
  50. package/dist/declarations/src/state/oldDb.d.ts +0 -1
  51. package/dist/declarations/src/state/schema.d.ts +0 -1406
  52. package/dist/declarations/src/upgrades/2024-01-25-upgradeAddIsDefaultToExistingChains.d.ts +0 -2
  53. package/dist/declarations/src/upgrades/2024-01-25-upgradeRemoveSymbolFromNativeTokenId.d.ts +0 -2
  54. package/dist/declarations/src/util.d.ts +0 -9
  55. package/dist/talismn-chaindata-provider.cjs.d.ts +0 -1
  56. package/dist/talismn-chaindata-provider.cjs.dev.js +0 -7078
  57. package/dist/talismn-chaindata-provider.cjs.js +0 -7
  58. package/dist/talismn-chaindata-provider.cjs.prod.js +0 -7078
  59. package/dist/talismn-chaindata-provider.esm.js +0 -6961
@@ -1,14 +0,0 @@
1
- import z from "zod/v4";
2
- export declare const TokenBaseSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- networkId: z.ZodString;
5
- isDefault: z.ZodOptional<z.ZodBoolean>;
6
- decimals: z.ZodInt;
7
- symbol: z.ZodString;
8
- name: z.ZodOptional<z.ZodString>;
9
- logo: z.ZodOptional<z.ZodString>;
10
- coingeckoId: z.ZodOptional<z.ZodString>;
11
- noDiscovery: z.ZodOptional<z.ZodBoolean>;
12
- mirrorOf: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strict>;
14
- export type TokenBase = z.infer<typeof TokenBaseSchema>;
@@ -1,14 +0,0 @@
1
- export * from "./EvmErc20Token";
2
- export * from "./EvmNativeToken";
3
- export * from "./EvmUniswapV2Token";
4
- export * from "./SolNativeToken";
5
- export * from "./SolSplToken";
6
- export * from "./SubstrateAssetsToken";
7
- export * from "./SubstrateDTaoToken";
8
- export * from "./SubstrateForeignAssetsToken";
9
- export * from "./SubstrateNativeToken";
10
- export * from "./SubstratePsp22Token";
11
- export * from "./SubstrateTokensToken";
12
- export * from "./SubstrateHydrationToken";
13
- export * from "./TokenBase";
14
- export * from "./Token";
@@ -1 +0,0 @@
1
- export declare const generateTokenId: (...parts: string[]) => string;
@@ -1,428 +0,0 @@
1
- import { DotNetwork, Network, NetworkPlatform } from "./networks";
2
- import { Token, TokenId, TokenIdSpecs, TokenType } from "./tokens";
3
- export type NetworkOfPlatform<P extends NetworkPlatform> = Extract<Network, {
4
- platform: P;
5
- }>;
6
- export declare const isNetworkOfPlatform: <P extends NetworkPlatform>(network: Network | null | undefined, platform: P) => network is Extract<Network, {
7
- platform: P;
8
- }>;
9
- export declare const isNetworkInPlatforms: <P extends NetworkPlatform[]>(network: Network | null | undefined, platforms: P) => network is NetworkOfPlatform<P[number]>;
10
- export declare const isNetworkDot: (network: Network | null | undefined) => network is {
11
- id: string;
12
- name: string;
13
- nativeTokenId: string;
14
- nativeCurrency: {
15
- decimals: number;
16
- symbol: string;
17
- name: string;
18
- coingeckoId?: string | undefined;
19
- mirrorOf?: string | undefined;
20
- logo?: string | undefined;
21
- };
22
- blockExplorerUrls: string[];
23
- genesisHash: `0x${string}`;
24
- platform: "polkadot";
25
- chainName: string;
26
- specName: string;
27
- specVersion: number;
28
- account: "secp256k1" | "*25519";
29
- prefix: number;
30
- rpcs: string[];
31
- topology: {
32
- type: "standalone";
33
- } | {
34
- type: "relay";
35
- } | {
36
- type: "parachain";
37
- relayId: string;
38
- paraId: number;
39
- };
40
- isTestnet?: boolean | undefined;
41
- isDefault?: boolean | undefined;
42
- forceScan?: boolean | undefined;
43
- logo?: string | undefined;
44
- themeColor?: string | undefined;
45
- chainspecQrUrl?: string | undefined;
46
- latestMetadataQrUrl?: string | undefined;
47
- oldPrefix?: number | undefined;
48
- registryTypes?: any;
49
- signedExtensions?: any;
50
- hasCheckMetadataHash?: boolean | undefined;
51
- hasExtrinsicSignatureTypePrefix?: boolean | undefined;
52
- isUnknownFeeToken?: boolean | undefined;
53
- balancesConfig?: {
54
- "substrate-native"?: {
55
- disable?: boolean | undefined;
56
- } | undefined;
57
- "substrate-assets"?: Record<string, never> | undefined;
58
- "substrate-psp22"?: Record<string, never> | undefined;
59
- "substrate-tokens"?: {
60
- palletId?: string | undefined;
61
- } | undefined;
62
- "substrate-foreignassets"?: Record<string, never> | undefined;
63
- "substrate-hydration"?: Record<string, never> | undefined;
64
- "substrate-dtao"?: Record<string, never> | undefined;
65
- } | undefined;
66
- };
67
- export declare const isNetworkEth: (network: Network | null | undefined) => network is {
68
- id: string;
69
- name: string;
70
- nativeTokenId: string;
71
- nativeCurrency: {
72
- decimals: number;
73
- symbol: string;
74
- name: string;
75
- coingeckoId?: string | undefined;
76
- mirrorOf?: string | undefined;
77
- logo?: string | undefined;
78
- };
79
- blockExplorerUrls: string[];
80
- platform: "ethereum";
81
- rpcs: string[];
82
- isTestnet?: boolean | undefined;
83
- isDefault?: boolean | undefined;
84
- forceScan?: boolean | undefined;
85
- logo?: string | undefined;
86
- themeColor?: string | undefined;
87
- substrateChainId?: string | undefined;
88
- preserveGasEstimate?: boolean | undefined;
89
- feeType?: "legacy" | "eip-1559" | undefined;
90
- l2FeeType?: {
91
- type: "op-stack";
92
- } | {
93
- type: "scroll";
94
- l1GasPriceOracle: `0x${string}`;
95
- } | undefined;
96
- contracts?: {
97
- Erc20Aggregator?: `0x${string}` | undefined;
98
- Multicall3?: `0x${string}` | undefined;
99
- } | undefined;
100
- balancesConfig?: {
101
- "evm-native"?: Record<string, never> | undefined;
102
- "evm-erc20"?: Record<string, never> | undefined;
103
- "evm-uniswapv2"?: Record<string, never> | undefined;
104
- } | undefined;
105
- };
106
- export declare const isNetworkSol: (network: Network | null | undefined) => network is {
107
- id: string;
108
- name: string;
109
- nativeTokenId: string;
110
- nativeCurrency: {
111
- decimals: number;
112
- symbol: string;
113
- name: string;
114
- coingeckoId?: string | undefined;
115
- mirrorOf?: string | undefined;
116
- logo?: string | undefined;
117
- };
118
- blockExplorerUrls: string[];
119
- platform: "solana";
120
- genesisHash: string;
121
- rpcs: string[];
122
- isTestnet?: boolean | undefined;
123
- isDefault?: boolean | undefined;
124
- forceScan?: boolean | undefined;
125
- logo?: string | undefined;
126
- themeColor?: string | undefined;
127
- balancesConfig?: {
128
- "sol-native"?: Record<string, never> | undefined;
129
- "sol-spl"?: Record<string, never> | undefined;
130
- } | undefined;
131
- };
132
- export declare const getNetworkGenesisHash: <Net extends Network, Res = Net extends DotNetwork ? DotNetwork["genesisHash"] : undefined>(network: Net | null | undefined) => Res;
133
- export type TokenOfType<T extends TokenType> = Extract<Token, {
134
- type: T;
135
- }>;
136
- export type TokenOfPlatform<P extends NetworkPlatform> = Extract<Token, {
137
- platform: P;
138
- }>;
139
- export type DotToken = TokenOfPlatform<"polkadot">;
140
- export type EthToken = TokenOfPlatform<"ethereum">;
141
- export type SolToken = TokenOfPlatform<"solana">;
142
- export declare const isTokenOfPlatform: <P extends NetworkPlatform>(token: Token | null | undefined, platform: P) => token is TokenOfPlatform<P>;
143
- export declare const isTokenEth: (token: Token | null | undefined) => token is TokenOfPlatform<"ethereum">;
144
- export declare const isTokenDot: (token: Token | null | undefined) => token is TokenOfPlatform<"polkadot">;
145
- export declare const isTokenSol: (token: Token | null | undefined) => token is TokenOfPlatform<"solana">;
146
- export declare const isTokenNeedExistentialDeposit: (token: Token) => token is {
147
- id: string;
148
- networkId: string;
149
- decimals: number;
150
- symbol: string;
151
- type: "substrate-assets";
152
- platform: "polkadot";
153
- assetId: string;
154
- isSufficient: boolean;
155
- existentialDeposit: string;
156
- isDefault?: boolean | undefined;
157
- name?: string | undefined;
158
- logo?: string | undefined;
159
- coingeckoId?: string | undefined;
160
- noDiscovery?: boolean | undefined;
161
- mirrorOf?: string | undefined;
162
- isFrozen?: boolean | undefined;
163
- } | {
164
- id: string;
165
- networkId: string;
166
- decimals: number;
167
- symbol: string;
168
- type: "substrate-foreignassets";
169
- platform: "polkadot";
170
- onChainId: string;
171
- isSufficient: boolean;
172
- existentialDeposit: string;
173
- isDefault?: boolean | undefined;
174
- name?: string | undefined;
175
- logo?: string | undefined;
176
- coingeckoId?: string | undefined;
177
- noDiscovery?: boolean | undefined;
178
- mirrorOf?: string | undefined;
179
- isFrozen?: boolean | undefined;
180
- } | {
181
- id: string;
182
- networkId: string;
183
- decimals: number;
184
- symbol: string;
185
- type: "substrate-native";
186
- platform: "polkadot";
187
- existentialDeposit: string;
188
- isDefault?: boolean | undefined;
189
- name?: string | undefined;
190
- logo?: string | undefined;
191
- coingeckoId?: string | undefined;
192
- noDiscovery?: boolean | undefined;
193
- mirrorOf?: string | undefined;
194
- } | {
195
- id: string;
196
- networkId: string;
197
- decimals: number;
198
- symbol: string;
199
- type: "substrate-tokens";
200
- platform: "polkadot";
201
- onChainId: string | number;
202
- existentialDeposit: string;
203
- isDefault?: boolean | undefined;
204
- name?: string | undefined;
205
- logo?: string | undefined;
206
- coingeckoId?: string | undefined;
207
- noDiscovery?: boolean | undefined;
208
- mirrorOf?: string | undefined;
209
- } | {
210
- id: string;
211
- networkId: string;
212
- decimals: number;
213
- symbol: string;
214
- type: "substrate-hydration";
215
- platform: "polkadot";
216
- onChainId: number;
217
- assetType: "Token" | "Erc20" | "External";
218
- isSufficient: boolean;
219
- existentialDeposit: string;
220
- isDefault?: boolean | undefined;
221
- name?: string | undefined;
222
- logo?: string | undefined;
223
- coingeckoId?: string | undefined;
224
- noDiscovery?: boolean | undefined;
225
- mirrorOf?: string | undefined;
226
- };
227
- export declare const isTokenOfType: <T extends TokenType>(token: Token | null | undefined, type: T) => token is TokenOfType<T>;
228
- export declare const isTokenInTypes: <T extends TokenType[]>(token: Token | null | undefined, types: T) => token is TokenOfType<T[number]>;
229
- export declare const isTokenSubNative: (token: Token | null | undefined) => token is {
230
- id: string;
231
- networkId: string;
232
- decimals: number;
233
- symbol: string;
234
- type: "substrate-native";
235
- platform: "polkadot";
236
- existentialDeposit: string;
237
- isDefault?: boolean | undefined;
238
- name?: string | undefined;
239
- logo?: string | undefined;
240
- coingeckoId?: string | undefined;
241
- noDiscovery?: boolean | undefined;
242
- mirrorOf?: string | undefined;
243
- };
244
- export declare const isTokenSubAssets: (token: Token | null | undefined) => token is {
245
- id: string;
246
- networkId: string;
247
- decimals: number;
248
- symbol: string;
249
- type: "substrate-assets";
250
- platform: "polkadot";
251
- assetId: string;
252
- isSufficient: boolean;
253
- existentialDeposit: string;
254
- isDefault?: boolean | undefined;
255
- name?: string | undefined;
256
- logo?: string | undefined;
257
- coingeckoId?: string | undefined;
258
- noDiscovery?: boolean | undefined;
259
- mirrorOf?: string | undefined;
260
- isFrozen?: boolean | undefined;
261
- };
262
- export declare const isTokenSubDTao: (token: Token | null | undefined) => token is {
263
- id: string;
264
- networkId: string;
265
- decimals: number;
266
- symbol: string;
267
- type: "substrate-dtao";
268
- platform: "polkadot";
269
- netuid: number;
270
- isTransferable: boolean;
271
- isDefault?: boolean | undefined;
272
- name?: string | undefined;
273
- logo?: string | undefined;
274
- coingeckoId?: string | undefined;
275
- noDiscovery?: boolean | undefined;
276
- mirrorOf?: string | undefined;
277
- subnetName?: string | undefined;
278
- hotkey?: string | undefined;
279
- };
280
- export declare const isTokenSubForeignAssets: (token: Token | null | undefined) => token is {
281
- id: string;
282
- networkId: string;
283
- decimals: number;
284
- symbol: string;
285
- type: "substrate-foreignassets";
286
- platform: "polkadot";
287
- onChainId: string;
288
- isSufficient: boolean;
289
- existentialDeposit: string;
290
- isDefault?: boolean | undefined;
291
- name?: string | undefined;
292
- logo?: string | undefined;
293
- coingeckoId?: string | undefined;
294
- noDiscovery?: boolean | undefined;
295
- mirrorOf?: string | undefined;
296
- isFrozen?: boolean | undefined;
297
- };
298
- export declare const isTokenSubPsp22: (token: Token | null | undefined) => token is {
299
- id: string;
300
- networkId: string;
301
- decimals: number;
302
- symbol: string;
303
- type: "substrate-psp22";
304
- platform: "polkadot";
305
- contractAddress: string;
306
- isDefault?: boolean | undefined;
307
- name?: string | undefined;
308
- logo?: string | undefined;
309
- coingeckoId?: string | undefined;
310
- noDiscovery?: boolean | undefined;
311
- mirrorOf?: string | undefined;
312
- };
313
- export declare const isTokenSubTokens: (token: Token | null | undefined) => token is {
314
- id: string;
315
- networkId: string;
316
- decimals: number;
317
- symbol: string;
318
- type: "substrate-tokens";
319
- platform: "polkadot";
320
- onChainId: string | number;
321
- existentialDeposit: string;
322
- isDefault?: boolean | undefined;
323
- name?: string | undefined;
324
- logo?: string | undefined;
325
- coingeckoId?: string | undefined;
326
- noDiscovery?: boolean | undefined;
327
- mirrorOf?: string | undefined;
328
- };
329
- export declare const isTokenSubHydration: (token: Token | null | undefined) => token is {
330
- id: string;
331
- networkId: string;
332
- decimals: number;
333
- symbol: string;
334
- type: "substrate-hydration";
335
- platform: "polkadot";
336
- onChainId: number;
337
- assetType: "Token" | "Erc20" | "External";
338
- isSufficient: boolean;
339
- existentialDeposit: string;
340
- isDefault?: boolean | undefined;
341
- name?: string | undefined;
342
- logo?: string | undefined;
343
- coingeckoId?: string | undefined;
344
- noDiscovery?: boolean | undefined;
345
- mirrorOf?: string | undefined;
346
- };
347
- export declare const isTokenEvmNative: (token: Token | null | undefined) => token is {
348
- id: string;
349
- networkId: string;
350
- decimals: number;
351
- symbol: string;
352
- type: "evm-native";
353
- platform: "ethereum";
354
- isDefault?: boolean | undefined;
355
- name?: string | undefined;
356
- logo?: string | undefined;
357
- coingeckoId?: string | undefined;
358
- noDiscovery?: boolean | undefined;
359
- mirrorOf?: string | undefined;
360
- };
361
- export declare const isTokenEvmErc20: (token: Token | null | undefined) => token is {
362
- id: string;
363
- networkId: string;
364
- decimals: number;
365
- symbol: string;
366
- type: "evm-erc20";
367
- platform: "ethereum";
368
- contractAddress: `0x${string}`;
369
- isDefault?: boolean | undefined;
370
- name?: string | undefined;
371
- logo?: string | undefined;
372
- coingeckoId?: string | undefined;
373
- noDiscovery?: boolean | undefined;
374
- mirrorOf?: string | undefined;
375
- };
376
- export declare const isTokenEvmUniswapV2: (token: Token | null | undefined) => token is {
377
- id: string;
378
- networkId: string;
379
- decimals: number;
380
- symbol: string;
381
- type: "evm-uniswapv2";
382
- platform: "ethereum";
383
- contractAddress: `0x${string}`;
384
- symbol0: string;
385
- symbol1: string;
386
- decimals0: number;
387
- decimals1: number;
388
- tokenAddress0: `0x${string}`;
389
- tokenAddress1: `0x${string}`;
390
- isDefault?: boolean | undefined;
391
- name?: string | undefined;
392
- logo?: string | undefined;
393
- coingeckoId?: string | undefined;
394
- noDiscovery?: boolean | undefined;
395
- mirrorOf?: string | undefined;
396
- isCustom?: boolean | undefined;
397
- coingeckoId0?: string | undefined;
398
- coingeckoId1?: string | undefined;
399
- };
400
- export declare const isTokenSolSpl: (token: Token | null | undefined) => token is {
401
- id: string;
402
- networkId: string;
403
- decimals: number;
404
- symbol: string;
405
- type: "sol-spl";
406
- platform: "solana";
407
- mintAddress: string;
408
- isDefault?: boolean | undefined;
409
- name?: string | undefined;
410
- logo?: string | undefined;
411
- coingeckoId?: string | undefined;
412
- noDiscovery?: boolean | undefined;
413
- mirrorOf?: string | undefined;
414
- };
415
- export declare const parseTokenId: <T extends TokenType>(tokenId: TokenId) => TokenIdSpecs<T>;
416
- export declare const networkIdFromTokenId: (tokenId: TokenId) => Network["id"];
417
- declare const PLATFORM_NATIVE_TOKENS: {
418
- polkadot: "substrate-native";
419
- ethereum: "evm-native";
420
- solana: "sol-native";
421
- };
422
- export type NativeTokenType<P extends NetworkPlatform = NetworkPlatform> = (typeof PLATFORM_NATIVE_TOKENS)[P];
423
- export type NativeToken<P extends NetworkPlatform = NetworkPlatform> = Extract<Token, {
424
- type: NativeTokenType<P>;
425
- }>;
426
- export declare const isNativeTokenType: <P extends NetworkPlatform = NetworkPlatform>(type: TokenType, platform?: P) => type is NativeTokenType<P>;
427
- export declare const isNativeToken: <P extends NetworkPlatform = NetworkPlatform>(token: Token, platform?: P) => token is NativeToken<P>;
428
- export {};
@@ -1,10 +0,0 @@
1
- export declare const MINIMETADATA_VERSION: string;
2
- export declare const githubCdn = "https://raw.githubusercontent.com";
3
- export declare const githubChaindataOrg = "TalismanSociety";
4
- export declare const githubChaindataRepo = "chaindata";
5
- export declare const githubChaindataBranch = "main";
6
- export declare const githubChaindataDistDir = "pub/v9";
7
- export declare const githubChaindataBaseUrl = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main";
8
- export declare const githubChaindataDistUrl = "https://raw.githubusercontent.com/TalismanSociety/chaindata/main/pub/v9";
9
- export declare const githubChaindataChainsAssetsDir = "assets/chains";
10
- export declare const githubChaindataTokensAssetsDir = "assets/tokens";
@@ -1,23 +0,0 @@
1
- import { Network } from "./chaindata";
2
- export type BlockExplorerQuery = {
3
- type: "address";
4
- address: string;
5
- } | {
6
- type: "account";
7
- address: string;
8
- } | {
9
- type: "transaction";
10
- id: string;
11
- } | {
12
- type: "block";
13
- id: string | number | bigint;
14
- } | {
15
- type: "extrinsic";
16
- blockNumber: number | bigint;
17
- extrinsicIndex: number;
18
- } | {
19
- type: "extrinsic-unknown";
20
- hash: `0x${string}`;
21
- };
22
- export declare const getBlockExplorerUrls: (network: Network, query: BlockExplorerQuery) => string[];
23
- export declare const getBlockExplorerLabel: (blockExplorerUrl: string) => string;
@@ -1,11 +0,0 @@
1
- export * from "./chaindata";
2
- export * from "./provider/ChaindataProviderInterface";
3
- export * from "./provider/ChaindataProvider";
4
- export * from "./util";
5
- export * from "./legacy/Chain";
6
- export * from "./legacy/EvmNetwork";
7
- export * from "./legacy/TalismanChaindataDatabase";
8
- export * from "./getBlockExplorerUrls";
9
- export { MINIMETADATA_VERSION } from "./constants";
10
- export { getCleanNetwork, getCleanToken, isNetworkCustom, isNetworkKnown, isTokenCustom, isTokenKnown, isTokenTestnet, } from "./state/combinedChaindata";
11
- export { ChaindataFileSchema, CustomChaindataSchema, type Chaindata, type CustomChaindata, } from "./state/schema";
@@ -1,91 +0,0 @@
1
- import { TokenId } from "../chaindata";
2
- import { LegacyEvmNetworkId } from "./EvmNetwork";
3
- /** @deprecated use NetworkId */
4
- export type LegacyChainId = string;
5
- /** @deprecated use DotNetwork */
6
- export type LegacyChain = {
7
- id: LegacyChainId;
8
- isTestnet: boolean;
9
- isDefault: boolean;
10
- /** @deprecated */
11
- sortIndex: number | null;
12
- genesisHash: `0x${string}` | null;
13
- prefix: number | null;
14
- oldPrefix?: number;
15
- name: string | null;
16
- themeColor: string | null;
17
- logo: string | null;
18
- chainName: string | null;
19
- chainType: "Development" | "Local" | "Live" | {
20
- Custom: string;
21
- } | string | null;
22
- implName: string | null;
23
- specName: string | null;
24
- specVersion: string | null;
25
- nativeToken: {
26
- id: TokenId;
27
- } | null;
28
- tokens: Array<{
29
- id: TokenId;
30
- }> | null;
31
- account: string | null;
32
- subscanUrl: string | null;
33
- blockExplorerUrls: string[] | null;
34
- chainspecQrUrl: string | null;
35
- latestMetadataQrUrl: string | null;
36
- isUnknownFeeToken: boolean;
37
- feeToken: string | null;
38
- rpcs: Array<SubstrateRpc> | null;
39
- evmNetworks: Array<{
40
- id: LegacyEvmNetworkId;
41
- }>;
42
- parathreads: Array<Pick<LegacyChain, "id" | "paraId" | "name">> | null;
43
- paraId: number | null;
44
- relay: Pick<LegacyChain, "id"> | null;
45
- balancesConfig: Array<BalancesConfigLegacy>;
46
- /** @deprecated has its own store now */
47
- balancesMetadata: Array<BalancesMetadataLegacy>;
48
- /** Indicates if the chain has the `CheckMetadataHash` extension, enabling signing with the ledger generic app */
49
- hasCheckMetadataHash?: boolean;
50
- /**
51
- * Some chains require a 1-byte prefix on transaction signatures to indicate the signing algo used:
52
- *
53
- * - Ed25519: `0x00`
54
- * - Sr25519: `0x01`
55
- * - Ecdsa: `0x02`
56
- * - Ethereum: `0x03`
57
- *
58
- * Polkadot.js tries to auto-detect whether to add this prefix or not,
59
- * as part of the `GenericExtrinsicPayload.sign` method:
60
- * - https://github.com/polkadot-js/api/blob/778d79a/packages/types/src/extrinsic/v4/ExtrinsicPayload.ts#L37-L39
61
- * - https://github.com/polkadot-js/api/blob/778d79a/packages/types/src/extrinsic/v4/ExtrinsicPayload.ts#L122-L129
62
- *
63
- * However, on some chains this auto-detection results in either a false-positive or false-negative.
64
- *
65
- * By leveraging the generic extrinsic sign function from `@polkadot/types/extrinsic/util`:
66
- * - https://github.com/polkadot-js/api/blob/778d79a/packages/types/src/extrinsic/util.ts#L9-L15
67
- *
68
- * We can specify whether or not to include the signature prefix, based on the value of this `hasExtrinsicSignatureTypePrefix` property.
69
- */
70
- hasExtrinsicSignatureTypePrefix?: boolean;
71
- /** Custom types to be registered in the TypeRegistry */
72
- signedExtensions?: any;
73
- /** Custom signed extensions to be registered in the Metadata object */
74
- registryTypes?: any;
75
- };
76
- /** @deprecated use CustomDotNetwork */
77
- export type LegacyCustomChain = LegacyChain & {
78
- isCustom: true;
79
- };
80
- type SubstrateRpc = {
81
- url: string;
82
- };
83
- type BalancesConfigLegacy = {
84
- moduleType: string;
85
- moduleConfig: unknown;
86
- };
87
- type BalancesMetadataLegacy = {
88
- moduleType: string;
89
- metadata: unknown;
90
- };
91
- export {};
@@ -1,64 +0,0 @@
1
- import { TokenId } from "../chaindata";
2
- import { LegacyChainId } from "./Chain";
3
- /** @deprecated */
4
- export type LegacyEvmNetworkId = string;
5
- /** @deprecated */
6
- export type LegacyEvmNetwork = {
7
- id: LegacyEvmNetworkId;
8
- isTestnet: boolean;
9
- isDefault: boolean;
10
- forceScan: boolean;
11
- /** @deprecated */
12
- sortIndex: number | null;
13
- name: string | null;
14
- themeColor: string | null;
15
- logo: string | null;
16
- nativeToken: {
17
- id: TokenId;
18
- } | null;
19
- /** @deprecated tokens already reference their network */
20
- tokens: Array<{
21
- id: TokenId;
22
- }> | null;
23
- explorerUrl: string | null;
24
- rpcs: Array<EthereumRpc> | null;
25
- substrateChain: {
26
- id: LegacyChainId;
27
- } | null;
28
- /**
29
- * indicates whether gasEstimates must be used as-is for txs to be valid
30
- *
31
- * PolkadotVM: https://contracts.polkadot.io/differences_to_eth
32
- * Acala: https://evmdocs.acala.network/network/gas-parameters
33
- */
34
- preserveGasEstimate?: boolean;
35
- feeType?: "legacy" | "eip-1559";
36
- l2FeeType?: {
37
- type: "op-stack";
38
- } | {
39
- type: "scroll";
40
- l1GasPriceOracle: `0x${string}`;
41
- };
42
- balancesConfig: Array<BalancesConfigLegacy>;
43
- /** @deprecated has its own store now */
44
- balancesMetadata: Array<BalancesMetadataLegacy>;
45
- erc20aggregator?: `0x${string}`;
46
- };
47
- /** @deprecated */
48
- export type LegacyCustomEvmNetwork = LegacyEvmNetwork & {
49
- isCustom: true;
50
- explorerUrls: string[];
51
- iconUrls: string[];
52
- };
53
- type EthereumRpc = {
54
- url: string;
55
- };
56
- type BalancesConfigLegacy = {
57
- moduleType: string;
58
- moduleConfig: unknown;
59
- };
60
- type BalancesMetadataLegacy = {
61
- moduleType: string;
62
- metadata: unknown;
63
- };
64
- export {};
@@ -1,13 +0,0 @@
1
- import { Dexie } from "dexie";
2
- import { Token, TokenId } from "../chaindata";
3
- import { LegacyChain, LegacyChainId, LegacyCustomChain } from "./Chain";
4
- import { LegacyCustomEvmNetwork, LegacyEvmNetwork, LegacyEvmNetworkId } from "./EvmNetwork";
5
- declare class TalismanChaindataDatabase extends Dexie {
6
- chains: Dexie.Table<LegacyChain | LegacyCustomChain, LegacyChainId>;
7
- evmNetworks: Dexie.Table<LegacyEvmNetwork | LegacyCustomEvmNetwork, LegacyEvmNetworkId>;
8
- tokens: Dexie.Table<Token, TokenId>;
9
- constructor();
10
- }
11
- /** @deprecated */
12
- export declare const getChaindataDbV3: () => TalismanChaindataDatabase;
13
- export {};
@@ -1,2 +0,0 @@
1
- declare const _default: import("anylogger").Logger<import("anylogger").BaseLevels>;
2
- export default _default;