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 allclose allBasic Examples (1)
Create an ARK BlockchainTransaction:
Scope (8)
Second Signature Address (1)
Multisignature Creation (4)
Transaction Creation (1)
Simultaneous signing (1)
Sequential signing (1)
Multisignature Address as Sender (1)
Sign an ARK transaction with a multisignature address as sender. In this case, the "SenderPublicKey" is mandatory
The transaction must be signed with a minimum number of private keys from the participants according to the "MinimumKeys" parameter of the multisignature address:
Alternatively, the transaction object can be signed sequentially by each participant:
Applications (2)
Create an ARK BlockchainTransaction:
Sign the transaction object using a private key object:
Send the signed transaction to the ARK blockchain:
Create an ARK BlockchainTransaction that uses a multisignature address:
Sign the transaction with the minimum amount of required keys:
Possible Issues (1)
Incorrect Private Key (1)
Providing an invalid private key will return a $Failed output:
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