@talismn/balances 0.0.0-pr2043-20250617025844 → 0.0.0-pr2043-20250617100349
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/modules/SubstrateNativeModule/util/balanceLockTypes.d.ts +4 -2
- package/dist/declarations/src/modules/index.d.ts +207 -1
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +1 -1
- package/dist/declarations/src/types/balances.d.ts +217 -5
- package/dist/talismn-balances.cjs.dev.js +12 -14
- package/dist/talismn-balances.cjs.prod.js +12 -14
- package/dist/talismn-balances.esm.js +13 -15
- package/package.json +8 -8
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BalanceFormatter, LockedAmount } from "../../../types";
|
1
|
+
import { Balance, BalanceFormatter, LockedAmount } from "../../../types";
|
2
2
|
export type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "subtensor-staking" | "vesting" | "dapp-staking" | `other-${string}` | "other";
|
3
3
|
/**
|
4
4
|
* For converting the value of `lock?.id?.toUtf8?.()` which is retrieved from
|
@@ -10,4 +10,6 @@ export declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "
|
|
10
10
|
}>) => (Omit<LockedAmount<string>, "amount"> & {
|
11
11
|
amount: BalanceFormatter;
|
12
12
|
})[];
|
13
|
-
export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta"
|
13
|
+
export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
|
14
|
+
balance?: Balance;
|
15
|
+
}) => string;
|
@@ -1,4 +1,210 @@
|
|
1
|
-
export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20",
|
1
|
+
export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20", {
|
2
|
+
id: string;
|
3
|
+
decimals: number;
|
4
|
+
symbol: string;
|
5
|
+
name: string;
|
6
|
+
networkId: string;
|
7
|
+
type: "evm-erc20";
|
8
|
+
platform: "ethereum";
|
9
|
+
contractAddress: `0x${string}`;
|
10
|
+
isTestnet?: boolean | undefined;
|
11
|
+
isDefault?: boolean | undefined;
|
12
|
+
logo?: string | undefined;
|
13
|
+
coingeckoId?: string | undefined;
|
14
|
+
noDiscovery?: boolean | undefined;
|
15
|
+
mirrorOf?: string | undefined;
|
16
|
+
isCustom?: boolean | undefined;
|
17
|
+
} | {
|
18
|
+
id: string;
|
19
|
+
decimals: number;
|
20
|
+
symbol: string;
|
21
|
+
name: string;
|
22
|
+
networkId: string;
|
23
|
+
type: "evm-erc20";
|
24
|
+
platform: "ethereum";
|
25
|
+
contractAddress: `0x${string}`;
|
26
|
+
isCustom: true;
|
27
|
+
isTestnet?: boolean | undefined;
|
28
|
+
isDefault?: boolean | undefined;
|
29
|
+
logo?: string | undefined;
|
30
|
+
coingeckoId?: string | undefined;
|
31
|
+
noDiscovery?: boolean | undefined;
|
32
|
+
mirrorOf?: string | undefined;
|
33
|
+
}, undefined, import("./EvmErc20Module").EvmErc20ModuleConfig> | import("..").NewBalanceModule<"evm-native", {
|
34
|
+
id: string;
|
35
|
+
decimals: number;
|
36
|
+
symbol: string;
|
37
|
+
name: string;
|
38
|
+
networkId: string;
|
39
|
+
type: "evm-native";
|
40
|
+
platform: "ethereum";
|
41
|
+
isTestnet?: boolean | undefined;
|
42
|
+
isDefault?: boolean | undefined;
|
43
|
+
logo?: string | undefined;
|
44
|
+
coingeckoId?: string | undefined;
|
45
|
+
noDiscovery?: boolean | undefined;
|
46
|
+
mirrorOf?: string | undefined;
|
47
|
+
} | {
|
48
|
+
id: string;
|
49
|
+
decimals: number;
|
50
|
+
symbol: string;
|
51
|
+
name: string;
|
52
|
+
networkId: string;
|
53
|
+
type: "evm-native";
|
54
|
+
platform: "ethereum";
|
55
|
+
isCustom: true;
|
56
|
+
isTestnet?: boolean | undefined;
|
57
|
+
isDefault?: boolean | undefined;
|
58
|
+
logo?: string | undefined;
|
59
|
+
coingeckoId?: string | undefined;
|
60
|
+
noDiscovery?: boolean | undefined;
|
61
|
+
mirrorOf?: string | undefined;
|
62
|
+
}, undefined, import("@talismn/chaindata-provider").BalancesConfigTokenParams> | import("..").NewBalanceModule<"evm-uniswapv2", {
|
63
|
+
id: string;
|
64
|
+
decimals: number;
|
65
|
+
symbol: string;
|
66
|
+
name: string;
|
67
|
+
networkId: string;
|
68
|
+
platform: "ethereum";
|
69
|
+
contractAddress: `0x${string}`;
|
70
|
+
type: "evm-uniswapv2";
|
71
|
+
symbol0: string;
|
72
|
+
symbol1: string;
|
73
|
+
decimals0: number;
|
74
|
+
decimals1: number;
|
75
|
+
tokenAddress0: `0x${string}`;
|
76
|
+
tokenAddress1: `0x${string}`;
|
77
|
+
isTestnet?: boolean | undefined;
|
78
|
+
isDefault?: boolean | undefined;
|
79
|
+
logo?: string | undefined;
|
80
|
+
coingeckoId?: string | undefined;
|
81
|
+
noDiscovery?: boolean | undefined;
|
82
|
+
mirrorOf?: string | undefined;
|
83
|
+
isCustom?: boolean | undefined;
|
84
|
+
coingeckoId0?: string | undefined;
|
85
|
+
coingeckoId1?: string | undefined;
|
86
|
+
} | {
|
87
|
+
id: string;
|
88
|
+
decimals: number;
|
89
|
+
symbol: string;
|
90
|
+
name: string;
|
91
|
+
networkId: string;
|
92
|
+
platform: "ethereum";
|
93
|
+
contractAddress: `0x${string}`;
|
94
|
+
type: "evm-uniswapv2";
|
95
|
+
symbol0: string;
|
96
|
+
symbol1: string;
|
97
|
+
decimals0: number;
|
98
|
+
decimals1: number;
|
99
|
+
tokenAddress0: `0x${string}`;
|
100
|
+
tokenAddress1: `0x${string}`;
|
101
|
+
isCustom: true;
|
102
|
+
isTestnet?: boolean | undefined;
|
103
|
+
isDefault?: boolean | undefined;
|
104
|
+
logo?: string | undefined;
|
105
|
+
coingeckoId?: string | undefined;
|
106
|
+
noDiscovery?: boolean | undefined;
|
107
|
+
mirrorOf?: string | undefined;
|
108
|
+
coingeckoId0?: string | undefined;
|
109
|
+
coingeckoId1?: string | undefined;
|
110
|
+
}, undefined, import("./EvmUniswapV2Module").EvmUniswapV2ModuleConfig> | import("..").NewBalanceModule<"substrate-assets", {
|
111
|
+
id: string;
|
112
|
+
decimals: number;
|
113
|
+
symbol: string;
|
114
|
+
name: string;
|
115
|
+
networkId: string;
|
116
|
+
type: "substrate-assets";
|
117
|
+
platform: "polkadot";
|
118
|
+
assetId: string;
|
119
|
+
existentialDeposit: string;
|
120
|
+
isTestnet?: boolean | undefined;
|
121
|
+
isDefault?: boolean | undefined;
|
122
|
+
logo?: string | undefined;
|
123
|
+
coingeckoId?: string | undefined;
|
124
|
+
noDiscovery?: boolean | undefined;
|
125
|
+
mirrorOf?: string | undefined;
|
126
|
+
isFrozen?: boolean | undefined;
|
127
|
+
}, import("./SubstrateAssetsModule").SubAssetsChainMeta, import("./SubstrateAssetsModule").SubAssetsModuleConfig, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-foreignassets", {
|
128
|
+
id: string;
|
129
|
+
decimals: number;
|
130
|
+
symbol: string;
|
131
|
+
name: string;
|
132
|
+
networkId: string;
|
133
|
+
type: "substrate-foreignassets";
|
134
|
+
platform: "polkadot";
|
135
|
+
onChainId: string;
|
136
|
+
existentialDeposit: string;
|
137
|
+
isTestnet?: boolean | undefined;
|
138
|
+
isDefault?: boolean | undefined;
|
139
|
+
logo?: string | undefined;
|
140
|
+
coingeckoId?: string | undefined;
|
141
|
+
noDiscovery?: boolean | undefined;
|
142
|
+
mirrorOf?: string | undefined;
|
143
|
+
isFrozen?: boolean | undefined;
|
144
|
+
}, import("./SubstrateForeignAssetsModule").SubForeignAssetsChainMeta, import("./SubstrateForeignAssetsModule").SubForeignAssetsModuleConfig, import("./SubstrateForeignAssetsModule").SubForeignAssetsTransferParams> | import("..").NewBalanceModule<"substrate-native", {
|
145
|
+
id: string;
|
146
|
+
decimals: number;
|
147
|
+
symbol: string;
|
148
|
+
name: string;
|
149
|
+
networkId: string;
|
150
|
+
type: "substrate-native";
|
151
|
+
platform: "polkadot";
|
152
|
+
existentialDeposit: string;
|
153
|
+
isTestnet?: boolean | undefined;
|
154
|
+
isDefault?: boolean | undefined;
|
155
|
+
logo?: string | undefined;
|
156
|
+
coingeckoId?: string | undefined;
|
157
|
+
noDiscovery?: boolean | undefined;
|
158
|
+
mirrorOf?: string | undefined;
|
159
|
+
} | {
|
160
|
+
id: string;
|
161
|
+
decimals: number;
|
162
|
+
symbol: string;
|
163
|
+
name: string;
|
164
|
+
networkId: string;
|
165
|
+
type: "substrate-native";
|
166
|
+
platform: "polkadot";
|
167
|
+
existentialDeposit: string;
|
168
|
+
isCustom: true;
|
169
|
+
isTestnet?: boolean | undefined;
|
170
|
+
isDefault?: boolean | undefined;
|
171
|
+
logo?: string | undefined;
|
172
|
+
coingeckoId?: string | undefined;
|
173
|
+
noDiscovery?: boolean | undefined;
|
174
|
+
mirrorOf?: string | undefined;
|
175
|
+
}, import("./SubstrateNativeModule").SubNativeChainMeta, import("./SubstrateNativeModule").SubNativeModuleConfig, import("./SubstrateNativeModule").SubNativeTransferParams> | import("..").NewBalanceModule<"substrate-psp22", {
|
176
|
+
id: string;
|
177
|
+
decimals: number;
|
178
|
+
symbol: string;
|
179
|
+
name: string;
|
180
|
+
networkId: string;
|
181
|
+
type: "substrate-psp22";
|
182
|
+
platform: "polkadot";
|
183
|
+
existentialDeposit: string;
|
184
|
+
contractAddress: string;
|
185
|
+
isTestnet?: boolean | undefined;
|
186
|
+
isDefault?: boolean | undefined;
|
187
|
+
logo?: string | undefined;
|
188
|
+
coingeckoId?: string | undefined;
|
189
|
+
noDiscovery?: boolean | undefined;
|
190
|
+
mirrorOf?: string | undefined;
|
191
|
+
}, undefined, import("./SubstratePsp22Module").SubPsp22ModuleConfig, import("./SubstratePsp22Module").SubPsp22TransferParams> | import("..").NewBalanceModule<"substrate-tokens", {
|
192
|
+
id: string;
|
193
|
+
decimals: number;
|
194
|
+
symbol: string;
|
195
|
+
name: string;
|
196
|
+
networkId: string;
|
197
|
+
type: "substrate-tokens";
|
198
|
+
platform: "polkadot";
|
199
|
+
onChainId: string | number;
|
200
|
+
existentialDeposit: string;
|
201
|
+
isTestnet?: boolean | undefined;
|
202
|
+
isDefault?: boolean | undefined;
|
203
|
+
logo?: string | undefined;
|
204
|
+
coingeckoId?: string | undefined;
|
205
|
+
noDiscovery?: boolean | undefined;
|
206
|
+
mirrorOf?: string | undefined;
|
207
|
+
}, import("./SubstrateTokensModule").SubTokensChainMeta, import("./SubstrateTokensModule").SubTokensModuleConfig, import("./SubstrateTokensModule").SubTokensTransferParams>)[];
|
2
208
|
export * from "./EvmErc20Module";
|
3
209
|
export * from "./EvmNativeModule";
|
4
210
|
export * from "./EvmUniswapV2Module";
|
@@ -17,7 +17,7 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
|
|
17
17
|
miniMetadatas: Map<string, MiniMetadata>;
|
18
18
|
moduleType: InferModuleType<TBalanceModule>;
|
19
19
|
coders: TCoders;
|
20
|
-
}) => Map<
|
20
|
+
}) => Map<string, { [Property in keyof TCoders]: {
|
21
21
|
args: [import("scale-ts").Encoder<any[]>, import("scale-ts").Decoder<any[]>] & {
|
22
22
|
enc: import("scale-ts").Encoder<any[]>;
|
23
23
|
dec: import("scale-ts").Decoder<any[]>;
|
@@ -127,11 +127,223 @@ export declare class Balance {
|
|
127
127
|
get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
|
128
128
|
get status(): import("./balancetypes").BalanceStatus;
|
129
129
|
get address(): string;
|
130
|
-
get networkId():
|
131
|
-
get network():
|
132
|
-
|
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: "*25519" | "secp256k1";
|
150
|
+
prefix: number;
|
151
|
+
rpcs: string[];
|
152
|
+
topologyInfo: {
|
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
|
+
isRelay?: boolean | undefined;
|
167
|
+
chainspecQrUrl?: string | undefined;
|
168
|
+
latestMetadataQrUrl?: string | undefined;
|
169
|
+
overrideNativeTokenId?: string | undefined;
|
170
|
+
oldPrefix?: number | undefined;
|
171
|
+
relayId?: string | undefined;
|
172
|
+
paraId?: number | undefined;
|
173
|
+
registryTypes?: any;
|
174
|
+
signedExtensions?: any;
|
175
|
+
hasCheckMetadataHash?: boolean | undefined;
|
176
|
+
hasExtrinsicSignatureTypePrefix?: boolean | undefined;
|
177
|
+
isUnknownFeeToken?: boolean | undefined;
|
178
|
+
} | {
|
179
|
+
id: string;
|
180
|
+
name: string;
|
181
|
+
nativeTokenId: string;
|
182
|
+
nativeCurrency: {
|
183
|
+
decimals: number;
|
184
|
+
symbol: string;
|
185
|
+
name: string;
|
186
|
+
coingeckoId?: string | undefined;
|
187
|
+
mirrorOf?: string | undefined;
|
188
|
+
logo?: string | undefined;
|
189
|
+
};
|
190
|
+
blockExplorerUrls: string[];
|
191
|
+
platform: "ethereum";
|
192
|
+
rpcs: string[];
|
193
|
+
isTestnet?: boolean | undefined;
|
194
|
+
isDefault?: boolean | undefined;
|
195
|
+
forceScan?: boolean | undefined;
|
196
|
+
logo?: string | undefined;
|
197
|
+
themeColor?: string | undefined;
|
198
|
+
substrateChainId?: string | undefined;
|
199
|
+
preserveGasEstimate?: boolean | undefined;
|
200
|
+
feeType?: "eip-1559" | "legacy" | undefined;
|
201
|
+
l2FeeType?: {
|
202
|
+
type: "op-stack";
|
203
|
+
} | {
|
204
|
+
type: "scroll";
|
205
|
+
l1GasPriceOracle: `0x${string}`;
|
206
|
+
} | undefined;
|
207
|
+
contracts?: Partial<Record<"Erc20Aggregator" | "Multicall3", `0x${string}`>> | undefined;
|
208
|
+
} | null;
|
209
|
+
get tokenId(): string;
|
210
|
+
get token(): {
|
211
|
+
id: string;
|
212
|
+
decimals: number;
|
213
|
+
symbol: string;
|
214
|
+
name: string;
|
215
|
+
networkId: string;
|
216
|
+
type: "evm-erc20";
|
217
|
+
platform: "ethereum";
|
218
|
+
contractAddress: `0x${string}`;
|
219
|
+
isTestnet?: boolean | undefined;
|
220
|
+
isDefault?: boolean | undefined;
|
221
|
+
logo?: string | undefined;
|
222
|
+
coingeckoId?: string | undefined;
|
223
|
+
noDiscovery?: boolean | undefined;
|
224
|
+
mirrorOf?: string | undefined;
|
225
|
+
isCustom?: boolean | undefined;
|
226
|
+
} | {
|
227
|
+
id: string;
|
228
|
+
decimals: number;
|
229
|
+
symbol: string;
|
230
|
+
name: string;
|
231
|
+
networkId: string;
|
232
|
+
type: "evm-native";
|
233
|
+
platform: "ethereum";
|
234
|
+
isTestnet?: boolean | undefined;
|
235
|
+
isDefault?: boolean | undefined;
|
236
|
+
logo?: string | undefined;
|
237
|
+
coingeckoId?: string | undefined;
|
238
|
+
noDiscovery?: boolean | undefined;
|
239
|
+
mirrorOf?: string | undefined;
|
240
|
+
} | {
|
241
|
+
id: string;
|
242
|
+
decimals: number;
|
243
|
+
symbol: string;
|
244
|
+
name: string;
|
245
|
+
networkId: string;
|
246
|
+
platform: "ethereum";
|
247
|
+
contractAddress: `0x${string}`;
|
248
|
+
type: "evm-uniswapv2";
|
249
|
+
symbol0: string;
|
250
|
+
symbol1: string;
|
251
|
+
decimals0: number;
|
252
|
+
decimals1: number;
|
253
|
+
tokenAddress0: `0x${string}`;
|
254
|
+
tokenAddress1: `0x${string}`;
|
255
|
+
isTestnet?: boolean | undefined;
|
256
|
+
isDefault?: boolean | undefined;
|
257
|
+
logo?: string | undefined;
|
258
|
+
coingeckoId?: string | undefined;
|
259
|
+
noDiscovery?: boolean | undefined;
|
260
|
+
mirrorOf?: string | undefined;
|
261
|
+
isCustom?: boolean | undefined;
|
262
|
+
coingeckoId0?: string | undefined;
|
263
|
+
coingeckoId1?: string | undefined;
|
264
|
+
} | {
|
265
|
+
id: string;
|
266
|
+
decimals: number;
|
267
|
+
symbol: string;
|
268
|
+
name: string;
|
269
|
+
networkId: string;
|
270
|
+
type: "substrate-assets";
|
271
|
+
platform: "polkadot";
|
272
|
+
assetId: string;
|
273
|
+
existentialDeposit: string;
|
274
|
+
isTestnet?: boolean | undefined;
|
275
|
+
isDefault?: boolean | undefined;
|
276
|
+
logo?: string | undefined;
|
277
|
+
coingeckoId?: string | undefined;
|
278
|
+
noDiscovery?: boolean | undefined;
|
279
|
+
mirrorOf?: string | undefined;
|
280
|
+
isFrozen?: boolean | undefined;
|
281
|
+
} | {
|
282
|
+
id: string;
|
283
|
+
decimals: number;
|
284
|
+
symbol: string;
|
285
|
+
name: string;
|
286
|
+
networkId: string;
|
287
|
+
type: "substrate-foreignassets";
|
288
|
+
platform: "polkadot";
|
289
|
+
onChainId: string;
|
290
|
+
existentialDeposit: string;
|
291
|
+
isTestnet?: boolean | undefined;
|
292
|
+
isDefault?: boolean | undefined;
|
293
|
+
logo?: string | undefined;
|
294
|
+
coingeckoId?: string | undefined;
|
295
|
+
noDiscovery?: boolean | undefined;
|
296
|
+
mirrorOf?: string | undefined;
|
297
|
+
isFrozen?: boolean | undefined;
|
298
|
+
} | {
|
299
|
+
id: string;
|
300
|
+
decimals: number;
|
301
|
+
symbol: string;
|
302
|
+
name: string;
|
303
|
+
networkId: string;
|
304
|
+
type: "substrate-native";
|
305
|
+
platform: "polkadot";
|
306
|
+
existentialDeposit: string;
|
307
|
+
isTestnet?: boolean | undefined;
|
308
|
+
isDefault?: boolean | undefined;
|
309
|
+
logo?: string | undefined;
|
310
|
+
coingeckoId?: string | undefined;
|
311
|
+
noDiscovery?: boolean | undefined;
|
312
|
+
mirrorOf?: string | undefined;
|
313
|
+
} | {
|
314
|
+
id: string;
|
315
|
+
decimals: number;
|
316
|
+
symbol: string;
|
317
|
+
name: string;
|
318
|
+
networkId: string;
|
319
|
+
type: "substrate-psp22";
|
320
|
+
platform: "polkadot";
|
321
|
+
existentialDeposit: string;
|
322
|
+
contractAddress: string;
|
323
|
+
isTestnet?: boolean | undefined;
|
324
|
+
isDefault?: boolean | undefined;
|
325
|
+
logo?: string | undefined;
|
326
|
+
coingeckoId?: string | undefined;
|
327
|
+
noDiscovery?: boolean | undefined;
|
328
|
+
mirrorOf?: string | undefined;
|
329
|
+
} | {
|
330
|
+
id: string;
|
331
|
+
decimals: number;
|
332
|
+
symbol: string;
|
333
|
+
name: string;
|
334
|
+
networkId: string;
|
335
|
+
type: "substrate-tokens";
|
336
|
+
platform: "polkadot";
|
337
|
+
onChainId: string | number;
|
338
|
+
existentialDeposit: string;
|
339
|
+
isTestnet?: boolean | undefined;
|
340
|
+
isDefault?: boolean | undefined;
|
341
|
+
logo?: string | undefined;
|
342
|
+
coingeckoId?: string | undefined;
|
343
|
+
noDiscovery?: boolean | undefined;
|
344
|
+
mirrorOf?: string | undefined;
|
345
|
+
} | null;
|
346
|
+
get decimals(): number | null;
|
135
347
|
get rates(): TokenRates | null;
|
136
348
|
/**
|
137
349
|
* A general method to get formatted values matching a certain type from this balance.
|
@@ -121,7 +121,7 @@ class EvmTokenFetcher {
|
|
121
121
|
|
122
122
|
var packageJson = {
|
123
123
|
name: "@talismn/balances",
|
124
|
-
version: "0.0.0-pr2043-
|
124
|
+
version: "0.0.0-pr2043-20250617100349"};
|
125
125
|
|
126
126
|
const libVersion = packageJson.version;
|
127
127
|
|
@@ -1613,12 +1613,11 @@ const EvmErc20Module = hydrate => {
|
|
1613
1613
|
id,
|
1614
1614
|
type: "evm-erc20",
|
1615
1615
|
platform: "ethereum",
|
1616
|
-
//isTestnet,
|
1617
1616
|
isDefault: tokenConfig.isDefault ?? true,
|
1618
1617
|
symbol,
|
1619
1618
|
decimals,
|
1620
1619
|
name: contractName ?? symbol,
|
1621
|
-
logo: tokenConfig?.logo
|
1620
|
+
logo: tokenConfig?.logo,
|
1622
1621
|
contractAddress,
|
1623
1622
|
networkId: chainId
|
1624
1623
|
};
|
@@ -1926,7 +1925,7 @@ const EvmNativeModule = hydrate => {
|
|
1926
1925
|
symbol,
|
1927
1926
|
decimals,
|
1928
1927
|
name,
|
1929
|
-
logo: moduleConfig?.logo
|
1928
|
+
logo: moduleConfig?.logo,
|
1930
1929
|
networkId
|
1931
1930
|
};
|
1932
1931
|
if (moduleConfig?.symbol) nativeToken.symbol = moduleConfig?.symbol;
|
@@ -3279,7 +3278,7 @@ const SubAssetsModule = hydrate => {
|
|
3279
3278
|
symbol,
|
3280
3279
|
name: tokenConfig?.name || symbol,
|
3281
3280
|
decimals,
|
3282
|
-
logo: tokenConfig?.logo
|
3281
|
+
logo: tokenConfig?.logo,
|
3283
3282
|
existentialDeposit,
|
3284
3283
|
assetId,
|
3285
3284
|
isFrozen,
|
@@ -3556,7 +3555,7 @@ const SubForeignAssetsModule = hydrate => {
|
|
3556
3555
|
symbol,
|
3557
3556
|
decimals,
|
3558
3557
|
name: tokenConfig?.name || symbol,
|
3559
|
-
logo: tokenConfig?.logo
|
3558
|
+
logo: tokenConfig?.logo,
|
3560
3559
|
existentialDeposit,
|
3561
3560
|
onChainId: tokenConfig.onChainId,
|
3562
3561
|
isFrozen,
|
@@ -4615,17 +4614,16 @@ const filterBaseLocks = locks => {
|
|
4615
4614
|
};
|
4616
4615
|
|
4617
4616
|
// TODO: Make these titles translatable
|
4618
|
-
const getLockTitle = (lock
|
4619
|
-
|
4620
|
-
|
4621
|
-
// }: { balance?: Balance } = {},
|
4622
|
-
) => {
|
4617
|
+
const getLockTitle = (lock, {
|
4618
|
+
balance
|
4619
|
+
} = {}) => {
|
4623
4620
|
if (!lock.label) return lock.label;
|
4624
4621
|
if (lock.label === "democracy") return "Governance";
|
4625
4622
|
if (lock.label === "crowdloan") {
|
4626
4623
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4627
4624
|
const paraId = lock.meta?.paraId;
|
4628
4625
|
if (!paraId) return "Crowdloan";
|
4626
|
+
|
4629
4627
|
// balance?.network?.parathreads?.find(
|
4630
4628
|
// (parathread) => parathread?.paraId === paraId,
|
4631
4629
|
// )?.name
|
@@ -5287,7 +5285,7 @@ const SubNativeModule = hydrate => {
|
|
5287
5285
|
symbol: symbol ?? DEFAULT_SYMBOL,
|
5288
5286
|
name: moduleConfig?.name ?? symbol ?? DEFAULT_SYMBOL,
|
5289
5287
|
decimals: decimals ?? DEFAULT_DECIMALS,
|
5290
|
-
logo: moduleConfig?.logo
|
5288
|
+
logo: moduleConfig?.logo,
|
5291
5289
|
existentialDeposit: existentialDeposit ?? "0",
|
5292
5290
|
networkId: chainId
|
5293
5291
|
};
|
@@ -6737,7 +6735,7 @@ const SubPsp22Module = hydrate => {
|
|
6737
6735
|
symbol,
|
6738
6736
|
decimals,
|
6739
6737
|
name: tokenConfig?.name || symbol,
|
6740
|
-
logo: tokenConfig?.logo
|
6738
|
+
logo: tokenConfig?.logo,
|
6741
6739
|
existentialDeposit,
|
6742
6740
|
contractAddress,
|
6743
6741
|
networkId: chainId
|
@@ -6970,7 +6968,7 @@ const SubTokensModule = hydrate => {
|
|
6970
6968
|
symbol,
|
6971
6969
|
decimals,
|
6972
6970
|
name: tokenConfig?.name ?? symbol,
|
6973
|
-
logo: tokenConfig?.logo
|
6971
|
+
logo: tokenConfig?.logo,
|
6974
6972
|
existentialDeposit,
|
6975
6973
|
onChainId,
|
6976
6974
|
networkId: chainId
|
@@ -121,7 +121,7 @@ class EvmTokenFetcher {
|
|
121
121
|
|
122
122
|
var packageJson = {
|
123
123
|
name: "@talismn/balances",
|
124
|
-
version: "0.0.0-pr2043-
|
124
|
+
version: "0.0.0-pr2043-20250617100349"};
|
125
125
|
|
126
126
|
const libVersion = packageJson.version;
|
127
127
|
|
@@ -1613,12 +1613,11 @@ const EvmErc20Module = hydrate => {
|
|
1613
1613
|
id,
|
1614
1614
|
type: "evm-erc20",
|
1615
1615
|
platform: "ethereum",
|
1616
|
-
//isTestnet,
|
1617
1616
|
isDefault: tokenConfig.isDefault ?? true,
|
1618
1617
|
symbol,
|
1619
1618
|
decimals,
|
1620
1619
|
name: contractName ?? symbol,
|
1621
|
-
logo: tokenConfig?.logo
|
1620
|
+
logo: tokenConfig?.logo,
|
1622
1621
|
contractAddress,
|
1623
1622
|
networkId: chainId
|
1624
1623
|
};
|
@@ -1926,7 +1925,7 @@ const EvmNativeModule = hydrate => {
|
|
1926
1925
|
symbol,
|
1927
1926
|
decimals,
|
1928
1927
|
name,
|
1929
|
-
logo: moduleConfig?.logo
|
1928
|
+
logo: moduleConfig?.logo,
|
1930
1929
|
networkId
|
1931
1930
|
};
|
1932
1931
|
if (moduleConfig?.symbol) nativeToken.symbol = moduleConfig?.symbol;
|
@@ -3279,7 +3278,7 @@ const SubAssetsModule = hydrate => {
|
|
3279
3278
|
symbol,
|
3280
3279
|
name: tokenConfig?.name || symbol,
|
3281
3280
|
decimals,
|
3282
|
-
logo: tokenConfig?.logo
|
3281
|
+
logo: tokenConfig?.logo,
|
3283
3282
|
existentialDeposit,
|
3284
3283
|
assetId,
|
3285
3284
|
isFrozen,
|
@@ -3556,7 +3555,7 @@ const SubForeignAssetsModule = hydrate => {
|
|
3556
3555
|
symbol,
|
3557
3556
|
decimals,
|
3558
3557
|
name: tokenConfig?.name || symbol,
|
3559
|
-
logo: tokenConfig?.logo
|
3558
|
+
logo: tokenConfig?.logo,
|
3560
3559
|
existentialDeposit,
|
3561
3560
|
onChainId: tokenConfig.onChainId,
|
3562
3561
|
isFrozen,
|
@@ -4615,17 +4614,16 @@ const filterBaseLocks = locks => {
|
|
4615
4614
|
};
|
4616
4615
|
|
4617
4616
|
// TODO: Make these titles translatable
|
4618
|
-
const getLockTitle = (lock
|
4619
|
-
|
4620
|
-
|
4621
|
-
// }: { balance?: Balance } = {},
|
4622
|
-
) => {
|
4617
|
+
const getLockTitle = (lock, {
|
4618
|
+
balance
|
4619
|
+
} = {}) => {
|
4623
4620
|
if (!lock.label) return lock.label;
|
4624
4621
|
if (lock.label === "democracy") return "Governance";
|
4625
4622
|
if (lock.label === "crowdloan") {
|
4626
4623
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4627
4624
|
const paraId = lock.meta?.paraId;
|
4628
4625
|
if (!paraId) return "Crowdloan";
|
4626
|
+
|
4629
4627
|
// balance?.network?.parathreads?.find(
|
4630
4628
|
// (parathread) => parathread?.paraId === paraId,
|
4631
4629
|
// )?.name
|
@@ -5287,7 +5285,7 @@ const SubNativeModule = hydrate => {
|
|
5287
5285
|
symbol: symbol ?? DEFAULT_SYMBOL,
|
5288
5286
|
name: moduleConfig?.name ?? symbol ?? DEFAULT_SYMBOL,
|
5289
5287
|
decimals: decimals ?? DEFAULT_DECIMALS,
|
5290
|
-
logo: moduleConfig?.logo
|
5288
|
+
logo: moduleConfig?.logo,
|
5291
5289
|
existentialDeposit: existentialDeposit ?? "0",
|
5292
5290
|
networkId: chainId
|
5293
5291
|
};
|
@@ -6737,7 +6735,7 @@ const SubPsp22Module = hydrate => {
|
|
6737
6735
|
symbol,
|
6738
6736
|
decimals,
|
6739
6737
|
name: tokenConfig?.name || symbol,
|
6740
|
-
logo: tokenConfig?.logo
|
6738
|
+
logo: tokenConfig?.logo,
|
6741
6739
|
existentialDeposit,
|
6742
6740
|
contractAddress,
|
6743
6741
|
networkId: chainId
|
@@ -6970,7 +6968,7 @@ const SubTokensModule = hydrate => {
|
|
6970
6968
|
symbol,
|
6971
6969
|
decimals,
|
6972
6970
|
name: tokenConfig?.name ?? symbol,
|
6973
|
-
logo: tokenConfig?.logo
|
6971
|
+
logo: tokenConfig?.logo,
|
6974
6972
|
existentialDeposit,
|
6975
6973
|
onChainId,
|
6976
6974
|
networkId: chainId
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { fetchInitMiniMetadatas, evmErc20TokenId as evmErc20TokenId$1,
|
1
|
+
import { fetchInitMiniMetadatas, evmErc20TokenId as evmErc20TokenId$1, EvmErc20TokenSchema, evmNativeTokenId, evmUniswapV2TokenId, githubTokenLogoUrl, subAssetTokenId, subForeignAssetTokenId, subNativeTokenId, subPsp22TokenId, subTokensTokenId } from '@talismn/chaindata-provider';
|
2
2
|
import { Dexie, liveQuery } from 'dexie';
|
3
3
|
import { from, Observable, scan, share, map, switchAll, combineLatest, mergeMap, toArray, interval, startWith, exhaustMap, pipe, filter, shareReplay, combineLatestWith, distinctUntilChanged, firstValueFrom, BehaviorSubject, debounceTime, takeUntil, switchMap, withLatestFrom, concatMap } from 'rxjs';
|
4
4
|
import anylogger from 'anylogger';
|
@@ -108,7 +108,7 @@ class EvmTokenFetcher {
|
|
108
108
|
|
109
109
|
var packageJson = {
|
110
110
|
name: "@talismn/balances",
|
111
|
-
version: "0.0.0-pr2043-
|
111
|
+
version: "0.0.0-pr2043-20250617100349"};
|
112
112
|
|
113
113
|
const libVersion = packageJson.version;
|
114
114
|
|
@@ -1600,12 +1600,11 @@ const EvmErc20Module = hydrate => {
|
|
1600
1600
|
id,
|
1601
1601
|
type: "evm-erc20",
|
1602
1602
|
platform: "ethereum",
|
1603
|
-
//isTestnet,
|
1604
1603
|
isDefault: tokenConfig.isDefault ?? true,
|
1605
1604
|
symbol,
|
1606
1605
|
decimals,
|
1607
1606
|
name: contractName ?? symbol,
|
1608
|
-
logo: tokenConfig?.logo
|
1607
|
+
logo: tokenConfig?.logo,
|
1609
1608
|
contractAddress,
|
1610
1609
|
networkId: chainId
|
1611
1610
|
};
|
@@ -1913,7 +1912,7 @@ const EvmNativeModule = hydrate => {
|
|
1913
1912
|
symbol,
|
1914
1913
|
decimals,
|
1915
1914
|
name,
|
1916
|
-
logo: moduleConfig?.logo
|
1915
|
+
logo: moduleConfig?.logo,
|
1917
1916
|
networkId
|
1918
1917
|
};
|
1919
1918
|
if (moduleConfig?.symbol) nativeToken.symbol = moduleConfig?.symbol;
|
@@ -3266,7 +3265,7 @@ const SubAssetsModule = hydrate => {
|
|
3266
3265
|
symbol,
|
3267
3266
|
name: tokenConfig?.name || symbol,
|
3268
3267
|
decimals,
|
3269
|
-
logo: tokenConfig?.logo
|
3268
|
+
logo: tokenConfig?.logo,
|
3270
3269
|
existentialDeposit,
|
3271
3270
|
assetId,
|
3272
3271
|
isFrozen,
|
@@ -3543,7 +3542,7 @@ const SubForeignAssetsModule = hydrate => {
|
|
3543
3542
|
symbol,
|
3544
3543
|
decimals,
|
3545
3544
|
name: tokenConfig?.name || symbol,
|
3546
|
-
logo: tokenConfig?.logo
|
3545
|
+
logo: tokenConfig?.logo,
|
3547
3546
|
existentialDeposit,
|
3548
3547
|
onChainId: tokenConfig.onChainId,
|
3549
3548
|
isFrozen,
|
@@ -4602,17 +4601,16 @@ const filterBaseLocks = locks => {
|
|
4602
4601
|
};
|
4603
4602
|
|
4604
4603
|
// TODO: Make these titles translatable
|
4605
|
-
const getLockTitle = (lock
|
4606
|
-
|
4607
|
-
|
4608
|
-
// }: { balance?: Balance } = {},
|
4609
|
-
) => {
|
4604
|
+
const getLockTitle = (lock, {
|
4605
|
+
balance
|
4606
|
+
} = {}) => {
|
4610
4607
|
if (!lock.label) return lock.label;
|
4611
4608
|
if (lock.label === "democracy") return "Governance";
|
4612
4609
|
if (lock.label === "crowdloan") {
|
4613
4610
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4614
4611
|
const paraId = lock.meta?.paraId;
|
4615
4612
|
if (!paraId) return "Crowdloan";
|
4613
|
+
|
4616
4614
|
// balance?.network?.parathreads?.find(
|
4617
4615
|
// (parathread) => parathread?.paraId === paraId,
|
4618
4616
|
// )?.name
|
@@ -5274,7 +5272,7 @@ const SubNativeModule = hydrate => {
|
|
5274
5272
|
symbol: symbol ?? DEFAULT_SYMBOL,
|
5275
5273
|
name: moduleConfig?.name ?? symbol ?? DEFAULT_SYMBOL,
|
5276
5274
|
decimals: decimals ?? DEFAULT_DECIMALS,
|
5277
|
-
logo: moduleConfig?.logo
|
5275
|
+
logo: moduleConfig?.logo,
|
5278
5276
|
existentialDeposit: existentialDeposit ?? "0",
|
5279
5277
|
networkId: chainId
|
5280
5278
|
};
|
@@ -6724,7 +6722,7 @@ const SubPsp22Module = hydrate => {
|
|
6724
6722
|
symbol,
|
6725
6723
|
decimals,
|
6726
6724
|
name: tokenConfig?.name || symbol,
|
6727
|
-
logo: tokenConfig?.logo
|
6725
|
+
logo: tokenConfig?.logo,
|
6728
6726
|
existentialDeposit,
|
6729
6727
|
contractAddress,
|
6730
6728
|
networkId: chainId
|
@@ -6957,7 +6955,7 @@ const SubTokensModule = hydrate => {
|
|
6957
6955
|
symbol,
|
6958
6956
|
decimals,
|
6959
6957
|
name: tokenConfig?.name ?? symbol,
|
6960
|
-
logo: tokenConfig?.logo
|
6958
|
+
logo: tokenConfig?.logo,
|
6961
6959
|
existentialDeposit,
|
6962
6960
|
onChainId,
|
6963
6961
|
networkId: chainId
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.0.0-pr2043-
|
3
|
+
"version": "0.0.0-pr2043-20250617100349",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -33,13 +33,13 @@
|
|
33
33
|
"rxjs": "^7.8.1",
|
34
34
|
"scale-ts": "^1.6.1",
|
35
35
|
"viem": "^2.27.3",
|
36
|
-
"@talismn/chain-connector": "0.0.0-pr2043-
|
37
|
-
"@talismn/chain-connector-evm": "0.0.0-pr2043-
|
38
|
-
"@talismn/
|
39
|
-
"@talismn/
|
40
|
-
"@talismn/token-rates": "0.0.0-pr2043-
|
41
|
-
"@talismn/
|
42
|
-
"@talismn/
|
36
|
+
"@talismn/chain-connector": "0.0.0-pr2043-20250617100349",
|
37
|
+
"@talismn/chain-connector-evm": "0.0.0-pr2043-20250617100349",
|
38
|
+
"@talismn/sapi": "0.0.0-pr2043-20250617100349",
|
39
|
+
"@talismn/chaindata-provider": "0.0.0-pr2043-20250617100349",
|
40
|
+
"@talismn/token-rates": "0.0.0-pr2043-20250617100349",
|
41
|
+
"@talismn/util": "0.4.2",
|
42
|
+
"@talismn/scale": "0.1.2"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"@polkadot/api-contract": "16.1.2",
|