@talismn/balances 0.0.0-pr2075-20250703111149 → 0.0.0-pr2075-20250707042608

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 (106) hide show
  1. package/dist/declarations/src/NewBalanceModules.d.ts +99 -0
  2. package/dist/declarations/src/index.d.ts +2 -0
  3. package/dist/declarations/src/modules/EvmErc20Module.d.ts +1 -1
  4. package/dist/declarations/src/modules/IBalanceModule.d.ts +100 -0
  5. package/dist/declarations/src/modules/abis/index.d.ts +2 -0
  6. package/dist/declarations/src/modules/evm-erc20/config.d.ts +16 -0
  7. package/dist/declarations/src/modules/evm-erc20/fetchBalances.d.ts +3 -0
  8. package/dist/declarations/src/modules/evm-erc20/fetchTokens.d.ts +3 -0
  9. package/dist/declarations/src/modules/evm-erc20/getMiniMetadata.d.ts +3 -0
  10. package/dist/declarations/src/modules/evm-erc20/getTransferCallData.d.ts +3 -0
  11. package/dist/declarations/src/modules/evm-erc20/index.d.ts +1 -0
  12. package/dist/declarations/src/modules/evm-erc20/module.d.ts +3 -0
  13. package/dist/declarations/src/modules/evm-erc20/subscribeBalances.d.ts +3 -0
  14. package/dist/declarations/src/modules/evm-erc20/utils.d.ts +6 -0
  15. package/dist/declarations/src/modules/evm-native/config.d.ts +15 -0
  16. package/dist/declarations/src/modules/evm-native/fetchBalances.d.ts +3 -0
  17. package/dist/declarations/src/modules/evm-native/fetchTokens.d.ts +3 -0
  18. package/dist/declarations/src/modules/evm-native/getMiniMetadata.d.ts +3 -0
  19. package/dist/declarations/src/modules/evm-native/getTransferCallData.d.ts +3 -0
  20. package/dist/declarations/src/modules/evm-native/index.d.ts +1 -0
  21. package/dist/declarations/src/modules/evm-native/module.d.ts +3 -0
  22. package/dist/declarations/src/modules/evm-native/subscribeBalances.d.ts +3 -0
  23. package/dist/declarations/src/modules/evm-uniswapv2/config.d.ts +16 -0
  24. package/dist/declarations/src/modules/evm-uniswapv2/fetchBalances.d.ts +3 -0
  25. package/dist/declarations/src/modules/evm-uniswapv2/fetchTokens.d.ts +3 -0
  26. package/dist/declarations/src/modules/evm-uniswapv2/getMiniMetadata.d.ts +3 -0
  27. package/dist/declarations/src/modules/evm-uniswapv2/getTransferCallData.d.ts +3 -0
  28. package/dist/declarations/src/modules/evm-uniswapv2/index.d.ts +1 -0
  29. package/dist/declarations/src/modules/evm-uniswapv2/module.d.ts +3 -0
  30. package/dist/declarations/src/modules/evm-uniswapv2/subscribeBalances.d.ts +3 -0
  31. package/dist/declarations/src/modules/evm-uniswapv2/utils.d.ts +12 -0
  32. package/dist/declarations/src/modules/index.d.ts +2 -1
  33. package/dist/declarations/src/modules/shared/errors.d.ts +11 -0
  34. package/dist/declarations/src/modules/shared/fetchRuntimeCallResult.d.ts +2 -0
  35. package/dist/declarations/src/modules/shared/getContantValue.d.ts +1 -0
  36. package/dist/declarations/src/modules/shared/hasConstantValue.d.ts +427 -0
  37. package/dist/declarations/src/modules/shared/index.d.ts +7 -0
  38. package/dist/declarations/src/modules/shared/tryGetConstantValue.d.ts +1 -0
  39. package/dist/declarations/src/modules/shared/types.d.ts +10 -0
  40. package/dist/declarations/src/modules/shared/utils.d.ts +4 -0
  41. package/dist/declarations/src/modules/substrate-assets/config.d.ts +16 -0
  42. package/dist/declarations/src/modules/substrate-assets/fetchBalances.d.ts +3 -0
  43. package/dist/declarations/src/modules/substrate-assets/fetchTokens.d.ts +3 -0
  44. package/dist/declarations/src/modules/substrate-assets/getMiniMetadata.d.ts +3 -0
  45. package/dist/declarations/src/modules/substrate-assets/getTransferCallData.d.ts +3 -0
  46. package/dist/declarations/src/modules/substrate-assets/index.d.ts +1 -0
  47. package/dist/declarations/src/modules/substrate-assets/module.d.ts +3 -0
  48. package/dist/declarations/src/modules/substrate-assets/subscribeBalances.d.ts +3 -0
  49. package/dist/declarations/src/modules/substrate-foreignassets/config.d.ts +16 -0
  50. package/dist/declarations/src/modules/substrate-foreignassets/fetchBalances.d.ts +3 -0
  51. package/dist/declarations/src/modules/substrate-foreignassets/fetchTokens.d.ts +3 -0
  52. package/dist/declarations/src/modules/substrate-foreignassets/getMiniMetadata.d.ts +3 -0
  53. package/dist/declarations/src/modules/substrate-foreignassets/getTransferCallData.d.ts +3 -0
  54. package/dist/declarations/src/modules/substrate-foreignassets/index.d.ts +1 -0
  55. package/dist/declarations/src/modules/substrate-foreignassets/module.d.ts +3 -0
  56. package/dist/declarations/src/modules/substrate-foreignassets/subscribeBalances.d.ts +3 -0
  57. package/dist/declarations/src/modules/substrate-hydration/config.d.ts +2 -0
  58. package/dist/declarations/src/modules/substrate-hydration/fetchBalances.d.ts +3 -0
  59. package/dist/declarations/src/modules/substrate-hydration/fetchTokens.d.ts +4 -0
  60. package/dist/declarations/src/modules/substrate-hydration/getMiniMetadata.d.ts +3 -0
  61. package/dist/declarations/src/modules/substrate-hydration/getTransferCallData.d.ts +3 -0
  62. package/dist/declarations/src/modules/substrate-hydration/index.d.ts +2 -0
  63. package/dist/declarations/src/modules/substrate-hydration/module.d.ts +4 -0
  64. package/dist/declarations/src/modules/substrate-hydration/subscribeBalances.d.ts +3 -0
  65. package/dist/declarations/src/modules/substrate-hydration/types.d.ts +14 -0
  66. package/dist/declarations/src/modules/substrate-native/bittensor/getSubtensorStakingBalances.d.ts +9 -0
  67. package/dist/declarations/src/modules/substrate-native/bittensor/subtensor.d.ts +20 -0
  68. package/dist/declarations/src/modules/substrate-native/config.d.ts +25 -0
  69. package/dist/declarations/src/modules/substrate-native/fetchBalances.d.ts +3 -0
  70. package/dist/declarations/src/modules/substrate-native/fetchTokens.d.ts +8 -0
  71. package/dist/declarations/src/modules/substrate-native/getMiniMetadata.d.ts +3 -0
  72. package/dist/declarations/src/modules/substrate-native/getTransferCallData.d.ts +3 -0
  73. package/dist/declarations/src/modules/substrate-native/index.d.ts +1 -0
  74. package/dist/declarations/src/modules/substrate-native/module.d.ts +3 -0
  75. package/dist/declarations/src/modules/substrate-native/queries/buildBaseQueries.d.ts +20 -0
  76. package/dist/declarations/src/modules/substrate-native/queries/buildNomPoolQueries.d.ts +8 -0
  77. package/dist/declarations/src/modules/substrate-native/subscribeBalances.d.ts +3 -0
  78. package/dist/declarations/src/modules/substrate-native/util/lockTypes.d.ts +15 -0
  79. package/dist/declarations/src/modules/substrate-native/util/nompoolAccountId.d.ts +5 -0
  80. package/dist/declarations/src/modules/substrate-psp22/config.d.ts +16 -0
  81. package/dist/declarations/src/modules/substrate-psp22/fetchBalances.d.ts +3 -0
  82. package/dist/declarations/src/modules/substrate-psp22/fetchTokens.d.ts +3 -0
  83. package/dist/declarations/src/modules/substrate-psp22/getMiniMetadata.d.ts +3 -0
  84. package/dist/declarations/src/modules/substrate-psp22/getTransferCallData.d.ts +3 -0
  85. package/dist/declarations/src/modules/substrate-psp22/index.d.ts +1 -0
  86. package/dist/declarations/src/modules/substrate-psp22/module.d.ts +3 -0
  87. package/dist/declarations/src/modules/substrate-psp22/subscribeBalances.d.ts +3 -0
  88. package/dist/declarations/src/modules/substrate-tokens/config.d.ts +23 -0
  89. package/dist/declarations/src/modules/substrate-tokens/fetchBalances.d.ts +3 -0
  90. package/dist/declarations/src/modules/substrate-tokens/fetchTokens.d.ts +3 -0
  91. package/dist/declarations/src/modules/substrate-tokens/getMiniMetadata.d.ts +3 -0
  92. package/dist/declarations/src/modules/substrate-tokens/getTransferCallData.d.ts +3 -0
  93. package/dist/declarations/src/modules/substrate-tokens/index.d.ts +1 -0
  94. package/dist/declarations/src/modules/substrate-tokens/module.d.ts +3 -0
  95. package/dist/declarations/src/modules/substrate-tokens/subscribeBalances.d.ts +3 -0
  96. package/dist/declarations/src/modules/util/RpcStateQueriesHelper.d.ts +12 -0
  97. package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +2 -2
  98. package/dist/declarations/src/types/balances.d.ts +2 -1
  99. package/dist/declarations/src/types/minimetadatas.d.ts +1 -1
  100. package/dist/declarations/src/version.d.ts +1 -0
  101. package/dist/talismn-balances.cjs.dev.js +3901 -331
  102. package/dist/talismn-balances.cjs.prod.js +3901 -331
  103. package/dist/talismn-balances.esm.js +3887 -323
  104. package/package.json +8 -8
  105. package/dist/declarations/src/libVersion.d.ts +0 -1
  106. package/dist/declarations/src/modules/abis/erc20.d.ts +0 -227
