Giter Site home page Giter Site logo

How to use with mnemonics? about lucid HOT 6 CLOSED

mrvfino avatar mrvfino commented on September 18, 2024
How to use with mnemonics?

from lucid.

Comments (6)

Riley-Kilgore avatar Riley-Kilgore commented on September 18, 2024

Take a look at this previously closed issue: #20

I think that it will probably help a bit with what you're looking to achieve - I didn't use mnemonics here for key generation; but the process after you have a key, that is valid to the cli, should be the same.

EDIT: Specifically, you may need to follow these steps after generating the key from the mnemonic.
1- Remove the first two bytes of information from the PRIVATE_KEY_STRING generated above.
2- Run echo <PRIVATE_KEY_STRING> | bech32 ed25519_sk > skeybech
3- Use the value now present in the file skeybech to call selectWalletFromPrivateKey(keyInFile)

from lucid.

mrvfino avatar mrvfino commented on September 18, 2024

Thanks @Riley-Kilgore , will check that out.

from lucid.

alessandrokonrad avatar alessandrokonrad commented on September 18, 2024

Maybe I integrate mnemonic support natively into Lucid, but low priority right now. You could simply use the npm package bip39 to convert the seed phrase into entropy, which can then be parsed by CSL: https://github.com/Emurgo/cardano-serialization-lib/blob/master/doc/getting-started/generating-keys.md

from lucid.

mrvfino avatar mrvfino commented on September 18, 2024

Thanks guys. Solved it now. My mistake was that I was directly using the key generated from

const key = CardanoWasm.Bip32PrivateKey.from_bip39_entropy(
  Buffer.from(entropy, 'hex'),
  Buffer.from(''),
);

After looking at both Lucid and CSL's code i've realized that I needed to do this first:

this.key.to_raw_key().to_bech32()

The result from the above then works with Lucid.

from lucid.

mrvfino avatar mrvfino commented on September 18, 2024

Update: It doesn't seem to be the same wallet that I previously had when I convert it to the raw key or i'm missing something here?

from lucid.

alessandrokonrad avatar alessandrokonrad commented on September 18, 2024

Selecting a wallet from seedphrase was added in Lucid version 0.5.6.

from lucid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.