BlockchainTransactionSubmit (for Bitcoin Cash)
BlockchainTransactionSubmit[obj]
submits the transaction specified in the BlockchainTransaction object obj to the Bitcoin Cash blockchain.
Details
- BlockchainTransactionSubmit[obj] submits the transaction to a Bitcoin Cash 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 Cash blockchain yet.
- BlockchainTransactionSubmit can submit transactions to the Bitcoin Cash mainnet (default) and testnet. These networks are specified in the BlockchainTransaction object.
Examples
open all close allBasic Examples (1)
Create a Bitcoin Cash Pay-to-Public-Key-Hash BlockchainTransaction:
bchTX = BlockchainTransaction[<|"Inputs" -> {<|"TransactionID" -> "4fe6465bbf9ffbd621445e520126aba538d59175a0ba3c6089225e9efbea0a67", "Index" -> 1|>}, "Outputs" -> {<|"Amount" -> Quantity[0.0001, "BitcoinCashUnits"], "Address" -> "bchtest:qp7ykfna6xndcyhr5j9h5xx59xj57tvawvjc0de029"|>,
<|"Amount" -> Quantity[0.008645, "BitcoinCashUnits"], "Address" -> "bchtest:qrm5whh48dvqwlza8kjete78ttsudpz0vs9r7l7arp"|>}|>, BlockchainBase -> {"BitcoinCash", "Testnet"}]Sign the transaction object using a private key:
bchTXSigned = BlockchainTransactionSign[bchTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{111371065921687716131772167801914439447104389817514716115511942584632775793360,
5267778301581478541603447949046636935512968567582755066 ... 5414116593206554949956685290123019580109420649791178,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["AvY5yhtA3b1LZ7ggaGApsdJ8zZ3qoRT+C2rkoek909rQ"],
"PrivateByteArray" -> ByteArray["aaEBjTDfGHmkprK/VruG4RW28D1SQB2FMuy2e1n8Pso="]]]]Send the signed transaction to the Bitcoin Cash blockchain:
BlockchainTransactionSubmit[bchTXSigned]Possible Issues (1)
Incomplete Multi-signature (1)
Trying to submit a partially signed multi-signature transaction will return a $Failed output:
bchTX = BlockchainTransaction[<|"BlockchainBase" -> {"BitcoinCash", "Testnet"},
"Inputs" -> {
<|"TransactionID" -> "f075217ca991aa791fa7c3d70f42b94129620907e79726d6900d953c972ca607", "Index" -> 0|>
},
"Outputs" -> {
<|"Amount" -> Quantity[4.*^-6, "BitcoinCashUnits"], "Address" -> "bchtest:pzswddl07p942n9nukjyq3d95dxawxe4ty8lp8znq2"|>
}|>]bchTXPartiallySigned = BlockchainTransactionSign[bchTX, <|"PrivateKeys" -> {PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{107979500881536671708232537632503185481996798629419440902689565824755056043672,
2637454808094502922642620609608402222690883176095857765 ... 9932546330509479197220801016216185613865467267293385,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["Au66O1At9hyzPrP7jrH8x3+0Eu+iockh1KM1MemGIOaY"],
"PrivateByteArray" -> ByteArray["Kdbwgcvp8l5y34qidpHOP/qLecxBydEn97nfCKKcoMk="]]]}, "PublicKeys" -> {PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["A3JbPdNVSP2qOQQGZ8L356XoOXtca+x0yN/eJRFyZsSb"],
"PublicCurvePoint" ->
{51724874525444673739416721101123148946820313131304153131265018986533336040603,
48268731188414227634929888133357578613956172980857119866702680060264360725427}]], PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["Au66O1At9hyzPrP7jrH8x3+0Eu+iockh1KM1MemGIOaY"],
"PublicCurvePoint" ->
{107979500881536671708232537632503185481996798629419440902689565824755056043672,
26374548080945029226426206096084022226908831760958577652142947530277320333564}]], PublicKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1", "Compressed" -> True,
"PublicByteArray" -> ByteArray["A2oN92oQNAuhAQWLabDZHbQ8kuwIEtlRPlY5sRPfB66R"],
"PublicCurvePoint" ->
{47969838552476767063979266372986347156581982326487605026895634402235021504145,
106239829386092594197652494795106677088067962409072619345894133053834318874239}]]}, "RequiredKeys" -> 2|>]BlockchainTransactionSubmit[bchTXPartiallySigned]Related Guides
History
Introduced in 2024 (14.0)
Text
Wolfram Research (2024), BlockchainTransactionSubmit, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-BitcoinCash.html.
CMS
Wolfram Language. 2024. "BlockchainTransactionSubmit." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-BitcoinCash.html.
APA
Wolfram Language. (2024). BlockchainTransactionSubmit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-BitcoinCash.html
BibTeX
@misc{reference.wolfram_2026_blockchaintransactionsubmit, author="Wolfram Research", title="{BlockchainTransactionSubmit}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-BitcoinCash.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaintransactionsubmit, organization={Wolfram Research}, title={BlockchainTransactionSubmit}, year={2024}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSubmit-BitcoinCash.html}, note=[Accessed: 13-June-2026]}