BlockchainTransaction(for ARK)

$BlockchainBase = "ARK"

BlockchainTransaction[assoc]

represents an ARK blockchain transaction built from the components in the association assoc.

Details

  • Gives a symbolic representation of an ARK blockchain transaction; it does not submit the transaction, and the transaction is not signed.
  • BlockchainTransaction[][prop] gives the value of the property prop for the transaction.
  • The following ARK transaction types are supported. The type is specified using the "Type" element of the association assoc:
  • "Transfer"store-of-value and value transfer
    "SecondSignature"add a second signature to an address
    "DelegateRegistration"register an address as a delegate
    "Vote"vote for a delegate
    "IPFS"store IPFS CID on the blockchain
    "DelegateResignation"withdraw delegate status
    "MultiPayment"enables multiple combined payments
    "MultiSignature"multisignature transaction
  • For transactions of type "Transfer", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Recipient"destination address
    "Amount"amount of ARKtoshis to be transferred
  • The following additional elements can also be given for type "Transfer":
  • "Type"type of transaction
    "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
    "VendorField"data field with a maximum size of 255 bytes
  • For transactions of type "SecondSignature", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "SecondPublicKey"secondary public key to assign to address
  • The following additional elements can also be given for type "SecondSignature":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • For transactions of type "DelegateRegistration", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "Username"username to register
  • The following additional elements can also be given for type "DelegateRegistration":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • For transactions of type "Vote", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "Delegate"username or public key of a delegate to vote for
  • The following additional elements can also be given for type "Vote":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • For transactions of type "IPFS", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "CID"CID of the IPFS asset
  • The following additional elements can also be given for type "IPFS":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • For transactions of type "DelegateResignation", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
  • The following additional elements can also be given for type "DelegateResignation":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • For transactions of type "MultiPayment", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "Payments"list of associations for each payment
  • The following additional elements can also be given for type "MultiPayment":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
    "SenderPublicKey"public key of the sender address
  • Each association in the "Payments" list must have the following entries:
  • "Amount"amount of ARKtoshis to be transferred
    "Recipient"destination address
  • For transactions of type "MultiSignature", the following elements must be given:
  • "BlockchainBase"blockchain base to use
    "Type"type of transaction
    "PublicKeys"list of public keys for all of the participants of this multisignature address
    "MinimumKeys"minimum number of signatures needed to send a transaction with this multisignature address as sender
    "SenderPublicKey"public key of the sender address
  • The following additional elements can also be given for type "MultiSignature":
  • "Fee"dynamic fee to be included
    "TransactionCount"current sender's transaction count plus one
  • If the sender of the transaction is a multisignature address, the "SenderPublicKey" field becomes mandatory when creating the transaction.
  • BlockchainTransaction can represent ARK mainnet (default) and devnet transactions. To specify these networks, use the "BlockchainBase" value inside the required association or the BlockchainBase option.

Examples

open allclose all

Basic Examples  (1)

Create an ARK transaction object representing a "Transfer" transaction:

Scope  (16)

Transfer Transactions  (3)

Create a simple "Transfer" transaction. Since "Fee" is not provided, it will use the blockchain static fee:

Create a "Transfer" transaction and specify a dynamic fee:

Create a "Transfer" transaction and specify a dynamic fee and a vendor field:

Second Signature Transactions  (1)

Create a pair of asymmetric keys:

Create a transaction to assign the public key as a second signature to the associated address:

Delegate Registration Transactions  (2)

Create a transaction to register an address as delegate using static fees:

Create a transaction to register an address as delegate using dynamic fees:

Vote Transactions  (3)

Upvote  (1)

Get the public key of a delegate:

Create a transaction to upvote the delegate:

Unvote  (1)

Get the public key of a delegate:

Create a transaction to unvote the delegate:

Username  (1)

Vote for the delegate using their username:

IPFS Transactions  (2)

Create a transaction that includes the CID of an IPFS asset using static fees:

Create a transaction that includes the CID of an IPFS asset using dynamic fees:

Delegate Resignation Transactions  (2)

Create a transaction to resign as a delegate using static fees:

Create a transaction to resign as a delegate using dynamic fees:

Multipayment Transactions  (2)

Create a transaction with multiple payments using static fees:

Create a transaction with multiple payments using dynamic fees:

Multisignature Transactions  (1)

Create a transaction to register a multisignature address with the public keys of the participants:

The multisignature address that will be registered is:

Options  (2)

BlockchainBase  (2)

Devnet  (1)

Create a devnet transaction:

Mainnet  (1)

Create a mainnet transaction:

Applications  (2)

Create an ARK BlockchainTransaction:

Sign the transaction object using a private key object:

Send the signed transaction to the ARK blockchain:

Create an ARK BlockchainTransaction that uses a multisignature address:

Sign the transaction with the minimum amount of required keys:

Send the signed transaction to the ARK blockchain:

Possible Issues  (1)

Incorrect Recipient  (1)

Providing an invalid address will return a $Failed output:

Wolfram Research (2019), BlockchainTransaction, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html.

Text

Wolfram Research (2019), BlockchainTransaction, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html.

CMS

Wolfram Language. 2019. "BlockchainTransaction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html.

APA

Wolfram Language. (2019). BlockchainTransaction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html

BibTeX

@misc{reference.wolfram_2024_blockchaintransaction, author="Wolfram Research", title="{BlockchainTransaction}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html}", note=[Accessed: 18-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_blockchaintransaction, organization={Wolfram Research}, title={BlockchainTransaction}, year={2019}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransaction-ARK.html}, note=[Accessed: 18-December-2024 ]}