@keplr-wallet/types 0.12.298 → 0.12.300-rc.0
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/build/chain-info.d.ts +22 -13
- package/package.json +2 -2
- package/src/chain-info.ts +39 -24
package/build/chain-info.d.ts
CHANGED
|
@@ -66,24 +66,33 @@ export interface BitcoinChainInfo {
|
|
|
66
66
|
readonly bip44: BIP44;
|
|
67
67
|
readonly currencies: AppCurrency[];
|
|
68
68
|
}
|
|
69
|
-
export
|
|
70
|
-
|
|
69
|
+
export interface EVMNativeChainInfo {
|
|
70
|
+
readonly rpc: string;
|
|
71
|
+
readonly chainId: number;
|
|
72
|
+
readonly websocket?: string;
|
|
73
|
+
readonly currencies: AppCurrency[];
|
|
74
|
+
readonly feeCurrencies: FeeCurrency[];
|
|
75
|
+
readonly bip44: BIP44;
|
|
76
|
+
readonly features?: string[];
|
|
77
|
+
}
|
|
78
|
+
export type ChainInfoModule = "cosmos" | "starknet" | "bitcoin" | "evm";
|
|
79
|
+
export interface ModularChainInfoBase {
|
|
71
80
|
readonly chainId: string;
|
|
72
81
|
readonly chainName: string;
|
|
73
82
|
readonly chainSymbolImageUrl?: string;
|
|
74
83
|
readonly isTestnet?: boolean;
|
|
75
|
-
readonly
|
|
84
|
+
readonly isNative?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type ModularChainInfo = ModularChainInfoBase & ({
|
|
87
|
+
readonly cosmos: Omit<ChainInfo, "evm">;
|
|
76
88
|
} | {
|
|
77
|
-
readonly chainId: string;
|
|
78
|
-
readonly chainName: string;
|
|
79
|
-
readonly chainSymbolImageUrl?: string;
|
|
80
|
-
readonly isTestnet?: boolean;
|
|
81
89
|
readonly starknet: StarknetChainInfo;
|
|
82
90
|
} | {
|
|
83
|
-
readonly chainId: string;
|
|
84
|
-
readonly chainName: string;
|
|
85
|
-
readonly chainSymbolImageUrl?: string;
|
|
86
|
-
readonly linkedChainKey: string;
|
|
87
|
-
readonly isTestnet?: boolean;
|
|
88
91
|
readonly bitcoin: BitcoinChainInfo;
|
|
89
|
-
|
|
92
|
+
readonly linkedChainKey: string;
|
|
93
|
+
} | {
|
|
94
|
+
readonly evm: EVMNativeChainInfo;
|
|
95
|
+
} | {
|
|
96
|
+
readonly cosmos: Omit<ChainInfo, "evm">;
|
|
97
|
+
readonly evm: EVMNativeChainInfo;
|
|
98
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keplr-wallet/types",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.300-rc.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"author": "chainapsis",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"starknet": "^7"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "8381489c409d1fe7810a8da05982c7d9432c6ff7"
|
|
25
25
|
}
|
package/src/chain-info.ts
CHANGED
|
@@ -81,28 +81,43 @@ export interface BitcoinChainInfo {
|
|
|
81
81
|
readonly currencies: AppCurrency[];
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export
|
|
84
|
+
export interface EVMNativeChainInfo {
|
|
85
|
+
readonly rpc: string;
|
|
86
|
+
readonly chainId: number;
|
|
87
|
+
readonly websocket?: string;
|
|
88
|
+
readonly currencies: AppCurrency[];
|
|
89
|
+
readonly feeCurrencies: FeeCurrency[];
|
|
90
|
+
readonly bip44: BIP44;
|
|
91
|
+
readonly features?: string[];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type ChainInfoModule = "cosmos" | "starknet" | "bitcoin" | "evm";
|
|
95
|
+
|
|
96
|
+
export interface ModularChainInfoBase {
|
|
97
|
+
readonly chainId: string;
|
|
98
|
+
readonly chainName: string;
|
|
99
|
+
readonly chainSymbolImageUrl?: string;
|
|
100
|
+
readonly isTestnet?: boolean;
|
|
101
|
+
readonly isNative?: boolean;
|
|
102
|
+
}
|
|
85
103
|
|
|
86
|
-
export type ModularChainInfo =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
readonly isTestnet?: boolean;
|
|
107
|
-
readonly bitcoin: BitcoinChainInfo;
|
|
108
|
-
};
|
|
104
|
+
export type ModularChainInfo = ModularChainInfoBase &
|
|
105
|
+
(
|
|
106
|
+
| {
|
|
107
|
+
readonly cosmos: Omit<ChainInfo, "evm">;
|
|
108
|
+
}
|
|
109
|
+
| {
|
|
110
|
+
readonly starknet: StarknetChainInfo;
|
|
111
|
+
}
|
|
112
|
+
| {
|
|
113
|
+
readonly bitcoin: BitcoinChainInfo;
|
|
114
|
+
readonly linkedChainKey: string;
|
|
115
|
+
}
|
|
116
|
+
| {
|
|
117
|
+
readonly evm: EVMNativeChainInfo;
|
|
118
|
+
}
|
|
119
|
+
| {
|
|
120
|
+
readonly cosmos: Omit<ChainInfo, "evm">;
|
|
121
|
+
readonly evm: EVMNativeChainInfo;
|
|
122
|
+
}
|
|
123
|
+
);
|