Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function computeSignature(tx: Object, privateKey: string, signAs: ?string) {
const signingData = signAs ?
binary.encodeForMultisigning(tx, signAs) : binary.encodeForSigning(tx)
return keypairs.sign(signingData, privateKey)
}
function computeSignature(tx, privateKey, signAs) {
const signingData = signAs ?
binary.encodeForMultisigning(tx, signAs) : binary.encodeForSigning(tx);
return rippleKeypairs.sign(signingData, privateKey);
}
function computeSignature(tx: object, privateKey: string, signAs?: string) {
const signingData = signAs
? binaryCodec.encodeForMultisigning(tx, signAs)
: binaryCodec.encodeForSigning(tx)
return keypairs.sign(signingData, privateKey)
}
Transaction.prototype.signingData = function() {
return binary.encodeForSigning(this.tx_json);
};