@talismn/balances 0.0.0-pr2043-20250618090234 → 0.0.0-pr2043-20250619003406

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.
@@ -40,7 +40,7 @@ export interface BalanceModule<TModuleType extends string, TTokenType extends Se
40
40
  export declare const DefaultBalanceModule: <TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams>(type: TModuleType) => BalanceModule<TModuleType, TTokenType, TChainMeta, TModuleConfig, TTransferParams>;
41
41
  interface BalanceModuleSubstrate<TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams> extends BalanceModuleCommon<TModuleType, TTokenType, TTransferParams> {
42
42
  /** Pre-processes any substrate chain metadata required by this module ahead of time */
43
- fetchSubstrateChainMeta(chainId: ChainId, moduleConfig?: TModuleConfig, metadataRpc?: `0x${string}`, systemProperties?: Record<string, any>): Promise<TChainMeta | null>;
43
+ fetchSubstrateChainMeta(chainId: ChainId, moduleConfig?: TModuleConfig, metadataRpc?: `0x${string}`): Promise<TChainMeta | null>;
44
44
  /** Detects which tokens are available on a given substrate chain */
45
45
  fetchSubstrateChainTokens(chainId: ChainId, chainMeta: TChainMeta, moduleConfig?: TModuleConfig): Promise<Record<TTokenType["id"], TTokenType>>;
46
46
  }
@@ -1,4 +1,4 @@
1
1
  import { ChainConnector } from "@talismn/chain-connector";
2
2
  import { ChaindataProvider, DotNetworkId } from "@talismn/chaindata-provider";
3
3
  import { MiniMetadata } from "../types";
4
- export declare const getMiniMetadatas: (chainConnector: ChainConnector, chaindataProvider: ChaindataProvider, networkId: DotNetworkId, specVersion: number) => Promise<MiniMetadata[]>;
4
+ export declare const getMiniMetadatas: (chainConnector: ChainConnector, chaindataProvider: ChaindataProvider, networkId: DotNetworkId, specVersion: number, signal?: AbortSignal) => Promise<MiniMetadata[]>;
@@ -1,4 +1,4 @@
1
1
  import { ChainConnector } from "@talismn/chain-connector";
2
2
  import { ChaindataProvider, DotNetworkId } from "@talismn/chaindata-provider";
3
3
  import { MiniMetadata } from "../types";
4
- export declare const getUpdatedMiniMetadatas: (chainConnector: ChainConnector, chaindataProvider: ChaindataProvider, networkId: DotNetworkId, specVersion: number) => Promise<MiniMetadata[]>;
4
+ export declare const getUpdatedMiniMetadatas: (chainConnector: ChainConnector, chaindataProvider: ChaindataProvider, chainId: DotNetworkId, specVersion: number, signal?: AbortSignal) => Promise<MiniMetadata[]>;
@@ -1,4 +1,4 @@
1
1
  import { ChainConnector } from "@talismn/chain-connector";
2
2
  import { ChaindataProvider, NetworkId as DotNetworkId } from "@talismn/chaindata-provider";
3
3
  import { MiniMetadata } from "../types";
4
- export declare const getMiniMetadata: (chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, chainId: DotNetworkId, source: string) => Promise<MiniMetadata>;
4
+ export declare const getMiniMetadata: (chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, chainId: DotNetworkId, source: string, signal?: AbortSignal) => Promise<MiniMetadata>;
@@ -1,7 +1,5 @@
1
1
  export * from "./BalanceModule";
2
2
  export * from "./EvmTokenFetcher";
3
- export * from "./MiniMetadataUpdater";
4
3
  export * from "./TalismanBalancesDatabase";
5
4
  export * from "./modules";
6
5
  export * from "./types";
7
- export * from "./util";
@@ -8,16 +8,12 @@ export type { BalanceLockType } from "./util/balanceLockTypes";
8
8
  export type ModuleType = "substrate-native";
9
9
  export declare const moduleType: ModuleType;
10
10
  export type SubNativeChainMeta = {
11
- isTestnet: boolean;
12
11
  useLegacyTransferableCalculation?: boolean;
13
- symbol?: string;
14
- decimals?: number;
15
12
  existentialDeposit?: string;
16
13
  nominationPoolsPalletId?: string;
17
14
  crowdloanPalletId?: string;
18
15
  hasSubtensorPallet?: boolean;
19
16
  miniMetadata?: string;
20
- metadataVersion?: number;
21
17
  };
22
18
  export type SubNativeModuleConfig = {
23
19
  disable?: boolean;
@@ -0,0 +1,22 @@
1
+ import { ChainConnector } from "@talismn/chain-connector";
2
+ import z from "zod/v4";
3
+ export declare const DotNetworkProperties: z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
4
+ tokenDecimals: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
5
+ tokenSymbol: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ tokenDecimals: z.ZodArray<z.ZodNumber>;
8
+ tokenSymbol: z.ZodArray<z.ZodString>;
9
+ }, z.core.$strip>]>, z.ZodTransform<{
10
+ tokenDecimals: number;
11
+ tokenSymbol: string;
12
+ }, {
13
+ tokenDecimals: number;
14
+ tokenSymbol: string;
15
+ } | {
16
+ tokenDecimals: number[];
17
+ tokenSymbol: string[];
18
+ }>>;
19
+ export declare const getChainProperties: (chainConnector: ChainConnector, networkId: string) => Promise<{
20
+ tokenDecimals: number;
21
+ tokenSymbol: string;
22
+ }>;
@@ -1,4 +1,210 @@
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>)[];
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
+ }, undefined, 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
+ }, undefined, 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
+ }, undefined, 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
+ }, undefined, 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>)[];
2
208
  export * from "./EvmErc20Module";
