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
Scheme()
public SignatureScheme Scheme()
Returns
SignPersonalMessage(PersonalMessage)
Sign a personal message and return a UserSignature.
public UserSignature SignPersonalMessage(PersonalMessage message)
Parameters
message PersonalMessage
Returns
Exceptions
SignTransaction(Transaction)
Sign a transaction and return a UserSignature.
public UserSignature SignTransaction(Transaction transaction)
Parameters
transaction Transaction
Returns
Exceptions
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
Exceptions
ToBytes()
Encode a SimpleKeypair as flag || privkey in bytes
public Byte[] ToBytes()
Returns
ToDer()
Serialize this private key as DER-encoded PKCS#8
public Byte[] ToDer()
Returns
Exceptions
ToPem()
Serialize this private key as DER-encoded PKCS#8
public string ToPem()
Returns
Exceptions
TrySign(Byte[])
public SimpleSignature TrySign(Byte[] message)
Parameters
message Byte[]
Returns
Exceptions
TrySignUser(Byte[])
public UserSignature TrySignUser(Byte[] message)
Parameters
message Byte[]
Returns
Exceptions
VerifyingKey()
public SimpleVerifyingKey VerifyingKey()
Returns
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
Exceptions
FromBytes(Byte[])
Decode a SimpleKeypair from flag || privkey bytes
public static SimpleKeypair FromBytes(Byte[] bytes)
Parameters
bytes Byte[]
Returns
Exceptions
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
Exceptions
FromEd25519(Ed25519PrivateKey)
public static SimpleKeypair FromEd25519(Ed25519PrivateKey keypair)
Parameters
keypair Ed25519PrivateKey
Returns
FromPem(String)
Deserialize PKCS#8-encoded private key from PEM.
public static SimpleKeypair FromPem(string s)
Parameters
s String
Returns
Exceptions
FromSecp256k1(Secp256k1PrivateKey)
public static SimpleKeypair FromSecp256k1(Secp256k1PrivateKey keypair)
Parameters
keypair Secp256k1PrivateKey
Returns
FromSecp256r1(Secp256r1PrivateKey)
public static SimpleKeypair FromSecp256r1(Secp256r1PrivateKey keypair)
Parameters
keypair Secp256r1PrivateKey