Renaming files.
This commit is contained in:
parent
b6794b96a5
commit
be7a128bf4
113
dist/ethers.js
vendored
113
dist/ethers.js
vendored
File diff suppressed because one or more lines are too long
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
8
package-lock.json
generated
8
package-lock.json
generated
@ -1242,7 +1242,7 @@
|
||||
"requires": {
|
||||
"bn.js": "4.11.8",
|
||||
"brorand": "1.1.0",
|
||||
"hash.js": "1.1.4",
|
||||
"hash.js": "1.1.3",
|
||||
"inherits": "2.0.3"
|
||||
}
|
||||
},
|
||||
@ -2285,9 +2285,9 @@
|
||||
}
|
||||
},
|
||||
"hash.js": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz",
|
||||
"integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
|
||||
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
|
||||
"requires": {
|
||||
"inherits": "2.0.3",
|
||||
"minimalistic-assert": "1.0.1"
|
||||
|
@ -17,7 +17,7 @@
|
||||
"aes-js": "3.0.0",
|
||||
"bn.js": "^4.4.0",
|
||||
"elliptic": "6.3.3",
|
||||
"hash.js": "^1.0.0",
|
||||
"hash.js": "1.1.3",
|
||||
"js-sha3": "0.5.7",
|
||||
"scrypt-js": "2.0.3",
|
||||
"setimmediate": "1.0.4",
|
||||
@ -45,10 +45,10 @@
|
||||
"browser": {
|
||||
"fs": "./tests/browser-fs.js",
|
||||
"zlib": "browserify-zlib",
|
||||
"./src.ts/utils/base64.ts": "./src.browser/browser-base64.ts",
|
||||
"./src.ts/utils/random-bytes.js": "./src.browser/browser-random-bytes.js",
|
||||
"./src.ts/utils/base64.ts": "./src.browser/base64.ts",
|
||||
"./src.ts/utils/random-bytes.js": "./src.browser/random-bytes.js",
|
||||
"./providers/ipc-provider.js": "./utils/empty.js",
|
||||
"xmlhttprequest": "./src.browser/browser-xmlhttprequest.ts"
|
||||
"xmlhttprequest": "./src.browser/xmlhttprequest.ts"
|
||||
},
|
||||
"keywords": [
|
||||
"ethereum",
|
||||
|
@ -1 +0,0 @@
|
||||
module.exports = undefined;
|
2
src/utils/keccak256.d.ts
vendored
2
src/utils/keccak256.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
import { Arrayish } from './convert.js';
|
||||
import { Arrayish } from './convert';
|
||||
export declare function keccak256(data: Arrayish): string;
|
||||
|
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var sha3 = require("js-sha3");
|
||||
var convert_js_1 = require("./convert.js");
|
||||
var convert_1 = require("./convert");
|
||||
function keccak256(data) {
|
||||
return '0x' + sha3.keccak_256(convert_js_1.arrayify(data));
|
||||
return '0x' + sha3.keccak_256(convert_1.arrayify(data));
|
||||
}
|
||||
exports.keccak256 = keccak256;
|
||||
|
2
src/utils/rlp.d.ts
vendored
2
src/utils/rlp.d.ts
vendored
@ -1,3 +1,3 @@
|
||||
import { Arrayish } from './convert.js';
|
||||
import { Arrayish } from './convert';
|
||||
export declare function encode(object: any): string;
|
||||
export declare function decode(data: Arrayish): any;
|
||||
|
@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
//See: https://github.com/ethereum/wiki/wiki/RLP
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var convert_js_1 = require("./convert.js");
|
||||
var convert_1 = require("./convert");
|
||||
function arrayifyInteger(value) {
|
||||
var result = [];
|
||||
while (value) {
|
||||
@ -32,7 +32,7 @@ function _encode(object) {
|
||||
return length.concat(payload);
|
||||
}
|
||||
else {
|
||||
var data = Array.prototype.slice.call(convert_js_1.arrayify(object));
|
||||
var data = Array.prototype.slice.call(convert_1.arrayify(object));
|
||||
if (data.length === 1 && data[0] <= 0x7f) {
|
||||
return data;
|
||||
}
|
||||
@ -46,7 +46,7 @@ function _encode(object) {
|
||||
}
|
||||
}
|
||||
function encode(object) {
|
||||
return convert_js_1.hexlify(_encode(object));
|
||||
return convert_1.hexlify(_encode(object));
|
||||
}
|
||||
exports.encode = encode;
|
||||
function _decodeChildren(data, offset, childOffset, length) {
|
||||
@ -94,7 +94,7 @@ function _decode(data, offset) {
|
||||
if (offset + 1 + lengthLength + length > data.length) {
|
||||
throw new Error('invalid rlp data');
|
||||
}
|
||||
var result = convert_js_1.hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));
|
||||
var result = convert_1.hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));
|
||||
return { consumed: (1 + lengthLength + length), result: result };
|
||||
}
|
||||
else if (data[offset] >= 0x80) {
|
||||
@ -102,13 +102,13 @@ function _decode(data, offset) {
|
||||
if (offset + 1 + length > data.length) {
|
||||
throw new Error('invlaid rlp data');
|
||||
}
|
||||
var result = convert_js_1.hexlify(data.slice(offset + 1, offset + 1 + length));
|
||||
var result = convert_1.hexlify(data.slice(offset + 1, offset + 1 + length));
|
||||
return { consumed: (1 + length), result: result };
|
||||
}
|
||||
return { consumed: 1, result: convert_js_1.hexlify(data[offset]) };
|
||||
return { consumed: 1, result: convert_1.hexlify(data[offset]) };
|
||||
}
|
||||
function decode(data) {
|
||||
var bytes = convert_js_1.arrayify(data);
|
||||
var bytes = convert_1.arrayify(data);
|
||||
var decoded = _decode(bytes, 0);
|
||||
if (decoded.consumed !== bytes.length) {
|
||||
throw new Error('invalid rlp data');
|
||||
|
2
src/utils/utf8.d.ts
vendored
2
src/utils/utf8.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { Arrayish } from './convert.js';
|
||||
import { Arrayish } from './convert';
|
||||
export declare enum UnicodeNormalizationForm {
|
||||
current = "",
|
||||
NFC = "NFC",
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var convert_js_1 = require("./convert.js");
|
||||
var convert_1 = require("./convert");
|
||||
var UnicodeNormalizationForm;
|
||||
(function (UnicodeNormalizationForm) {
|
||||
UnicodeNormalizationForm["current"] = "";
|
||||
@ -43,13 +43,13 @@ function toUtf8Bytes(str, form) {
|
||||
result[offset++] = (c & 63) | 128;
|
||||
}
|
||||
}
|
||||
return convert_js_1.arrayify(result);
|
||||
return convert_1.arrayify(result);
|
||||
}
|
||||
exports.toUtf8Bytes = toUtf8Bytes;
|
||||
;
|
||||
// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499
|
||||
function toUtf8String(bytes) {
|
||||
bytes = convert_js_1.arrayify(bytes);
|
||||
bytes = convert_1.arrayify(bytes);
|
||||
var result = '';
|
||||
var i = 0;
|
||||
// Invalid bytes are ignored
|
||||
|
Loading…
Reference in New Issue
Block a user