@talismn/balances 0.0.0-pr2068-20250630052217 → 0.0.0-pr2075-20250703111149
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 +23 -12
- package/dist/declarations/src/getMiniMetadata/getMetadataRpc.d.ts +3 -0
- package/dist/declarations/src/getMiniMetadata/getMiniMetadatas.d.ts +4 -0
- package/dist/declarations/src/getMiniMetadata/getSpecVersion.d.ts +6 -0
- package/dist/declarations/src/getMiniMetadata/getUpdatedMiniMetadatas.d.ts +4 -0
- package/dist/declarations/src/getMiniMetadata/index.d.ts +5 -0
- package/dist/declarations/src/index.d.ts +0 -3
- package/dist/declarations/src/libVersion.d.ts +1 -0
- package/dist/declarations/src/modules/EvmErc20Module.d.ts +20 -23
- package/dist/declarations/src/modules/EvmNativeModule.d.ts +19 -18
- package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +28 -30
- package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +20 -18
- package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +20 -18
- package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +17 -4
- 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 +6 -23
- package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +6 -6
- package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +5 -4
- package/dist/declarations/src/modules/SubstrateNativeModule/util/sortChains.d.ts +1 -1
- package/dist/declarations/src/modules/SubstrateNativeModule/util/systemProperties.d.ts +5 -0
- package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +20 -19
- package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +22 -22
- package/dist/declarations/src/modules/index.d.ts +213 -38
- package/dist/declarations/src/modules/util/InferBalanceModuleTypes.d.ts +5 -3
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +16 -7
- package/dist/declarations/src/modules/util/getAddresssesByTokenByNetwork.d.ts +3 -0
- package/dist/declarations/src/modules/util/getUniqueChainIds.d.ts +2 -2
- package/dist/declarations/src/modules/util/index.d.ts +0 -1
- package/dist/declarations/src/types/balances.d.ts +220 -72
- package/dist/declarations/src/types/balancetypes.d.ts +8 -18
- package/dist/declarations/src/types/minimetadatas.d.ts +6 -24
- package/dist/declarations/src/types/tokens.d.ts +11 -0
- package/dist/talismn-balances.cjs.dev.js +1415 -2090
- package/dist/talismn-balances.cjs.prod.js +1415 -2090
- package/dist/talismn-balances.esm.js +1417 -2086
- package/package.json +10 -9
- package/dist/declarations/src/EvmTokenFetcher.d.ts +0 -11
- package/dist/declarations/src/MiniMetadataUpdater.d.ts +0 -43
- package/dist/declarations/src/modules/SubstrateEquilibriumModule.d.ts +0 -39
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeCrowdloans.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/util/crowdloanFundContributionsChildKey.d.ts +0 -4
- package/dist/declarations/src/modules/SubstrateNativeModule/util/detectMiniMetadataChanges.d.ts +0 -2
- package/dist/declarations/src/modules/util/findChainMeta.d.ts +0 -8
- package/dist/declarations/src/util/hydrateChaindata.d.ts +0 -8
- package/dist/declarations/src/util/index.d.ts +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { NetworkList, 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,8 +19,7 @@ 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
|
-
|
23
|
-
evmNetworks: SimpleEvmNetworkList;
|
22
|
+
networks: NetworkList;
|
24
23
|
tokens: TokenList;
|
25
24
|
tokenRates: TokenRatesList;
|
26
25
|
}>;
|
@@ -125,95 +124,245 @@ export declare class Balance {
|
|
125
124
|
isSource: (source: BalanceSource) => boolean;
|
126
125
|
hydrate: (hydrate?: HydrateDb) => void;
|
127
126
|
get id(): string;
|
128
|
-
get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-
|
127
|
+
get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
|
129
128
|
get status(): import("./balancetypes").BalanceStatus;
|
130
129
|
get address(): string;
|
131
|
-
get
|
132
|
-
get
|
133
|
-
|
134
|
-
|
130
|
+
get networkId(): string;
|
131
|
+
get network(): {
|
132
|
+
id: string;
|
133
|
+
name: string;
|
134
|
+
nativeTokenId: string;
|
135
|
+
nativeCurrency: {
|
136
|
+
decimals: number;
|
137
|
+
symbol: string;
|
138
|
+
name: string;
|
139
|
+
coingeckoId?: string | undefined;
|
140
|
+
mirrorOf?: string | undefined;
|
141
|
+
logo?: string | undefined;
|
142
|
+
};
|
143
|
+
blockExplorerUrls: string[];
|
144
|
+
genesisHash: `0x${string}`;
|
145
|
+
platform: "polkadot";
|
146
|
+
chainName: string;
|
147
|
+
specName: string;
|
148
|
+
specVersion: number;
|
149
|
+
account: "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;
|
135
221
|
get tokenId(): string;
|
136
|
-
get token():
|
222
|
+
get token(): {
|
223
|
+
id: string;
|
224
|
+
networkId: string;
|
225
|
+
decimals: number;
|
226
|
+
symbol: string;
|
137
227
|
type: "evm-erc20";
|
138
|
-
|
139
|
-
contractAddress: string
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
228
|
+
platform: "ethereum";
|
229
|
+
contractAddress: `0x${string}`;
|
230
|
+
isDefault?: boolean | undefined;
|
231
|
+
name?: string | undefined;
|
232
|
+
logo?: string | undefined;
|
233
|
+
coingeckoId?: string | undefined;
|
234
|
+
noDiscovery?: boolean | undefined;
|
235
|
+
mirrorOf?: string | undefined;
|
236
|
+
isCustom?: boolean | undefined;
|
237
|
+
} | {
|
238
|
+
id: string;
|
239
|
+
networkId: string;
|
240
|
+
decimals: number;
|
241
|
+
symbol: string;
|
146
242
|
type: "evm-native";
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
243
|
+
platform: "ethereum";
|
244
|
+
isDefault?: boolean | undefined;
|
245
|
+
name?: string | undefined;
|
246
|
+
logo?: string | undefined;
|
247
|
+
coingeckoId?: string | undefined;
|
248
|
+
noDiscovery?: boolean | undefined;
|
249
|
+
mirrorOf?: string | undefined;
|
250
|
+
} | {
|
251
|
+
id: string;
|
252
|
+
networkId: string;
|
253
|
+
decimals: number;
|
254
|
+
symbol: string;
|
153
255
|
type: "evm-uniswapv2";
|
154
|
-
|
155
|
-
contractAddress: string
|
256
|
+
platform: "ethereum";
|
257
|
+
contractAddress: `0x${string}`;
|
156
258
|
symbol0: string;
|
157
259
|
symbol1: string;
|
158
260
|
decimals0: number;
|
159
261
|
decimals1: number;
|
160
|
-
tokenAddress0: string
|
161
|
-
tokenAddress1: string
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
262
|
+
tokenAddress0: `0x${string}`;
|
263
|
+
tokenAddress1: `0x${string}`;
|
264
|
+
isDefault?: boolean | undefined;
|
265
|
+
name?: string | undefined;
|
266
|
+
logo?: string | undefined;
|
267
|
+
coingeckoId?: string | undefined;
|
268
|
+
noDiscovery?: boolean | undefined;
|
269
|
+
mirrorOf?: string | undefined;
|
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;
|
168
278
|
type: "substrate-assets";
|
169
|
-
|
170
|
-
existentialDeposit: string;
|
279
|
+
platform: "polkadot";
|
171
280
|
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
|
-
} & {
|
179
281
|
existentialDeposit: string;
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
282
|
+
isDefault?: boolean | undefined;
|
283
|
+
name?: string | undefined;
|
284
|
+
logo?: string | undefined;
|
285
|
+
coingeckoId?: string | undefined;
|
286
|
+
noDiscovery?: boolean | undefined;
|
287
|
+
mirrorOf?: string | undefined;
|
288
|
+
isFrozen?: boolean | undefined;
|
289
|
+
} | {
|
290
|
+
id: string;
|
291
|
+
networkId: string;
|
292
|
+
decimals: number;
|
293
|
+
symbol: string;
|
185
294
|
type: "substrate-foreignassets";
|
186
|
-
|
187
|
-
existentialDeposit: string;
|
295
|
+
platform: "polkadot";
|
188
296
|
onChainId: string;
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
297
|
+
existentialDeposit: string;
|
298
|
+
isDefault?: boolean | undefined;
|
299
|
+
name?: string | undefined;
|
300
|
+
logo?: string | undefined;
|
301
|
+
coingeckoId?: string | undefined;
|
302
|
+
noDiscovery?: boolean | undefined;
|
303
|
+
mirrorOf?: string | undefined;
|
304
|
+
isFrozen?: boolean | undefined;
|
305
|
+
} | {
|
306
|
+
id: string;
|
307
|
+
networkId: string;
|
308
|
+
decimals: number;
|
309
|
+
symbol: string;
|
194
310
|
type: "substrate-native";
|
195
|
-
|
311
|
+
platform: "polkadot";
|
196
312
|
existentialDeposit: string;
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
313
|
+
isDefault?: boolean | undefined;
|
314
|
+
name?: string | undefined;
|
315
|
+
logo?: string | undefined;
|
316
|
+
coingeckoId?: string | undefined;
|
317
|
+
noDiscovery?: boolean | undefined;
|
318
|
+
mirrorOf?: string | undefined;
|
319
|
+
} | {
|
320
|
+
id: string;
|
321
|
+
networkId: string;
|
322
|
+
decimals: number;
|
323
|
+
symbol: string;
|
201
324
|
type: "substrate-psp22";
|
202
|
-
|
203
|
-
existentialDeposit: string;
|
325
|
+
platform: "polkadot";
|
204
326
|
contractAddress: string;
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
327
|
+
isDefault?: boolean | undefined;
|
328
|
+
name?: string | undefined;
|
329
|
+
logo?: string | undefined;
|
330
|
+
coingeckoId?: string | undefined;
|
331
|
+
noDiscovery?: boolean | undefined;
|
332
|
+
mirrorOf?: string | undefined;
|
333
|
+
} | {
|
334
|
+
id: string;
|
335
|
+
networkId: string;
|
336
|
+
decimals: number;
|
337
|
+
symbol: string;
|
209
338
|
type: "substrate-tokens";
|
210
|
-
|
211
|
-
existentialDeposit: string;
|
339
|
+
platform: "polkadot";
|
212
340
|
onChainId: string | number;
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
341
|
+
existentialDeposit: string;
|
342
|
+
isDefault?: boolean | undefined;
|
343
|
+
name?: string | undefined;
|
344
|
+
logo?: string | undefined;
|
345
|
+
coingeckoId?: string | undefined;
|
346
|
+
noDiscovery?: boolean | undefined;
|
347
|
+
mirrorOf?: string | undefined;
|
348
|
+
} | {
|
349
|
+
id: string;
|
350
|
+
networkId: string;
|
351
|
+
decimals: number;
|
352
|
+
symbol: string;
|
353
|
+
type: "substrate-hydration";
|
354
|
+
platform: "polkadot";
|
355
|
+
onChainId: number;
|
356
|
+
assetType: "Token" | "Erc20";
|
357
|
+
isSufficient: boolean;
|
358
|
+
existentialDeposit: string;
|
359
|
+
isDefault?: boolean | undefined;
|
360
|
+
name?: string | undefined;
|
361
|
+
logo?: string | undefined;
|
362
|
+
coingeckoId?: string | undefined;
|
363
|
+
noDiscovery?: boolean | undefined;
|
364
|
+
mirrorOf?: string | undefined;
|
365
|
+
} | null;
|
217
366
|
get decimals(): number | null;
|
218
367
|
get rates(): TokenRates | null;
|
219
368
|
/**
|
@@ -248,7 +397,6 @@ export declare class Balance {
|
|
248
397
|
/** The frozen balance of this token. Is included in the free amount. */
|
249
398
|
get locked(): BalanceFormatter;
|
250
399
|
get locks(): FormattedAmount<AmountWithLabel<string>, string>[];
|
251
|
-
get crowdloans(): FormattedAmount<AmountWithLabel<string>, string>[];
|
252
400
|
get nompools(): FormattedAmount<AmountWithLabel<string>, string>[];
|
253
401
|
get subtensor(): FormattedAmount<AmountWithLabel<string>, string>[];
|
254
402
|
/** The extra balance of this token */
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PluginBalanceTypes } from "@talismn/balances/plugins";
|
2
|
-
import {
|
2
|
+
import { NetworkId, 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,17 +34,7 @@ type IBalanceBase = {
|
|
34
34
|
address: Address;
|
35
35
|
/** The token this balance is for */
|
36
36
|
tokenId: TokenId;
|
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;
|
37
|
+
networkId: NetworkId;
|
48
38
|
};
|
49
39
|
type IBalanceSimpleValues = {
|
50
40
|
/** For balance types with a simple value, this is the value of the balance (eg, evm native token balance) */
|
@@ -57,19 +47,19 @@ type IBalanceComplexValues = {
|
|
57
47
|
value?: undefined;
|
58
48
|
};
|
59
49
|
/** `IBalance` is a common interface which all balance types must implement. */
|
60
|
-
export type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues)
|
61
|
-
export type EvmBalance = IBalanceBase &
|
62
|
-
export type SubstrateBalance = IBalanceBase &
|
50
|
+
export type IBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
51
|
+
export type EvmBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
52
|
+
export type SubstrateBalance = IBalanceBase & (IBalanceSimpleValues | IBalanceComplexValues);
|
63
53
|
/** An unlabelled amount of a balance */
|
64
54
|
export type Amount = string;
|
65
|
-
export type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "
|
55
|
+
export type BalanceStatusTypes = "free" | "reserved" | "locked" | "extra" | "nompool" | "subtensor";
|
66
56
|
/** A labelled amount of a balance */
|
67
57
|
type BaseAmountWithLabel<TLabel extends string> = {
|
68
58
|
type: BalanceStatusTypes;
|
69
59
|
/**
|
70
60
|
* For modules which fetch balances via module sources, the source is equivalent to previous 'subSource' field
|
71
61
|
* on the parent balance object
|
72
|
-
* e.g. `staking`
|
62
|
+
* e.g. `staking`
|
73
63
|
**/
|
74
64
|
source?: string;
|
75
65
|
label: TLabel;
|
@@ -101,7 +91,7 @@ export type ExtraAmount<TLabel extends string> = BaseAmountWithLabel<TLabel> & {
|
|
101
91
|
includeInTotal?: boolean;
|
102
92
|
};
|
103
93
|
/** Used by plugins to help define their custom `BalanceType` */
|
104
|
-
export type NewBalanceType<TModuleType extends string, TBalanceValueType extends "simple" | "complex"
|
94
|
+
export type NewBalanceType<TModuleType extends string, TBalanceValueType extends "simple" | "complex"> = IBalanceBase & (TBalanceValueType extends "simple" ? IBalanceSimpleValues : IBalanceComplexValues) & {
|
105
95
|
source: TModuleType;
|
106
96
|
};
|
107
97
|
export {};
|
@@ -1,6 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { AnyMiniMetadataSchema } from "@talismn/chaindata-provider";
|
2
|
+
import z from "zod/v4";
|
3
|
+
import { AnyNewBalanceModule, InferChainMeta } from "../modules";
|
2
4
|
/** For fast db access, you can calculate the primary key for a miniMetadata using this method */
|
3
|
-
export declare const deriveMiniMetadataId: ({ source, chainId,
|
5
|
+
export declare const deriveMiniMetadataId: ({ source, chainId, specVersion, libVersion, }: Pick<MiniMetadata, "source" | "chainId" | "specVersion" | "libVersion">) => string;
|
4
6
|
export type MiniMetadataStatus =
|
5
7
|
/** Metadata is up to date */
|
6
8
|
"good"
|
@@ -8,26 +10,6 @@ export type MiniMetadataStatus =
|
|
8
10
|
| "outdated"
|
9
11
|
/** Metadata doesn't exist */
|
10
12
|
| "none";
|
11
|
-
export type MiniMetadata = {
|
12
|
-
|
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;
|
13
|
+
export type MiniMetadata<M extends AnyNewBalanceModule = AnyNewBalanceModule> = Omit<z.infer<typeof AnyMiniMetadataSchema>, "extra"> & {
|
14
|
+
extra: InferChainMeta<M>["extra"];
|
33
15
|
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare const TokenConfigBaseSchema: import("zod/v4").ZodObject<{
|
2
|
+
symbol: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
3
|
+
networkId: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
4
|
+
isDefault: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>>;
|
5
|
+
decimals: import("zod/v4").ZodOptional<import("zod/v4").ZodInt>;
|
6
|
+
name: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodString>>;
|
7
|
+
logo: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodString>>;
|
8
|
+
coingeckoId: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodString>>;
|
9
|
+
noDiscovery: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>>;
|
10
|
+
mirrorOf: import("zod/v4").ZodOptional<import("zod/v4").ZodOptional<import("zod/v4").ZodString>>;
|
11
|
+
}, import("zod/v4/core").$strict>;
|