@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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@scure/bip39": "1.3.0",
4
- "@swapkit/helpers": "1.0.4",
5
- "@swapkit/toolbox-cosmos": "1.0.4",
6
- "@swapkit/toolbox-evm": "1.0.4",
7
- "@swapkit/toolbox-radix": "1.0.4",
8
- "@swapkit/toolbox-solana": "1.0.4",
9
- "@swapkit/toolbox-substrate": "1.0.4",
10
- "@swapkit/toolbox-utxo": "1.0.4",
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.4"
38
+ "version": "1.0.5"
39
39
  }
package/src/helpers.ts CHANGED
@@ -1,4 +1,4 @@
1
- import crypto from "node:crypto";
1
+ import crypto from "crypto";
2
2
  import { generateMnemonic, validateMnemonic } from "@scure/bip39";
3
3
  import { wordlist } from "@scure/bip39/wordlists/english";
4
4
  import { blake2bFinal, blake2bInit, blake2bUpdate } from "blakejs";
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 (toolbox as ThorchainToolboxType).signMessage(privateKey, message);
187
+ return toolbox.signMessage({ privateKey, message });
181
188
  };
182
189
 
183
190
  const walletMethods = {