@talismn/balances 0.0.0-pr2043-20250615092436 → 0.0.0-pr2043-20250617025844

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 (24) hide show
  1. package/dist/declarations/src/EvmTokenFetcher.d.ts +2 -2
  2. package/dist/declarations/src/MiniMetadataUpdater.d.ts +3 -3
  3. package/dist/declarations/src/libVersion.d.ts +1 -0
  4. package/dist/declarations/src/modules/EvmErc20Module.d.ts +4 -7
  5. package/dist/declarations/src/modules/EvmNativeModule.d.ts +4 -7
  6. package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +4 -7
  7. package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +2 -5
  8. package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +2 -5
  9. package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +0 -1
  10. package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +2 -3
  11. package/dist/declarations/src/modules/SubstrateNativeModule/util/balanceLockTypes.d.ts +2 -4
  12. package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +2 -2
  13. package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +4 -7
  14. package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +2 -5
  15. package/dist/declarations/src/modules/index.d.ts +1 -207
  16. package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +3 -3
  17. package/dist/declarations/src/modules/util/findChainMeta.d.ts +2 -2
  18. package/dist/declarations/src/types/balances.d.ts +7 -145
  19. package/dist/declarations/src/types/balancetypes.d.ts +6 -16
  20. package/dist/declarations/src/types/minimetadatas.d.ts +4 -13
  21. package/dist/talismn-balances.cjs.dev.js +400 -405
  22. package/dist/talismn-balances.cjs.prod.js +400 -405
  23. package/dist/talismn-balances.esm.js +398 -395
  24. package/package.json +6 -7
@@ -2,10 +2,10 @@ import { ChaindataProvider, EvmNetworkId } from "@talismn/chaindata-provider";
2
2
  import { AnyBalanceModule } from "./modules/util";
3
3
  /**
4
4
  * Fetches tokens for EVM networks.
5
+ * @deprecated
5
6
  */
6
7
  export declare class EvmTokenFetcher {
7
8
  #private;
8
9
  constructor(chaindataProvider: ChaindataProvider, balanceModules: Array<AnyBalanceModule>);
9
- update(evmNetworkIds: EvmNetworkId[]): Promise<void>;
10
- private updateEvmNetworks;
10
+ update(_evmNetworkIds: EvmNetworkId[]): Promise<void>;
11
11
  }
@@ -1,4 +1,4 @@
1
- import { Chain, ChaindataProvider, ChainId } from "@talismn/chaindata-provider";
1
+ import { ChaindataProvider, ChainId, DotNetwork } from "@talismn/chaindata-provider";
2
2
  import { ChainConnectors } from "./BalanceModule";
3
3
  import { AnyBalanceModule } from "./modules/util";
4
4
  import { MiniMetadata, MiniMetadataStatus } from "./types";
