I have setup a simple offline signing script, however the "signedTransaction" blob that is returned is not valid when submitting to a ripple server. Here is my code (details redacted) below:
(Note that the account/seed I'm using when generated using the ripple-lib generateAddress() )
`
const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI();
var account = 'rMYFROMACCOUNT';
var destination = 'rTHEDESTACCOUNT';
var amount = 11;
This successfully returned a {signedTransaction, id}, then i copy it into a CURL request to submit but the ripple server returns error_code: 30 (invalidparams). Which is the same error when you try to submit any invalid blob data.
I have setup a simple offline signing script, however the "signedTransaction" blob that is returned is not valid when submitting to a ripple server. Here is my code (details redacted) below:
(Note that the account/seed I'm using when generated using the ripple-lib generateAddress() )
` const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI();
var account = 'rMYFROMACCOUNT'; var destination = 'rTHEDESTACCOUNT'; var amount = 11;
const txJSON = '{"TransactionType":"Payment","Account":"'+account+'","Destination":"'+destination+'","DestinationTag":1,"Amount":"'+(amount * 1000000)+'","Sequence":1,"Fee":"100"}'; const secret = 'sMYSEED'; console.log(api.sign(txJSON, secret)); `
This successfully returned a {signedTransaction, id}, then i copy it into a CURL request to submit but the ripple server returns error_code: 30 (invalidparams). Which is the same error when you try to submit any invalid blob data.