Struct Transaction
Implements
Namespace: Algorand.Unity
Assembly: cs.temp.dll.dll
Syntax
[AlgoApiObject("", "", 0)]
[Serializable]
public struct Transaction : IAssetTransferTxn, IAssetFreezeTxn, IAppCallTxn, IEquatable<Transaction>, IUntypedTransaction, IPaymentTxn, IAssetConfigTxn, ITransaction, ITransactionHeader
Fields
SignaturePrefix
Prefix bytes for signing transaction bytes.
Declaration
public static readonly byte[] SignaturePrefix
Field Value
| Type | Description |
|---|---|
| Byte[] |
Properties
Accounts
List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program.
Declaration
[AlgoApiField("apat")]
public Address[] Accounts { get; set; }
Property Value
| Type | Description |
|---|---|
| Address[] |
Amount
The total amount to be sent in microAlgos.
Declaration
[AlgoApiField("amt")]
public MicroAlgos Amount { get; set; }
Property Value
| Type | Description |
|---|---|
| MicroAlgos |
AppArguments
Transaction specific arguments accessed from the application's approval-program and clear-state-program.
Declaration
[AlgoApiField("apaa")]
public CompiledTeal[] AppArguments { get; set; }
Property Value
| Type | Description |
|---|---|
| CompiledTeal[] |
AppCallParams
Params found in an application call transaction
Declaration
public AppCallTxn.Params AppCallParams { get; set; }
Property Value
| Type | Description |
|---|---|
| AppCallTxn.Params |
ApplicationId
ID of the application being configured or empty if creating.
Declaration
[AlgoApiField("apid")]
public AppIndex ApplicationId { get; set; }
Property Value
| Type | Description |
|---|---|
| AppIndex |
ApprovalProgram
Logic executed for every application transaction, except when on-completion is set to "clear". It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction.
Declaration
[AlgoApiField("apap")]
public CompiledTeal ApprovalProgram { get; set; }
Property Value
| Type | Description |
|---|---|
| CompiledTeal |
AssetAmount
The amount of the asset to be transferred. A zero amount transferred to self allocates that asset in the account's Asset map.
Declaration
[AlgoApiField("aamt")]
public ulong AssetAmount { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
AssetCloseTo
Specify this field to remove the asset holding from the sender account and reduce the account's minimum balance (i.e. opt-out of the asset).
Declaration
[AlgoApiField("aclose")]
public Address AssetCloseTo { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
AssetConfigParams
Params found in an asset configuration transaction
Declaration
public AssetConfigTxn.Params AssetConfigParams { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetConfigTxn.Params |
AssetFreezeParams
Params found in an asset freeze transaction
Declaration
public AssetFreezeTxn.Params AssetFreezeParams { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetFreezeTxn.Params |
AssetFrozen
True to freeze the asset.
Declaration
[AlgoApiField("afrz")]
public Optional<bool> AssetFrozen { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<Boolean> |
AssetParams
See AssetParams for all available fields.
Declaration
[AlgoApiField("apar")]
public AssetParams AssetParams { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetParams |
AssetReceiver
The recipient of the asset transfer.
Declaration
[AlgoApiField("arcv")]
public Address AssetReceiver { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
AssetSender
The sender of the transfer. The regular
Declaration
[AlgoApiField("asnd")]
public Address AssetSender { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
AssetTransferParams
Params found in an asset transfer transaction
Declaration
public AssetTransferTxn.Params AssetTransferParams { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetTransferTxn.Params |
Boxes
The boxes that should be made available for the runtime of the program.
Declaration
[AlgoApiField("apbx")]
public BoxRef[] Boxes { get; set; }
Property Value
| Type | Description |
|---|---|
| BoxRef[] |
ClearStateProgram
Logic executed for application transactions with on-completion set to "clear". It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction.
Declaration
[AlgoApiField("apsu")]
public CompiledTeal ClearStateProgram { get; set; }
Property Value
| Type | Description |
|---|---|
| CompiledTeal |
CloseRemainderTo
When set, it indicates that the transaction is requesting that the
Declaration
[AlgoApiField("close")]
public Address CloseRemainderTo { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
ConfigAsset
For re-configure or destroy transactions, this is the unique asset ID. On asset creation, the ID is set to zero.
Declaration
[AlgoApiField("caid")]
public AssetIndex ConfigAsset { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetIndex |
ExtraProgramPages
Number of additional pages allocated to the application's approval and clear state programs. Each ExtraProgramPages is 2048 bytes. The sum of ApprovalProgram and ClearStateProgram may not exceed 2048*(1+ExtraProgramPages) bytes.
Declaration
[AlgoApiField("apep")]
public ulong ExtraProgramPages { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
Fee
Paid by the sender to the FeeSink to prevent denial-of-service. The minimum fee on Algorand is currently 1000 microAlgos.
Declaration
[AlgoApiField("fee")]
public MicroAlgos Fee { get; set; }
Property Value
| Type | Description |
|---|---|
| MicroAlgos |
FirstValidRound
The first round for when the transaction is valid. If the transaction is sent prior to this round it will be rejected by the network.
Declaration
[AlgoApiField("fv")]
public ulong FirstValidRound { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
ForeignApps
Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only.
Declaration
[AlgoApiField("apfa")]
public ulong[] ForeignApps { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64[] |
ForeignAssets
Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only.
Declaration
[AlgoApiField("apas")]
public ulong[] ForeignAssets { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64[] |
FreezeAccount
The address of the account whose asset is being frozen or unfrozen.
Declaration
[AlgoApiField("fadd")]
public Address FreezeAccount { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
FreezeAsset
The asset ID being frozen or unfrozen.
Declaration
[AlgoApiField("faid")]
public AssetIndex FreezeAsset { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetIndex |
GenesisHash
The hash of the genesis block of the network for which the transaction is valid.
Declaration
[AlgoApiField("gh")]
public GenesisHash GenesisHash { get; set; }
Property Value
| Type | Description |
|---|---|
| GenesisHash |
GenesisId
The human-readable string that identifies the network for the transaction. The genesis ID is found in the genesis block.
Declaration
[AlgoApiField("gen")]
public FixedString32Bytes GenesisId { get; set; }
Property Value
| Type | Description |
|---|---|
| FixedString32Bytes |
GlobalStateSchema
Holds the maximum number of global state values defined within a StateSchema object.
Declaration
[AlgoApiField("apgs")]
public StateSchema GlobalStateSchema { get; set; }
Property Value
| Type | Description |
|---|---|
| StateSchema |
Group
The group specifies that the transaction is part of a group and, if so, specifies the hash of the transaction group. See Algorand.Unity.TransactionGroup.
Declaration
[AlgoApiField("grp")]
public TransactionId Group { get; set; }
Property Value
| Type | Description |
|---|---|
| TransactionId |
Header
Params common to all transactions
Declaration
public TransactionHeader Header { get; set; }
Property Value
| Type | Description |
|---|---|
| TransactionHeader |
KeyRegParams
Params found in a key registration transaction
Declaration
public KeyRegTxn.Params KeyRegParams { get; set; }
Property Value
| Type | Description |
|---|---|
| KeyRegTxn.Params |
LastValidRound
The ending round for which the transaction is valid. After this round, the transaction will be rejected by the network.
Declaration
[AlgoApiField("lv")]
public ulong LastValidRound { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
Lease
A lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes. While this transaction possesses the lease, no other transaction specifying this lease can be confirmed. A lease is often used in the context of Algorand Smart Contracts to prevent replay attacks.
Declaration
[AlgoApiField("lx")]
public TransactionId Lease { get; set; }
Property Value
| Type | Description |
|---|---|
| TransactionId |
LocalStateSchema
Holds the maximum number of local state values defined within a StateSchema object.
Declaration
[AlgoApiField("apls")]
public StateSchema LocalStateSchema { get; set; }
Property Value
| Type | Description |
|---|---|
| StateSchema |
NonParticipation
Declaration
[AlgoApiField("nonpart")]
public Optional<bool> NonParticipation { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<Boolean> |
Note
Any data up to 1000 bytes.
Declaration
[AlgoApiField("note")]
public byte[] Note { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] |
OnComplete
Defines what additional actions occur with the transaction.
Declaration
[AlgoApiField("apan")]
public OnCompletion OnComplete { get; set; }
Property Value
| Type | Description |
|---|---|
| OnCompletion |
PaymentParams
Params found in a payment transaction
Declaration
public PaymentTxn.Params PaymentParams { get; set; }
Property Value
| Type | Description |
|---|---|
| PaymentTxn.Params |
Receiver
The address of the account that receives the Amount.
Declaration
[AlgoApiField("rcv")]
public Address Receiver { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
RekeyTo
Specifies the authorized address. This address will be used to authorize all future transactions.
Declaration
[AlgoApiField("rekey")]
public Address RekeyTo { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
SelectionParticipationKey
Declaration
[AlgoApiField("selkey")]
public VrfPubKey SelectionParticipationKey { get; set; }
Property Value
| Type | Description |
|---|---|
| VrfPubKey |
Sender
The address of the account that pays the fee and amount.
Declaration
[AlgoApiField("snd")]
public Address Sender { get; set; }
Property Value
| Type | Description |
|---|---|
| Address |
TransactionType
Specifies the type of transaction. This value is automatically generated using any of the developer tools.
Declaration
[AlgoApiField("type")]
public TransactionType TransactionType { get; set; }
Property Value
| Type | Description |
|---|---|
| TransactionType |
VoteFirst
Declaration
[AlgoApiField("votefst")]
public ulong VoteFirst { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
VoteKeyDilution
Declaration
[AlgoApiField("votekd")]
public ulong VoteKeyDilution { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
VoteLast
Declaration
[AlgoApiField("votelst")]
public ulong VoteLast { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt64 |
VoteParticipationKey
Declaration
[AlgoApiField("votekey")]
public ParticipationPublicKey VoteParticipationKey { get; set; }
Property Value
| Type | Description |
|---|---|
| ParticipationPublicKey |
XferAsset
The unique ID of the asset to be transferred.
Declaration
[AlgoApiField("xaid")]
public AssetIndex XferAsset { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetIndex |
Methods
AppCall(Address, TransactionParams, AppIndex, OnCompletion, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn used to call an application.
Declaration
public static AppCallTxn AppCall(Address sender, TransactionParams txnParams, AppIndex applicationId, OnCompletion onComplete = OnCompletion.NoOp, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| OnCompletion | onComplete | Defines what additional actions occur with the transaction. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn used to call an application. |
AppClearState(Address, TransactionParams, AppIndex, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn with params to clear state with your account.
Declaration
public static AppCallTxn AppClearState(Address sender, TransactionParams txnParams, AppIndex applicationId, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params to clear app state with your account. |
AppCloseOut(Address, TransactionParams, AppIndex, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn with params to close out state with your account.
Declaration
public static AppCallTxn AppCloseOut(Address sender, TransactionParams txnParams, AppIndex applicationId, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params set to close out state with your account. |
AppCreate(Address, TransactionParams, CompiledTeal, CompiledTeal, StateSchema, StateSchema, UInt64)
Create an AppCallTxn with params to create apps.
Declaration
public static AppCallTxn AppCreate(Address sender, TransactionParams txnParams, CompiledTeal approvalProgram, CompiledTeal clearStateProgram, StateSchema globalStateSchema = default(StateSchema), StateSchema localStateSchema = default(StateSchema), ulong extraProgramPages = 0UL)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| CompiledTeal | approvalProgram | Logic executed for every application transaction, except when on-completion is set to "clear". It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction. |
| CompiledTeal | clearStateProgram | Logic executed for application transactions with on-completion set to "clear". It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction. |
| StateSchema | globalStateSchema | Holds the maximum number of global state values defined within a StateSchema object. |
| StateSchema | localStateSchema | Holds the maximum number of local state values defined within a StateSchema object. |
| UInt64 | extraProgramPages | Number of additional pages allocated to the application's approval and clear state programs. Each ExtraProgramPages is 2048 bytes. The sum of ApprovalProgram and ClearStateProgram may not exceed 2048*(1+ExtraProgramPages) bytes. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params set to create apps |
AppDelete(Address, TransactionParams, AppIndex, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn used to delete an application.
Declaration
public static AppCallTxn AppDelete(Address sender, TransactionParams txnParams, AppIndex applicationId, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params to delete an application. |
AppOptIn(Address, TransactionParams, AppIndex, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn used to opt in to an application.
Declaration
public static AppCallTxn AppOptIn(Address sender, TransactionParams txnParams, AppIndex applicationId, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params to opt in to an application. |
AppUpdateTxn(Address, TransactionParams, AppIndex, CompiledTeal, CompiledTeal, UInt64, CompiledTeal[], Address[], UInt64[], UInt64[], BoxRef[])
Create an AppCallTxn used to update an application.
Declaration
public static AppCallTxn AppUpdateTxn(Address sender, TransactionParams txnParams, AppIndex applicationId, CompiledTeal approvalProgram = default(CompiledTeal), CompiledTeal clearStateProgram = default(CompiledTeal), ulong extraProgramPages = 0UL, CompiledTeal[] appArguments = null, Address[] accounts = null, ulong[] foreignApps = null, ulong[] foreignAssets = null, BoxRef[] boxRefs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AppIndex | applicationId | ID of the application being configured. |
| CompiledTeal | approvalProgram | Logic executed for every application transaction, except when on-completion is set to "clear". It can read and write global state for the application, as well as account-specific local state. Approval programs may reject the transaction. |
| CompiledTeal | clearStateProgram | Logic executed for application transactions with on-completion set to "clear". It can read and write global state for the application, as well as account-specific local state. Clear state programs cannot reject the transaction. |
| UInt64 | extraProgramPages | Number of additional pages allocated to the application's approval and clear state programs. Each ExtraProgramPages is 2048 bytes. The sum of ApprovalProgram and ClearStateProgram may not exceed 2048*(1+ExtraProgramPages) bytes. |
| CompiledTeal[] | appArguments | Transaction specific arguments accessed from the application's approval-program and clear-state-program. |
| Address[] | accounts | List of accounts in addition to the sender that may be accessed from the application's approval-program and clear-state-program. |
| UInt64[] | foreignApps | Lists the applications in addition to the application-id whose global states may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| UInt64[] | foreignAssets | Lists the assets whose AssetParams may be accessed by this application's approval-program and clear-state-program. The access is read-only. |
| BoxRef[] | boxRefs | The boxes that should be made available for the runtime of the program. |
Returns
| Type | Description |
|---|---|
| AppCallTxn | An AppCallTxn with params to update an application. |
AssetAccept(Address, TransactionParams, AssetIndex)
Create an AssetTransferTxn for opting in to an asset.
Declaration
public static AssetTransferTxn AssetAccept(Address sender, TransactionParams txnParams, AssetIndex xferAsset)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AssetIndex | xferAsset | The unique ID of the asset to opt-in to. |
Returns
| Type | Description |
|---|---|
| AssetTransferTxn | An AssetTransferTxn for opting in to an asset. |
AssetClawback(Address, TransactionParams, AssetIndex, UInt64, Address, Address)
Creates a form of AssetTransferTxn to clawback assets from an account.
Declaration
public static AssetTransferTxn AssetClawback(Address sender, TransactionParams txnParams, AssetIndex xferAsset, ulong assetAmount, Address assetSender, Address assetReceiver)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The sender of this transaction must be the clawback account specified in the asset configuration. |
| TransactionParams | txnParams | |
| AssetIndex | xferAsset | The unique ID of the asset to be transferred. |
| UInt64 | assetAmount | The amount of the asset to be transferred. |
| Address | assetSender | The address from which the funds will be withdrawn. |
| Address | assetReceiver | The recipient of the asset transfer. |
Returns
| Type | Description |
|---|---|
| AssetTransferTxn | A form of AssetTransferTxn to clawback assets from an account |
AssetConfigure(Address, TransactionParams, AssetIndex, AssetParams)
Create an AssetConfigTxn that will configure an asset.
Declaration
public static AssetConfigTxn AssetConfigure(Address sender, TransactionParams txnParams, AssetIndex assetId, AssetParams assetParams)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AssetIndex | assetId | The unique asset id. |
| AssetParams | assetParams | See AssetParams for all available fields. |
Returns
| Type | Description |
|---|---|
| AssetConfigTxn | An AssetConfigTxn that will configure an asset. |
AssetCreate(Address, TransactionParams, AssetParams)
Create an AssetConfigTxn that will create an asset.
Declaration
public static AssetConfigTxn AssetCreate(Address sender, TransactionParams txnParams, AssetParams assetParams)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AssetParams | assetParams | See AssetParams for all available fields. |
Returns
| Type | Description |
|---|---|
| AssetConfigTxn | An AssetConfigTxn that will create an asset. |
AssetDelete(Address, TransactionParams, AssetIndex)
Create an AssetConfigTxn that will delete an asset.
Declaration
public static AssetConfigTxn AssetDelete(Address sender, TransactionParams txnParams, AssetIndex assetId)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| AssetIndex | assetId | The unique asset id. |
Returns
| Type | Description |
|---|---|
| AssetConfigTxn | An AssetConfigTxn that will delete an asset. |
AssetFreeze(Address, TransactionParams, Address, AssetIndex, Boolean)
Create an AssetFreezeTxn which is used to freeze or unfreeze an asset from transfers.
Declaration
public static AssetFreezeTxn AssetFreeze(Address sender, TransactionParams txnParams, Address freezeAccount, AssetIndex freezeAsset, bool assetFrozen)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| Address | freezeAccount | The address of the account whose asset is being frozen or unfrozen. |
| AssetIndex | freezeAsset | The asset ID being frozen or unfrozen. |
| Boolean | assetFrozen | True to freeze the asset. |
Returns
| Type | Description |
|---|---|
| AssetFreezeTxn | An AssetFreezeTxn. |
AssetTransfer(Address, TransactionParams, AssetIndex, UInt64, Address)
Create an AssetTransferTxn for transferring an asset to another account.
Declaration
public static AssetTransferTxn AssetTransfer(Address sender, TransactionParams txnParams, AssetIndex xferAsset, ulong assetAmount, Address assetReceiver)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and sends the asset amount. |
| TransactionParams | txnParams | |
| AssetIndex | xferAsset | The unique ID of the asset to be transferred. |
| UInt64 | assetAmount | The amount of the asset to be transferred. A zero amount transferred to self allocates that asset in the account's Asset map. |
| Address | assetReceiver |
Returns
| Type | Description |
|---|---|
| AssetTransferTxn | An AssetTransferTxn for transferring an asset to another account. |
Atomic()
Initialize a new Atomic Txn in the building stage.
Declaration
public static AtomicTxn.Building Atomic()
Returns
| Type | Description |
|---|---|
| AtomicTxn.Building | An Atomic Txn in the building stage. See AddTxn<T>(T) for adding transactions to this transaction group. |
CopyFrom(Transaction)
Copy relevant fields to this transaction.
Declaration
public void CopyFrom(Transaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| Transaction | transaction | A raw transaction with all possible transaction fields. |
CopyTo(ref Transaction)
Copy this transactions fields to a Transaction which contains all possible transaction fields.
Declaration
public void CopyTo(ref Transaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| Transaction | transaction | A raw transaction with all possible transaction fields. |
Equals(Transaction)
Declaration
public bool Equals(Transaction other)
Parameters
| Type | Name | Description |
|---|---|---|
| Transaction | other |
Returns
| Type | Description |
|---|---|
| Boolean |
KeyRegOffline(Address, TransactionParams)
Register account offline for participation.
Declaration
public static KeyRegTxn KeyRegOffline(Address account, TransactionParams txnParams)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | account | Account to register offline. This is the sender of the transaction. |
| TransactionParams | txnParams |
Returns
| Type | Description |
|---|---|
| KeyRegTxn | A KeyRegTxn. |
KeyRegOnline(Address, TransactionParams, AccountParticipation)
Register account online for participation.
Declaration
public static KeyRegTxn KeyRegOnline(Address account, TransactionParams txnParams, AccountParticipation accountParticipation)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | account | Account to register online. This is the sender of the transaction. |
| TransactionParams | txnParams | |
| AccountParticipation | accountParticipation |
Returns
| Type | Description |
|---|---|
| KeyRegTxn | A KeyRegTxn. |
Payment(Address, TransactionParams, Address, MicroAlgos, Address)
Create a PaymentTxn
Declaration
public static PaymentTxn Payment(Address sender, TransactionParams txnParams, Address receiver, MicroAlgos amount, Address closeRemainderTo = default(Address))
Parameters
| Type | Name | Description |
|---|---|---|
| Address | sender | The address of the account that pays the fee and amount. |
| TransactionParams | txnParams | |
| Address | receiver | The address of the account that receives the amount. |
| MicroAlgos | amount | The total amount to be sent in microAlgos. |
| Address | closeRemainderTo | When set, it indicates that the transaction is requesting that the Sender account should be closed, and all remaining funds, after the fee and amount are paid, be transferred to this address. |
Returns
| Type | Description |
|---|---|
| PaymentTxn |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String |
Overrides
ToTypedTxn<T>()
Converts this transaction to a specific transaction type implementing ITransaction.
Declaration
public T ToTypedTxn<T>()
where T : struct, ITransaction
Returns
| Type | Description |
|---|---|
| T | A typed transaction implementing ITransaction. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the transaction to convert to. |