Giter Club home page Giter Club logo

Comments (5)

roynalnaruto avatar roynalnaruto commented on July 1, 2024 1

@tmpfs @tynes quick PR for this. Let me know if this is something you'd be okay with

from eth-keystore-rs.

roynalnaruto avatar roynalnaruto commented on July 1, 2024

Hi @tynes Yes that's true geth does add an address field to the keystore, and after some conversations in the PR #8 I was requested by a user to not assume that this library will only be used for creating/encrypting/decrypting "Ethereum private keys" (@tmpfs was encrypting private key shares for an MPC construction).

But I do agree that compatibility with geth conventions might be a good-to-have for this repository.

How about I add a feature geth-compat and enable the address field when this feature is enabled? Would that be good for you @tynes ?

from eth-keystore-rs.

tmpfs avatar tmpfs commented on July 1, 2024

Ha, interesting that this come up. Rather than a geth-compat feature could we convert the extra argument to Option<KeystoreOptions> and then just do:

pub struct KeystoreOptions<'a> {
  /// File name, defaults to the UUID.
  pub name: Option<&'a str>,
  /// Public address, when available will be embedded in the keystore.
  pub address: Option<String>,
}

Does that work for you @roynalnaruto ?

from eth-keystore-rs.

roynalnaruto avatar roynalnaruto commented on July 1, 2024

From what I understood @tynes meant he would like support to read/write an address field in the JSON keystore. I think the best solution to enable that is by feature gating it as it depends on a few more dependencies which we wouldn't need if such support is not required (as in your case).

from eth-keystore-rs.

tynes avatar tynes commented on July 1, 2024

From what I understood @tynes meant he would like support to read/write an address field in the JSON keystore. I think the best solution to enable that is by feature gating it as it depends on a few more dependencies which we wouldn't need if such support is not required (as in your case).

This is definitely what I meant and I was concerned about adding new dependencies but putting it behind a feature gate solves that problem. Thank you!

from eth-keystore-rs.

Related Issues (3)

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.