chia-agent 14.5.0 → 16.0.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 (119) hide show
  1. package/CHANGELOG.md +59 -1
  2. package/README.md +34 -7
  3. package/api/chia/consensus/cost_calculator.d.ts +2 -1
  4. package/api/chia/data_layer/data_layer_util.d.ts +3 -2
  5. package/api/chia/data_layer/data_layer_wallet.d.ts +2 -14
  6. package/api/chia/data_layer/singleton_record.d.ts +15 -0
  7. package/api/chia/farmer/farmer.d.ts +2 -1
  8. package/api/chia/harvester/harvester.d.ts +4 -2
  9. package/api/chia/plot-sync/receiver.d.ts +3 -2
  10. package/api/chia/pools/pool_config.d.ts +3 -2
  11. package/api/chia/pools/pool_wallet_info.d.ts +4 -2
  12. package/api/chia/protocols/farmer_protocol.d.ts +7 -5
  13. package/api/chia/protocols/harvester_protocol.d.ts +4 -2
  14. package/api/chia/protocols/pool_protocol.d.ts +4 -2
  15. package/api/chia/rpc/util.d.ts +2 -1
  16. package/api/chia/rpc/wallet_request_types.d.ts +5 -2
  17. package/api/chia/types/_python_types_.d.ts +0 -14
  18. package/api/chia/types/clvm_cost.d.ts +1 -1
  19. package/api/chia/types/coin_record.d.ts +2 -1
  20. package/api/chia/types/mempool_item.d.ts +4 -2
  21. package/api/chia/types/mojos.d.ts +1 -1
  22. package/api/chia/types/unfinished_header_block.d.ts +2 -2
  23. package/api/chia/util/keychain.d.ts +4 -1
  24. package/api/chia/util/streamable.d.ts +2 -1
  25. package/api/chia/wallet/conditions.d.ts +2 -1
  26. package/api/chia/wallet/lineage_proof.d.ts +3 -2
  27. package/api/chia/wallet/nft_wallet/nft_info.d.ts +3 -2
  28. package/api/chia/wallet/notification_store.d.ts +3 -2
  29. package/api/chia/wallet/puzzles/clawback/metadata.d.ts +3 -2
  30. package/api/chia/wallet/signer_protocol.d.ts +3 -2
  31. package/api/chia/wallet/trade_record.d.ts +3 -2
  32. package/api/chia/wallet/transaction_record.d.ts +3 -2
  33. package/api/chia/wallet/util/quality_filter.d.ts +2 -2
  34. package/api/chia/wallet/util/tx_config.d.ts +3 -2
  35. package/api/chia/wallet/util/wallet_types.d.ts +1 -3
  36. package/api/chia/wallet/util/wallet_types.js +0 -2
  37. package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +1 -1
  38. package/api/chia/wallet/vc_wallet/vc_store.d.ts +1 -1
  39. package/api/chia/wallet/wallet_coin_record.d.ts +6 -5
  40. package/api/chia/wallet/wallet_coin_store.d.ts +2 -1
  41. package/api/chia/wallet/wallet_info.d.ts +2 -1
  42. package/api/chia/wallet/wallet_node.d.ts +1 -1
  43. package/api/chia_rs/chia-bls/lib.d.ts +4 -0
  44. package/api/chia_rs/chia-bls/public_key.d.ts +1 -2
  45. package/api/chia_rs/chia-bls/secret_key.d.ts +1 -0
  46. package/api/chia_rs/chia-bls/signature.d.ts +1 -0
  47. package/api/chia_rs/chia-consensus/gen/owned_conditions.d.ts +3 -2
  48. package/api/chia_rs/chia-protocol/block_record.d.ts +3 -2
  49. package/api/chia_rs/chia-protocol/classgroup.d.ts +1 -1
  50. package/api/chia_rs/chia-protocol/coin.d.ts +2 -2
  51. package/api/chia_rs/chia-protocol/foliage.d.ts +4 -2
  52. package/api/chia_rs/chia-protocol/fullblock.d.ts +2 -1
  53. package/api/chia_rs/chia-protocol/pool_target.d.ts +2 -2
  54. package/api/chia_rs/chia-protocol/proof_of_space.d.ts +4 -2
  55. package/api/chia_rs/chia-protocol/reward_chain_block.d.ts +4 -2
  56. package/api/chia_rs/chia-protocol/slots.d.ts +3 -2
  57. package/api/chia_rs/chia-protocol/spend_bundle.d.ts +1 -1
  58. package/api/chia_rs/chia-protocol/sub_epoch_summary.d.ts +3 -2
  59. package/api/chia_rs/chia-protocol/unfinished_block.d.ts +2 -1
  60. package/api/chia_rs/chia-protocol/vdf.d.ts +3 -2
  61. package/api/chia_rs/wheel/python/sized_bytes.d.ts +7 -0
  62. package/api/chia_rs/wheel/python/sized_ints.d.ts +11 -0
  63. package/api/pool-reference/pool/record.d.ts +4 -2
  64. package/api/rpc/common/index.d.ts +2 -1
  65. package/api/rpc/common/index.js +34 -65
  66. package/api/rpc/crawler/index.d.ts +3 -2
  67. package/api/rpc/crawler/index.js +7 -20
  68. package/api/rpc/data_layer/index.d.ts +3 -2
  69. package/api/rpc/data_layer/index.js +106 -186
  70. package/api/rpc/farmer/index.d.ts +3 -2
  71. package/api/rpc/farmer/index.js +40 -75
  72. package/api/rpc/full_node/index.d.ts +6 -5
  73. package/api/rpc/full_node/index.js +112 -196
  74. package/api/rpc/harvester/index.d.ts +2 -1
  75. package/api/rpc/harvester/index.js +25 -50
  76. package/api/rpc/index.d.ts +2 -2
  77. package/api/rpc/index.js +3 -17
  78. package/api/rpc/pool/index.d.ts +2 -1
  79. package/api/rpc/pool/index.js +18 -40
  80. package/api/rpc/wallet/index.d.ts +9 -260
  81. package/api/rpc/wallet/index.js +388 -755
  82. package/api/types.d.ts +3 -2
  83. package/api/ws/chia_plots_create/index.js +20 -32
  84. package/api/ws/crawler/index.d.ts +3 -2
  85. package/api/ws/crawler/index.js +21 -32
  86. package/api/ws/daemon/index.d.ts +3 -1
  87. package/api/ws/daemon/index.js +125 -212
  88. package/api/ws/farmer/index.d.ts +3 -2
  89. package/api/ws/farmer/index.js +112 -134
  90. package/api/ws/full_node/index.d.ts +8 -7
  91. package/api/ws/full_node/index.js +59 -76
  92. package/api/ws/harvester/index.d.ts +2 -1
  93. package/api/ws/harvester/index.js +60 -76
  94. package/api/ws/timelord/index.d.ts +3 -2
  95. package/api/ws/timelord/index.js +40 -54
  96. package/api/ws/wallet/index.d.ts +2 -1
  97. package/api/ws/wallet/index.js +72 -90
  98. package/bin/cli.js +40 -51
  99. package/config/index.js +13 -9
  100. package/daemon/connection.js +2 -2
  101. package/daemon/index.d.ts +28 -5
  102. package/daemon/index.js +262 -123
  103. package/logger.d.ts +43 -16
  104. package/logger.js +219 -49
  105. package/package.json +9 -4
  106. package/rpc/index.d.ts +4 -3
  107. package/rpc/index.js +174 -134
  108. package/api/chia/types/blockchain_format/foliage.d.ts +0 -1
  109. package/api/chia/types/blockchain_format/pool_target.d.ts +0 -1
  110. package/api/chia/types/blockchain_format/reward_chain_block.d.ts +0 -1
  111. package/api/chia/types/blockchain_format/sized_bytes.d.ts +0 -8
  112. package/api/chia/wallet/dao_wallet/dao_info.d.ts +0 -39
  113. package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +0 -35
  114. /package/api/chia/{types/blockchain_format/foliage.js → data_layer/singleton_record.js} +0 -0
  115. /package/api/{chia/types/blockchain_format/pool_target.js → chia_rs/chia-bls/lib.js} +0 -0
  116. /package/api/{chia/types/blockchain_format/reward_chain_block.js → chia_rs/chia-bls/secret_key.js} +0 -0
  117. /package/api/{chia/types/blockchain_format/sized_bytes.js → chia_rs/chia-bls/signature.js} +0 -0
  118. /package/api/{chia/wallet/dao_wallet/dao_info.js → chia_rs/wheel/python/sized_bytes.js} +0 -0
  119. /package/api/{chia/wallet/dao_wallet/dao_wallet.js → chia_rs/wheel/python/sized_ints.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## [16.0.0]
4
+ ### Breaking change
5
+ - Changed `daemon.connect()` API signature from `connect(url?, timeoutMs?)` to `connect(url?, options?)`
6
+ - All connection options are now consolidated into a single `options` parameter
7
+ - Existing code calling `connect()` without parameters remains compatible
8
+ ### Changed
9
+ - Improved logger system
10
+ - Added logger instance caching
11
+ - Added support for multiple loggers with per-instance configuration
12
+ - Added `NullWriter` for complete log suppression
13
+ - Updated `ConsoleWriter` to use proper console methods
14
+ - Added `trace` log level
15
+ - Added environment variable support: `LOG_LEVEL` and `LOG_SUPPRESS`
16
+ - Refactored API to use named loggers
17
+ - Added customizable log formatting with built-in formatters
18
+ - Auto-reconnection is now enabled by default
19
+ ### Fixed
20
+ - Fixed WebSocket message handling issues
21
+ - Added timeout handling for sent messages (default 30s)
22
+ - Fixed connection state check to use actual WebSocket readyState
23
+ - Preserved event listeners on connection close for reconnection support
24
+ - Added proper cleanup of message timeouts on response
25
+ - Fixed RPC agent to properly handle HTTP connections with explicit host/port
26
+ ### Added
27
+ - Added automatic retry/reconnection mechanism for WebSocket connection attempts
28
+ - Exponential backoff with configurable parameters
29
+ - Configurable retry parameters (maxAttempts, initialDelay, maxDelay, backoffMultiplier)
30
+ - Automatic re-subscription to services after reconnection
31
+ - Same retry configuration applies to both initial connection and reconnection
32
+ ### Internal change
33
+ - Removed `TDestination` type in favor of Writer-based approach
34
+
35
+ ## [15.0.0]
36
+ ### Breaking change
37
+ - The following Wallet RPC APIs for DAO were removed
38
+ - dao_get_proposals
39
+ - dao_create_proposal
40
+ - dao_parse_proposal
41
+ - dao_vote_on_proposal
42
+ - dao_get_treasury_balance
43
+ - dao_get_treasury_id
44
+ - dao_get_rules
45
+ - dao_close_proposal
46
+ - dao_exit_lockup
47
+ - dao_adjust_filter_level
48
+ - dao_add_funds_to_treasury
49
+ - dao_send_to_lockup
50
+ - dao_get_proposal_state
51
+ - dao_free_coins_from_finished_proposals
52
+ - DAO wallet can no longer be created
53
+ - `DAO` and `DAO_CAT` were removed from [`WalletType`](./src/api/chia/wallet/util/wallet_types.ts)
54
+ ### Internal change
55
+ - Upgraded eslint to v9
56
+ - Moved the definitions of `sized_ints` and `sized_bytes` under `chia_rs`
57
+ - Updated the minimal Node.js support to 20
58
+
3
59
  ## [14.5.0]
4
60
  ### Changed
5
61
  - Added error logs
@@ -1826,7 +1882,9 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
1826
1882
  Initial release.
1827
1883
 
1828
1884
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
1829
- [14.4.1]: https://github.com/Chia-Mine/chia-agent/compare/v14.4.0...v14.4.1
1885
+ [16.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v15.0.0...v16.0.0
1886
+ [15.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.5.0...v15.0.0
1887
+ [14.5.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.4.0...v14.5.0
1830
1888
  [14.4.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.3.3...v14.4.0
1831
1889
  [14.3.3]: https://github.com/Chia-Mine/chia-agent/compare/v14.3.2...v14.3.3
1832
1890
  [14.3.2]: https://github.com/Chia-Mine/chia-agent/compare/v14.3.1...v14.3.2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![npm version](https://badge.fury.io/js/chia-agent.svg)](https://badge.fury.io/js/chia-agent) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
3
 
4
4
  chia rpc/websocket client library for NodeJS.
5
- Supports all RPC/Websocket API available at `2.5.1`/`2.5.2` of [`chia-blockchain`](https://github.com/Chia-Network/chia-blockchain/).
5
+ Supports all RPC/Websocket API available at `2.5.3` of [`chia-blockchain`](https://github.com/Chia-Network/chia-blockchain/).
6
6
  \(If you need previous version, search for the corresponding release [here](https://github.com/Chia-Mine/chia-agent/releases)\)
7
7
 
8
8
  you can develop your own nodejs script with `chia-agent` to:
@@ -22,12 +22,12 @@ yarn add chia-agent
22
22
 
23
23
  ## Compatibility
24
24
  This code is compatible with:
25
- - [`ddd5a0cbcb7a4ebb106ee4d27692b3118b6fdc4a`](https://github.com/Chia-Network/chia-blockchain/tree/ddd5a0cbcb7a4ebb106ee4d27692b3118b6fdc4a) of [chia-blockchain 2.5.2](https://github.com/Chia-Network/chia-blockchain)
26
- - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/ddd5a0cbcb7a4ebb106ee4d27692b3118b6fdc4a...main)
27
- - [`ac72355b9220fa975bab857fe740892845017a30`](https://github.com/Chia-Network/pool-reference/tree/ac72355b9220fa975bab857fe740892845017a30) of [pool-reference](https://github.com/Chia-Network/pool-reference)
28
- - [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/ac72355b9220fa975bab857fe740892845017a30...main)
29
- - [`0b6571ea254fe22dfc692f9ef058b6a4e224a081`](https://github.com/Chia-Network/chia_rs/tree/0b6571ea254fe22dfc692f9ef058b6a4e224a081) of [chia_rs 0.18.0](https://github.com/Chia-Network/chia_rs)
30
- - [Diff to the main branch of chia_rs](https://github.com/Chia-Network/chia_rs/compare/0b6571ea254fe22dfc692f9ef058b6a4e224a081...main)
25
+ - [`51fff62b1ea26786aaf34c2084a5ff80b116a5b9`](https://github.com/Chia-Network/chia-blockchain/tree/51fff62b1ea26786aaf34c2084a5ff80b116a5b9) of [chia-blockchain 2.5.3](https://github.com/Chia-Network/chia-blockchain)
26
+ - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/51fff62b1ea26786aaf34c2084a5ff80b116a5b9...main)
27
+ - [`ef49150171cc243b09c0e5d5cb27f2249ffa3793`](https://github.com/Chia-Network/pool-reference/tree/ef49150171cc243b09c0e5d5cb27f2249ffa3793) of [pool-reference](https://github.com/Chia-Network/pool-reference)
28
+ - [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/ef49150171cc243b09c0e5d5cb27f2249ffa3793...main)
29
+ - [`86553838300185b24849b226a714600f724c02d2`](https://github.com/Chia-Network/chia_rs/tree/86553838300185b24849b226a714600f724c02d2) of [chia_rs 0.21.1](https://github.com/Chia-Network/chia_rs)
30
+ - [Diff to the main branch of chia_rs](https://github.com/Chia-Network/chia_rs/compare/86553838300185b24849b226a714600f724c02d2...main)
31
31
 
32
32
  ## API
33
33
  There are 2 kinds of APIs in chia.
@@ -113,6 +113,33 @@ setTimeout(async () => {
113
113
  */
114
114
  ```
115
115
 
116
+ ## Logging
117
+ The logger system supports multiple log levels and formatters:
118
+
119
+ ```js
120
+ const {setLogLevel, getLogger, setDefaultFormatter, simpleLogFormatter} = require("chia-agent");
121
+
122
+ // Set log level (case-insensitive)
123
+ setLogLevel("DEBUG"); // "error", "warning", "info", "debug", "trace", "none"
124
+
125
+ // Use built-in formatters
126
+ setDefaultFormatter(simpleLogFormatter); // Simple format without timestamp
127
+
128
+ // Custom formatter
129
+ const myFormatter = (context) => {
130
+ return `[${context.level}] ${context.message}`;
131
+ };
132
+ setDefaultFormatter(myFormatter);
133
+
134
+ // Named loggers
135
+ const logger = getLogger("MyModule");
136
+ logger.info("Module initialized");
137
+
138
+ // Per-logger configuration
139
+ logger.setLogLevel("debug");
140
+ logger.setFormatter(myFormatter);
141
+ ```
142
+
116
143
  ## API Reference
117
144
  [See Documentation here](https://github.com/Chia-Mine/chia-agent/blob/main/src/api/README.md)
118
145
 
@@ -1,5 +1,6 @@
1
1
  import { SpendBundleConditions } from "../types/spend_bundle_condition";
2
- import { Optional, uint16 } from "../types/_python_types_";
2
+ import { Optional } from "../types/_python_types_";
3
+ import { uint16 } from "../../chia_rs/wheel/python/sized_ints";
3
4
  export type NPCResult = {
4
5
  error: Optional<uint16>;
5
6
  conds: Optional<SpendBundleConditions>;
@@ -1,5 +1,6 @@
1
- import { bool, int, Optional, str, uint8 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bool, Optional, str } from "../types/_python_types_";
2
+ import { int, uint8 } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
4
  export type KeyValueMarshalled = {
4
5
  key: str;
5
6
  value: str;
@@ -1,17 +1,5 @@
1
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
- import { bool, Optional, str, uint32, uint64 } from "../types/_python_types_";
3
- import { LineageProof } from "../wallet/lineage_proof";
4
- export type SingletonRecord = {
5
- coin_id: bytes32;
6
- launcher_id: bytes32;
7
- root: bytes32;
8
- inner_puzzle_hash: bytes32;
9
- confirmed: bool;
10
- confirmed_at_height: uint32;
11
- lineage_proof: LineageProof;
12
- generation: uint32;
13
- timestamp: uint64;
14
- };
1
+ import { bool, Optional, str } from "../types/_python_types_";
2
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
15
3
  export type Mirror = {
16
4
  coin_id: str;
17
5
  launcher_id: str;
@@ -0,0 +1,15 @@
1
+ import { bool } from "../types/_python_types_";
2
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
4
+ import { LineageProof } from "../wallet/lineage_proof";
5
+ export type SingletonRecord = {
6
+ coin_id: bytes32;
7
+ launcher_id: bytes32;
8
+ root: bytes32;
9
+ inner_puzzle_hash: bytes32;
10
+ confirmed: bool;
11
+ confirmed_at_height: uint32;
12
+ lineage_proof: LineageProof;
13
+ generation: uint32;
14
+ timestamp: uint64;
15
+ };
@@ -1,4 +1,5 @@
1
- import { float, int, str, uint32, uint64, uint8 } from "../types/_python_types_";
1
+ import { float, str } from "../types/_python_types_";
2
+ import { int, uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { PoolWalletConfig } from "../pools/pool_config";
3
4
  import { ErrorResponse } from "../protocols/pool_protocol";
4
5
  export type PoolState = {
@@ -1,5 +1,7 @@
1
- import { bytes, G1Element, int, Optional, str } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bytes, Optional, str } from "../types/_python_types_";
2
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
3
+ import { int } from "../../chia_rs/wheel/python/sized_ints";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
5
  export type Plot = {
4
6
  filename: str;
5
7
  size: int;
@@ -1,5 +1,6 @@
1
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
- import { bool, float, int, None, Optional, str, uint32 } from "../types/_python_types_";
1
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
2
+ import { bool, float, None, Optional, str } from "../types/_python_types_";
3
+ import { int, uint32 } from "../../chia_rs/wheel/python/sized_ints";
3
4
  import { Plot } from "../protocols/harvester_protocol";
4
5
  import { HarvestingMode } from "../plotting/util";
5
6
  export type MayBeSummary<S, O> = S extends true ? int : O;
@@ -1,5 +1,6 @@
1
- import { G1Element, str } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { str } from "../types/_python_types_";
2
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
4
  export type PoolWalletConfig = {
4
5
  launcher_id: bytes32;
5
6
  pool_url: str;
@@ -1,5 +1,7 @@
1
- import { G1Element, Optional, str, uint32, uint8 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { Optional, str } from "../types/_python_types_";
2
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
3
+ import { uint32, uint8 } from "../../chia_rs/wheel/python/sized_ints";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
5
  import { Coin } from "../types/blockchain_format/coin";
4
6
  export type PoolState = {
5
7
  version: uint8;
@@ -1,11 +1,13 @@
1
- import { bool, G2Element, Optional, uint32, uint64, uint8 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bool, Optional } from "../types/_python_types_";
2
+ import { G2Element } from "../../chia_rs/chia-bls/lib";
3
+ import { uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
5
  import { ProofOfSpace } from "../types/blockchain_format/proof_of_space";
4
- import { PoolTarget } from "../types/blockchain_format/pool_target";
6
+ import { PoolTarget } from "../../chia_rs/chia-protocol/pool_target";
5
7
  import { ClassgroupElement } from "../types/blockchain_format/classgroup";
6
8
  import { ChallengeChainSubSlot, RewardChainSubSlot } from "../types/blockchain_format/slots";
7
- import { FoliageBlockData, FoliageTransactionBlock } from "../types/blockchain_format/foliage";
8
- import { RewardChainBlockUnfinished } from "../types/blockchain_format/reward_chain_block";
9
+ import { FoliageBlockData, FoliageTransactionBlock } from "../../chia_rs/chia-protocol/foliage";
10
+ import { RewardChainBlockUnfinished } from "../../chia_rs/chia-protocol/reward_chain_block";
9
11
  export type SPSubSlotSourceData = {
10
12
  cc_sub_slot: ChallengeChainSubSlot;
11
13
  rc_sub_slot: RewardChainSubSlot;
@@ -1,5 +1,7 @@
1
- import { G1Element, Optional, str, uint64, uint8 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { Optional, str } from "../types/_python_types_";
2
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
3
+ import { uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
5
  export type Plot = {
4
6
  filename: str;
5
7
  size: uint8;
@@ -1,5 +1,7 @@
1
- import { bool, G1Element, G2Element, Optional, str, uint16, uint32, uint64, uint8 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bool, Optional, str } from "../types/_python_types_";
2
+ import { G1Element, G2Element } from "../../chia_rs/chia-bls/lib";
3
+ import { uint16, uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
5
  import { ProofOfSpace } from "../types/blockchain_format/proof_of_space";
4
6
  export declare const PoolErrorCode: {
5
7
  REVERTED_SIGNAGE_POINT: number;
@@ -1,4 +1,5 @@
1
- import { int, str, True } from "../types/_python_types_";
1
+ import { str, True } from "../types/_python_types_";
2
+ import { int } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { Condition } from "../wallet/conditions";
3
4
  export type ExtraCondition = {
4
5
  opcode: str | int;
@@ -1,5 +1,8 @@
1
- import { bool, G1Element, Optional, PrivateKey, str, uint16, uint32, uint64 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bool, Optional, str } from "../types/_python_types_";
2
+ import { PrivateKey } from "../../chia_rs/chia-bls/secret_key";
3
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
4
+ import { uint16, uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
5
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
6
  import { Notification } from "../wallet/notification_store";
4
7
  import { SignedTransaction, SigningInstructions, SigningResponse, Spend, UnsignedTransaction } from "../wallet/signer_protocol";
5
8
  import { Marshall } from "./util";
@@ -1,18 +1,4 @@
1
- export type G1Element = string;
2
- export type G2Element = string;
3
- export type PrivateKey = string;
4
1
  export type bytes = string;
5
- export type int = number;
6
- export type int8 = number;
7
- export type uint8 = number;
8
- export type int16 = number;
9
- export type uint16 = number;
10
- export type int32 = number;
11
- export type uint32 = number;
12
- export type int64 = number | bigint;
13
- export type uint64 = number | bigint;
14
- export type uint128 = number | bigint;
15
- export type int512 = number | bigint;
16
2
  export type float = number;
17
3
  export type str = string;
18
4
  export type bool = boolean;
@@ -1,2 +1,2 @@
1
- import { uint64 } from "./_python_types_";
1
+ import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
2
2
  export type CLVMCost = uint64;
@@ -1,5 +1,6 @@
1
1
  import { Coin } from "./blockchain_format/coin";
2
- import { bool, uint32, uint64 } from "./_python_types_";
2
+ import { bool } from "./_python_types_";
3
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
3
4
  export type CoinRecord = {
4
5
  coin: Coin;
5
6
  confirmed_block_index: uint32;
@@ -1,8 +1,9 @@
1
1
  import { SpendBundle } from "./spend_bundle";
2
2
  import { Coin } from "./blockchain_format/coin";
3
- import { bytes32 } from "./blockchain_format/sized_bytes";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
4
4
  import { NPCResult } from "../consensus/cost_calculator";
5
- import { bool, Optional, uint32, uint64 } from "./_python_types_";
5
+ import { bool, Optional } from "./_python_types_";
6
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
6
7
  import { CoinSpend } from "./coin_spend";
7
8
  import { SpendBundleConditions } from "../../chia_rs/chia-consensus/gen/owned_conditions";
8
9
  export type BundleCoinSpend = {
@@ -11,6 +12,7 @@ export type BundleCoinSpend = {
11
12
  eligible_for_fast_forward: bool;
12
13
  additions: Coin[];
13
14
  cost: Optional<uint64>;
15
+ latest_singleton_coin: Optional<bytes32>;
14
16
  };
15
17
  export type MempoolItem = {
16
18
  spend_bundle: SpendBundle;
@@ -1,2 +1,2 @@
1
- import { uint64 } from "./_python_types_";
1
+ import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
2
2
  export type Mojos = uint64;
@@ -1,8 +1,8 @@
1
1
  import { EndOfSubSlotBundle } from "./end_of_slot_bundle";
2
2
  import { VDFProof } from "./blockchain_format/vdf";
3
- import { Foliage, FoliageTransactionBlock } from "./blockchain_format/foliage";
4
3
  import { bytes, Optional } from "./_python_types_";
5
- import { RewardChainBlockUnfinished } from "./blockchain_format/reward_chain_block";
4
+ import { Foliage, FoliageTransactionBlock } from "../../chia_rs/chia-protocol/foliage";
5
+ import { RewardChainBlockUnfinished } from "../../chia_rs/chia-protocol/reward_chain_block";
6
6
  export type UnfinishedHeaderBlock = {
7
7
  finished_sub_slots: EndOfSubSlotBundle[];
8
8
  reward_chain_block: RewardChainBlockUnfinished;
@@ -1,4 +1,7 @@
1
- import { bytes, G1Element, PrivateKey, Optional, str, uint32 } from "../types/_python_types_";
1
+ import { bytes, Optional, str } from "../types/_python_types_";
2
+ import { PrivateKey } from "../../chia_rs/chia-bls/secret_key";
3
+ import { G1Element } from "../../chia_rs/chia-bls/lib";
4
+ import { uint32 } from "../../chia_rs/wheel/python/sized_ints";
2
5
  export type KeyDataSecrets = {
3
6
  mnemonic: str[];
4
7
  entropy: bytes;
@@ -1,4 +1,5 @@
1
- import { bytes, uint16 } from "../types/_python_types_";
1
+ import { bytes } from "../types/_python_types_";
2
+ import { uint16 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  export type VersionedBlob = {
3
4
  version: uint16;
4
5
  blob: bytes;
@@ -1,4 +1,5 @@
1
- import { Optional, str, uint32, uint64 } from "../types/_python_types_";
1
+ import { Optional, str } from "../types/_python_types_";
2
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  export type Condition = Record<str, any>;
3
4
  export type ConditionValidTimes = {
4
5
  min_secs_since_created: Optional<uint64>;
@@ -1,5 +1,6 @@
1
- import { Optional, uint64 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { Optional } from "../types/_python_types_";
2
+ import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
4
  export type LineageProof = {
4
5
  parent_name: Optional<bytes32>;
5
6
  inner_puzzle_hash: Optional<bytes32>;
@@ -1,5 +1,6 @@
1
- import { bool, bytes, Optional, str, uint16, uint32, uint64 } from "../../types/_python_types_";
2
- import { bytes32 } from "../../types/blockchain_format/sized_bytes";
1
+ import { bool, bytes, Optional, str } from "../../types/_python_types_";
2
+ import { uint16, uint32, uint64 } from "../../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
3
4
  export type NFTInfo = {
4
5
  nft_id: str;
5
6
  launcher_id: bytes32;
@@ -1,5 +1,6 @@
1
- import { bytes, uint32, uint64 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bytes } from "../types/_python_types_";
2
+ import { uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
4
  export type Notification = {
4
5
  id: bytes32;
5
6
  message: bytes;
@@ -1,5 +1,6 @@
1
- import { bool, uint16, uint64 } from "../../../types/_python_types_";
2
- import { bytes32 } from "../../../types/blockchain_format/sized_bytes";
1
+ import { bool } from "../../../types/_python_types_";
2
+ import { uint16, uint64 } from "../../../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../../../chia_rs/wheel/python/sized_bytes";
3
4
  import { Marshall } from "../../../rpc/util";
4
5
  export type AutoClaimSettings = {
5
6
  enabled: bool;
@@ -1,5 +1,6 @@
1
- import { bytes, str, uint64 } from "../types/_python_types_";
2
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
1
+ import { bytes, str } from "../types/_python_types_";
2
+ import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
3
4
  import { Program } from "../types/blockchain_format/program";
4
5
  export type Coin = {
5
6
  parent_coin_id: bytes32;
@@ -1,6 +1,7 @@
1
- import { bool, bytes, int, Optional, str, uint32, uint64, uint8 } from "../types/_python_types_";
1
+ import { bool, bytes, Optional, str } from "../types/_python_types_";
2
+ import { int, uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { Coin } from "../types/blockchain_format/coin";
3
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
4
5
  import { TDriverDict } from "./puzzle_drivers";
5
6
  import { ConditionValidTimes } from "./conditions";
6
7
  export type TradeRecordOld = {
@@ -1,6 +1,7 @@
1
- import { bool, bytes, Optional, str, uint32, uint64, uint8 } from "../types/_python_types_";
1
+ import { bool, bytes, Optional, str } from "../types/_python_types_";
2
+ import { uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { Coin } from "../types/blockchain_format/coin";
3
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
4
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
4
5
  import { ClawbackMetadata } from "./puzzles/clawback/metadata";
5
6
  import { ConditionValidTimes } from "./conditions";
6
7
  import { WalletSpendBundle } from "./wallet_spend_bundle";
@@ -1,5 +1,5 @@
1
- import { uint32, uint64, uint8 } from "../../types/_python_types_";
2
- import { bytes32 } from "../../types/blockchain_format/sized_bytes";
1
+ import { uint32, uint64, uint8 } from "../../../chia_rs/wheel/python/sized_ints";
2
+ import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
3
3
  export type TransactionTypeFilter = {
4
4
  values: uint8[];
5
5
  mode: uint8;
@@ -1,5 +1,6 @@
1
- import { bool, Optional, uint64 } from "../../types/_python_types_";
2
- import { bytes32 } from "../../types/blockchain_format/sized_bytes";
1
+ import { bool, Optional } from "../../types/_python_types_";
2
+ import { uint64 } from "../../../chia_rs/wheel/python/sized_ints";
3
+ import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
3
4
  export type CoinSelectionConfigLoader = {
4
5
  min_coin_amount?: Optional<uint64>;
5
6
  max_coin_amount?: Optional<uint64>;
@@ -1,4 +1,4 @@
1
- import { uint32, uint8 } from "../../types/_python_types_";
1
+ import { uint32, uint8 } from "../../../chia_rs/wheel/python/sized_ints";
2
2
  export declare const WalletType: {
3
3
  readonly STANDARD_WALLET: 0;
4
4
  readonly ATOMIC_SWAP: 2;
@@ -13,8 +13,6 @@ export declare const WalletType: {
13
13
  readonly DATA_LAYER: 11;
14
14
  readonly DATA_LAYER_OFFER: 12;
15
15
  readonly VC: 13;
16
- readonly DAO: 14;
17
- readonly DAO_CAT: 15;
18
16
  readonly CRCAT: 57;
19
17
  };
20
18
  export declare const CoinType: {
@@ -17,8 +17,6 @@ exports.WalletType = {
17
17
  DATA_LAYER: 11,
18
18
  DATA_LAYER_OFFER: 12,
19
19
  VC: 13,
20
- DAO: 14,
21
- DAO_CAT: 15,
22
20
  CRCAT: 57,
23
21
  };
24
22
  exports.CoinType = {
@@ -1,4 +1,4 @@
1
- import { bytes32 } from "../../types/blockchain_format/sized_bytes";
1
+ import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
2
2
  import { Optional } from "../../types/_python_types_";
3
3
  import { LineageProof } from "../lineage_proof";
4
4
  import { Coin } from "../../types/blockchain_format/coin";
@@ -1,4 +1,4 @@
1
- import { uint32 } from "../../types/_python_types_";
1
+ import { uint32 } from "../../../chia_rs/wheel/python/sized_ints";
2
2
  import { VerifiedCredential } from "./vc_drivers";
3
3
  export type VCRecord = {
4
4
  vc: VerifiedCredential;
@@ -1,18 +1,19 @@
1
- import { bool, int, Optional, str, uint32, uint64 } from "../types/_python_types_";
1
+ import { bool, Optional, str } from "../types/_python_types_";
2
+ import { int, uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { Coin } from "../types/blockchain_format/coin";
3
4
  import { CoinType, StreamableWalletIdentifier, WalletType } from "./util/wallet_types";
4
5
  import { ClawbackMetadata } from "./puzzles/clawback/metadata";
5
6
  import { VersionedBlob } from "../util/streamable";
6
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
7
+ import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
7
8
  export type WalletCoinRecord = {
8
9
  coin: Coin;
9
10
  confirmed_block_height: uint32;
10
11
  spent_block_height: uint32;
11
12
  spent: bool;
12
13
  coinbase: bool;
13
- wallet_type: typeof WalletType[keyof typeof WalletType];
14
+ wallet_type: (typeof WalletType)[keyof typeof WalletType];
14
15
  wallet_id: int;
15
- coin_type: typeof CoinType[keyof typeof CoinType];
16
+ coin_type: (typeof CoinType)[keyof typeof CoinType];
16
17
  metadata: Optional<VersionedBlob>;
17
18
  };
18
19
  export type WalletCoinRecordWithMetadata = {
@@ -20,7 +21,7 @@ export type WalletCoinRecordWithMetadata = {
20
21
  puzzle_hash: bytes32;
21
22
  amount: uint64;
22
23
  id: str;
23
- type: typeof CoinType[keyof typeof CoinType];
24
+ type: (typeof CoinType)[keyof typeof CoinType];
24
25
  wallet_identifier: StreamableWalletIdentifier;
25
26
  metadata: ClawbackMetadata;
26
27
  confirmed_height: uint32;
@@ -1,4 +1,5 @@
1
- import { bool, Optional, uint32, uint8 } from "../types/_python_types_";
1
+ import { bool, Optional } from "../types/_python_types_";
2
+ import { uint32, uint8 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  import { AmountFilter, HashFilter, UInt32Range, UInt64Range } from "./util/quality_filter";
3
4
  export type GetCoinRecords = {
4
5
  offset: uint32;
@@ -1,4 +1,5 @@
1
- import { str, uint32, uint8 } from "../types/_python_types_";
1
+ import { str } from "../types/_python_types_";
2
+ import { uint32, uint8 } from "../../chia_rs/wheel/python/sized_ints";
2
3
  export type WalletInfo = {
3
4
  id: uint32;
4
5
  name: str;
@@ -1,4 +1,4 @@
1
- import { uint128, uint32, uint64 } from "../types/_python_types_";
1
+ import { uint128, uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
2
2
  export type Balance = {
3
3
  confirmed_wallet_balance: uint128;
4
4
  unconfirmed_wallet_balance: uint128;
@@ -0,0 +1,4 @@
1
+ import { PublicKey } from "./public_key";
2
+ import { Signature } from "./signature";
3
+ export type G1Element = PublicKey;
4
+ export type G2Element = Signature;
@@ -1,2 +1 @@
1
- import { G1Element } from "../../chia/types/_python_types_";
2
- export type PublicKey = G1Element;
1
+ export type PublicKey = string;
@@ -0,0 +1 @@
1
+ export type PrivateKey = string;
@@ -0,0 +1 @@
1
+ export type Signature = string;