@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,29 +1,29 @@
|
|
1
1
|
import { TypeRegistry } from "@polkadot/types";
|
2
2
|
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import {
|
4
|
-
import
|
3
|
+
import { SubTokensBalancesConfig, SubTokensToken } from "@talismn/chaindata-provider";
|
4
|
+
import z from "zod/v4";
|
5
|
+
import { ChainMeta, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
5
6
|
import { NewBalanceType } from "../types";
|
6
7
|
type ModuleType = "substrate-tokens";
|
7
|
-
export
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
export declare const SubTokensTokenConfigSchema: z.ZodObject<{
|
9
|
+
existentialDeposit: z.ZodOptional<z.ZodString>;
|
10
|
+
symbol: z.ZodOptional<z.ZodString>;
|
11
|
+
networkId: z.ZodOptional<z.ZodString>;
|
12
|
+
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
13
|
+
decimals: z.ZodOptional<z.ZodInt>;
|
14
|
+
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
15
|
+
logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
16
|
+
coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
17
|
+
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
18
|
+
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
19
|
+
onChainId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
20
|
+
}, z.core.$strict>;
|
21
|
+
export type SubTokensTokenConfig = z.infer<typeof SubTokensTokenConfigSchema>;
|
22
|
+
export type SubTokensChainMeta = ChainMeta<{
|
18
23
|
palletId?: string;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
ed?: string;
|
23
|
-
onChainId?: string | number;
|
24
|
-
} & BalancesConfigTokenParams>;
|
25
|
-
};
|
26
|
-
export type SubTokensBalance = NewBalanceType<ModuleType, "complex", "substrate">;
|
24
|
+
}>;
|
25
|
+
export type SubTokensModuleConfig = SubTokensBalancesConfig;
|
26
|
+
export type SubTokensBalance = NewBalanceType<ModuleType, "complex">;
|
27
27
|
declare module "@talismn/balances/plugins" {
|
28
28
|
interface PluginBalanceTypes {
|
29
29
|
"substrate-tokens": SubTokensBalance;
|
@@ -39,5 +39,5 @@ export type SubTokensTransferParams = NewTransferParamsType<{
|
|
39
39
|
tip?: string;
|
40
40
|
userExtensions?: ExtDef;
|
41
41
|
}>;
|
42
|
-
export declare const SubTokensModule: NewBalanceModule<ModuleType, SubTokensToken, SubTokensChainMeta, SubTokensModuleConfig, SubTokensTransferParams>;
|
42
|
+
export declare const SubTokensModule: NewBalanceModule<ModuleType, SubTokensToken, SubTokensChainMeta, SubTokensModuleConfig, SubTokensTokenConfig, SubTokensTransferParams>;
|
43
43
|
export {};
|
@@ -1,58 +1,233 @@
|
|
1
|
-
export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20",
|
1
|
+
export declare const defaultBalanceModules: (import("..").NewBalanceModule<"evm-erc20", {
|
2
|
+
id: string;
|
3
|
+
networkId: string;
|
4
|
+
decimals: number;
|
5
|
+
symbol: string;
|
6
|
+
type: "evm-erc20";
|
7
|
+
platform: "ethereum";
|
8
|
+
contractAddress: `0x${string}`;
|
9
|
+
isDefault?: boolean | undefined;
|
10
|
+
name?: string | undefined;
|
11
|
+
logo?: string | undefined;
|
12
|
+
coingeckoId?: string | undefined;
|
13
|
+
noDiscovery?: boolean | undefined;
|
14
|
+
mirrorOf?: string | undefined;
|
15
|
+
isCustom?: boolean | undefined;
|
16
|
+
}, import("..").DefaultChainMeta, undefined, {
|
17
|
+
contractAddress: `0x${string}`;
|
18
|
+
symbol?: string | undefined;
|
19
|
+
networkId?: string | undefined;
|
20
|
+
isDefault?: boolean | undefined;
|
21
|
+
decimals?: number | undefined;
|
22
|
+
name?: string | undefined;
|
23
|
+
logo?: string | undefined;
|
24
|
+
coingeckoId?: string | undefined;
|
25
|
+
noDiscovery?: boolean | undefined;
|
26
|
+
mirrorOf?: string | undefined;
|
27
|
+
}> | import("..").NewBalanceModule<"evm-native", {
|
28
|
+
id: string;
|
29
|
+
networkId: string;
|
30
|
+
decimals: number;
|
31
|
+
symbol: string;
|
2
32
|
type: "evm-native";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
33
|
+
platform: "ethereum";
|
34
|
+
isDefault?: boolean | undefined;
|
35
|
+
name?: string | undefined;
|
36
|
+
logo?: string | undefined;
|
37
|
+
coingeckoId?: string | undefined;
|
38
|
+
noDiscovery?: boolean | undefined;
|
39
|
+
mirrorOf?: string | undefined;
|
40
|
+
}, import("..").DefaultChainMeta, undefined, {
|
41
|
+
symbol?: string | undefined;
|
42
|
+
networkId?: string | undefined;
|
43
|
+
isDefault?: boolean | undefined;
|
44
|
+
decimals?: number | undefined;
|
45
|
+
name?: string | undefined;
|
46
|
+
logo?: string | undefined;
|
47
|
+
coingeckoId?: string | undefined;
|
48
|
+
noDiscovery?: boolean | undefined;
|
49
|
+
mirrorOf?: string | undefined;
|
50
|
+
}> | import("..").NewBalanceModule<"evm-uniswapv2", {
|
51
|
+
id: string;
|
52
|
+
networkId: string;
|
53
|
+
decimals: number;
|
54
|
+
symbol: string;
|
55
|
+
type: "evm-uniswapv2";
|
56
|
+
platform: "ethereum";
|
57
|
+
contractAddress: `0x${string}`;
|
58
|
+
symbol0: string;
|
59
|
+
symbol1: string;
|
60
|
+
decimals0: number;
|
61
|
+
decimals1: number;
|
62
|
+
tokenAddress0: `0x${string}`;
|
63
|
+
tokenAddress1: `0x${string}`;
|
64
|
+
isDefault?: boolean | undefined;
|
65
|
+
name?: string | undefined;
|
66
|
+
logo?: string | undefined;
|
67
|
+
coingeckoId?: string | undefined;
|
68
|
+
noDiscovery?: boolean | undefined;
|
69
|
+
mirrorOf?: string | undefined;
|
70
|
+
isCustom?: boolean | undefined;
|
71
|
+
coingeckoId0?: string | undefined;
|
72
|
+
coingeckoId1?: string | undefined;
|
73
|
+
}, import("..").DefaultChainMeta, undefined, {
|
74
|
+
contractAddress: `0x${string}`;
|
75
|
+
symbol0?: string | undefined;
|
76
|
+
symbol1?: string | undefined;
|
77
|
+
decimals0?: number | undefined;
|
78
|
+
decimals1?: number | undefined;
|
79
|
+
tokenAddress0?: `0x${string}` | undefined;
|
80
|
+
tokenAddress1?: `0x${string}` | undefined;
|
81
|
+
coingeckoId0?: string | undefined;
|
82
|
+
coingeckoId1?: string | undefined;
|
83
|
+
symbol?: string | undefined;
|
84
|
+
networkId?: string | undefined;
|
85
|
+
isDefault?: boolean | undefined;
|
86
|
+
decimals?: number | undefined;
|
87
|
+
name?: string | undefined;
|
88
|
+
logo?: string | undefined;
|
89
|
+
coingeckoId?: string | undefined;
|
90
|
+
noDiscovery?: boolean | undefined;
|
91
|
+
mirrorOf?: string | undefined;
|
92
|
+
}> | import("..").NewBalanceModule<"substrate-assets", {
|
93
|
+
id: string;
|
94
|
+
networkId: string;
|
95
|
+
decimals: number;
|
96
|
+
symbol: string;
|
9
97
|
type: "substrate-assets";
|
10
|
-
|
11
|
-
existentialDeposit: string;
|
98
|
+
platform: "polkadot";
|
12
99
|
assetId: string;
|
13
|
-
isFrozen: boolean;
|
14
|
-
chain: {
|
15
|
-
id: import("@talismn/chaindata-provider").ChainId;
|
16
|
-
};
|
17
|
-
}, import("./SubstrateAssetsModule").SubAssetsChainMeta, import("./SubstrateAssetsModule").SubAssetsModuleConfig, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-equilibrium", import("@talismn/chaindata-provider/dist/declarations/src/types/Token/types").TokenBase & {
|
18
|
-
type: "substrate-equilibrium";
|
19
|
-
} & {
|
20
100
|
existentialDeposit: string;
|
101
|
+
isDefault?: boolean | undefined;
|
102
|
+
name?: string | undefined;
|
103
|
+
logo?: string | undefined;
|
104
|
+
coingeckoId?: string | undefined;
|
105
|
+
noDiscovery?: boolean | undefined;
|
106
|
+
mirrorOf?: string | undefined;
|
107
|
+
isFrozen?: boolean | undefined;
|
108
|
+
}, import("./SubstrateAssetsModule").SubAssetsChainMeta, undefined, {
|
21
109
|
assetId: string;
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
110
|
+
symbol?: string | undefined;
|
111
|
+
networkId?: string | undefined;
|
112
|
+
isDefault?: boolean | undefined;
|
113
|
+
decimals?: number | undefined;
|
114
|
+
name?: string | undefined;
|
115
|
+
logo?: string | undefined;
|
116
|
+
coingeckoId?: string | undefined;
|
117
|
+
noDiscovery?: boolean | undefined;
|
118
|
+
mirrorOf?: string | undefined;
|
119
|
+
}, import("./SubstrateAssetsModule").SubAssetsTransferParams> | import("..").NewBalanceModule<"substrate-foreignassets", {
|
120
|
+
id: string;
|
121
|
+
networkId: string;
|
122
|
+
decimals: number;
|
123
|
+
symbol: string;
|
26
124
|
type: "substrate-foreignassets";
|
27
|
-
|
125
|
+
platform: "polkadot";
|
126
|
+
onChainId: string;
|
28
127
|
existentialDeposit: string;
|
128
|
+
isDefault?: boolean | undefined;
|
129
|
+
name?: string | undefined;
|
130
|
+
logo?: string | undefined;
|
131
|
+
coingeckoId?: string | undefined;
|
132
|
+
noDiscovery?: boolean | undefined;
|
133
|
+
mirrorOf?: string | undefined;
|
134
|
+
isFrozen?: boolean | undefined;
|
135
|
+
}, import("..").DefaultChainMeta, undefined, {
|
29
136
|
onChainId: string;
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
137
|
+
symbol?: string | undefined;
|
138
|
+
networkId?: string | undefined;
|
139
|
+
isDefault?: boolean | undefined;
|
140
|
+
decimals?: number | undefined;
|
141
|
+
name?: string | undefined;
|
142
|
+
logo?: string | undefined;
|
143
|
+
coingeckoId?: string | undefined;
|
144
|
+
noDiscovery?: boolean | undefined;
|
145
|
+
mirrorOf?: string | undefined;
|
146
|
+
}, import("./SubstrateForeignAssetsModule").SubForeignAssetsTransferParams> | import("..").NewBalanceModule<"substrate-native", {
|
147
|
+
id: string;
|
148
|
+
networkId: string;
|
149
|
+
decimals: number;
|
150
|
+
symbol: string;
|
151
|
+
type: "substrate-native";
|
152
|
+
platform: "polkadot";
|
37
153
|
existentialDeposit: string;
|
154
|
+
isDefault?: boolean | undefined;
|
155
|
+
name?: string | undefined;
|
156
|
+
logo?: string | undefined;
|
157
|
+
coingeckoId?: string | undefined;
|
158
|
+
noDiscovery?: boolean | undefined;
|
159
|
+
mirrorOf?: string | undefined;
|
160
|
+
}, import("./SubstrateNativeModule").SubNativeChainMeta, {
|
161
|
+
disable?: boolean | undefined;
|
162
|
+
}, {
|
163
|
+
symbol?: string | undefined;
|
164
|
+
networkId?: string | undefined;
|
165
|
+
isDefault?: boolean | undefined;
|
166
|
+
decimals?: number | undefined;
|
167
|
+
name?: string | undefined;
|
168
|
+
logo?: string | undefined;
|
169
|
+
coingeckoId?: string | undefined;
|
170
|
+
noDiscovery?: boolean | undefined;
|
171
|
+
mirrorOf?: string | undefined;
|
172
|
+
}, import("./SubstrateNativeModule").SubNativeTransferParams> | import("..").NewBalanceModule<"substrate-psp22", {
|
173
|
+
id: string;
|
174
|
+
networkId: string;
|
175
|
+
decimals: number;
|
176
|
+
symbol: string;
|
177
|
+
type: "substrate-psp22";
|
178
|
+
platform: "polkadot";
|
179
|
+
contractAddress: string;
|
180
|
+
isDefault?: boolean | undefined;
|
181
|
+
name?: string | undefined;
|
182
|
+
logo?: string | undefined;
|
183
|
+
coingeckoId?: string | undefined;
|
184
|
+
noDiscovery?: boolean | undefined;
|
185
|
+
mirrorOf?: string | undefined;
|
186
|
+
}, import("..").DefaultChainMeta, undefined, {
|
38
187
|
contractAddress: string;
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
188
|
+
symbol?: string | undefined;
|
189
|
+
networkId?: string | undefined;
|
190
|
+
isDefault?: boolean | undefined;
|
191
|
+
decimals?: number | undefined;
|
192
|
+
name?: string | undefined;
|
193
|
+
logo?: string | undefined;
|
194
|
+
coingeckoId?: string | undefined;
|
195
|
+
noDiscovery?: boolean | undefined;
|
196
|
+
mirrorOf?: string | undefined;
|
197
|
+
}, import("./SubstratePsp22Module").SubPsp22TransferParams> | import("..").NewBalanceModule<"substrate-tokens", {
|
198
|
+
id: string;
|
199
|
+
networkId: string;
|
200
|
+
decimals: number;
|
201
|
+
symbol: string;
|
43
202
|
type: "substrate-tokens";
|
44
|
-
|
203
|
+
platform: "polkadot";
|
204
|
+
onChainId: string | number;
|
45
205
|
existentialDeposit: string;
|
206
|
+
isDefault?: boolean | undefined;
|
207
|
+
name?: string | undefined;
|
208
|
+
logo?: string | undefined;
|
209
|
+
coingeckoId?: string | undefined;
|
210
|
+
noDiscovery?: boolean | undefined;
|
211
|
+
mirrorOf?: string | undefined;
|
212
|
+
}, import("./SubstrateTokensModule").SubTokensChainMeta, {
|
213
|
+
palletId?: string | undefined;
|
214
|
+
}, {
|
46
215
|
onChainId: string | number;
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
216
|
+
existentialDeposit?: string | undefined;
|
217
|
+
symbol?: string | undefined;
|
218
|
+
networkId?: string | undefined;
|
219
|
+
isDefault?: boolean | undefined;
|
220
|
+
decimals?: number | undefined;
|
221
|
+
name?: string | undefined;
|
222
|
+
logo?: string | undefined;
|
223
|
+
coingeckoId?: string | undefined;
|
224
|
+
noDiscovery?: boolean | undefined;
|
225
|
+
mirrorOf?: string | undefined;
|
226
|
+
}, import("./SubstrateTokensModule").SubTokensTransferParams>)[];
|
51
227
|
export * from "./EvmErc20Module";
|
52
228
|
export * from "./EvmNativeModule";
|
53
229
|
export * from "./EvmUniswapV2Module";
|
54
230
|
export * from "./SubstrateAssetsModule";
|
55
|
-
export * from "./SubstrateEquilibriumModule";
|
56
231
|
export * from "./SubstrateForeignAssetsModule";
|
57
232
|
export * from "./SubstrateNativeModule";
|
58
233
|
export * from "./SubstratePsp22Module";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BalanceModule, NewBalanceModule } from "../../BalanceModule";
|
2
|
-
export type AnyBalanceModule = BalanceModule<any, any, any, any, any>;
|
3
|
-
export type AnyNewBalanceModule = NewBalanceModule<any, any, any, any, any>;
|
2
|
+
export type AnyBalanceModule = BalanceModule<any, any, any, any, any, any>;
|
3
|
+
export type AnyNewBalanceModule = NewBalanceModule<any, any, any, any, any, any>;
|
4
4
|
/**
|
5
5
|
* The following `Infer*` collection of generic types can be used when you want to
|
6
6
|
* extract one of the generic type arguments from an existing BalanceModule.
|
@@ -13,11 +13,12 @@ export type AnyNewBalanceModule = NewBalanceModule<any, any, any, any, any>;
|
|
13
13
|
* string as input, and then return some data associated with that module with the correct type:
|
14
14
|
* function getChainMeta<T extends AnyBalanceModule>(type: InferModuleType<T>): InferChainMeta<T> | undefined
|
15
15
|
*/
|
16
|
-
type InferBalanceModuleTypes<T extends AnyNewBalanceModule> = T extends NewBalanceModule<infer TModuleType, infer TTokenType, infer TChainMeta, infer TModuleConfig, infer TTransferParams> ? {
|
16
|
+
type InferBalanceModuleTypes<T extends AnyNewBalanceModule> = T extends NewBalanceModule<infer TModuleType, infer TTokenType, infer TChainMeta, infer TModuleConfig, infer TTokenConfig, infer TTransferParams> ? {
|
17
17
|
TModuleType: TModuleType;
|
18
18
|
TTokenType: TTokenType;
|
19
19
|
TChainMeta: TChainMeta;
|
20
20
|
TModuleConfig: TModuleConfig;
|
21
|
+
TTokenConfig: TTokenConfig;
|
21
22
|
TTransferParams: TTransferParams;
|
22
23
|
} : never;
|
23
24
|
export type InferModuleType<T extends AnyNewBalanceModule> = InferBalanceModuleTypes<T>["TModuleType"];
|
@@ -25,4 +26,5 @@ export type InferTokenType<T extends AnyNewBalanceModule> = InferBalanceModuleTy
|
|
25
26
|
export type InferChainMeta<T extends AnyNewBalanceModule> = InferBalanceModuleTypes<T>["TChainMeta"];
|
26
27
|
export type InferModuleConfig<T extends AnyNewBalanceModule> = InferBalanceModuleTypes<T>["TModuleConfig"];
|
27
28
|
export type InferTransferParams<T extends AnyNewBalanceModule> = InferBalanceModuleTypes<T>["TTransferParams"];
|
29
|
+
export type InferTTokenConfig<T extends AnyNewBalanceModule> = InferBalanceModuleTypes<T>["TTokenConfig"];
|
28
30
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { DotNetwork, DotNetworkId, NetworkId } from "@talismn/chaindata-provider";
|
2
2
|
import { getDynamicBuilder } from "@talismn/scale";
|
3
3
|
import { MiniMetadata } from "../../types";
|
4
|
-
import { AnyNewBalanceModule
|
4
|
+
import { AnyNewBalanceModule } from "./InferBalanceModuleTypes";
|
5
5
|
export type StorageCoders<TCoders extends {
|
6
6
|
[key: string]: [string, string];
|
7
7
|
}> = Map<string, {
|
@@ -11,11 +11,10 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
|
|
11
11
|
[key: string]: [string, string] | ((params: {
|
12
12
|
chainId: string;
|
13
13
|
}) => [string, string]);
|
14
|
-
}>({ chainIds, chains, miniMetadatas,
|
15
|
-
chainIds:
|
16
|
-
chains:
|
17
|
-
miniMetadatas: Map<
|
18
|
-
moduleType: InferModuleType<TBalanceModule>;
|
14
|
+
}>({ chainIds, chains, miniMetadatas, coders, }: {
|
15
|
+
chainIds: DotNetworkId[];
|
16
|
+
chains: Record<NetworkId, DotNetwork>;
|
17
|
+
miniMetadatas: Map<DotNetworkId, MiniMetadata<TBalanceModule>>;
|
19
18
|
coders: TCoders;
|
20
19
|
}) => Map<string, { [Property in keyof TCoders]: {
|
21
20
|
args: [import("scale-ts").Encoder<any[]>, import("scale-ts").Decoder<any[]>] & {
|
@@ -32,3 +31,13 @@ export declare const buildStorageCoders: <TBalanceModule extends AnyNewBalanceMo
|
|
32
31
|
len: number;
|
33
32
|
fallback: any;
|
34
33
|
} | undefined; }>;
|
34
|
+
type NetworkCoders = {
|
35
|
+
[key: string]: [string, string];
|
36
|
+
};
|
37
|
+
type NetworkStorageCoders<TCoders extends NetworkCoders> = {
|
38
|
+
[Property in keyof TCoders]: ReturnType<ReturnType<typeof getDynamicBuilder>["buildStorage"]> | undefined;
|
39
|
+
};
|
40
|
+
export declare const buildNetworkStorageCoders: <TCoders extends {
|
41
|
+
[key: string]: [string, string];
|
42
|
+
}>(chainId: DotNetworkId, miniMetadata: MiniMetadata, coders: TCoders) => NetworkStorageCoders<TCoders> | null;
|
43
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { NetworkId, TokenList } from "@talismn/chaindata-provider";
|
2
2
|
import { AddressesByToken } from "../../types";
|
3
3
|
export declare const getUniqueChainIds: (addressesByToken: AddressesByToken<{
|
4
4
|
id: string;
|
5
|
-
}>, tokens: TokenList) =>
|
5
|
+
}>, tokens: TokenList) => NetworkId[];
|
@@ -2,7 +2,6 @@ export * from "./balances";
|
|
2
2
|
export * from "./buildStorageCoders";
|
3
3
|
export * from "./decodeOutput";
|
4
4
|
export * from "./detectTransferMethod";
|
5
|
-
export * from "./findChainMeta";
|
6
5
|
export * from "./getUniqueChainIds";
|
7
6
|
export * from "./InferBalanceModuleTypes";
|
8
7
|
export * from "./makeContractCaller";
|