BlockchainTransactionData (for Cardano)

BlockchainTransactionData[txid]

gives information about the blockchain transactions with ID txid on the Cardano blockchain.

BlockchainTransactionData[txid,prop]

gives the specified property of the transactions.

Details

  • BlockchainTransactionData returns a list of transactions associated to a Cardano transaction ID.
  • Properties include:
  • "TransactionID"transaction ID
    "BlockHash"hash of the block containing the transaction
    "BlockNumber"height of the block containing the transaction
    "Confirmations"blocks confirming the block containing the transaction
    "BlockIndex"index of transaction inside the block
    "Timestamp"timestamp for the transaction
    "TotalOutput"transaction type
    "Fee"fee paid for this transaction
    "Deposit"ada deposit used for stake key and pool registration
    "ByteCount"transaction size in bytes
    "InvalidHereafter"slot number by which the transaction must be submitted
    "InvalidBefore"slot number from which the transaction is valid
    "Metadata"metadata of this transaction
    "Mint"tokens minted in this transaction
    "Withdrawals"withdrawals made in this transaction
    "Inputs"transaction input data
    "Outputs"transaction output data
    "ReferenceInputs"transaction reference input data
    "CollateralInputs"transaction collateral input data
    "CollateralOutputs"transaction collateral output data
    "Scripts"scripts included in this transaction
  • The value of "Metadata" is an association created from an on-chain JSON object.
  • The value of "Mint" is a list of associations with the following keys:
  • "AssetID"asset ID of the token (policy ID concatenated with asset name)
    "AssetName"asset name of the token
    "PolicyID"token policy ID
    "Fingerprint"encoded token asset ID
    "Quantity"amount of tokens minted in this transaction
  • The value of "Inputs" is a list of associations with the following keys:
  • "TransactionID"source transaction hash
    "Index"index within the source transaction output
    "Amount"source amount
    "Address"source address
    "Tokens"source tokens
    "Redeemer"redeemer used to spend the source transaction output
    "ScriptHash"hash of the script at the source transaction output
  • The associations in "ReferenceInputs" and "CollateralInputs" have the same structure as associations in "Inputs".
  • The value of "Outputs" is a list of associations with the following keys:
  • "Index"output index
    "Amount"transferred amount
    "Address"destination address
    "Tokens"transferred tokens
    "Datum"the script data datum at the source transaction output
    "DatumHash"the datum hash at the source transaction output
    "ReferenceScript"the reference script at the source transaction output
  • The associations in "CollateralOutputs" have the same structure as associations in "Outputs".
  • The value of "Scripts" is a list of associations with the following keys:
  • "Hash"the script's hash
    "Type"the type of script
    "Size"the size of the script
  • BlockchainTransactionData can access the Cardano mainnet (default) and testnet "preprod", which is a new network for testing purposes. To specify these networks, use the BlockchainBase option.

Examples

open allclose all

Basic Examples  (4)

Get information about a transaction from the Cardano blockchain:

Get data from multiple Cardano transactions by providing a list of transaction IDs:

Get the total output included in a transaction:

Get multiple properties from a Cardano transaction:

Scope  (21)

BlockHash  (1)

Get the hash of the block containing a Cardano transaction:

BlockIndex  (1)

Get the index of the block containing a Cardano transaction:

BlockNumber  (1)

Get the height of the block containing a Cardano transaction:

ByteCount  (1)

Get the byte count of a Cardano transaction:

Confirmations  (1)

Get the confirmations of the block containing a Cardano transaction:

CollateralInputs  (1)

CollateralOutputs  (1)

Deposit  (1)

Get the deposit amount of a Cardano transaction:

Fee  (1)

Get the fee included in a Cardano transaction:

Inputs  (1)

Get the inputs of a Cardano transaction:

InvalidBefore  (1)

Get the slot number from which the transaction is valid:

InvalidHereafter  (1)

Get the slot number by which the transaction must be submitted:

Metadata  (1)

Get the metadata of a Cardano transaction:

Export the result as the original on-chain JSON object:

Mint  (1)

Get the mint information of a Cardano transaction:

Outputs  (1)

Get the outputs of a Cardano transaction:

ReferenceInputs  (1)

Get the reference inputs of a Cardano transaction:

Scripts  (1)

Get the scripts used in a Cardano transaction:

Timestamp  (1)

Get the timestamp of a Cardano transaction:

TotalOutput  (1)

Get the total output of a Cardano transaction:

TransactionID  (1)

Get the transaction ID that matches the provided one:

Withdrawals  (1)

Get the amount withdrawn with a Cardano transaction:

Options  (2)

BlockchainBase  (2)

Mainnet  (1)

Get information from a Cardano mainnet transaction:

Testnet  (1)

Get information from a Cardano testnet transaction:

Applications  (1)

Get information about an NFT minted on the Cardano blockchain:

Extract the metadata:

Get the IPFS CID associated to the NFT file:

Download the file from IPFS using ExternalStorageDownload:

Import the file:

Possible Issues  (2)

Nonexistent Hashes  (1)

Using a transaction ID from one blockchain in another blockchain will return a Missing output:

Incorrect Hashes  (1)

Providing an invalid transaction ID will return a $Failed output:

Wolfram Research (2021), BlockchainTransactionData, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html.

Text

Wolfram Research (2021), BlockchainTransactionData, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html.

CMS

Wolfram Language. 2021. "BlockchainTransactionData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html.

APA

Wolfram Language. (2021). BlockchainTransactionData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html

BibTeX

@misc{reference.wolfram_2024_blockchaintransactiondata, author="Wolfram Research", title="{BlockchainTransactionData}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html}", note=[Accessed: 08-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_blockchaintransactiondata, organization={Wolfram Research}, title={BlockchainTransactionData}, year={2021}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionData-Cardano.html}, note=[Accessed: 08-October-2024 ]}