Module ar_tx.erl¶
The module with utilities for transaction creation, signing, and verification.
Function Index¶
collect_validation_results/2* | |
do_verify/2* | Verify transaction. |
json_struct_to_tx/1 | |
new/4 | Create a new transaction. |
new/5 | |
sign/2 | Cryptographically sign (claim ownership of) a transaction. |
signature_data_segment/1* | Generate the data segment to be signed for a given TX. |
tx_to_json_struct/1 | |
verify/1 | Verify whether a transaction is valid. |
verify_hash/1* | Verify that the transaction's ID is a hash of its signature. |
verify_signature/2* | Verify the transaction's signature. |
verify_tx_id/2 | Verify the given transaction actually has the given identifier. |
Function Details¶
collect_validation_results/2 *¶
collect_validation_results(TXID, Checks) -> any()
do_verify/2 *¶
do_verify(TX, VerifySignature) -> any()
Verify transaction.
json_struct_to_tx/1¶
json_struct_to_tx(TXStruct) -> any()
new/4¶
new(Dest, Reward, Qty, Last) -> any()
Create a new transaction.
new/5¶
new(Dest, Reward, Qty, Last, SigType) -> any()
sign/2¶
sign(TX, X2) -> any()
Cryptographically sign (claim ownership of) a transaction.
signature_data_segment/1 *¶
signature_data_segment(TX) -> any()
Generate the data segment to be signed for a given TX.
tx_to_json_struct/1¶
tx_to_json_struct(Tx) -> any()
verify/1¶
verify(TX) -> any()
Verify whether a transaction is valid.
verify_hash/1 *¶
verify_hash(Tx) -> any()
Verify that the transaction's ID is a hash of its signature.
verify_signature/2 *¶
verify_signature(TX, X2) -> any()
Verify the transaction's signature.
verify_tx_id/2¶
verify_tx_id(ExpectedID, Tx) -> any()
Verify the given transaction actually has the given identifier.