js-bigchaindb-driver icon indicating copy to clipboard operation
js-bigchaindb-driver copied to clipboard

how to validate the signed transaction

Open marypreethi12 opened this issue 7 years ago • 0 comments

i want to custom validate the transaction signed by client, const txCreateAliceSimpleSigned = driver.Transaction.signTransaction(txCreateAliceSimple, alice.privateKey)

i tried validating it by using var buf = Buffer.from(JSON.stringify(txCreateAliceSimpleSigned)); result = ed25519Fulfillment.validate(buf)

but i get invalid signature error ValidationError: Invalid ed25519 signature base-error.js:40 at Ed25519Sha256.validate (/Users/mary.preethimartis/development/ng-rt-abci-client-sdk/node_modules/crypto-conditions/src/types/ed25519-sha256.js:179:13) at Function.signTransaction (/Users/mary.preethimartis/development/ng-rt-abci-client-sdk/node_modules/bigchaindb-driver/dist/node/transaction.js:343:41) at Object.<anonymous> (/Users/mary.preethimartis/development/ng-rt-abci-client-sdk/client/example.js:46:24) at Module._compile (module.js:649:14) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:612:3

is it even possible to custom validate or it has to be done by bigchain through bigchain api? any suggestions are appreciated.

marypreethi12 avatar Oct 08 '18 11:10 marypreethi12