PrivateKey⚓︎
- PrivateKey
- Represents a private key.
Extends⚓︎
Constructors⚓︎
new PrivateKey()⚓︎
Creates a private key from bytes or a hex string.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
privateKey |
string | Uint8Array <ArrayBufferLike > |
Input string or byte array. |
Returns⚓︎
PrivateKey
Overrides⚓︎
Properties⚓︎
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
bytes |
public |
Uint8Array |
Underlying bytes. | ByteArray .bytes |
NAME |
static |
string |
Byte array name (required because constructor.name is dropped during minification). |
ByteArray .NAME |
SIZE |
static |
number |
Byte size of raw private key. | - |
Methods⚓︎
toJson()⚓︎
- PrivateKey.toJson
- Returns representation of this object that can be stored in JSON.
Returns⚓︎
string
JSON-safe representation of this object.
Inherited from⚓︎
toString()⚓︎
- PrivateKey.toString
- Returns string representation of this object.
Returns⚓︎
string
String representation of this object
Inherited from⚓︎
random()⚓︎
- PrivateKey.random
- Creates a random private key.
Returns⚓︎
PrivateKey
Random private key.