Git Product home page Git Product logo

ripplewebsocketmanager's Introduction

Warning

Never use your Private Key (seed, hash, whatever) when connected to public node!

RippleWebsocketManager

Wrapper to Ripple Websocket methods.

To use correctly You have to:

  • Start new instance
  • Use methods from method lists
  • Start websocket (do it in new thread - watch into Usage )

When you using data parser, you just receiving new data from que named incoming. Use incoming.Dequeue(), then parse like a normal json by for example '''["status"]'''

NugetPackageManager

Usage

using RippleType;

 static void Main(string[] args)
        {
            RippleImplementation xrp = new RippleImplementation("wss://s.altnet.rippletest.net:51233", debugger: false);
            xrp.RippleServerInfo();
            var t = new Thread(() => xrp.RippleSocketRun());
            t.Start();

            while(true)
            {
                if(xrp.incoming.Count > 0)
                {

                Console.WriteLine(xrp.incoming.Dequeue()["status"]);
                }
            }
        }

Will connect you to Ripple websocket based on Ripple Testnet. Where rippleaccount please provide your account.

Available methods

When you checking balance, or doing anything with Ripple balances, you have to use "unit" (sorry i dont know how it was called by Ripple). It is exactly counted by yourAmount * (or /) 10^6. I made little feature related with that. If you want to simply count Value use

new RippleNumbers().RippleToUnit("1.234567");
// where amount is placed with string, or to count nohumanreadableunit to Ripple:
new RippleNumbers().RippleToUnit(10000000000);
// where amount is placed with Double. 
// 
//
// WARNING: IT WASN'T UNITTESTED YOU ARE USING ON OWN RISK, PLEASE CHECK YOUR CALCULATIONS BEFORE DO ANYTHING WITH THIS CLASS !!!!
//
//

Official API RippleWebsocketManager
ping RipplePing()
tx_history RippleTXHistory()
server_state RippleServerState()
server_info RippleServerInfo()
tx RippleTX()
account_tx RippleAccountTX()
transaction_entry RippleTransactionEntry()
account_currencies RippleAccountCurrencies()
account_offers RippleAccountOffers()
account_lines RippleAccountLines()
ledger_entry RippleLedgerEntry()
ledger_current RippleLedgerCurrent()
ledger_closed RippleLedgerClosed()
ledger RippleLedger()
subscribe RippleSubscribe()
unsubscribe RippleUnSubscribe()
sign_and_submit RippleSendTransaction()
account_info RippleAccountInfo()

ripplewebsocketmanager's People

Contributors

kamilk91 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.