DevNullProd Posted March 27, 2019 Share Posted March 27, 2019 (edited) Dev Null Productions is pleased to announce the general release of XRBP, a rubygem providing robust, fault-tolerant access to the XRP Ledger! With XRBP, querying the network for data is as simple as four lines of code: require 'xrbp' ws = XRBP::WebSocket::Connection.new "wss://s1.ripple.com:443" ws.add_plugin :autoconnect, :command_dispatcher ws.cmd XRBP::WebSocket::Cmds::Ledger.new But this is just the tip of the iceburg! With XRBP you can query for ledgers, accounts, transactions, objects and much more. You can also query for data from ripple's Datav2 API: require 'xrbp' connection = XRBP::WebClient::Connection.new XRBP::Model::Gateway.all(:connection => connection) .each do |gw| puts "#{gw[:id]} #{gw[:names].join(",")} (#{gw[:currencies].join(",")})" end Market quotes are just a query away. Crawl the Peer2Peer network of nodes: connection = XRBP::WebClient::Connection.new connection.timeout = 3 Signal.trap("INT") { connection.force_quit! } connection.on :peer do |node, peer| puts "#{node.url} peer: #{peer.url}" end XRBP::Model::Node.crawl("wss://s1.ripple.com:51235", :connection => connection) XRBP supports configurable multi-connection strategies to automatically cycle between nodes and/or fallback to others incase of errors: ws = XRBP::WebSocket::RoundRobin.new "wss://s1.ripple.com:443", "wss://s2.ripple.com:443" ws.add_plugin :command_dispatcher ws.connect puts ws.cmd(XRBP::WebSocket::Cmds::AccountInfo.new("rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B")) puts ws.cmd(XRBP::WebSocket::Cmds::AccountInfo.new("rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq")) And there is alot more! Read the technical documentation and see the examples on github for more. Read the full release notes on our blog and followus on twitter to keep up with updates! Edited March 27, 2019 by devnullprod PunishmentOfLuxury, tulo, pucksterpete and 5 others 8 Link to comment Share on other sites More sharing options...
tulo Posted March 27, 2019 Share Posted March 27, 2019 Nice, but I won't learn another language for XRPL. JS is ****** enough . Link to comment Share on other sites More sharing options...
DevNullProd Posted March 28, 2019 Author Share Posted March 28, 2019 Come to the glory of Ruby, it is the language to rule all languages!!! Kidding! We're big fans of Ruby but also do alot of JS development and have done major projects in pretty much every major language under the sun in the past (Python, C++, C, Java, R, PHP, and so many more)! Everyone has their own features and drawbacks, and that's what's great about having them all, the developer can choose the right tool for the job! Link to comment Share on other sites More sharing options...
Rickyh89 Posted March 30, 2019 Share Posted March 30, 2019 So is this a module for ruby? Article I read said it was a tool. I didn’t download it cause seems like a module to use ruby for interacting with ledger, and I don’t use ruby. either way, it’s great! More the merrier, easier access for every dev the better. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now