Commit js, ts, and definitions in separate folders
This commit is contained in:
parent
e7ac2b9a4e
commit
bc28949056
148 changed files with 3850 additions and 39 deletions
types
34
types/ecpair.d.ts
vendored
Normal file
34
types/ecpair.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/// <reference types="node" />
|
||||
import { Network } from './networks';
|
||||
interface ECPairOptions {
|
||||
compressed?: boolean;
|
||||
network?: Network;
|
||||
rng?(arg0: Buffer): Buffer;
|
||||
}
|
||||
export interface ECPairInterface {
|
||||
compressed: boolean;
|
||||
network: Network;
|
||||
privateKey?: Buffer;
|
||||
publicKey?: Buffer;
|
||||
toWIF(): string;
|
||||
sign(hash: Buffer): Buffer;
|
||||
verify(hash: Buffer, signature: Buffer): Buffer;
|
||||
getPublicKey?(): Buffer;
|
||||
}
|
||||
declare class ECPair implements ECPairInterface {
|
||||
compressed: boolean;
|
||||
network: Network;
|
||||
private __d?;
|
||||
private __Q?;
|
||||
constructor(d?: Buffer, Q?: Buffer, options?: ECPairOptions);
|
||||
readonly privateKey: Buffer | undefined;
|
||||
readonly publicKey: Buffer | undefined;
|
||||
toWIF(): string;
|
||||
sign(hash: Buffer): Buffer;
|
||||
verify(hash: Buffer, signature: Buffer): Buffer;
|
||||
}
|
||||
declare function fromPrivateKey(buffer: Buffer, options?: ECPairOptions): ECPair;
|
||||
declare function fromPublicKey(buffer: Buffer, options?: ECPairOptions): ECPair;
|
||||
declare function fromWIF(string: string, network?: Network | Array<Network>): ECPair;
|
||||
declare function makeRandom(options?: ECPairOptions): ECPair;
|
||||
export { makeRandom, fromPrivateKey, fromPublicKey, fromWIF };
|
Loading…
Add table
Add a link
Reference in a new issue