interface Identity
(source)
A Scuttlebutt identity, backed by a public key. Currently supported: Ed25519 and SECP256K1.
class Curve
Curves supported by those identities. |
abstract fun curve(): Curve
Provides the curve associated with this identity |
|
open fun curveName(): String
Provides the name of the curve associated with this identity |
|
abstract fun ed25519PublicKey(): PublicKey
Provides the identity's associated Ed25519 public key. |
|
open static fun fromKeyPair(keyPair: KeyPair): Identity
Creates a new Ed25519 identity backed by this key pair. open static fun fromKeyPair(keyPair: KeyPair): Identity
Creates a new SECP256K1 identity backed by this key pair. |
|
open static fun fromPublicKey(publicKey: PublicKey): Identity
Creates a new SECP256K1 identity backed by this secret key. open static fun fromPublicKey(publicKey: PublicKey): Identity
Creates a new Ed25519 identity backed by this secret key. |
|
open static fun fromSecretKey(secretKey: SecretKey): Identity
Creates a new Ed25519 identity backed by this secret key. open static fun fromSecretKey(secretKey: SecretKey): Identity
Creates a new SECP256K1 identity backed by this secret key. |
|
abstract fun publicKeyAsBase64String(): String
Provides the base64 encoded representation of the public key of the identity |
|
open static fun random(): Identity
Creates a new random Ed25519 identity. |
|
open static fun randomEd25519(): Identity
Creates a new random Ed25519 identity. |
|
open static fun randomSECP256K1(): Identity
Creates a new random secp251k1 identity. |
|
abstract fun secp256k1PublicKey(): PublicKey
Provides the identity's associated SECP256K1 public key. |
|
abstract fun sign(message: Bytes): Bytes
Hashes data using the secret key of the identity. |
|
open fun toCanonicalForm(): String
Encodes the identity into a canonical Scuttlebutt identity string |
|
abstract fun verify(signature: Bytes, message: Bytes): Boolean
Verifies a signature matches a message according to the public key of the identity. |