mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-08-23 16:40:52 +00:00
Document setCanonicalFlag and export from src/transaction/utils
This commit is contained in:
@@ -34,7 +34,17 @@ function formatPrepareResponse(txJSON: any): Prepare {
|
||||
}
|
||||
}
|
||||
|
||||
function setCanonicalFlag(txJSON) {
|
||||
/**
|
||||
* Set the `tfFullyCanonicalSig` flag on a transaction.
|
||||
*
|
||||
* See https://xrpl.org/transaction-malleability.html
|
||||
*
|
||||
* @param {TransactionJSON} txJSON The transaction object to modify.
|
||||
* This method will modify object's `Flags` property, or add it if it does not exist.
|
||||
*
|
||||
* @returns {void} This method mutates the original txJSON and does not return a value.
|
||||
*/
|
||||
function setCanonicalFlag(txJSON: TransactionJSON): void {
|
||||
txJSON.Flags |= txFlags.Universal.FullyCanonicalSig
|
||||
|
||||
// JavaScript converts operands to 32-bit signed ints before doing bitwise
|
||||
@@ -192,5 +202,6 @@ export {
|
||||
convertStringToHex,
|
||||
convertMemo,
|
||||
prepareTransaction,
|
||||
common
|
||||
common,
|
||||
setCanonicalFlag
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user