@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.
- package/dist/declarations/src/NewBalanceModules.d.ts +99 -0
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/modules/EvmErc20Module.d.ts +1 -1
- package/dist/declarations/src/modules/IBalanceModule.d.ts +100 -0
- package/dist/declarations/src/modules/abis/index.d.ts +2 -0
- package/dist/declarations/src/modules/evm-erc20/config.d.ts +16 -0
- package/dist/declarations/src/modules/evm-erc20/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/index.d.ts +1 -0
- package/dist/declarations/src/modules/evm-erc20/module.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-erc20/utils.d.ts +6 -0
- package/dist/declarations/src/modules/evm-native/config.d.ts +15 -0
- package/dist/declarations/src/modules/evm-native/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-native/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/evm-native/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/evm-native/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/evm-native/index.d.ts +1 -0
- package/dist/declarations/src/modules/evm-native/module.d.ts +3 -0
- package/dist/declarations/src/modules/evm-native/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/config.d.ts +16 -0
- package/dist/declarations/src/modules/evm-uniswapv2/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/index.d.ts +1 -0
- package/dist/declarations/src/modules/evm-uniswapv2/module.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/evm-uniswapv2/utils.d.ts +12 -0
- package/dist/declarations/src/modules/index.d.ts +2 -1
- package/dist/declarations/src/modules/shared/errors.d.ts +11 -0
- package/dist/declarations/src/modules/shared/fetchRuntimeCallResult.d.ts +2 -0
- package/dist/declarations/src/modules/shared/getContantValue.d.ts +1 -0
- package/dist/declarations/src/modules/shared/hasConstantValue.d.ts +427 -0
- package/dist/declarations/src/modules/shared/index.d.ts +7 -0
- package/dist/declarations/src/modules/shared/tryGetConstantValue.d.ts +1 -0
- package/dist/declarations/src/modules/shared/types.d.ts +10 -0
- package/dist/declarations/src/modules/shared/utils.d.ts +4 -0
- package/dist/declarations/src/modules/substrate-assets/config.d.ts +16 -0
- package/dist/declarations/src/modules/substrate-assets/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-assets/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-assets/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-assets/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-assets/index.d.ts +1 -0
- package/dist/declarations/src/modules/substrate-assets/module.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-assets/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/config.d.ts +16 -0
- package/dist/declarations/src/modules/substrate-foreignassets/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/index.d.ts +1 -0
- package/dist/declarations/src/modules/substrate-foreignassets/module.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-foreignassets/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-hydration/config.d.ts +2 -0
- package/dist/declarations/src/modules/substrate-hydration/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-hydration/fetchTokens.d.ts +4 -0
- package/dist/declarations/src/modules/substrate-hydration/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-hydration/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-hydration/index.d.ts +2 -0
- package/dist/declarations/src/modules/substrate-hydration/module.d.ts +4 -0
- package/dist/declarations/src/modules/substrate-hydration/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-hydration/types.d.ts +14 -0
- package/dist/declarations/src/modules/substrate-native/bittensor/getSubtensorStakingBalances.d.ts +9 -0
- package/dist/declarations/src/modules/substrate-native/bittensor/subtensor.d.ts +20 -0
- package/dist/declarations/src/modules/substrate-native/config.d.ts +25 -0
- package/dist/declarations/src/modules/substrate-native/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-native/fetchTokens.d.ts +8 -0
- package/dist/declarations/src/modules/substrate-native/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-native/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-native/index.d.ts +1 -0
- package/dist/declarations/src/modules/substrate-native/module.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-native/queries/buildBaseQueries.d.ts +20 -0
- package/dist/declarations/src/modules/substrate-native/queries/buildNomPoolQueries.d.ts +8 -0
- package/dist/declarations/src/modules/substrate-native/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-native/util/lockTypes.d.ts +15 -0
- package/dist/declarations/src/modules/substrate-native/util/nompoolAccountId.d.ts +5 -0
- package/dist/declarations/src/modules/substrate-psp22/config.d.ts +16 -0
- package/dist/declarations/src/modules/substrate-psp22/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-psp22/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-psp22/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-psp22/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-psp22/index.d.ts +1 -0
- package/dist/declarations/src/modules/substrate-psp22/module.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-psp22/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/config.d.ts +23 -0
- package/dist/declarations/src/modules/substrate-tokens/fetchBalances.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/fetchTokens.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/getMiniMetadata.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/getTransferCallData.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/index.d.ts +1 -0
- package/dist/declarations/src/modules/substrate-tokens/module.d.ts +3 -0
- package/dist/declarations/src/modules/substrate-tokens/subscribeBalances.d.ts +3 -0
- package/dist/declarations/src/modules/util/RpcStateQueriesHelper.d.ts +12 -0
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +2 -2
- package/dist/declarations/src/types/balances.d.ts +2 -1
- package/dist/declarations/src/types/minimetadatas.d.ts +1 -1
- package/dist/declarations/src/version.d.ts +1 -0
- package/dist/talismn-balances.cjs.dev.js +3901 -331
- package/dist/talismn-balances.cjs.prod.js +3901 -331
- package/dist/talismn-balances.esm.js +3887 -323
- package/package.json +8 -8
- package/dist/declarations/src/libVersion.d.ts +0 -1
- 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 @@
|
|
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 @@
|
|
1
|
+
export * from "./module";
|
@@ -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 @@
|
|
1
|
+
export * from "./module";
|
@@ -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>;
|
package/dist/declarations/src/modules/substrate-native/bittensor/getSubtensorStakingBalances.d.ts
ADDED
@@ -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;
|