@talismn/balances 0.0.0-pr2075-20250708151500 → 0.0.0-pr2075-20250709134044

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 (77) hide show
  1. package/dist/declarations/src/BalancesProvider.d.ts +3 -3
  2. package/dist/declarations/src/TalismanBalancesDatabase.d.ts +2 -2
  3. package/dist/declarations/src/index.d.ts +0 -1
  4. package/dist/declarations/src/modules/IBalanceModule.d.ts +2 -5
  5. package/dist/declarations/src/modules/evm-erc20/types.d.ts +1 -1
  6. package/dist/declarations/src/modules/evm-native/types.d.ts +1 -1
  7. package/dist/declarations/src/modules/evm-uniswapv2/types.d.ts +1 -1
  8. package/dist/declarations/src/modules/index.d.ts +11 -237
  9. package/dist/declarations/src/modules/shared/buildNetworkStorageCoders.d.ts +13 -0
  10. package/dist/declarations/src/modules/shared/index.d.ts +2 -0
  11. package/dist/declarations/src/modules/substrate-assets/buildQueries.d.ts +2 -3
  12. package/dist/declarations/src/modules/substrate-assets/types.d.ts +1 -1
  13. package/dist/declarations/src/modules/substrate-foreignassets/buildQueries.d.ts +1 -1
  14. package/dist/declarations/src/modules/substrate-foreignassets/types.d.ts +1 -1
  15. package/dist/declarations/src/modules/substrate-hydration/types.d.ts +1 -1
  16. package/dist/declarations/src/modules/substrate-native/bittensor/getSubtensorStakingBalances.d.ts +1 -2
  17. package/dist/declarations/src/modules/substrate-native/queries/buildBaseQueries.d.ts +2 -3
  18. package/dist/declarations/src/modules/substrate-native/queries/buildNomPoolQueries.d.ts +2 -3
  19. package/dist/declarations/src/modules/substrate-native/types.d.ts +1 -1
  20. package/dist/declarations/src/modules/substrate-psp22/types.d.ts +1 -1
  21. package/dist/declarations/src/modules/{util/makeContractCaller.d.ts → substrate-psp22/util.d.ts} +2 -1
  22. package/dist/declarations/src/modules/substrate-tokens/buildQueries.d.ts +2 -3
  23. package/dist/declarations/src/modules/substrate-tokens/types.d.ts +1 -1
  24. package/dist/declarations/src/types/addresses.d.ts +0 -3
  25. package/dist/declarations/src/types/balances.d.ts +1 -1
  26. package/dist/declarations/src/types/balancetypes.d.ts +3 -25
  27. package/dist/declarations/src/types/chainConnectors.d.ts +6 -0
  28. package/dist/declarations/src/types/index.d.ts +1 -0
  29. package/dist/declarations/src/types/minimetadatas.d.ts +4 -13
  30. package/dist/declarations/src/types/tokens.d.ts +1 -1
  31. package/dist/talismn-balances.cjs.dev.js +345 -4153
  32. package/dist/talismn-balances.cjs.prod.js +345 -4153
  33. package/dist/talismn-balances.esm.js +352 -4144
  34. package/package.json +11 -13
  35. package/dist/declarations/src/BalanceModule.d.ts +0 -84
  36. package/dist/declarations/src/getMiniMetadata/getUpdatedMiniMetadatas.d.ts +0 -4
  37. package/dist/declarations/src/getMiniMetadata/index.d.ts +0 -5
  38. package/dist/declarations/src/modules/EvmErc20Module.d.ts +0 -30
  39. package/dist/declarations/src/modules/EvmNativeModule.d.ts +0 -27
  40. package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +0 -37
  41. package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +0 -40
  42. package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +0 -40
  43. package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +0 -21
  44. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeBase.d.ts +0 -5
  45. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeNompoolStaking.d.ts +0 -5
  46. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeSubtensorStaking.d.ts +0 -5
  47. package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +0 -32
  48. package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +0 -13
  49. package/dist/declarations/src/modules/SubstrateNativeModule/util/SubNativeBalanceError.d.ts +0 -5
  50. package/dist/declarations/src/modules/SubstrateNativeModule/util/asObservable.d.ts +0 -10
  51. package/dist/declarations/src/modules/SubstrateNativeModule/util/balanceLockTypes.d.ts +0 -15
  52. package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +0 -14
  53. package/dist/declarations/src/modules/SubstrateNativeModule/util/mergeBalances.d.ts +0 -13
  54. package/dist/declarations/src/modules/SubstrateNativeModule/util/nompoolAccountId.d.ts +0 -5
  55. package/dist/declarations/src/modules/SubstrateNativeModule/util/sortChains.d.ts +0 -1
  56. package/dist/declarations/src/modules/SubstrateNativeModule/util/subtensor.d.ts +0 -20
  57. package/dist/declarations/src/modules/SubstrateNativeModule/util/systemProperties.d.ts +0 -5
  58. package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +0 -40
  59. package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +0 -43
  60. package/dist/declarations/src/modules/util/InferBalanceModuleTypes.d.ts +0 -30
  61. package/dist/declarations/src/modules/util/RpcStateQueryHelper.d.ts +0 -19
  62. package/dist/declarations/src/modules/util/balances.d.ts +0 -8
  63. package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +0 -43
  64. package/dist/declarations/src/modules/util/decodeOutput.d.ts +0 -13
  65. package/dist/declarations/src/modules/util/detectTransferMethod.d.ts +0 -11
  66. package/dist/declarations/src/modules/util/getAddresssesByTokenByNetwork.d.ts +0 -3
  67. package/dist/declarations/src/modules/util/getUniqueChainIds.d.ts +0 -5
  68. package/dist/declarations/src/modules/util/index.d.ts +0 -9
  69. package/dist/declarations/src/modules/util/storageCompression.d.ts +0 -9
  70. package/dist/declarations/src/plugins.d.ts +0 -17
  71. package/plugins/dist/talismn-balances-plugins.cjs.d.ts +0 -1
  72. package/plugins/dist/talismn-balances-plugins.cjs.dev.js +0 -2
  73. package/plugins/dist/talismn-balances-plugins.cjs.js +0 -7
  74. package/plugins/dist/talismn-balances-plugins.cjs.prod.js +0 -2
  75. package/plugins/dist/talismn-balances-plugins.esm.js +0 -1
  76. package/plugins/package.json +0 -4
  77. /package/dist/declarations/src/modules/{util → shared}/rpcQueryPack.d.ts +0 -0
