mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-25 06:05:51 +00:00
Start moving files into their final places
This commit is contained in:
26
content/_code-samples/checks/js/getChecks.js
Normal file
26
content/_code-samples/checks/js/getChecks.js
Normal 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)
|
||||
Reference in New Issue
Block a user