Giter Club home page Giter Club logo

ethers.js-docs's Introduction

=============

ethers.js 有逐步取代 web3.js 的趋势,希望这份中文文档可以帮到大家,文档Web地址托管在登链社区-文档中心

This is the documentation for the various Ethers projects.

The current projects documented here are:

  • ethers.js - The Ethereum JavaScript library
  • ethers-app - The application library and toolchain for ethers.io and ethers.space.

Coming soon:

  • ethers.objc - The Ethereum Objective-C library
  • ethers.ino - The Ethereum Arduino C library
  • ethers-ens - The ENS registration library and command-line tools
  • ethers-build - The testing, debugging and deployment library and tools; this is largely covered in the ethers-app documentation above, but this will be the low-level API for hacking into the framework

贡献

本文档由登链社区社区成员翻译整理。 欢迎大家加入,申请成为贡献者,微信添加Tiny熊(xlbxiong),或者发邮件:[email protected]

Sphinx 安装

sudo pip install -U Sphinx
pip install sphinx_rtd_theme
pip install --upgrade recommonmark

支持 RST 及Markdown格式

RST文档格式的一个中文说明

ethers.js-docs's People

Contributors

xilibi2003 avatar ysqi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ethers.js-docs's Issues

求一下v5的翻译文档

虽然工作量很大,但是希望开发者空闲时候可以考虑下对v5的翻译。
我也愿意贡献一点绵薄之力

关于Ethers中wallet加密解密过程在“微信小程序的手机端”的速度非常缓慢问题

尊敬的作者,您好!
首先非常感谢平台提供的Ethers库,使得我个人非常便捷的开发web3相关原型;其次向您反馈两个问题,非常希望得到您的回复!

两个问题如下:
一、 Ethers库中钱包wallet加密成JSON串时,耗时有两种情况;1:网页端与微信小程序的模拟器均花费13s左右时间(属于正常现象);2:微信小程序手机体验钱包加密/解密过程时,花费至少5分钟以上(属于不正常现象)
二、Ethers库钱包wallet解密过程也是同“问题一”情况;

问题一源码:

//初始化 - 创建钱包
  initWallet() {
    let _this = this;
    let count = 0 
    console.time("时长");
    function callback(progress) { //加密进度条
      parseInt(progress * 100)
      // console.log("统计次数=", count++);
      _this.setData({ welletProcess: (progress * 100).toFixed(2)})
    };
    //  创建随机钱包
    let wallet = ethers.Wallet.createRandom();
    //  使用*密码password* 加密钱包生成加密的JSON钱包文件(keystore)
    wallet.encrypt(this.data.form.password2, callback).then( json => {
      console.timeEnd("时长");
      console.log("json=", json)
      wx.setStorage({key: "keystore",data: json})
      wx.setStorage({key: "password",data: _this.data.form.password2})
      wx.showModal({ title: '提示', content: '密码创建成功', showCancel: false, success (res) {
          if (res.confirm) {
            _this.doNavigate();
          } 
        }
      })
    })
  },

问题二源码:

loadMnemonic(data) {
    let _this = this;
    let json = JSON.parse(JSON.stringify(data)); //keystore
    let password = this.data.password;

    function callback(progress) { //钱包解密进度条
      _this.setData({ walletProgress: (progress * 100).toFixed(2) });
    }
    ethers.Wallet.fromEncryptedJson(json, password, callback).then(function (wallet) {
      _this.setData({ showTransition: false, showTransition1: false, privateKey: wallet.privateKey, address: wallet.address });
      wx.setStorage({key: "address", data: wallet.address});
      wx.setStorage({key: "privateKey", data: wallet.privateKey});
      _this.getSignature(); 
    }, err => {
      _this.setData({ isShowProgress: false })
      Notify('保管箱密码错误,请重新输入!');
    });
  },

Best Wishes~~

Email: [email protected]

ethers.js AbiCoder.encode bytes

AbiCoder.encode bytes 问题

var dynamicOffset_1 = dynamicWriter.length; coder.encode(dynamicWriter, value);
原本代码 没有赋值就取长度

修复代码
coder.encode(dynamicWriter, value); var dynamicOffset_1 = dynamicWriter.length;

先赋值在取长度

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.