mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05: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:
39
src/models/methods/accountLines.ts
Normal file
39
src/models/methods/accountLines.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { BaseRequest, BaseResponse } from './baseMethod'
|
||||
import { LedgerIndex } from "../common"
|
||||
|
||||
interface Trustline {
|
||||
account: string
|
||||
balance: string
|
||||
currency: string
|
||||
limit: string
|
||||
limit_peer: string
|
||||
quality_in: number
|
||||
quality_out: number
|
||||
no_ripple?: boolean
|
||||
no_ripple_peer?: boolean
|
||||
authorized?: boolean
|
||||
peer_authorized?: boolean
|
||||
freeze?: boolean
|
||||
freeze_peer?: boolean
|
||||
}
|
||||
|
||||
export interface AccountLinesRequest extends BaseRequest {
|
||||
command: "account_lines"
|
||||
account: string
|
||||
ledger_hash?: string
|
||||
ledger_index?: LedgerIndex
|
||||
peer?: string
|
||||
limit?: number
|
||||
marker?: any
|
||||
}
|
||||
|
||||
export interface AccountLinesResponse extends BaseResponse {
|
||||
result: {
|
||||
account: string
|
||||
lines: Trustline[]
|
||||
ledger_current_index?: number
|
||||
ledger_index?: number
|
||||
ledger_hash?: string
|
||||
marker?: any
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user