mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 15:45:48 +00:00
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
This commit is contained in:
28
src/models/methods/gatewayBalances.ts
Normal file
28
src/models/methods/gatewayBalances.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user