@talismn/balances 0.0.0-pr2043-20250703063959 → 0.0.0-pr2059-20250626001054
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/BalanceModule.d.ts +12 -23
- package/dist/declarations/src/EvmTokenFetcher.d.ts +11 -0
- package/dist/declarations/src/MiniMetadataUpdater.d.ts +43 -0
- package/dist/declarations/src/index.d.ts +3 -0
- package/dist/declarations/src/modules/EvmErc20Module.d.ts +23 -20
- package/dist/declarations/src/modules/EvmNativeModule.d.ts +18 -19
- package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +30 -28
- package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +18 -20
- package/dist/declarations/src/modules/SubstrateEquilibriumModule.d.ts +39 -0
- package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +18 -20
- package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +4 -17
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeCrowdloans.d.ts +5 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeNompoolStaking.d.ts +3 -3
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeSubtensorStaking.d.ts +3 -3
- package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +23 -6
- package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +6 -6
- package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +4 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/util/crowdloanFundContributionsChildKey.d.ts +4 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/detectMiniMetadataChanges.d.ts +2 -0
- package/dist/declarations/src/modules/SubstrateNativeModule/util/sortChains.d.ts +1 -1
- package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +19 -20
- package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +22 -22
- package/dist/declarations/src/modules/index.d.ts +38 -213
- package/dist/declarations/src/modules/util/InferBalanceModuleTypes.d.ts +3 -5
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +7 -16
- package/dist/declarations/src/modules/util/findChainMeta.d.ts +8 -0
- package/dist/declarations/src/modules/util/getUniqueChainIds.d.ts +2 -2
- package/dist/declarations/src/modules/util/index.d.ts +1 -0
- package/dist/declarations/src/types/balances.d.ts +72 -203
- package/dist/declarations/src/types/balancetypes.d.ts +18 -8
- package/dist/declarations/src/types/minimetadatas.d.ts +24 -6
- package/dist/declarations/src/util/hydrateChaindata.d.ts +8 -0
- package/dist/declarations/src/util/index.d.ts +1 -0
- package/dist/talismn-balances.cjs.dev.js +2099 -1424
- package/dist/talismn-balances.cjs.prod.js +2099 -1424
- package/dist/talismn-balances.esm.js +2083 -1414
- package/package.json +8 -9
- package/dist/declarations/src/getMiniMetadata/getMetadataRpc.d.ts +0 -3
- package/dist/declarations/src/getMiniMetadata/getMiniMetadatas.d.ts +0 -4
- package/dist/declarations/src/getMiniMetadata/getSpecVersion.d.ts +0 -6
- package/dist/declarations/src/getMiniMetadata/getUpdatedMiniMetadatas.d.ts +0 -4
- package/dist/declarations/src/getMiniMetadata/index.d.ts +0 -5
- package/dist/declarations/src/libVersion.d.ts +0 -1
- package/dist/declarations/src/modules/SubstrateNativeModule/util/systemProperties.d.ts +0 -5
- package/dist/declarations/src/modules/util/getAddresssesByTokenByNetwork.d.ts +0 -3
- package/dist/declarations/src/types/tokens.d.ts +0 -11
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ChainList, SimpleEvmNetworkList, TokenList } from "@talismn/chaindata-provider";
|
2
2
|
import { TokenRateCurrency, TokenRates, TokenRatesList } from "@talismn/token-rates";
|
3
3
|
import { NonFunctionProperties } from "@talismn/util";
|
4
4
|
import { Amount, AmountWithLabel, BalanceJson, BalanceJsonList, BalanceStatusTypes, ExtraAmount, IBalance, LockedAmount } from "./balancetypes";
|
@@ -19,7 +19,8 @@ export type NarrowBalanceType<S extends IBalance, P> = S extends {
|
|
19
19
|
export type BalanceSource = BalanceJson["source"];
|
20
20
|
/** TODO: Remove this in favour of a frontend-friendly `ChaindataProvider` */
|
21
21
|
export type HydrateDb = Partial<{
|
22
|
-
|
22
|
+
chains: ChainList;
|
23
|
+
evmNetworks: SimpleEvmNetworkList;
|
23
24
|
tokens: TokenList;
|
24
25
|
tokenRates: TokenRatesList;
|
25
26
|
}>;
|
@@ -124,228 +125,95 @@ export declare class Balance {
|
|
124
125
|
isSource: (source: BalanceSource) => boolean;
|
125
126
|
hydrate: (hydrate?: HydrateDb) => void;
|
126
127
|
get id(): string;
|
127
|
-
get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
|
128
|
+
get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-equilibrium" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
|
128
129
|
get status(): import("./balancetypes").BalanceStatus;
|
129
130
|
get address(): string;
|
130
|
-
get
|
131
|
-
get
|
132
|
-
|
133
|
-
|
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: "secp256k1" | "*25519";
|
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
|
-
chainspecQrUrl?: string | undefined;
|
167
|
-
latestMetadataQrUrl?: string | undefined;
|
168
|
-
oldPrefix?: number | undefined;
|
169
|
-
registryTypes?: any;
|
170
|
-
signedExtensions?: any;
|
171
|
-
hasCheckMetadataHash?: boolean | undefined;
|
172
|
-
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
173
|
-
isUnknownFeeToken?: boolean | undefined;
|
174
|
-
balancesConfig?: {
|
175
|
-
"substrate-native"?: {
|
176
|
-
disable?: boolean | undefined;
|
177
|
-
} | undefined;
|
178
|
-
"substrate-assets"?: undefined;
|
179
|
-
"substrate-psp22"?: undefined;
|
180
|
-
"substrate-tokens"?: {
|
181
|
-
palletId?: string | undefined;
|
182
|
-
} | undefined;
|
183
|
-
"substrate-foreignassets"?: undefined;
|
184
|
-
} | undefined;
|
185
|
-
} | {
|
186
|
-
id: string;
|
187
|
-
name: string;
|
188
|
-
nativeTokenId: string;
|
189
|
-
nativeCurrency: {
|
190
|
-
decimals: number;
|
191
|
-
symbol: string;
|
192
|
-
name: string;
|
193
|
-
coingeckoId?: string | undefined;
|
194
|
-
mirrorOf?: string | undefined;
|
195
|
-
logo?: string | undefined;
|
196
|
-
};
|
197
|
-
blockExplorerUrls: string[];
|
198
|
-
platform: "ethereum";
|
199
|
-
rpcs: string[];
|
200
|
-
isTestnet?: boolean | undefined;
|
201
|
-
isDefault?: boolean | undefined;
|
202
|
-
forceScan?: boolean | undefined;
|
203
|
-
logo?: string | undefined;
|
204
|
-
themeColor?: string | undefined;
|
205
|
-
substrateChainId?: string | undefined;
|
206
|
-
preserveGasEstimate?: boolean | undefined;
|
207
|
-
feeType?: "legacy" | "eip-1559" | undefined;
|
208
|
-
l2FeeType?: {
|
209
|
-
type: "op-stack";
|
210
|
-
} | {
|
211
|
-
type: "scroll";
|
212
|
-
l1GasPriceOracle: `0x${string}`;
|
213
|
-
} | undefined;
|
214
|
-
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
215
|
-
balancesConfig?: {
|
216
|
-
"evm-native"?: undefined;
|
217
|
-
"evm-erc20"?: undefined;
|
218
|
-
"evm-uniswapv2"?: undefined;
|
219
|
-
} | undefined;
|
220
|
-
} | null;
|
131
|
+
get chainId(): string | undefined;
|
132
|
+
get chain(): import("@talismn/chaindata-provider").Chain | null;
|
133
|
+
get evmNetworkId(): string | undefined;
|
134
|
+
get evmNetwork(): import("@talismn/chaindata-provider").SimpleEvmNetwork | null;
|
221
135
|
get tokenId(): string;
|
222
|
-
get token(): {
|
223
|
-
id: string;
|
224
|
-
networkId: string;
|
225
|
-
decimals: number;
|
226
|
-
symbol: string;
|
136
|
+
get token(): (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
227
137
|
type: "evm-erc20";
|
228
|
-
|
229
|
-
contractAddress:
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
isCustom?: boolean | undefined;
|
237
|
-
} | {
|
238
|
-
id: string;
|
239
|
-
networkId: string;
|
240
|
-
decimals: number;
|
241
|
-
symbol: string;
|
138
|
+
} & {
|
139
|
+
contractAddress: string;
|
140
|
+
evmNetwork: {
|
141
|
+
id: import("@talismn/chaindata-provider").EvmNetworkId;
|
142
|
+
} | null;
|
143
|
+
isCustom?: true;
|
144
|
+
image?: string;
|
145
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
242
146
|
type: "evm-native";
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
mirrorOf?: string | undefined;
|
250
|
-
} | {
|
251
|
-
id: string;
|
252
|
-
networkId: string;
|
253
|
-
decimals: number;
|
254
|
-
symbol: string;
|
147
|
+
} & {
|
148
|
+
evmNetwork: {
|
149
|
+
id: import("@talismn/chaindata-provider").EvmNetworkId;
|
150
|
+
};
|
151
|
+
isCustom?: true;
|
152
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
255
153
|
type: "evm-uniswapv2";
|
256
|
-
|
257
|
-
contractAddress:
|
154
|
+
} & {
|
155
|
+
contractAddress: string;
|
258
156
|
symbol0: string;
|
259
157
|
symbol1: string;
|
260
158
|
decimals0: number;
|
261
159
|
decimals1: number;
|
262
|
-
tokenAddress0:
|
263
|
-
tokenAddress1:
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
isCustom?: boolean | undefined;
|
271
|
-
coingeckoId0?: string | undefined;
|
272
|
-
coingeckoId1?: string | undefined;
|
273
|
-
} | {
|
274
|
-
id: string;
|
275
|
-
networkId: string;
|
276
|
-
decimals: number;
|
277
|
-
symbol: string;
|
160
|
+
tokenAddress0: string;
|
161
|
+
tokenAddress1: string;
|
162
|
+
coingeckoId0?: string;
|
163
|
+
coingeckoId1?: string;
|
164
|
+
evmNetwork: {
|
165
|
+
id: import("@talismn/chaindata-provider").EvmNetworkId;
|
166
|
+
} | null;
|
167
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
278
168
|
type: "substrate-assets";
|
279
|
-
|
169
|
+
} & {
|
170
|
+
existentialDeposit: string;
|
280
171
|
assetId: string;
|
172
|
+
isFrozen: boolean;
|
173
|
+
chain: {
|
174
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
175
|
+
};
|
176
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
177
|
+
type: "substrate-equilibrium";
|
178
|
+
} & {
|
281
179
|
existentialDeposit: string;
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
mirrorOf?: string | undefined;
|
288
|
-
isFrozen?: boolean | undefined;
|
289
|
-
} | {
|
290
|
-
id: string;
|
291
|
-
networkId: string;
|
292
|
-
decimals: number;
|
293
|
-
symbol: string;
|
180
|
+
assetId: string;
|
181
|
+
chain: {
|
182
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
183
|
+
};
|
184
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
294
185
|
type: "substrate-foreignassets";
|
295
|
-
|
296
|
-
onChainId: string;
|
186
|
+
} & {
|
297
187
|
existentialDeposit: string;
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
isFrozen?: boolean | undefined;
|
305
|
-
} | {
|
306
|
-
id: string;
|
307
|
-
networkId: string;
|
308
|
-
decimals: number;
|
309
|
-
symbol: string;
|
188
|
+
onChainId: string;
|
189
|
+
isFrozen: boolean;
|
190
|
+
chain: {
|
191
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
192
|
+
};
|
193
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
310
194
|
type: "substrate-native";
|
311
|
-
|
195
|
+
} & {
|
312
196
|
existentialDeposit: string;
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
noDiscovery?: boolean | undefined;
|
318
|
-
mirrorOf?: string | undefined;
|
319
|
-
} | {
|
320
|
-
id: string;
|
321
|
-
networkId: string;
|
322
|
-
decimals: number;
|
323
|
-
symbol: string;
|
197
|
+
chain: {
|
198
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
199
|
+
};
|
200
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
324
201
|
type: "substrate-psp22";
|
325
|
-
|
202
|
+
} & {
|
203
|
+
existentialDeposit: string;
|
326
204
|
contractAddress: string;
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
noDiscovery?: boolean | undefined;
|
332
|
-
mirrorOf?: string | undefined;
|
333
|
-
} | {
|
334
|
-
id: string;
|
335
|
-
networkId: string;
|
336
|
-
decimals: number;
|
337
|
-
symbol: string;
|
205
|
+
chain: {
|
206
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
207
|
+
};
|
208
|
+
}) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
338
209
|
type: "substrate-tokens";
|
339
|
-
|
340
|
-
onChainId: string | number;
|
210
|
+
} & {
|
341
211
|
existentialDeposit: string;
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
mirrorOf?: string | undefined;
|
348
|
-
} | null;
|
212
|
+
onChainId: string | number;
|
213
|
+
chain: {
|
214
|
+
id: import("@talismn/chaindata-provider").ChainId;
|
215
|
+
};
|
216
|
+
}) | null;
|
349
217
|
get decimals(): number | null;
|
350
218
|
get rates(): TokenRates | null;
|
351
219
|
/**
|
@@ -380,6 +248,7 @@ export declare class Balance {
|
|
380
248
|
/** The frozen balance of this token. Is included in the free amount. */
|
381
249
|
get locked(): BalanceFormatter;
|
382
250
|
get locks(): FormattedAmount<AmountWithLabel<string>, string>[];
|
251
|
+
get crowdloans(): FormattedAmount<AmountWithLabel<string>, string>[];
|
383
252
|
get nompools(): FormattedAmount<AmountWithLabel<string>, string>[];
|
384
253
|
get subtensor(): FormattedAmount<AmountWithLabel<string>, string>[];
|
385
254
|
/** The extra balance of this token */
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PluginBalanceTypes } from "@talismn/balances/plugins";
|
2
|
-
import {
|
2
|
+
import { ChainId, EvmChainId, EvmNetworkId, SubChainId, TokenId } from "@talismn/chaindata-provider";
|
3
3
|
import { Address } from "./addresses";
|
4
4
|
/**
|
5
5
|
* `BalanceTypes` is an automatically determined sub-selection of `PluginBalanceTypes`.
|
@@ -34,7 +34,17 @@ type IBalanceBase = {
|
|
34
34
|
address: Address;
|
35
35
|
/** The token this balance is for */
|
36
36
|
tokenId: TokenId;
|
37
|
-
|
37
|
+
};
|
38
|
+
type IBalanceBaseEvm = {
|
39
|
+
/** WIP, use `chainId` or `evmNetworkId` for now */
|
40
|
+
multiChainId: EvmChainId;
|
41
|
+
/** The evm chain this balance is on */
|
42
|
+
evmNetworkId: EvmNetworkId;
|
43
|
+
};
|
44
|
+
type IBalanceBaseSubstrate = {
|
45
|
+
multiChainId: SubChainId;
|
46
|
+
/** The substrate chain this balance is on */
|
47
|
+
chainId: ChainId;
|
38
48
|
};
|
39
49
|
type IBalanceSimpleValues = {
|
40
50
|
/** For balance types with a simple value, this is the value of the balance (eg, evm native token balance) */
|
@@ -47,19 +57,19 @@ type IBalanceComplexValues = {
|
|
47
57
|
value?: undefined;
|
48
58
|
};
|
49
59
|
/** `IBalance` is a common interface which all balance types must implement. */
|
50
|
-
export type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
51
|
-
export type EvmBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
52
|
-
export type SubstrateBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
60
|
+
export type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues) & (IBalanceBaseEvm | IBalanceBaseSubstrate);
|
61
|
+
export type EvmBalance = IBalanceBase & IBalanceBaseEvm & (IBalanceSimpleValues | IBalanceComplexValues);
|
62
|
+
export type SubstrateBalance = IBalanceBase & IBalanceBaseSubstrate & (IBalanceSimpleValues | IBalanceComplexValues);
|
53
63
|
/** An unlabelled amount of a balance */
|
54
64
|
export type Amount = string;
|
55
|
-
export type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "nompool" | "subtensor";
|
65
|
+
export type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "crowdloan" | "nompool" | "subtensor";
|
56
66
|
/** A labelled amount of a balance */
|
57
67
|
type BaseAmountWithLabel<TLabel extends string> = {
|
58
68
|
type: BalanceStatusTypes;
|
59
69
|
/**
|
60
70
|
* For modules which fetch balances via module sources, the source is equivalent to previous 'subSource' field
|
61
71
|
* on the parent balance object
|
62
|
-
* e.g. `staking`
|
72
|
+
* e.g. `staking` or `crowdloans`
|
63
73
|
**/
|
64
74
|
source?: string;
|
65
75
|
label: TLabel;
|
@@ -91,7 +101,7 @@ export type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
91
101
|
includeInTotal?: boolean;
|
92
102
|
};
|
93
103
|
/** Used by plugins to help define their custom `BalanceType` */
|
94
|
-
export type NewBalanceType<TModuleType extends string, TBalanceValueType extends "simple" | "complex"> = IBalanceBase & (TBalanceValueType extends "simple" ? IBalanceSimpleValues : IBalanceComplexValues) & {
|
104
|
+
export type NewBalanceType<TModuleType extends string, TBalanceValueType extends "simple" | "complex", TNetworkType extends "ethereum" | "substrate"> = IBalanceBase & (TBalanceValueType extends "simple" ? IBalanceSimpleValues : IBalanceComplexValues) & (TNetworkType extends "ethereum" ? IBalanceBaseEvm : IBalanceBaseSubstrate) & {
|
95
105
|
source: TModuleType;
|
96
106
|
};
|
97
107
|
export {};
|
@@ -1,8 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import z from "zod/v4";
|
3
|
-
import { AnyNewBalanceModule, InferChainMeta } from "../modules";
|
1
|
+
import { ChainId } from "@talismn/chaindata-provider";
|
4
2
|
/** For fast db access, you can calculate the primary key for a miniMetadata using this method */
|
5
|
-
export declare const deriveMiniMetadataId: ({ source, chainId, specVersion,
|
3
|
+
export declare const deriveMiniMetadataId: ({ source, chainId, specName, specVersion, balancesConfig, }: Pick<MiniMetadata, "source" | "chainId" | "specName" | "specVersion" | "balancesConfig">) => string;
|
6
4
|
export type MiniMetadataStatus =
|
7
5
|
/** Metadata is up to date */
|
8
6
|
"good"
|
@@ -10,6 +8,26 @@ export type MiniMetadataStatus =
|
|
10
8
|
| "outdated"
|
11
9
|
/** Metadata doesn't exist */
|
12
10
|
| "none";
|
13
|
-
export type MiniMetadata
|
14
|
-
|
11
|
+
export type MiniMetadata = {
|
12
|
+
/** The DB id for this metadata */
|
13
|
+
id: string;
|
14
|
+
/** The balance module which created this miniMetadata */
|
15
|
+
source: string;
|
16
|
+
/** The chain this miniMetadata came from */
|
17
|
+
chainId: ChainId;
|
18
|
+
/** The chain specName which this miniMetadata is valid for */
|
19
|
+
specName: string;
|
20
|
+
/** The chain specVersion which this miniMetadata is valid for */
|
21
|
+
specVersion: string;
|
22
|
+
/** The JSON-encoded chain balancesConfig which this miniMetadata is valid for */
|
23
|
+
balancesConfig: string;
|
24
|
+
/** The version of the metadata format e.g. 13, 14, 15, etc */
|
25
|
+
version: number;
|
26
|
+
/** The miniMetadata encoded as a hex string */
|
27
|
+
data: `0x${string}` | null;
|
28
|
+
/**
|
29
|
+
* Some balance modules need a little bit of extra data in addition to the miniMetadata.
|
30
|
+
* They can store that data as a JSON-encoded string here.
|
31
|
+
*/
|
32
|
+
extra: string;
|
15
33
|
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { EvmTokenFetcher, MiniMetadataUpdater } from "@talismn/balances";
|
2
|
+
import { ChaindataProvider } from "@talismn/chaindata-provider";
|
3
|
+
/** Pulls the latest chaindata from https://github.com/TalismanSociety/chaindata */
|
4
|
+
export declare const hydrateChaindataAndMiniMetadata: (chaindataProvider: ChaindataProvider, miniMetadataUpdater: MiniMetadataUpdater) => Promise<void>;
|
5
|
+
/** Builds any missing miniMetadatas (e.g. for the user's custom substrate chains) */
|
6
|
+
export declare const updateCustomMiniMetadata: (chaindataProvider: ChaindataProvider, miniMetadataUpdater: MiniMetadataUpdater) => Promise<void>;
|
7
|
+
/** Fetches any missing Evm Tokens */
|
8
|
+
export declare const updateEvmTokens: (chaindataProvider: ChaindataProvider, evmTokenFetcher: EvmTokenFetcher) => Promise<void>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./hydrateChaindata";
|