@talismn/balances 0.0.0-pr2042-20250612111818 → 0.0.0-pr2043-20250612121753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/declarations/src/modules/EvmErc20Module.d.ts +3 -10
  2. package/dist/declarations/src/modules/EvmNativeModule.d.ts +2 -11
  3. package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +4 -12
  4. package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +1 -4
  5. package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +1 -4
  6. package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +3 -2
  7. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeCrowdloans.d.ts +2 -2
  8. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeNompoolStaking.d.ts +2 -2
  9. package/dist/declarations/src/modules/SubstrateNativeModule/subscribeSubtensorStaking.d.ts +2 -2
  10. package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +1 -9
  11. package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +2 -2
  12. package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +2 -2
  13. package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +1 -4
  14. package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +1 -4
  15. package/dist/declarations/src/modules/index.d.ts +195 -39
  16. package/dist/declarations/src/types/balances.d.ts +118 -63
  17. package/dist/talismn-balances.cjs.dev.js +80 -347
  18. package/dist/talismn-balances.cjs.prod.js +80 -347
  19. package/dist/talismn-balances.esm.js +83 -348
  20. package/package.json +9 -9
  21. package/dist/declarations/src/modules/SubstrateEquilibriumModule.d.ts +0 -39
@@ -125,7 +125,7 @@ export declare class Balance {
125
125
  isSource: (source: BalanceSource) => boolean;
126
126
  hydrate: (hydrate?: HydrateDb) => void;
127
127
  get id(): string;
128
- get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-equilibrium" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
128
+ get source(): "evm-erc20" | "evm-native" | "evm-uniswapv2" | "substrate-assets" | "substrate-foreignassets" | "substrate-native" | "substrate-psp22" | "substrate-tokens";
129
129
  get status(): import("./balancetypes").BalanceStatus;
130
130
  get address(): string;
131
131
  get chainId(): string | undefined;
@@ -133,87 +133,142 @@ export declare class Balance {
133
133
  get evmNetworkId(): string | undefined;
134
134
  get evmNetwork(): import("@talismn/chaindata-provider").SimpleEvmNetwork | null;
135
135
  get tokenId(): string;
136
- get token(): (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
136
+ get token(): {
137
+ id: string;
138
+ decimals: number;
139
+ symbol: string;
140
+ name: string;
141
+ networkId: string;
137
142
  type: "evm-erc20";
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 & {
143
+ platform: "ethereum";
144
+ contractAddress: `0x${string}`;
145
+ isTestnet?: boolean | undefined;
146
+ isDefault?: boolean | undefined;
147
+ logo?: string | undefined;
148
+ coingeckoId?: string | undefined;
149
+ noDiscovery?: boolean | undefined;
150
+ mirrorOf?: string | undefined;
151
+ isCustom?: boolean | undefined;
152
+ } | {
153
+ id: string;
154
+ decimals: number;
155
+ symbol: string;
156
+ name: string;
157
+ networkId: string;
146
158
  type: "evm-native";
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 & {
159
+ platform: "ethereum";
160
+ isTestnet?: boolean | undefined;
161
+ isDefault?: boolean | undefined;
162
+ logo?: string | undefined;
163
+ coingeckoId?: string | undefined;
164
+ noDiscovery?: boolean | undefined;
165
+ mirrorOf?: string | undefined;
166
+ } | {
167
+ id: string;
168
+ decimals: number;
169
+ symbol: string;
170
+ name: string;
171
+ networkId: string;
172
+ platform: "ethereum";
173
+ contractAddress: `0x${string}`;
153
174
  type: "evm-uniswapv2";
154
- } & {
155
- contractAddress: string;
156
175
  symbol0: string;
157
176
  symbol1: string;
158
177
  decimals0: number;
159
178
  decimals1: number;
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 & {
179
+ tokenAddress0: `0x${string}`;
180
+ tokenAddress1: `0x${string}`;
181
+ isTestnet?: boolean | undefined;
182
+ isDefault?: boolean | undefined;
183
+ logo?: string | undefined;
184
+ coingeckoId?: string | undefined;
185
+ noDiscovery?: boolean | undefined;
186
+ mirrorOf?: string | undefined;
187
+ isCustom?: boolean | undefined;
188
+ coingeckoId0?: string | undefined;
189
+ coingeckoId1?: string | undefined;
190
+ } | {
191
+ id: string;
192
+ decimals: number;
193
+ symbol: string;
194
+ name: string;
195
+ networkId: string;
168
196
  type: "substrate-assets";
169
- } & {
170
- existentialDeposit: string;
197
+ platform: "polkadot";
171
198
  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
199
  existentialDeposit: 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 & {
200
+ isTestnet?: boolean | undefined;
201
+ isDefault?: boolean | undefined;
202
+ logo?: string | undefined;
203
+ coingeckoId?: string | undefined;
204
+ noDiscovery?: boolean | undefined;
205
+ mirrorOf?: string | undefined;
206
+ isFrozen?: boolean | undefined;
207
+ } | {
208
+ id: string;
209
+ decimals: number;
210
+ symbol: string;
211
+ name: string;
212
+ networkId: string;
185
213
  type: "substrate-foreignassets";
186
- } & {
187
- existentialDeposit: string;
214
+ platform: "polkadot";
188
215
  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 & {
216
+ existentialDeposit: string;
217
+ isTestnet?: boolean | undefined;
218
+ isDefault?: boolean | undefined;
219
+ logo?: string | undefined;
220
+ coingeckoId?: string | undefined;
221
+ noDiscovery?: boolean | undefined;
222
+ mirrorOf?: string | undefined;
223
+ isFrozen?: boolean | undefined;
224
+ } | {
225
+ id: string;
226
+ decimals: number;
227
+ symbol: string;
228
+ name: string;
229
+ networkId: string;
194
230
  type: "substrate-native";
195
- } & {
231
+ platform: "polkadot";
196
232
  existentialDeposit: string;
197
- chain: {
198
- id: import("@talismn/chaindata-provider").ChainId;
199
- };
200
- }) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
233
+ isTestnet?: boolean | undefined;
234
+ isDefault?: boolean | undefined;
235
+ logo?: string | undefined;
236
+ coingeckoId?: string | undefined;
237
+ noDiscovery?: boolean | undefined;
238
+ mirrorOf?: string | undefined;
239
+ } | {
240
+ id: string;
241
+ decimals: number;
242
+ symbol: string;
243
+ name: string;
244
+ networkId: string;
201
245
  type: "substrate-psp22";
202
- } & {
246
+ platform: "polkadot";
203
247
  existentialDeposit: string;
204
248
  contractAddress: string;
205
- chain: {
206
- id: import("@talismn/chaindata-provider").ChainId;
207
- };
208
- }) | (import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
249
+ isTestnet?: boolean | undefined;
250
+ isDefault?: boolean | undefined;
251
+ logo?: string | undefined;
252
+ coingeckoId?: string | undefined;
253
+ noDiscovery?: boolean | undefined;
254
+ mirrorOf?: string | undefined;
255
+ } | {
256
+ id: string;
257
+ decimals: number;
258
+ symbol: string;
259
+ name: string;
260
+ networkId: string;
209
261
  type: "substrate-tokens";
210
- } & {
211
- existentialDeposit: string;
262
+ platform: "polkadot";
212
263
  onChainId: string | number;
213
- chain: {
214
- id: import("@talismn/chaindata-provider").ChainId;
215
- };
216
- }) | null;
264
+ existentialDeposit: string;
265
+ isTestnet?: boolean | undefined;
266
+ isDefault?: boolean | undefined;
267
+ logo?: string | undefined;
268
+ coingeckoId?: string | undefined;
269
+ noDiscovery?: boolean | undefined;
270
+ mirrorOf?: string | undefined;
271
+ } | null;
217
272
  get decimals(): number | null;
218
273
  get rates(): TokenRates | null;
219
274
  /**