Files
xahau.js/src/models/methods/accountChannels.ts
Mayukha Vadari 89e319fe0a Lints src/models (#1572)
* resolve src/models/methods

* PaymentTransaction => Payment, remove empty returns

* fix common, method signatures

* fix checkCash

* handle complexity complaints

* fix jsdocs

* handle magic numbers

* finish models/transactions

* fix models/utils

* fix models/ledger

* fix ts issues

* fix tests

* fix modifiedoffercreatetransaction

* remove comments, fix additional TODO
2021-09-14 17:02:40 -04:00

41 lines
891 B
TypeScript

import { LedgerIndex } from "../common";
import { BaseRequest, BaseResponse } from "./baseMethod";
interface Channel {
account: string;
amount: string;
balance: string;
channel_id: string;
destination_account: string;
settle_delay: number;
public_key?: string;
public_key_hex?: string;
expiration?: number;
cancel_after?: number;
source_tab?: number;
destination_tag?: number;
}
export interface AccountChannelsRequest extends BaseRequest {
command: "account_channels";
account: string;
destination_account?: string;
ledger_hash?: string;
ledger_index?: LedgerIndex;
limit: number;
marker?: unknown;
}
export interface AccountChannelsResponse extends BaseResponse {
result: {
account: string;
channels: Channel[];
ledger_hash: string;
ledger_index: number;
validated?: boolean;
limit?: number;
marker?: unknown;
};
}