PublicKeyInterface
interface PublicKeyInterface
Enum of valid public keys for the signature schemes supported by IOTA.
BCS
The BCS serialized form for this type is defined by the following ABNF:
public-key = %d00 ed25519-public-key /
%d01 secp256k1-public-key /
%d02 secp256r1-public-key /
%d04 passkey-public-key
The gap in the flag values is intentional, as not all signature scheme support public keys.
There is also a base64 encoding for this type defined as:
base64-public-key = string ; which is valid base64 encoded
; and the decoded bytes are defined
; by flagged-public-key
flagged-public-key = (ed25519-flag ed25519-public-key) /
(secp256k1-flag secp256k1-public-key) /
(secp256r1-flag secp256r1-public-key) /
(passkey-flag passkey-public-key)
Inheritors
| PublicKey |
Functions
| Name | Summary |
|---|---|
| asEd25519 | abstract fun asEd25519(): Ed25519PublicKey |
| asOptEd25519 | abstract fun asOptEd25519(): Ed25519PublicKey? |
| asOptPasskey | abstract fun asOptPasskey(): PasskeyPublicKey? |
| asOptSecp256k1 | abstract fun asOptSecp256k1(): Secp256k1PublicKey? |
| asOptSecp256r1 | abstract fun asOptSecp256r1(): Secp256r1PublicKey? |
| asPasskey | abstract fun asPasskey(): PasskeyPublicKey |
| asSecp256k1 | abstract fun asSecp256k1(): Secp256k1PublicKey |
| asSecp256r1 | abstract fun asSecp256r1(): Secp256r1PublicKey |
| isEd25519 | abstract fun isEd25519(): Boolean |
| isPasskey | abstract fun isPasskey(): Boolean |
| isSecp256k1 | abstract fun isSecp256k1(): Boolean |
| isSecp256r1 | abstract fun isSecp256r1(): Boolean |
| scheme | abstract fun scheme(): SignatureScheme |
| toBase64 | abstract fun toBase64(): String Encode this public key as a base64 string of its scheme-flagged byte representation |