Skip to content

Commit

Permalink
Updating TypeScript library and fixing some audit issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Mar 22, 2020
1 parent 62aad5f commit bd32ee0
Show file tree
Hide file tree
Showing 65 changed files with 510 additions and 279 deletions.
567 changes: 396 additions & 171 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"karma-mocha": "1.3.0",
"lerna": "^3.13.0",
"libnpm": "2.0.1",
"mocha": "^5.2.0",
"mocha": "^7.1.1",
"mocha-phantomjs-core": "2.1.2",
"npm-packlist": "1.4.1",
"rollup": "1.20.1",
Expand All @@ -76,6 +76,6 @@
"scrypt-js": "3.0.0",
"semver": "^5.6.0",
"tar": "4.4.8",
"typescript": "3.6.2"
"typescript": "3.8.3"
}
}
2 changes: 1 addition & 1 deletion packages/abi/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.147";
export declare const version = "abi/5.0.0-beta.148";
2 changes: 1 addition & 1 deletion packages/abi/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abi/5.0.0-beta.147";
export const version = "abi/5.0.0-beta.148";
8 changes: 4 additions & 4 deletions packages/abi/lib.esm/coders/abstract-coder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export declare class Writer {
_data: Uint8Array;
_padding: Uint8Array;
constructor(wordSize?: number);
readonly data: string;
readonly length: number;
get data(): string;
get length(): number;
_writeData(data: Uint8Array): number;
writeBytes(value: BytesLike): number;
_getValue(value: BigNumberish): Uint8Array;
Expand All @@ -33,8 +33,8 @@ export declare class Reader {
readonly _coerceFunc: CoerceFunc;
_offset: number;
constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc);
readonly data: string;
readonly consumed: number;
get data(): string;
get consumed(): number;
static coerce(name: string, value: any): any;
coerce(name: string, value: any): any;
_peekBytes(offset: number, length: number): Uint8Array;
Expand Down
2 changes: 1 addition & 1 deletion packages/abi/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.147";
export declare const version = "abi/5.0.0-beta.148";
2 changes: 1 addition & 1 deletion packages/abi/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abi/5.0.0-beta.147";
exports.version = "abi/5.0.0-beta.148";
8 changes: 4 additions & 4 deletions packages/abi/lib/coders/abstract-coder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export declare class Writer {
_data: Uint8Array;
_padding: Uint8Array;
constructor(wordSize?: number);
readonly data: string;
readonly length: number;
get data(): string;
get length(): number;
_writeData(data: Uint8Array): number;
writeBytes(value: BytesLike): number;
_getValue(value: BigNumberish): Uint8Array;
Expand All @@ -33,8 +33,8 @@ export declare class Reader {
readonly _coerceFunc: CoerceFunc;
_offset: number;
constructor(data: BytesLike, wordSize?: number, coerceFunc?: CoerceFunc);
readonly data: string;
readonly consumed: number;
get data(): string;
get consumed(): number;
static coerce(name: string, value: any): any;
coerce(name: string, value: any): any;
_peekBytes(offset: number, length: number): Uint8Array;
Expand Down
4 changes: 2 additions & 2 deletions packages/abi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x5bac3d6d83c5835f31be5a9e430b58bde33b37fb25c38f00a38ba27286dc1252",
"tarballHash": "0x273cf6f6d4eb5e536b994b07df098cf97c23cfc59b837a9299b8902250ed0b88",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.147"
"version": "5.0.0-beta.148"
}
2 changes: 1 addition & 1 deletion packages/abi/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abi/5.0.0-beta.147";
export const version = "abi/5.0.0-beta.148";
2 changes: 1 addition & 1 deletion packages/asm/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "asm/5.0.0-beta.153";
export declare const version = "asm/5.0.0-beta.154";
2 changes: 1 addition & 1 deletion packages/asm/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "asm/5.0.0-beta.153";
export const version = "asm/5.0.0-beta.154";
2 changes: 1 addition & 1 deletion packages/asm/lib.esm/assembler.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export declare class LiteralNode extends ValueNode {
export declare class PopNode extends ValueNode {
readonly index: number;
constructor(guard: any, location: Location, index: number);
readonly placeholder: string;
get placeholder(): string;
static from(options: any): PopNode;
}
export declare class LinkNode extends ValueNode {
Expand Down
2 changes: 1 addition & 1 deletion packages/asm/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "asm/5.0.0-beta.153";
export declare const version = "asm/5.0.0-beta.154";
2 changes: 1 addition & 1 deletion packages/asm/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "asm/5.0.0-beta.153";
exports.version = "asm/5.0.0-beta.154";
2 changes: 1 addition & 1 deletion packages/asm/lib/assembler.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export declare class LiteralNode extends ValueNode {
export declare class PopNode extends ValueNode {
readonly index: number;
constructor(guard: any, location: Location, index: number);
readonly placeholder: string;
get placeholder(): string;
static from(options: any): PopNode;
}
export declare class LinkNode extends ValueNode {
Expand Down
4 changes: 2 additions & 2 deletions packages/asm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"generate": "node ./generate.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x19118aea84f83aacf59f42479e42a76583c670547b84710bcf4552eb7b7a85b9",
"tarballHash": "0xfa54a99b7ede20247114aec6d110912828f43740b961c331644bf11dad1ccf21",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.153"
"version": "5.0.0-beta.154"
}
2 changes: 1 addition & 1 deletion packages/asm/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "asm/5.0.0-beta.153";
export const version = "asm/5.0.0-beta.154";
4 changes: 2 additions & 2 deletions packages/ethers/dist/ethers-all.esm.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/ethers/dist/ethers-all.umd.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/ethers/dist/ethers.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4752,7 +4752,7 @@ var lib_esm$2 = /*#__PURE__*/Object.freeze({
Description: Description
});

const version$4 = "abi/5.0.0-beta.147";
const version$4 = "abi/5.0.0-beta.148";

"use strict";
const logger$4 = new Logger(version$4);
Expand Down Expand Up @@ -12788,7 +12788,7 @@ var browser$5 = unwrapExports(browser$4);
var browser_1$2 = browser$4.Wordlist;
var browser_2$1 = browser$4.wordlists;

const version$f = "hdnode/5.0.0-beta.137";
const version$f = "hdnode/5.0.0-beta.138";

"use strict";
const logger$i = new Logger(version$f);
Expand Down Expand Up @@ -15134,7 +15134,7 @@ function decryptJsonWalletSync(json, password) {
throw new Error("invalid JSON wallet");
}

const version$h = "wallet/5.0.0-beta.138";
const version$h = "wallet/5.0.0-beta.139";

"use strict";
const logger$l = new Logger(version$h);
Expand Down Expand Up @@ -16277,7 +16277,7 @@ function poll(func, options) {
});
}

const version$k = "providers/5.0.0-beta.157";
const version$k = "providers/5.0.0-beta.158";

"use strict";
const logger$o = new Logger(version$k);
Expand Down Expand Up @@ -19123,7 +19123,7 @@ class Web3Provider extends JsonRpcProvider {
var _version$6 = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.157";
exports.version = "providers/5.0.0-beta.158";
});

var _version$7 = unwrapExports(_version$6);
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers/dist/ethers.esm.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/ethers/dist/ethers.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4899,7 +4899,7 @@
var _version$8 = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abi/5.0.0-beta.147";
exports.version = "abi/5.0.0-beta.148";
});

