Skip to content

Commit

Permalink
type of eth.accounts.recover does not match with the declaration (#1193)
Browse files Browse the repository at this point in the history
* Update eth.accounts.recover type

type of eth.accounts.recover does not match the function declaration:
```web3.eth.accounts.recover(signatureObject);```
or
```web3.eth.accounts.recover(hash, signature);```
or
```web3.eth.accounts.recover(hash, v, r, s);```

* Update types.d.ts

added ? for optional arguments on eth.accounts.recover
  • Loading branch information
zurbo authored and frozeman committed Nov 27, 2017
1 parent d19f889 commit e610f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web3/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export declare class Eth {
signTransaction(tx: Tx, privateKey: string, returnSignature?: boolean, cb?: (err: Error, result: string | Signature) => void): Promise<string> | Signature
recoverTransaction(signature: string | Signature): string
sign(data: string, privateKey: string, returnSignature?: boolean): string | Signature
recover(signature: string | Signature): string
recover(sigOrHash: string | Signature, sigOrV ?: string, r ?: string, s ?: string): string
encrypt(privateKey: string, password: string): PrivateKey
decrypt(privateKey: PrivateKey, password: string): Account
wallet: {
Expand Down

0 comments on commit e610f6c

Please sign in to comment.