Skip to main content

Secp256k1PublicKey

Namespace: IotaSdk

A secp256k1 public key.

BCS

The BCS serialized form of this type is specified in bcs-schema.abnf.

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

Inheritance Object → Secp256k1PublicKey
Implements ISecp256k1PublicKey, IEquatable<Secp256k1PublicKey>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

Secp256k1PublicKey(UInt64)​

public Secp256k1PublicKey(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

DeriveAddress()​

Derive an Address from this Public Key

An Address can be derived from a Secp256k1PublicKey by hashing the bytes of the public key prefixed with the Secp256k1 SignatureScheme flag (0x01).

hash( 0x01 || 33-byte secp256k1 public key)

public Address DeriveAddress()

Returns​

Address

Scheme()​

Returns the signature scheme for this public key.

public SignatureScheme Scheme()

Returns​

SignatureScheme

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

ToFlaggedBytes()​

Returns the bytes with signature scheme flag prepended.

public Byte[] ToFlaggedBytes()

Returns​

Byte[]

ToJson()​

Convert this type to a JSON encoded string.

public string ToJson()

Returns​

String

Exceptions​

SdkFfiException

Equals(Secp256k1PublicKey)​

public bool Equals(Secp256k1PublicKey? other)

Parameters​

other Secp256k1PublicKey?

Returns​

Boolean

Equals(Object)​

public override bool Equals(object? obj)

Parameters​

obj Object?

Returns​

Boolean

GetHashCode()​

public override int GetHashCode()

Returns​

Int32

FromBcs(Byte[])​

Create this type from BCS encoded bytes.

public static Secp256k1PublicKey FromBcs(Byte[] bcs)

Parameters​

bcs Byte[]

Returns​

Secp256k1PublicKey

Exceptions​

SdkFfiException

FromBytes(Byte[])​

public static Secp256k1PublicKey FromBytes(Byte[] bytes)

Parameters​

bytes Byte[]

Returns​

Secp256k1PublicKey

Exceptions​

SdkFfiException

FromJson(String)​

Create this type from a JSON encoded string.

public static Secp256k1PublicKey FromJson(string json)

Parameters​

json String

Returns​

Secp256k1PublicKey

Exceptions​

SdkFfiException

FromStr(String)​

public static Secp256k1PublicKey FromStr(string s)

Parameters​

s String

Returns​

Secp256k1PublicKey

Exceptions​

SdkFfiException

Random()​

public static Secp256k1PublicKey Random()

Returns​

Secp256k1PublicKey