-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2596 from ethereum/testing/accounts-module
Testing Accounts Module
- Loading branch information
Showing
6 changed files
with
63 additions
and
27 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
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 |
---|---|---|
|
@@ -13,16 +13,16 @@ | |
*/ | ||
/** | ||
* @file index.d.ts | ||
* @author Josh Stevens <[email protected]> | ||
* @author Josh Stevens <[email protected]>, Samuel Furter <[email protected]> | ||
* @date 2018 | ||
*/ | ||
|
||
import {AbstractWeb3Module, TransactionConfig, Web3ModuleOptions, SignedTransaction} from 'web3-core'; | ||
import {AbstractWeb3Module, SignedTransaction, TransactionConfig, Web3ModuleOptions} from 'web3-core'; | ||
import {provider} from 'web3-providers'; | ||
import * as net from 'net'; | ||
|
||
export class Accounts extends AbstractWeb3Module { | ||
constructor(provider: provider, net?: net.Socket|null, options?: Web3ModuleOptions); | ||
constructor(provider: provider, net?: net.Socket | null, options?: Web3ModuleOptions); | ||
|
||
create(entropy?: string): Account; | ||
|
||
|
@@ -36,7 +36,7 @@ export class Accounts extends AbstractWeb3Module { | |
|
||
sign(data: string, privateKey: string): Sign; | ||
|
||
recover(signedTransaction: SignedTransaction): string; | ||
recover(signatureObject: SignatureObject): string; | ||
recover(message: string, signature: string, preFixed?: boolean): string; | ||
recover(message: string, v: string, r: string, s: string, preFixed?: boolean): string; | ||
|
||
|
@@ -50,6 +50,10 @@ export class Accounts extends AbstractWeb3Module { | |
export class Wallet { | ||
constructor(accounts: Accounts); | ||
|
||
accountsIndex: number; | ||
length: number; | ||
defaultKeyName: string; | ||
|
||
create(numberOfAccounts: number, entropy?: string): Wallet; | ||
|
||
add(account: string | AddAccount): AddedAccount; | ||
|
@@ -111,3 +115,10 @@ export interface Sign extends SignedTransaction { | |
message: string; | ||
signature: string; | ||
} | ||
|
||
export interface SignatureObject { | ||
messageHash: string; | ||
r: string; | ||
s: string; | ||
v: string; | ||
} |