BlockchainTransactionSign (for ARK)
BlockchainTransactionSign[obj,key]
digitally signs an ARK blockchain transaction using the specified private key.
BlockchainTransactionSign[obj,{key1,key2}]
digitally signs a transaction using a first and second private key.
BlockchainTransactionSign[obj,{assoc1,assoc2,…}]
digitally signs a transaction related to a multisignature address.
Details
- Digitally sign an ARK blockchain transaction using the specified private key. If the address has a second public key associated with it, a second private key must be given to sign the transaction.
- If the sender is a multisignature address, a list of associations with the private key of each participant must be given to sign the transaction. A minimum number of keys must be provided according to the "MinimumKeys" parameter of the multisignature address.
- Each association in the list must have the following element:
-
"PrivateKey" private key of the participant - The following additional element can also be given:
-
"Index" index (starting with 0) of the participant in the public key list used when creating the multisignature address - In BlockchainTransactionSign[obj,…], obj is a BlockchainTransaction object.
- The key for BlockchainTransactionSign must be a PrivateKey object, a hex string representing a private key or a private key in WIF format.
- 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 an ARK BlockchainTransaction:
arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"}, "Recipient" -> "DLesojAmpcA4jQbJDz5JKQ73k1RervJwfi", "Fee" -> 500000,
"Amount" -> 5000000|>]Sign the transaction object using a private key object:
BlockchainTransactionSign[arkTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{112463271242020511913268553850576024704171613983200155594908209540978220622935,
5142141864654632412502491922889459950565538412481466601 ... 7159986346772386468502028015847542708926266702473865,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["Avij9K4sXZJWUqzBwBO73WMI4OylteE3fn58+1CVqmRX"],
"PrivateByteArray" -> ByteArray["1gk4lwSUp5gsf8GNG+fRJSIfQZfOZ2s8owB3DkLWqok="]]]]Scope (8)
WIF Private Key (1)
Sign an ARK transaction object using a WIF private key:
arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"}, "Recipient" -> "DLesojAmpcA4jQbJDz5JKQ73k1RervJwfi", "Fee" -> 500000,
"Amount" -> 5000000|>]BlockchainTransactionSign[arkTX, "SH1bJ2yZoNqeV1ZQKseKLQsK5owhARLQ5QktTfQmJp4KB22YNvtn"]Hexadecimal Private Key (1)
Sign an ARK transaction object using a hexadecimal private key:
arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"}, "Recipient" -> "DLesojAmpcA4jQbJDz5JKQ73k1RervJwfi", "Fee" -> 500000,
"Amount" -> 5000000|>]BlockchainTransactionSign[arkTX, "f2066793e6227d474323bf0c1b18f0ffab7429644476e645345ff261bf11b20d"]Second Signature Address (1)
When sender address has an associated second signature:
BlockchainAddressData["DLesojAmpcA4jQbJDz5JKQ73k1RervJwfi", {"Username", "PublicKey", "SecondPublicKey"}, BlockchainBase -> {"ARK", "Devnet"}]//ColumnYou must sign the transaction using the required private keys in a list:
arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"}, "Recipient" -> "DADxmK6VvgFRJ1USzc9RVFUbtjBb1u7fKk", "Fee" -> 500000,
"Amount" -> 5000000|>]BlockchainTransactionSign[arkTX, {"SDbSpS5R3CvS5iYAAKgNcc3PiFDeCSqJBoQz4SjEMxvS31BEpjm6", "SDreXxLSdspsr7a5azJxcnSeMLN4pwn4pWVJuEnPvXi7YB2qSB8n"}]Multisignature Creation (4)
Transaction Creation (1)
All parties have to generate a key pair. These keys will be combined to create a new multisignature address:
keys1 = GenerateAsymmetricKeyPair["ARK"]keys2 = GenerateAsymmetricKeyPair["ARK"]keys3 = GenerateAsymmetricKeyPair["ARK"]A sender with enough balance must provide a public key:
senderPublicKey = BlockchainAddressData["DNeJSpEqKBy3oJ5MXrfuchwWj5a4JXxTQp", "PublicKey", BlockchainBase -> {"ARK", "Devnet"}]arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"},
"Type" -> "MultiSignature",
"MinimumKeys" -> 2,
"PublicKeys" -> {keys1["PublicKey"], keys2["PublicKey"], keys3["PublicKey"]},
"SenderPublicKey" -> senderPublicKey
|>]Simultaneous signing (1)
Sign an ARK transaction to create a multisignature address. The transaction must be signed with the private keys of all of the participants:
arkTXMS = BlockchainTransactionSign[arkTX, {
<|"PrivateKey" -> keys1["PrivateKey"]|>,
<|"PrivateKey" -> keys2["PrivateKey"]|>,
<|"PrivateKey" -> keys3["PrivateKey"]|>
}]Sequential signing (1)
Alternatively, the transaction object can be signed sequentially by each participant:
arkTXMS0 = BlockchainTransactionSign[arkTX, {
<|"PrivateKey" -> keys1["PrivateKey"]|>
}]arkTXMS1 = BlockchainTransactionSign[arkTXMS0, {
<|"PrivateKey" -> keys2["PrivateKey"]|>
}]arkTXMS2 = BlockchainTransactionSign[arkTXMS1, {
<|"PrivateKey" -> keys3["PrivateKey"]|>
}]Sender signing (1)
The transaction must be signed by the sender using the private key associated with the "SenderPublicKey" field given when creating the transaction object:
arkTXSigned = BlockchainTransactionSign[arkTXMS, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{57462485011872965801710100144286500884992829103026291705481767716456346255904,
93252910380326883084296527707983096725912573509936596202 ... 7594552434738658300043042142820255643943601719303638,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["An8KnSxl8mGALzf1tJ8fzeENub8lLY0vZXic8HOZQYIg"],
"PrivateByteArray" -> ByteArray["A24xoGmWYQ4Wnh+4YsWBXZCmI1EP+5YvkVVyCjb5XdY="]]]]The multisignature address that will be registered is:
arkTXSigned["MultiSignatureAddress"]Multisignature Address as Sender (1)
Sign an ARK transaction with a multisignature address as sender. In this case, the "SenderPublicKey" is mandatory
senderPublicKey = BlockchainAddressData["DGVaLpr1BArTmAtimoDh8C5LujPTTF1EFE", "PublicKey", BlockchainBase -> {"ARK", "Devnet"}]arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"},
"Recipient" -> "DGJkJXa9gq38kjSCZnvqNndn7jSWrd2zrT",
"Amount" -> Quantity[520000000, "DARKtoshis"],
"SenderPublicKey" -> senderPublicKey|>]The transaction must be signed with a minimum number of private keys from the participants according to the "MinimumKeys" parameter of the multisignature address:
BlockchainAddressData["DGVaLpr1BArTmAtimoDh8C5LujPTTF1EFE", "MultiSignature", BlockchainBase -> {"ARK", "Devnet"}]["MinimumKeys"]BlockchainTransactionSign[arkTX, {
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{57143976469766999610290879972632270167816533995122692469610637510833791145289,
10851753758690387871590145496903056174523413855971774365 ... 8995775012947838394065678172356468788225412929600241,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["An5WWDH2xsLdlHqVZXPNykyC/227dNX4udiF0XX//ZVJ"],
"PrivateByteArray" -> ByteArray["WRn7J2df1Dqv0nY7Hm3BOCJglO/a12+WWZWPIrHquvE="]]]|>,
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{36993751054435703412341007594940267743946195102568099488380666233303262143610,
10423346436196938680821092747767378668456564818288286644 ... 5166889460292483674185938995515423680963638343340623,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A1HJuJl7Ks5J4Sejgc0Q3et28NYIQKwxgjoUcSEu6aR6"],
"PrivateByteArray" -> ByteArray["s01n9oGqdDM+o/dgEN72f0azYlg0p2/U/jzPSb2Fkk8="]]]|>}]Alternatively, the transaction object can be signed sequentially by each participant:
arkTXMS0 = BlockchainTransactionSign[arkTX, {
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{57143976469766999610290879972632270167816533995122692469610637510833791145289,
10851753758690387871590145496903056174523413855971774365 ... 8995775012947838394065678172356468788225412929600241,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["An5WWDH2xsLdlHqVZXPNykyC/227dNX4udiF0XX//ZVJ"],
"PrivateByteArray" -> ByteArray["WRn7J2df1Dqv0nY7Hm3BOCJglO/a12+WWZWPIrHquvE="]]]|>
}]arkTXMS1 = BlockchainTransactionSign[arkTXMS0, {
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{36993751054435703412341007594940267743946195102568099488380666233303262143610,
10423346436196938680821092747767378668456564818288286644 ... 5166889460292483674185938995515423680963638343340623,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A1HJuJl7Ks5J4Sejgc0Q3et28NYIQKwxgjoUcSEu6aR6"],
"PrivateByteArray" -> ByteArray["s01n9oGqdDM+o/dgEN72f0azYlg0p2/U/jzPSb2Fkk8="]]]|>
}]Applications (2)
Create an ARK BlockchainTransaction:
arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"}, "Recipient" -> "DLesojAmpcA4jQbJDz5JKQ73k1RervJwfi", "Fee" -> 500000,
"Amount" -> 5000000|>]Sign the transaction object using a private key object:
arkTXSigned = BlockchainTransactionSign[arkTX, PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{87696465113910176578204891522220454745022058862683894191659089442189614354344,
72502334495718524445709347674468614586757811071611466963 ... 8003037045219516869875358425443035690542436100010227,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["AsHicLXwy33F53No6hMGWy33lkXzIX4FHPfAe4pJsY+o"],
"PrivateByteArray" -> ByteArray["oihE/G/Fmu7Za7kEhAHmpdhhwhHLx+zbr4WQr3ie8PM="]]]]Send the signed transaction to the ARK blockchain:
BlockchainTransactionSubmit[arkTXSigned]Create an ARK BlockchainTransaction that uses a multisignature address:
senderPublicKey = BlockchainAddressData["DGVaLpr1BArTmAtimoDh8C5LujPTTF1EFE", "PublicKey", BlockchainBase -> {"ARK", "Devnet"}]arkTX = BlockchainTransaction[<|
"BlockchainBase" -> {"ARK", "Devnet"},
"Recipient" -> "DGJkJXa9gq38kjSCZnvqNndn7jSWrd2zrT",
"Amount" -> Quantity[520000000, "DARKtoshis"],
"SenderPublicKey" -> senderPublicKey|>]Sign the transaction with the minimum amount of required keys:
BlockchainAddressData["DGVaLpr1BArTmAtimoDh8C5LujPTTF1EFE", "MultiSignature", BlockchainBase -> {"ARK", "Devnet"}]["MinimumKeys"]BlockchainTransactionSign[arkTX, {
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{57143976469766999610290879972632270167816533995122692469610637510833791145289,
10851753758690387871590145496903056174523413855971774365 ... 8995775012947838394065678172356468788225412929600241,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["An5WWDH2xsLdlHqVZXPNykyC/227dNX4udiF0XX//ZVJ"],
"PrivateByteArray" -> ByteArray["WRn7J2df1Dqv0nY7Hm3BOCJglO/a12+WWZWPIrHquvE="]]]|>,
<|"PrivateKey" -> PrivateKey[Association["Type" -> "EllipticCurve", "CurveName" -> "secp256k1",
"PublicCurvePoint" ->
{36993751054435703412341007594940267743946195102568099488380666233303262143610,
10423346436196938680821092747767378668456564818288286644 ... 5166889460292483674185938995515423680963638343340623,
"Compressed" -> True, "PublicByteArray" ->
ByteArray["A1HJuJl7Ks5J4Sejgc0Q3et28NYIQKwxgjoUcSEu6aR6"],
"PrivateByteArray" -> ByteArray["s01n9oGqdDM+o/dgEN72f0azYlg0p2/U/jzPSb2Fkk8="]]]|>}]Send the signed transaction to the ARK blockchain:
BlockchainTransactionSubmit[BlockchainTransaction[Association["BlockchainBase" -> {"ARK", "Devnet"}, "Signed" -> True,
"Type" -> "Transfer", "Fee" -> Quantity[10000000, "DARKtoshis"], "TransactionCount" -> 1,
"Sender" -> "DGVaLpr1BArTmAtimoDh8C5LujPTTF1EFE",
"Recipie ... b9f1ccfe108e6b4740f15ba487e69c64925c7aac16c83390380fb8\
6c88812d6e71773b0dfceb6133e89eef8003391a38753a15665", "02bf84c8b7021195b9efdd0276827b805ae2294a666f\
91932e4176a2cf5f2937a8601853468a35eceaca0f02fb65f811c0b17c2c4b4afb9ac1966bb332e3bdfdd6"}]]]Possible Issues (1)
Incorrect Private Key (1)
Providing an invalid private key will return a $Failed output:
tx = BlockchainTransaction[Association["BlockchainBase" -> {"ARK", "DevNet"}, "Signed" -> False,
"Type" -> "Transfer", "Fee" -> Quantity[10000000, "DArktoshis"],
"Timestamp" -> DateObject[{2019, 7, 10, 13, 13, 28.115883`8.201526708920333}, "Instant",
"Gregorian", -5.], "Recipient" -> "DB3BoyUAMZqWFnvmneUAerVdsezwrtZkA9",
"Amount" -> Quantity[5000000, "DArktoshis"], "VendorField" -> "",
"MessageHash" -> "d988d478ad9af5d993fa1073a504ad2f902416c8bd585f7f70c3189d173fc50d"]];BlockchainTransactionSign[tx, "AAAAAA"]Related Guides
History
Introduced in 2019 (12.0)
Text
Wolfram Research (2019), BlockchainTransactionSign, Wolfram Language function, https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-ARK.html.
CMS
Wolfram Language. 2019. "BlockchainTransactionSign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-ARK.html.
APA
Wolfram Language. (2019). BlockchainTransactionSign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-ARK.html
BibTeX
@misc{reference.wolfram_2026_blockchaintransactionsign, author="Wolfram Research", title="{BlockchainTransactionSign}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-ARK.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_blockchaintransactionsign, organization={Wolfram Research}, title={BlockchainTransactionSign}, year={2019}, url={https://reference.wolfram.com/language/ref/blockchain/BlockchainTransactionSign-ARK.html}, note=[Accessed: 13-June-2026]}