Search Results for

    Show / Hide Table of Contents

    Struct PrivateKey

    The private key for an Algorand account.

    Namespace: Algorand.Unity
    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
    Type Description
    Byte

    Length

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    Int32

    Methods

    Equals(PrivateKey)

    Declaration
    public bool Equals(PrivateKey other)
    Parameters
    Type Name Description
    PrivateKey other
    Returns
    Type Description
    Boolean

    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
    Type Description
    Void*

    Sign<T>(T)

    Declaration
    public Sig Sign<T>(T msg)
        where T : IByteArray
    Parameters
    Type Name Description
    T msg
    Returns
    Type Description
    Sig
    Type Parameters
    Name Description
    T

    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
    Type Description
    Mnemonic

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    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
    Type Description
    PrivateKey.ParseError

    A ParseError if one is encountered.

    ☀
    ☾
    In This Article
    Back to top
    Generated by DocFX
    ☀
    ☾