Giter Site home page Giter Site logo

signTransaction queue about go-ethereum HOT 1 CLOSED

0xc1c4da avatar 0xc1c4da commented on July 19, 2024
signTransaction queue

from go-ethereum.

Comments (1)

farazdagi avatar farazdagi commented on July 19, 2024

Jarrad:

  • You can think of the ethereum protocols as being an extension to html/js development. That is in javascript there is a new object called web3, in reality this web3 object is a SHIM to a JSON-RPC server running locally, which exposes a bunch of methods to interacting with Ethereum
  • one of these is sendTransaction(), this lets you change the state of the blockchain (if you have money to pay for it) https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction
  • this is a dangerous command because it actually spends or sends a users money
  • now in normal operation, the account is usually locked, if the account is locked, sendTransaction method fails, we want to keep the account locked at all times, and we want to require the user to enter their password when a sendTransaction is requested
  • in order to do so, we need to intercept when this sendTransaction is called, then we need to notify React Native (via Java/Objective-C there should be code for doing this already), and it will validate the transaction (user views and enters password) and returns to complete the transaction on Go side
  • IMPORTANT: however we want this to be async/non-blocking and we need to account for multiple transactions accumulating

Corresponding code in status-go bindings:

Extra:

  • works started (by Daniel): b31b711 (basically, send transaction now only adds to the channel. We then need to "complete transaction" as you process from the channel, where "complete transaction" is the functionality that was previously in send transaction)
  • related to status-im/status-go#18

from go-ethereum.

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.