mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 12:45:50 +00:00
* edit Client * fix TS issues + tests * minor edits * rename ClientBroadcast -> BroadcastClient
16 lines
443 B
TypeScript
16 lines
443 B
TypeScript
import {Client} from '../../dist/npm'
|
|
|
|
const client = new Client('wss://s.altnet.rippletest.net:51233')
|
|
|
|
getTransaction()
|
|
|
|
async function getTransaction() {
|
|
await client.connect()
|
|
const ledger = await client.getLedger({includeTransactions: true})
|
|
console.log(ledger)
|
|
const tx = await client.getTransaction(ledger.transactionHashes[0])
|
|
console.log(tx)
|
|
console.log('deliveredAmount:', tx.outcome.deliveredAmount)
|
|
process.exit(0)
|
|
}
|