Checks tutorials: 1st draft done

This commit is contained in:
mDuo13
2018-04-02 18:20:59 -07:00
parent aaf44e664c
commit 1832697701
38 changed files with 1382 additions and 88 deletions

View File

@@ -0,0 +1,26 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const account_objects_request = {
command: "account_objects",
account: "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
ledger_index: "validated",
type: "check"
}
return api.connection.request(account_objects_request)
}).then(response => {
console.log("account_objects response:", response)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)