Show / Hide Table of Contents

    Class Account

    Create and manage secrets, and perform account-based work such as signing transactions.

    Inheritance
    System.Object
    Account
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Algorand
    Assembly: Algorand.dll
    Syntax
    public class Account

    Constructors

    | Improve this Doc View Source

    Account()

    Generate a newc account, random account.

    Declaration
    public Account()
    | Improve this Doc View Source

    Account(Byte[])

    Generate a newc account with seed(master derivation key)

    Declaration
    public Account(byte[] seed)
    Parameters
    Type Name Description
    System.Byte[] seed

    seed(master derivation key)

    | Improve this Doc View Source

    Account(String)

    Create a new account with mnemonic

    Declaration
    public Account(string mnemonic)
    Parameters
    Type Name Description
    System.String mnemonic

    the mnemonic

    Properties

    | Improve this Doc View Source

    Address

    Declaration
    public Address Address { get; }
    Property Value
    Type Description
    Address

    Methods

    | Improve this Doc View Source

    AppendMultisigTransaction(MultisigAddress, SignedTransaction)

    AppendMultisigTransaction appends our signature to the given multisig transaction.

    Declaration
    public SignedTransaction AppendMultisigTransaction(MultisigAddress from, SignedTransaction signedTx)
    Parameters
    Type Name Description
    MultisigAddress from

    the multisig public identity we are signing for

    SignedTransaction signedTx

    the partially signed msig tx to which to append signature

    Returns
    Type Description
    SignedTransaction

    merged multisig transaction

    | Improve this Doc View Source

    AppendMultisigTransactionBytes(MultisigAddress, Byte[])

    a convenience method for directly appending our signature to a raw tx file

    Declaration
    public byte[] AppendMultisigTransactionBytes(MultisigAddress from, byte[] txBytes)
    Parameters
    Type Name Description
    MultisigAddress from

    the public identity we are signing as

    System.Byte[] txBytes

    the multisig transaction to append signature to

    Returns
    Type Description
    System.Byte[]

    merged multisignature transaction inclukding our signature

    | Improve this Doc View Source

    AppendToLogicsig(LogicsigSignature)

    Appends a signature to multisig logic signed transaction

    Declaration
    public LogicsigSignature AppendToLogicsig(LogicsigSignature lsig)
    Parameters
    Type Name Description
    LogicsigSignature lsig

    LogicsigSignature append to

    Returns
    Type Description
    LogicsigSignature

    LogicsigSignature

    | Improve this Doc View Source

    EstimatedEncodedSize(Transaction)

    EstimateEncodedSize returns the estimated encoded size of the transaction including the signature. This function is useful for calculating the fee from suggested fee per byte.

    Declaration
    public static int EstimatedEncodedSize(Transaction tx)
    Parameters
    Type Name Description
    Transaction tx

    the transaction

    Returns
    Type Description
    System.Int32

    an estimated byte size for the transaction.

    | Improve this Doc View Source

    GetClearTextPublicKey()

    Convenience method for getting the underlying public key for raw operations.

    Declaration
    public byte[] GetClearTextPublicKey()
    Returns
    Type Description
    System.Byte[]

    the public key as length 32 byte array.

    | Improve this Doc View Source

    GetEd25519PublicKey()

    Get the public key

    Declaration
    public Ed25519PublicKeyParameters GetEd25519PublicKey()
    Returns
    Type Description
    Org.BouncyCastle.Crypto.Parameters.Ed25519PublicKeyParameters

    public key

    | Improve this Doc View Source

    MergeMultisigTransactionBytes(Byte[][])

    a convenience method for working directly with raw transaction files.

    Declaration
    public static byte[] MergeMultisigTransactionBytes(params byte[][] txsBytes)
    Parameters
    Type Name Description
    System.Byte[][] txsBytes

    list of multisig transactions to merge

    Returns
    Type Description
    System.Byte[]

    an encoded, merged multisignature transaction

    | Improve this Doc View Source

    MergeMultisigTransactions(SignedTransaction[])

    MergeMultisigTransactions merges the given (partially) signed multisig transactions.

    Declaration
    public static SignedTransaction MergeMultisigTransactions(params SignedTransaction[] txs)
    Parameters
    Type Name Description
    SignedTransaction[] txs

    partially signed multisig transactions to merge. Underlying transactions may be mutated.

    Returns
    Type Description
    SignedTransaction

    merged multisig transaction

    | Improve this Doc View Source

    SetFeeByFeePerByte(Transaction, Nullable<UInt64>)

    Sets the transaction fee according to suggestedFeePerByte * estimateTxSize.

    Declaration
    public static void SetFeeByFeePerByte(Transaction tx, ulong? suggestedFeePerByte)
    Parameters
    Type Name Description
    Transaction tx

    transaction to populate fee field

    System.Nullable<System.UInt64> suggestedFeePerByte

    suggestedFee given by network

    | Improve this Doc View Source

    SignBid(Bid)

    Sign a bid with this account

    Declaration
    public SignedBid SignBid(Bid bid)
    Parameters
    Type Name Description
    Bid bid

    the bid to sign

    Returns
    Type Description
    SignedBid

    signed bid

    | Improve this Doc View Source

    SignBytes(Byte[])

    Sign the given bytes, and wrap in signature. The message is prepended with "MX" for domain separation.

    Declaration
    public Signature SignBytes(byte[] bytes)
    Parameters
    Type Name Description
    System.Byte[] bytes

    bytes the data to sign

    Returns
    Type Description
    Signature

    signature

    | Improve this Doc View Source

    SignLogicsig(LogicsigSignature)

    Sign LogicSig with account's secret key

    Declaration
    public LogicsigSignature SignLogicsig(LogicsigSignature lsig)
    Parameters
    Type Name Description
    LogicsigSignature lsig

    LogicsigSignature to sign

    Returns
    Type Description
    LogicsigSignature

    LogicsigSignature with updated signature

    | Improve this Doc View Source

    SignLogicsig(LogicsigSignature, MultisigAddress)

    Sign LogicSig as multisig

    Declaration
    public LogicsigSignature SignLogicsig(LogicsigSignature lsig, MultisigAddress ma)
    Parameters
    Type Name Description
    LogicsigSignature lsig

    LogicsigSignature to sign

    MultisigAddress ma

    MultisigAddress to format multi signature from

    Returns
    Type Description
    LogicsigSignature

    LogicsigSignature

    | Improve this Doc View Source

    SignLogicsigTransaction(LogicsigSignature, Transaction)

    Creates SignedTransaction from LogicsigSignature and Transaction. LogicsigSignature must be valid and verifiable against transaction sender field.

    Declaration
    public static SignedTransaction SignLogicsigTransaction(LogicsigSignature lsig, Transaction tx)
    Parameters
    Type Name Description
    LogicsigSignature lsig

    LogicsigSignature

    Transaction tx

    Transaction

    Returns
    Type Description
    SignedTransaction

    SignedTransaction

    | Improve this Doc View Source

    SignMultisigTransaction(MultisigAddress, Transaction)

    SignMultisigTransaction creates a multisig transaction from the input and the multisig account.

    Declaration
    public SignedTransaction SignMultisigTransaction(MultisigAddress from, Transaction tx)
    Parameters
    Type Name Description
    MultisigAddress from

    sign as this multisignature account

    Transaction tx

    the transaction to sign

    Returns
    Type Description
    SignedTransaction

    SignedTransaction a partially signed multisig transaction

    | Improve this Doc View Source

    SignTransaction(Transaction)

    Sign a transaction with this account

    Declaration
    public SignedTransaction SignTransaction(Transaction tx)
    Parameters
    Type Name Description
    Transaction tx

    the transaction to sign

    Returns
    Type Description
    SignedTransaction

    a signed transaction

    | Improve this Doc View Source

    SignTransactionWithFeePerByte(Transaction, UInt64)

    Sign a transaction with this account, replacing the fee with the given feePerByte.

    Declaration
    public SignedTransaction SignTransactionWithFeePerByte(Transaction tx, ulong feePerByte)
    Parameters
    Type Name Description
    Transaction tx

    transaction to sign

    System.UInt64 feePerByte

    feePerByte fee per byte, often returned as a suggested fee

    Returns
    Type Description
    SignedTransaction

    a signed transaction

    | Improve this Doc View Source

    TealSign(Byte[], Address)

    Creates Signature compatible with ed25519verify TEAL opcode from data and contract address(program hash).

    Declaration
    public Signature TealSign(byte[] data, Address contractAddress)
    Parameters
    Type Name Description
    System.Byte[] data

    data byte[]

    Address contractAddress

    contractAddress Address

    Returns
    Type Description
    Signature

    Signature

    | Improve this Doc View Source

    TealSignFromProgram(Byte[], Byte[])

    Creates Signature compatible with ed25519verify TEAL opcode from data and program bytes

    Declaration
    public Signature TealSignFromProgram(byte[] data, byte[] program)
    Parameters
    Type Name Description
    System.Byte[] data

    data byte[]

    System.Byte[] program

    program byte[]

    Returns
    Type Description
    Signature

    Signature

    | Improve this Doc View Source

    ToMnemonic()

    Converts the 32 byte private key to a 25 word mnemonic, including a checksum. Refer to the mnemonic package for additional documentation.

    Declaration
    public string ToMnemonic()
    Returns
    Type Description
    System.String

    return string a 25 word mnemonic

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX