skip to Main Content

Flutter – how do I convert mnemonic to AsymmetricKeyPair using secp256k1 in dart

I have generated mnemonic using bip39.generateMnemonic();. I need to convert this mnemonic to AsymmetricKeyPair with secp256k1. AsymmetricKeyPair<PublicKey, PrivateKey> secp256k1KeyPair() { var keyParams = ECKeyGeneratorParameters(ECCurve_secp256k1()); var mnemonic = getMnemonic(); var seed = bip39.mnemonicToSeed(mnemonic); print('mnemonicToSeed=========$seed'); var random = FortunaRandom(); random.seed(KeyParameter(seed)); var generator…

VIEW QUESTION

How to make safety saving private keys to mongodb? JavaScript, node.js

using the web3.eth.account.create() method returns: { address: "0xb8CE9ab6943e0eCED004cDe8e3bBed6568B2Fa01", privateKey: "0x348ce564d427a3311b6536bbcff9390d69395b06ed6c486954e971d960fe8709", signTransaction: function(tx){...}, sign: function(data){...}, encrypt: function(password){...} } How to make safety saving private keys to mongodb? I was researching bcrypt, hashcode, but hascode is not safety and bcrypt encoding requires…

VIEW QUESTION

Javascript – Reference error: API_URL_KEY is not defined

hardhat.config.js require("@nomicfoundation/hardhat-toolbox"); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: "0.8.18", }; /* @type import('hardhat/config').HardhatUserConfig*/ require("@nomiclabs/hardhat-ethers"); require('dotenv').config(); const { API_URL_KEY, PRIVATE_KEY } = process.env; module.exports = { solidity: "0.8.17", defaultNetwork: "goerli", networks: { hardhat: {}, goerli: { url: API_URL_KEY, account:…

VIEW QUESTION
Back To Top
Search