@swapkit/wallet-keystore 1.0.0-rc.118 → 1.0.0-rc.119
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 +34 -34
- package/dist/index.js.map +3 -3
- package/package.json +11 -11
- package/src/keystore.ts +11 -12
package/dist/index.js
CHANGED
|
@@ -18215,6 +18215,38 @@ DerivationPath,
|
|
|
18215
18215
|
WalletOption,
|
|
18216
18216
|
setRequestClientConfig
|
|
18217
18217
|
} from "@swapkit/helpers";
|
|
18218
|
+
var connectKeystore = function({
|
|
18219
|
+
addChain,
|
|
18220
|
+
apis,
|
|
18221
|
+
rpcUrls,
|
|
18222
|
+
config: { thorswapApiKey, covalentApiKey, ethplorerApiKey, blockchairApiKey, stagenet }
|
|
18223
|
+
}) {
|
|
18224
|
+
return async function connectKeystore(chains, phrase, index = 0) {
|
|
18225
|
+
setRequestClientConfig({ apiKey: thorswapApiKey });
|
|
18226
|
+
const promises = chains.map(async (chain) => {
|
|
18227
|
+
const { address, walletMethods } = await getWalletMethodsForChain({
|
|
18228
|
+
index,
|
|
18229
|
+
chain,
|
|
18230
|
+
api: apis[chain],
|
|
18231
|
+
rpcUrl: rpcUrls[chain],
|
|
18232
|
+
covalentApiKey,
|
|
18233
|
+
ethplorerApiKey,
|
|
18234
|
+
phrase,
|
|
18235
|
+
blockchairApiKey,
|
|
18236
|
+
stagenet
|
|
18237
|
+
});
|
|
18238
|
+
addChain({
|
|
18239
|
+
chain,
|
|
18240
|
+
address,
|
|
18241
|
+
balance: [],
|
|
18242
|
+
walletType: WalletOption.KEYSTORE,
|
|
18243
|
+
...walletMethods
|
|
18244
|
+
});
|
|
18245
|
+
});
|
|
18246
|
+
await Promise.all(promises);
|
|
18247
|
+
return true;
|
|
18248
|
+
};
|
|
18249
|
+
};
|
|
18218
18250
|
var getWalletMethodsForChain = async ({
|
|
18219
18251
|
api,
|
|
18220
18252
|
rpcUrl,
|
|
@@ -18356,39 +18388,7 @@ var getWalletMethodsForChain = async ({
|
|
|
18356
18388
|
throw new Error(`Unsupported chain ${chain}`);
|
|
18357
18389
|
}
|
|
18358
18390
|
};
|
|
18359
|
-
var
|
|
18360
|
-
addChain,
|
|
18361
|
-
apis,
|
|
18362
|
-
rpcUrls,
|
|
18363
|
-
config: { thorswapApiKey, covalentApiKey, ethplorerApiKey, blockchairApiKey, stagenet }
|
|
18364
|
-
}) => async (chains, phrase, index = 0) => {
|
|
18365
|
-
setRequestClientConfig({ apiKey: thorswapApiKey });
|
|
18366
|
-
const promises = chains.map(async (chain) => {
|
|
18367
|
-
const { address, walletMethods } = await getWalletMethodsForChain({
|
|
18368
|
-
index,
|
|
18369
|
-
chain,
|
|
18370
|
-
api: apis[chain],
|
|
18371
|
-
rpcUrl: rpcUrls[chain],
|
|
18372
|
-
covalentApiKey,
|
|
18373
|
-
ethplorerApiKey,
|
|
18374
|
-
phrase,
|
|
18375
|
-
blockchairApiKey,
|
|
18376
|
-
stagenet
|
|
18377
|
-
});
|
|
18378
|
-
addChain({
|
|
18379
|
-
chain,
|
|
18380
|
-
address,
|
|
18381
|
-
balance: [],
|
|
18382
|
-
walletType: WalletOption.KEYSTORE,
|
|
18383
|
-
...walletMethods
|
|
18384
|
-
});
|
|
18385
|
-
});
|
|
18386
|
-
await Promise.all(promises);
|
|
18387
|
-
};
|
|
18388
|
-
var keystoreWallet = {
|
|
18389
|
-
connectMethodName: "connectKeystore",
|
|
18390
|
-
connect: connectKeystore
|
|
18391
|
-
};
|
|
18391
|
+
var keystoreWallet = { connectKeystore };
|
|
18392
18392
|
export {
|
|
18393
18393
|
validatePhrase,
|
|
18394
18394
|
keystoreWallet,
|
|
@@ -18397,4 +18397,4 @@ export {
|
|
|
18397
18397
|
decryptFromKeystore
|
|
18398
18398
|
};
|
|
18399
18399
|
|
|
18400
|
-
//# debugId=
|
|
18400
|
+
//# debugId=1C72B27EBA29154564756e2164756e21
|