@types/ethjs-signer
Version:
TypeScript definitions for ethjs-signer
32 lines (24 loc) • 1.12 kB
Markdown
# Installation
> `npm install --save @types/ethjs-signer`
# Summary
This package contains type definitions for ethjs-signer (https://github.com/ethjs/ethjs-signer/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ethjs-signer.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ethjs-signer/index.d.ts)
````ts
/// <reference types="node" />
/**
* Signs a raw transaction and return it either as a serialized hex string or raw tx object.
*/
export function sign(transaction: object, privateKey: string, toObject?: false): string;
export function sign(transaction: object, privateKey: string, toObject: true): any[];
/**
* Recovers a ECDSA public key from a raw transaction.
*/
export function recover(rawTx: string | Buffer, v: number, r: Buffer, s: Buffer): Buffer;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Bryson Thill](https://github.com/doppio).