BlockchainTransactionSign (for Cardano)
BlockchainTransactionSign[obj,key]
digitally signs a Cardano blockchain transaction using the specified private key.
BlockchainTransactionSign[obj,{key1,key2,…}]
digitally signs a transaction using all the keys keyi.
Details
- Digitally signs a Cardano blockchain transaction using the specified private key.
- In BlockchainTransactionSign[obj,…], obj is a BlockchainTransaction object.
- The key for BlockchainTransactionSign must be a PrivateKey object or a hex string representing a private key.
- BlockchainTransactionSign returns a blockchain transaction object with True as the value of its property "Signed" and with the added property "RawTransaction".
Examples
open allclose allBasic Examples (1)
Create a Cardano blockchain transaction:
Sign the transaction with a PrivateKey object:
Scope (1)
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), BlockchainTransactionSign, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Cardano.html.
CMS
Wolfram Language. 2021. "BlockchainTransactionSign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Cardano.html.
APA
Wolfram Language. (2021). BlockchainTransactionSign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Cardano.html