Giter Club home page Giter Club logo

ethereum's Introduction

nuid.ethereum

Cross-platform Ethereum API.

Notes

nuid.ethereum primarily exists to abstract over platform-specific differences and provide a common interface to the provided functionality across host platforms. nuid.ethereum delegates most invocations to a host implemention (e.g. web3j on the jvm, and web3js, etc. in node and the browser). This library inherits both dependencies' capability to interact with a remote service such as Infura.

Requirements

jvm, node + npm, clj, shadow-cljs

Clojure and ClojureScript

tools.deps:

{nuid/ethereum {:git/url "https://github.com/nuid/ethereum" :sha "..."}}

usage:

$ clj # or shadow-cljs node-repl
=> (require '[clojure.core.async :as async]) ;; or [cljs.core...]
=> (require '[nuid.ethereum.transaction :as tx])
=> (require '[nuid.ethereum.client :as client])
=> (require '[nuid.ethereum :as eth])
=> (require '[nuid.bytes :as bytes])
=> (require '[nuid.hex :as hex])
=> (def http-provider "...") ;; e.g. https://rinkeby.infura.io/...
=> (def private-key "...")
=> (def params {::client/http-provider http-provider ::private-key private-key})
=> (def client (eth/parameters->client params))
=> (def resp-atom (atom []))
=> (def data (hex/prefixed (hex/encode "flavor")))
=> (async/take!
    (eth/send-transaction! client {::tx/data data})
    (partial swap! resp-atom conj))

Licensing

Apache v2.0 or MIT

ethereum's People

Contributors

dependabot[bot] avatar jdhollis avatar usernolan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

joseph-hurtado

ethereum's Issues

Refactor JVM API

(.sendTransaction

Currently developers using this library need to be aware of significant differences in the API between the JVM and JS, which directly opposes the intent.

send-transaction is the worst example, and would be an easy fix—it should use a future that puts the response of the synchronous .sendTransaction on c.

One alternative would be to eliminate raw-transaction-manager and retrieve nonce manually similar to the JS API, manually sign the transaction, and use .sendAsync as get-transaction does.

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.