Struct PrivateKey
The private key for an Algorand account.
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
[AlgoApiFormatter(typeof(PrivateKeyFormatter))]
public struct PrivateKey : IEquatable<PrivateKey>, IByteArray
Properties
Item[Int32]
Declaration
public byte this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Length
Declaration
public int Length { get; }
Property Value
Methods
Equals(PrivateKey)
Declaration
public bool Equals(PrivateKey other)
Parameters
Returns
FromMnemonic(Mnemonic)
Return the private key for a given mnemonic.
Declaration
public static PrivateKey FromMnemonic(Mnemonic mnemonic)
Parameters
Type |
Name |
Description |
Mnemonic |
mnemonic |
A mnemonic with a valid checksum.
|
Returns
Type |
Description |
PrivateKey |
The private key for the 25 word mnemonic.
|
FromString(String)
Convert the given base64 key string into a private key.
Declaration
public static PrivateKey FromString(string keyString)
Parameters
Type |
Name |
Description |
String |
keyString |
A key string in base64 format.
|
Returns
Type |
Description |
PrivateKey |
A private key from the parsed key string.
|
GetUnsafePtr()
Declaration
public void *GetUnsafePtr()
Returns
Sign<T>(T)
Declaration
public Sig Sign<T>(T msg)
where T : IByteArray
Parameters
Type |
Name |
Description |
T |
msg |
|
Returns
Type Parameters
ToAddress()
Return the public key for this private key.
Declaration
public Address ToAddress()
Returns
Type |
Description |
Address |
An algorand address.
|
ToMnemonic()
Declaration
public Mnemonic ToMnemonic()
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
TryParse(String, out PrivateKey)
Try to parse a base64 encoded private key.
Declaration
public static PrivateKey.ParseError TryParse(string keyString, out PrivateKey pk)
Parameters
Type |
Name |
Description |
String |
keyString |
The base64 encoded private key.
|
PrivateKey |
pk |
The private key from the base64 encoded string.
|
Returns