Constructor
Raw secret key (32-byte secret seed in ed25519`)
Public-key signature system name. (currently only ed25519
keys are supported)
Returns true
if this Keypair
object contains secret key and can sign.
Decrypts the given data
using a Curve25519 'variant' of the private key.
Assumes ciphertext includes ephemeral public key and nonce used in original encryption
(e.g., via encrypt
).
Data to decrypt
Encrypts the given data
using a Curve25519 'variant' of the public key.
The encryption uses an ephemeral private key, which is prepended to the ciphertext, along with a nonce of random bytes.
Data to encrypt
Returns base58-encoded public key associated with this Keypair
object.
Returns raw public key
Returns raw secret key.
Returns base58-encoded secret key associated with this Keypair
object
Signs data.
Data to sign
Verifies if signature
for data
is valid.
Signed data
Signature
Creates a new Keypair
object from ed25519 secret key seed raw bytes.
Raw 32-byte ed25519 secret key seed
Creates a new Keypair
instance from secret. This can either be secret key or secret seed depending
on underlying public-key signature system. Currently Keypair
only supports ed25519.
secret key (ex. SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS
)
Create a random Keypair
object.
Keypair
represents public (and secret) keys of the account.Currently
Keypair
only supports ed25519 but in a future this class can be an abstraction layer for other public-key signature systems.Copyright (c) 2015-2018 Stellar Development Foundation