Preparing search index...
The search index is not available
@xmtp/xmtp-js
@xmtp/xmtp-js
PrivateKey
Class 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
Parameters
obj
:
PrivateKey
Returns
PrivateKey
Properties
public
Key
public
Key
:
PublicKey
public key for this private key
secp256k1
secp256k1
:
secp256k1
timestamp
timestamp
:
Long
time the key was created
Methods
decrypt
decrypt
(
encrypted
,
peer
,
additionalData
?
)
:
Promise
<
Uint8Array
>
Parameters
encrypted
:
Ciphertext
peer
:
PublicKey
Optional
additionalData
:
Uint8Array
Returns
Promise
<
Uint8Array
>
encrypt
encrypt
(
plain
,
peer
,
additionalData
?
)
:
Promise
<
Ciphertext
>
Parameters
plain
:
Uint8Array
peer
:
PublicKey
Optional
additionalData
:
Uint8Array
Returns
Promise
<
Ciphertext
>
generated
generated
(
)
:
undefined
|
Date
Returns
undefined
|
Date
matches
matches
(
key
)
:
boolean
Parameters
key
:
PublicKey
Returns
boolean
shared
Secret
shared
Secret
(
peer
)
:
Uint8Array
Parameters
peer
:
SignedPublicKey
|
PublicKey
Returns
Uint8Array
sign
sign
(
digest
)
:
Promise
<
Signature
>
Parameters
digest
:
Uint8Array
Returns
Promise
<
Signature
>
sign
Key
sign
Key
(
pub
)
:
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
)
:
PrivateKey
Parameters
bytes
:
Uint8Array
Returns
PrivateKey
Static
generate
generate
(
)
:
PrivateKey
Returns
PrivateKey
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
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
@xmtp/xmtp-js
Loading...
public key for this private key