PrivateKey
Class: PrivateKey
Implements
PrivateKey
Constructors
constructor
new PrivateKey(obj
)
Parameters
Name | Type |
---|---|
obj | PrivateKey |
Defined in
Properties
publicKey
publicKey: PublicKey
Implementation of
privateKey.PrivateKey.publicKey
Defined in
secp256k1
secp256k1: secp256k1
Implementation of
privateKey.PrivateKey.secp256k1
Defined in
timestamp
timestamp: Long
Implementation of
privateKey.PrivateKey.timestamp
Defined in
Methods
decrypt
decrypt(encrypted
, peer
, additionalData?
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
encrypted | default |
peer | PublicKey |
additionalData? | Uint8Array |
Returns
Promise
<Uint8Array
>
Defined in
encrypt
encrypt(plain
, peer
, additionalData?
): Promise
<default
>
Parameters
Name | Type |
---|---|
plain | Uint8Array |
peer | PublicKey |
additionalData? | Uint8Array |
Returns
Promise
<default
>
Defined in
generated
generated(): undefined
| Date
Returns
undefined
| Date
Defined in
matches
matches(key
): boolean
Parameters
Name | Type |
---|---|
key | PublicKey |
Returns
boolean
Defined in
sharedSecret
sharedSecret(peer
): Uint8Array
Parameters
Name | Type |
---|---|
peer | SignedPublicKey | PublicKey |
Returns
Uint8Array
Defined in
sign
sign(digest
): Promise
<default
>
Parameters
Name | Type |
---|---|
digest | Uint8Array |
Returns
Promise
<default
>
Defined in
signKey
signKey(pub
): Promise
<PublicKey
>
Parameters
Name | Type |
---|---|
pub | PublicKey |
Returns
Promise
<PublicKey
>
Defined in
toBytes
toBytes(): Uint8Array
Returns
Uint8Array
Defined in
fromBytes
Static
fromBytes(bytes
): PrivateKey
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Defined in
generate
Static
generate(): PrivateKey