BlockchainTransactionSign[obj,key]
digitally signs a blockchain transaction using the specified private key.
BlockchainTransactionSign[obj,{key1,key2,…}]
digitally signs a transaction using all the keys keyi.
BlockchainTransactionSign
Versions for specific blockchains »BlockchainTransactionSign[obj,key]
digitally signs a blockchain transaction using the specified private key.
BlockchainTransactionSign[obj,{key1,key2,…}]
digitally signs a transaction using all the keys keyi.
Details
- 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.
- The type of private key must be appropriate for the blockchain being used.
- BlockchainTransactionSign returns a blockchain transaction object with True as the value of its property "Signed".
- Multiple private keys can be given in any order.
Examples
open all close allBasic Examples (1)
Create a Bitcoin Pay-to-Public-Key-Hash BlockchainTransaction:
btcTX = BlockchainTransaction[<|"Inputs" -> {<|"TransactionID" -> "9bef194418607318673caaf8f45d52fb60e8c8586e6ce8414c377a279ca14399", "Index" -> 0|>}, "Outputs" -> {<|"Amount" -> Quantity[0.0002, "Bitcoins"], "Address" -> "munDTMqa9V9Uhi3P21FpkY8UfYzvQqpmoQ"|>, <|"Amount" -> Quantity[0.16223, "Bitcoins"], "Address" -> "mo9QWLSJ1g1ENrTkhK9SSyw7cYJfJLU8QH"|>}, "BlockchainBase" -> {"Bitcoin", "Testnet"}|>]Sign the transaction object using a WIF-encoded private key:
BlockchainTransactionSign[btcTX, "6a25394168f52156c58bbf4924e8c82da0d8bcb581f8baac6d67a5d3556a5e76"]Scope (1)
Multiple Key Signatures (1)
Sign a Bitcoin transaction with multiple keys:
btcTX = BlockchainTransaction[<|
"Inputs" -> {
<|"TransactionID" -> "a6736e807fa84219b6b41e250faf6393a76f055feeba95014458a583463143e4", "Index" -> 1|>,
<|"TransactionID" -> "a6736e807fa84219b6b41e250faf6393a76f055feeba95014458a583463143e4", "Index" -> 0|>
}, "Outputs" -> {
<|"Amount" -> 0.0023, "Address" -> "mkHGstoUaDWzGxag29MEnp8WJPpfA45omK"|>,
<|"Amount" -> 0.0015, "Address" -> "mgPhDaCzXcm4gmkxfz9sZKvpabmNGdLj52"|>
}, "BlockchainBase" -> {"Bitcoin", "Testnet"}|>]BlockchainTransactionSign[btcTX, {"cVN2fsWXoxMkPGx5EL7X6grykQ3VSDfHPUg3CJhD8AC9pJ5y8Nhi", "cSdsGz3xhvFZAXW9U3cpMKCnGW5DV3Frfp921wnFk5nvWttByMT1"}]Related Guides
Related Workflows
- Create a Standard Transaction in Bitcoin ▪
- Send Ether
History
Text
Wolfram Research (2019), BlockchainTransactionSign, Wolfram Language function, https://reference.wolfram.com/language/ref/BlockchainTransactionSign.html.
CMS
Wolfram Language. 2019. "BlockchainTransactionSign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BlockchainTransactionSign.html.
APA
Wolfram Language. (2019). BlockchainTransactionSign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BlockchainTransactionSign.html
BibTeX
@misc{reference.wolfram_2026_blockchaintransactionsign, author="Wolfram Research", title="{BlockchainTransactionSign}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/BlockchainTransactionSign.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaintransactionsign, organization={Wolfram Research}, title={BlockchainTransactionSign}, year={2019}, url={https://reference.wolfram.com/language/ref/BlockchainTransactionSign.html}, note=[Accessed: 12-June-2026]}