chia-agent 14.0.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +252 -3
  2. package/LICENSE +1 -1
  3. package/README.md +7 -5
  4. package/agent/index.d.ts +1 -1
  5. package/api/chia/consensus/block_record.d.ts +1 -32
  6. package/api/chia/consensus/blockchain.d.ts +2 -1
  7. package/api/chia/consensus/cost_calculator.d.ts +1 -1
  8. package/api/chia/data_layer/data_layer_util.d.ts +16 -16
  9. package/api/chia/data_layer/data_layer_wallet.d.ts +4 -3
  10. package/api/chia/farmer/farmer.d.ts +1 -1
  11. package/api/chia/full_node/signage_point.d.ts +1 -1
  12. package/api/chia/harvester/harvester.d.ts +1 -1
  13. package/api/chia/plot-sync/receiver.d.ts +2 -2
  14. package/api/chia/plotters/bladebit.d.ts +1 -1
  15. package/api/chia/plotters/chiapos.d.ts +1 -1
  16. package/api/chia/plotters/maxmax.d.ts +1 -1
  17. package/api/chia/plotting/util.d.ts +3 -3
  18. package/api/chia/pools/pool_config.d.ts +1 -1
  19. package/api/chia/pools/pool_wallet_info.d.ts +2 -4
  20. package/api/chia/protocols/farmer_protocol.d.ts +8 -8
  21. package/api/chia/protocols/harvester_protocol.d.ts +1 -1
  22. package/api/chia/protocols/pool_protocol.d.ts +13 -13
  23. package/api/chia/rpc/util.d.ts +14 -0
  24. package/api/chia/rpc/wallet_request_types.d.ts +46 -3
  25. package/api/chia/server/outbound_message.d.ts +1 -1
  26. package/api/chia/timelord/types.d.ts +1 -1
  27. package/api/chia/types/_python_types_.d.ts +22 -22
  28. package/api/chia/types/blockchain_format/classgroup.d.ts +1 -4
  29. package/api/chia/types/blockchain_format/coin.d.ts +1 -11
  30. package/api/chia/types/blockchain_format/foliage.d.ts +1 -35
  31. package/api/chia/types/blockchain_format/pool_target.d.ts +1 -6
  32. package/api/chia/types/blockchain_format/program.d.ts +1 -1
  33. package/api/chia/types/blockchain_format/proof_of_space.d.ts +1 -10
  34. package/api/chia/types/blockchain_format/reward_chain_block.d.ts +1 -30
  35. package/api/chia/types/blockchain_format/sized_bytes.d.ts +7 -7
  36. package/api/chia/types/blockchain_format/slots.d.ts +1 -24
  37. package/api/chia/types/blockchain_format/sub_epoch_summary.d.ts +1 -9
  38. package/api/chia/types/blockchain_format/vdf.d.ts +1 -13
  39. package/api/chia/types/clvm_cost.d.ts +1 -1
  40. package/api/chia/types/coin_record.d.ts +2 -2
  41. package/api/chia/types/coin_spend.d.ts +3 -8
  42. package/api/chia/types/condition_opcode.d.ts +1 -1
  43. package/api/chia/types/condition_with_args.d.ts +1 -1
  44. package/api/chia/types/end_of_slot_bundle.d.ts +1 -8
  45. package/api/chia/types/full_block.d.ts +1 -20
  46. package/api/chia/types/mempool_item.d.ts +3 -3
  47. package/api/chia/types/mojos.d.ts +1 -1
  48. package/api/chia/types/signing_mode.d.ts +6 -6
  49. package/api/chia/types/spend_bundle.d.ts +1 -1
  50. package/api/chia/types/spend_bundle_condition.d.ts +1 -26
  51. package/api/chia/types/unfinished_block.d.ts +1 -0
  52. package/api/chia/types/unfinished_header_block.d.ts +1 -1
  53. package/api/chia/util/keychain.d.ts +2 -2
  54. package/api/chia/util/misc.d.ts +1 -1
  55. package/api/chia/wallet/cat_wallet/cat_constants.d.ts +1 -1
  56. package/api/chia/wallet/conditions.d.ts +2 -2
  57. package/api/chia/wallet/dao_wallet/dao_info.d.ts +5 -5
  58. package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +3 -3
  59. package/api/chia/wallet/lineage_proof.d.ts +1 -1
  60. package/api/chia/wallet/nft_wallet/nft_info.d.ts +1 -1
  61. package/api/chia/wallet/notification_store.d.ts +1 -1
  62. package/api/chia/wallet/puzzle_drivers.d.ts +2 -2
  63. package/api/chia/wallet/puzzles/clawback/metadata.d.ts +2 -2
  64. package/api/chia/wallet/signer_protocol.d.ts +54 -0
  65. package/api/chia/wallet/signer_protocol.js +2 -0
  66. package/api/chia/wallet/trade_record.d.ts +3 -3
  67. package/api/chia/wallet/transaction_record.d.ts +4 -4
  68. package/api/chia/wallet/util/quality_filter.d.ts +5 -5
  69. package/api/chia/wallet/util/tx_config.d.ts +4 -11
  70. package/api/chia/wallet/util/wallet_types.d.ts +1 -1
  71. package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +2 -2
  72. package/api/chia/wallet/vc_wallet/vc_store.d.ts +1 -1
  73. package/api/chia/wallet/wallet_coin_record.d.ts +2 -2
  74. package/api/chia/wallet/wallet_coin_store.d.ts +1 -1
  75. package/api/chia/wallet/wallet_info.d.ts +2 -2
  76. package/api/chia/wallet/wallet_node.d.ts +1 -1
  77. package/api/chia_rs/chia-bls/public_key.d.ts +2 -0
  78. package/api/chia_rs/chia-bls/public_key.js +2 -0
  79. package/api/chia_rs/chia-consensus/gen/owned_conditions.d.ts +36 -0
  80. package/api/chia_rs/chia-consensus/gen/owned_conditions.js +2 -0
  81. package/api/chia_rs/chia-protocol/block_record.d.ts +32 -0
  82. package/api/chia_rs/chia-protocol/block_record.js +2 -0
  83. package/api/chia_rs/chia-protocol/classgroup.d.ts +4 -0
  84. package/api/chia_rs/chia-protocol/classgroup.js +2 -0
  85. package/api/chia_rs/chia-protocol/coin.d.ts +7 -0
  86. package/api/chia_rs/chia-protocol/coin.js +2 -0
  87. package/api/chia_rs/chia-protocol/coin_spend.d.ts +7 -0
  88. package/api/chia_rs/chia-protocol/coin_spend.js +2 -0
  89. package/api/chia_rs/chia-protocol/end_of_sub_slot_bundle.d.ts +8 -0
  90. package/api/chia_rs/chia-protocol/end_of_sub_slot_bundle.js +2 -0
  91. package/api/chia_rs/chia-protocol/foliage.d.ts +35 -0
  92. package/api/chia_rs/chia-protocol/foliage.js +2 -0
  93. package/api/chia_rs/chia-protocol/fullblock.d.ts +20 -0
  94. package/api/chia_rs/chia-protocol/fullblock.js +2 -0
  95. package/api/chia_rs/chia-protocol/pool_target.d.ts +6 -0
  96. package/api/chia_rs/chia-protocol/pool_target.js +2 -0
  97. package/api/chia_rs/chia-protocol/program.d.ts +2 -0
  98. package/api/chia_rs/chia-protocol/program.js +2 -0
  99. package/api/chia_rs/chia-protocol/proof_of_space.d.ts +10 -0
  100. package/api/chia_rs/chia-protocol/proof_of_space.js +2 -0
  101. package/api/chia_rs/chia-protocol/reward_chain_block.d.ts +30 -0
  102. package/api/chia_rs/chia-protocol/reward_chain_block.js +2 -0
  103. package/api/chia_rs/chia-protocol/slots.d.ts +24 -0
  104. package/api/chia_rs/chia-protocol/slots.js +2 -0
  105. package/api/chia_rs/chia-protocol/sub_epoch_summary.d.ts +9 -0
  106. package/api/chia_rs/chia-protocol/sub_epoch_summary.js +2 -0
  107. package/api/chia_rs/chia-protocol/unfinished_block.d.ts +17 -0
  108. package/api/chia_rs/chia-protocol/unfinished_block.js +2 -0
  109. package/api/chia_rs/chia-protocol/vdf.d.ts +13 -0
  110. package/api/chia_rs/chia-protocol/vdf.js +2 -0
  111. package/api/{chia/pool/store.d.ts → pool-reference/pool/record.d.ts} +5 -5
  112. package/api/pool-reference/pool/record.js +2 -0
  113. package/api/rpc/common/index.d.ts +34 -24
  114. package/api/rpc/common/index.js +8 -1
  115. package/api/rpc/crawler/index.d.ts +10 -10
  116. package/api/rpc/data_layer/index.d.ts +208 -134
  117. package/api/rpc/data_layer/index.js +23 -2
  118. package/api/rpc/farmer/index.d.ts +52 -55
  119. package/api/rpc/full_node/index.d.ts +140 -154
  120. package/api/rpc/full_node/index.js +2 -9
  121. package/api/rpc/harvester/index.d.ts +31 -34
  122. package/api/rpc/index.d.ts +7 -7
  123. package/api/rpc/index.js +13 -9
  124. package/api/rpc/pool/index.d.ts +13 -13
  125. package/api/rpc/wallet/index.d.ts +747 -641
  126. package/api/rpc/wallet/index.js +27 -20
  127. package/api/types.d.ts +4 -3
  128. package/api/types.js +2 -1
  129. package/api/ws/chia_plots_create/index.d.ts +7 -7
  130. package/api/ws/crawler/index.d.ts +9 -9
  131. package/api/ws/daemon/index.d.ts +198 -166
  132. package/api/ws/daemon/index.js +17 -3
  133. package/api/ws/farmer/index.d.ts +34 -34
  134. package/api/ws/full_node/index.d.ts +28 -17
  135. package/api/ws/full_node/index.js +14 -1
  136. package/api/ws/harvester/index.d.ts +19 -19
  137. package/api/ws/index.d.ts +3 -3
  138. package/api/ws/index.js +5 -2
  139. package/api/ws/timelord/index.d.ts +14 -14
  140. package/api/ws/wallet/index.d.ts +22 -22
  141. package/bin/cli.js +3 -3
  142. package/config/index.d.ts +1 -1
  143. package/config/index.js +3 -3
  144. package/daemon/connection.js +9 -10
  145. package/daemon/index.d.ts +6 -6
  146. package/daemon/index.js +21 -21
  147. package/index.js +5 -1
  148. package/logger.d.ts +3 -3
  149. package/package.json +3 -3
  150. package/rpc/index.d.ts +6 -4
  151. package/rpc/index.js +29 -29
  152. package/api/chia/types/blockchain_format/serialized_program.d.ts +0 -2
  153. /package/api/chia/{pool/store.js → rpc/util.js} +0 -0
  154. /package/api/chia/types/{blockchain_format/serialized_program.js → unfinished_block.js} +0 -0