@@ -1,7 +1,7 @@
1
- import { AnyMiniMetadata, ChaindataProvider, TokenId } from "@talismn/chaindata-provider";
1
+ import { ChaindataProvider, TokenId } from "@talismn/chaindata-provider";
2
2
  import { Observable } from "rxjs";
3
3
  import { ChainConnectors } from ".";
4
- import { Address, IBalance } from "./types";
4
+ import { Address, IBalance, MiniMetadata } from "./types";
5
5
  type BalancesStatus = "initialising" | "live";
6
6
  export type BalancesResult = {
7
7
  status: BalancesStatus;
@@ -9,7 +9,7 @@ export type BalancesResult = {
9
9
  };
10
10
  export type BalancesStorage = {
11
11
  balances: IBalance[];
12
- miniMetadatas: AnyMiniMetadata[];
12
+ miniMetadatas: MiniMetadata[];
13
13
  };
14
14
  export declare class BalancesProvider {
15
15
  #private;
@@ -1,11 +1,11 @@
1
+ import { AnyMiniMetadata } from "@talismn/chaindata-provider";
1
2
  import { Dexie } from "dexie";
2
- import { MiniMetadata } from "./types";
3
3
  export declare class TalismanBalancesDatabase extends Dexie {
4
4
  balancesBlob: Dexie.Table<{
5
5
  data: Uint8Array;
6
6
  id: string;
7
7
  }, string>;
8
- miniMetadatas: Dexie.Table<MiniMetadata, string>;
8
+ miniMetadatas: Dexie.Table<AnyMiniMetadata, string>;
9
9
  constructor();
10
10
  }
11
11
  export declare const db: TalismanBalancesDatabase;
@@ -1,4 +1,3 @@
1
- export * from "./BalanceModule";
2
1
  export * from "./TalismanBalancesDatabase";
3
2
  export * from "./modules";
4
3
  export * from "./types";
@@ -1,8 +1,8 @@
1
- import type { Address, IBalance } from "@talismn/balances";
2
1
  import type { ChainConnector } from "@talismn/chain-connector";
3
2
  import type { ChainConnectorEvm } from "@talismn/chain-connector-evm";
4
- import { AnyMiniMetadata, DotNetworkId, EthNetworkId, Token, TokenId, TokenOfType, TokenType } from "@talismn/chaindata-provider";
3
+ import { DotNetworkId, EthNetworkId, Token, TokenId, TokenOfType, TokenType } from "@talismn/chaindata-provider";
5
4
  import { Observable } from "rxjs";
5
+ import type { Address, IBalance, MiniMetadata } from "../types";
6
6
  /**
7
7
  * Changes:
8
8
  * - each method is standalone
@@ -37,9 +37,6 @@ export type FetchBalanceResults = {
37
37
  success: IBalance[];
38
38
  errors: FetchBalanceErrors;
39
39
  };
40
- export type MiniMetadata<Extra = unknown> = Omit<AnyMiniMetadata, "extra"> & {
41
- extra: Extra;
42
- };
43
40
  export interface IBalanceModule<Type extends TokenType, TokenConfig = unknown, ModuleConfig = unknown, MiniMetadataExtra = unknown> {
44
41
  type: Type;
45
42
  platform: PlatformOf<Type>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const EvmErc20TokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const EvmNativeTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const EvmUniswapV2TokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,236 +1,9 @@
1
- export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20", {
2
- id: string;
3
- networkId: string;
4
- decimals: number;
5
- symbol: string;
6
- type: "evm-erc20";
7
- platform: "ethereum";
8
- contractAddress: `0x${string}`;
9
- isDefault?: boolean | undefined;
10
- name?: string | undefined;
11
- logo?: string | undefined;
12
- coingeckoId?: string | undefined;
13
- noDiscovery?: boolean | undefined;
14
- mirrorOf?: string | undefined;
15
- }, import("..").DefaultChainMeta, undefined, {
16
- contractAddress: `0x${string}`;
17
- symbol?: string | undefined;
18
- networkId?: string | undefined;
19
- isDefault?: boolean | undefined;
20
- decimals?: number | undefined;
21
- name?: string | undefined;
22
- logo?: string | undefined;
23
- coingeckoId?: string | undefined;
24
- noDiscovery?: boolean | undefined;
25
- mirrorOf?: string | undefined;
26
- }> | import("..").NewBalanceModule<"evm-native", {
27
- id: string;
28
- networkId: string;
29
- decimals: number;
30
- symbol: string;
31
- type: "evm-native";
32
- platform: "ethereum";
33
- isDefault?: boolean | undefined;
34
- name?: string | undefined;
35
- logo?: string | undefined;
36
- coingeckoId?: string | undefined;
37
- noDiscovery?: boolean | undefined;
38
- mirrorOf?: string | undefined;
39
- }, import("..").DefaultChainMeta, undefined, {
40
- symbol?: string | undefined;
41
- networkId?: string | undefined;
42
- isDefault?: boolean | undefined;
43
- decimals?: number | undefined;
44
- name?: string | undefined;
45
- logo?: string | undefined;
46
- coingeckoId?: string | undefined;
47
- noDiscovery?: boolean | undefined;
48
- mirrorOf?: string | undefined;
49
- }> | import("..").NewBalanceModule<"evm-uniswapv2", {
50
- id: string;
51
- networkId: string;
52
- decimals: number;
53
- symbol: string;
54
- type: "evm-uniswapv2";
55
- platform: "ethereum";
56
- contractAddress: `0x${string}`;
57
- symbol0: string;
58
- symbol1: string;
59
- decimals0: number;
60
- decimals1: number;
61
- tokenAddress0: `0x${string}`;
62
- tokenAddress1: `0x${string}`;
63
- isDefault?: boolean | undefined;
64
- name?: string | undefined;
65
- logo?: string | undefined;
66
- coingeckoId?: string | undefined;
67
- noDiscovery?: boolean | undefined;
68
- mirrorOf?: string | undefined;
69
- isCustom?: boolean | undefined;
70
- coingeckoId0?: string | undefined;
71
- coingeckoId1?: string | undefined;
72
- }, import("..").DefaultChainMeta, undefined, {
73
- contractAddress: `0x${string}`;
74
- symbol0?: string | undefined;
75
- symbol1?: string | undefined;
76
- decimals0?: number | undefined;
77
- decimals1?: number | undefined;
78
- tokenAddress0?: `0x${string}` | undefined;
79
- tokenAddress1?: `0x${string}` | undefined;
80
- coingeckoId0?: string | undefined;
81
- coingeckoId1?: string | undefined;
82
- symbol?: string | undefined;
83
- networkId?: string | undefined;
84
- isDefault?: boolean | undefined;
85
- decimals?: number | undefined;
86
- name?: string | undefined;
87
- logo?: string | undefined;
88
- coingeckoId?: string | undefined;
89
- noDiscovery?: boolean | undefined;
90
- mirrorOf?: string | undefined;
91
- }> | import("..").NewBalanceModule<"substrate-assets", {
92
- id: string;
93
- networkId: string;
94
- decimals: number;
95
- symbol: string;
96
- type: "substrate-assets";
97
- platform: "polkadot";
98
- assetId: string;
99
- isSufficient: boolean;
100
- existentialDeposit: string;
101
- isDefault?: boolean | undefined;
102
- name?: string | undefined;
103
- logo?: string | undefined;
104
- coingeckoId?: string | undefined;
105
- noDiscovery?: boolean | undefined;
106
- mirrorOf?: string | undefined;
107
- isFrozen?: boolean | undefined;
108
- }, import("./SubstrateAssetsModule").SubAssetsChainMeta, undefined, {
109
- assetId: string;
110
- symbol?: string | undefined;
111
- networkId?: string | undefined;
112
- isDefault?: boolean | undefined;
113
- decimals?: number | undefined;
114
- name?: string | undefined;
115
- logo?: string | undefined;
116
- coingeckoId?: string | undefined;
117
- noDiscovery?: boolean | undefined;
118
- mirrorOf?: string | undefined;
119
- }, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-foreignassets", {
120
- id: string;
121
- networkId: string;
122
- decimals: number;
123
- symbol: string;
124
- type: "substrate-foreignassets";
125
- platform: "polkadot";
126
- onChainId: string;
127
- isSufficient: boolean;
128
- existentialDeposit: string;
129
- isDefault?: boolean | undefined;
130
- name?: string | undefined;
131
- logo?: string | undefined;
132
- coingeckoId?: string | undefined;
133
- noDiscovery?: boolean | undefined;
134
- mirrorOf?: string | undefined;
135
- isFrozen?: boolean | undefined;
136
- }, import("..").DefaultChainMeta, undefined, {
137
- onChainId: string;
138
- symbol?: string | undefined;
139
- networkId?: string | undefined;
140
- isDefault?: boolean | undefined;
141
- decimals?: number | undefined;
142
- name?: string | undefined;
143
- logo?: string | undefined;
144
- coingeckoId?: string | undefined;
145
- noDiscovery?: boolean | undefined;
146
- mirrorOf?: string | undefined;
147
- }, import("./SubstrateForeignAssetsModule").SubForeignAssetsTransferParams> | import("..").NewBalanceModule<"substrate-native", {
148
- id: string;
149
- networkId: string;
150
- decimals: number;
151
- symbol: string;
152
- type: "substrate-native";
153
- platform: "polkadot";
154
- existentialDeposit: string;
155
- isDefault?: boolean | undefined;
156
- name?: string | undefined;
157
- logo?: string | undefined;
158
- coingeckoId?: string | undefined;
159
- noDiscovery?: boolean | undefined;
160
- mirrorOf?: string | undefined;
161
- }, import("./SubstrateNativeModule").SubNativeChainMeta, {
162
- disable?: boolean | undefined;
163
- }, {
164
- symbol?: string | undefined;
165
- networkId?: string | undefined;
166
- isDefault?: boolean | undefined;
167
- decimals?: number | undefined;
168
- name?: string | undefined;
169
- logo?: string | undefined;
170
- coingeckoId?: string | undefined;
171
- noDiscovery?: boolean | undefined;
172
- mirrorOf?: string | undefined;
173
- }, import("./SubstrateNativeModule").SubNativeTransferParams> | import("..").NewBalanceModule<"substrate-psp22", {
174
- id: string;
175
- networkId: string;
176
- decimals: number;
177
- symbol: string;
178
- type: "substrate-psp22";
179
- platform: "polkadot";
180
- contractAddress: string;
181
- isDefault?: boolean | undefined;
182
- name?: string | undefined;
183
- logo?: string | undefined;
184
- coingeckoId?: string | undefined;
185
- noDiscovery?: boolean | undefined;
186
- mirrorOf?: string | undefined;
187
- }, import("..").DefaultChainMeta, undefined, {
188
- contractAddress: string;
189
- symbol?: string | undefined;
190
- networkId?: string | undefined;
191
- isDefault?: boolean | undefined;
192
- decimals?: number | undefined;
193
- name?: string | undefined;
194
- logo?: string | undefined;
195
- coingeckoId?: string | undefined;
196
- noDiscovery?: boolean | undefined;
197
- mirrorOf?: string | undefined;
198
- }, import("./SubstratePsp22Module").SubPsp22TransferParams> | import("..").NewBalanceModule<"substrate-tokens", {
199
- id: string;
200
- networkId: string;
201
- decimals: number;
202
- symbol: string;
203
- type: "substrate-tokens";
204
- platform: "polkadot";
205
- onChainId: string | number;
206
- existentialDeposit: string;
207
- isDefault?: boolean | undefined;
208
- name?: string | undefined;
209
- logo?: string | undefined;
210
- coingeckoId?: string | undefined;
211
- noDiscovery?: boolean | undefined;
212
- mirrorOf?: string | undefined;
213
- }, import("./SubstrateTokensModule").SubTokensChainMeta, {
214
- palletId?: string | undefined;
215
- }, {
216
- onChainId: string | number;
217
- existentialDeposit?: string | undefined;
218
- symbol?: string | undefined;
219
- networkId?: string | undefined;
220
- isDefault?: boolean | undefined;
221
- decimals?: number | undefined;
222
- name?: string | undefined;
223
- logo?: string | undefined;
224
- coingeckoId?: string | undefined;
225
- noDiscovery?: boolean | undefined;
226
- mirrorOf?: string | undefined;
227
- }, import("./SubstrateTokensModule").SubTokensTransferParams>)[];
228
1
  export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule<"substrate-native", {
229
2
  symbol?: string | undefined;
3
+ name?: string | undefined;
230
4
  networkId?: string | undefined;
231
5
  isDefault?: boolean | undefined;
232
6
  decimals?: number | undefined;
233
- name?: string | undefined;
234
7
  logo?: string | undefined;
235
8
  coingeckoId?: string | undefined;
236
9
  noDiscovery?: boolean | undefined;
@@ -246,10 +19,10 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
246
19
  }> | import("./IBalanceModule").IBalanceModule<"substrate-assets", {
247
20
  assetId: string;
248
21
  symbol?: string | undefined;
22
+ name?: string | undefined;
249
23
  networkId?: string | undefined;
250
24
  isDefault?: boolean | undefined;
251
25
  decimals?: number | undefined;
252
- name?: string | undefined;
253
26
  logo?: string | undefined;
254
27
  coingeckoId?: string | undefined;
255
28
  noDiscovery?: boolean | undefined;
@@ -257,10 +30,10 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
257
30
  }, unknown, unknown> | import("./IBalanceModule").IBalanceModule<"substrate-hydration", {
258
31
  onChainId: number;
259
32
  symbol?: string | undefined;
33
+ name?: string | undefined;
260
34
  networkId?: string | undefined;
261
35
  isDefault?: boolean | undefined;
262
36
  decimals?: number | undefined;
263
- name?: string | undefined;
264
37
  logo?: string | undefined;
265
38
  coingeckoId?: string | undefined;
266
39
  noDiscovery?: boolean | undefined;
@@ -268,10 +41,10 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
268
41
  }, unknown, unknown> | import("./IBalanceModule").IBalanceModule<"substrate-foreignassets", {
269
42
  onChainId: string;
270
43
  symbol?: string | undefined;
44
+ name?: string | undefined;
271
45
  networkId?: string | undefined;
272
46
  isDefault?: boolean | undefined;
273
47
  decimals?: number | undefined;
274
- name?: string | undefined;
275
48
  logo?: string | undefined;
276
49
  coingeckoId?: string | undefined;
277
50
  noDiscovery?: boolean | undefined;
@@ -279,10 +52,10 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
279
52
  }, unknown, unknown> | import("./IBalanceModule").IBalanceModule<"substrate-psp22", {
280
53
  contractAddress: string;
281
54
  symbol?: string | undefined;
55
+ name?: string | undefined;
282
56
  networkId?: string | undefined;
283
57
  isDefault?: boolean | undefined;
284
58
  decimals?: number | undefined;
285
- name?: string | undefined;
286
59
  logo?: string | undefined;
287
60
  coingeckoId?: string | undefined;
288
61
  noDiscovery?: boolean | undefined;
@@ -292,9 +65,9 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
292
65
  decimals: number;
293
66
  existentialDeposit: string;
294
67
  onChainId: string | number;
68
+ name?: string | undefined;
295
69
  networkId?: string | undefined;
296
70
  isDefault?: boolean | undefined;
297
- name?: string | undefined;
298
71
  logo?: string | undefined;
299
72
  coingeckoId?: string | undefined;
300
73
  noDiscovery?: boolean | undefined;
@@ -306,10 +79,10 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
306
79
  }> | import("./IBalanceModule").IBalanceModule<"evm-erc20", {
307
80
  contractAddress: `0x${string}`;
308
81
  symbol?: string | undefined;
82
+ name?: string | undefined;
309
83
  networkId?: string | undefined;
310
84
  isDefault?: boolean | undefined;
311
85
  decimals?: number | undefined;
312
- name?: string | undefined;
313
86
  logo?: string | undefined;
314
87
  coingeckoId?: string | undefined;
315
88
  noDiscovery?: boolean | undefined;
@@ -317,25 +90,26 @@ export declare const BALANCE_MODULES: (import("./IBalanceModule").IBalanceModule
317
90
  }, unknown, unknown> | import("./IBalanceModule").IBalanceModule<"evm-uniswapv2", {
318
91
  contractAddress: `0x${string}`;
319
92
  symbol?: string | undefined;
93
+ name?: string | undefined;
320
94
  networkId?: string | undefined;
321
95
  isDefault?: boolean | undefined;
322
96
  decimals?: number | undefined;
323
- name?: string | undefined;
324
97
  logo?: string | undefined;
325
98
  coingeckoId?: string | undefined;
326
99
  noDiscovery?: boolean | undefined;
327
100
  mirrorOf?: string | undefined;
328
101
  }, unknown, unknown> | import("./IBalanceModule").IBalanceModule<"evm-native", {
329
102
  symbol?: string | undefined;
103
+ name?: string | undefined;
330
104
  networkId?: string | undefined;
331
105
  isDefault?: boolean | undefined;
332
106
  decimals?: number | undefined;
333
- name?: string | undefined;
334
107
  logo?: string | undefined;
335
108
  coingeckoId?: string | undefined;
336
109
  noDiscovery?: boolean | undefined;
337
110
  mirrorOf?: string | undefined;
338
111
  }, unknown, unknown>)[];
112
+ export type AnyBalanceModule = (typeof BALANCE_MODULES)[number];
339
113
  export * from "./evm-native";
340
114
  export * from "./evm-erc20";
341
115
  export * from "./evm-uniswapv2";
@@ -345,5 +119,5 @@ export * from "./substrate-foreignassets";
345
119
  export * from "./substrate-hydration";
346
120
  export * from "./substrate-psp22";
347
121
  export * from "./substrate-tokens";
348
- export * from "./util";
349
122
  export * from "./abis";
123
+ export * from "./IBalanceModule";
@@ -0,0 +1,13 @@
1
+ import { DotNetworkId } from "@talismn/chaindata-provider";
2
+ import { ScaleStorageCoder } from "@talismn/scale";
3
+ import { MiniMetadata } from "../../types";
4
+ type NetworkCoders = {
5
+ [key: string]: [string, string];
6
+ };
7
+ type NetworkStorageCoders<TCoders extends NetworkCoders> = {
8
+ [Property in keyof TCoders]: ScaleStorageCoder | undefined;
9
+ };
10
+ export declare const buildNetworkStorageCoders: <TCoders extends {
11
+ [key: string]: [string, string];
12
+ }>(chainId: DotNetworkId, miniMetadata: MiniMetadata, coders: TCoders) => NetworkStorageCoders<TCoders> | null;
13
+ export {};
@@ -5,3 +5,5 @@ export * from "./getContantValue";
5
5
  export * from "./tryGetConstantValue";
6
6
  export * from "./types";
7
7
  export * from "./utils";
8
+ export * from "./rpcQueryPack";
9
+ export * from "./buildNetworkStorageCoders";
@@ -1,6 +1,5 @@
1
- import { IBalance } from "../../types";
2
- import { MiniMetadata } from "../IBalanceModule";
1
+ import { IBalance, MiniMetadata } from "../../types";
3
2
  import { BalanceDef } from "../shared";
4
- import { RpcQueryPack } from "../util/rpcQueryPack";
3
+ import { RpcQueryPack } from "../shared/rpcQueryPack";
5
4
  import { MODULE_TYPE } from "./config";
6
5
  export declare const buildQueries: (networkId: string, balanceDefs: BalanceDef<typeof MODULE_TYPE>[], miniMetadata: MiniMetadata) => Array<RpcQueryPack<IBalance>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const SubAssetsTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,6 +1,6 @@
1
1
  import { AnyMiniMetadata } from "@talismn/chaindata-provider";
2
2
  import { IBalance } from "../../types";
3
+ import { RpcQueryPack } from "../shared/rpcQueryPack";
3
4
  import { BalanceDef } from "../shared/types";
4
- import { RpcQueryPack } from "../util/rpcQueryPack";
5
5
  import { MODULE_TYPE } from "./config";
6
6
  export declare const buildQueries: (networkId: string, balanceDefs: BalanceDef<typeof MODULE_TYPE>[], miniMetadata: AnyMiniMetadata) => Array<RpcQueryPack<IBalance>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const SubHydrationTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,8 +1,7 @@
1
1
  import { ChainConnector } from "@talismn/chain-connector";
2
2
  import { DotNetworkId } from "@talismn/chaindata-provider";
3
3
  import { Observable } from "rxjs";
4
- import { AmountWithLabel } from "../../../types";
5
- import { MiniMetadata } from "../../IBalanceModule";
4
+ import { AmountWithLabel, MiniMetadata } from "../../../types";
6
5
  import { BalanceDef } from "../../shared";
7
6
  import { MiniMetadataExtra } from "../config";
8
7
  type StakingValuesByAddress = Record<string, Array<AmountWithLabel<string>>>;
@@ -1,7 +1,6 @@
1
- import { IBalance } from "../../../types";
2
- import { MiniMetadata } from "../../IBalanceModule";
1
+ import { IBalance, MiniMetadata } from "../../../types";
3
2
  import { BalanceDef } from "../../shared";
4
- import { RpcQueryPack } from "../../util/rpcQueryPack";
3
+ import { RpcQueryPack } from "../../shared/rpcQueryPack";
5
4
  import { MiniMetadataExtra } from "../config";
6
5
  export type NomPoolMemberInfo = {
7
6
  points: string;
@@ -1,6 +1,5 @@
1
- import { IBalance } from "../../../types";
2
- import { MiniMetadata } from "../../IBalanceModule";
3
- import { RpcQueryPack } from "../../util/rpcQueryPack";
1
+ import { IBalance, MiniMetadata } from "../../../types";
2
+ import { RpcQueryPack } from "../../shared/rpcQueryPack";
4
3
  import { MiniMetadataExtra } from "../config";
5
4
  import { BaseBalance } from "./buildBaseQueries";
6
5
  export declare const buildNomPoolQueries: (networkId: string, partialBalances: BaseBalance[], miniMetadata: MiniMetadata<MiniMetadataExtra>) => Array<RpcQueryPack<IBalance>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const SubNativeTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,10 +1,10 @@
1
1
  import z from "zod/v4";
2
2
  export declare const SubPsp22TokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4
5
  networkId: z.ZodOptional<z.ZodString>;
5
6
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
7
  decimals: z.ZodOptional<z.ZodInt>;
7
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
8
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,4 +1,5 @@
1
1
  import { TypeRegistry } from "@polkadot/types";
2
+ import { ContractExecResult } from "@polkadot/types/interfaces";
2
3
  import { ChainConnector } from "@talismn/chain-connector";
3
4
  export declare const makeContractCaller: ({ chainConnector, chainId, registry, }: {
4
5
  chainConnector: ChainConnector;
@@ -6,4 +7,4 @@ export declare const makeContractCaller: ({ chainConnector, chainId, registry, }
6
7
  registry: TypeRegistry;
7
8
  }) => <T extends Uint8Array | {
8
9
  toU8a: () => Uint8Array;
9
- }>(callFrom: string, contractAddress: string, inputData: T) => Promise<import("@polkadot/types/interfaces").ContractExecResult>;
10
+ }>(callFrom: string, contractAddress: string, inputData: T) => Promise<ContractExecResult>;
@@ -1,6 +1,5 @@
1
- import { IBalance } from "../../types";
2
- import { MiniMetadata } from "../IBalanceModule";
1
+ import { IBalance, MiniMetadata } from "../../types";
2
+ import { RpcQueryPack } from "../shared/rpcQueryPack";
3
3
  import { BalanceDef } from "../shared/types";
4
- import { RpcQueryPack } from "../util/rpcQueryPack";
5
4
  import { MiniMetadataExtra, MODULE_TYPE } from "./config";
6
5
  export declare const buildQueries: (networkId: string, balanceDefs: BalanceDef<typeof MODULE_TYPE>[], miniMetadata: MiniMetadata<MiniMetadataExtra>) => Array<RpcQueryPack<IBalance>>;
@@ -3,9 +3,9 @@ export declare const SubTokensTokenConfigSchema: z.ZodObject<{
3
3
  symbol: z.ZodString;
4
4
  decimals: z.ZodNumber;
5
5
  existentialDeposit: z.ZodString;
6
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
6
7
  networkId: z.ZodOptional<z.ZodString>;
7
8
  isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
8
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
9
  logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
10
  coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
11
11
  noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -1,4 +1 @@
1
1
  export type Address = string;
2
- export type AddressesByToken<TTokenType extends {
3
- id: string;
4
- }> = Record<TTokenType["id"], Address[]>;
@@ -124,7 +124,7 @@ export declare class Balance {
124
124
  isSource: (source: BalanceSource) => boolean;
125
125
  hydrate: (hydrate?: HydrateDb) => void;
126
126
  get id(): string;
127
- get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
127
+ get source(): string;
128
128
  get status(): import("./balancetypes").BalanceStatus;
129
129
  get address(): string;
130
130
  get networkId(): string;