Skip to main content

SimpleKeypair

Namespace: IotaSdk

public class SimpleKeypair : ISimpleKeypair, System.IDisposable

Inheritance Object → SimpleKeypair
Implements ISimpleKeypair, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors​

SimpleKeypair(UInt64)​

public SimpleKeypair(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

PublicKey()​

public PublicKey PublicKey()

Returns​

PublicKey

Scheme()​

public SignatureScheme Scheme()

Returns​

SignatureScheme

SignPersonalMessage(PersonalMessage)​

Sign a personal message and return a UserSignature.

public UserSignature SignPersonalMessage(PersonalMessage message)

Parameters​

message PersonalMessage

Returns​

UserSignature

Exceptions​

SdkFfiException

SignTransaction(Transaction)​

Sign a transaction and return a UserSignature.

public UserSignature SignTransaction(Transaction transaction)

Parameters​

transaction Transaction

Returns​

UserSignature

Exceptions​

SdkFfiException

ToBech32()​

Encode a SimpleKeypair as flag || privkey in Bech32 starting with "iotaprivkey" to a string. Note that the pubkey is not encoded.

public string ToBech32()

Returns​

String

Exceptions​

SdkFfiException

ToBytes()​

Encode a SimpleKeypair as flag || privkey in bytes

public Byte[] ToBytes()

Returns​

Byte[]

ToDer()​

Serialize this private key as DER-encoded PKCS#8

public Byte[] ToDer()

Returns​

Byte[]

Exceptions​

SdkFfiException

ToPem()​

Serialize this private key as DER-encoded PKCS#8

public string ToPem()

Returns​

String

Exceptions​

SdkFfiException

TrySign(Byte[])​

public SimpleSignature TrySign(Byte[] message)

Parameters​

message Byte[]

Returns​

SimpleSignature

Exceptions​

SdkFfiException

TrySignUser(Byte[])​

public UserSignature TrySignUser(Byte[] message)

Parameters​

message Byte[]

Returns​

UserSignature

Exceptions​

SdkFfiException

VerifyingKey()​

public SimpleVerifyingKey VerifyingKey()

Returns​

SimpleVerifyingKey

FromBech32(String)​

Decode a SimpleKeypair from flag || privkey in Bech32 starting with "iotaprivkey" to SimpleKeypair. The public key is computed directly from the private key bytes.

public static SimpleKeypair FromBech32(string value)

Parameters​

value String

Returns​

SimpleKeypair

Exceptions​

SdkFfiException

FromBytes(Byte[])​

Decode a SimpleKeypair from flag || privkey bytes

public static SimpleKeypair FromBytes(Byte[] bytes)

Parameters​

bytes Byte[]

Returns​

SimpleKeypair

Exceptions​

SdkFfiException

FromDer(Byte[])​

Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).

public static SimpleKeypair FromDer(Byte[] bytes)

Parameters​

bytes Byte[]

Returns​

SimpleKeypair

Exceptions​

SdkFfiException

FromEd25519(Ed25519PrivateKey)​

public static SimpleKeypair FromEd25519(Ed25519PrivateKey keypair)

Parameters​

keypair Ed25519PrivateKey

Returns​

SimpleKeypair

FromPem(String)​

Deserialize PKCS#8-encoded private key from PEM.

public static SimpleKeypair FromPem(string s)

Parameters​

s String

Returns​

SimpleKeypair

Exceptions​

SdkFfiException

FromSecp256k1(Secp256k1PrivateKey)​

public static SimpleKeypair FromSecp256k1(Secp256k1PrivateKey keypair)

Parameters​

keypair Secp256k1PrivateKey

Returns​

SimpleKeypair

FromSecp256r1(Secp256r1PrivateKey)​

public static SimpleKeypair FromSecp256r1(Secp256r1PrivateKey keypair)

Parameters​

keypair Secp256r1PrivateKey

Returns​

SimpleKeypair