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:
Mayukha Vadari
2021-08-09 14:36:48 -07:00
parent 0886af33fd
commit 68ac32fc06
14 changed files with 402 additions and 2 deletions

View 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
}
}