chia-agent 14.0.0 → 14.1.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.
- package/CHANGELOG.md +132 -3
- package/LICENSE +1 -1
- package/README.md +5 -5
- package/agent/index.d.ts +1 -1
- package/api/chia/consensus/block_record.d.ts +1 -1
- package/api/chia/consensus/blockchain.d.ts +2 -1
- package/api/chia/consensus/cost_calculator.d.ts +1 -1
- package/api/chia/data_layer/data_layer_util.d.ts +16 -16
- package/api/chia/data_layer/data_layer_wallet.d.ts +2 -2
- package/api/chia/farmer/farmer.d.ts +1 -1
- package/api/chia/full_node/signage_point.d.ts +1 -1
- package/api/chia/harvester/harvester.d.ts +1 -1
- package/api/chia/plot-sync/receiver.d.ts +2 -2
- package/api/chia/plotters/bladebit.d.ts +1 -1
- package/api/chia/plotters/chiapos.d.ts +1 -1
- package/api/chia/plotters/maxmax.d.ts +1 -1
- package/api/chia/plotting/util.d.ts +3 -3
- package/api/chia/pool/{store.d.ts → record.d.ts} +1 -1
- package/api/chia/pools/pool_config.d.ts +1 -1
- package/api/chia/pools/pool_wallet_info.d.ts +2 -2
- package/api/chia/protocols/farmer_protocol.d.ts +8 -8
- package/api/chia/protocols/harvester_protocol.d.ts +1 -1
- package/api/chia/protocols/pool_protocol.d.ts +13 -13
- package/api/chia/rpc/util.d.ts +12 -0
- package/api/chia/rpc/util.js +2 -0
- package/api/chia/rpc/wallet_request_types.d.ts +2 -2
- package/api/chia/server/outbound_message.d.ts +1 -1
- package/api/chia/timelord/types.d.ts +1 -1
- package/api/chia/types/_python_types_.d.ts +22 -22
- package/api/chia/types/blockchain_format/classgroup.d.ts +1 -1
- package/api/chia/types/blockchain_format/coin.d.ts +1 -1
- package/api/chia/types/blockchain_format/foliage.d.ts +4 -4
- package/api/chia/types/blockchain_format/pool_target.d.ts +1 -1
- package/api/chia/types/blockchain_format/program.d.ts +1 -1
- package/api/chia/types/blockchain_format/proof_of_space.d.ts +1 -1
- package/api/chia/types/blockchain_format/reward_chain_block.d.ts +2 -2
- package/api/chia/types/blockchain_format/serialized_program.d.ts +1 -1
- package/api/chia/types/blockchain_format/sized_bytes.d.ts +7 -7
- package/api/chia/types/blockchain_format/slots.d.ts +4 -4
- package/api/chia/types/blockchain_format/sub_epoch_summary.d.ts +1 -1
- package/api/chia/types/blockchain_format/vdf.d.ts +2 -2
- package/api/chia/types/clvm_cost.d.ts +1 -1
- package/api/chia/types/coin_record.d.ts +2 -2
- package/api/chia/types/coin_spend.d.ts +2 -2
- package/api/chia/types/condition_opcode.d.ts +1 -1
- package/api/chia/types/condition_with_args.d.ts +1 -1
- package/api/chia/types/end_of_slot_bundle.d.ts +1 -1
- package/api/chia/types/full_block.d.ts +5 -1
- package/api/chia/types/mempool_item.d.ts +3 -3
- package/api/chia/types/mojos.d.ts +1 -1
- package/api/chia/types/signing_mode.d.ts +6 -6
- package/api/chia/types/spend_bundle.d.ts +1 -1
- package/api/chia/types/spend_bundle_condition.d.ts +2 -2
- package/api/chia/types/unfinished_header_block.d.ts +1 -1
- package/api/chia/util/keychain.d.ts +2 -2
- package/api/chia/util/misc.d.ts +1 -1
- package/api/chia/wallet/cat_wallet/cat_constants.d.ts +1 -1
- package/api/chia/wallet/conditions.d.ts +2 -2
- package/api/chia/wallet/dao_wallet/dao_info.d.ts +5 -5
- package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +3 -3
- package/api/chia/wallet/lineage_proof.d.ts +1 -1
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +1 -1
- package/api/chia/wallet/notification_store.d.ts +1 -1
- package/api/chia/wallet/puzzle_drivers.d.ts +2 -2
- package/api/chia/wallet/puzzles/clawback/metadata.d.ts +2 -2
- package/api/chia/wallet/trade_record.d.ts +3 -3
- package/api/chia/wallet/transaction_record.d.ts +4 -4
- package/api/chia/wallet/util/quality_filter.d.ts +5 -5
- package/api/chia/wallet/util/tx_config.d.ts +4 -11
- package/api/chia/wallet/util/wallet_types.d.ts +1 -1
- package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +2 -2
- package/api/chia/wallet/vc_wallet/vc_store.d.ts +1 -1
- package/api/chia/wallet/wallet_coin_record.d.ts +2 -2
- package/api/chia/wallet/wallet_coin_store.d.ts +1 -1
- package/api/chia/wallet/wallet_info.d.ts +2 -2
- package/api/chia/wallet/wallet_node.d.ts +1 -1
- package/api/rpc/common/index.d.ts +32 -24
- package/api/rpc/common/index.js +8 -1
- package/api/rpc/crawler/index.d.ts +10 -10
- package/api/rpc/data_layer/index.d.ts +169 -129
- package/api/rpc/data_layer/index.js +9 -2
- package/api/rpc/farmer/index.d.ts +52 -55
- package/api/rpc/full_node/index.d.ts +140 -154
- package/api/rpc/full_node/index.js +2 -9
- package/api/rpc/harvester/index.d.ts +31 -34
- package/api/rpc/index.d.ts +7 -7
- package/api/rpc/index.js +7 -7
- package/api/rpc/pool/index.d.ts +13 -13
- package/api/rpc/wallet/index.d.ts +642 -635
- package/api/rpc/wallet/index.js +6 -13
- package/api/types.d.ts +3 -3
- package/api/ws/chia_plots_create/index.d.ts +7 -7
- package/api/ws/crawler/index.d.ts +9 -9
- package/api/ws/daemon/index.d.ts +159 -154
- package/api/ws/daemon/index.js +9 -2
- package/api/ws/farmer/index.d.ts +34 -34
- package/api/ws/full_node/index.d.ts +17 -17
- package/api/ws/harvester/index.d.ts +19 -19
- package/api/ws/index.d.ts +2 -2
- package/api/ws/index.js +2 -1
- package/api/ws/timelord/index.d.ts +14 -14
- package/api/ws/wallet/index.d.ts +22 -22
- package/bin/cli.js +3 -3
- package/config/index.d.ts +1 -1
- package/config/index.js +3 -3
- package/daemon/connection.js +9 -10
- package/daemon/index.d.ts +6 -6
- package/daemon/index.js +21 -21
- package/index.js +5 -1
- package/logger.d.ts +3 -3
- package/package.json +3 -3
- package/rpc/index.d.ts +6 -4
- package/rpc/index.js +29 -29
- /package/api/chia/pool/{store.js → record.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,142 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [14.1.0]
|
|
4
|
+
### Changed
|
|
5
|
+
-`get_network_info` RPC API is now commonized and available in addition to `full_node` and `wallet`.
|
|
6
|
+
- [DataLayer RPC API](./src/api/rpc/data_layer)
|
|
7
|
+
- [`get_keys`](./src/api/rpc/data_layer/README.md#get_keysagent-params)
|
|
8
|
+
- Added `page` to request parameter
|
|
9
|
+
- Added `max_page_size` to request parameter
|
|
10
|
+
- Added `total_pages`, `total_bytes` and `root_hash` to response
|
|
11
|
+
- [`get_keys_values`](./src/api/rpc/data_layer/README.md#get_keys_valuesagent-params)
|
|
12
|
+
- Added `page` to request parameter
|
|
13
|
+
- Added `max_page_size` to request parameter
|
|
14
|
+
- Added `total_pages`, `total_bytes` and `root_hash` to response
|
|
15
|
+
- [`batch_update`](./src/api/rpc/data_layer/README.md#batch_updateagent-params)
|
|
16
|
+
- Added `submit_on_chain` to request parameter
|
|
17
|
+
- Made `tx_id` in response optional
|
|
18
|
+
- [`get_kv_diff`](./src/api/rpc/data_layer/README.md#get_kv_diffagent-params)
|
|
19
|
+
- Added `page` to request parameter
|
|
20
|
+
- Added `max_page_size` to request parameter
|
|
21
|
+
- Added `total_pages` and `total_bytes` to response
|
|
22
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
23
|
+
- [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params)
|
|
24
|
+
- A request parameter `transactions` is allowed to be `TransactionRecordConvenience[]`
|
|
25
|
+
- [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params)
|
|
26
|
+
- `transactions` is added to response for `cat_wallet` if `mode` in request is `new`
|
|
27
|
+
- `transactions` is added to response for `dao_wallet`
|
|
28
|
+
- `transactions` is added to response for `pool_wallet` if `mode` in request is `new`
|
|
29
|
+
- [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
|
|
30
|
+
- Changed the type of `fee` to `uint64` and made it optional
|
|
31
|
+
- Added `transactions` to response
|
|
32
|
+
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params)
|
|
33
|
+
- Simplified `TSendTransactionMultiRequest`
|
|
34
|
+
- Added `transactions` to response
|
|
35
|
+
- [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params)
|
|
36
|
+
- Added `transactions` to response
|
|
37
|
+
- [`send_notification`](./src/api/rpc/wallet/README.md#send_notificationagent-params)
|
|
38
|
+
- Added `transactions` to response
|
|
39
|
+
- [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
|
|
40
|
+
- Added `transactions` to response
|
|
41
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
|
|
42
|
+
- Added `transactions` to response
|
|
43
|
+
- [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
|
|
44
|
+
- Added `transactions` to response
|
|
45
|
+
- [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params)
|
|
46
|
+
- Added `transactions` to response
|
|
47
|
+
- [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params)
|
|
48
|
+
- Added `transactions` to response
|
|
49
|
+
- [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params)
|
|
50
|
+
- Added `transactions` to response
|
|
51
|
+
- [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params)
|
|
52
|
+
- Added `transactions` to response
|
|
53
|
+
- [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params)
|
|
54
|
+
- Added `transactions` to response
|
|
55
|
+
- [`did_recovery_spend`](./src/api/rpc/wallet/README.md#did_recovery_spendagent-params)
|
|
56
|
+
- Added `transactions` to response
|
|
57
|
+
- [`did_create_attest`](./src/api/rpc/wallet/README.md#did_create_attestagent-params)
|
|
58
|
+
- Added `transactions` to response
|
|
59
|
+
- [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params)
|
|
60
|
+
- Added `transactions` to response
|
|
61
|
+
- [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params)
|
|
62
|
+
- Added `transactions` to response
|
|
63
|
+
- [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params)
|
|
64
|
+
- Added `transactions` to response
|
|
65
|
+
- [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params)
|
|
66
|
+
- Added `transactions` to response
|
|
67
|
+
- [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params)
|
|
68
|
+
- Added `transactions` to response
|
|
69
|
+
- [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params)
|
|
70
|
+
- Added `transactions` to response
|
|
71
|
+
- [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params)
|
|
72
|
+
- Added `transactions` to response
|
|
73
|
+
- [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params)
|
|
74
|
+
- Added `transactions` to response
|
|
75
|
+
- [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
|
|
76
|
+
- Added `transactions` to response
|
|
77
|
+
- [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params)
|
|
78
|
+
- Added `transactions` to response
|
|
79
|
+
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params)
|
|
80
|
+
- Added `transactions` to response
|
|
81
|
+
- [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params)
|
|
82
|
+
- Added `transactions` to response
|
|
83
|
+
- [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params)
|
|
84
|
+
- Added `transactions` to response
|
|
85
|
+
- [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params)
|
|
86
|
+
- Added `transactions` to response
|
|
87
|
+
- [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
|
|
88
|
+
- Added `transactions` to response
|
|
89
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
|
|
90
|
+
- Added `morph_bytes` to request parameter
|
|
91
|
+
- Added `transactions` to response
|
|
92
|
+
- [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params)
|
|
93
|
+
- Added `transactions` to response
|
|
94
|
+
- [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params)
|
|
95
|
+
- Added `transactions` to response
|
|
96
|
+
- [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
|
|
97
|
+
- Added `transactions` to response
|
|
98
|
+
- [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params)
|
|
99
|
+
- Added `transactions` to response
|
|
100
|
+
- [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params)
|
|
101
|
+
- Added `transactions` to response
|
|
102
|
+
- Moved `TxEndpoint` to [src/chia/rpc/util.ts](./src/api/chia/rpc/util.ts) (Previously `src/chia/wallet/util/tx_config.ts`)
|
|
103
|
+
- Renamed `TxEndPoint` to `TXEndpointRequest`
|
|
104
|
+
- Renamed `TxEndpointForCompat` to `TXEndpointForCompat`
|
|
105
|
+
- Renamed `TxConfigLoader` to `TXConfigLoader`
|
|
106
|
+
- Changed the types of `passed` and `closed` in ProposalInfo` to `bool` (Previously they were `Optional<bool>`)
|
|
107
|
+
As a result, the RPC APIs below are affected
|
|
108
|
+
- `dao_get_proposals` of Wallet RPC API
|
|
109
|
+
- `dao_adjust_filter_level` of Wallet RPC API
|
|
110
|
+
- 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) (
|
|
112
|
+
Previously `src/chia/pool/store.ts`)
|
|
113
|
+
### Added
|
|
114
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
115
|
+
- [`get_network_info`](./src/api/ws/daemon/README.md#get_network_infodaemon)
|
|
116
|
+
- [Common RPC API](./src/api/rpc/common)
|
|
117
|
+
- [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent)
|
|
118
|
+
- [DataLayer RPC API](./src/api/rpc/data_layer)
|
|
119
|
+
- [`submit_pending_root`](./src/api/rpc/data_layer/README.md#submit_pending_rootagent-params)
|
|
120
|
+
### Fixed
|
|
121
|
+
- Renamed `ReceiveBlockResult` to `AddBlockResult` (type `ReceiveBlockResult` is still available to avoid breaking change)
|
|
122
|
+
- Fixed an invalid `TCreate_New_DAO_WalletRequest` README location.
|
|
123
|
+
- Fixed an issue where `pubkey` and `pubhash` in request of Wallet RPC API `did_recovery_spend` was not optional in the API doc.
|
|
124
|
+
- Fixed lint errors
|
|
125
|
+
### Removed
|
|
126
|
+
- [FullNode RPC API](./src/api/rpc/data_layer)
|
|
127
|
+
- `get_network_info_of_full_node`
|
|
128
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
129
|
+
- `get_network_info_of_wallet`
|
|
130
|
+
- Removed empty request parameter types like `{}`
|
|
131
|
+
|
|
3
132
|
## [14.0.0]
|
|
4
133
|
### Breaking change
|
|
5
134
|
- When RPC API responds with `success: false`, its `Promise` now does `reject`. (Previously it does `resolve`)
|
|
6
135
|
- At chia-blockchain@2.2.1, in `chia/consensus/cost_calculator.py`,
|
|
7
136
|
`NPCResult.cost` was removed.
|
|
8
137
|
As a result, the RPC APIs below might be incompatible between `2.1.4` and `2.2.1`.
|
|
9
|
-
- `get_all_mempool_items`
|
|
10
|
-
- `get_mempool_item_by_tx_id`
|
|
138
|
+
- `get_all_mempool_items` of FullNode RPC API
|
|
139
|
+
- `get_mempool_item_by_tx_id` of FullNode RPC API
|
|
11
140
|
### Changed
|
|
12
141
|
- Loosened a type of `agent` to call RPC APIs. RPC APIs can be invoked with `agent` which just implements
|
|
13
142
|
`sendMessage` method depicted as below.
|
|
@@ -1385,7 +1514,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
1385
1514
|
Initial release.
|
|
1386
1515
|
|
|
1387
1516
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
1388
|
-
|
|
1517
|
+
[14.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v14.0.0...v14.1.0
|
|
1389
1518
|
[14.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v13.2.0...v14.0.0
|
|
1390
1519
|
[13.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v13.1.0...v13.2.0
|
|
1391
1520
|
[13.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v13.0.1...v13.1.0
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 Izumi Hoshino <admin@chiamine.jp>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://badge.fury.io/js/chia-agent) [](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.
|
|
5
|
+
Supports all RPC/Websocket API available at `chia 2.3.0`.
|
|
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,10 @@ yarn add chia-agent
|
|
|
22
22
|
|
|
23
23
|
## Compatibility
|
|
24
24
|
This code is compatible with:
|
|
25
|
-
- [`
|
|
26
|
-
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/
|
|
27
|
-
- [`
|
|
28
|
-
- [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/
|
|
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)
|
|
29
29
|
|
|
30
30
|
## API
|
|
31
31
|
There are 2 kinds of APIs in chia.
|
package/agent/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ClassgroupElement } from "../types/blockchain_format/classgroup";
|
|
|
3
3
|
import { Coin } from "../types/blockchain_format/coin";
|
|
4
4
|
import { SubEpochSummary } from "../types/blockchain_format/sub_epoch_summary";
|
|
5
5
|
import { bool, Optional, uint128, uint32, uint64, uint8 } from "../types/_python_types_";
|
|
6
|
-
export
|
|
6
|
+
export type BlockRecord = {
|
|
7
7
|
header_hash: bytes32;
|
|
8
8
|
prev_hash: bytes32;
|
|
9
9
|
height: uint32;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type AddBlockResult = 1 | 2 | 3 | 4 | 5;
|
|
2
|
+
export type ReceiveBlockResult = AddBlockResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpendBundleConditions } from "../types/spend_bundle_condition";
|
|
2
2
|
import { Optional, uint16 } from "../types/_python_types_";
|
|
3
|
-
export
|
|
3
|
+
export type NPCResult = {
|
|
4
4
|
error: Optional<uint16>;
|
|
5
5
|
conds: Optional<SpendBundleConditions>;
|
|
6
6
|
};
|
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
import { bool, int, Optional, str, uint8 } from "../types/_python_types_";
|
|
2
2
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
3
|
-
export
|
|
3
|
+
export type KeyValueMarshalled = {
|
|
4
4
|
key: str;
|
|
5
5
|
value: str;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type OfferStoreMarshalled = {
|
|
8
8
|
store_id: str;
|
|
9
9
|
inclusions: KeyValueMarshalled[];
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type StoreProofsMarshalled = {
|
|
12
12
|
store_id: str;
|
|
13
13
|
proofs: ProofMarshalled[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type ProofMarshalled = {
|
|
16
16
|
key: str;
|
|
17
17
|
value: str;
|
|
18
18
|
node_hash: str;
|
|
19
19
|
layers: LayerMarshalled[];
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type LayerMarshalled = {
|
|
22
22
|
other_hash_side: "left" | "right";
|
|
23
23
|
other_hash: str;
|
|
24
24
|
combined_hash: str;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type OfferMarshalled = {
|
|
27
27
|
trade_id: str;
|
|
28
28
|
offer: str;
|
|
29
29
|
taker: OfferStoreMarshalled[];
|
|
30
30
|
maker: StoreProofsMarshalled[];
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type SyncStatus = {
|
|
33
33
|
root_hash: bytes32;
|
|
34
34
|
generation: int;
|
|
35
35
|
target_root_hash: bytes32;
|
|
36
36
|
target_generation: int;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type PluginStatusMarshalled = {
|
|
39
39
|
plugin_status: {
|
|
40
40
|
uploaders: Record<str, Record<str, any>>;
|
|
41
41
|
downloaders: Record<str, Record<str, any>>;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type RootMarshalled = {
|
|
45
45
|
tree_id: str;
|
|
46
46
|
node_hash: Optional<str>;
|
|
47
47
|
generation: int;
|
|
48
48
|
status: int;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
50
|
+
export type ProofLayer = {
|
|
51
51
|
other_hash_side: uint8;
|
|
52
52
|
other_hash: bytes32;
|
|
53
53
|
combined_hash: bytes32;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type HashOnlyProof = {
|
|
56
56
|
key_clvm_hash: bytes32;
|
|
57
57
|
value_clvm_hash: bytes32;
|
|
58
58
|
node_hash: bytes32;
|
|
59
59
|
layers: ProofLayer[];
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type KeyValueHashes = {
|
|
62
62
|
key_clvm_hash: bytes32;
|
|
63
63
|
value_clvm_hash: bytes32;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
65
|
+
export type ProofResultInclusions = {
|
|
66
66
|
store_id: bytes32;
|
|
67
67
|
inclusions: KeyValueHashes[];
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type StoreProofsHashes = {
|
|
70
70
|
store_id: bytes32;
|
|
71
71
|
proofs: HashOnlyProof[];
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type DLProof = {
|
|
74
74
|
store_proofs: StoreProofsHashes;
|
|
75
75
|
coin_id: bytes32;
|
|
76
76
|
inner_puzzle_hash: bytes32;
|
|
77
77
|
};
|
|
78
|
-
export
|
|
78
|
+
export type VerifyProofResponse = {
|
|
79
79
|
verified_clvm_hashes: ProofResultInclusions;
|
|
80
80
|
current_root: bool;
|
|
81
81
|
success: bool;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
2
2
|
import { bool, str, uint32, uint64 } from "../types/_python_types_";
|
|
3
3
|
import { LineageProof } from "../wallet/lineage_proof";
|
|
4
|
-
export
|
|
4
|
+
export type SingletonRecord = {
|
|
5
5
|
coin_id: bytes32;
|
|
6
6
|
launcher_id: bytes32;
|
|
7
7
|
root: bytes32;
|
|
@@ -12,7 +12,7 @@ export declare type SingletonRecord = {
|
|
|
12
12
|
generation: uint32;
|
|
13
13
|
timestamp: uint64;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type Mirror = {
|
|
16
16
|
coin_id: str;
|
|
17
17
|
launcher_id: str;
|
|
18
18
|
amount: uint64;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { float, int, str, uint32, uint64, uint8 } from "../types/_python_types_";
|
|
2
2
|
import { PoolWalletConfig } from "../pools/pool_config";
|
|
3
3
|
import { ErrorResponse } from "../protocols/pool_protocol";
|
|
4
|
-
export
|
|
4
|
+
export type PoolState = {
|
|
5
5
|
points_found_since_start: int;
|
|
6
6
|
points_found_24h: Array<[uint32, uint64]>;
|
|
7
7
|
points_acknowledged_since_start: int;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VDFInfo, VDFProof } from "../types/blockchain_format/vdf";
|
|
2
2
|
import { Optional } from "../types/_python_types_";
|
|
3
|
-
export
|
|
3
|
+
export type SignagePoint = {
|
|
4
4
|
cc_vdf: Optional<VDFInfo>;
|
|
5
5
|
cc_proof: Optional<VDFProof>;
|
|
6
6
|
rc_vdf: Optional<VDFInfo>;
|
|
@@ -2,8 +2,8 @@ import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
|
2
2
|
import { bool, float, int, None, Optional, str, uint32 } from "../types/_python_types_";
|
|
3
3
|
import { Plot } from "../protocols/harvester_protocol";
|
|
4
4
|
import { HarvestingMode } from "../plotting/util";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type MayBeSummary<S, O> = S extends true ? int : O;
|
|
6
|
+
export type Receiver<SUMMARY extends boolean = false> = {
|
|
7
7
|
connection: {
|
|
8
8
|
node_id: bytes32;
|
|
9
9
|
host: str;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bool, str } from "../types/_python_types_";
|
|
2
2
|
export declare const display_name = "BladeBit Plotter";
|
|
3
|
-
export
|
|
3
|
+
export type bladebit_install_info = {
|
|
4
4
|
display_name: typeof display_name;
|
|
5
5
|
version?: str;
|
|
6
6
|
installed: bool;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bool, str } from "../types/_python_types_";
|
|
2
2
|
export declare const display_name = "Chia Proof of Space";
|
|
3
|
-
export
|
|
3
|
+
export type chiapos_install_info = {
|
|
4
4
|
display_name: typeof display_name;
|
|
5
5
|
version: str;
|
|
6
6
|
installed: bool;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type CPU_HARVESTING = 1;
|
|
2
|
+
export type GPU_HARVESTING = 2;
|
|
3
|
+
export type HarvestingMode = CPU_HARVESTING | GPU_HARVESTING;
|
|
@@ -2,7 +2,7 @@ import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
|
2
2
|
import { bool, G1Element, str, uint64 } from "../types/_python_types_";
|
|
3
3
|
import { CoinSpend } from "../types/coin_spend";
|
|
4
4
|
import { PoolState } from "../pools/pool_wallet_info";
|
|
5
|
-
export
|
|
5
|
+
export type FarmerRecord = {
|
|
6
6
|
launcher_id: bytes32;
|
|
7
7
|
p2_singleton_puzzle_hash: bytes32;
|
|
8
8
|
delay_time: uint64;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { G1Element, str } from "../types/_python_types_";
|
|
2
2
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
3
|
-
export
|
|
3
|
+
export type PoolWalletConfig = {
|
|
4
4
|
launcher_id: bytes32;
|
|
5
5
|
pool_url: str;
|
|
6
6
|
payout_instructions: str;
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { Program } from "../types/blockchain_format/program";
|
|
5
|
-
export
|
|
5
|
+
export type PoolState = {
|
|
6
6
|
version: uint8;
|
|
7
7
|
state: uint8;
|
|
8
8
|
target_puzzle_hash: bytes32;
|
|
@@ -10,7 +10,7 @@ export declare type PoolState = {
|
|
|
10
10
|
pool_url: Optional<str>;
|
|
11
11
|
relative_lock_height: uint32;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type PoolWalletInfo = {
|
|
14
14
|
current: PoolState;
|
|
15
15
|
target: Optional<PoolState>;
|
|
16
16
|
launcher_coin: Coin;
|
|
@@ -6,19 +6,19 @@ import { ClassgroupElement } from "../types/blockchain_format/classgroup";
|
|
|
6
6
|
import { ChallengeChainSubSlot, RewardChainSubSlot } from "../types/blockchain_format/slots";
|
|
7
7
|
import { FoliageBlockData, FoliageTransactionBlock } from "../types/blockchain_format/foliage";
|
|
8
8
|
import { RewardChainBlockUnfinished } from "../types/blockchain_format/reward_chain_block";
|
|
9
|
-
export
|
|
9
|
+
export type SPSubSlotSourceData = {
|
|
10
10
|
cc_sub_slot: ChallengeChainSubSlot;
|
|
11
11
|
rc_sub_slot: RewardChainSubSlot;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type SPVDFSourceData = {
|
|
14
14
|
cc_vdf: ClassgroupElement;
|
|
15
15
|
rc_vdf: ClassgroupElement;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type SignagePointSourceData = {
|
|
18
18
|
sub_slot_data: Optional<SPSubSlotSourceData>;
|
|
19
19
|
vdf_data: Optional<SPVDFSourceData>;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type NewSignagePoint = {
|
|
22
22
|
challenge_hash: bytes32;
|
|
23
23
|
challenge_chain_sp: bytes32;
|
|
24
24
|
reward_chain_sp: bytes32;
|
|
@@ -28,7 +28,7 @@ export declare type NewSignagePoint = {
|
|
|
28
28
|
peak_height: uint32;
|
|
29
29
|
sp_source_data: Optional<SignagePointSourceData>;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type DeclareProofOfSpace = {
|
|
32
32
|
challenge_hash: bytes32;
|
|
33
33
|
challenge_chain_sp: bytes32;
|
|
34
34
|
signage_point_index: uint8;
|
|
@@ -41,7 +41,7 @@ export declare type DeclareProofOfSpace = {
|
|
|
41
41
|
pool_signature: Optional<G2Element>;
|
|
42
42
|
include_signature_source_data: bool;
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type RequestSignedValues = {
|
|
45
45
|
quality_string: bytes32;
|
|
46
46
|
foliage_block_data_hash: bytes32;
|
|
47
47
|
foliage_transaction_block_hash: bytes32;
|
|
@@ -49,7 +49,7 @@ export declare type RequestSignedValues = {
|
|
|
49
49
|
foliage_transaction_block_data: Optional<FoliageTransactionBlock>;
|
|
50
50
|
rc_block_unfinished: Optional<RewardChainBlockUnfinished>;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type FarmingInfo = {
|
|
53
53
|
challenge_hash: bytes32;
|
|
54
54
|
sp_hash: bytes32;
|
|
55
55
|
timestamp: uint64;
|
|
@@ -58,7 +58,7 @@ export declare type FarmingInfo = {
|
|
|
58
58
|
total_plots: uint32;
|
|
59
59
|
lookup_time: uint64;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type SignedValues = {
|
|
62
62
|
quality_string: bytes32;
|
|
63
63
|
foliage_block_data_signature: G2Element;
|
|
64
64
|
foliage_transaction_block_signature: G2Element;
|
|
@@ -19,13 +19,13 @@ export declare const PoolErrorCode: {
|
|
|
19
19
|
DELAY_TIME_TOO_SHORT: number;
|
|
20
20
|
REQUEST_FAILED: number;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type AuthenticationPayload = {
|
|
23
23
|
method_name: str;
|
|
24
24
|
launcher_id: bytes32;
|
|
25
25
|
target_puzzle_hash: bytes32;
|
|
26
26
|
authentication_token: uint64;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type GetPoolInfoResponse = {
|
|
29
29
|
name: str;
|
|
30
30
|
logo_url: str;
|
|
31
31
|
minimum_difficulty: uint64;
|
|
@@ -36,7 +36,7 @@ export declare type GetPoolInfoResponse = {
|
|
|
36
36
|
target_puzzle_hash: bytes32;
|
|
37
37
|
authentication_token_timeout: uint8;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type PostPartialPayload = {
|
|
40
40
|
launcher_id: bytes32;
|
|
41
41
|
authentication_token: uint64;
|
|
42
42
|
proof_of_space: ProofOfSpace;
|
|
@@ -44,50 +44,50 @@ export declare type PostPartialPayload = {
|
|
|
44
44
|
end_of_sub_slot: bool;
|
|
45
45
|
harvester_id: bytes32;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type PostPartialRequest = {
|
|
48
48
|
payload: PostPartialPayload;
|
|
49
49
|
aggregate_signature: G2Element;
|
|
50
50
|
};
|
|
51
|
-
export
|
|
51
|
+
export type PostPartialResponse = {
|
|
52
52
|
new_difficulty: uint64;
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type GetFarmerResponse = {
|
|
55
55
|
authentication_public_key: G1Element;
|
|
56
56
|
payout_instructions: str;
|
|
57
57
|
current_difficulty: uint64;
|
|
58
58
|
current_points: uint64;
|
|
59
59
|
};
|
|
60
|
-
export
|
|
60
|
+
export type PostFarmerPayload = {
|
|
61
61
|
launcher_id: bytes32;
|
|
62
62
|
authentication_token: uint64;
|
|
63
63
|
authentication_public_key: G1Element;
|
|
64
64
|
payout_instructions: str;
|
|
65
65
|
suggested_difficulty: Optional<uint64>;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type PostFarmerRequest = {
|
|
68
68
|
payload: PostFarmerPayload;
|
|
69
69
|
signature: G2Element;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type PostFarmerResponse = {
|
|
72
72
|
welcome_message: str;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type PutFarmerPayload = {
|
|
75
75
|
launcher_id: bytes32;
|
|
76
76
|
authentication_token: uint64;
|
|
77
77
|
authentication_public_key: Optional<G1Element>;
|
|
78
78
|
payout_instructions: Optional<str>;
|
|
79
79
|
suggested_difficulty: Optional<uint64>;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type PutFarmerRequest = {
|
|
82
82
|
payload: PutFarmerPayload;
|
|
83
83
|
signature: G2Element;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type PutFarmerResponse = {
|
|
86
86
|
authentication_public_key: Optional<bool>;
|
|
87
87
|
payout_instructions: Optional<bool>;
|
|
88
88
|
suggested_difficulty: Optional<bool>;
|
|
89
89
|
};
|
|
90
|
-
export
|
|
90
|
+
export type ErrorResponse = {
|
|
91
91
|
error_code: uint16;
|
|
92
92
|
error_message: Optional<str>;
|
|
93
93
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { bool, int, str } from "../types/_python_types_";
|
|
2
|
+
import { Condition, ConditionValidTimes } from "../wallet/conditions";
|
|
3
|
+
import { TXConfigLoader, TXEndpointForCompat } from "../wallet/util/tx_config";
|
|
4
|
+
export type ExtraCondition = {
|
|
5
|
+
opcode: str | int;
|
|
6
|
+
args: Condition;
|
|
7
|
+
};
|
|
8
|
+
export type TXEndpointRequest = {
|
|
9
|
+
wallet_type: str;
|
|
10
|
+
extra_conditions?: ExtraCondition[];
|
|
11
|
+
push?: bool;
|
|
12
|
+
} & TXConfigLoader & TXEndpointForCompat & Partial<ConditionValidTimes>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { uint32 } from "../types/_python_types_";
|
|
2
2
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
3
3
|
import { Notification } from "../wallet/notification_store";
|
|
4
|
-
export
|
|
4
|
+
export type GetNotifications = {
|
|
5
5
|
ids?: bytes32[];
|
|
6
6
|
start?: uint32;
|
|
7
7
|
end?: uint32;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type GetNotificationsResponse = {
|
|
10
10
|
notifications: Notification[];
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NodeType = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Chain = 1 | 2 | 3 | 4;
|