How to use the ripple-lib.UInt160.from_generic 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 / rippled / bin / rlint.js View on Github external
dir_nodes.forEach(function (node) {
      var book = {
        taker_gets: {
            currency: UInt160.from_generic(node.TakerGetsCurrency).to_json(),
            issuer: UInt160.from_generic(node.TakerGetsIssuer).to_json()
          },
        taker_pays: {
          currency: UInt160.from_generic(node.TakerPaysCurrency).to_json(),
          issuer: UInt160.from_generic(node.TakerPaysIssuer).to_json()
        },
        quality: Amount.from_quality(node.RootIndex),
        index: node.RootIndex
      };

      books[book_key(book)] = book;

//      console.log(JSON.stringify(node, undefined, 2));
    });
github ripple / rippled / bin / rlint.js View on Github external
dir_nodes.forEach(function (node) {
      var book = {
        taker_gets: {
            currency: UInt160.from_generic(node.TakerGetsCurrency).to_json(),
            issuer: UInt160.from_generic(node.TakerGetsIssuer).to_json()
          },
        taker_pays: {
          currency: UInt160.from_generic(node.TakerPaysCurrency).to_json(),
          issuer: UInt160.from_generic(node.TakerPaysIssuer).to_json()
        },
        quality: Amount.from_quality(node.RootIndex),
        index: node.RootIndex
      };

      books[book_key(book)] = book;

//      console.log(JSON.stringify(node, undefined, 2));
    });
github ripple / rippled / bin / rlint.js View on Github external
dir_nodes.forEach(function (node) {
      var book = {
        taker_gets: {
            currency: UInt160.from_generic(node.TakerGetsCurrency).to_json(),
            issuer: UInt160.from_generic(node.TakerGetsIssuer).to_json()
          },
        taker_pays: {
          currency: UInt160.from_generic(node.TakerPaysCurrency).to_json(),
          issuer: UInt160.from_generic(node.TakerPaysIssuer).to_json()
        },
        quality: Amount.from_quality(node.RootIndex),
        index: node.RootIndex
      };

      books[book_key(book)] = book;

//      console.log(JSON.stringify(node, undefined, 2));
    });
github ripple / rippled / bin / rlint.js View on Github external
dir_nodes.forEach(function (node) {
      var book = {
        taker_gets: {
            currency: UInt160.from_generic(node.TakerGetsCurrency).to_json(),
            issuer: UInt160.from_generic(node.TakerGetsIssuer).to_json()
          },
        taker_pays: {
          currency: UInt160.from_generic(node.TakerPaysCurrency).to_json(),
          issuer: UInt160.from_generic(node.TakerPaysIssuer).to_json()
        },
        quality: Amount.from_quality(node.RootIndex),
        index: node.RootIndex
      };

      books[book_key(book)] = book;

//      console.log(JSON.stringify(node, undefined, 2));
    });