Search
Preparing search index...
The search index is not available
@xmtp/xmtp-js
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@xmtp/xmtp-js
PrivateKey
Class PrivateKey
Hierarchy
PrivateKey
Implements
PrivateKey
Index
Constructors
constructor
Properties
public
Key
secp256k1
timestamp
Methods
decrypt
encrypt
generated
matches
shared
Secret
sign
sign
Key
to
Bytes
validate
Public
Key
from
Bytes
generate
Constructors
constructor
new
Private
Key
(
obj
:
PrivateKey
)
:
PrivateKey
Parameters
obj:
PrivateKey
Returns
PrivateKey
Properties
public
Key
public
Key
:
PublicKey
secp256k1
secp256k1
:
secp256k1
timestamp
timestamp
:
Long
Methods
decrypt
decrypt
(
encrypted
:
Ciphertext
, peer
:
PublicKey
, additionalData
?:
Uint8Array
)
:
Promise
<
Uint8Array
>
Parameters
encrypted:
Ciphertext
peer:
PublicKey
Optional
additionalData:
Uint8Array
Returns
Promise
<
Uint8Array
>
encrypt
encrypt
(
plain
:
Uint8Array
, peer
:
PublicKey
, additionalData
?:
Uint8Array
)
:
Promise
<
Ciphertext
>
Parameters
plain:
Uint8Array
peer:
PublicKey
Optional
additionalData:
Uint8Array
Returns
Promise
<
Ciphertext
>
generated
generated
(
)
:
undefined
|
Date
Returns
undefined
|
Date
matches
matches
(
key
:
PublicKey
)
:
boolean
Parameters
key:
PublicKey
Returns
boolean
shared
Secret
shared
Secret
(
peer
:
PublicKey
|
SignedPublicKey
)
:
Uint8Array
Parameters
peer:
PublicKey
|
SignedPublicKey
Returns
Uint8Array
sign
sign
(
digest
:
Uint8Array
)
:
Promise
<
Signature
>
Parameters
digest:
Uint8Array
Returns
Promise
<
Signature
>
sign
Key
sign
Key
(
pub
:
PublicKey
)
:
Promise
<
PublicKey
>
Parameters
pub:
PublicKey
Returns
Promise
<
PublicKey
>
to
Bytes
to
Bytes
(
)
:
Uint8Array
Returns
Uint8Array
validate
Public
Key
validate
Public
Key
(
)
:
boolean
Returns
boolean
Static
from
Bytes
from
Bytes
(
bytes
:
Uint8Array
)
:
PrivateKey
Parameters
bytes:
Uint8Array
Returns
PrivateKey
Static
generate
generate
(
)
:
PrivateKey
Returns
PrivateKey
Exports
Private
Key
constructor
public
Key
secp256k1
timestamp
decrypt
encrypt
generated
matches
shared
Secret
sign
sign
Key
to
Bytes
validate
Public
Key
from
Bytes
generate
Generated using
TypeDoc