bsv.PrivateKey
Class: PrivateKey
bsv.PrivateKey
Table of contents
Constructors
Properties
Methods
- inspect
- toAddress
- toBigNumber
- toBuffer
- toByteString
- toHex
- toJSON
- toObject
- toPublicKey
- toString
- toWIF
- fromBuffer
- fromHex
- fromRandom
- fromString
- fromWIF
- getValidationError
- isValid
Constructors
constructor
• new PrivateKey(key?
, network?
)
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
network? | Type |
Returns
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
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
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
Name | Type |
---|---|
buf | Buffer |
network | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1050
fromHex
▸ Static
fromHex(hex
, network
): PrivateKey
Parameters
Name | Type |
---|---|
hex | string |
network | Type |
Returns
Defined in
node_modules/bsv/index.d.ts:1051
fromRandom
▸ Static
fromRandom(netowrk?
): PrivateKey
Parameters
Name | Type |
---|---|
netowrk? | string | Network |
Returns
Defined in
node_modules/bsv/index.d.ts:1049
fromString
▸ Static
fromString(str
): PrivateKey
Parameters
Name | Type |
---|---|
str | string |
Returns
Defined in
node_modules/bsv/index.d.ts:1047
fromWIF
▸ Static
fromWIF(str
): PrivateKey
Parameters
Name | Type |
---|---|
str | string |
Returns
Defined in
node_modules/bsv/index.d.ts:1048
getValidationError
▸ Static
getValidationError(data
): any
Parameters
Name | Type |
---|---|
data | string |
Returns
any
Defined in
node_modules/bsv/index.d.ts:1052
isValid
▸ Static
isValid(data
): boolean
Parameters
Name | Type |
---|---|
data | string |
Returns
boolean
Defined in
node_modules/bsv/index.d.ts:1053