mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-06-03 00:36:42 +00:00
* 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
41 lines
891 B
TypeScript
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;
|
|
};
|
|
}
|