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.

serverInfo.d.ts 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import { BaseRequest, BaseResponse } from './baseMethod';
  2. export interface ServerInfoRequest extends BaseRequest {
  3. command: 'server_info';
  4. }
  5. export type ServerState = 'disconnected' | 'connected' | 'syncing' | 'tracking' | 'full' | 'validating' | 'proposing';
  6. export interface StateAccounting {
  7. duration_us: string;
  8. transitions: number;
  9. }
  10. export interface JobType {
  11. job_type: string;
  12. per_second: number;
  13. peak_time?: number;
  14. avg_time?: number;
  15. in_progress?: number;
  16. }
  17. export type StateAccountingFinal = Record<Exclude<ServerState, 'validating' | 'proposing'>, StateAccounting>;
  18. export interface ServerInfoResponse extends BaseResponse {
  19. result: {
  20. info: {
  21. amendment_blocked?: boolean;
  22. build_version: string;
  23. closed_ledger?: {
  24. age: number;
  25. base_fee_xrp: number;
  26. hash: string;
  27. reserve_base_xrp: number;
  28. reserve_inc_xrp: number;
  29. seq: number;
  30. };
  31. complete_ledgers: string;
  32. hostid: string;
  33. io_latency_ms: number;
  34. jq_trans_overflow: string;
  35. last_close: {
  36. converge_time_s: number;
  37. proposers: number;
  38. };
  39. load?: {
  40. job_types: JobType[];
  41. threads: number;
  42. };
  43. load_factor?: number;
  44. load_factor_local?: number;
  45. load_factor_net?: number;
  46. load_factor_cluster?: number;
  47. load_factor_fee_escalation?: number;
  48. load_factor_fee_queue?: number;
  49. load_factor_server?: number;
  50. peer_disconnects?: string;
  51. peer_disconnects_resources?: string;
  52. network_ledger?: 'waiting';
  53. peers: number;
  54. pubkey_node: string;
  55. pubkey_validator?: string;
  56. server_state: ServerState;
  57. server_state_duration_us: string;
  58. state_accounting: StateAccountingFinal;
  59. time: string;
  60. uptime: number;
  61. validated_ledger?: {
  62. age: number;
  63. base_fee_xrp: number;
  64. hash: string;
  65. reserve_base_xrp: number;
  66. reserve_inc_xrp: number;
  67. seq: number;
  68. };
  69. validation_quorum: number;
  70. validator_list_expires?: string;
  71. validator_list?: {
  72. count: number;
  73. expiration: 'never' | 'unknown' | string;
  74. status: 'active' | 'expired' | 'unknown';
  75. };
  76. };
  77. };
  78. }
  79. //# sourceMappingURL=serverInfo.d.ts.map