mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05:48 +00:00
Types cleanup + more API methods onto new request method (#857)
* major types cleanup, more formatted api methods onto new request method - getPaymentChannel() now uses this.request() - getSettings() now uses this.request() - getLedger() now uses this.request() - transaction types cleaned up a bit, but still some work left to do
This commit is contained in:
committed by
Elliot Lee
parent
c175e3f58e
commit
187154a2b0
@@ -49,7 +49,9 @@ import {
|
||||
AccountInfoRequest, AccountInfoResponse,
|
||||
AccountLinesRequest, AccountLinesResponse,
|
||||
BookOffersRequest, BookOffersResponse,
|
||||
GatewayBalancesRequest, GatewayBalancesResponse
|
||||
GatewayBalancesRequest, GatewayBalancesResponse,
|
||||
LedgerRequest, LedgerResponse,
|
||||
LedgerEntryRequest, LedgerEntryResponse
|
||||
} from './common/types/commands'
|
||||
|
||||
|
||||
@@ -154,6 +156,10 @@ class RippleAPI extends EventEmitter {
|
||||
Promise<BookOffersResponse>
|
||||
async _request(command: 'gateway_balances', params: GatewayBalancesRequest):
|
||||
Promise<GatewayBalancesResponse>
|
||||
async _request(command: 'ledger', params: LedgerRequest):
|
||||
Promise<LedgerResponse>
|
||||
async _request(command: 'ledger_entry', params: LedgerEntryRequest):
|
||||
Promise<LedgerEntryResponse>
|
||||
async _request(command: string, params: any = {}) {
|
||||
return this.connection.request({
|
||||
...params,
|
||||
|
||||
Reference in New Issue
Block a user