Skip to main content

SimpleSignature

Namespace: IotaSdk

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.

public class SimpleSignature : ISimpleSignature, System.IEquatable`1[[IotaSdk.SimpleSignature, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable

Inheritance Object → SimpleSignature
Implements ISimpleSignature, IEquatable<SimpleSignature>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

SimpleSignature(UInt64)​

public SimpleSignature(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

DeriveAddress()​

Derive the Address of the public key that produced this signature.

public Address DeriveAddress()

Returns​

Address

Ed25519PublicKey()​

public Ed25519PublicKey Ed25519PublicKey()

Returns​

Ed25519PublicKey

Ed25519Signature()​

public Ed25519Signature Ed25519Signature()

Returns​

Ed25519Signature

IsEd25519()​

public bool IsEd25519()

Returns​

Boolean

IsSecp256k1()​

public bool IsSecp256k1()

Returns​

Boolean

IsSecp256r1()​

public bool IsSecp256r1()

Returns​

Boolean

OptEd25519PublicKey()​

public Ed25519PublicKey? OptEd25519PublicKey()

Returns​

Ed25519PublicKey?

OptEd25519Signature()​

public Ed25519Signature? OptEd25519Signature()

Returns​

Ed25519Signature?

OptSecp256k1PublicKey()​

public Secp256k1PublicKey? OptSecp256k1PublicKey()

Returns​

Secp256k1PublicKey?

OptSecp256k1Signature()​

public Secp256k1Signature? OptSecp256k1Signature()

Returns​

Secp256k1Signature?

OptSecp256r1PublicKey()​

public Secp256r1PublicKey? OptSecp256r1PublicKey()

Returns​

Secp256r1PublicKey?

OptSecp256r1Signature()​

public Secp256r1Signature? OptSecp256r1Signature()

Returns​

Secp256r1Signature?

Scheme()​

public SignatureScheme Scheme()

Returns​

SignatureScheme

Secp256k1PublicKey()​

public Secp256k1PublicKey Secp256k1PublicKey()

Returns​

Secp256k1PublicKey

Secp256k1Signature()​

public Secp256k1Signature Secp256k1Signature()

Returns​

Secp256k1Signature

Secp256r1PublicKey()​

public Secp256r1PublicKey Secp256r1PublicKey()

Returns​

Secp256r1PublicKey

Secp256r1Signature()​

public Secp256r1Signature Secp256r1Signature()

Returns​

Secp256r1Signature

SignatureBytes()​

The raw signature bytes, without the scheme flag or the public key.

public Byte[] SignatureBytes()

Returns​

Byte[]

ToBase64()​

Base64-encode this signature as its flag || sig || pubkey bytes.

public string ToBase64()

Returns​

String

ToBcs()​

Convert this type to BCS encoded bytes.

public Byte[] ToBcs()

Returns​

Byte[]

Exceptions​

SdkFfiException

ToBytes()​

public Byte[] ToBytes()

Returns​

Byte[]

ToDisplayString()​

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

public string ToDisplayString()

Returns​

String

ToJson()​

Convert this type to a JSON encoded string.

public string ToJson()

Returns​

String

Exceptions​

SdkFfiException

ToPublicKey()​

The public key embedded in this signature.

public PublicKey ToPublicKey()

Returns​

PublicKey

Equals(SimpleSignature)​

public bool Equals(SimpleSignature? other)

Parameters​

other SimpleSignature?

Returns​

Boolean

Equals(Object)​

public override bool Equals(object? obj)

Parameters​

obj Object?

Returns​

Boolean

GetHashCode()​

public override int GetHashCode()

Returns​

Int32

FromBase64(String)​

Decode a signature from the Base64 form produced by to_base64, i.e. base64 over the flag || sig || pubkey bytes.

public static SimpleSignature FromBase64(string base64)

Parameters​

base64 String

Returns​

SimpleSignature

Exceptions​

SdkFfiException

FromBcs(Byte[])​

Create this type from BCS encoded bytes.

public static SimpleSignature FromBcs(Byte[] bcs)

Parameters​

bcs Byte[]

Returns​

SimpleSignature

Exceptions​

SdkFfiException

FromJson(String)​

Create this type from a JSON encoded string.

public static SimpleSignature FromJson(string json)

Parameters​

json String

Returns​

SimpleSignature

Exceptions​

SdkFfiException

NewEd25519(Ed25519Signature, Ed25519PublicKey)​

public static SimpleSignature NewEd25519(Ed25519Signature signature, Ed25519PublicKey publicKey)

Parameters​

signature Ed25519Signature

publicKey Ed25519PublicKey

Returns​

SimpleSignature

NewSecp256k1(Secp256k1Signature, Secp256k1PublicKey)​

public static SimpleSignature NewSecp256k1(Secp256k1Signature signature, Secp256k1PublicKey publicKey)

Parameters​

signature Secp256k1Signature

publicKey Secp256k1PublicKey

Returns​

SimpleSignature

NewSecp256r1(Secp256r1Signature, Secp256r1PublicKey)​

public static SimpleSignature NewSecp256r1(Secp256r1Signature signature, Secp256r1PublicKey publicKey)

Parameters​

signature Secp256r1Signature

publicKey Secp256r1PublicKey

Returns​

SimpleSignature