@@ -33,11 +33,11 @@ export declare class MiniMetadataUpdater {
33
33
  /** Subscribe to the metadata for a chain */
34
34
  subscribe(chainId: ChainId): import("rxjs").Observable<MiniMetadata>;
35
35
  update(chainIds: ChainId[]): Promise<void>;
36
- statuses(chains: Array<Pick<Chain, "id" | "specName" | "specVersion" | "balancesConfig">>): Promise<{
36
+ statuses(chains: Array<Pick<DotNetwork, "id" | "specName" | "specVersion">>): Promise<{
37
37
  wantedIdsByChain: Map<string, string[]>;
38
38
  statusesByChain: Map<string, MiniMetadataStatus>;
39
39
  }>;
40
40
  hydrateFromChaindata(): Promise<boolean>;
41
- hydrateCustomChains(): Promise<boolean>;
41
+ hydrateCustomChains(): Promise<void>;
42
42
  private updateSubstrateChains;
43
43
  }
@@ -0,0 +1 @@
1
+ export declare const libVersion: string;
@@ -1,14 +1,11 @@
1
- import { BalancesConfigTokenParams, CustomEvmErc20Token, EvmErc20Token, EvmNetworkId } from "@talismn/chaindata-provider";
2
- import { NewBalanceModule } from "../BalanceModule";
1
+ import { BalancesConfigTokenParams, CustomEvmErc20Token, EvmErc20Token } from "@talismn/chaindata-provider";
2
+ import { DefaultChainMeta, NewBalanceModule } from "../BalanceModule";
3
3
  import { NewBalanceType } from "../types";
4
4
  import { erc20Abi } from "./abis/erc20";
5
5
  import { erc20BalancesAggregatorAbi } from "./abis/erc20BalancesAggregator";
6
6
  export { erc20Abi, erc20BalancesAggregatorAbi };
7
7
  type ModuleType = "evm-erc20";
8
- export declare const evmErc20TokenId: (chainId: EvmNetworkId, tokenContractAddress: EvmErc20Token["contractAddress"]) => string;
9
- export type EvmErc20ChainMeta = {
10
- isTestnet: boolean;
11
- };
8
+ export type EvmErc20ChainMeta = DefaultChainMeta;
12
9
  export type EvmErc20ModuleConfig = {
13
10
  tokens?: Array<{
14
11
  symbol?: string;
@@ -17,7 +14,7 @@ export type EvmErc20ModuleConfig = {
17
14
  contractAddress?: `0x${string}`;
18
15
  } & BalancesConfigTokenParams>;
19
16
  };
20
- export type EvmErc20Balance = NewBalanceType<ModuleType, "simple", "ethereum">;
17
+ export type EvmErc20Balance = NewBalanceType<ModuleType, "simple">;
21
18
  declare module "@talismn/balances/plugins" {
22
19
  interface PluginBalanceTypes {
23
20
  "evm-erc20": EvmErc20Balance;
@@ -1,13 +1,10 @@
1
- import { BalancesConfigTokenParams, CustomEvmNativeToken, EvmNativeToken, EvmNetworkId } from "@talismn/chaindata-provider";
2
- import { NewBalanceModule } from "../BalanceModule";
1
+ import { BalancesConfigTokenParams, CustomEvmNativeToken, EvmNativeToken } from "@talismn/chaindata-provider";
2
+ import { DefaultChainMeta, NewBalanceModule } from "../BalanceModule";
3
3
  import { NewBalanceType } from "../types";
4
4
  type ModuleType = "evm-native";
5
- export declare const evmNativeTokenId: (chainId: EvmNetworkId) => string;
6
- export type EvmNativeChainMeta = {
7
- isTestnet: boolean;
8
- };
5
+ export type EvmNativeChainMeta = DefaultChainMeta;
9
6
  export type EvmNativeModuleConfig = BalancesConfigTokenParams;
10
- export type EvmNativeBalance = NewBalanceType<ModuleType, "simple", "ethereum">;
7
+ export type EvmNativeBalance = NewBalanceType<ModuleType, "simple">;
11
8
  declare module "@talismn/balances/plugins" {
12
9
  interface PluginBalanceTypes {
13
10
  "evm-native": EvmNativeBalance;
@@ -1,13 +1,10 @@
1
- import { BalancesConfigTokenParams, CustomEvmUniswapV2Token, EvmNetworkId, EvmUniswapV2Token } from "@talismn/chaindata-provider";
2
- import { NewBalanceModule } from "../BalanceModule";
1
+ import { BalancesConfigTokenParams, CustomEvmUniswapV2Token, EvmUniswapV2Token } from "@talismn/chaindata-provider";
2
+ import { DefaultChainMeta, NewBalanceModule } from "../BalanceModule";
3
3
  import { NewBalanceType } from "../types";
4
4
  import { uniswapV2PairAbi } from "./abis/uniswapV2Pair";
5
5
  export { uniswapV2PairAbi };
6
6
  type ModuleType = "evm-uniswapv2";
7
- export declare const evmUniswapV2TokenId: (chainId: EvmNetworkId, contractAddress: EvmUniswapV2Token["contractAddress"]) => string;
8
- export type EvmUniswapV2ChainMeta = {
9
- isTestnet: boolean;
10
- };
7
+ export type EvmUniswapV2ChainMeta = DefaultChainMeta;
11
8
  export type EvmUniswapV2ModuleConfig = {
12
9
  pools?: Array<{
13
10
  contractAddress?: `0x${string}`;
@@ -22,7 +19,7 @@ export type EvmUniswapV2ModuleConfig = {
22
19
  coingeckoId1?: string;
23
20
  } & BalancesConfigTokenParams>;
24
21
  };
25
- export type EvmUniswapV2Balance = NewBalanceType<"evm-uniswapv2", "complex", "ethereum">;
22
+ export type EvmUniswapV2Balance = NewBalanceType<"evm-uniswapv2", "complex">;
26
23
  declare module "@talismn/balances/plugins" {
27
24
  interface PluginBalanceTypes {
28
25
  "evm-uniswapv2": EvmUniswapV2Balance;
@@ -1,21 +1,18 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
2
  import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
3
- import { BalancesConfigTokenParams, ChainId, SubAssetsToken } from "@talismn/chaindata-provider";
3
+ import { BalancesConfigTokenParams, SubAssetsToken } from "@talismn/chaindata-provider";
4
4
  import { NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
5
5
  import { NewBalanceType } from "../types";
6
6
  type ModuleType = "substrate-assets";
7
- export declare const subAssetTokenId: (chainId: ChainId, assetId: string, tokenSymbol: string) => string;
8
7
  export type SubAssetsChainMeta = {
9
- isTestnet: boolean;
10
8
  miniMetadata?: string;
11
- metadataVersion?: number;
12
9
  };
13
10
  export type SubAssetsModuleConfig = {
14
11
  tokens?: Array<{
15
12
  assetId: string | number;
16
13
  } & BalancesConfigTokenParams>;
17
14
  };
18
- export type SubAssetsBalance = NewBalanceType<ModuleType, "complex", "substrate">;
15
+ export type SubAssetsBalance = NewBalanceType<ModuleType, "complex">;
19
16
  declare module "@talismn/balances/plugins" {
20
17
  interface PluginBalanceTypes {
21
18
  "substrate-assets": SubAssetsBalance;
@@ -1,21 +1,18 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
2
  import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
3
- import { BalancesConfigTokenParams, ChainId, SubForeignAssetsToken } from "@talismn/chaindata-provider";
3
+ import { BalancesConfigTokenParams, SubForeignAssetsToken } from "@talismn/chaindata-provider";
4
4
  import { NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
5
5
  import { NewBalanceType } from "../types";
6
6
  type ModuleType = "substrate-foreignassets";
7
- export declare const subForeignAssetTokenId: (chainId: ChainId, tokenSymbol: string) => string;
8
7
  export type SubForeignAssetsChainMeta = {
9
- isTestnet: boolean;
10
8
  miniMetadata?: string;
11
- metadataVersion?: number;
12
9
  };
13
10
  export type SubForeignAssetsModuleConfig = {
14
11
  tokens?: Array<{
15
12
  onChainId: string;
16
13
  } & BalancesConfigTokenParams>;
17
14
  };
18
- export type SubForeignAssetsBalance = NewBalanceType<ModuleType, "complex", "substrate">;
15
+ export type SubForeignAssetsBalance = NewBalanceType<ModuleType, "complex">;
19
16
  declare module "@talismn/balances/plugins" {
20
17
  interface PluginBalanceTypes {
21
18
  "substrate-foreignassets": SubForeignAssetsBalance;
@@ -3,7 +3,6 @@ import { NewBalanceModule } from "../../BalanceModule";
3
3
  import { ModuleType, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams } from "./types";
4
4
  export { filterBaseLocks, getLockTitle } from "./util/balanceLockTypes";
5
5
  export type { BalanceLockType } from "./util/balanceLockTypes";
6
- export { subNativeTokenId } from "./types";
7
6
  export type { ModuleType, SubNativeBalance, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams, } from "./types";
8
7
  export * from "./util/subtensor";
9
8
  export declare const SubNativeModule: NewBalanceModule<ModuleType, SubNativeToken | CustomSubNativeToken, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams>;
@@ -1,13 +1,12 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
2
  import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
3
- import { BalancesConfigTokenParams, ChainId } from "@talismn/chaindata-provider";
3
+ import { BalancesConfigTokenParams } from "@talismn/chaindata-provider";
4
4
  import { NewTransferParamsType } from "../../BalanceModule";
5
5
  import { NewBalanceType } from "../../types";
6
6
  export { filterBaseLocks, getLockTitle } from "./util/balanceLockTypes";
7
7
  export type { BalanceLockType } from "./util/balanceLockTypes";
8
8
  export type ModuleType = "substrate-native";
9
9
  export declare const moduleType: ModuleType;
10
- export declare const subNativeTokenId: (chainId: ChainId) => string;
11
10
  export type SubNativeChainMeta = {
12
11
  isTestnet: boolean;
13
12
  useLegacyTransferableCalculation?: boolean;
@@ -23,7 +22,7 @@ export type SubNativeChainMeta = {
23
22
  export type SubNativeModuleConfig = {
24
23
  disable?: boolean;
25
24
  } & BalancesConfigTokenParams;
26
- export type SubNativeBalance = NewBalanceType<ModuleType, "complex", "substrate">;
25
+ export type SubNativeBalance = NewBalanceType<ModuleType, "complex">;
27
26
  declare module "@talismn/balances/plugins" {
28
27
  interface PluginBalanceTypes {
29
28
  "substrate-native": SubNativeBalance;
@@ -1,4 +1,4 @@
1
- import { Balance, BalanceFormatter, LockedAmount } from "../../../types";
1
+ import { BalanceFormatter, LockedAmount } from "../../../types";
2
2
  export type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "subtensor-staking" | "vesting" | "dapp-staking" | `other-${string}` | "other";
3
3
  /**
4
4
  * For converting the value of `lock?.id?.toUtf8?.()` which is retrieved from
@@ -10,6 +10,4 @@ export declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "
10
10
  }>) => (Omit<LockedAmount<string>, "amount"> & {
11
11
  amount: BalanceFormatter;
12
12
  })[];
13
- export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
14
- balance?: Balance;
15
- }) => string;
13
+ export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">) => string;
@@ -1,9 +1,9 @@
1
- import { Chain, SubNativeToken, Token } from "@talismn/chaindata-provider";
1
+ import { DotNetwork, SubNativeToken, Token } from "@talismn/chaindata-provider";
2
2
  import { AddressesByToken, MiniMetadata } from "../../../types";
3
3
  import { RpcStateQuery, StorageCoders } from "../../util";
4
4
  import { SubNativeBalance } from "../types";
5
5
  export type QueryKey = string;
6
- export declare function buildQueries(chains: Record<string, Chain>, tokens: Record<string, Token>, chainStorageCoders: StorageCoders<{
6
+ export declare function buildQueries(chains: Record<string, DotNetwork>, tokens: Record<string, Token>, chainStorageCoders: StorageCoders<{
7
7
  base: ["System", "Account"];
8
8
  stakingLedger: ["Staking", "Ledger"];
9
9
  reserves: ["Balances", "Reserves"];
@@ -1,13 +1,10 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
2
  import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
3
- import { BalancesConfigTokenParams, ChainId, SubPsp22Token } from "@talismn/chaindata-provider";
4
- import { NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
3
+ import { BalancesConfigTokenParams, SubPsp22Token } from "@talismn/chaindata-provider";
4
+ import { DefaultChainMeta, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
5
5
  import { NewBalanceType } from "../types";
6
6
  type ModuleType = "substrate-psp22";
7
- export declare const subPsp22TokenId: (chainId: ChainId, tokenSymbol: string) => string;
8
- export type SubPsp22ChainMeta = {
9
- isTestnet: boolean;
10
- };
7
+ export type SubPsp22ChainMeta = DefaultChainMeta;
11
8
  export type SubPsp22ModuleConfig = {
12
9
  tokens?: Array<{
13
10
  symbol?: string;
@@ -16,7 +13,7 @@ export type SubPsp22ModuleConfig = {
16
13
  contractAddress?: string;
17
14
  } & BalancesConfigTokenParams>;
18
15
  };
19
- export type SubPsp22Balance = NewBalanceType<ModuleType, "simple", "substrate">;
16
+ export type SubPsp22Balance = NewBalanceType<ModuleType, "simple">;
20
17
  declare module "@talismn/balances/plugins" {
21
18
  interface PluginBalanceTypes {
22
19
  "substrate-psp22": SubPsp22Balance;
@@ -1,15 +1,12 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
2
  import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
3
- import { BalancesConfigTokenParams, ChainId, SubTokensToken } from "@talismn/chaindata-provider";
3
+ import { BalancesConfigTokenParams, SubTokensToken } from "@talismn/chaindata-provider";
4
4
  import { NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
5
5
  import { NewBalanceType } from "../types";
6
6
  type ModuleType = "substrate-tokens";
7
- export declare const subTokensTokenId: (chainId: ChainId, onChainId: string | number) => string;
8
7
  export type SubTokensChainMeta = {
9
- isTestnet: boolean;
10
8
  palletId?: string;
11
9
  miniMetadata?: string;
12
- metadataVersion?: number;
13
10
  };
14
11
  export type SubTokensModuleConfig = {
15
12
  palletId?: string;
@@ -20,7 +17,7 @@ export type SubTokensModuleConfig = {
20
17
  onChainId?: string | number;
21
18
  } & BalancesConfigTokenParams>;
22
19
  };
23
- export type SubTokensBalance = NewBalanceType<ModuleType, "complex", "substrate">;
20
+ export type SubTokensBalance = NewBalanceType<ModuleType, "complex">;
24
21
  declare module "@talismn/balances/plugins" {
25
22
  interface PluginBalanceTypes {
26
23
  "substrate-tokens": SubTokensBalance;
@@ -1,210 +1,4 @@
1
- export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20", {
2
- id: string;
3
- decimals: number;
4
- symbol: string;
5
- name: string;
6
- networkId: string;
7
- type: "evm-erc20";
8
- platform: "ethereum";
9
- contractAddress: `0x${string}`;
10
- isTestnet?: boolean | undefined;
11
- isDefault?: boolean | undefined;
12
- logo?: string | undefined;
13
- coingeckoId?: string | undefined;
14
- noDiscovery?: boolean | undefined;
15
- mirrorOf?: string | undefined;
16
- isCustom?: boolean | undefined;
17
- } | {
18
- id: string;
19
- decimals: number;
20
- symbol: string;
21
- name: string;
22
- networkId: string;
23
- type: "evm-erc20";
24
- platform: "ethereum";
25
- contractAddress: `0x${string}`;
26
- isCustom: true;
27
- isTestnet?: boolean | undefined;
28
- isDefault?: boolean | undefined;
29
- logo?: string | undefined;
30
- coingeckoId?: string | undefined;
31
- noDiscovery?: boolean | undefined;
32
- mirrorOf?: string | undefined;
33
- }, import("./EvmErc20Module").EvmErc20ChainMeta, import("./EvmErc20Module").EvmErc20ModuleConfig> | import("..").NewBalanceModule<"evm-native", {
34
- id: string;
35
- decimals: number;
36
- symbol: string;
37
- name: string;
38
- networkId: string;
39
- type: "evm-native";
40
- platform: "ethereum";
41
- isTestnet?: boolean | undefined;
42
- isDefault?: boolean | undefined;
43
- logo?: string | undefined;
44
- coingeckoId?: string | undefined;
45
- noDiscovery?: boolean | undefined;
46
- mirrorOf?: string | undefined;
47
- } | {
48
- id: string;
49
- decimals: number;
50
- symbol: string;
51
- name: string;
52
- networkId: string;
53
- type: "evm-native";
54
- platform: "ethereum";
55
- isCustom: true;
56
- isTestnet?: boolean | undefined;
57
- isDefault?: boolean | undefined;
58
- logo?: string | undefined;
59
- coingeckoId?: string | undefined;
60
- noDiscovery?: boolean | undefined;
61
- mirrorOf?: string | undefined;
62
- }, import("./EvmNativeModule").EvmNativeChainMeta, import("@talismn/chaindata-provider").BalancesConfigTokenParams> | import("..").NewBalanceModule<"evm-uniswapv2", {
63
- id: string;
64
- decimals: number;
65
- symbol: string;
66
- name: string;
67
- networkId: string;
68
- platform: "ethereum";
69
- contractAddress: `0x${string}`;
70
- type: "evm-uniswapv2";
71
- symbol0: string;
72
- symbol1: string;
73
- decimals0: number;
74
- decimals1: number;
75
- tokenAddress0: `0x${string}`;
76
- tokenAddress1: `0x${string}`;
77
- isTestnet?: boolean | undefined;
78
- isDefault?: boolean | undefined;
79
- logo?: string | undefined;
80
- coingeckoId?: string | undefined;
81
- noDiscovery?: boolean | undefined;
82
- mirrorOf?: string | undefined;
83
- isCustom?: boolean | undefined;
84
- coingeckoId0?: string | undefined;
85
- coingeckoId1?: string | undefined;
86
- } | {
87
- id: string;
88
- decimals: number;
89
- symbol: string;
90
- name: string;
91
- networkId: string;
92
- platform: "ethereum";
93
- contractAddress: `0x${string}`;
94
- type: "evm-uniswapv2";
95
- symbol0: string;
96
- symbol1: string;
97
- decimals0: number;
98
- decimals1: number;
99
- tokenAddress0: `0x${string}`;
100
- tokenAddress1: `0x${string}`;
101
- isCustom: true;
102
- isTestnet?: boolean | undefined;
103
- isDefault?: boolean | undefined;
104
- logo?: string | undefined;
105
- coingeckoId?: string | undefined;
106
- noDiscovery?: boolean | undefined;
107
- mirrorOf?: string | undefined;
108
- coingeckoId0?: string | undefined;
109
- coingeckoId1?: string | undefined;
110
- }, import("./EvmUniswapV2Module").EvmUniswapV2ChainMeta, import("./EvmUniswapV2Module").EvmUniswapV2ModuleConfig> | import("..").NewBalanceModule<"substrate-assets", {
111
- id: string;
112
- decimals: number;
113
- symbol: string;
114
- name: string;
115
- networkId: string;
116
- type: "substrate-assets";
117
- platform: "polkadot";
118
- assetId: string;
119
- existentialDeposit: string;
120
- isTestnet?: boolean | undefined;
121
- isDefault?: boolean | undefined;
122
- logo?: string | undefined;
123
- coingeckoId?: string | undefined;
124
- noDiscovery?: boolean | undefined;
125
- mirrorOf?: string | undefined;
126
- isFrozen?: boolean | undefined;
127
- }, import("./SubstrateAssetsModule").SubAssetsChainMeta, import("./SubstrateAssetsModule").SubAssetsModuleConfig, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-foreignassets", {
128
- id: string;
129
- decimals: number;
130
- symbol: string;
131
- name: string;
132
- networkId: string;
133
- type: "substrate-foreignassets";
134
- platform: "polkadot";
135
- onChainId: string;
136
- existentialDeposit: string;
137
- isTestnet?: boolean | undefined;
138
- isDefault?: boolean | undefined;
139
- logo?: string | undefined;
140
- coingeckoId?: string | undefined;
141
- noDiscovery?: boolean | undefined;
142
- mirrorOf?: string | undefined;
143
- isFrozen?: boolean | undefined;
144
- }, import("./SubstrateForeignAssetsModule").SubForeignAssetsChainMeta, import("./SubstrateForeignAssetsModule").SubForeignAssetsModuleConfig, import("./SubstrateForeignAssetsModule").SubForeignAssetsTransferParams> | import("..").NewBalanceModule<"substrate-native", {
145
- id: string;
146
- decimals: number;
147
- symbol: string;
148
- name: string;
149
- networkId: string;
150
- type: "substrate-native";
151
- platform: "polkadot";
152
- existentialDeposit: string;
153
- isTestnet?: boolean | undefined;
154
- isDefault?: boolean | undefined;
155
- logo?: string | undefined;
156
- coingeckoId?: string | undefined;
157
- noDiscovery?: boolean | undefined;
158
- mirrorOf?: string | undefined;
159
- } | {
160
- id: string;
161
- decimals: number;
162
- symbol: string;
163
- name: string;
164
- networkId: string;
165
- type: "substrate-native";
166
- platform: "polkadot";
167
- existentialDeposit: string;
168
- isCustom: true;
169
- isTestnet?: boolean | undefined;
170
- isDefault?: boolean | undefined;
171
- logo?: string | undefined;
172
- coingeckoId?: string | undefined;
173
- noDiscovery?: boolean | undefined;
174
- mirrorOf?: string | undefined;
175
- }, import("./SubstrateNativeModule").SubNativeChainMeta, import("./SubstrateNativeModule").SubNativeModuleConfig, import("./SubstrateNativeModule").SubNativeTransferParams> | import("..").NewBalanceModule<"substrate-psp22", {
176
- id: string;
177
- decimals: number;
178
- symbol: string;
179
- name: string;
180
- networkId: string;
181
- type: "substrate-psp22";
182
- platform: "polkadot";
183
- existentialDeposit: string;
184
- contractAddress: string;
185
- isTestnet?: boolean | undefined;
186
- isDefault?: boolean | undefined;
187
- logo?: string | undefined;
188
- coingeckoId?: string | undefined;
189
- noDiscovery?: boolean | undefined;
190
- mirrorOf?: string | undefined;
191
- }, import("./SubstratePsp22Module").SubPsp22ChainMeta, import("./SubstratePsp22Module").SubPsp22ModuleConfig, import("./SubstratePsp22Module").SubPsp22TransferParams> | import("..").NewBalanceModule<"substrate-tokens", {
192
- id: string;
193
- decimals: number;
194
- symbol: string;
195
- name: string;
196
- networkId: string;
197
- type: "substrate-tokens";
198
- platform: "polkadot";
199
- onChainId: string | number;
200
- existentialDeposit: string;
201
- isTestnet?: boolean | undefined;
202
- isDefault?: boolean | undefined;
203
- logo?: string | undefined;
204
- coingeckoId?: string | undefined;
205
- noDiscovery?: boolean | undefined;
206
- mirrorOf?: string | undefined;
207
- }, import("./SubstrateTokensModule").SubTokensChainMeta, import("./SubstrateTokensModule").SubTokensModuleConfig, import("./SubstrateTokensModule").SubTokensTransferParams>)[];
1
+ export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20", any, undefined, import("./EvmErc20Module").EvmErc20ModuleConfig> | import("..").NewBalanceModule<"evm-native", any, undefined, BalancesConfigTokenParams> | import("..").NewBalanceModule<"evm-uniswapv2", any, undefined, import("./EvmUniswapV2Module").EvmUniswapV2ModuleConfig> | import("..").NewBalanceModule<"substrate-assets", SubAssetsToken, import("./SubstrateAssetsModule").SubAssetsChainMeta, import("./SubstrateAssetsModule").SubAssetsModuleConfig, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-foreignassets", SubForeignAssetsToken, import("./SubstrateForeignAssetsModule").SubForeignAssetsChainMeta, import("./SubstrateForeignAssetsModule").SubForeignAssetsModuleConfig, import("./SubstrateForeignAssetsModule").SubForeignAssetsTransferParams> | import("..").NewBalanceModule<"substrate-native", any, import("./SubstrateNativeModule").SubNativeChainMeta, any, import("./SubstrateNativeModule").SubNativeTransferParams> | import("..").NewBalanceModule<"substrate-psp22", SubPsp22Token, undefined, import("./SubstratePsp22Module").SubPsp22ModuleConfig, import("./SubstratePsp22Module").SubPsp22TransferParams> | import("..").NewBalanceModule<"substrate-tokens", SubTokensToken, import("./SubstrateTokensModule").SubTokensChainMeta, import("./SubstrateTokensModule").SubTokensModuleConfig, import("./SubstrateTokensModule").SubTokensTransferParams>)[];
208
2
  export * from "./EvmErc20Module";
209
3
  export * from "./EvmNativeModule";
210
4
  export * from "./EvmUniswapV2Module";
@@ -1,4 +1,4 @@
1
- import { ChainId, ChainList } from "@talismn/chaindata-provider";
1
+ import { ChainId, DotNetwork, NetworkId } from "@talismn/chaindata-provider";
2
2
  import { getDynamicBuilder } from "@talismn/scale";
3
3
  import { MiniMetadata } from "../../types";
4
4
  import { AnyNewBalanceModule, InferModuleType } from "./InferBalanceModuleTypes";
@@ -13,11 +13,11 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
13
13
  }) => [string, string]);
14
14
  }>({ chainIds, chains, miniMetadatas, moduleType, coders, }: {
15
15
  chainIds: ChainId[];
16
- chains: ChainList;
16
+ chains: Record<NetworkId, DotNetwork>;
17
17
  miniMetadatas: Map<string, MiniMetadata>;
18
18
  moduleType: InferModuleType<TBalanceModule>;
19
19
  coders: TCoders;
20
- }) => Map<string, { [Property in keyof TCoders]: {
20
+ }) => Map<ChainId, { [Property in keyof TCoders]: {
21
21
  args: [import("scale-ts").Encoder<any[]>, import("scale-ts").Decoder<any[]>] & {
22
22
  enc: import("scale-ts").Encoder<any[]>;
23
23
  dec: import("scale-ts").Decoder<any[]>;
@@ -1,8 +1,8 @@
1
- import { Chain } from "@talismn/chaindata-provider";
1
+ import { DotNetwork } from "@talismn/chaindata-provider";
2
2
  import { MiniMetadata } from "../../types";
3
3
  import { AnyNewBalanceModule, InferChainMeta, InferModuleType } from "./InferBalanceModuleTypes";
4
4
  /**
5
5
  * Given a `moduleType` and a `chain` from a chaindataProvider, this function will find the chainMeta
6
6
  * associated with the given balanceModule for the given chain.
7
7
  */
8
- export declare const findChainMeta: <TBalanceModule extends AnyNewBalanceModule>(miniMetadatas: Map<string, MiniMetadata>, moduleType: InferModuleType<TBalanceModule>, chain?: Chain) => [InferChainMeta<TBalanceModule> | undefined, MiniMetadata | undefined];
8
+ export declare const findChainMeta: <TBalanceModule extends AnyNewBalanceModule>(miniMetadatas: Map<string, MiniMetadata>, moduleType: InferModuleType<TBalanceModule>, chain?: DotNetwork) => [InferChainMeta<TBalanceModule> | undefined, MiniMetadata | undefined];