Skip to main content

bsv.PrivateKey

scrypt-ts / bsv / PrivateKey

Class: PrivateKey

bsv.PrivateKey

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new PrivateKey(key?, network?)

Parameters

NameType
key?string | PrivateKey
network?Type

Defined in

node_modules/bsv/index.d.ts:1028

Properties

bn

Readonly bn: BN

Defined in

node_modules/bsv/index.d.ts:1030


compressed

Readonly compressed: boolean

Defined in

node_modules/bsv/index.d.ts:1033


network

Readonly network: Network

Defined in

node_modules/bsv/index.d.ts:1034


publicKey

Readonly publicKey: PublicKey

Defined in

node_modules/bsv/index.d.ts:1032

Methods

inspect

inspect(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1045


toAddress

toAddress(network?): Address

Parameters

NameType
network?Type

Returns

Address

Defined in

node_modules/bsv/index.d.ts:1036


toBigNumber

toBigNumber(): any

Returns

any

Defined in

node_modules/bsv/index.d.ts:1043


toBuffer

toBuffer(): Buffer

Returns

Buffer

Defined in

node_modules/bsv/index.d.ts:1044


toByteString

toByteString(): ByteString

Returns

ByteString

Defined in

dist/smart-contract/bsv/privateKey.d.ts:5


toHex

toHex(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1042


toJSON

toJSON(): object

Returns

object

Defined in

node_modules/bsv/index.d.ts:1040


toObject

toObject(): object

Returns

object

Defined in

node_modules/bsv/index.d.ts:1039


toPublicKey

toPublicKey(): PublicKey

Returns

PublicKey

Defined in

node_modules/bsv/index.d.ts:1037


toString

toString(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1038


toWIF

toWIF(): string

Returns

string

Defined in

node_modules/bsv/index.d.ts:1041


fromBuffer

Static fromBuffer(buf, network): PrivateKey

Parameters

NameType
bufBuffer
networkType

Returns

PrivateKey

Defined in

node_modules/bsv/index.d.ts:1050


fromHex

Static fromHex(hex, network): PrivateKey

Parameters

NameType
hexstring
networkType

Returns

PrivateKey

Defined in

node_modules/bsv/index.d.ts:1051


fromRandom

Static fromRandom(netowrk?): PrivateKey

Parameters

NameType
netowrk?string | Network

Returns

PrivateKey

Defined in

node_modules/bsv/index.d.ts:1049


fromString

Static fromString(str): PrivateKey

Parameters

NameType
strstring

Returns

PrivateKey

Defined in

node_modules/bsv/index.d.ts:1047


fromWIF

Static fromWIF(str): PrivateKey

Parameters

NameType
strstring

Returns

PrivateKey

Defined in

node_modules/bsv/index.d.ts:1048


getValidationError

Static getValidationError(data): any

Parameters

NameType
datastring

Returns

any

Defined in

node_modules/bsv/index.d.ts:1052


isValid

Static isValid(data): boolean

Parameters

NameType
datastring

Returns

boolean

Defined in

node_modules/bsv/index.d.ts:1053