Files
xahau.js/src/models/methods/gatewayBalances.ts
Mayukha Vadari 68ac32fc06 Defines TypeScript types for rippled account method requests & responses (#1498)
* account_channels

* account_currencies

* account_info

* account_lines

* account_objects

* account_offers

* account_tx

* gateway_balances

* no ripple check

* respond to comments

* export methods

* fix typos

* respond to comments

* edit BaseResponse to be more specific
2021-10-04 14:10:07 -04:00

29 lines
696 B
TypeScript

import { LedgerIndex } from '../common'
import { BaseRequest, BaseResponse } from './baseMethod';
export interface GatewayBalancesRequest extends BaseRequest {
command: "gateway_balances"
account: string
strict?: boolean
hotwallet: string | string[]
ledger_hash?: string
ledger_index?: LedgerIndex
}
interface Balance {
currency: string
value: string
}
export interface GatewayBalancesResponse extends BaseResponse {
result: {
account: string
obligations?: {[currency: string]: string}
balances?: {[address: string]: Balance[]}
assets?: {[address: string]: Balance[]}
ledger_hash?: string
ledger_current_index?: number
ledger_index?: number
}
}