Rename RippleAPI client to Client (#1520)

* rename RippleAPI -> XrplClient

* more renames

* move API stuff to client folder

* rename all api -> client

* fix tests

* make tests run

* fix integ tests

* fix urls

* fix merge issues

* XrplClient -> Client

* fix merge issues

* rename xrpl-client npm symlink to xrpl-local
This commit is contained in:
Mayukha Vadari
2021-08-17 11:16:42 -07:00
parent 94066da224
commit e27e1ec368
131 changed files with 1688 additions and 1693 deletions

View File

@@ -1,16 +1,16 @@
import {RippleAPI} from '../../dist/npm'
import {Client} from '../../dist/npm'
const api = new RippleAPI({
const client = new Client({
server: 'wss://s.altnet.rippletest.net:51233'
})
getTransaction()
async function getTransaction() {
await api.connect()
const ledger = await api.getLedger({includeTransactions: true})
await client.connect()
const ledger = await client.getLedger({includeTransactions: true})
console.log(ledger)
const tx = await api.getTransaction(ledger.transactionHashes[0])
const tx = await client.getTransaction(ledger.transactionHashes[0])
console.log(tx)
console.log('deliveredAmount:', tx.outcome.deliveredAmount)
process.exit(0)