How to use the ripple-binary-codec.encodeForSigning function in ripple-binary-codec

To help you get started, we’ve selected a few ripple-binary-codec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ripple / ripple-lib / src / transaction / signWithKeypair.js View on Github external
function computeSignature(tx: Object, privateKey: string, signAs: ?string) {
  const signingData = signAs ?
    binary.encodeForMultisigning(tx, signAs) : binary.encodeForSigning(tx)
  return keypairs.sign(signingData, privateKey)
}
github BitGo / BitGoJS / modules / core / src / ripple.ts View on Github external
function computeSignature(tx, privateKey, signAs) {
  const signingData = signAs ?
    binary.encodeForMultisigning(tx, signAs) : binary.encodeForSigning(tx);
  return rippleKeypairs.sign(signingData, privateKey);
}
github ripple / ripple-lib / src / transaction / sign.ts View on Github external
function computeSignature(tx: object, privateKey: string, signAs?: string) {
  const signingData = signAs
    ? binaryCodec.encodeForMultisigning(tx, signAs)
    : binaryCodec.encodeForSigning(tx)
  return keypairs.sign(signingData, privateKey)
}
github ripple / ripple-lib / src / core / transaction.js View on Github external
Transaction.prototype.signingData = function() {
  return binary.encodeForSigning(this.tx_json);
};