3
209
  export * from "./EvmNativeModule";
4
210
  export * from "./EvmUniswapV2Module";
@@ -17,7 +17,7 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
17
17
  miniMetadatas: Map<string, MiniMetadata>;
18
18
  moduleType: InferModuleType<TBalanceModule>;
19
19
  coders: TCoders;
20
- }) => Map<DotNetworkId, { [Property in keyof TCoders]: {
20
+ }) => Map<string, { [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[]>;
@@ -32,3 +32,13 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
32
32
  len: number;
33
33
  fallback: any;
34
34
  } | undefined; }>;
35
+ type NetworkCoders = {
36
+ [key: string]: [string, string];
37
+ };
38
+ type NetworkStorageCoders<TCoders extends NetworkCoders> = {
39
+ [Property in keyof TCoders]: ReturnType<ReturnType<typeof getDynamicBuilder>["buildStorage"]> | undefined;
40
+ };
41
+ export declare const buildNetworkStorageCoders: <TCoders extends {
42
+ [key: string]: [string, string];
43
+ }>(chainId: DotNetworkId, miniMetadata: MiniMetadata, coders: TCoders) => NetworkStorageCoders<TCoders> | null;
44
+ export {};
@@ -127,11 +127,223 @@ export declare class Balance {
127
127
  get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
128
128
  get status(): import("./balancetypes").BalanceStatus;
129
129
  get address(): string;
130
- get networkId(): NetworkId;
131
- get network(): any;
132
- get tokenId(): TokenId;
133
- get token(): any;
134
- get decimals(): any;
130
+ get networkId(): string;
131
+ get network(): {
132
+ id: string;
133
+ name: string;
134
+ nativeTokenId: string;
135
+ nativeCurrency: {
136
+ decimals: number;
137
+ symbol: string;
138
+ name: string;
139
+ coingeckoId?: string | undefined;
140
+ mirrorOf?: string | undefined;
141
+ logo?: string | undefined;
142
+ };
143
+ blockExplorerUrls: string[];
144
+ genesisHash: `0x${string}`;
145
+ platform: "polkadot";
146
+ chainName: string;
147
+ specName: string;
148
+ specVersion: number;
149
+ account: "*25519" | "secp256k1";
150
+ prefix: number;
151
+ rpcs: string[];
152
+ topology: {
153
+ type: "standalone";
154
+ } | {
155
+ type: "relay";
156
+ } | {
157
+ type: "parachain";
158
+ relayId: string;
159
+ paraId: number;
160
+ };
161
+ isTestnet?: boolean | undefined;
162
+ isDefault?: boolean | undefined;
163
+ forceScan?: boolean | undefined;
164
+ logo?: string | undefined;
165
+ themeColor?: string | undefined;
166
+ isRelay?: boolean | undefined;
167
+ chainspecQrUrl?: string | undefined;
168
+ latestMetadataQrUrl?: string | undefined;
169
+ overrideNativeTokenId?: string | undefined;
170
+ oldPrefix?: number | undefined;
171
+ relayId?: string | undefined;
172
+ paraId?: number | undefined;
173
+ registryTypes?: any;
174
+ signedExtensions?: any;
175
+ hasCheckMetadataHash?: boolean | undefined;
176
+ hasExtrinsicSignatureTypePrefix?: boolean | undefined;
177
+ isUnknownFeeToken?: boolean | undefined;
178
+ } | {
179
+ id: string;
180
+ name: string;
181
+ nativeTokenId: string;
182
+ nativeCurrency: {
183
+ decimals: number;
184
+ symbol: string;
185
+ name: string;
186
+ coingeckoId?: string | undefined;
187
+ mirrorOf?: string | undefined;
188
+ logo?: string | undefined;
189
+ };
190
+ blockExplorerUrls: string[];
191
+ platform: "ethereum";
192
+ rpcs: string[];
193
+ isTestnet?: boolean | undefined;
194
+ isDefault?: boolean | undefined;
195
+ forceScan?: boolean | undefined;
196
+ logo?: string | undefined;
197
+ themeColor?: string | undefined;
198
+ substrateChainId?: string | undefined;
199
+ preserveGasEstimate?: boolean | undefined;
200
+ feeType?: "eip-1559" | "legacy" | undefined;
201
+ l2FeeType?: {
202
+ type: "op-stack";
203
+ } | {
204
+ type: "scroll";
205
+ l1GasPriceOracle: `0x${string}`;
206
+ } | undefined;
207
+ contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
208
+ } | null;
209
+ get tokenId(): string;
210
+ get token(): {
211
+ id: string;
212
+ decimals: number;
213
+ symbol: string;
214
+ name: string;
215
+ networkId: string;
216
+ type: "evm-erc20";
217
+ platform: "ethereum";
218
+ contractAddress: `0x${string}`;
219
+ isTestnet?: boolean | undefined;
220
+ isDefault?: boolean | undefined;
221
+ logo?: string | undefined;
222
+ coingeckoId?: string | undefined;
223
+ noDiscovery?: boolean | undefined;
224
+ mirrorOf?: string | undefined;
225
+ isCustom?: boolean | undefined;
226
+ } | {
227
+ id: string;
228
+ decimals: number;
229
+ symbol: string;
230
+ name: string;
231
+ networkId: string;
232
+ type: "evm-native";
233
+ platform: "ethereum";
234
+ isTestnet?: boolean | undefined;
235
+ isDefault?: boolean | undefined;
236
+ logo?: string | undefined;
237
+ coingeckoId?: string | undefined;
238
+ noDiscovery?: boolean | undefined;
239
+ mirrorOf?: string | undefined;
240
+ } | {
241
+ id: string;
242
+ decimals: number;
243
+ symbol: string;
244
+ name: string;
245
+ networkId: string;
246
+ platform: "ethereum";
247
+ contractAddress: `0x${string}`;
248
+ type: "evm-uniswapv2";
249
+ symbol0: string;
250
+ symbol1: string;
251
+ decimals0: number;
252
+ decimals1: number;
253
+ tokenAddress0: `0x${string}`;
254
+ tokenAddress1: `0x${string}`;
255
+ isTestnet?: boolean | undefined;
256
+ isDefault?: boolean | undefined;
257
+ logo?: string | undefined;
258
+ coingeckoId?: string | undefined;
259
+ noDiscovery?: boolean | undefined;
260
+ mirrorOf?: string | undefined;
261
+ isCustom?: boolean | undefined;
262
+ coingeckoId0?: string | undefined;
263
+ coingeckoId1?: string | undefined;
264
+ } | {
265
+ id: string;
266
+ decimals: number;
267
+ symbol: string;
268
+ name: string;
269
+ networkId: string;
270
+ type: "substrate-assets";
271
+ platform: "polkadot";
272
+ assetId: string;
273
+ existentialDeposit: string;
274
+ isTestnet?: boolean | undefined;
275
+ isDefault?: boolean | undefined;
276
+ logo?: string | undefined;
277
+ coingeckoId?: string | undefined;
278
+ noDiscovery?: boolean | undefined;
279
+ mirrorOf?: string | undefined;
280
+ isFrozen?: boolean | undefined;
281
+ } | {
282
+ id: string;
283
+ decimals: number;
284
+ symbol: string;
285
+ name: string;
286
+ networkId: string;
287
+ type: "substrate-foreignassets";
288
+ platform: "polkadot";
289
+ onChainId: string;
290
+ existentialDeposit: string;
291
+ isTestnet?: boolean | undefined;
292
+ isDefault?: boolean | undefined;
293
+ logo?: string | undefined;
294
+ coingeckoId?: string | undefined;
295
+ noDiscovery?: boolean | undefined;
296
+ mirrorOf?: string | undefined;
297
+ isFrozen?: boolean | undefined;
298
+ } | {
299
+ id: string;
300
+ decimals: number;
301
+ symbol: string;
302
+ name: string;
303
+ networkId: string;
304
+ type: "substrate-native";
305
+ platform: "polkadot";
306
+ existentialDeposit: string;
307
+ isTestnet?: boolean | undefined;
308
+ isDefault?: boolean | undefined;
309
+ logo?: string | undefined;
310
+ coingeckoId?: string | undefined;
311
+ noDiscovery?: boolean | undefined;
312
+ mirrorOf?: string | undefined;
313
+ } | {
314
+ id: string;
315
+ decimals: number;
316
+ symbol: string;
317
+ name: string;
318
+ networkId: string;
319
+ type: "substrate-psp22";
320
+ platform: "polkadot";
321
+ existentialDeposit: string;
322
+ contractAddress: string;
323
+ isTestnet?: boolean | undefined;
324
+ isDefault?: boolean | undefined;
325
+ logo?: string | undefined;
326
+ coingeckoId?: string | undefined;
327
+ noDiscovery?: boolean | undefined;
328
+ mirrorOf?: string | undefined;
329
+ } | {
330
+ id: string;
331
+ decimals: number;
332
+ symbol: string;
333
+ name: string;
334
+ networkId: string;
335
+ type: "substrate-tokens";
336
+ platform: "polkadot";
337
+ onChainId: string | number;
338
+ existentialDeposit: string;
339
+ isTestnet?: boolean | undefined;
340
+ isDefault?: boolean | undefined;
341
+ logo?: string | undefined;
342
+ coingeckoId?: string | undefined;
343
+ noDiscovery?: boolean | undefined;
344
+ mirrorOf?: string | undefined;
345
+ } | null;
346
+ get decimals(): number | null;
135
347
  get rates(): TokenRates | null;
136
348
  /**
137
349
  * A general method to get formatted values matching a certain type from this balance.