SimpleSignature
open class SimpleSignature : Disposable, AutoCloseable, SimpleSignatureInterface
A basic signature
This enumeration defines the set of simple or basic signature schemes supported by IOTA. Most signature schemes supported by IOTA end up comprising of a at least one simple signature scheme.
BCS
The BCS serialized form of this type is specified in bcs-schema.abnf.
Note: Due to historical reasons, signatures are serialized slightly different from the majority of the types in IOTA. In particular if a signature is ever embedded in another structure it generally is serialized as bytes meaning it has a length prefix that defines the length of the completely serialized signature.
Functions
| Name | Summary |
|---|---|
| close | @Synchronized open override fun close() |
| deriveAddress | open override fun deriveAddress(): Address Derive the Address of the public key that produced this signature. |
| destroy | open override fun destroy() |
| ed25519PublicKey | open override fun ed25519PublicKey(): Ed25519PublicKey |
| ed25519Signature | open override fun ed25519Signature(): Ed25519Signature |
| equals | open operator override fun equals(other: Any?): Boolean |
| hashCode | open override fun hashCode(): Int |
| isEd25519 | open override fun isEd25519(): Boolean |
| isSecp256k1 | open override fun isSecp256k1(): Boolean |
| isSecp256r1 | open override fun isSecp256r1(): Boolean |
| optEd25519PublicKey | open override fun optEd25519PublicKey(): Ed25519PublicKey? |
| optEd25519Signature | open override fun optEd25519Signature(): Ed25519Signature? |
| optSecp256k1PublicKey | open override fun optSecp256k1PublicKey(): Secp256k1PublicKey? |
| optSecp256k1Signature | open override fun optSecp256k1Signature(): Secp256k1Signature? |
| optSecp256r1PublicKey | open override fun optSecp256r1PublicKey(): Secp256r1PublicKey? |
| optSecp256r1Signature | open override fun optSecp256r1Signature(): Secp256r1Signature? |
| scheme | open override fun scheme(): SignatureScheme |
| secp256k1PublicKey | open override fun secp256k1PublicKey(): Secp256k1PublicKey |
| secp256k1Signature | open override fun secp256k1Signature(): Secp256k1Signature |
| secp256r1PublicKey | open override fun secp256r1PublicKey(): Secp256r1PublicKey |
| secp256r1Signature | open override fun secp256r1Signature(): Secp256r1Signature |
| signatureBytes | open override fun signatureBytes(): ByteArray The raw signature bytes, without the scheme flag or the public key. |
| toBase64 | open override fun toBase64(): String Base64-encode this signature as its `flag |
| toBcs | open override fun toBcs(): ByteArray Convert this type to BCS encoded bytes. |
| toBytes | open override fun toBytes(): ByteArray |
| toDisplayString | open override fun toDisplayString(): String Render this type as human-readable text. |
| toJson | open override fun toJson(): String Convert this type to a JSON encoded string. |
| toPublicKey | open override fun toPublicKey(): PublicKey The public key embedded in this signature. |
| toString | open override fun toString(): String |
Companion object functions
| Name | Summary |
|---|---|
| fromBase64 | fun fromBase64(base64: String): SimpleSignature Decode a signature from the Base64 form produced by to_base64, i.e. base64 over the `flag |
| fromBcs | fun fromBcs(bcs: ByteArray): SimpleSignature Create this type from BCS encoded bytes. |
| fromJson | fun fromJson(json: String): SimpleSignature Create this type from a JSON encoded string. |
| newEd25519 | fun newEd25519(signature: Ed25519Signature, publicKey: Ed25519PublicKey): SimpleSignature |
| newSecp256k1 | fun newSecp256k1(signature: Secp256k1Signature, publicKey: Secp256k1PublicKey): SimpleSignature |
| newSecp256r1 | fun newSecp256r1(signature: Secp256r1Signature, publicKey: Secp256r1PublicKey): SimpleSignature |