chia-agent 14.4.0 → 15.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 (121) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +7 -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 +6 -20
  16. package/api/chia/rpc/wallet_request_types.d.ts +105 -6
  17. package/api/chia/rpc/wallet_rpc_api.d.ts +19 -0
  18. package/api/chia/types/_python_types_.d.ts +0 -14
  19. package/api/chia/types/clvm_cost.d.ts +1 -1
  20. package/api/chia/types/coin_record.d.ts +2 -1
  21. package/api/chia/types/mempool_item.d.ts +4 -2
  22. package/api/chia/types/mojos.d.ts +1 -1
  23. package/api/chia/types/unfinished_header_block.d.ts +2 -2
  24. package/api/chia/util/keychain.d.ts +4 -1
  25. package/api/chia/util/streamable.d.ts +3 -2
  26. package/api/chia/wallet/conditions.d.ts +2 -1
  27. package/api/chia/wallet/lineage_proof.d.ts +3 -2
  28. package/api/chia/wallet/nft_wallet/nft_info.d.ts +3 -2
  29. package/api/chia/wallet/notification_store.d.ts +3 -2
  30. package/api/chia/wallet/puzzles/clawback/metadata.d.ts +5 -2
  31. package/api/chia/wallet/signer_protocol.d.ts +3 -2
  32. package/api/chia/wallet/trade_record.d.ts +3 -2
  33. package/api/chia/wallet/transaction_record.d.ts +3 -2
  34. package/api/chia/wallet/util/quality_filter.d.ts +2 -2
  35. package/api/chia/wallet/util/tx_config.d.ts +3 -2
  36. package/api/chia/wallet/util/wallet_types.d.ts +1 -3
  37. package/api/chia/wallet/util/wallet_types.js +0 -2
  38. package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +1 -1
  39. package/api/chia/wallet/vc_wallet/vc_store.d.ts +1 -1
  40. package/api/chia/wallet/wallet_coin_record.d.ts +12 -7
  41. package/api/chia/wallet/wallet_coin_store.d.ts +2 -1
  42. package/api/chia/wallet/wallet_info.d.ts +2 -1
  43. package/api/chia/wallet/wallet_node.d.ts +1 -1
  44. package/api/chia_rs/chia-bls/lib.d.ts +4 -0
  45. package/api/chia_rs/chia-bls/public_key.d.ts +1 -2
  46. package/api/chia_rs/chia-bls/secret_key.d.ts +1 -0
  47. package/api/chia_rs/chia-bls/signature.d.ts +1 -0
  48. package/api/chia_rs/chia-consensus/gen/owned_conditions.d.ts +6 -2
  49. package/api/chia_rs/chia-protocol/block_record.d.ts +3 -2
  50. package/api/chia_rs/chia-protocol/classgroup.d.ts +1 -1
  51. package/api/chia_rs/chia-protocol/coin.d.ts +2 -2
  52. package/api/chia_rs/chia-protocol/foliage.d.ts +4 -2
  53. package/api/chia_rs/chia-protocol/fullblock.d.ts +2 -1
  54. package/api/chia_rs/chia-protocol/pool_target.d.ts +2 -2
  55. package/api/chia_rs/chia-protocol/proof_of_space.d.ts +4 -2
  56. package/api/chia_rs/chia-protocol/reward_chain_block.d.ts +4 -2
  57. package/api/chia_rs/chia-protocol/slots.d.ts +3 -2
  58. package/api/chia_rs/chia-protocol/spend_bundle.d.ts +1 -1
  59. package/api/chia_rs/chia-protocol/sub_epoch_summary.d.ts +3 -2
  60. package/api/chia_rs/chia-protocol/unfinished_block.d.ts +2 -1
  61. package/api/chia_rs/chia-protocol/vdf.d.ts +3 -2
  62. package/api/chia_rs/wheel/python/sized_bytes.d.ts +7 -0
  63. package/api/chia_rs/wheel/python/sized_ints.d.ts +11 -0
  64. package/api/chia_rs/wheel/python/sized_ints.js +2 -0
  65. package/api/pool-reference/pool/record.d.ts +4 -2
  66. package/api/rpc/common/index.d.ts +29 -3
  67. package/api/rpc/common/index.js +40 -50
  68. package/api/rpc/crawler/index.d.ts +3 -2
  69. package/api/rpc/crawler/index.js +7 -20
  70. package/api/rpc/data_layer/index.d.ts +3 -2
  71. package/api/rpc/data_layer/index.js +106 -186
  72. package/api/rpc/farmer/index.d.ts +3 -2
  73. package/api/rpc/farmer/index.js +40 -75
  74. package/api/rpc/full_node/index.d.ts +6 -5
  75. package/api/rpc/full_node/index.js +112 -196
  76. package/api/rpc/harvester/index.d.ts +2 -1
  77. package/api/rpc/harvester/index.js +25 -50
  78. package/api/rpc/index.d.ts +3 -3
  79. package/api/rpc/index.js +6 -17
  80. package/api/rpc/pool/index.d.ts +2 -1
  81. package/api/rpc/pool/index.js +18 -40
  82. package/api/rpc/wallet/index.d.ts +60 -371
  83. package/api/rpc/wallet/index.js +388 -755
  84. package/api/types.d.ts +3 -2
  85. package/api/ws/chia_plots_create/index.js +20 -32
  86. package/api/ws/crawler/index.d.ts +3 -2
  87. package/api/ws/crawler/index.js +21 -32
  88. package/api/ws/daemon/index.d.ts +3 -1
  89. package/api/ws/daemon/index.js +125 -212
  90. package/api/ws/farmer/index.d.ts +3 -2
  91. package/api/ws/farmer/index.js +112 -134
  92. package/api/ws/full_node/index.d.ts +8 -7
  93. package/api/ws/full_node/index.js +59 -76
  94. package/api/ws/harvester/index.d.ts +2 -1
  95. package/api/ws/harvester/index.js +60 -76
  96. package/api/ws/timelord/index.d.ts +3 -2
  97. package/api/ws/timelord/index.js +40 -54
  98. package/api/ws/wallet/index.d.ts +2 -1
  99. package/api/ws/wallet/index.js +72 -90
  100. package/bin/cli.js +40 -51
  101. package/config/index.js +13 -9
  102. package/daemon/connection.js +2 -2
  103. package/daemon/index.d.ts +1 -0
  104. package/daemon/index.js +119 -109
  105. package/index.d.ts +3 -0
  106. package/logger.js +11 -8
  107. package/package.json +8 -4
  108. package/rpc/index.d.ts +0 -3
  109. package/rpc/index.js +145 -134
  110. package/api/chia/types/blockchain_format/foliage.d.ts +0 -1
  111. package/api/chia/types/blockchain_format/pool_target.d.ts +0 -1
  112. package/api/chia/types/blockchain_format/reward_chain_block.d.ts +0 -1
  113. package/api/chia/types/blockchain_format/sized_bytes.d.ts +0 -8
  114. package/api/chia/wallet/dao_wallet/dao_info.d.ts +0 -39
  115. package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +0 -35
  116. /package/api/chia/{types/blockchain_format/foliage.js → data_layer/singleton_record.js} +0 -0
  117. /package/api/chia/{types/blockchain_format/pool_target.js → rpc/wallet_rpc_api.js} +0 -0
  118. /package/api/{chia/types/blockchain_format/reward_chain_block.js → chia_rs/chia-bls/lib.js} +0 -0
  119. /package/api/{chia/types/blockchain_format/sized_bytes.js → chia_rs/chia-bls/secret_key.js} +0 -0
  120. /package/api/{chia/wallet/dao_wallet/dao_info.js → chia_rs/chia-bls/signature.js} +0 -0
  121. /package/api/{chia/wallet/dao_wallet/dao_wallet.js → chia_rs/wheel/python/sized_bytes.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,81 @@
1
1
  # Changelog
2
2
 
3
+ ## [15.0.0]
4
+ ### Breaking change
5
+ - The following Wallet RPC APIs for DAO were removed
6
+ - dao_get_proposals
7
+ - dao_create_proposal
8
+ - dao_parse_proposal
9
+ - dao_vote_on_proposal
10
+ - dao_get_treasury_balance
11
+ - dao_get_treasury_id
12
+ - dao_get_rules
13
+ - dao_close_proposal
14
+ - dao_exit_lockup
15
+ - dao_adjust_filter_level
16
+ - dao_add_funds_to_treasury
17
+ - dao_send_to_lockup
18
+ - dao_get_proposal_state
19
+ - dao_free_coins_from_finished_proposals
20
+ - DAO wallet can no longer be created
21
+ - `DAO` and `DAO_CAT` were removed from [`WalletType`](./src/api/chia/wallet/util/wallet_types.ts)
22
+ ### Internal change
23
+ - Upgraded eslint to v9
24
+ - Moved the definitions of `sized_ints` and `sized_bytes` under `chia_rs`
25
+ - Updated the minimal Node.js support to 20
26
+
27
+ ## [14.5.0]
28
+ ### Changed
29
+ - Added error logs
30
+ - [Wallet RPC API](./src/api/rpc/wallet)
31
+ - Added CHIP-0029 support for the following Wallet RPC APIs
32
+ - [`set_wallet_resync_on_startup`](./src/api/rpc/wallet/README.md#set_wallet_resync_on_startupagent-params)
33
+ - [`get_sync_status`](./src/api/rpc/wallet/README.md#get_sync_statusagent)
34
+ - [`get_height_info`](./src/api/rpc/wallet/README.md#get_height_infoagent)
35
+ - [`push_tx`](./src/api/rpc/wallet/README.md#push_txagent-params)
36
+ - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params)
37
+ - [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#get_timestamp_for_heightagent)
38
+ - [`set_auto_claim`](./src/api/rpc/wallet/README.md#set_auto_claimagent-params)
39
+ - [`get_auto_claim`](./src/api/rpc/wallet/README.md#get_auto_claimagent-params)
40
+ - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params)
41
+ - [`vc_get`](./src/api/rpc/wallet/README.md#vc_getagent-params)
42
+ - [`vc_get_list`](./src/api/rpc/wallet/README.md#vc_get_listagent-params)
43
+ - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params)
44
+ - [`vc_add_proofs`](./src/api/rpc/wallet/README.md#vc_add_proofsagent-params)
45
+ - [`vc_get_proofs_for_root`](./src/api/rpc/wallet/README.md#vc_get_proofs_for_rootagent-params)
46
+ - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params)
47
+ - [`vc_get_list`](./src/api/rpc/wallet/README.md#vc_get_listagent-params)
48
+ - Changed the response type of `proofs`
49
+ - [`vc_add_proofs`](./src/api/rpc/wallet/README.md#vc_add_proofsagent-params)
50
+ - Changed the request type
51
+ - [`vc_get_proofs_for_root`](./src/api/rpc/wallet/README.md#vc_get_proofs_for_rootagent-params)
52
+ - Changed the response type
53
+ - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params)
54
+ - Removed `signing_responses` from the response properties.
55
+ - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params)
56
+ - Removed `signing_responses` from the response properties.
57
+ - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params)
58
+ - Removed `signing_responses` from the response properties.
59
+ - Add the following properties to `SpendBundleConditions`
60
+ - `validated_signature`
61
+ - `execution_cost`
62
+ - `condition_cost`
63
+ ### Added
64
+ - [New Common RPC API](./src/api/rpc/common)
65
+ - [`get_log_level`](./src/api/rpc/common/README.md#get_log_levelagent)
66
+ - [`set_log_level`](./src/api/rpc/common/README.md#set_log_levelagent-params)
67
+ - [`reset_log_level`](./src/api/rpc/common/README.md#reset_log_levelagent)
68
+ ### Fixed
69
+ - [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#get_timestamp_for_heightagent)
70
+ - Fixed a missing request param
71
+ - [`vc_get`](./src/api/rpc/wallet/README.md#vc_getagent-params)
72
+ - Fixed the response type to `Optional<VCRecord>` from `VCRecord | None`.
73
+ - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params)
74
+ - Each element of `transactions` in the request can be `TransactionRecord`
75
+ - Fixed the type of [`TransactionEndpointResponseCHIP0029`](./src/api/chia/rpc/wallet_request_types.ts)
76
+ - Fixed a typo: `VersionBlob` -> `VersionedBlob`
77
+ - Fixed incorrect type of [`WalletCoinRecordWithMetadata`](./src/api/chia/wallet/wallet_coin_record.ts)
78
+
3
79
  ## [14.4.0]
4
80
  ### Changed
5
81
  - Updated npm dependencies
@@ -1774,6 +1850,8 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
1774
1850
  Initial release.
1775
1851
 
1776
1852
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
1853
+ [15.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.5.0...v15.0.0
1854
+ [14.5.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.4.0...v14.5.0
1777
1855
  [14.4.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.3.3...v14.4.0
1778
1856
  [14.3.3]: https://github.com/Chia-Mine/chia-agent/compare/v14.3.2...v14.3.3
1779
1857
  [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.4.4` 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
- - [`39739520211670d398173f87cd1e97c755274195`](https://github.com/Chia-Network/chia-blockchain/tree/39739520211670d398173f87cd1e97c755274195) of [chia-blockchain 2.4.4](https://github.com/Chia-Network/chia-blockchain)
26
- - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/39739520211670d398173f87cd1e97c755274195...main)
27
- - [`54fffb4968364640b4f5dd18d586821e67eaa631`](https://github.com/Chia-Network/pool-reference/tree/54fffb4968364640b4f5dd18d586821e67eaa631) 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/54fffb4968364640b4f5dd18d586821e67eaa631...main)
29
- - [`c6cd98f637f07e60f68203c4c27b8cf3a559ae9b`](https://github.com/Chia-Network/chia_rs/tree/c6cd98f637f07e60f68203c4c27b8cf3a559ae9b) of [chia_rs 0.14.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/c6cd98f637f07e60f68203c4c27b8cf3a559ae9b...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.
@@ -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,7 +1,6 @@
1
- import { bool, False, int, str, True } from "../types/_python_types_";
2
- import { Condition, ConditionValidTimes } from "../wallet/conditions";
3
- import { TXConfigLoader, TXEndpointForCompat } from "../wallet/util/tx_config";
4
- import { UnsignedTransaction } from "../wallet/signer_protocol";
1
+ import { str, True } from "../types/_python_types_";
2
+ import { int } from "../../chia_rs/wheel/python/sized_ints";
3
+ import { Condition } from "../wallet/conditions";
5
4
  export type ExtraCondition = {
6
5
  opcode: str | int;
7
6
  args: Condition;
@@ -9,23 +8,10 @@ export type ExtraCondition = {
9
8
  export type TranslationLayerKey = "CHIP-0028";
10
9
  export type CHIP0029 = {
11
10
  "CHIP-0029": True;
12
- } | {
13
- "CHIP-0029"?: False;
14
11
  };
15
12
  export type Marshall = {
16
13
  translation?: TranslationLayerKey;
17
14
  } & CHIP0029;
18
- export type TXEndpointRequest = {
19
- wallet_type: str;
20
- extra_conditions?: ExtraCondition[];
21
- push?: bool;
22
- merge_spends?: bool;
23
- sign?: bool;
24
- translation?: TranslationLayerKey;
25
- } & CHIP0029 & TXConfigLoader & TXEndpointForCompat & Partial<ConditionValidTimes>;
26
- export type CHIP0029UnsignedTransaction<T extends TXEndpointRequest> = T extends {
27
- "CHIP-0029"?: True;
28
- } ? str[] : UnsignedTransaction[];
29
- export type TxeResp<Req extends TXEndpointRequest, Res> = Res & {
30
- unsigned_transactions: CHIP0029UnsignedTransaction<Req>;
31
- };
15
+ export type MaybeMarshall<T, Res, MarshalledRes> = T extends {
16
+ "CHIP-0029": True;
17
+ } ? MarshalledRes : Res;
@@ -1,9 +1,15 @@
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";
6
- import { TransactionRecord } from "../wallet/transaction_record";
9
+ import { TransactionRecord, TransactionRecordConvenience } from "../wallet/transaction_record";
10
+ import { WalletSpendBundle } from "../wallet/wallet_spend_bundle";
11
+ import { TXEndpointRequest } from "./wallet_rpc_api";
12
+ import { VCRecord } from "../wallet/vc_wallet/vc_store";
7
13
  export type GetNotifications = {
8
14
  ids?: bytes32[];
9
15
  start?: uint32;
@@ -74,14 +80,29 @@ export type TransactionEndpointResponse = {
74
80
  };
75
81
  export type TransactionEndpointResponseCHIP0029 = {
76
82
  unsigned_transactions: str[];
77
- transactions: str[];
83
+ transactions: TransactionRecord[];
84
+ };
85
+ export type PushTransactions = TransactionEndpointRequest & {
86
+ transactions: Array<TransactionRecord | TransactionRecordConvenience | str>;
87
+ push: Optional<bool>;
88
+ } & TXEndpointRequest;
89
+ export type PushTransactionsCHIP0029 = PushTransactions & Marshall;
90
+ export type PushTransactionsResponse = TransactionEndpointResponse;
91
+ export type PushTransactionsResponseCHIP0029 = TransactionEndpointResponseCHIP0029;
92
+ export type GetTimestampForHeightRequest = {
93
+ height: uint32;
94
+ };
95
+ export type GetTimestampForHeightRequestCHIP0029 = GetTimestampForHeightRequest & Marshall;
96
+ export type GetTimestampForHeightResponse = {
97
+ timestamp: uint64;
78
98
  };
79
99
  export type SplitCoins = TransactionEndpointRequest & {
80
100
  wallet_id: uint32;
81
101
  number_of_coins: uint16;
82
102
  amount_per_coin: uint64;
83
103
  target_coin_id: bytes32;
84
- } & Marshall;
104
+ } & TXEndpointRequest;
105
+ export type SplitCoinsCHIP0029 = SplitCoins & Marshall;
85
106
  export type SplitCoinsResponse = TransactionEndpointResponse;
86
107
  export type SplitCoinsResponseCHIP0029 = TransactionEndpointResponseCHIP0029;
87
108
  export type CombineCoins = TransactionEndpointRequest & {
@@ -91,9 +112,69 @@ export type CombineCoins = TransactionEndpointRequest & {
91
112
  target_coin_ids: bytes32[];
92
113
  target_coin_amount?: uint64;
93
114
  coin_num_limit: uint16;
94
- } & Marshall;
115
+ } & TXEndpointRequest;
116
+ export type CombineCoinsCHIP0029 = CombineCoins & Marshall;
95
117
  export type CombineCoinsResponse = TransactionEndpointResponse;
96
118
  export type CombineCoinsResponseCHIP0029 = TransactionEndpointResponseCHIP0029;
119
+ export type VCMint = TransactionEndpointRequest & {
120
+ did_id: str;
121
+ target_address: Optional<str>;
122
+ } & TXEndpointRequest;
123
+ export type VCMintCHIP0029 = VCMint & Marshall;
124
+ export type VcMintResponse = TransactionEndpointResponse & {
125
+ vc_record: VCRecord;
126
+ };
127
+ export type VcMintResponseCHIP0029 = TransactionEndpointResponseCHIP0029 & {
128
+ vc_record: VCRecord;
129
+ };
130
+ export type VCGet = {
131
+ vc_id: bytes32;
132
+ };
133
+ export type VCGetCHIP0029 = VCGet & Marshall;
134
+ export type VcGetResponse = {
135
+ vc_record: Optional<VCRecord>;
136
+ };
137
+ export type VcGetList = {
138
+ start: uint32;
139
+ end: uint32;
140
+ };
141
+ export type VcGetListCHIP0029 = VcGetList & Marshall;
142
+ export type VCProofsRPC = {
143
+ key_value_pairs: Array<[str, str]>;
144
+ };
145
+ export type VCProofWithHash = {
146
+ hash: bytes32;
147
+ proof: Optional<VCProofsRPC>;
148
+ };
149
+ export type VcRecordWithCoinID = VCRecord & {
150
+ coin_id: bytes32;
151
+ };
152
+ export type VcGetListResponse = {
153
+ vc_records: VcRecordWithCoinID[];
154
+ proofs: VCProofWithHash[];
155
+ };
156
+ export type VcSpend = TransactionEndpointRequest & {
157
+ vc_id: bytes32;
158
+ new_puzhash: Optional<bytes32>;
159
+ new_proof_hash: Optional<bytes32>;
160
+ provider_inner_puzhash: Optional<bytes32>;
161
+ } & TXEndpointRequest;
162
+ export type VcSpendCHIP0029 = VcSpend & Marshall;
163
+ export type VcSpendResponse = TransactionEndpointResponse;
164
+ export type VcSpendResponseCHIP0029 = TransactionEndpointResponseCHIP0029;
165
+ export type VcAddProofs = VCProofsRPC;
166
+ export type VcAddProofsCHIP0029 = VCProofsRPC & Marshall;
167
+ export type VCGetProofsForRoot = {
168
+ root: bytes32;
169
+ };
170
+ export type VCGetProofsForRootCHIP0029 = VCGetProofsForRoot & Marshall;
171
+ export type VCGetProofsForRootResponse = VCProofsRPC;
172
+ export type VcRevoke = TransactionEndpointRequest & {
173
+ vc_parent_id: bytes32;
174
+ } & TXEndpointRequest;
175
+ export type VcRevokeCHIP0029 = VcRevoke & Marshall;
176
+ export type VcRevokeResponse = TransactionEndpointResponse;
177
+ export type VcRevokeResponseCHIP0029 = TransactionEndpointResponseCHIP0029;
97
178
  export type LogIn = {
98
179
  fingerprint: uint32;
99
180
  };
@@ -143,3 +224,21 @@ export type CheckDeleteKeyResponse = {
143
224
  used_for_pool_rewards: bool;
144
225
  wallet_balance: bool;
145
226
  };
227
+ export type SetWalletResyncOnStartup = {
228
+ enable?: bool;
229
+ };
230
+ export type SetWalletResyncOnStartupCHIP0029 = SetWalletResyncOnStartup & Marshall;
231
+ export type GetSyncStatus = Marshall;
232
+ export type GetSyncStatusResponse = {
233
+ synced: bool;
234
+ syncing: bool;
235
+ genesis_initialized: bool;
236
+ };
237
+ export type GetHeightInfo = Marshall;
238
+ export type GetHeightInfoResponse = {
239
+ height: uint32;
240
+ };
241
+ export type PushTX = {
242
+ spend_bundle: WalletSpendBundle | str;
243
+ };
244
+ export type PushTXCHIP0029 = PushTX & Marshall;
@@ -0,0 +1,19 @@
1
+ import { bool, str, True } from "../types/_python_types_";
2
+ import { TXConfigLoader, TXEndpointForCompat } from "../wallet/util/tx_config";
3
+ import { ConditionValidTimes } from "../wallet/conditions";
4
+ import { UnsignedTransaction } from "../wallet/signer_protocol";
5
+ import { CHIP0029, ExtraCondition, TranslationLayerKey } from "./util";
6
+ export type TXEndpointRequest = {
7
+ wallet_type: str;
8
+ extra_conditions?: ExtraCondition[];
9
+ push?: bool;
10
+ merge_spends?: bool;
11
+ sign?: bool;
12
+ translation?: TranslationLayerKey;
13
+ } & CHIP0029 & TXConfigLoader & TXEndpointForCompat & Partial<ConditionValidTimes>;
14
+ export type CHIP0029UnsignedTransaction<T extends TXEndpointRequest> = T extends {
15
+ "CHIP-0029"?: True;
16
+ } ? str[] : UnsignedTransaction[];
17
+ export type TxeResp<Req extends TXEndpointRequest, Res> = {
18
+ unsigned_transactions: CHIP0029UnsignedTransaction<Req>;
19
+ } & Res;
@@ -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,5 +1,6 @@
1
- import { bytes, uint16 } from "../types/_python_types_";
2
- export type VersionBlob = {
1
+ import { bytes } from "../types/_python_types_";
2
+ import { uint16 } from "../../chia_rs/wheel/python/sized_ints";
3
+ export type VersionedBlob = {
3
4
  version: uint16;
4
5
  blob: bytes;
5
6
  };
@@ -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,11 +1,14 @@
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";
4
+ import { Marshall } from "../../../rpc/util";
3
5
  export type AutoClaimSettings = {
4
6
  enabled: bool;
5
7
  tx_fee: uint64;
6
8
  min_amount: uint64;
7
9
  batch_size: uint16;
8
10
  };
11
+ export type AutoClaimSettingsCHIP0029 = AutoClaimSettings & Marshall;
9
12
  export type ClawbackMetadata = {
10
13
  time_lock: uint64;
11
14
  sender_puzzle_hash: bytes32;
@@ -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;