This repository has been archived by the owner on Jun 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into removing-native-js-dependencies
# Conflicts: # src/account.ts
- Loading branch information
Showing
12 changed files
with
94 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
declare module 'ethjs-util' { | ||
/** | ||
* @description Returns a `Boolean` on whether or not the a `String` starts with '0x' | ||
*/ | ||
export function isHexPrefixed(str: string): boolean | ||
|
||
/** | ||
* @description Removes '0x' from a given `String` if present | ||
*/ | ||
export function stripHexPrefix(str: string): string | ||
|
||
/** | ||
* @description Pads a `String` to have an even length | ||
*/ | ||
export function padToEven(value: string): string | ||
|
||
/** | ||
* @description Converts a `Number` into a hex `String` | ||
*/ | ||
export function intToHex(i: number): string | ||
|
||
/** | ||
* @description Converts an `Number` to a `Buffer` | ||
*/ | ||
export function intToBuffer(i: number): Buffer | ||
|
||
/** | ||
* @description Get the binary size of a string | ||
*/ | ||
export function getBinarySize(str: string): number | ||
|
||
/** | ||
* @description Returns TRUE if the first specified array contains all elements | ||
* from the second one. FALSE otherwise. If `some` is true, will | ||
* return true if first specified array contain some elements of | ||
* the second. | ||
*/ | ||
export function arrayContainsArray(superset: any[], subset: any[], some?: boolean): boolean | ||
|
||
/** | ||
* @description Should be called to get utf8 from it's hex representation | ||
*/ | ||
export function toUtf8(hex: string): string | ||
|
||
/** | ||
* @description Should be called to get ascii from it's hex representation | ||
*/ | ||
export function toAscii(hex: string): string | ||
|
||
/** | ||
* @description Should be called to get hex representation (prefixed by 0x) of utf8 string | ||
*/ | ||
export function fromUtf8(stringValue: string): string | ||
|
||
/** | ||
* @description Should be called to get hex representation (prefixed by 0x) of ascii string | ||
*/ | ||
export function fromAscii(stringValue: string): string | ||
|
||
/** | ||
* @description getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3] | ||
*/ | ||
export function getKeys(params: any[], key: string, allowEmpty?: boolean): any[] | ||
|
||
/** | ||
* @description check if string is hex string of specific length | ||
*/ | ||
export function isHexString(value: string, length?: number): boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"extends": "@ethereumjs/config-tsc", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"*": ["src/@types/*"] | ||
} | ||
}, | ||
"include": ["src/**/*.ts", "test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"extends": "@ethereumjs/config-tsc", | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./dist" | ||
}, | ||
"include": ["src/**/*.ts"] | ||
} | ||
} |