基于区块链的毕业设计eth-connect – eth连接

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计eth-connect – eth连接 是一篇很好的国外资料

eth-connect

eth-connect - eth连接 eth-connect - eth连接 eth-connect - eth连接 eth-connect - eth连接

eth-connect is a TypeScript-based web3 library alternative which implements the Generic JSON RPC spec as well.

You can follow the JavaScript API documentation until TypeScript docs are released.

Design goals

  • A Typed web3.js alternative
  • Have as few convention-invented functions as possible (by following the RPC specs as much as possible)
  • Leverage WS and HTTP providers
  • Portable (support and work equally in both browser and node)
  • Painless eth usage: Using contract factories, well-split event types (block, transaction and contracts plus topics)
  • async/await out of the box

Installation

Using NPM:

npm i eth-connect

Importing as a browser module:

<script src="https://unpkg.com/eth-connect@latest/eth-connect.js"></script>

Examples

Below are some simple illustrative examples. You can also find more complete examples are in the integration /tests folder.

Initialize with a provider

import { RequestManager } from 'eth-connect'  // using the injected MetaMask provider const requestManager = new RequestManager(web3.currentProvider)  const myBalance = await requestManager.eth_getBalance(myAddress)

or

import { RequestManager, HTTPProvider } from 'eth-connect'  const provider = 'my-own-RPC-url' const providerInstance = new HTTPProvider(provider) const requestManager = new RequestManager(providerInstance)  const someBalance = await requestManager.eth_getBalance(someAddress)

Initialize a contract

import { RequestManager, ContractFactory } from 'eth-connect'  const abi = require('./some-contract-abi.json') // using the injected MetaMask provider const requestManager = new RequestManager(web3.currentProvider)  const factory = new ContractFactory(requestManager, abi) const instance = await factory.at(address)  console.log('Calling a method', await instance.mint(myAddress))

Get the accounts

import { RequestManager } from 'eth-connect'  const requestManager = new RequestManager(web3.currentProvider)  const accounts = await requestManager.eth_accounts()

Build the project

Clone this project and run the following in the terminal:

make build

Run tests

make test-local

Comparison

web3 eth-connect
Browser support
Promise API
TS/JS Docs
Wiki Docs ?
Downloads eth-connect - eth连接 eth-connect - eth连接
Coverage eth-connect - eth连接 eth-connect - eth连接
Build eth-connect - eth连接 eth-connect - eth连接
Dependents eth-connect - eth连接 eth-connect - eth连接
Install size eth-connect - eth连接 eth-connect - eth连接

Project Status

You can find full documentation here.

You may find issues while using this library, as it’s still under development. Please report any issues you come accross.


eth-connect

eth-connect - eth连接 eth-connect - eth连接 eth-connect - eth连接 eth-connect - eth连接

eth-connect is a TypeScript-based web3 library alternative which implements the Generic JSON RPC spec as well.

You can follow the JavaScript API documentation until TypeScript docs are released.

Design goals

  • A Typed web3.js alternative
  • Have as few convention-invented functions as possible (by following the RPC specs as much as possible)
  • Leverage WS and HTTP providers
  • Portable (support and work equally in both browser and node)
  • Painless eth usage: Using contract factories, well-split event types (block, transaction and contracts plus topics)
  • async/await out of the box

Installation

Using NPM:

npm i eth-connect

Importing as a browser module:

<script src="https://unpkg.com/eth-connect@latest/eth-connect.js"></script>

Examples

Below are some simple illustrative examples. You can also find more complete examples are in the integration /tests folder.

Initialize with a provider

import { RequestManager } from 'eth-connect'  // using the injected MetaMask provider const requestManager = new RequestManager(web3.currentProvider)  const myBalance = await requestManager.eth_getBalance(myAddress)

or

import { RequestManager, HTTPProvider } from 'eth-connect'  const provider = 'my-own-RPC-url' const providerInstance = new HTTPProvider(provider) const requestManager = new RequestManager(providerInstance)  const someBalance = await requestManager.eth_getBalance(someAddress)

Initialize a contract

import { RequestManager, ContractFactory } from 'eth-connect'  const abi = require('./some-contract-abi.json') // using the injected MetaMask provider const requestManager = new RequestManager(web3.currentProvider)  const factory = new ContractFactory(requestManager, abi) const instance = await factory.at(address)  console.log('Calling a method', await instance.mint(myAddress))

Get the accounts

import { RequestManager } from 'eth-connect'  const requestManager = new RequestManager(web3.currentProvider)  const accounts = await requestManager.eth_accounts()

Build the project

Clone this project and run the following in the terminal:

make build

Run tests

make test-local

Comparison

web3 eth-connect
Browser support
Promise API
TS/JS Docs
Wiki Docs ?
Downloads eth-connect - eth连接 eth-connect - eth连接
Coverage eth-connect - eth连接 eth-connect - eth连接
Build eth-connect - eth连接 eth-connect - eth连接
Dependents eth-connect - eth连接 eth-connect - eth连接
Install size eth-connect - eth连接 eth-connect - eth连接

Project Status

You can find full documentation here.

You may find issues while using this library, as it’s still under development. Please report any issues you come accross.

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20265.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计eth-connect – eth连接

提供最优质的资源集合

立即查看 了解详情