BlockchainTransactionSign (for Tezos)
BlockchainTransactionSign[obj,key]
digitally signs a Tezos blockchain operation using the specified private key.
Details
- Digitally sign a Tezos blockchain operation 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 an ed25519 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 all close allBasic Examples (1)
Create a Tezos BlockchainTransaction:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz1QQq7Zf1vqFtVwQUotAAnduqFJJVJXQj8B",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]Sign the transaction object using a private key object:
tezosTXSigned = BlockchainTransactionSign[tezosTX, PrivateKey[Association["Type" -> "EdwardsCurve", "CurveName" -> "ed25519",
"PrivateByteArray" -> ByteArray["t6mN4yZraSgHhBNriYkfLSUZXBknkn5jwxSTGVaE+ZA="],
"PublicByteArray" -> ByteArray["XV8X/6Px3jp6g7P7fjP9Kx3kkRqRo+Qjs0NetwesZ3A="],
"PublicCurvePoint" ->
{45001969305677632895706978426590845419496377012816879793671527316425824597738,
50842211597400211252558589180780840303852599974743311386585975784578039111517}]]]Scope (4)
Edwards Curve (ed25519) (1)
Sign a Tezos transaction object using an ed25519 private key:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz1QQq7Zf1vqFtVwQUotAAnduqFJJVJXQj8B",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]BlockchainTransactionSign[tezosTX, PrivateKey[Association["Type" -> "EdwardsCurve", "CurveName" -> "ed25519",
"PrivateByteArray" -> ByteArray["t6mN4yZraSgHhBNriYkfLSUZXBknkn5jwxSTGVaE+ZA="],
"PublicByteArray" -> ByteArray["XV8X/6Px3jp6g7P7fjP9Kx3kkRqRo+Qjs0NetwesZ3A="],
"PublicCurvePoint" ->
{45001969305677632895706978426590845419496377012816879793671527316425824597738,
50842211597400211252558589180780840303852599974743311386585975784578039111517}]]]Elliptic Curve (prime256v1) (1)
Sign a Tezos transaction object using a prime256v1 private key:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz3TTkmZZbQxGPo3TcChm9nrvJnTF6J8LxGd",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]BlockchainTransactionSign[tezosTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "prime256v1",
"PublicCurvePoint" ->
{63673691480334308349240209585079891371024424691144070243886602308571956400372,
7937361344815732578919662379495615927454817690045119125 ... 8060257456016448500594111559843160113410620856803391,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["AozGCEDCH3m7CTEE/1NlQlnOXg2fNyPwV34lbSNomlD0"],
"PrivateByteArray" -> ByteArray["8R1OHrkKfu3jl2fkwaG7E1q8i7KoYkq4l1vHlDhNID8="]]]]Elliptic Curve (secp256k1) (1)
Sign a Tezos transaction object using a secp256k1 private key:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz2TVbMV4uhJs3zVgbxcxYGSv7NYiuzpGJy3",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]BlockchainTransactionSign[tezosTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{42625214493998719069707762187802385718944989818707151355884231739522101020373,
99358192920488203613126382069031622013402553811817122151 ... 8434099113816002746371896005590866675844020043837484,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A149BDXBTqxbSess33yjABxETc82lxJcD6JLaiEDcAbV"],
"PrivateByteArray" -> ByteArray["sPJ6BhXmWLjig+g4Vo+XUdRm3KwYzGhX0fsD4GxQ8Cw="]]]]Hexadecimal Private Key (1)
Sign a Tezos transaction object using a hexadecimal private key:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz1QQq7Zf1vqFtVwQUotAAnduqFJJVJXQj8B",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]This 32-byte hexadecimal string will be assumed to be an ed25519 private key:
BlockchainTransactionSign[tezosTX, "b7a98de3266b69280784136b89891f2d25195c1927927e63c31493195684f990"]Applications (1)
Create a Tezos BlockchainTransaction:
tezosTX = BlockchainTransaction[<|
"BlockchainBase" -> {"Tezos", "Testnet"},
"Type" -> "Transaction",
"Sender" -> "tz1QQq7Zf1vqFtVwQUotAAnduqFJJVJXQj8B",
"Target" -> "tz1YeQkgxvzVroTyMh72DrmNRsyzQfsBmxt8",
"Amount" -> 1|>]Sign the transaction object using a private key object:
tezosTXSigned = BlockchainTransactionSign[tezosTX, PrivateKey[Association["Type" -> "EdwardsCurve", "CurveName" -> "ed25519",
"PrivateByteArray" -> ByteArray["t6mN4yZraSgHhBNriYkfLSUZXBknkn5jwxSTGVaE+ZA="],
"PublicByteArray" -> ByteArray["XV8X/6Px3jp6g7P7fjP9Kx3kkRqRo+Qjs0NetwesZ3A="],
"PublicCurvePoint" ->
{45001969305677632895706978426590845419496377012816879793671527316425824597738,
50842211597400211252558589180780840303852599974743311386585975784578039111517}]]]Send the signed operation to the Tezos blockchain:
BlockchainTransactionSubmit[tezosTXSigned]Possible Issues (2)
Hexadecimal String (1)
A 32-byte hexadecimal string will be assumed to be an ed25519 private key:
BlockchainTransactionSign[BlockchainTransaction[Association["BlockchainBase" -> {"Tezos", "Testnet"}, "Signed" -> False,
"Branch" -> "BLRZxHLydfXvUrN3vcJgwAXQ228TG94ZRT59PidB7LWuteoHj9M", "Type" -> "Transaction",
"BakerFee" -> Quantity[444, "Mutez"], "TransactionCount ... 3d65d1b34f1288da26166f3c618499a74ed",
"RawTransaction" -> "5dbf008286a36fc933aab3000087ab32bde03d46160ad4c1726d1ddfb5241fe76c00fd531f5d\
b94c2732b6f37e9774b09fdc5cbaedc8bc03b3e13bf70b0080ade2040000224358cb9ea65ebad12f6eee05b8d4ea3442288\
b00"]], "f45e6167382ab5d811b921e8a206e59132db260b33aa2152ebefaf4b577f1626"]Incorrect Private Key (1)
Providing an invalid private key will return a $Failed output:
tx = BlockchainTransaction[Association["BlockchainBase" -> {"Tezos", "Testnet"}, "Signed" -> False,
"Branch" -> "BLRZxHLydfXvUrN3vcJgwAXQ228TG94ZRT59PidB7LWuteoHj9M", "Type" -> "Transaction",
"BakerFee" -> Quantity[444, "Mutez"], "TransactionCount ... 3d65d1b34f1288da26166f3c618499a74ed",
"RawTransaction" -> "5dbf008286a36fc933aab3000087ab32bde03d46160ad4c1726d1ddfb5241fe76c00fd531f5d\
b94c2732b6f37e9774b09fdc5cbaedc8bc03b3e13bf70b0080ade2040000224358cb9ea65ebad12f6eee05b8d4ea3442288\
b00"]];BlockchainTransactionSign[tx, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{99996622774411224206689713570996550502312916371912868894545306498700561640708,
11531315470755175096587237670662060680965155414847439918 ... 8196821227458735685746183659790233490068724033570113,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A90UFTJtm+OJS5xTh52of2d7duSA9o5zbCcSv9utvG0E"],
"PrivateByteArray" -> ByteArray["DWmbPKtMfNR7RlsI+dV/VB8VI08e7XN058NymJpQxUE="]]]]BlockchainTransactionSign[tx, "AAAAAA"]Related Guides
History
Introduced in 2020 (12.2)
Text
Wolfram Research (2020), BlockchainTransactionSign, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Tezos.html.
CMS
Wolfram Language. 2020. "BlockchainTransactionSign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Tezos.html.
APA
Wolfram Language. (2020). BlockchainTransactionSign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Tezos.html
BibTeX
@misc{reference.wolfram_2026_blockchaintransactionsign, author="Wolfram Research", title="{BlockchainTransactionSign}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Tezos.html}", note=[Accessed: 29-April-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaintransactionsign, organization={Wolfram Research}, title={BlockchainTransactionSign}, year={2020}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-Tezos.html}, note=[Accessed: 29-April-2026]}