var _version$9 = unwrapExports(_version$8);
Expand Down Expand Up @@ -13876,7 +13876,7 @@
var _version$w = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "hdnode/5.0.0-beta.137";
exports.version = "hdnode/5.0.0-beta.138";
});

var _version$x = unwrapExports(_version$w);
Expand Down Expand Up @@ -16453,7 +16453,7 @@
var _version$C = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "wallet/5.0.0-beta.138";
exports.version = "wallet/5.0.0-beta.139";
});

var _version$D = unwrapExports(_version$C);
Expand Down Expand Up @@ -17738,7 +17738,7 @@
var _version$I = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.157";
exports.version = "providers/5.0.0-beta.158";
});

var _version$J = unwrapExports(_version$I);
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers/dist/ethers.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xcee0a61efd23deb29ae14810b817a1b43bedadad6d2ea56d867b1337e056baf6",
"tarballHash": "0x581ba76f5030c3ea56087286d2c184aabf252dc7cc636302790bf55bfb55a82b",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.177"
}
2 changes: 1 addition & 1 deletion packages/experimental/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "experimental/5.0.0-beta.136";
export declare const version = "experimental/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/experimental/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "experimental/5.0.0-beta.136";
export const version = "experimental/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/experimental/lib.esm/metamask-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export declare class MetamaskProvider extends ethers.providers.Web3Provider {
_pollAccountFunc: () => void;
constructor(ethereum?: ethers.providers.AsyncSendable);
getSigner(addressOrIndex?: string | number): ethers.providers.JsonRpcSigner;
readonly enabled: boolean;
get enabled(): boolean;
_startPollingAccount(): void;
_stopPollingAccount(): void;
on(eventName: ethers.providers.EventType, listener: ethers.providers.Listener): this;
Expand Down
2 changes: 1 addition & 1 deletion packages/experimental/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "experimental/5.0.0-beta.136";
export declare const version = "experimental/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/experimental/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "experimental/5.0.0-beta.136";
exports.version = "experimental/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/experimental/lib/metamask-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export declare class MetamaskProvider extends ethers.providers.Web3Provider {
_pollAccountFunc: () => void;
constructor(ethereum?: ethers.providers.AsyncSendable);
getSigner(addressOrIndex?: string | number): ethers.providers.JsonRpcSigner;
readonly enabled: boolean;
get enabled(): boolean;
_startPollingAccount(): void;
_stopPollingAccount(): void;
on(eventName: ethers.providers.EventType, listener: ethers.providers.Listener): this;
Expand Down
4 changes: 2 additions & 2 deletions packages/experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x773fc21833b41fc1929204735341bbf4e4e2ff5fe0d2dd88de4a7cbcc937fd43",
"tarballHash": "0x45da0e65825d54033a370c8afe862ec66bea5aa9be0156de3997823b8a725890",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.136"
"version": "5.0.0-beta.137"
}
2 changes: 1 addition & 1 deletion packages/experimental/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "experimental/5.0.0-beta.136";
export const version = "experimental/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/hdnode/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "hdnode/5.0.0-beta.137";
export declare const version = "hdnode/5.0.0-beta.138";
2 changes: 1 addition & 1 deletion packages/hdnode/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "hdnode/5.0.0-beta.137";
export const version = "hdnode/5.0.0-beta.138";
2 changes: 1 addition & 1 deletion packages/hdnode/lib.esm/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export declare class HDNode implements ExternallyOwnedAccount {
* - fromSeed
*/
constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string);
readonly extendedKey: string;
get extendedKey(): string;
neuter(): HDNode;
private _derive;
derivePath(path: string): HDNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/hdnode/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "hdnode/5.0.0-beta.137";
export declare const version = "hdnode/5.0.0-beta.138";
2 changes: 1 addition & 1 deletion packages/hdnode/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "hdnode/5.0.0-beta.137";
exports.version = "hdnode/5.0.0-beta.138";
2 changes: 1 addition & 1 deletion packages/hdnode/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export declare class HDNode implements ExternallyOwnedAccount {
* - fromSeed
*/
constructor(constructorGuard: any, privateKey: string, publicKey: string, parentFingerprint: string, chainCode: string, index: number, depth: number, mnemonicOrPath: Mnemonic | string);
readonly extendedKey: string;
get extendedKey(): string;
neuter(): HDNode;
private _derive;
derivePath(path: string): HDNode;
Expand Down
4 changes: 2 additions & 2 deletions packages/hdnode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xbf0a4cf98cdf0fea180c9bfe5faa96d989123e583226c39d6dd069f6e394aefd",
"tarballHash": "0x1ccea694966b7c00d395ae5225c7cdb0f53b4ca47694e72ae2712c347f66d08e",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.137"
"version": "5.0.0-beta.138"
}
2 changes: 1 addition & 1 deletion packages/hdnode/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "hdnode/5.0.0-beta.137";
export const version = "hdnode/5.0.0-beta.138";
2 changes: 1 addition & 1 deletion packages/providers/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "providers/5.0.0-beta.157";
export declare const version = "providers/5.0.0-beta.158";
2 changes: 1 addition & 1 deletion packages/providers/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "providers/5.0.0-beta.157";
export const version = "providers/5.0.0-beta.158";
16 changes: 9 additions & 7 deletions packages/providers/lib.esm/base-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export declare class Event {
readonly once: boolean;
readonly tag: string;
constructor(tag: string, listener: Listener, once: boolean);
readonly type: string;
readonly hash: string;
readonly filter: Filter;
get type(): string;
get hash(): string;
get filter(): Filter;
pollable(): boolean;
}
export declare class BaseProvider extends Provider {
Expand Down Expand Up @@ -58,11 +58,13 @@ export declare class BaseProvider extends Provider {
_getInternalBlockNumber(maxAge: number): Promise<number>;
poll(): Promise<void>;
resetEventsBlock(blockNumber: number): void;
readonly network: Network;
get network(): Network;
getNetwork(): Promise<Network>;
readonly blockNumber: number;
polling: boolean;
pollingInterval: number;
get blockNumber(): number;
get polling(): boolean;
set polling(value: boolean);
get pollingInterval(): number;
set pollingInterval(value: number);
_getFastBlockNumber(): Promise<number>;
_setFastBlockNumber(blockNumber: number): void;
waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
Expand Down
5 changes: 3 additions & 2 deletions packages/providers/lib.esm/websocket-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export declare class WebSocketProvider extends JsonRpcProvider {
};
_wsReady: boolean;
constructor(url: string, network: Networkish);
pollingInterval: number;
get pollingInterval(): number;
resetEventsBlock(blockNumber: number): void;
set pollingInterval(value: number);
poll(): Promise<void>;
polling: boolean;
set polling(value: boolean);
send(method: string, params?: Array<any>): Promise<any>;
static defaultUrl(): string;
_subscribe(tag: string, param: Array<any>, processFunc: (result: any) => void): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/providers/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "providers/5.0.0-beta.157";
export declare const version = "providers/5.0.0-beta.158";
2 changes: 1 addition & 1 deletion packages/providers/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "providers/5.0.0-beta.157";
exports.version = "providers/5.0.0-beta.158";
Loading

0 comments on commit bd32ee0

Please sign in to comment.