@swapkit/wallet-keystore 1.0.4 → 1.0.5
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/index.js +8 -8
- package/dist/index.js.map +4 -4
- package/package.json +8 -8
- package/src/helpers.ts +1 -1
- package/src/keystore.ts +9 -2
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@scure/bip39": "1.3.0",
|
|
4
|
-
"@swapkit/helpers": "1.0
|
|
5
|
-
"@swapkit/toolbox-cosmos": "1.0.
|
|
6
|
-
"@swapkit/toolbox-evm": "1.0
|
|
7
|
-
"@swapkit/toolbox-radix": "1.0.
|
|
8
|
-
"@swapkit/toolbox-solana": "1.0.
|
|
9
|
-
"@swapkit/toolbox-substrate": "1.0
|
|
10
|
-
"@swapkit/toolbox-utxo": "1.0.
|
|
4
|
+
"@swapkit/helpers": "1.1.0",
|
|
5
|
+
"@swapkit/toolbox-cosmos": "1.0.5",
|
|
6
|
+
"@swapkit/toolbox-evm": "1.1.0",
|
|
7
|
+
"@swapkit/toolbox-radix": "1.0.5",
|
|
8
|
+
"@swapkit/toolbox-solana": "1.0.5",
|
|
9
|
+
"@swapkit/toolbox-substrate": "1.1.0",
|
|
10
|
+
"@swapkit/toolbox-utxo": "1.0.5",
|
|
11
11
|
"blakejs": "1.2.1",
|
|
12
12
|
"micro-key-producer": "0.7.0"
|
|
13
13
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
},
|
|
36
36
|
"type": "module",
|
|
37
37
|
"types": "./src/index.ts",
|
|
38
|
-
"version": "1.0.
|
|
38
|
+
"version": "1.0.5"
|
|
39
39
|
}
|
package/src/helpers.ts
CHANGED
package/src/keystore.ts
CHANGED
|
@@ -145,7 +145,14 @@ const getWalletMethodsForChain = async ({
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
case Chain.Cosmos:
|
|
148
|
-
case Chain.Kujira:
|
|
148
|
+
case Chain.Kujira: {
|
|
149
|
+
const { getToolboxByChain } = await import("@swapkit/toolbox-cosmos");
|
|
150
|
+
const toolbox = getToolboxByChain(chain)({ server: api, stagenet });
|
|
151
|
+
const address = await toolbox.getAddressFromMnemonic(phrase);
|
|
152
|
+
|
|
153
|
+
return { address, walletMethods: toolbox };
|
|
154
|
+
}
|
|
155
|
+
|
|
149
156
|
case Chain.Maya:
|
|
150
157
|
case Chain.THORChain: {
|
|
151
158
|
const { getToolboxByChain } = await import("@swapkit/toolbox-cosmos");
|
|
@@ -177,7 +184,7 @@ const getWalletMethodsForChain = async ({
|
|
|
177
184
|
|
|
178
185
|
const signMessage = async (message: string) => {
|
|
179
186
|
const privateKey = await toolbox.createPrivateKeyFromPhrase(phrase);
|
|
180
|
-
return
|
|
187
|
+
return toolbox.signMessage({ privateKey, message });
|
|
181
188
|
};
|
|
182
189
|
|
|
183
190
|
const walletMethods = {
|