How to use the ripple-lib.SerializedObject function in ripple-lib

To help you get started, we’ve selected a few ripple-lib 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-rest / test / _fixtures.js View on Github external
var submit = function(data,ws) {
    console.log("submit request:", data)
    var so = new RL.SerializedObject(data.tx_blob).to_json();
    console.log("submit request deserialized",so)
    if (so.Account == accounts.genesis.address) {
        if (so.Destination == accounts.alice.address) {
            ws.send(JSON.stringify({ id: data.id,
              result: 
               { engine_result: 'tesSUCCESS',
                 engine_result_code: 0,
                 engine_result_message: 'The transaction was applied.',
                 tx_blob: '12000022000000002400000001201B0086590E61400000001992054068400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD0207446304402206A14028E66CD2D55D32DF83D3CD507D4ED16818BF88238FA578E54F0CE731B8302202E77B1E3F9856E1B0DB7BD43DA9DD8D4FDCB144C48025D6C0B1BE40C5CB81E3C8114B5F762798A53D543A014CAF8B297CFF8F2F937E88314BF14A5EF6814B074833FDDBA3B2235812EF55ABF',
                 tx_json: 
                  { Account: 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh',
                    Amount: '429000000',
                    Destination: 'rJRLoJSErtNRFnbCyHEUYnRUKNwkVYDM7U',
                    Fee: '12',
                    Flags: 0,
                    LastLedgerSequence: 8804622,
github ripple / ripple-rest / test / fixtures / _payments.js View on Github external
var submit = function(data,ws) {
    var so = new RL.SerializedObject(data.tx_blob).to_json();
    switch (so.Account) {
        case accounts.genesis.address :
        if (so.Destination == accounts.alice.address) {
            ws.send(JSON.stringify({ id: data.id,
              result: 
               { engine_result: 'tesSUCCESS',
                 engine_result_code: 0,
                 engine_result_message: 'The transaction was applied.',
                 tx_blob: '12000022000000002400000001201B0086590E61400000001992054068400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD0207446304402206A14028E66CD2D55D32DF83D3CD507D4ED16818BF88238FA578E54F0CE731B8302202E77B1E3F9856E1B0DB7BD43DA9DD8D4FDCB144C48025D6C0B1BE40C5CB81E3C8114B5F762798A53D543A014CAF8B297CFF8F2F937E88314BF14A5EF6814B074833FDDBA3B2235812EF55ABF',
                 tx_json: 
                  { Account: 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh',
                    Amount: '429000000',
                    Destination: 'rJRLoJSErtNRFnbCyHEUYnRUKNwkVYDM7U',
                    Fee: '12',
                    Flags: 0,
                    LastLedgerSequence: 8804622,
github ripple / ripple-data-api / db / rippledquerier.js View on Github external
function blobToJSON( blob ) {

  var buff = new Buffer( blob ),
    buffArray = [ ];

  for ( var i = 0, len = buff.length; i < len; i++ ) {
    buffArray.push( buff[ i ] );
  }

  return ( new ripple.SerializedObject( buffArray ).to_json( ) );
}