@@ -0,0 +1,10 @@
1
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
2
+ import { bytes, G1Element, Optional, uint8 } from "../../chia/types/_python_types_";
3
+ export type ProofOfSpace = {
4
+ challenge: bytes32;
5
+ pool_public_key: Optional<G1Element>;
6
+ pool_contract_puzzle_hash: Optional<bytes32>;
7
+ plot_public_key: G1Element;
8
+ size: uint8;
9
+ proof: bytes;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ import { bool, G2Element, Optional, uint128, uint32, uint8 } from "../../chia/types/_python_types_";
2
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
3
+ import { ProofOfSpace } from "./proof_of_space";
4
+ import { VDFInfo } from "./vdf";
5
+ export type RewardChainBlockUnfinished = {
6
+ total_iters: uint128;
7
+ signage_point_index: uint8;
8
+ pos_ss_cc_challenge_hash: bytes32;
9
+ proof_of_space: ProofOfSpace;
10
+ challenge_chain_sp_vdf: Optional<VDFInfo>;
11
+ challenge_chain_sp_signature: G2Element;
12
+ reward_chain_sp_vdf: Optional<VDFInfo>;
13
+ reward_chain_sp_signature: G2Element;
14
+ };
15
+ export type RewardChainBlock = {
16
+ weight: uint128;
17
+ height: uint32;
18
+ total_iters: uint128;
19
+ signage_point_index: uint8;
20
+ pos_ss_cc_challenge_hash: bytes32;
21
+ proof_of_space: ProofOfSpace;
22
+ challenge_chain_sp_vdf: Optional<VDFInfo>;
23
+ challenge_chain_sp_signature: G2Element;
24
+ challenge_chain_ip_vdf: VDFInfo;
25
+ reward_chain_sp_vdf: Optional<VDFInfo>;
26
+ reward_chain_sp_signature: G2Element;
27
+ reward_chain_ip_vdf: VDFInfo;
28
+ infused_challenge_chain_ip_vdf: Optional<VDFInfo>;
29
+ is_transaction_block: bool;
30
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { Optional, uint64, uint8 } from "../../chia/types/_python_types_";
2
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
3
+ import { VDFInfo, VDFProof } from "./vdf";
4
+ export type ChallengeChainSubSlot = {
5
+ challenge_chain_end_of_slot_vdf: VDFInfo;
6
+ infused_challenge_chain_sub_slot_hash: Optional<bytes32>;
7
+ subepoch_summary_hash: Optional<bytes32>;
8
+ new_sub_slot_iters: Optional<uint64>;
9
+ new_difficulty: Optional<uint64>;
10
+ };
11
+ export type InfusedChallengeChainSubSlot = {
12
+ infused_challenge_chain_end_of_slot_vdf: VDFInfo;
13
+ };
14
+ export type RewardChainSubSlot = {
15
+ end_of_slot_vdf: VDFInfo;
16
+ challenge_chain_sub_slot_hash: bytes32;
17
+ infused_challenge_chain_sub_slot_hash: Optional<bytes32>;
18
+ deficit: uint8;
19
+ };
20
+ export type SubSlotProofs = {
21
+ challenge_chain_slot_proof: VDFProof;
22
+ infused_challenge_chain_slot_proof: Optional<VDFProof>;
23
+ reward_chain_slot_proof: VDFProof;
24
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
2
+ import { Optional, uint64, uint8 } from "../../chia/types/_python_types_";
3
+ export type SubEpochSummary = {
4
+ prev_subepoch_summary_hash: bytes32;
5
+ reward_chain_hash: bytes32;
6
+ num_blocks_overflow: uint8;
7
+ new_difficulty: Optional<uint64>;
8
+ new_sub_slot_iters: Optional<uint64>;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { Optional, uint32 } from "../../chia/types/_python_types_";
2
+ import { VDFProof } from "./vdf";
3
+ import { Foliage, FoliageTransactionBlock, TransactionsInfo } from "./foliage";
4
+ import { RewardChainBlockUnfinished } from "./reward_chain_block";
5
+ import { EndOfSubSlotBundle } from "./end_of_sub_slot_bundle";
6
+ import { Program } from "./program";
7
+ export type UnfinishedBlock = {
8
+ finished_sub_slots: EndOfSubSlotBundle[];
9
+ reward_chain_block: RewardChainBlockUnfinished;
10
+ challenge_chain_sp_proof: Optional<VDFProof>;
11
+ reward_chain_sp_proof: Optional<VDFProof>;
12
+ foliage: Foliage;
13
+ foliage_transaction_block: Optional<FoliageTransactionBlock>;
14
+ transactions_info: Optional<TransactionsInfo>;
15
+ transactions_generator: Optional<Program>;
16
+ transactions_generator_ref_list: uint32[];
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
2
+ import { bool, bytes, uint64, uint8 } from "../../chia/types/_python_types_";
3
+ import { ClassgroupElement } from "./classgroup";
4
+ export type VDFInfo = {
5
+ challenge: bytes32;
6
+ number_of_iterations: uint64;
7
+ output: ClassgroupElement;
8
+ };
9
+ export type VDFProof = {
10
+ witness_type: uint8;
11
+ witness: bytes;
12
+ normalized_to_identity: bool;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
- import { bool, G1Element, str, uint64 } from "../types/_python_types_";
3
- import { CoinSpend } from "../types/coin_spend";
4
- import { PoolState } from "../pools/pool_wallet_info";
5
- export declare type FarmerRecord = {
1
+ import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
2
+ import { bool, G1Element, str, uint64 } from "../../chia/types/_python_types_";
3
+ import { CoinSpend } from "../../chia/types/coin_spend";
4
+ import { PoolState } from "../../chia/pools/pool_wallet_info";
5
+ export type FarmerRecord = {
6
6
  launcher_id: bytes32;
7
7
  p2_singleton_puzzle_hash: bytes32;
8
8
  delay_time: uint64;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,58 +4,68 @@ import { GetMessageType, ResType, TConnectionGeneral } from "../../types";
4
4
  import { TConnectionFullNode } from "../../ws/full_node/index";
5
5
  import { TDaemon } from "../../../daemon/index";
6
6
  export declare const chia_common_service = "";
7
- export declare type chia_common_service = typeof chia_common_service;
7
+ export type chia_common_service = typeof chia_common_service;
8
+ export declare const get_network_info_command = "get_network_info";
9
+ export type get_network_info_command = typeof get_network_info_command;
10
+ export type TGetNetworkInfoResponse = {
11
+ success: True;
12
+ network_name: str;
13
+ network_prefix: str;
14
+ genesis_challenge: str;
15
+ };
16
+ export type WsGetNetworkInfoMessage = GetMessageType<chia_common_service, get_network_info_command, TGetNetworkInfoResponse>;
17
+ export declare function get_network_info<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetNetworkInfoResponse, WsGetNetworkInfoMessage>>;
8
18
  export declare const get_connections_command = "get_connections";
9
- export declare type get_connections_command = typeof get_connections_command;
10
- export declare type TGetConnectionsRequest = {
19
+ export type get_connections_command = typeof get_connections_command;
20
+ export type TGetConnectionsRequest = {
11
21
  node_type?: str;
12
22
  };
13
- export declare type TGetConnectionsResponse = {
23
+ export type TGetConnectionsResponse = {
14
24
  connections: TConnectionGeneral[] | TConnectionFullNode[];
15
25
  };
16
- export declare type WsGetConnectionsMessage = GetMessageType<chia_common_service, get_connections_command, TGetConnectionsResponse>;
26
+ export type WsGetConnectionsMessage = GetMessageType<chia_common_service, get_connections_command, TGetConnectionsResponse>;
17
27
  export declare function get_connections<T extends TRPCAgent | TDaemon>(agent: T, params: TGetConnectionsRequest): Promise<ResType<T, TGetConnectionsResponse, WsGetConnectionsMessage>>;
18
28
  export declare const open_connection_command = "open_connection";
19
- export declare type open_connection_command = typeof open_connection_command;
20
- export declare type TOpenConnectionRequest = {
29
+ export type open_connection_command = typeof open_connection_command;
30
+ export type TOpenConnectionRequest = {
21
31
  host: str;
22
32
  port: uint16;
23
33
  };
24
- export declare type TOpenConnectionResponse = {
34
+ export type TOpenConnectionResponse = {
25
35
  success: False;
26
36
  error: str;
27
37
  } | {
28
38
  success: True;
29
39
  };
30
- export declare type WsOpenConnectionMessage = GetMessageType<chia_common_service, open_connection_command, TOpenConnectionResponse>;
40
+ export type WsOpenConnectionMessage = GetMessageType<chia_common_service, open_connection_command, TOpenConnectionResponse>;
31
41
  export declare function open_connection<T extends TRPCAgent | TDaemon>(agent: T, params: TOpenConnectionRequest): Promise<ResType<T, TOpenConnectionResponse, WsOpenConnectionMessage>>;
32
42
  export declare const close_connection_command = "close_connection";
33
- export declare type close_connection_command = typeof close_connection_command;
34
- export declare type TCloseConnectionRequest = {
43
+ export type close_connection_command = typeof close_connection_command;
44
+ export type TCloseConnectionRequest = {
35
45
  node_id: str;
36
46
  };
37
- export declare type TCloseConnectionResponse = {};
38
- export declare type WsCloseConnectionMessage = GetMessageType<chia_common_service, close_connection_command, TCloseConnectionResponse>;
47
+ export type TCloseConnectionResponse = Record<string, never>;
48
+ export type WsCloseConnectionMessage = GetMessageType<chia_common_service, close_connection_command, TCloseConnectionResponse>;
39
49
  export declare function close_connection<T extends TRPCAgent | TDaemon>(agent: T, params: TCloseConnectionRequest): Promise<ResType<T, TCloseConnectionResponse, WsCloseConnectionMessage>>;
40
50
  export declare const stop_node_command = "stop_node";
41
- export declare type stop_node_command = typeof stop_node_command;
42
- export declare type TStopNodeResponse = {};
43
- export declare type WsStopNodeMessage = GetMessageType<chia_common_service, stop_node_command, TStopNodeResponse>;
51
+ export type stop_node_command = typeof stop_node_command;
52
+ export type TStopNodeResponse = Record<string, never>;
53
+ export type WsStopNodeMessage = GetMessageType<chia_common_service, stop_node_command, TStopNodeResponse>;
44
54
  export declare function stop_node<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TStopNodeResponse, WsStopNodeMessage>>;
45
55
  export declare const get_routes_command = "get_routes";
46
- export declare type get_routes_command = typeof get_routes_command;
47
- export declare type TGetRoutesResponse = {
56
+ export type get_routes_command = typeof get_routes_command;
57
+ export type TGetRoutesResponse = {
48
58
  success: True;
49
59
  routes: str[];
50
60
  };
51
- export declare type WsGetRoutesMessage = GetMessageType<chia_common_service, get_routes_command, TGetRoutesResponse>;
61
+ export type WsGetRoutesMessage = GetMessageType<chia_common_service, get_routes_command, TGetRoutesResponse>;
52
62
  export declare function get_routes<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetRoutesResponse, WsGetRoutesMessage>>;
53
63
  export declare const healthz_command = "healthz";
54
- export declare type healthz_command = typeof healthz_command;
55
- export declare type THealthzResponse = {
64
+ export type healthz_command = typeof healthz_command;
65
+ export type THealthzResponse = {
56
66
  success: True;
57
67
  };
58
- export declare type WsHealthzMessage = GetMessageType<chia_common_service, healthz_command, THealthzResponse>;
68
+ export type WsHealthzMessage = GetMessageType<chia_common_service, healthz_command, THealthzResponse>;
59
69
  export declare function healthz<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, THealthzResponse, WsHealthzMessage>>;
60
- export declare type RpcCommonMessage = TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse | THealthzResponse;
61
- export declare type RpcCommonMessageOnWs = WsGetConnectionsMessage | WsOpenConnectionMessage | WsCloseConnectionMessage | WsStopNodeMessage | WsGetRoutesMessage | WsHealthzMessage;
70
+ export type RpcCommonMessage = TGetNetworkInfoResponse | TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse | THealthzResponse;
71
+ export type RpcCommonMessageOnWs = WsGetNetworkInfoMessage | WsGetConnectionsMessage | WsOpenConnectionMessage | WsCloseConnectionMessage | WsStopNodeMessage | WsGetRoutesMessage | WsHealthzMessage;
@@ -9,8 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.healthz = exports.healthz_command = exports.get_routes = exports.get_routes_command = exports.stop_node = exports.stop_node_command = exports.close_connection = exports.close_connection_command = exports.open_connection = exports.open_connection_command = exports.get_connections = exports.get_connections_command = exports.chia_common_service = void 0;
12
+ exports.healthz = exports.healthz_command = exports.get_routes = exports.get_routes_command = exports.stop_node = exports.stop_node_command = exports.close_connection = exports.close_connection_command = exports.open_connection = exports.open_connection_command = exports.get_connections = exports.get_connections_command = exports.get_network_info = exports.get_network_info_command = exports.chia_common_service = void 0;
13
13
  exports.chia_common_service = "";
14
+ exports.get_network_info_command = "get_network_info";
15
+ function get_network_info(agent) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ return agent.sendMessage(exports.chia_common_service, exports.get_network_info_command);
18
+ });
19
+ }
20
+ exports.get_network_info = get_network_info;
14
21
  exports.get_connections_command = "get_connections";
15
22
  function get_connections(agent, params) {
16
23
  return __awaiter(this, void 0, void 0, function* () {
@@ -4,10 +4,10 @@ import { TRPCAgent } from "../../../rpc/index";
4
4
  import { TDaemon } from "../../../daemon/index";
5
5
  import { GetMessageType, ResType } from "../../types";
6
6
  export declare const chia_crawler_service = "chia_crawler";
7
- export declare type chia_crawler_service = typeof chia_crawler_service;
7
+ export type chia_crawler_service = typeof chia_crawler_service;
8
8
  export declare const get_peer_counts_command = "get_peer_counts";
9
- export declare type get_peer_counts_command = typeof get_peer_counts_command;
10
- export declare type TGetPeerCountsResponse = {
9
+ export type get_peer_counts_command = typeof get_peer_counts_command;
10
+ export type TGetPeerCountsResponse = {
11
11
  peer_counts: {
12
12
  total_last_5_days: int;
13
13
  reliable_nodes: int;
@@ -16,20 +16,20 @@ export declare type TGetPeerCountsResponse = {
16
16
  versions: Record<str, int>;
17
17
  };
18
18
  };
19
- export declare type WsGetPeerCountsMessage = GetMessageType<chia_crawler_service, get_peer_counts_command, TGetPeerCountsResponse>;
19
+ export type WsGetPeerCountsMessage = GetMessageType<chia_crawler_service, get_peer_counts_command, TGetPeerCountsResponse>;
20
20
  export declare function get_peer_counts<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetPeerCountsResponse, WsGetPeerCountsMessage>>;
21
21
  export declare const get_ips_after_timestamp_command = "get_ips_after_timestamp";
22
- export declare type get_ips_after_timestamp_command = typeof get_ips_after_timestamp_command;
23
- export declare type TGetIpsAfterTimestampRequest = {
22
+ export type get_ips_after_timestamp_command = typeof get_ips_after_timestamp_command;
23
+ export type TGetIpsAfterTimestampRequest = {
24
24
  after: int;
25
25
  offset?: int;
26
26
  limit?: int;
27
27
  };
28
- export declare type TGetIpsAfterTimestampResponse = {
28
+ export type TGetIpsAfterTimestampResponse = {
29
29
  ips: str[];
30
30
  total: int;
31
31
  };
32
- export declare type WsGetIpsAfterTimestampMessage = GetMessageType<chia_crawler_service, get_ips_after_timestamp_command, TGetIpsAfterTimestampResponse>;
32
+ export type WsGetIpsAfterTimestampMessage = GetMessageType<chia_crawler_service, get_ips_after_timestamp_command, TGetIpsAfterTimestampResponse>;
33
33
  export declare function get_ips_after_timestamp<T extends TRPCAgent | TDaemon>(agent: T, params: TGetIpsAfterTimestampRequest): Promise<ResType<T, TGetIpsAfterTimestampResponse, WsGetIpsAfterTimestampMessage>>;
34
- export declare type RpcCrawlerMessage = TGetIpsAfterTimestampResponse | TGetPeerCountsResponse;
35
- export declare type RpcCrawlerMessageOnWs = WsGetIpsAfterTimestampMessage | WsGetPeerCountsMessage;
34
+ export type RpcCrawlerMessage = TGetIpsAfterTimestampResponse | TGetPeerCountsResponse;
35
+ export type RpcCrawlerMessageOnWs = WsGetIpsAfterTimestampMessage | WsGetPeerCountsMessage;