Skip to main content

IPublicKey

Namespace: IotaSdk

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)
public interface IPublicKey : System.IEquatable`1[[IotaSdk.PublicKey, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Implements IEquatable<PublicKey>
Attributes NullableContextAttribute

Methods​

AsEd25519()​

Ed25519PublicKey AsEd25519()

Returns​

Ed25519PublicKey

AsOptEd25519()​

Ed25519PublicKey? AsOptEd25519()

Returns​

Ed25519PublicKey?

AsOptPasskey()​

PasskeyPublicKey? AsOptPasskey()

Returns​

PasskeyPublicKey?

AsOptSecp256k1()​

Secp256k1PublicKey? AsOptSecp256k1()

Returns​

Secp256k1PublicKey?

AsOptSecp256r1()​

Secp256r1PublicKey? AsOptSecp256r1()

Returns​

Secp256r1PublicKey?

AsPasskey()​

PasskeyPublicKey AsPasskey()

Returns​

PasskeyPublicKey

AsSecp256k1()​

Secp256k1PublicKey AsSecp256k1()

Returns​

Secp256k1PublicKey

AsSecp256r1()​

Secp256r1PublicKey AsSecp256r1()

Returns​

Secp256r1PublicKey

IsEd25519()​

bool IsEd25519()

Returns​

Boolean

IsPasskey()​

bool IsPasskey()

Returns​

Boolean

IsSecp256k1()​

bool IsSecp256k1()

Returns​

Boolean

IsSecp256r1()​

bool IsSecp256r1()

Returns​

Boolean

Scheme()​

SignatureScheme Scheme()

Returns​

SignatureScheme

ToBase64()​

Encode this public key as a base64 string of its scheme-flagged byte representation

string ToBase64()

Returns​

String