You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ledger.d.ts 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { LedgerIndex } from '../common';
  2. import { Ledger } from '../ledger';
  3. import { Transaction, TransactionAndMetadata } from '../transactions';
  4. import { TransactionMetadata } from '../transactions/metadata';
  5. import { BaseRequest, BaseResponse } from './baseMethod';
  6. export interface LedgerRequest extends BaseRequest {
  7. command: 'ledger';
  8. ledger_hash?: string;
  9. ledger_index?: LedgerIndex;
  10. full?: boolean;
  11. accounts?: boolean;
  12. transactions?: boolean;
  13. expand?: boolean;
  14. owner_funds?: boolean;
  15. binary?: boolean;
  16. queue?: boolean;
  17. }
  18. interface ModifiedMetadata extends TransactionMetadata {
  19. owner_funds: string;
  20. }
  21. interface ModifiedOfferCreateTransaction {
  22. transaction: Transaction;
  23. metadata: ModifiedMetadata;
  24. }
  25. interface LedgerQueueData {
  26. account: string;
  27. tx: TransactionAndMetadata | ModifiedOfferCreateTransaction | {
  28. tx_blob: string;
  29. };
  30. retries_remaining: number;
  31. preflight_result: string;
  32. last_result?: string;
  33. auth_change?: boolean;
  34. fee?: string;
  35. fee_level?: string;
  36. max_spend_drops?: string;
  37. }
  38. interface BinaryLedger extends Omit<Omit<Ledger, 'transactions'>, 'accountState'> {
  39. accountState?: string[];
  40. transactions?: string[];
  41. }
  42. export interface LedgerResponse extends BaseResponse {
  43. result: {
  44. ledger: Ledger | BinaryLedger;
  45. ledger_hash: string;
  46. ledger_index: number;
  47. queue_data?: Array<LedgerQueueData | string>;
  48. validated?: boolean;
  49. };
  50. }
  51. export {};
  52. //# sourceMappingURL=ledger.d.ts.map