BlockchainTransactionSubmit (for Cardano)
BlockchainTransactionSubmit[obj]
submits the transaction specified in the BlockchainTransaction object obj to the Cardano blockchain.
Details
- BlockchainTransactionSubmit[obj] submits the transaction to a Cardano node for inclusion in a future block.
- BlockchainTransactionSubmit will return a BlockchainTransaction object with the added property "TransactionID".
- BlockchainTransactionData can be applied to the result from BlockchainTransactionSubmit to determine if the submitted transaction has been added to the Bitcoin blockchain yet.
- BlockchainTransactionSubmit can submit transactions to the Cardano mainnet (default) and testnet "preprod", which is a new network for testing purposes. These networks are specified in the BlockchainTransaction object.
Examples
open allclose allBasic Examples (1)
Create a Cardano blockchain transaction to transfer ada cryptocurrency:
Sign the transaction with a PrivateKey object:
Applications (11)
Transfer Cryptocurrency (1)
Create a Cardano blockchain transaction to transfer ada cryptocurrency:
Sign the transaction with a PrivateKey object:
Mint Tokens (1)
Create a Cardano blockchain transaction to mint 1,000,000 tokens and send them to multiple addresses:
Alternatively, a single output is allowed to have "Amount" set to Automatic to have any remaining tokens sent to that address:
Sign the transaction with PrivateKey objects:
Submit the transaction to the Cardano blockchain to mint the tokens:
Mint NFT (1)
Generate an image to mint it as an NFT:
Upload the image to IPFS and save its CID:
Prepare the NFT metadata following the CIP 25 standard:
Create the Cardano blockchain transaction to mint the NFT:
Sign the transaction with PrivateKey objects:
Submit the transaction to the Cardano blockchain to mint the NFT:
Transfer Tokens (1)
Create a Cardano blockchain transaction to transfer tokens:
Sign the transaction with a PrivateKey object:
Burn Tokens (1)
Create a Cardano blockchain transaction to burn tokens:
Sign the transaction with a PrivateKey object:
Deploy Compiled Plutus Script (1)
Obtain a compiled Plutus script:
This particular script succeeds if, and only if, the redeemer's script data is a list of prime factors of the datum. For the datum, choose 221 as an arbitrary semi-prime. Script data must conform to Cardano's detailed JSON schema:
Deploy Plutus scripts with a datum hash by specifying within the "Outputs" list an "Address" pointing to a script file and a "Datum" with "Data" pointing to a script data file and using the "Hash" mode:
Sign the transaction with a PrivateKey object:
Spend Compiled Plutus Script (1)
Spend a Plutus script using the "Redeemer", "Datum" and "Script" elements in the "Inputs" list and specifying collateral inputs in "CollateralInputs":
Notice that execution units were calculated automatically:
Sign the transaction with a PrivateKey object:
Spend Compiled Plutus Script with Required Signers (1)
Obtain a compiled Plutus script:
This particular script succeeds if, and only if, the spending transaction is signed by the private key associated with the public key hash included in the deployed datum:
Deploy a Plutus script with a datum hash by specifying within the "Outputs" list an "Address" pointing to a script file and a "Datum" with "Data" pointing to a script data file and using the "Hash" mode:
Sign the transaction with a PrivateKey object:
Submit the transaction to the Cardano blockchain:
Spend Plutus scripts that have required signers by specifying them with a PrivateKey object, a PublicKey object, an address or a public key hash within the "RequiredSigners" list:
When automatic execution units are requested and the script requires signers, calculation of required signers is delayed until the transaction is signed. Sign the transaction using a PrivateKey object:
The automatic execution units have now been calculated:
Deploy and Spend Plutus Script V2 with a ReferenceScript and CollateralOutputs (3)
Deploy Reference Script (1)
Obtain a compiled Plutus V2 script:
Create a Cardano blockchain transaction to deploy a reference script:
Sign the transaction with a PrivateKey object:
Submit the transaction to the Cardano blockchain to deploy reference script:
Deploy Plutus Script UTXO with Inline Datum (1)
Create a Cardano blockchain transaction to deploy a script UTXO:
Sign the transaction with a PrivateKey object:
Submit the transaction to the Cardano blockchain to deploy the script UTXO:
Spend Plutus Script (1)
The following transaction that holds tokens will be used as collateral:
Create a Cardano blockchain transaction to spend a script UTXO using reference script and collateral outputs:
Sign the transaction with a PrivateKey object and submit the transaction to the Cardano blockchain:
Text
Wolfram Research (2021), BlockchainTransactionSubmit, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Cardano.html.
CMS
Wolfram Language. 2021. "BlockchainTransactionSubmit." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Cardano.html.
APA
Wolfram Language. (2021). BlockchainTransactionSubmit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-Cardano.html