Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to enable Offline Signing in monero-gui and possible... #9492

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Commits on Jul 18, 2024

  1. add endpoints: export_encrypted_key_images and import_encrypted_key_i…

    …mages
    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    418adb7 View commit details
    Browse the repository at this point in the history
  2. add magic

    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    54dab2e View commit details
    Browse the repository at this point in the history
  3. fix /

    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    86ba8e2 View commit details
    Browse the repository at this point in the history
  4. fix /

    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    9b6499c View commit details
    Browse the repository at this point in the history
  5. change to hex_to_pod

    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    d2e3cff View commit details
    Browse the repository at this point in the history
  6. change back and add debug code

    who asks? committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    5722f42 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. more debug code

    who asks? committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    67e634e View commit details
    Browse the repository at this point in the history
  2. more debug code

    who asks? committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    2691395 View commit details
    Browse the repository at this point in the history
  3. more debug code

    who asks? committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    c5822d7 View commit details
    Browse the repository at this point in the history
  4. final modifications to adding endpoints import_encrypted_key_images a…

    …nd export_encrypted_key_images
    who asks? committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    75c14c8 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. .gitignore

    who asks? committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    5e7c234 View commit details
    Browse the repository at this point in the history
  2. manual merge

    who asks? committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    e2fe45d View commit details
    Browse the repository at this point in the history
  3. remove whitespace

    who asks? committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    25b0950 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Modifications to enable Offline Signing in monero-gui and possible o…

    …ther projects via UR or other mediums of
    
           exchange.
    
           Added the following signatures in the mention files:
    
           wallet/wallet2.h
           +    std::string export_key_images_string(bool all = false) const;
           +    uint64_t import_key_images_string(const std::string &data, uint64_t &spent, uint64_t &unspent);
           M    bool wallet2::export_key_images(const std::string &filename, bool all) const
    
           wallet/api/pending_transaction.h
           +    std::string commit_string() override;
    
           wallet/api/unsigned_transaction.h
           +    std::string signAsString() override;
    
           wallet/api/wallet.h:
           +    bool submitTransactionFromString(const std::string &fileName) override;
           +    virtual UnsignedTransaction * loadUnsignedTxFromString(const std::string &unsigned_filename) override;
           +    std::string exportKeyImagesAsString(bool all = false) override;
           +    bool importKeyImagesFromString(const std::string &data) override;
           +    std::string exportOutputsAsString(bool all = false) override;
           +    bool importOutputsFromString(const std::string &data) override;
    
           wallet/api/wallet2_api.h
           +    virtual std::string commit_string() = 0;
           +    virtual std::string signAsString() = 0;
           +    virtual UnsignedTransaction * loadUnsignedTxFromString(const std::string &unsigned_filename) = 0;
           +    virtual bool submitTransactionFromString(const std::string &fileName) = 0;
           +    virtual bool importKeyImagesFromString(const std::string &data) = 0;
           +    virtual std::string exportOutputsAsString(bool all = false) = 0;
           +    virtual bool importOutputsFromString(const std::string &data) = 0;
           +    uint64_t import_key_images_string(const std::string &data, uint64_t &spent, uint64_t &unspent);
    
           And the implementations in:
    
           wallet/wallet2.cpp
           wallet/api/pending_transaction.cpp
           wallet/api/unsigned_transaction.cpp
           wallet/api/wallet.cpp
    
           The method `bool wallet2::export_key_images(const std::string &filename, bool all) const` is modified to
           use `std::string export_key_images_string(bool all = false) const;` to get the string to write to the file.
           IMO that would be the perfect way to do it everywhere, but in the other methods it would require more modifications, so the other I duplicated and removed the part writing to the file and return instead a std::string, or
           use a std::string for the actual payload instead of a file path.
    
           One thing to mention is I remove in one or two log messages the filename, and the other is in `export_key_images` probably(almost sure) is now the performance messed up.
    
           This modifications was done to get all the necessary data for offline signing via UR or any other channel not
           using files as medium. IMO it had been better to not implement the filehandling direct in wallet2 or in the wallet api but rather in monero-wallet-cli and monero-gui itself, but it is like it is.
    DiosDelRayo committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    84f402b View commit details
    Browse the repository at this point in the history
  2. Modifications to enable Offline Signing in monero-gui and possible o…

    …ther projects via UR or other mediums of exchange.
    
           Added the following signatures in the mention files:
    
           wallet/wallet2.h
           +    std::string export_key_images_string(bool all = false) const;
           +    uint64_t import_key_images_string(const std::string &data, uint64_t &spent, uint64_t &unspent);
           M    bool wallet2::export_key_images(const std::string &filename, bool all) const
    
           wallet/api/pending_transaction.h
           +    std::string commit_string() override;
    
           wallet/api/unsigned_transaction.h
           +    std::string signAsString() override;
    
           wallet/api/wallet.h:
           +    bool submitTransactionFromString(const std::string &fileName) override;
           +    virtual UnsignedTransaction * loadUnsignedTxFromString(const std::string &unsigned_filename) override;
           +    std::string exportKeyImagesAsString(bool all = false) override;
           +    bool importKeyImagesFromString(const std::string &data) override;
           +    std::string exportOutputsAsString(bool all = false) override;
           +    bool importOutputsFromString(const std::string &data) override;
    
           wallet/api/wallet2_api.h
           +    virtual std::string commit_string() = 0;
           +    virtual std::string signAsString() = 0;
           +    virtual UnsignedTransaction * loadUnsignedTxFromString(const std::string &unsigned_filename) = 0;
           +    virtual bool submitTransactionFromString(const std::string &fileName) = 0;
           +    virtual bool importKeyImagesFromString(const std::string &data) = 0;
           +    virtual std::string exportOutputsAsString(bool all = false) = 0;
           +    virtual bool importOutputsFromString(const std::string &data) = 0;
           +    uint64_t import_key_images_string(const std::string &data, uint64_t &spent, uint64_t &unspent);
    
           And the implementations in:
    
           wallet/wallet2.cpp
           wallet/api/pending_transaction.cpp
           wallet/api/unsigned_transaction.cpp
           wallet/api/wallet.cpp
    
           The method `bool wallet2::export_key_images(const std::string &filename, bool all) const` is modified to
           use `std::string export_key_images_string(bool all = false) const;` to get the string to write to the file.
           IMO that would be the perfect way to do it everywhere, but in the other methods it would require more modifications, so the other I duplicated and removed the part writing to the file and return instead a std::string, or
           use a std::string for the actual payload instead of a file path.
    
           One thing to mention is I remove in one or two log messages the filename, and the other is in `export_key_images` probably(almost sure) is now the performance messed up.
    
           This modifications was done to get all the necessary data for offline signing via UR or any other channel not
           using files as medium. IMO it had been better to not implement the filehandling direct in wallet2 or in the wallet api but rather in monero-wallet-cli and monero-gui itself, but it is like it is.
    DiosDelRayo committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    2bc362d View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. https://github.com/monero-project/monero/pull/9492#pullrequestreview-…

    …2358265221
    DiosDelRayo committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    23d8934 View commit details
    Browse the repository at this point in the history
  2. https://github.com/monero-project/monero/pull/9492#pullrequestreview-…

    …2358265221
    DiosDelRayo committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    744bf8d View commit details
    Browse the repository at this point in the history
  3. https://github.com/monero-project/monero/pull/9492#pullrequestreview-…

    …2358265221
    DiosDelRayo committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    bc76da9 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. https://github.com/monero-project/monero/pull/9492#pullrequestreview-…

    …2358265221
    DiosDelRayo committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    c399de2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8ad399 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e42096 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'monerogui-otsur' of github.com:DiosDelRayo/monero into …

    …monerogui-otsur
    DiosDelRayo committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    fa52496 View commit details
    Browse the repository at this point in the history