Updated readme and dist files.
This commit is contained in:
parent
52dc35bf0e
commit
4fd35224b3
35
README.md
35
README.md
@ -3,7 +3,7 @@ ethers.js
|
||||
|
||||
[![npm version](https://badge.fury.io/js/ethers.svg)](https://badge.fury.io/js/ethers)
|
||||
|
||||
Complete Ethereum wallet implementation and utilities in JavaScript.
|
||||
Complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript).
|
||||
|
||||
**Features:**
|
||||
|
||||
@ -12,11 +12,12 @@ Complete Ethereum wallet implementation and utilities in JavaScript.
|
||||
- Import and export BIP 39 **mnemonic phrases** (12 word backup phrases) and **HD Wallets**
|
||||
- Meta-classes create JavaScript objects from any contract ABI
|
||||
- Connect to Ethereum nodes over [JSON-RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC), [INFURA](https://infura.io), [Etherscan](https://etherscan.io), or [MetaMask](https://metamask.io)
|
||||
- ENS names are first-class citizens; they can almost always used instead of Ethereum addresses
|
||||
- **Tiny** (~79kb compressed; 242kb uncompressed)
|
||||
- ENS names are first-class citizens; they can be used anywhere an Ethereum addresses can be
|
||||
- **Tiny** (~82kb compressed; 263kb uncompressed)
|
||||
- **Complete** functionality for all your Ethereum needs
|
||||
- Extensive [documentation](https://docs.ethers.io/ethers.js/html/)
|
||||
- Large collection of test cases which are maintained and added to
|
||||
- Fully TypeScript ready, with definition files and full TypeScript source
|
||||
- **MIT License** (including ALL dependencies); completely open source to do with as you please
|
||||
|
||||
|
||||
@ -27,7 +28,7 @@ To use in a browser:
|
||||
|
||||
```html
|
||||
<script charset="utf-8"
|
||||
src="https://cdn.ethers.io/scripts/ethers-v3.min.js"
|
||||
src="https://cdn.ethers.io/scripts/ethers-v4.min.js"
|
||||
type="text/javascript">
|
||||
</script>
|
||||
```
|
||||
@ -39,7 +40,6 @@ To use in [node.js](https://nodejs.org/):
|
||||
```
|
||||
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
@ -48,6 +48,31 @@ Browse the [API Documentation](https://docs.ethers.io/ethers.js/html/) online.
|
||||
Documentation is generated using [Sphinx](http://www.sphinx-doc.org) and can be browsed locally from the /docs/build/html directory.
|
||||
|
||||
|
||||
Hacking and Contributing
|
||||
------------------------
|
||||
|
||||
The JavaScript code is now generated from TypeScript, so make sure you modify the
|
||||
TypeScript and compile it, rather than modifying the JavaScript directly. To start
|
||||
auto-compiling the TypeScript code, you may use:
|
||||
|
||||
```
|
||||
/home/ethers> npm run auto-build
|
||||
```
|
||||
|
||||
A very important part of ethers is its exhaustive test cases, so before making any
|
||||
bug fix, please add a test case that fails prior to the fix, and succeeds after the
|
||||
fix. All regression tests must pass.
|
||||
|
||||
Pull requests are always welcome, but please keep a few points in mind:
|
||||
|
||||
- Compatibility-breaking changes will not be accepted; they may be considered for the next major version
|
||||
- Security is important; adding dependencies require fairly convincing arguments
|
||||
- The library aims to be lean, so keep an eye on the `dist/ethers.min.js` filesize before and after your changes
|
||||
- Add test cases for both expected and unexpected input
|
||||
- Any new features need to be supported by us (issues, documentation, testing), so anything that is overly complicated or specific may not be accepted
|
||||
|
||||
If in doubt, please start an issue, and we can have a nice public discussion. :)
|
||||
|
||||
|
||||
Donations
|
||||
---------
|
||||
|
2
dist/ethers.d.ts
vendored
2
dist/ethers.d.ts
vendored
@ -355,7 +355,7 @@ declare module "utils/transaction" {
|
||||
v?: number;
|
||||
}
|
||||
export type SignDigestFunc = (digest: Arrayish) => Signature;
|
||||
export function sign(transaction: UnsignedTransaction, signDigest?: SignDigestFunc): string;
|
||||
export function sign(transaction: UnsignedTransaction, signDigest: SignDigestFunc): string;
|
||||
export function parse(rawTransaction: Arrayish): Transaction;
|
||||
}
|
||||
declare module "wallet/wallet" {
|
||||
|
2
dist/ethers.d.ts.map
vendored
2
dist/ethers.d.ts.map
vendored
File diff suppressed because one or more lines are too long
9
dist/ethers.js
vendored
9
dist/ethers.js
vendored
@ -13710,18 +13710,19 @@ function sign(transaction, signDigest) {
|
||||
raw.push(bytes_1.hexlify(value));
|
||||
});
|
||||
// @TOOD:
|
||||
throw new Error('implement');
|
||||
/*
|
||||
// Requesting an unsigned transation
|
||||
if (!signDigest) {
|
||||
var v_1 = 27 + signature.recoveryParam;
|
||||
let v = 27 + signature.recoveryParam
|
||||
if (transaction.chainId) {
|
||||
v_1 += transaction.chainId * 2 + 8;
|
||||
v += transaction.chainId * 2 + 8;
|
||||
}
|
||||
//raw.push(hexlify(transaction.chainId));
|
||||
raw.push(bytes_1.hexlify(v_1));
|
||||
raw.push(hexlify(v));
|
||||
raw.push('0x');
|
||||
raw.push('0x');
|
||||
}
|
||||
*/
|
||||
if (transaction.chainId) {
|
||||
raw.push(bytes_1.hexlify(transaction.chainId));
|
||||
raw.push('0x');
|
||||
|
2
dist/ethers.min.js
vendored
2
dist/ethers.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.min.js.map
vendored
2
dist/ethers.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
src/utils/transaction.d.ts
vendored
2
src/utils/transaction.d.ts
vendored
@ -25,5 +25,5 @@ export interface Transaction {
|
||||
v?: number;
|
||||
}
|
||||
export declare type SignDigestFunc = (digest: Arrayish) => Signature;
|
||||
export declare function sign(transaction: UnsignedTransaction, signDigest?: SignDigestFunc): string;
|
||||
export declare function sign(transaction: UnsignedTransaction, signDigest: SignDigestFunc): string;
|
||||
export declare function parse(rawTransaction: Arrayish): Transaction;
|
||||
|
@ -58,18 +58,19 @@ function sign(transaction, signDigest) {
|
||||
raw.push(bytes_1.hexlify(value));
|
||||
});
|
||||
// @TOOD:
|
||||
throw new Error('implement');
|
||||
/*
|
||||
// Requesting an unsigned transation
|
||||
if (!signDigest) {
|
||||
var v_1 = 27 + signature.recoveryParam;
|
||||
let v = 27 + signature.recoveryParam
|
||||
if (transaction.chainId) {
|
||||
v_1 += transaction.chainId * 2 + 8;
|
||||
v += transaction.chainId * 2 + 8;
|
||||
}
|
||||
//raw.push(hexlify(transaction.chainId));
|
||||
raw.push(bytes_1.hexlify(v_1));
|
||||
raw.push(hexlify(v));
|
||||
raw.push('0x');
|
||||
raw.push('0x');
|
||||
}
|
||||
*/
|
||||
if (transaction.chainId) {
|
||||
raw.push(bytes_1.hexlify(transaction.chainId));
|
||||
raw.push('0x');
|
||||
|
Loading…
Reference in New Issue
Block a user