chia-agent 14.1.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 (78) hide show
  1. package/CHANGELOG.md +121 -1
  2. package/README.md +7 -5
  3. package/api/chia/consensus/block_record.d.ts +1 -32
  4. package/api/chia/data_layer/data_layer_wallet.d.ts +2 -1
  5. package/api/chia/pools/pool_wallet_info.d.ts +0 -2
  6. package/api/chia/rpc/util.d.ts +2 -0
  7. package/api/chia/rpc/wallet_request_types.d.ts +44 -1
  8. package/api/chia/types/blockchain_format/classgroup.d.ts +1 -4
  9. package/api/chia/types/blockchain_format/coin.d.ts +1 -11
  10. package/api/chia/types/blockchain_format/foliage.d.ts +1 -35
  11. package/api/chia/types/blockchain_format/pool_target.d.ts +1 -6
  12. package/api/chia/types/blockchain_format/proof_of_space.d.ts +1 -10
  13. package/api/chia/types/blockchain_format/reward_chain_block.d.ts +1 -30
  14. package/api/chia/types/blockchain_format/slots.d.ts +1 -24
  15. package/api/chia/types/blockchain_format/sub_epoch_summary.d.ts +1 -9
  16. package/api/chia/types/blockchain_format/vdf.d.ts +1 -13
  17. package/api/chia/types/coin_spend.d.ts +2 -7
  18. package/api/chia/types/end_of_slot_bundle.d.ts +1 -8
  19. package/api/chia/types/full_block.d.ts +1 -24
  20. package/api/chia/types/spend_bundle_condition.d.ts +1 -26
  21. package/api/chia/types/unfinished_block.d.ts +1 -0
  22. package/api/chia/wallet/signer_protocol.d.ts +54 -0
  23. package/api/chia_rs/chia-bls/public_key.d.ts +2 -0
  24. package/api/chia_rs/chia-bls/public_key.js +2 -0
  25. package/api/chia_rs/chia-consensus/gen/owned_conditions.d.ts +36 -0
  26. package/api/chia_rs/chia-consensus/gen/owned_conditions.js +2 -0
  27. package/api/chia_rs/chia-protocol/block_record.d.ts +32 -0
  28. package/api/chia_rs/chia-protocol/block_record.js +2 -0
  29. package/api/chia_rs/chia-protocol/classgroup.d.ts +4 -0
  30. package/api/chia_rs/chia-protocol/classgroup.js +2 -0
  31. package/api/chia_rs/chia-protocol/coin.d.ts +7 -0
  32. package/api/chia_rs/chia-protocol/coin.js +2 -0
  33. package/api/chia_rs/chia-protocol/coin_spend.d.ts +7 -0
  34. package/api/chia_rs/chia-protocol/coin_spend.js +2 -0
  35. package/api/chia_rs/chia-protocol/end_of_sub_slot_bundle.d.ts +8 -0
  36. package/api/chia_rs/chia-protocol/end_of_sub_slot_bundle.js +2 -0
  37. package/api/chia_rs/chia-protocol/foliage.d.ts +35 -0
  38. package/api/chia_rs/chia-protocol/foliage.js +2 -0
  39. package/api/chia_rs/chia-protocol/fullblock.d.ts +20 -0
  40. package/api/chia_rs/chia-protocol/fullblock.js +2 -0
  41. package/api/chia_rs/chia-protocol/pool_target.d.ts +6 -0
  42. package/api/chia_rs/chia-protocol/pool_target.js +2 -0
  43. package/api/chia_rs/chia-protocol/program.d.ts +2 -0
  44. package/api/chia_rs/chia-protocol/program.js +2 -0
  45. package/api/chia_rs/chia-protocol/proof_of_space.d.ts +10 -0
  46. package/api/chia_rs/chia-protocol/proof_of_space.js +2 -0
  47. package/api/chia_rs/chia-protocol/reward_chain_block.d.ts +30 -0
  48. package/api/chia_rs/chia-protocol/reward_chain_block.js +2 -0
  49. package/api/chia_rs/chia-protocol/slots.d.ts +24 -0
  50. package/api/chia_rs/chia-protocol/slots.js +2 -0
  51. package/api/chia_rs/chia-protocol/sub_epoch_summary.d.ts +9 -0
  52. package/api/chia_rs/chia-protocol/sub_epoch_summary.js +2 -0
  53. package/api/chia_rs/chia-protocol/unfinished_block.d.ts +17 -0
  54. package/api/chia_rs/chia-protocol/unfinished_block.js +2 -0
  55. package/api/chia_rs/chia-protocol/vdf.d.ts +13 -0
  56. package/api/chia_rs/chia-protocol/vdf.js +2 -0
  57. package/api/{chia → pool-reference}/pool/record.d.ts +4 -4
  58. package/api/pool-reference/pool/record.js +2 -0
  59. package/api/rpc/common/index.d.ts +2 -0
  60. package/api/rpc/data_layer/index.d.ts +42 -8
  61. package/api/rpc/data_layer/index.js +16 -2
  62. package/api/rpc/index.d.ts +3 -3
  63. package/api/rpc/index.js +10 -6
  64. package/api/rpc/pool/index.d.ts +1 -1
  65. package/api/rpc/wallet/index.d.ts +111 -12
  66. package/api/rpc/wallet/index.js +27 -13
  67. package/api/types.d.ts +1 -0
  68. package/api/types.js +2 -1
  69. package/api/ws/daemon/index.d.ts +40 -13
  70. package/api/ws/daemon/index.js +9 -2
  71. package/api/ws/full_node/index.d.ts +14 -3
  72. package/api/ws/full_node/index.js +14 -1
  73. package/api/ws/index.d.ts +2 -2
  74. package/api/ws/index.js +4 -2
  75. package/package.json +1 -1
  76. package/api/chia/types/blockchain_format/serialized_program.d.ts +0 -2
  77. /package/api/chia/{pool/record.js → types/unfinished_block.js} +0 -0
  78. /package/api/chia/{types/blockchain_format/serialized_program.js → wallet/signer_protocol.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,124 @@
1
1
  # Changelog
2
2
 
3
+ ## [14.2.0]
4
+ ### Note
5
+ - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params)
6
+ - The request parameters `kc_user` and `kc_service` is temporarily not working with `2.4.0` and `2.4.1` of
7
+ `chia-blockchain`.
8
+ This is a bug and not spec change so `chia-agent` stays to be able to set those params for now.
9
+ ### Changed
10
+ - Reorganized directory structure under `src/api/` in order to make it clear the dependencies from `chia_rs`/`pool_reference`
11
+ - [Daemon WebSocket API](./src/api/ws/daemon)
12
+ - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params)
13
+ - Added a `private` request parameter
14
+ - [Common RPC API](./src/api/rpc/common)
15
+ - [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent)
16
+ - Added a `genesis_challenge` response parameter
17
+ - [`Mirror`](./src/api/chia/data_layer/data_layer_wallet.ts) now has new `confirmed_at_height` property.
18
+ As a result of this addition, [`dl_get_mirrors`](./src/api/rpc/wallet/README.md#dl_get_mirrorsagent-params) is affected.
19
+ - [`PoolWalletInfo`](./src/api/chia/pools/pool_wallet_info.ts)'s `current_inner` property was removed.
20
+ As a result of this removal, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected.
21
+ - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
22
+ - [`pw_status`](./src/api/rpc/wallet/README.md#pw_statusagent-params)
23
+ - `CHIP-0029` and `sign` request params were added to [`TXEndpointRequest`](./src/api/chia/rpc/util.ts).
24
+ Plus, `unsigned_transactions` and `signing_responses` were added to responses of TxEndpoint APIs.
25
+ As a result of these additions, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected.
26
+ - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params)
27
+ - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
28
+ - [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params)
29
+ - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
30
+ - [`send_notification`](./src/api/rpc/wallet/README.md#send_notificationagent-params)
31
+ - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
32
+ - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
33
+ - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
34
+ - [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params)
35
+ - [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params)
36
+ - [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params)
37
+ - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params)
38
+ - [`did_create_attest`](./src/api/rpc/wallet/README.md#did_create_attestagent-params)
39
+ - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params)
40
+ - [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params)
41
+ - [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params)
42
+ - [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params)
43
+ - [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params)
44
+ - [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params)
45
+ - [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params)
46
+ - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params)
47
+ - [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params)
48
+ - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
49
+ - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params)
50
+ - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
51
+ - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params)
52
+ - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params)
53
+ - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params)
54
+ - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
55
+ - [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params)
56
+ - [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params)
57
+ - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
58
+ - [`create_new_dl`](./src/api/rpc/wallet/README.md#create_new_dlagent-params)
59
+ - [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params)
60
+ - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params)
61
+ - [`dl_new_mirror`](./src/api/rpc/wallet/README.md#dl_new_mirroragent-params)
62
+ - [`dl_delete_mirror`](./src/api/rpc/wallet/README.md#dl_delete_mirroragent-params)
63
+ - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params)
64
+ - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params)
65
+ - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params)
66
+ - [`crcat_approve_pending`](./src/api/rpc/wallet/README.md#crcat_approve_pendingagent-params)
67
+ - [FullNode RPC API](./src/api/rpc/full_node)
68
+ - `TFarmBlockFullNodeRequest`, `TFarmBlockFullNodeResponse` and `farm_block_fullnode` are now
69
+ `TFarmBlockRequest`, `TFarmBlockResponse` and `farm_block`
70
+ - [Wallet RPC API](./src/api/rpc/wallet)
71
+ - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params)
72
+ - Added `sign` request parameter
73
+ - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params)
74
+ - Added `fee` optional request parameter
75
+ - Removed `tx_records` from response
76
+ ### Added
77
+ - [New Daemon WebSocket API](./src/api/ws/daemon)
78
+ - [`add_key`](./src/api/ws/daemon/README.md#add_keydaemon-params)
79
+ - [New DataLayer RPC API](./src/api/rpc/data_layer)
80
+ - [`multistore_batch_update`](./src/api/rpc/data_layer/README.md#multistore_batch_updateagent-params)
81
+ - [`submit_all_pending_roots`](./src/api/rpc/data_layer/README.md#submit_all_pending_rootsagent-params)
82
+ - [New FullNode WebSocket API](./src/api/ws/full_node)
83
+ - [`unfinished_block`](./src/api/ws/full_node/README.md#on_unfinished_block)
84
+ - [New Wallet RPC API](./src/api/rpc/wallet)
85
+ - [`gather_signing_info`](./src/api/rpc/wallet/README.md#gather_signing_infoagent-params)
86
+ - [`apply_signatures`](./src/api/rpc/wallet/README.md#apply_signaturesagent-params)
87
+ - [`submit_transactions`](./src/api/rpc/wallet/README.md#submit_transactionsagent-params)
88
+ ### Removed
89
+ - [Wallet RPC API](./src/api/rpc/wallet)
90
+ - `farm_block`
91
+ ### Fixed
92
+ - [Daemon WebSocket API](./src/api/ws/daemon)
93
+ - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params)
94
+ - Added missing `fingerprint` response property
95
+ - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params)
96
+ - [`check_keys`](./src/api/ws/daemon/README.md#check_keysdaemon-params)
97
+ - [`delete_all_keys`](./src/api/ws/daemon/README.md#delete_all_keysdaemon-params)
98
+ - [`delete_key_by_fingerprint`](./src/api/ws/daemon/README.md#delete_key_by_fingerprintdaemon-params)
99
+ - [`get_all_private_keys`](./src/api/ws/daemon/README.md#get_all_private_keysdaemon-params)
100
+ - [`get_first_private_key`](./src/api/ws/daemon/README.md#get_first_private_keydaemon-params)
101
+ - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params)
102
+ - [`get_key`](./src/api/ws/daemon/README.md#get_keydaemon-params)
103
+ - [`get_keys`](./src/api/ws/daemon/README.md#get_keysdaemon-params)
104
+ - [`get_public_key`](./src/api/ws/daemon/README.md#get_public_keydaemon-params)
105
+ - [`get_public_keys`](./src/api/ws/daemon/README.md#get_public_keysdaemon-params)
106
+ - [`set_label`](./src/api/ws/daemon/README.md#set_labeldaemon-params)
107
+ - [`delete_label`](./src/api/ws/daemon/README.md#delete_labeldaemon-params)
108
+ - Added a missing `kc_service` request parameter
109
+ - Removed `kc_test` request parameter
110
+ - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params)
111
+ - Made `error` response parameter non-optional when `success == False`
112
+ - [Common RPC API](./src/api/rpc/common)
113
+ - [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent)
114
+ - Added a missing `success` response parameter
115
+ - [Wallet RPC API](./src/api/rpc/wallet)
116
+ - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params)
117
+ - Fixed CAT request/response documentation incorrectness
118
+ - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params)
119
+ - Fixed response documentation incorrectness
120
+ - Fixed an issue where `Spend` and `SpendBundleCondition` were too old and missed several properties in the types.
121
+
3
122
  ## [14.1.0]
4
123
  ### Changed
5
124
  -`get_network_info` RPC API is now commonized and available in addition to `full_node` and `wallet`.
@@ -108,7 +227,7 @@
108
227
  - `dao_get_proposals` of Wallet RPC API
109
228
  - `dao_adjust_filter_level` of Wallet RPC API
110
229
  - Upgraded dependencies and replaced `yarn.lock` with `pnpm-lock.yaml`
111
- - Moved `FarmerRecord` to [src/chia/pool/record.ts](./src/api/chia/pool/record.ts) (
230
+ - Moved `FarmerRecord` to [src/chia/pool/record.ts](src/api/pool-reference/pool/record.ts) (
112
231
  Previously `src/chia/pool/store.ts`)
113
232
  ### Added
114
233
  - [Daemon WebSocket API](./src/api/ws/daemon)
@@ -1514,6 +1633,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
1514
1633
  Initial release.
1515
1634
 
1516
1635
  <!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
1636
+ [14.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.1.0...v14.2.0
1517
1637
  [14.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.0.0...v14.1.0
1518
1638
  [14.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v13.2.0...v14.0.0
1519
1639
  [13.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v13.1.0...v13.2.0
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 `chia 2.3.0`.
5
+ Supports all RPC/Websocket API available at `2.4.0` and `2.4.1` 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,10 +22,12 @@ yarn add chia-agent
22
22
 
23
23
  ## Compatibility
24
24
  This code is compatible with:
25
- - [`5ec14169475030d00767a821b674f76407f7f075`](https://github.com/Chia-Network/chia-blockchain/tree/5ec14169475030d00767a821b674f76407f7f075) of [chia-blockchain 2.3.0](https://github.com/Chia-Network/chia-blockchain)
26
- - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/5ec14169475030d00767a821b674f76407f7f075...main)
27
- - [`66cfc09e01b8b3590efab6928867a6b463c5e557`](https://github.com/Chia-Network/pool-reference/tree/66cfc09e01b8b3590efab6928867a6b463c5e557) 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/66cfc09e01b8b3590efab6928867a6b463c5e557...main)
25
+ - [`4572390f40fce50ba186f13ae30b171887e3a104`](https://github.com/Chia-Network/chia-blockchain/tree/4572390f40fce50ba186f13ae30b171887e3a104) of [chia-blockchain 2.4.1](https://github.com/Chia-Network/chia-blockchain)
26
+ - [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/4572390f40fce50ba186f13ae30b171887e3a104...main)
27
+ - [`284dfdffe0397413bfec2376da0c2f038b7ebe4d`](https://github.com/Chia-Network/pool-reference/tree/284dfdffe0397413bfec2376da0c2f038b7ebe4d) 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/284dfdffe0397413bfec2376da0c2f038b7ebe4d...main)
29
+ - [`3f8a42b9d81e513dfc6c151d952a1c3f17030a8d`](https://github.com/Chia-Network/chia_rs/tree/3f8a42b9d81e513dfc6c151d952a1c3f17030a8d) of [chia_rs](https://github.com/Chia-Network/chia_rs)
30
+ - [Diff to the main branch of chia_rs](https://github.com/Chia-Network/chia_rs/compare/3f8a42b9d81e513dfc6c151d952a1c3f17030a8d...main)
29
31
 
30
32
  ## API
31
33
  There are 2 kinds of APIs in chia.
@@ -1,32 +1 @@
1
- import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
- import { ClassgroupElement } from "../types/blockchain_format/classgroup";
3
- import { Coin } from "../types/blockchain_format/coin";
4
- import { SubEpochSummary } from "../types/blockchain_format/sub_epoch_summary";
5
- import { bool, Optional, uint128, uint32, uint64, uint8 } from "../types/_python_types_";
6
- export type BlockRecord = {
7
- header_hash: bytes32;
8
- prev_hash: bytes32;
9
- height: uint32;
10
- weight: uint128;
11
- total_iters: uint128;
12
- signage_point_index: uint8;
13
- challenge_vdf_output: ClassgroupElement;
14
- infused_challenge_vdf_output: Optional<ClassgroupElement>;
15
- reward_infusion_new_challenge: bytes32;
16
- challenge_block_info_hash: bytes32;
17
- sub_slot_iters: uint64;
18
- pool_puzzle_hash: bytes32;
19
- farmer_puzzle_hash: bytes32;
20
- required_iters: uint64;
21
- deficit: uint8;
22
- overflow: bool;
23
- prev_transaction_block_height: uint32;
24
- timestamp: Optional<uint64>;
25
- prev_transaction_block_hash: Optional<bytes32>;
26
- fees: Optional<uint64>;
27
- reward_claims_incorporated: Optional<Coin[]>;
28
- finished_challenge_slot_hashes: Optional<bytes32[]>;
29
- finished_infused_challenge_slot_hashes: Optional<bytes32[]>;
30
- finished_reward_slot_hashes: Optional<bytes32[]>;
31
- sub_epoch_summary_included: Optional<SubEpochSummary>;
32
- };
1
+ export type { BlockRecord } from "../../chia_rs/chia-protocol/block_record";
@@ -1,5 +1,5 @@
1
1
  import { bytes32 } from "../types/blockchain_format/sized_bytes";
2
- import { bool, str, uint32, uint64 } from "../types/_python_types_";
2
+ import { bool, Optional, str, uint32, uint64 } from "../types/_python_types_";
3
3
  import { LineageProof } from "../wallet/lineage_proof";
4
4
  export type SingletonRecord = {
5
5
  coin_id: bytes32;
@@ -18,4 +18,5 @@ export type Mirror = {
18
18
  amount: uint64;
19
19
  urls: str[];
20
20
  ours: bool;
21
+ confirmed_at_height: Optional<uint32>;
21
22
  };
@@ -1,7 +1,6 @@
1
1
  import { G1Element, Optional, str, uint32, uint8 } from "../types/_python_types_";
2
2
  import { bytes32 } from "../types/blockchain_format/sized_bytes";
3
3
  import { Coin } from "../types/blockchain_format/coin";
4
- import { Program } from "../types/blockchain_format/program";
5
4
  export type PoolState = {
6
5
  version: uint8;
7
6
  state: uint8;
@@ -16,7 +15,6 @@ export type PoolWalletInfo = {
16
15
  launcher_coin: Coin;
17
16
  launcher_id: bytes32;
18
17
  p2_singleton_puzzle_hash: bytes32;
19
- current_inner: Program;
20
18
  tip_singleton_coin_id: bytes32;
21
19
  singleton_block_height: uint32;
22
20
  };
@@ -9,4 +9,6 @@ export type TXEndpointRequest = {
9
9
  wallet_type: str;
10
10
  extra_conditions?: ExtraCondition[];
11
11
  push?: bool;
12
+ "CHIP-0029"?: bool;
13
+ sign?: bool;
12
14
  } & TXConfigLoader & TXEndpointForCompat & Partial<ConditionValidTimes>;
@@ -1,11 +1,54 @@
1
- import { uint32 } from "../types/_python_types_";
1
+ import { bool, str, True, uint32 } from "../types/_python_types_";
2
2
  import { bytes32 } from "../types/blockchain_format/sized_bytes";
3
3
  import { Notification } from "../wallet/notification_store";
4
+ import { SignedTransaction, SigningInstructions, SigningResponse, Spend } from "../wallet/signer_protocol";
4
5
  export type GetNotifications = {
5
6
  ids?: bytes32[];
6
7
  start?: uint32;
7
8
  end?: uint32;
9
+ "CHIP-0029": bool;
8
10
  };
9
11
  export type GetNotificationsResponse = {
10
12
  notifications: Notification[];
11
13
  };
14
+ export type GatherSigningInfo = {
15
+ spends: Spend[];
16
+ };
17
+ export type GatherSigningInfoCHIP0029 = {
18
+ "CHIP-0029": True;
19
+ spends: str[];
20
+ };
21
+ export type GatherSigningInfoResponse = {
22
+ signing_instructions: SigningInstructions;
23
+ };
24
+ export type GatherSigningInfoResponseCHIP0029 = {
25
+ signing_instructions: str;
26
+ };
27
+ export type ApplySignatures = {
28
+ spends: Spend[];
29
+ signing_responses: SigningResponse[];
30
+ };
31
+ export type ApplySignaturesCHIP0029 = {
32
+ "CHIP-0029": True;
33
+ spends: str[];
34
+ signing_responses: str[];
35
+ };
36
+ export type ApplySignaturesResponse = {
37
+ signed_transactions: SignedTransaction[];
38
+ };
39
+ export type ApplySignaturesResponseCHIP0029 = {
40
+ signed_transactions: str[];
41
+ };
42
+ export type SubmitTransactions = {
43
+ signed_transactions: SignedTransaction[];
44
+ };
45
+ export type SubmitTransactionsCHIP0029 = {
46
+ "CHIP-0029": True;
47
+ signed_transactions: str[];
48
+ };
49
+ export type SubmitTransactionsResponse = {
50
+ mempool_ids: bytes32[];
51
+ };
52
+ export type SubmitTransactionsResponseCHIP0029 = {
53
+ mempool_ids: str[];
54
+ };
@@ -1,4 +1 @@
1
- import { bytes100 } from "./sized_bytes";
2
- export type ClassgroupElement = {
3
- data: bytes100;
4
- };
1
+ export type { ClassgroupElement } from "../../../chia_rs/chia-protocol/classgroup";
@@ -1,11 +1 @@
1
- import { bytes32 } from "./sized_bytes";
2
- import { uint64 } from "../_python_types_";
3
- /**
4
- * The actual definition of `Coin` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/coin.rs
5
- * from chia-blockchain@1.5.1
6
- */
7
- export type Coin = {
8
- parent_coin_info: bytes32;
9
- puzzle_hash: bytes32;
10
- amount: uint64;
11
- };
1
+ export { Coin } from "../../../chia_rs/chia-protocol/coin";
@@ -1,35 +1 @@
1
- import { PoolTarget } from "./pool_target";
2
- import { G2Element, Optional, uint64 } from "../_python_types_";
3
- import { Coin } from "./coin";
4
- import { bytes32 } from "./sized_bytes";
5
- export type Foliage = {
6
- prev_block_hash: bytes32;
7
- reward_block_hash: bytes32;
8
- foliage_block_data: FoliageBlockData;
9
- foliage_block_data_signature: G2Element;
10
- foliage_transaction_block_hash: Optional<bytes32>;
11
- foliage_transaction_block_signature: Optional<G2Element>;
12
- };
13
- export type FoliageBlockData = {
14
- unfinished_reward_block_hash: bytes32;
15
- pool_target: PoolTarget;
16
- pool_signature: Optional<G2Element>;
17
- farmer_reward_puzzle_hash: bytes32;
18
- extension_data: bytes32;
19
- };
20
- export type FoliageTransactionBlock = {
21
- prev_transaction_block_hash: bytes32;
22
- timestamp: uint64;
23
- filter_hash: bytes32;
24
- additions_root: bytes32;
25
- removals_root: bytes32;
26
- transactions_info_hash: bytes32;
27
- };
28
- export type TransactionsInfo = {
29
- generator_root: bytes32;
30
- generator_refs_root: bytes32;
31
- aggregated_signature: G2Element;
32
- fees: uint64;
33
- cost: uint64;
34
- reward_claims_incorporated: Coin[];
35
- };
1
+ export type { Foliage, FoliageBlockData, FoliageTransactionBlock, TransactionsInfo, } from "../../../chia_rs/chia-protocol/foliage";
@@ -1,6 +1 @@
1
- import { bytes32 } from "./sized_bytes";
2
- import { uint32 } from "../_python_types_";
3
- export type PoolTarget = {
4
- puzzle_hash: bytes32;
5
- max_height: uint32;
6
- };
1
+ export type { PoolTarget } from "../../../chia_rs/chia-protocol/pool_target";
@@ -1,10 +1 @@
1
- import { bytes32 } from "./sized_bytes";
2
- import { bytes, G1Element, Optional, uint8 } from "../_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
- };
1
+ export type { ProofOfSpace } from "../../../chia_rs/chia-protocol/proof_of_space";
@@ -1,30 +1 @@
1
- import { ProofOfSpace } from "./proof_of_space";
2
- import { VDFInfo } from "./vdf";
3
- import { bool, G2Element, Optional, uint128, uint32, uint8 } from "../_python_types_";
4
- import { bytes32 } from "./sized_bytes";
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
- };
1
+ export type { RewardChainBlockUnfinished, RewardChainBlock, } from "../../../chia_rs/chia-protocol/reward_chain_block";
@@ -1,24 +1 @@
1
- import { VDFInfo, VDFProof } from "./vdf";
2
- import { bytes32 } from "./sized_bytes";
3
- import { Optional, uint64, uint8 } from "../_python_types_";
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
- };
1
+ export type { ChallengeChainSubSlot, InfusedChallengeChainSubSlot, RewardChainSubSlot, SubSlotProofs, } from "../../../chia_rs/chia-protocol/slots";
@@ -1,9 +1 @@
1
- import { bytes32 } from "./sized_bytes";
2
- import { Optional, uint64, uint8 } from "../_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
- };
1
+ export type { SubEpochSummary } from "../../../chia_rs/chia-protocol/sub_epoch_summary";
@@ -1,13 +1 @@
1
- import { ClassgroupElement } from "./classgroup";
2
- import { bytes32 } from "./sized_bytes";
3
- import { bool, bytes, uint64, uint8 } from "../_python_types_";
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
- };
1
+ export type { VDFProof, VDFInfo } from "../../../chia_rs/chia-protocol/vdf";
@@ -1,11 +1,6 @@
1
- import { Coin } from "./blockchain_format/coin";
2
- import { SerializedProgram } from "./blockchain_format/serialized_program";
3
1
  import { ConditionWithArgs } from "./condition_with_args";
4
- export type CoinSpend = {
5
- coin: Coin;
6
- puzzle_reveal: SerializedProgram;
7
- solution: SerializedProgram;
8
- };
2
+ import { CoinSpend } from "../../chia_rs/chia-protocol/coin_spend";
3
+ export { CoinSpend } from "../../chia_rs/chia-protocol/coin_spend";
9
4
  export type CoinSpendWithConditions = {
10
5
  coin_spend: CoinSpend;
11
6
  conditions: ConditionWithArgs[];
@@ -1,8 +1 @@
1
- import { ChallengeChainSubSlot, InfusedChallengeChainSubSlot, RewardChainSubSlot, SubSlotProofs } from "./blockchain_format/slots";
2
- import { Optional } from "./_python_types_";
3
- export type EndOfSubSlotBundle = {
4
- challenge_chain: ChallengeChainSubSlot;
5
- infused_challenge_chain: Optional<InfusedChallengeChainSubSlot>;
6
- reward_chain: RewardChainSubSlot;
7
- proofs: SubSlotProofs;
8
- };
1
+ export type { EndOfSubSlotBundle } from "../../chia_rs/chia-protocol/end_of_sub_slot_bundle";
@@ -1,24 +1 @@
1
- import { EndOfSubSlotBundle } from "./end_of_slot_bundle";
2
- import { RewardChainBlock } from "./blockchain_format/reward_chain_block";
3
- import { VDFProof } from "./blockchain_format/vdf";
4
- import { Foliage, FoliageTransactionBlock, TransactionsInfo } from "./blockchain_format/foliage";
5
- import { Optional, uint32 } from "./_python_types_";
6
- import { SerializedProgram } from "./blockchain_format/serialized_program";
7
- /**
8
- * The actual definition of `FullBlock` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/fullblock.rs
9
- * from chia-blockchain@2.3.0
10
- */
11
- export type FullBlock = {
12
- finished_sub_slots: EndOfSubSlotBundle[];
13
- reward_chain_block: RewardChainBlock;
14
- challenge_chain_sp_proof: Optional<VDFProof>;
15
- challenge_chain_ip_proof: VDFProof;
16
- reward_chain_sp_proof: Optional<VDFProof>;
17
- reward_chain_ip_proof: VDFProof;
18
- infused_challenge_chain_ip_proof: Optional<VDFProof>;
19
- foliage: Foliage;
20
- foliage_transaction_block: Optional<FoliageTransactionBlock>;
21
- transactions_info: Optional<TransactionsInfo>;
22
- transactions_generator: Optional<SerializedProgram>;
23
- transactions_generator_ref_list: uint32[];
24
- };
1
+ export type { FullBlock } from "../../chia_rs/chia-protocol/fullblock";
@@ -1,26 +1 @@
1
- import { bytes32, bytes48 } from "./blockchain_format/sized_bytes";
2
- import { bytes, Optional, uint32, uint64 } from "./_python_types_";
3
- /**
4
- * The actual definition of `Spend` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/run_generator.rs
5
- * from chia-blockchain@1.5.1
6
- */
7
- export type Spend = {
8
- coin_id: bytes32;
9
- puzzle_hash: bytes32;
10
- height_relative: Optional<uint32>;
11
- seconds_relative: uint64;
12
- create_coin: Array<[bytes32, uint64, bytes]>;
13
- agg_sig_me: Array<[bytes48, bytes]>;
14
- };
15
- /**
16
- * The actual definition of `SpendBundleConditions` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/run_generator.rs
17
- * from chia-blockchain@1.5.1
18
- */
19
- export type SpendBundleConditions = {
20
- spends: Spend[];
21
- reserve_fee: uint64;
22
- height_absolute: uint32;
23
- seconds_absolute: uint64;
24
- agg_sig_unsafe: Array<[bytes48, bytes]>;
25
- cost: uint64;
26
- };
1
+ export { SpendBundleConditions } from "../../chia_rs/chia-consensus/gen/owned_conditions";
@@ -0,0 +1 @@
1
+ export type { UnfinishedBlock } from "../../chia_rs/chia-protocol/unfinished_block";
@@ -0,0 +1,54 @@
1
+ import { bytes, str, uint64 } from "../types/_python_types_";
2
+ import { bytes32 } from "../types/blockchain_format/sized_bytes";
3
+ import { Program } from "../types/blockchain_format/program";
4
+ export type Coin = {
5
+ parent_coin_id: bytes32;
6
+ puzzle_hash: bytes32;
7
+ amount: uint64;
8
+ };
9
+ export type Spend = {
10
+ coin: Coin;
11
+ puzzle: Program;
12
+ solution: Program;
13
+ };
14
+ export type TransactionInfo = {
15
+ spends: Spend[];
16
+ };
17
+ export type SigningTarget = {
18
+ fingerprint: bytes;
19
+ message: bytes;
20
+ hook: bytes32;
21
+ };
22
+ export type SumHint = {
23
+ fingerprints: bytes[];
24
+ synthetic_offset: bytes;
25
+ final_pubkey: bytes;
26
+ };
27
+ export type PathHint = {
28
+ root_fingerprint: bytes;
29
+ path: uint64[];
30
+ };
31
+ export type KeyHints = {
32
+ sum_hints: SumHint[];
33
+ path_hints: PathHint[];
34
+ };
35
+ export type SigningInstructions = {
36
+ key_hints: KeyHints;
37
+ targets: SigningTarget[];
38
+ };
39
+ export type UnsignedTransaction = {
40
+ transaction_info: TransactionInfo;
41
+ signing_instructions: SigningInstructions;
42
+ };
43
+ export type SigningResponse = {
44
+ signature: bytes;
45
+ hook: bytes32;
46
+ };
47
+ export type Signature = {
48
+ type: str;
49
+ signature: bytes;
50
+ };
51
+ export type SignedTransaction = {
52
+ transaction_info: TransactionInfo;
53
+ signatures: Signature[];
54
+ };
@@ -0,0 +1,2 @@
1
+ import { G1Element } from "../../chia/types/_python_types_";
2
+ export type PublicKey = G1Element;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });