@talismn/balances 0.0.0-pr2075-20250708160640 → 0.0.0-pr2075-20250709135256
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/BalancesProvider.d.ts +3 -3
- package/dist/declarations/src/TalismanBalancesDatabase.d.ts +2 -2
- package/dist/declarations/src/index.d.ts +0 -1
- package/dist/declarations/src/modules/IBalanceModule.d.ts +2 -5
- package/dist/declarations/src/modules/evm-erc20/types.d.ts +1 -1
- package/dist/declarations/src/modules/evm-native/types.d.ts +1 -1
- package/dist/declarations/src/modules/evm-uniswapv2/types.d.ts +1 -1
- package/dist/declarations/src/modules/index.d.ts +11 -237
- package/dist/declarations/src/modules/shared/buildNetworkStorageCoders.d.ts +13 -0
- package/dist/declarations/src/modules/shared/index.d.ts +2 -0
- package/dist/declarations/src/modules/substrate-assets/buildQueries.d.ts +2 -3
- package/dist/declarations/src/modules/substrate-assets/types.d.ts +1 -1
- package/dist/declarations/src/modules/substrate-foreignassets/buildQueries.d.ts +1 -1
- package/dist/declarations/src/modules/substrate-foreignassets/types.d.ts +1 -1
- package/dist/declarations/src/modules/substrate-hydration/types.d.ts +1 -1
- package/dist/declarations/src/modules/substrate-native/bittensor/getSubtensorStakingBalances.d.ts +1 -2
- package/dist/declarations/src/modules/substrate-native/queries/buildBaseQueries.d.ts +2 -3
- package/dist/declarations/src/modules/substrate-native/queries/buildNomPoolQueries.d.ts +2 -3
- package/dist/declarations/src/modules/substrate-native/types.d.ts +1 -1
- package/dist/declarations/src/modules/substrate-psp22/types.d.ts +1 -1
- package/dist/declarations/src/modules/{util/makeContractCaller.d.ts → substrate-psp22/util.d.ts} +2 -1
- package/dist/declarations/src/modules/substrate-tokens/buildQueries.d.ts +2 -3
- package/dist/declarations/src/modules/substrate-tokens/types.d.ts +1 -1
- package/dist/declarations/src/types/addresses.d.ts +0 -3
- package/dist/declarations/src/types/balances.d.ts +1 -1
- package/dist/declarations/src/types/balancetypes.d.ts +3 -25
- package/dist/declarations/src/types/chainConnectors.d.ts +6 -0
- package/dist/declarations/src/types/index.d.ts +1 -0
- package/dist/declarations/src/types/minimetadatas.d.ts +4 -13
- package/dist/declarations/src/types/tokens.d.ts +1 -1
- package/dist/talismn-balances.cjs.dev.js +343 -4149
- package/dist/talismn-balances.cjs.prod.js +343 -4149
- package/dist/talismn-balances.esm.js +350 -4140
- package/package.json +11 -13
- package/dist/declarations/src/BalanceModule.d.ts +0 -84
- package/dist/declarations/src/getMiniMetadata/getUpdatedMiniMetadatas.d.ts +0 -4
- package/dist/declarations/src/getMiniMetadata/index.d.ts +0 -5
- package/dist/declarations/src/modules/EvmErc20Module.d.ts +0 -30
- package/dist/declarations/src/modules/EvmNativeModule.d.ts +0 -27
- package/dist/declarations/src/modules/EvmUniswapV2Module.d.ts +0 -37
- package/dist/declarations/src/modules/SubstrateAssetsModule.d.ts +0 -40
- package/dist/declarations/src/modules/SubstrateForeignAssetsModule.d.ts +0 -40
- package/dist/declarations/src/modules/SubstrateNativeModule/index.d.ts +0 -21
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeBase.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeNompoolStaking.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/subscribeSubtensorStaking.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/types.d.ts +0 -32
- package/dist/declarations/src/modules/SubstrateNativeModule/util/QueryCache.d.ts +0 -13
- package/dist/declarations/src/modules/SubstrateNativeModule/util/SubNativeBalanceError.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/util/asObservable.d.ts +0 -10
- package/dist/declarations/src/modules/SubstrateNativeModule/util/balanceLockTypes.d.ts +0 -15
- package/dist/declarations/src/modules/SubstrateNativeModule/util/buildQueries.d.ts +0 -14
- package/dist/declarations/src/modules/SubstrateNativeModule/util/mergeBalances.d.ts +0 -13
- package/dist/declarations/src/modules/SubstrateNativeModule/util/nompoolAccountId.d.ts +0 -5
- package/dist/declarations/src/modules/SubstrateNativeModule/util/sortChains.d.ts +0 -1
- package/dist/declarations/src/modules/SubstrateNativeModule/util/subtensor.d.ts +0 -20
- package/dist/declarations/src/modules/SubstrateNativeModule/util/systemProperties.d.ts +0 -5
- package/dist/declarations/src/modules/SubstratePsp22Module.d.ts +0 -40
- package/dist/declarations/src/modules/SubstrateTokensModule.d.ts +0 -43
- package/dist/declarations/src/modules/util/InferBalanceModuleTypes.d.ts +0 -30
- package/dist/declarations/src/modules/util/RpcStateQueryHelper.d.ts +0 -19
- package/dist/declarations/src/modules/util/balances.d.ts +0 -8
- package/dist/declarations/src/modules/util/buildStorageCoders.d.ts +0 -43
- package/dist/declarations/src/modules/util/decodeOutput.d.ts +0 -13
- package/dist/declarations/src/modules/util/detectTransferMethod.d.ts +0 -11
- package/dist/declarations/src/modules/util/getAddresssesByTokenByNetwork.d.ts +0 -3
- package/dist/declarations/src/modules/util/getUniqueChainIds.d.ts +0 -5
- package/dist/declarations/src/modules/util/index.d.ts +0 -9
- package/dist/declarations/src/modules/util/storageCompression.d.ts +0 -9
- package/dist/declarations/src/plugins.d.ts +0 -17
- package/plugins/dist/talismn-balances-plugins.cjs.d.ts +0 -1
- package/plugins/dist/talismn-balances-plugins.cjs.dev.js +0 -2
- package/plugins/dist/talismn-balances-plugins.cjs.js +0 -7
- package/plugins/dist/talismn-balances-plugins.cjs.prod.js +0 -2
- package/plugins/dist/talismn-balances-plugins.esm.js +0 -1
- package/plugins/package.json +0 -4
- /package/dist/declarations/src/modules/{util → shared}/rpcQueryPack.d.ts +0 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@talismn/balances",
|
3
|
-
"version": "0.0.0-pr2075-
|
3
|
+
"version": "0.0.0-pr2075-20250709135256",
|
4
4
|
"author": "Talisman",
|
5
5
|
"homepage": "https://talisman.xyz",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -15,8 +15,7 @@
|
|
15
15
|
"main": "dist/talismn-balances.cjs.js",
|
16
16
|
"module": "dist/talismn-balances.esm.js",
|
17
17
|
"files": [
|
18
|
-
"/dist"
|
19
|
-
"/plugins"
|
18
|
+
"/dist"
|
20
19
|
],
|
21
20
|
"engines": {
|
22
21
|
"node": ">=18"
|
@@ -35,13 +34,13 @@
|
|
35
34
|
"scale-ts": "^1.6.1",
|
36
35
|
"viem": "^2.27.3",
|
37
36
|
"zod": "^3.25.62",
|
38
|
-
"@talismn/chain-connector": "0.0.0-pr2075-
|
39
|
-
"@talismn/chain-connector-evm": "0.0.0-pr2075-
|
40
|
-
"@talismn/chaindata-provider": "0.0.0-pr2075-
|
41
|
-
"@talismn/
|
42
|
-
"@talismn/scale": "0.0.0-pr2075-
|
43
|
-
"@talismn/
|
44
|
-
"@talismn/util": "0.0.0-pr2075-
|
37
|
+
"@talismn/chain-connector": "0.0.0-pr2075-20250709135256",
|
38
|
+
"@talismn/chain-connector-evm": "0.0.0-pr2075-20250709135256",
|
39
|
+
"@talismn/chaindata-provider": "0.0.0-pr2075-20250709135256",
|
40
|
+
"@talismn/token-rates": "0.0.0-pr2075-20250709135256",
|
41
|
+
"@talismn/scale": "0.0.0-pr2075-20250709135256",
|
42
|
+
"@talismn/sapi": "0.0.0-pr2075-20250709135256",
|
43
|
+
"@talismn/util": "0.0.0-pr2075-20250709135256"
|
45
44
|
},
|
46
45
|
"devDependencies": {
|
47
46
|
"@polkadot/api-contract": "16.1.2",
|
@@ -68,8 +67,7 @@
|
|
68
67
|
},
|
69
68
|
"preconstruct": {
|
70
69
|
"entrypoints": [
|
71
|
-
"index.ts"
|
72
|
-
"plugins.ts"
|
70
|
+
"index.ts"
|
73
71
|
]
|
74
72
|
},
|
75
73
|
"eslintConfig": {
|
@@ -81,6 +79,6 @@
|
|
81
79
|
"scripts": {
|
82
80
|
"test": "jest",
|
83
81
|
"lint": "eslint src --max-warnings 0",
|
84
|
-
"clean": "rm -rf dist
|
82
|
+
"clean": "rm -rf dist .turbo node_modules"
|
85
83
|
}
|
86
84
|
}
|
@@ -1,84 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChainConnectorEvm } from "@talismn/chain-connector-evm";
|
3
|
-
import { ChaindataProvider, DotNetworkId, EthNetworkId, Token } from "@talismn/chaindata-provider";
|
4
|
-
import { AddressesByToken, BalanceJson, Balances, SubscriptionCallback, UnsubscribeFn } from "./types";
|
5
|
-
export type ChainMeta<Extra extends Record<string, unknown> | null> = {
|
6
|
-
miniMetadata: `0x${string}` | null;
|
7
|
-
extra: Extra;
|
8
|
-
};
|
9
|
-
export type TokenConfig = object;
|
10
|
-
export type BalancesConfig<ModConfig extends object | undefined, TokenConfig extends object | undefined> = {
|
11
|
-
config?: ModConfig;
|
12
|
-
tokens?: TokenConfig[];
|
13
|
-
};
|
14
|
-
export type BalancesCommonTransferMethods = "transfer_keep_alive" | "transfer_all";
|
15
|
-
export type BalancesTransferMethods = "transfer_allow_death" | BalancesCommonTransferMethods;
|
16
|
-
export type BalancesLegacyTransferMethods = "transfer" | BalancesCommonTransferMethods;
|
17
|
-
export type BalancesAllTransferMethods = BalancesLegacyTransferMethods | BalancesTransferMethods;
|
18
|
-
export type SelectableTokenType = Token;
|
19
|
-
export type ExtendableChainMeta = ChainMeta<Record<string, unknown> | null>;
|
20
|
-
export type DefaultChainMeta = ChainMeta<null>;
|
21
|
-
export type ExtendableModuleConfig = Record<string, unknown> | undefined;
|
22
|
-
export type ExtendableTokenConfig = Record<string, unknown> | undefined;
|
23
|
-
export type DefaultModuleConfig = undefined;
|
24
|
-
export type DefaultTokenConfig = undefined;
|
25
|
-
export type BaseTransferParams = {
|
26
|
-
tokenId: string;
|
27
|
-
from: string;
|
28
|
-
to: string;
|
29
|
-
amount: string;
|
30
|
-
transferMethod: BalancesAllTransferMethods;
|
31
|
-
metadataRpc: `0x${string}`;
|
32
|
-
};
|
33
|
-
export type ExtendableTransferParams = BaseTransferParams | undefined;
|
34
|
-
export type DefaultTransferParams = undefined;
|
35
|
-
export type NewTransferParamsType<T extends Record<string, unknown>> = BaseTransferParams & T;
|
36
|
-
export type TransferTokenTx = {
|
37
|
-
type: "substrate";
|
38
|
-
callData: string;
|
39
|
-
};
|
40
|
-
export type ChainConnectors = {
|
41
|
-
substrate?: ChainConnector;
|
42
|
-
evm?: ChainConnectorEvm;
|
43
|
-
};
|
44
|
-
export type Hydrate = {
|
45
|
-
chainConnectors: ChainConnectors;
|
46
|
-
chaindataProvider: ChaindataProvider;
|
47
|
-
};
|
48
|
-
export type NewBalanceModule<TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTokenConfig extends ExtendableTokenConfig = DefaultTokenConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams> = (hydrate: Hydrate) => BalanceModule<TModuleType, TTokenType, TChainMeta, TModuleConfig, TTokenConfig, TTransferParams>;
|
49
|
-
export interface BalanceModule<TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTokenConfig extends ExtendableTokenConfig = DefaultTokenConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams> extends BalanceModuleSubstrate<TModuleType, TTokenType, TChainMeta, TModuleConfig, TTokenConfig, TTransferParams>, BalanceModuleEvm<TModuleType, TTokenType, TChainMeta, TModuleConfig, TTokenConfig, TTransferParams> {
|
50
|
-
}
|
51
|
-
export declare const DefaultBalanceModule: <TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTokenConfig extends ExtendableTokenConfig = DefaultTokenConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams>(type: TModuleType) => BalanceModule<TModuleType, TTokenType, TChainMeta, TModuleConfig, TTokenConfig, TTransferParams>;
|
52
|
-
interface BalanceModuleSubstrate<TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta, TModuleConfig extends ExtendableModuleConfig, TTokenConfig extends ExtendableTokenConfig, TTransferParams extends ExtendableTransferParams> extends BalanceModuleCommon<TModuleType, TTokenType, TTransferParams> {
|
53
|
-
/** Pre-processes any substrate chain metadata required by this module ahead of time */
|
54
|
-
fetchSubstrateChainMeta(chainId: DotNetworkId, moduleConfig?: TModuleConfig, metadataRpc?: `0x${string}`): Promise<TChainMeta | null>;
|
55
|
-
/** Detects which tokens are available on a given substrate chain */
|
56
|
-
fetchSubstrateChainTokens(chainId: DotNetworkId, chainMeta: TChainMeta, moduleConfig?: TModuleConfig, tokens?: TTokenConfig[]): Promise<Record<TTokenType["id"], TTokenType>>;
|
57
|
-
}
|
58
|
-
interface BalanceModuleEvm<TModuleType extends string, TTokenType extends SelectableTokenType, TChainMeta extends ExtendableChainMeta = DefaultChainMeta, TModuleConfig extends ExtendableModuleConfig = DefaultModuleConfig, TTokenConfig extends ExtendableTokenConfig = DefaultTokenConfig, TTransferParams extends ExtendableTransferParams = DefaultTransferParams> extends BalanceModuleCommon<TModuleType, TTokenType, TTransferParams> {
|
59
|
-
/** Pre-processes any evm chain metadata required by this module ahead of time */
|
60
|
-
fetchEvmChainMeta(chainId: EthNetworkId, moduleConfig?: TModuleConfig): Promise<TChainMeta | null>;
|
61
|
-
/** Detects which tokens are available on a given evm chain */
|
62
|
-
fetchEvmChainTokens(chainId: EthNetworkId, chainMeta: TChainMeta, moduleConfig?: TModuleConfig, tokens?: TTokenConfig[]): Promise<Record<TTokenType["id"], TTokenType>>;
|
63
|
-
}
|
64
|
-
export type SubscriptionResultWithStatus = {
|
65
|
-
status: "initialising" | "live";
|
66
|
-
data: BalanceJson[];
|
67
|
-
};
|
68
|
-
interface BalanceModuleCommon<TModuleType extends string, TTokenType extends SelectableTokenType, TTransferParams extends ExtendableTransferParams> {
|
69
|
-
get type(): TModuleType;
|
70
|
-
/**
|
71
|
-
* Subscribe to balances for this module with optional filtering.
|
72
|
-
*
|
73
|
-
* If subscriptions are not possible, this function should poll at some reasonable interval.
|
74
|
-
*/
|
75
|
-
subscribeBalances({ addressesByToken, initialBalances, }: {
|
76
|
-
addressesByToken: AddressesByToken<TTokenType>;
|
77
|
-
initialBalances?: BalanceJson[];
|
78
|
-
}, callback: SubscriptionCallback<Balances | SubscriptionResultWithStatus>): Promise<UnsubscribeFn>;
|
79
|
-
/** Fetch balances for this module with optional filtering */
|
80
|
-
fetchBalances(addressesByToken: AddressesByToken<TTokenType>): Promise<Balances>;
|
81
|
-
/** Prepare a tx to transfer some tokens from this module */
|
82
|
-
transferToken(transferParams: TTransferParams): Promise<TransferTokenTx | null>;
|
83
|
-
}
|
84
|
-
export {};
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChaindataProvider, DotNetworkId } from "@talismn/chaindata-provider";
|
3
|
-
import { MiniMetadata } from "../types";
|
4
|
-
export declare const getUpdatedMiniMetadatas: (chainConnector: ChainConnector, chaindataProvider: ChaindataProvider, chainId: DotNetworkId, specVersion: number, signal?: AbortSignal) => Promise<MiniMetadata[]>;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChaindataProvider, NetworkId as DotNetworkId } from "@talismn/chaindata-provider";
|
3
|
-
import { AnyNewBalanceModule } from "../modules";
|
4
|
-
import { MiniMetadata } from "../types";
|
5
|
-
export declare const getMiniMetadata: <T extends AnyNewBalanceModule>(chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, chainId: DotNetworkId, source: string, signal?: AbortSignal) => Promise<MiniMetadata<T>>;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import { EvmErc20Token } from "@talismn/chaindata-provider";
|
2
|
-
import { erc20Abi } from "viem";
|
3
|
-
import z from "zod/v4";
|
4
|
-
import { DefaultChainMeta, DefaultModuleConfig, NewBalanceModule } from "../BalanceModule";
|
5
|
-
import { NewBalanceType } from "../types";
|
6
|
-
import { erc20BalancesAggregatorAbi } from "./abis/erc20BalancesAggregator";
|
7
|
-
export { erc20Abi, erc20BalancesAggregatorAbi };
|
8
|
-
type ModuleType = "evm-erc20";
|
9
|
-
export type EvmErc20ChainMeta = DefaultChainMeta;
|
10
|
-
export type EvmErc20ModuleConfig = DefaultModuleConfig;
|
11
|
-
export declare const EvmErc20TokenConfigSchema: z.ZodObject<{
|
12
|
-
symbol: z.ZodOptional<z.ZodString>;
|
13
|
-
networkId: z.ZodOptional<z.ZodString>;
|
14
|
-
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
15
|
-
decimals: z.ZodOptional<z.ZodInt>;
|
16
|
-
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
17
|
-
logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
18
|
-
coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
19
|
-
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
20
|
-
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
21
|
-
contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
22
|
-
}, z.core.$strict>;
|
23
|
-
export type EvmErc20TokenConfig = z.infer<typeof EvmErc20TokenConfigSchema>;
|
24
|
-
export type EvmErc20Balance = NewBalanceType<ModuleType, "simple">;
|
25
|
-
declare module "@talismn/balances/plugins" {
|
26
|
-
interface PluginBalanceTypes {
|
27
|
-
"evm-erc20": EvmErc20Balance;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
export declare const EvmErc20Module: NewBalanceModule<ModuleType, EvmErc20Token, EvmErc20ChainMeta, EvmErc20ModuleConfig, EvmErc20TokenConfig>;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { EvmNativeToken } from "@talismn/chaindata-provider";
|
2
|
-
import z from "zod/v4";
|
3
|
-
import { DefaultChainMeta, DefaultModuleConfig, NewBalanceModule } from "../BalanceModule";
|
4
|
-
import { NewBalanceType } from "../types";
|
5
|
-
type ModuleType = "evm-native";
|
6
|
-
export type EvmNativeChainMeta = DefaultChainMeta;
|
7
|
-
export type EvmNativeModuleConfig = DefaultModuleConfig;
|
8
|
-
export type EvmNativeBalance = NewBalanceType<ModuleType, "simple">;
|
9
|
-
export declare const EvmNativeTokenConfigSchema: z.ZodObject<{
|
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
|
-
}, z.core.$strict>;
|
20
|
-
export type EvmNativeTokenConfig = z.infer<typeof EvmNativeTokenConfigSchema>;
|
21
|
-
declare module "@talismn/balances/plugins" {
|
22
|
-
interface PluginBalanceTypes {
|
23
|
-
"evm-native": EvmNativeBalance;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
export declare const EvmNativeModule: NewBalanceModule<ModuleType, EvmNativeToken, EvmNativeChainMeta, EvmNativeModuleConfig, EvmNativeTokenConfig>;
|
27
|
-
export {};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { EvmUniswapV2Token } from "@talismn/chaindata-provider";
|
2
|
-
import z from "zod/v4";
|
3
|
-
import { DefaultChainMeta, DefaultModuleConfig, NewBalanceModule } from "../BalanceModule";
|
4
|
-
import { NewBalanceType } from "../types";
|
5
|
-
import { uniswapV2PairAbi } from "./abis/uniswapV2Pair";
|
6
|
-
export { uniswapV2PairAbi };
|
7
|
-
type ModuleType = "evm-uniswapv2";
|
8
|
-
export type EvmUniswapV2ChainMeta = DefaultChainMeta;
|
9
|
-
export declare const EvmUniswapV2TokenConfigSchema: z.ZodObject<{
|
10
|
-
symbol0: z.ZodOptional<z.ZodString>;
|
11
|
-
symbol1: z.ZodOptional<z.ZodString>;
|
12
|
-
decimals0: z.ZodOptional<z.ZodInt>;
|
13
|
-
decimals1: z.ZodOptional<z.ZodInt>;
|
14
|
-
tokenAddress0: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
15
|
-
tokenAddress1: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
16
|
-
coingeckoId0: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
17
|
-
coingeckoId1: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
18
|
-
symbol: z.ZodOptional<z.ZodString>;
|
19
|
-
networkId: z.ZodOptional<z.ZodString>;
|
20
|
-
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
21
|
-
decimals: z.ZodOptional<z.ZodInt>;
|
22
|
-
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
23
|
-
logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
24
|
-
coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
25
|
-
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
26
|
-
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
27
|
-
contractAddress: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
28
|
-
}, z.core.$strict>;
|
29
|
-
export type EvmUniswapV2TokenConfig = z.infer<typeof EvmUniswapV2TokenConfigSchema>;
|
30
|
-
export type EvmUniswapV2ModuleConfig = DefaultModuleConfig;
|
31
|
-
export type EvmUniswapV2Balance = NewBalanceType<"evm-uniswapv2", "complex">;
|
32
|
-
declare module "@talismn/balances/plugins" {
|
33
|
-
interface PluginBalanceTypes {
|
34
|
-
"evm-uniswapv2": EvmUniswapV2Balance;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
export declare const EvmUniswapV2Module: NewBalanceModule<ModuleType, EvmUniswapV2Token, EvmUniswapV2ChainMeta, EvmUniswapV2ModuleConfig, EvmUniswapV2TokenConfig>;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import { SubAssetsToken } from "@talismn/chaindata-provider";
|
4
|
-
import z from "zod/v4";
|
5
|
-
import { ChainMeta, DefaultModuleConfig, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
6
|
-
import { NewBalanceType } from "../types";
|
7
|
-
type ModuleType = "substrate-assets";
|
8
|
-
export type SubAssetsChainMeta = ChainMeta<null>;
|
9
|
-
export declare const SubAssetsTokenConfigSchema: z.ZodObject<{
|
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
|
-
assetId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUInt32, z.ZodString]>, z.ZodTransform<string, string | number>>;
|
20
|
-
}, z.core.$strict>;
|
21
|
-
export type SubAssetsTokenConfig = z.infer<typeof SubAssetsTokenConfigSchema>;
|
22
|
-
export type SubAssetsModuleConfig = DefaultModuleConfig;
|
23
|
-
export type SubAssetsBalance = NewBalanceType<ModuleType, "complex">;
|
24
|
-
declare module "@talismn/balances/plugins" {
|
25
|
-
interface PluginBalanceTypes {
|
26
|
-
"substrate-assets": SubAssetsBalance;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
export type SubAssetsTransferParams = NewTransferParamsType<{
|
30
|
-
registry: TypeRegistry;
|
31
|
-
blockHash: string;
|
32
|
-
blockNumber: number;
|
33
|
-
nonce: number;
|
34
|
-
specVersion: number;
|
35
|
-
transactionVersion: number;
|
36
|
-
tip?: string;
|
37
|
-
userExtensions?: ExtDef;
|
38
|
-
}>;
|
39
|
-
export declare const SubAssetsModule: NewBalanceModule<ModuleType, SubAssetsToken, SubAssetsChainMeta, SubAssetsModuleConfig, SubAssetsTokenConfig, SubAssetsTransferParams>;
|
40
|
-
export {};
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import { SubForeignAssetsToken } from "@talismn/chaindata-provider";
|
4
|
-
import z from "zod/v4";
|
5
|
-
import { DefaultChainMeta, DefaultModuleConfig, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
6
|
-
import { NewBalanceType } from "../types";
|
7
|
-
type ModuleType = "substrate-foreignassets";
|
8
|
-
export type SubForeignAssetsChainMeta = DefaultChainMeta;
|
9
|
-
export declare const SubForeignAssetsTokenConfigSchema: z.ZodObject<{
|
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.ZodString;
|
20
|
-
}, z.core.$strict>;
|
21
|
-
export type SubForeignAssetsTokenConfig = z.infer<typeof SubForeignAssetsTokenConfigSchema>;
|
22
|
-
export type SubForeignAssetsModuleConfig = DefaultModuleConfig;
|
23
|
-
export type SubForeignAssetsBalance = NewBalanceType<ModuleType, "complex">;
|
24
|
-
declare module "@talismn/balances/plugins" {
|
25
|
-
interface PluginBalanceTypes {
|
26
|
-
"substrate-foreignassets": SubForeignAssetsBalance;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
export type SubForeignAssetsTransferParams = NewTransferParamsType<{
|
30
|
-
registry: TypeRegistry;
|
31
|
-
blockHash: string;
|
32
|
-
blockNumber: number;
|
33
|
-
nonce: number;
|
34
|
-
specVersion: number;
|
35
|
-
transactionVersion: number;
|
36
|
-
tip?: string;
|
37
|
-
userExtensions?: ExtDef;
|
38
|
-
}>;
|
39
|
-
export declare const SubForeignAssetsModule: NewBalanceModule<ModuleType, SubForeignAssetsToken, SubForeignAssetsChainMeta, SubForeignAssetsModuleConfig, SubForeignAssetsTokenConfig, SubForeignAssetsTransferParams>;
|
40
|
-
export {};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { SubNativeToken } from "@talismn/chaindata-provider";
|
2
|
-
import z from "zod/v4";
|
3
|
-
import { NewBalanceModule } from "../../BalanceModule";
|
4
|
-
import { ModuleType, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams } from "./types";
|
5
|
-
export { filterBaseLocks, getLockTitle } from "./util/balanceLockTypes";
|
6
|
-
export type { BalanceLockType } from "./util/balanceLockTypes";
|
7
|
-
export type { ModuleType, SubNativeBalance, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTransferParams, } from "./types";
|
8
|
-
export * from "./util/subtensor";
|
9
|
-
export declare const SubNativeTokenConfigSchema: z.ZodObject<{
|
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
|
-
}, z.core.$strict>;
|
20
|
-
export type SubNativeTokenConfig = z.infer<typeof SubNativeTokenConfigSchema>;
|
21
|
-
export declare const SubNativeModule: NewBalanceModule<ModuleType, SubNativeToken, SubNativeChainMeta, SubNativeModuleConfig, SubNativeTokenConfig, SubNativeTransferParams>;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { SubscriptionCallback } from "../../types";
|
3
|
-
import { RpcStateQuery } from "../util";
|
4
|
-
import { SubNativeBalance } from "./types";
|
5
|
-
export declare function subscribeBase(queries: RpcStateQuery<SubNativeBalance>[], chainConnector: ChainConnector, callback: SubscriptionCallback<SubNativeBalance[]>): Promise<import("../../types").UnsubscribeFn>;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChaindataProvider, SubNativeToken } from "@talismn/chaindata-provider";
|
3
|
-
import { AddressesByToken, SubscriptionCallback } from "../../types";
|
4
|
-
import { SubNativeBalance } from "./types";
|
5
|
-
export declare function subscribeNompoolStaking(chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, addressesByToken: AddressesByToken<SubNativeToken>, callback: SubscriptionCallback<SubNativeBalance[]>, signal?: AbortSignal): Promise<() => void>;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChaindataProvider, SubNativeToken } from "@talismn/chaindata-provider";
|
3
|
-
import { AddressesByToken, SubscriptionCallback } from "../../types";
|
4
|
-
import { SubNativeBalance } from "./types";
|
5
|
-
export declare function subscribeSubtensorStaking(chaindataProvider: ChaindataProvider, chainConnector: ChainConnector, addressesByToken: AddressesByToken<SubNativeToken>, callback: SubscriptionCallback<SubNativeBalance[]>, signal?: AbortSignal): Promise<() => void>;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import { SubNativeBalancesConfig } from "@talismn/chaindata-provider";
|
4
|
-
import { ChainMeta, NewTransferParamsType } from "../../BalanceModule";
|
5
|
-
import { NewBalanceType } from "../../types";
|
6
|
-
export { filterBaseLocks, getLockTitle } from "./util/balanceLockTypes";
|
7
|
-
export type { BalanceLockType } from "./util/balanceLockTypes";
|
8
|
-
export type ModuleType = "substrate-native";
|
9
|
-
export declare const moduleType: ModuleType;
|
10
|
-
export type SubNativeChainMeta = ChainMeta<{
|
11
|
-
useLegacyTransferableCalculation?: boolean;
|
12
|
-
existentialDeposit?: string;
|
13
|
-
nominationPoolsPalletId?: string;
|
14
|
-
hasSubtensorPallet?: boolean;
|
15
|
-
} | null>;
|
16
|
-
export type SubNativeModuleConfig = SubNativeBalancesConfig;
|
17
|
-
export type SubNativeBalance = NewBalanceType<ModuleType, "complex">;
|
18
|
-
declare module "@talismn/balances/plugins" {
|
19
|
-
interface PluginBalanceTypes {
|
20
|
-
"substrate-native": SubNativeBalance;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
export type SubNativeTransferParams = NewTransferParamsType<{
|
24
|
-
registry: TypeRegistry;
|
25
|
-
blockHash: string;
|
26
|
-
blockNumber: number;
|
27
|
-
nonce: number;
|
28
|
-
specVersion: number;
|
29
|
-
transactionVersion: number;
|
30
|
-
tip?: string;
|
31
|
-
userExtensions?: ExtDef;
|
32
|
-
}>;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { ChainConnector } from "@talismn/chain-connector";
|
2
|
-
import { ChaindataProvider, SubNativeToken } from "@talismn/chaindata-provider";
|
3
|
-
import { AddressesByToken } from "../../../types";
|
4
|
-
import { RpcStateQuery } from "../../util";
|
5
|
-
import { SubNativeBalance } from "../types";
|
6
|
-
export declare class QueryCache {
|
7
|
-
#private;
|
8
|
-
private chaindataProvider;
|
9
|
-
private miniMetadatas;
|
10
|
-
private balanceQueryCache;
|
11
|
-
constructor(chaindataProvider: ChaindataProvider, chainConnector: ChainConnector);
|
12
|
-
getQueries(addressesByToken: AddressesByToken<SubNativeToken>): Promise<RpcStateQuery<SubNativeBalance>[]>;
|
13
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Observable } from "rxjs";
|
2
|
-
import { SubscriptionCallback, UnsubscribeFn } from "../../../types";
|
3
|
-
/**
|
4
|
-
* Converts a subscription function into an Observable
|
5
|
-
*
|
6
|
-
* The type of a subscription function which can be converted into an observable:
|
7
|
-
*
|
8
|
-
* <TArgs, TResult>(...arguments: TArgs, callback: SubscriptionCallback<TResult>) => UnsubscribeFn
|
9
|
-
*/
|
10
|
-
export declare const asObservable: <T extends unknown[], R>(handler: (...args: [...T, SubscriptionCallback<R>]) => UnsubscribeFn) => (...args: T) => Observable<R>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Balance, BalanceFormatter, LockedAmount } from "../../../types";
|
2
|
-
export type BalanceLockType = "reserved" | "democracy" | "crowdloan" | "staking" | "nompools-staking" | "nompools-unbonding" | "subtensor-staking" | "vesting" | "dapp-staking" | `other-${string}` | "other";
|
3
|
-
/**
|
4
|
-
* For converting the value of `lock?.id?.toUtf8?.()` which is retrieved from
|
5
|
-
* the Balances.Locks storage key into a useful classification for our UI
|
6
|
-
*/
|
7
|
-
export declare const getLockedType: (input?: string) => BalanceLockType;
|
8
|
-
export declare const filterBaseLocks: (locks: Array<Omit<LockedAmount<string>, "amount"> & {
|
9
|
-
amount: BalanceFormatter;
|
10
|
-
}>) => (Omit<LockedAmount<string>, "amount"> & {
|
11
|
-
amount: BalanceFormatter;
|
12
|
-
})[];
|
13
|
-
export declare const getLockTitle: (lock: Pick<LockedAmount<string>, "label" | "meta">, { balance }?: {
|
14
|
-
balance?: Balance;
|
15
|
-
}) => string;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { DotNetwork, DotNetworkId, SubNativeToken, Token } from "@talismn/chaindata-provider";
|
2
|
-
import { SubNativeModule } from "..";
|
3
|
-
import { AddressesByToken, MiniMetadata } from "../../../types";
|
4
|
-
import { RpcStateQuery, StorageCoders } from "../../util";
|
5
|
-
import { SubNativeBalance } from "../types";
|
6
|
-
export type QueryKey = string;
|
7
|
-
export declare function buildQueries(chains: Record<string, DotNetwork>, tokens: Record<string, Token>, chainStorageCoders: StorageCoders<{
|
8
|
-
base: ["System", "Account"];
|
9
|
-
stakingLedger: ["Staking", "Ledger"];
|
10
|
-
reserves: ["Balances", "Reserves"];
|
11
|
-
holds: ["Balances", "Holds"];
|
12
|
-
locks: ["Balances", "Locks"];
|
13
|
-
freezes: ["Balances", "Freezes"];
|
14
|
-
}>, miniMetadatas: Map<DotNetworkId, MiniMetadata<typeof SubNativeModule>>, addressesByToken: AddressesByToken<SubNativeToken>): Promise<Record<QueryKey, Array<RpcStateQuery<SubNativeBalance>>>>;
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { SubNativeBalance } from "../types";
|
2
|
-
export { filterBaseLocks, getLockTitle } from "./balanceLockTypes";
|
3
|
-
export type { BalanceLockType } from "./balanceLockTypes";
|
4
|
-
/**
|
5
|
-
* Function to merge two 'sub sources' of the same balance together, or
|
6
|
-
* two instances of the same balance with different values.
|
7
|
-
* @param balance1 SubNativeBalance
|
8
|
-
* @param balance2 SubNativeBalance
|
9
|
-
* @param source source that this merge is for (will discard previous values from that source)
|
10
|
-
* @param clear whether to clear the previous values from the source
|
11
|
-
* @returns SubNativeBalance
|
12
|
-
*/
|
13
|
-
export declare const mergeBalances: (balance1: SubNativeBalance | undefined, balance2: SubNativeBalance, source: string, clear: boolean) => SubNativeBalance;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { SS58String } from "polkadot-api";
|
2
|
-
/** The stash account for the nomination pool */
|
3
|
-
export declare const nompoolStashAccountId: (palletId: string, poolId: string | number) => SS58String;
|
4
|
-
/** The rewards account for the nomination pool */
|
5
|
-
export declare const nompoolRewardAccountId: (palletId: string, poolId: string | number) => SS58String;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const sortChainsNativeTokensByPriority: (a: string, b: string) => 0 | 1 | -1;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import type { bittensor } from "@polkadot-api/descriptors";
|
2
|
-
export type GetStakeInfoForColdkeyParams = (typeof bittensor)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkey"][0];
|
3
|
-
export type GetStakeInfoForColdkeyResult = (typeof bittensor)["descriptors"]["apis"]["StakeInfoRuntimeApi"]["get_stake_info_for_coldkey"][1];
|
4
|
-
export type GetDynamicInfoParams = (typeof bittensor)["descriptors"]["apis"]["SubnetInfoRuntimeApi"]["get_dynamic_info"][0];
|
5
|
-
export type GetDynamicInfoResult = (typeof bittensor)["descriptors"]["apis"]["SubnetInfoRuntimeApi"]["get_dynamic_info"][1];
|
6
|
-
export declare const SUBTENSOR_ROOT_NETUID = 0;
|
7
|
-
export declare const SUBTENSOR_MIN_STAKE_AMOUNT_PLANK = 1000000n;
|
8
|
-
export declare const SCALE_FACTOR: bigint;
|
9
|
-
export declare const ONE_ALPHA_TOKEN: bigint;
|
10
|
-
export declare const calculateAlphaPrice: ({ dynamicInfo, }: {
|
11
|
-
dynamicInfo: GetDynamicInfoResult | null | undefined;
|
12
|
-
}) => bigint;
|
13
|
-
export declare const calculateTaoAmountFromAlpha: ({ alphaPrice, alphaStaked, }: {
|
14
|
-
alphaPrice: bigint;
|
15
|
-
alphaStaked: bigint;
|
16
|
-
}) => bigint;
|
17
|
-
export declare const calculateTaoFromDynamicInfo: ({ dynamicInfo, alphaStaked, }: {
|
18
|
-
dynamicInfo: GetDynamicInfoResult | null | undefined;
|
19
|
-
alphaStaked: bigint;
|
20
|
-
}) => bigint;
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import { SubPsp22Token } from "@talismn/chaindata-provider";
|
4
|
-
import z from "zod/v4";
|
5
|
-
import { DefaultChainMeta, DefaultModuleConfig, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
6
|
-
import { NewBalanceType } from "../types";
|
7
|
-
type ModuleType = "substrate-psp22";
|
8
|
-
export declare const SubPsp22TokenConfigSchema: z.ZodObject<{
|
9
|
-
symbol: z.ZodOptional<z.ZodString>;
|
10
|
-
networkId: z.ZodOptional<z.ZodString>;
|
11
|
-
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
12
|
-
decimals: z.ZodOptional<z.ZodInt>;
|
13
|
-
name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
14
|
-
logo: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
15
|
-
coingeckoId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
16
|
-
noDiscovery: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
17
|
-
mirrorOf: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
18
|
-
contractAddress: z.ZodString;
|
19
|
-
}, z.core.$strict>;
|
20
|
-
export type SubPsp22TokenConfig = z.infer<typeof SubPsp22TokenConfigSchema>;
|
21
|
-
export type SubPsp22ChainMeta = DefaultChainMeta;
|
22
|
-
export type SubPsp22ModuleConfig = DefaultModuleConfig;
|
23
|
-
export type SubPsp22Balance = NewBalanceType<ModuleType, "simple">;
|
24
|
-
declare module "@talismn/balances/plugins" {
|
25
|
-
interface PluginBalanceTypes {
|
26
|
-
"substrate-psp22": SubPsp22Balance;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
export type SubPsp22TransferParams = NewTransferParamsType<{
|
30
|
-
registry: TypeRegistry;
|
31
|
-
blockHash: string;
|
32
|
-
blockNumber: number;
|
33
|
-
nonce: number;
|
34
|
-
specVersion: number;
|
35
|
-
transactionVersion: number;
|
36
|
-
tip?: string;
|
37
|
-
userExtensions?: ExtDef;
|
38
|
-
}>;
|
39
|
-
export declare const SubPsp22Module: NewBalanceModule<ModuleType, SubPsp22Token, SubPsp22ChainMeta, SubPsp22ModuleConfig, SubPsp22TokenConfig, SubPsp22TransferParams>;
|
40
|
-
export {};
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import { TypeRegistry } from "@polkadot/types";
|
2
|
-
import { ExtDef } from "@polkadot/types/extrinsic/signedExtensions/types";
|
3
|
-
import { SubTokensBalancesConfig, SubTokensToken } from "@talismn/chaindata-provider";
|
4
|
-
import z from "zod/v4";
|
5
|
-
import { ChainMeta, NewBalanceModule, NewTransferParamsType } from "../BalanceModule";
|
6
|
-
import { NewBalanceType } from "../types";
|
7
|
-
type ModuleType = "substrate-tokens";
|
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<{
|
23
|
-
palletId?: string;
|
24
|
-
}>;
|
25
|
-
export type SubTokensModuleConfig = SubTokensBalancesConfig;
|
26
|
-
export type SubTokensBalance = NewBalanceType<ModuleType, "complex">;
|
27
|
-
declare module "@talismn/balances/plugins" {
|
28
|
-
interface PluginBalanceTypes {
|
29
|
-
"substrate-tokens": SubTokensBalance;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
export type SubTokensTransferParams = NewTransferParamsType<{
|
33
|
-
registry: TypeRegistry;
|
34
|
-
blockHash: string;
|
35
|
-
blockNumber: number;
|
36
|
-
nonce: number;
|
37
|
-
specVersion: number;
|
38
|
-
transactionVersion: number;
|
39
|
-
tip?: string;
|
40
|
-
userExtensions?: ExtDef;
|
41
|
-
}>;
|
42
|
-
export declare const SubTokensModule: NewBalanceModule<ModuleType, SubTokensToken, SubTokensChainMeta, SubTokensModuleConfig, SubTokensTokenConfig, SubTokensTransferParams>;
|
43
|
-
export {};
|