Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Pedro Maia Coelho
    @pm-coelho
    and with the same mnemonic + passphrase get the addresses for both coins
    I think I wont use the mnemonic + passphrase approach to generate the wallets and will stick to mnemonic
    thank you for the answers
    George Spasov
    @Perseverance
    Thanks, keep us posted what happened and do not hesitate to ask or answer questions here :smile:
    dtmle
    @dtmle
    Hi there, I saw this on github today
    const ethers = require('ethers');
    const mnemonic = await ethers.HDNode.entropyToMnemonic(ethers.utils.randomBytes(16));
    const wallet = Wallet.fromMnemonic(mnemonic);
    Where does the Wallet object come from?
    Thank you guys
    I mean stackoverflow whoops
    George Spasov
    @Perseverance
    I will update it sorry about that. It is ethers.Wallet
    @dtmle
    Updated the answer
    dtmle
    @dtmle
    Thank you very much George!
    George Spasov
    @Perseverance
    No worries keep us posted on what you are doing and do not hesitate to ask us more questions :)
    dtmle
    @dtmle
    I'm trying to write a wrapper for web3 that is compatible with mnemonic, private key, json keystore, ledger, trezor, digital bitbox.
    const initialize = function(network) {
      return new Promise((resolve, reject) => {
        //Make sure network is supplied
        if (network === undefined) {
          return reject(new Error("No network provided. Will not initialize."));
        }
        //Lazy load
        if (!web3) {
          //Check if injection is wanted
          if (network === "injection") {
            //Check if injection exists
            useInjection()
              .then(result => {
                return resolve(result);
              })
              //catch if injection does not exist
              .catch(err => {
                return reject(err);
              });
          } else {
            //Otherwise, initialize with network provided
            web3 = new Web3(network);
            return resolve(web3);
          }
        } else {
          //web3 already initialized error
          return reject(
            new Error(
              "Web3 already initialized. use setProvider() if trying to change providers."
            )
          );
        }
      });
    };
    George Spasov
    @Perseverance
    Have you checked ethers.js it has a lot of these things and the guy behind is quite the superstar IMO
    dtmle
    @dtmle
    I am definitely gonna look at it, it seems like itd be easier than using a bunch of different node packages
    Currently, my support for private key uses web3.eth.accounts.wallet.add(privateKey), but I don't know how to tackle mnemonic and the others quite yet
    George Spasov
    @Perseverance
    Absolutely, we are writing deployer based on it as opposed to the truffle one with web3
    dtmle
    @dtmle
    Thank you for the suggestion, this seems like the solution!!!
    Also, how do others write the documentation sites like this?:https://docs.ethers.io/ethers.js/html/
    Do I need to host it myself?
    George Spasov
    @Perseverance
    Google “ReadTheDocs”
    dtmle
    @dtmle
    Thank you very much George for all your help
    George Spasov
    @Perseverance
    👍
    dtmle
    @dtmle
    Hi, I am trying to deploy a contract using an infura node. I always get the error Invalid JSON RPC Response ""
    George Spasov
    @Perseverance
    Have you tried etherlime?
    dtmle
    @dtmle
    I know infura does not store private keys, so I've added the account using web3.eth.accounts.wallet.add(privKey).
    I have not, I will look at that
    George Spasov
    @Perseverance
    let me help:
    Check this and tell me if it helps
    dtmle
    @dtmle
    Thank you, so instead of using deploy() from web3 I'll use this? I would like to keep the number of packages to a minimum but this looks like it does the job cleaner than web3
    George Spasov
    @Perseverance
    Most of the things do a cleaner job than web3 :D
    dtmle
    @dtmle
    web3 is a joke of a library, but it does its job haha. I hate web3
    ctrlventure
    @ctrlventure
    @Perseverance Hi, i just saw your comment reply on stackexchange so here i am to see if you can help me out with the "TypeError: Cannot read property 'actions' of undefined" i'm getting on deploy
    George Spasov
    @Perseverance
    Let’s take this in private
    dtmle
    @dtmle
    Has anybody been able to get all transactions from a given address without traversing the whole blockchain using web3.js or any other javascript module?
    I know QuickBlock and Ethslurp have some functionalities like that, but they are not wrapped for node.js
    George Spasov
    @Perseverance
    I think in ethers there was an example of this
    Check out their docs
    dtmle
    @dtmle
    @Perseverance , could not find any examples or functions inside ether.js that try to get all transactions from an address. I do not believe there is an efficient implementation inside JavaScript right now without having to have the whole blockchain stored locally.
    George Spasov
    @Perseverance
    Yeah you are right. They have something about balances. Maybe you can use infura instead of local node?
    Martin Grigorov
    @martin_grigorov_twitter
    Hey all, the summer is ending and the etheremum meetups are back.
    Here is the video from the last meetup last week:
    https://www.youtube.com/watch?v=-zJ34QsP7LA
    We talked and watched a demo for etherlime
    BVenki
    @BVenki
    Hi
    Can any one guide me how to create a wallet with mnemonic+passphrase with ethers.js or some another node module for nodejs
    George Spasov
    @Perseverance
    Хи
    Hi