@@ -0,0 +1,427 @@
1
+ export declare const hasConstantValue: (metadataRpc: `0x${string}`, pallet: string, constant: string) => {
2
+ name: string;
3
+ storage: {
4
+ prefix: string;
5
+ items: ({
6
+ name: string;
7
+ modifier: number;
8
+ type: {
9
+ tag: "plain";
10
+ value: number;
11
+ } | {
12
+ tag: "map";
13
+ value: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
14
+ hashers: ({
15
+ tag: "Blake2128";
16
+ value: undefined;
17
+ } | {
18
+ tag: "Blake2256";
19
+ value: undefined;
20
+ } | {
21
+ tag: "Blake2128Concat";
22
+ value: undefined;
23
+ } | {
24
+ tag: "Twox128";
25
+ value: undefined;
26
+ } | {
27
+ tag: "Twox256";
28
+ value: undefined;
29
+ } | {
30
+ tag: "Twox64Concat";
31
+ value: undefined;
32
+ } | {
33
+ tag: "Identity";
34
+ value: undefined;
35
+ })[];
36
+ key: number;
37
+ value: number;
38
+ }>>;
39
+ };
40
+ fallback: import("polkadot-api").HexString;
41
+ docs: string[];
42
+ } | ({
43
+ name: string;
44
+ modifier: number;
45
+ type: {
46
+ tag: "plain";
47
+ value: number;
48
+ } | {
49
+ tag: "map";
50
+ value: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
51
+ hashers: ({
52
+ tag: "Blake2128";
53
+ value: undefined;
54
+ } | {
55
+ tag: "Blake2256";
56
+ value: undefined;
57
+ } | {
58
+ tag: "Blake2128Concat";
59
+ value: undefined;
60
+ } | {
61
+ tag: "Twox128";
62
+ value: undefined;
63
+ } | {
64
+ tag: "Twox256";
65
+ value: undefined;
66
+ } | {
67
+ tag: "Twox64Concat";
68
+ value: undefined;
69
+ } | {
70
+ tag: "Identity";
71
+ value: undefined;
72
+ })[];
73
+ key: number;
74
+ value: number;
75
+ }>>;
76
+ };
77
+ fallback: import("polkadot-api").HexString;
78
+ docs: string[];
79
+ } & {
80
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
81
+ tag: "NotDeprecated";
82
+ value: undefined;
83
+ } | {
84
+ tag: "DeprecatedWithoutNote";
85
+ value: undefined;
86
+ } | {
87
+ tag: "Deprecated";
88
+ value: {
89
+ note: string;
90
+ since: string | undefined;
91
+ };
92
+ }>>;
93
+ }))[];
94
+ } | undefined;
95
+ calls: {
96
+ type: number;
97
+ } | ({
98
+ type: number;
99
+ } & {
100
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
101
+ index: number;
102
+ deprecation: {
103
+ tag: "DeprecatedWithoutNote";
104
+ value: undefined;
105
+ } | {
106
+ tag: "Deprecated";
107
+ value: {
108
+ note: string;
109
+ since: string | undefined;
110
+ };
111
+ };
112
+ }[]>>;
113
+ }) | undefined;
114
+ events: {
115
+ type: number;
116
+ } | ({
117
+ type: number;
118
+ } & {
119
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
120
+ index: number;
121
+ deprecation: {
122
+ tag: "DeprecatedWithoutNote";
123
+ value: undefined;
124
+ } | {
125
+ tag: "Deprecated";
126
+ value: {
127
+ note: string;
128
+ since: string | undefined;
129
+ };
130
+ };
131
+ }[]>>;
132
+ }) | undefined;
133
+ constants: ({
134
+ name: string;
135
+ type: number;
136
+ value: import("polkadot-api").HexString;
137
+ docs: string[];
138
+ } | ({
139
+ name: string;
140
+ type: number;
141
+ value: import("polkadot-api").HexString;
142
+ docs: string[];
143
+ } & {
144
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
145
+ tag: "NotDeprecated";
146
+ value: undefined;
147
+ } | {
148
+ tag: "DeprecatedWithoutNote";
149
+ value: undefined;
150
+ } | {
151
+ tag: "Deprecated";
152
+ value: {
153
+ note: string;
154
+ since: string | undefined;
155
+ };
156
+ }>>;
157
+ }))[];
158
+ errors: {
159
+ type: number;
160
+ } | ({
161
+ type: number;
162
+ } & {
163
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
164
+ index: number;
165
+ deprecation: {
166
+ tag: "DeprecatedWithoutNote";
167
+ value: undefined;
168
+ } | {
169
+ tag: "Deprecated";
170
+ value: {
171
+ note: string;
172
+ since: string | undefined;
173
+ };
174
+ };
175
+ }[]>>;
176
+ }) | undefined;
177
+ associatedTypes: Array<{
178
+ name: string;
179
+ type: number;
180
+ docs: string[];
181
+ }>;
182
+ viewFns: Array<import("scale-ts").CodecType<import("@talismn/scale").Codec<{
183
+ deprecationInfo: {
184
+ tag: "NotDeprecated";
185
+ value: undefined;
186
+ } | {
187
+ tag: "DeprecatedWithoutNote";
188
+ value: undefined;
189
+ } | {
190
+ tag: "Deprecated";
191
+ value: {
192
+ note: string;
193
+ since: string | undefined;
194
+ };
195
+ };
196
+ name: string;
197
+ inputs: {
198
+ name: string;
199
+ type: number;
200
+ }[];
201
+ output: number;
202
+ docs: string[];
203
+ id: import("polkadot-api").HexString;
204
+ }>>>;
205
+ index: number;
206
+ docs: string[];
207
+ } | ({
208
+ name: string;
209
+ storage: {
210
+ prefix: string;
211
+ items: ({
212
+ name: string;
213
+ modifier: number;
214
+ type: {
215
+ tag: "plain";
216
+ value: number;
217
+ } | {
218
+ tag: "map";
219
+ value: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
220
+ hashers: ({
221
+ tag: "Blake2128";
222
+ value: undefined;
223
+ } | {
224
+ tag: "Blake2256";
225
+ value: undefined;
226
+ } | {
227
+ tag: "Blake2128Concat";
228
+ value: undefined;
229
+ } | {
230
+ tag: "Twox128";
231
+ value: undefined;
232
+ } | {
233
+ tag: "Twox256";
234
+ value: undefined;
235
+ } | {
236
+ tag: "Twox64Concat";
237
+ value: undefined;
238
+ } | {
239
+ tag: "Identity";
240
+ value: undefined;
241
+ })[];
242
+ key: number;
243
+ value: number;
244
+ }>>;
245
+ };
246
+ fallback: import("polkadot-api").HexString;
247
+ docs: string[];
248
+ } | ({
249
+ name: string;
250
+ modifier: number;
251
+ type: {
252
+ tag: "plain";
253
+ value: number;
254
+ } | {
255
+ tag: "map";
256
+ value: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
257
+ hashers: ({
258
+ tag: "Blake2128";
259
+ value: undefined;
260
+ } | {
261
+ tag: "Blake2256";
262
+ value: undefined;
263
+ } | {
264
+ tag: "Blake2128Concat";
265
+ value: undefined;
266
+ } | {
267
+ tag: "Twox128";
268
+ value: undefined;
269
+ } | {
270
+ tag: "Twox256";
271
+ value: undefined;
272
+ } | {
273
+ tag: "Twox64Concat";
274
+ value: undefined;
275
+ } | {
276
+ tag: "Identity";
277
+ value: undefined;
278
+ })[];
279
+ key: number;
280
+ value: number;
281
+ }>>;
282
+ };
283
+ fallback: import("polkadot-api").HexString;
284
+ docs: string[];
285
+ } & {
286
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
287
+ tag: "NotDeprecated";
288
+ value: undefined;
289
+ } | {
290
+ tag: "DeprecatedWithoutNote";
291
+ value: undefined;
292
+ } | {
293
+ tag: "Deprecated";
294
+ value: {
295
+ note: string;
296
+ since: string | undefined;
297
+ };
298
+ }>>;
299
+ }))[];
300
+ } | undefined;
301
+ calls: {
302
+ type: number;
303
+ } | ({
304
+ type: number;
305
+ } & {
306
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
307
+ index: number;
308
+ deprecation: {
309
+ tag: "DeprecatedWithoutNote";
310
+ value: undefined;
311
+ } | {
312
+ tag: "Deprecated";
313
+ value: {
314
+ note: string;
315
+ since: string | undefined;
316
+ };
317
+ };
318
+ }[]>>;
319
+ }) | undefined;
320
+ events: {
321
+ type: number;
322
+ } | ({
323
+ type: number;
324
+ } & {
325
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
326
+ index: number;
327
+ deprecation: {
328
+ tag: "DeprecatedWithoutNote";
329
+ value: undefined;
330
+ } | {
331
+ tag: "Deprecated";
332
+ value: {
333
+ note: string;
334
+ since: string | undefined;
335
+ };
336
+ };
337
+ }[]>>;
338
+ }) | undefined;
339
+ constants: ({
340
+ name: string;
341
+ type: number;
342
+ value: import("polkadot-api").HexString;
343
+ docs: string[];
344
+ } | ({
345
+ name: string;
346
+ type: number;
347
+ value: import("polkadot-api").HexString;
348
+ docs: string[];
349
+ } & {
350
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
351
+ tag: "NotDeprecated";
352
+ value: undefined;
353
+ } | {
354
+ tag: "DeprecatedWithoutNote";
355
+ value: undefined;
356
+ } | {
357
+ tag: "Deprecated";
358
+ value: {
359
+ note: string;
360
+ since: string | undefined;
361
+ };
362
+ }>>;
363
+ }))[];
364
+ errors: {
365
+ type: number;
366
+ } | ({
367
+ type: number;
368
+ } & {
369
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
370
+ index: number;
371
+ deprecation: {
372
+ tag: "DeprecatedWithoutNote";
373
+ value: undefined;
374
+ } | {
375
+ tag: "Deprecated";
376
+ value: {
377
+ note: string;
378
+ since: string | undefined;
379
+ };
380
+ };
381
+ }[]>>;
382
+ }) | undefined;
383
+ associatedTypes: Array<{
384
+ name: string;
385
+ type: number;
386
+ docs: string[];
387
+ }>;
388
+ viewFns: Array<import("scale-ts").CodecType<import("@talismn/scale").Codec<{
389
+ deprecationInfo: {
390
+ tag: "NotDeprecated";
391
+ value: undefined;
392
+ } | {
393
+ tag: "DeprecatedWithoutNote";
394
+ value: undefined;
395
+ } | {
396
+ tag: "Deprecated";
397
+ value: {
398
+ note: string;
399
+ since: string | undefined;
400
+ };
401
+ };
402
+ name: string;
403
+ inputs: {
404
+ name: string;
405
+ type: number;
406
+ }[];
407
+ output: number;
408
+ docs: string[];
409
+ id: import("polkadot-api").HexString;
410
+ }>>>;
411
+ index: number;
412
+ docs: string[];
413
+ } & {
414
+ deprecationInfo: import("scale-ts").CodecType<import("@talismn/scale").Codec<{
415
+ tag: "NotDeprecated";
416
+ value: undefined;
417
+ } | {
418
+ tag: "DeprecatedWithoutNote";
419
+ value: undefined;
420
+ } | {
421
+ tag: "Deprecated";
422
+ value: {
423
+ note: string;
424
+ since: string | undefined;
425
+ };
426
+ }>>;
427
+ }) | undefined;
@@ -0,0 +1,7 @@
1
+ export * from "./fetchRuntimeCallResult";
2
+ export * from "./errors";
3
+ export * from "./hasConstantValue";
4
+ export * from "./getContantValue";
5
+ export * from "./tryGetConstantValue";
6
+ export * from "./types";
7
+ export * from "./utils";
@@ -0,0 +1 @@
1
+ export declare const tryGetConstantValue: <T>(metadataRpc: `0x${string}`, pallet: string, constant: string) => T | null;
@@ -0,0 +1,10 @@
1
+ import { AnyMiniMetadata, TokenOfType, TokenType } from "@talismn/chaindata-provider";
2
+ import { PlatformOf, TokensWithAddresses } from "../IBalanceModule";
3
+ export type BalanceDef<T extends TokenType = TokenType> = {
4
+ token: TokenOfType<T>;
5
+ address: PlatformOf<T> extends "ethereum" ? `0x${string}` : string;
6
+ };
7
+ export declare const getBalanceDefs: <T extends TokenType = TokenType>(addressesByToken: TokensWithAddresses) => BalanceDef<T>[];
8
+ export type ModuleMiniMetadata<MiniMetadataExtra> = Omit<AnyMiniMetadata, "extra"> & {
9
+ extra: MiniMetadataExtra;
10
+ };
@@ -0,0 +1,4 @@
1
+ import { UnifiedMetadata } from "@talismn/scale";
2
+ export declare const hasStorageItem: (metadata: UnifiedMetadata, palletName: string, itemName: string) => boolean;
3
+ export declare const hasStorageItems: (metadata: UnifiedMetadata, palletName: string, itemNames: string[]) => boolean;
4
+ export declare const hasRuntimeApi: (metadata: UnifiedMetadata, apiName: string, method: string) => boolean;
@@ -0,0 +1,16 @@
1
+ import z from "zod/v4";
2
+ export declare const MODULE_TYPE: "substrate-assets";
3
+ export declare const PLATFORM: "polkadot";
4
+ export declare const SubAssetsTokenConfigSchema: z.ZodObject<{
5
+ symbol: z.ZodOptional<z.ZodString>;
6
+ networkId: z.ZodOptional<z.ZodString>;
7
+ isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
8
+ decimals: z.ZodOptional<z.ZodInt>;
9
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
+ logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
11
+ coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
12
+ noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
13
+ mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
14
+ assetId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUInt32, z.ZodString]>, z.ZodTransform<string, string | number>>;
15
+ }, z.core.$strict>;
16
+ export type TokenConfig = z.infer<typeof SubAssetsTokenConfigSchema>;
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const fetchBalances: IBalanceModule<typeof MODULE_TYPE>["fetchBalances"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE, TokenConfig } from "./config";
3
+ export declare const fetchTokens: IBalanceModule<typeof MODULE_TYPE, TokenConfig>["fetchTokens"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getMiniMetadata: IBalanceModule<typeof MODULE_TYPE>["getMiniMetadata"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getTransferCallData: IBalanceModule<typeof MODULE_TYPE>["getTransferCallData"];
@@ -0,0 +1 @@
1
+ export * from "./module";
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE, TokenConfig } from "./config";
3
+ export declare const SubAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE, TokenConfig>;
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const subscribeBalances: IBalanceModule<typeof MODULE_TYPE>["subscribeBalances"];
@@ -0,0 +1,16 @@
1
+ import z from "zod/v4";
2
+ export declare const MODULE_TYPE: "substrate-foreignassets";
3
+ export declare const PLATFORM: "polkadot";
4
+ export declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
5
+ symbol: z.ZodOptional<z.ZodString>;
6
+ networkId: z.ZodOptional<z.ZodString>;
7
+ isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
8
+ decimals: z.ZodOptional<z.ZodInt>;
9
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
+ logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
11
+ coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
12
+ noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
13
+ mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
14
+ onChainId: z.ZodString;
15
+ }, z.core.$strict>;
16
+ export type TokenConfig = z.infer<typeof SubForeignAssetsTokenConfigSchema>;
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const fetchBalances: IBalanceModule<typeof MODULE_TYPE>["fetchBalances"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE, TokenConfig } from "./config";
3
+ export declare const fetchTokens: IBalanceModule<typeof MODULE_TYPE, TokenConfig>["fetchTokens"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getMiniMetadata: IBalanceModule<typeof MODULE_TYPE>["getMiniMetadata"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getTransferCallData: IBalanceModule<typeof MODULE_TYPE>["getTransferCallData"];
@@ -0,0 +1 @@
1
+ export * from "./module";
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE, TokenConfig } from "./config";
3
+ export declare const SubForeignAssetsBalanceModule: IBalanceModule<typeof MODULE_TYPE, TokenConfig>;
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const subscribeBalances: IBalanceModule<typeof MODULE_TYPE>["subscribeBalances"];
@@ -0,0 +1,2 @@
1
+ export declare const MODULE_TYPE: "substrate-hydration";
2
+ export declare const PLATFORM: "polkadot";
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const fetchBalances: IBalanceModule<typeof MODULE_TYPE>["fetchBalances"];
@@ -0,0 +1,4 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ import { SubHydrationTokenConfig } from "./types";
4
+ export declare const fetchTokens: IBalanceModule<typeof MODULE_TYPE, SubHydrationTokenConfig>["fetchTokens"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getMiniMetadata: IBalanceModule<typeof MODULE_TYPE>["getMiniMetadata"];
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const getTransferCallData: IBalanceModule<typeof MODULE_TYPE>["getTransferCallData"];
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./module";
@@ -0,0 +1,4 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ import { SubHydrationTokenConfig } from "./types";
4
+ export declare const SubHydrationBalanceModule: IBalanceModule<typeof MODULE_TYPE, SubHydrationTokenConfig>;
@@ -0,0 +1,3 @@
1
+ import { IBalanceModule } from "../IBalanceModule";
2
+ import { MODULE_TYPE } from "./config";
3
+ export declare const subscribeBalances: IBalanceModule<typeof MODULE_TYPE>["subscribeBalances"];
@@ -0,0 +1,14 @@
1
+ import z from "zod/v4";
2
+ export declare const SubHydrationTokenConfigSchema: z.ZodObject<{
3
+ symbol: z.ZodOptional<z.ZodString>;
4
+ networkId: z.ZodOptional<z.ZodString>;
5
+ isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
6
+ decimals: z.ZodOptional<z.ZodInt>;
7
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
8
+ logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
9
+ coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
10
+ noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
11
+ mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
12
+ onChainId: z.ZodUInt32;
13
+ }, z.core.$strict>;
14
+ export type SubHydrationTokenConfig = z.infer<typeof SubHydrationTokenConfigSchema>;
@@ -0,0 +1,9 @@
1
+ import { ChainConnector } from "@talismn/chain-connector";
2
+ import { DotNetworkId } from "@talismn/chaindata-provider";
3
+ import { Observable } from "rxjs";
4
+ import { AmountWithLabel } from "../../../types";
5
+ import { BalanceDef, ModuleMiniMetadata } from "../../shared";
6
+ import { MiniMetadataExtra } from "../config";
7
+ type StakingValuesByAddress = Record<string, Array<AmountWithLabel<string>>>;
8
+ export declare const getSubtensorStakingBalances$: (connector: ChainConnector, networkId: DotNetworkId, balanceDefs: BalanceDef<"substrate-native">[], miniMetadata: ModuleMiniMetadata<MiniMetadataExtra>) => Observable<StakingValuesByAddress>;
9
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { bittensor } from "@polkadot-api/descriptors";
2
+ export type GetStakeInfoForColdkeyParams = (typeof bittensor)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkey"][0];
3
+ export type GetStakeInfoForColdkeyResult = (typeof bittensor)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkey"][1];
4
+ export type GetDynamicInfoParams = (typeof bittensor)["descriptors"]["apis"]["SubnetInfoRuntimeApi"]["get_dynamic_info"][0];
5
+ export type GetDynamicInfoResult = (typeof bittensor)["descriptors"]["apis"]["SubnetInfoRuntimeApi"]["get_dynamic_info"][1];
6
+ export declare const SUBTENSOR_ROOT_NETUID = 0;
7
+ export declare const SUBTENSOR_MIN_STAKE_AMOUNT_PLANK = 1000000n;
8
+ export declare const SCALE_FACTOR: bigint;
9
+ export declare const ONE_ALPHA_TOKEN: bigint;
10
+ export declare const calculateAlphaPrice: ({ dynamicInfo, }: {
11
+ dynamicInfo: GetDynamicInfoResult | null | undefined;
12
+ }) => bigint;
13
+ export declare const calculateTaoAmountFromAlpha: ({ alphaPrice, alphaStaked, }: {
14
+ alphaPrice: bigint;
15
+ alphaStaked: bigint;
16
+ }) => bigint;
17
+ export declare const calculateTaoFromDynamicInfo: ({ dynamicInfo, alphaStaked, }: {
18
+ dynamicInfo: GetDynamicInfoResult | null | undefined;
19
+ alphaStaked: bigint;
20
+ }) => bigint;