chia-agent 12.0.1 → 13.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.
- package/CHANGELOG.md +112 -0
- package/README.md +3 -3
- package/api/chia/data_layer/data_layer_util.d.ts +7 -1
- package/api/chia/farmer/farmer.d.ts +12 -4
- package/api/chia/harvester/harvester.d.ts +1 -0
- package/api/chia/plot-sync/receiver.d.ts +3 -0
- package/api/chia/plotters/bladebit.d.ts +1 -0
- package/api/chia/plotting/util.d.ts +3 -0
- package/api/chia/plotting/util.js +2 -0
- package/api/chia/protocols/farmer_protocol.d.ts +1 -0
- package/api/chia/types/mempool_item.d.ts +9 -1
- package/api/chia/util/misc.d.ts +5 -0
- package/api/chia/util/misc.js +2 -0
- package/api/chia/wallet/puzzles/clawback/metadata.d.ts +13 -0
- package/api/chia/wallet/puzzles/clawback/metadata.js +2 -0
- package/api/chia/wallet/transaction_record.d.ts +7 -0
- package/api/chia/wallet/util/quality_filter.d.ts +22 -0
- package/api/chia/wallet/util/quality_filter.js +2 -0
- package/api/chia/wallet/util/wallet_types.d.ts +22 -12
- package/api/chia/wallet/util/wallet_types.js +6 -1
- package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +16 -0
- package/api/chia/wallet/vc_wallet/vc_drivers.js +2 -0
- package/api/chia/wallet/vc_wallet/vc_store.d.ts +6 -0
- package/api/chia/wallet/vc_wallet/vc_store.js +2 -0
- package/api/chia/wallet/wallet_coin_record.d.ts +25 -0
- package/api/chia/wallet/wallet_coin_record.js +2 -0
- package/api/chia/wallet/wallet_coin_store.d.ts +19 -0
- package/api/chia/wallet/wallet_coin_store.js +2 -0
- package/api/rpc/data_layer/index.d.ts +18 -8
- package/api/rpc/data_layer/index.js +8 -1
- package/api/rpc/full_node/index.d.ts +1 -0
- package/api/rpc/harvester/index.d.ts +33 -3
- package/api/rpc/harvester/index.js +15 -1
- package/api/rpc/index.d.ts +3 -3
- package/api/rpc/index.js +19 -4
- package/api/rpc/wallet/index.d.ts +169 -16
- package/api/rpc/wallet/index.js +89 -6
- package/api/ws/daemon/index.d.ts +62 -3
- package/api/ws/daemon/index.js +22 -1
- package/api/ws/farmer/index.d.ts +12 -2
- package/api/ws/farmer/index.js +14 -1
- package/api/ws/index.d.ts +2 -2
- package/api/ws/index.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [13.0.0]
|
|
4
|
+
### Breaking change
|
|
5
|
+
- The format of [`PoolState`](./src/api/chia/farmer/farmer.ts)) has been changed.
|
|
6
|
+
- `points_found_24h` and `points_acknowledged_24h` are now `Array<[uint32, uint64]>` (they were `Array<[float, uint64]>`)
|
|
7
|
+
- `pool_errors_24h` is now `Array<[uint32, ErrorResponse]>` (it was `ErrorResponse[]`)
|
|
8
|
+
- The following request properties of `send_transaction` and `cat_spend` Wallet RPC API were renamed
|
|
9
|
+
- `exclude_coin_amounts` -> `excluded_coin_amounts`
|
|
10
|
+
- `exclude_coins` -> `excluded_coins`
|
|
11
|
+
- The previous property names(`exclude_coin_amounts`, `exclude_coins`) are preserved for backward compatibility
|
|
12
|
+
- The following request properties of `create_signed_transaction` Wallet RPC API were renamed
|
|
13
|
+
- `exclude_coin_amounts` -> `excluded_coin_amounts`
|
|
14
|
+
- `exclude_coins` -> `excluded_coins`
|
|
15
|
+
- The previous property name (`exclude_coins`) is preserved for backward compatibility
|
|
16
|
+
- Unlike `send_transaction` and `cat_spend`, `exclude_coin_amounts` is removed by accident and not backward compatible.
|
|
17
|
+
### Changed
|
|
18
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
19
|
+
- [`start_plotting`](./src/api/ws/daemon/README.md#start_plottingdaemon-params)
|
|
20
|
+
- The `t2` option for chiapos plotter is now optional
|
|
21
|
+
- Added `compress` option for bladebit plotter
|
|
22
|
+
- Added `cudaplot` plot type for bladebit plotter
|
|
23
|
+
- [`get_plotters`](./src/api/ws/daemon/README.md#get_plottersdaemon)
|
|
24
|
+
- Added `cuda_support` property to bladebit install info
|
|
25
|
+
- [DataLayer RPC API](./src/api/rpc/data_layer)
|
|
26
|
+
- Renamed the type `WsTakeOfferMessageDL` to `WsTakeOfferMessage`
|
|
27
|
+
- Renamed the type `WsCancelOfferMessageDL` to `WsCancelOfferMessage`
|
|
28
|
+
- [Farmer RPC API](./src/api/rpc/farmer)
|
|
29
|
+
- [`get_pool_state`](./src/api/rpc/farmer/README.md#get_pool_stateagent)
|
|
30
|
+
- Added new properties
|
|
31
|
+
- `valid_partials_since_start`
|
|
32
|
+
- `valid_partials_24h`
|
|
33
|
+
- `invalid_partials_since_start`
|
|
34
|
+
- `invalid_partials_24h`
|
|
35
|
+
- `stale_partials_since_start`
|
|
36
|
+
- `stale_partials_24h`
|
|
37
|
+
- `missing_partials_since_start`
|
|
38
|
+
- `missing_partials_24h`
|
|
39
|
+
- [`get_harvesters`](./src/api/rpc/farmer/README.md#get_harvestersagent)
|
|
40
|
+
- Added `total_effective_plot_size` and `harvesting_mode` to `harvesters` in response
|
|
41
|
+
- [`get_harvesters_summary`](./src/api/rpc/farmer/README.md#get_harvesters_summaryagent)
|
|
42
|
+
- Added `total_effective_plot_size` and `harvesting_mode` to `harvesters` in response
|
|
43
|
+
- [Farmer WebSocket API](./src/api/ws/farmer)
|
|
44
|
+
- [`on_new_farming_info`](./src/api/ws/farmer/README.md#on_new_farming_info)
|
|
45
|
+
- Added `node_id` and `lookup_time` to `farming_info` Broadcast data
|
|
46
|
+
- [`on_new_signage_point`](./src/api/ws/farmer/README.md#on_new_signage_point)
|
|
47
|
+
- Added `missing_signage_points` to Broadcast data
|
|
48
|
+
- [`on_submitted_partial`](./src/api/ws/farmer/README.md#on_submitted_partial)
|
|
49
|
+
- Added `"wallet_ui""` to `destination` in Broadcast data
|
|
50
|
+
- [`on_harvester_update`](./src/api/ws/farmer/README.md#on_harvester_update)
|
|
51
|
+
- Added `total_effective_plot_size` and `harvesting_mode` to broadcast data
|
|
52
|
+
- [Harvester RPC API](./src/api/rpc/harvester)
|
|
53
|
+
- [`get_plots`](./src/api/rpc/harvester/README.md#get_plotsagent)
|
|
54
|
+
- Added `compression_level` to response
|
|
55
|
+
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
56
|
+
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#get_blockchain_stateagent)
|
|
57
|
+
- Added `average_block_time` to response
|
|
58
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
59
|
+
- [`get_farmed_amount`](./src/api/rpc/full_node/README.md#get_farmed_amountagent)
|
|
60
|
+
- Added `last_time_farmed` to response
|
|
61
|
+
- Added `blocks_won` to response
|
|
62
|
+
### Added
|
|
63
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
64
|
+
- [`get_routes`](./src/api/ws/daemon/README.md#get_routesdaemon)
|
|
65
|
+
- [`get_wallet_addresses`](./src/api/ws/daemon/README.md#get_wallet_addressesdaemon)
|
|
66
|
+
- [`get_keys_for_plotting`](./src/api/ws/daemon/README.md#get_keys_for_plottingdaemon)
|
|
67
|
+
- [Farmer WebSocket API](./src/api/ws/farmer)
|
|
68
|
+
- [`on_failed_partial`](./src/api/ws/farmer/README.md#on_failed_partial)
|
|
69
|
+
- [DataLayer RPC API](./src/api/rpc/data_layer)
|
|
70
|
+
- [`clear_pending_roots`](./src/api/rpc/data_layer/README.md#clear_pending_rootsagent-params)
|
|
71
|
+
- [Harvester RPC API](./src/api/rpc/harvester)
|
|
72
|
+
- [`get_harvester_config`](./src/api/rpc/harvester/README.md#get_harvester_configagent)
|
|
73
|
+
- [`update_harvester_config`](./src/api/rpc/harvester/README.md#update_harvester_configagent)
|
|
74
|
+
### Fixed
|
|
75
|
+
- Fixed documentation for plotter params.
|
|
76
|
+
- `bladebit_params` => `bladebit_ramplot_params`
|
|
77
|
+
- `bladebit2_params` => `bladebit_diskplot_params`
|
|
78
|
+
- Fixed an issue where ts files related to the data layer RPC API had a circular dependency.
|
|
79
|
+
- Fixed an issue where the following request parameters for the `did_find_lost_did` Wallet RPC API were missing.
|
|
80
|
+
- `recovery_list_hash`
|
|
81
|
+
- `num_verification`
|
|
82
|
+
- `metadata`
|
|
83
|
+
|
|
84
|
+
## [12.1.0]
|
|
85
|
+
### Changed
|
|
86
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
87
|
+
- [`get_transactions`](./src/api/rpc/wallet/README.md#get_transactionsagent-params)
|
|
88
|
+
- Added `type_filter` to request parameter
|
|
89
|
+
- Added `confirmed` to request parameter
|
|
90
|
+
- Added `metadata` for each `transactions` in a response
|
|
91
|
+
- [`get_transaction_count`](./src/api/rpc/wallet/README.md#get_transaction_countagent-params)
|
|
92
|
+
- Added `type_filter` to request parameter
|
|
93
|
+
- Added `confirmed` to request parameter
|
|
94
|
+
- [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
|
|
95
|
+
- Added `puzzle_decorator` to request parameter
|
|
96
|
+
- [`did_get_info`](./src/api/rpc/wallet/README.md#did_get_infoagent-params)
|
|
97
|
+
- Added `did_id` to response
|
|
98
|
+
### Added
|
|
99
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
100
|
+
- [`set_auto_claim`](./src/api/rpc/wallet/README.md#set_auto_claimagent-params)
|
|
101
|
+
- [`get_auto_claim`](./src/api/rpc/wallet/README.md#get_auto_claimagent-params)
|
|
102
|
+
- [`get_wallet_balances`](./src/api/rpc/wallet/README.md#get_wallet_balancesagent-params)
|
|
103
|
+
- [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params)
|
|
104
|
+
- [`get_coin_records`](./src/api/rpc/wallet/README.md#get_coin_recordsagent-params)
|
|
105
|
+
- [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params)
|
|
106
|
+
- [`vc_get`](./src/api/rpc/wallet/README.md#vc_getagent-params)
|
|
107
|
+
- [`vc_get_list`](./src/api/rpc/wallet/README.md#vc_get_listagent-params)
|
|
108
|
+
- [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params)
|
|
109
|
+
- [`vc_add_proofs`](./src/api/rpc/wallet/README.md#vc_add_proofsagent-params)
|
|
110
|
+
- [`vc_get_proofs_for_root`](./src/api/rpc/wallet/README.md#vc_get_proofs_for_rootagent-params)
|
|
111
|
+
- [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params)
|
|
112
|
+
|
|
3
113
|
## [12.0.1]
|
|
4
114
|
### Changed
|
|
5
115
|
- Replace the npm module `json-bigint` to `@chiamine/json-bigint`.
|
|
@@ -1017,6 +1127,8 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
1017
1127
|
Initial release.
|
|
1018
1128
|
|
|
1019
1129
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
1130
|
+
[12.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v12.1.0...v13.0.0
|
|
1131
|
+
[12.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v12.0.1...v12.1.0
|
|
1020
1132
|
[12.0.1]: https://github.com/Chia-Mine/chia-agent/compare/v12.0.0...v12.0.1
|
|
1021
1133
|
[12.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v11.1.1...v12.0.0
|
|
1022
1134
|
[11.1.1]: https://github.com/Chia-Mine/chia-agent/compare/v11.1.0...v11.1.1
|
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
|
|
5
|
+
Supports all RPC/Websocket API available at `chia 2.0.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,8 +22,8 @@ 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/
|
|
25
|
+
- [`dc46f46b9a30628b208d38fd7dd0ca085e820781`](https://github.com/Chia-Network/chia-blockchain/tree/dc46f46b9a30628b208d38fd7dd0ca085e820781) of [chia-blockchain 2.0.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/dc46f46b9a30628b208d38fd7dd0ca085e820781...main)
|
|
27
27
|
- [`6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5`](https://github.com/Chia-Network/pool-reference/tree/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5) of [pool-reference](https://github.com/Chia-Network/pool-reference)
|
|
28
28
|
- [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5...main)
|
|
29
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { int, str } from "../types/_python_types_";
|
|
1
|
+
import { int, Optional, str } from "../types/_python_types_";
|
|
2
2
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
3
3
|
export declare type KeyValueMarshalled = {
|
|
4
4
|
key: str;
|
|
@@ -41,3 +41,9 @@ export declare type PluginStatusMarshalled = {
|
|
|
41
41
|
downloaders: Record<str, Record<str, any>>;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
+
export declare type RootMarshalled = {
|
|
45
|
+
tree_id: str;
|
|
46
|
+
node_hash: Optional<str>;
|
|
47
|
+
generation: int;
|
|
48
|
+
status: int;
|
|
49
|
+
};
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { float, int, str, uint64, uint8 } from "../types/_python_types_";
|
|
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
4
|
export declare type PoolState = {
|
|
5
5
|
points_found_since_start: int;
|
|
6
|
-
points_found_24h: Array<[
|
|
6
|
+
points_found_24h: Array<[uint32, uint64]>;
|
|
7
7
|
points_acknowledged_since_start: int;
|
|
8
|
-
points_acknowledged_24h: Array<[
|
|
8
|
+
points_acknowledged_24h: Array<[uint32, uint64]>;
|
|
9
|
+
valid_partials_since_start: int;
|
|
10
|
+
valid_partials_24h: Array<[uint32, uint64]>;
|
|
11
|
+
invalid_partials_since_start: int;
|
|
12
|
+
invalid_partials_24h: Array<[uint32, uint64]>;
|
|
13
|
+
stale_partials_since_start: int;
|
|
14
|
+
stale_partials_24h: Array<[uint32, uint64]>;
|
|
15
|
+
missing_partials_since_start: int;
|
|
16
|
+
missing_partials_24h: Array<[uint32, uint64]>;
|
|
9
17
|
next_farmer_update: float;
|
|
10
18
|
next_pool_info_update: float;
|
|
11
19
|
current_points: uint64;
|
|
12
20
|
current_difficulty: uint64;
|
|
13
|
-
pool_errors_24h: ErrorResponse
|
|
21
|
+
pool_errors_24h: Array<[uint32, ErrorResponse]>;
|
|
14
22
|
authentication_token_timeout: uint8;
|
|
15
23
|
pool_config: PoolWalletConfig;
|
|
16
24
|
p2_singleton_puzzle_hash: str;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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
|
+
import { HarvestingMode } from "../plotting/util";
|
|
4
5
|
export declare type MayBeSummary<S, O> = S extends true ? int : O;
|
|
5
6
|
export declare type Receiver<SUMMARY extends boolean = false> = {
|
|
6
7
|
connection: {
|
|
@@ -13,10 +14,12 @@ export declare type Receiver<SUMMARY extends boolean = false> = {
|
|
|
13
14
|
no_key_filenames: MayBeSummary<SUMMARY, str[]>;
|
|
14
15
|
duplicates: MayBeSummary<SUMMARY, str[]>;
|
|
15
16
|
total_plot_size: int;
|
|
17
|
+
total_effective_plot_size: int;
|
|
16
18
|
syncing: {
|
|
17
19
|
initial: bool;
|
|
18
20
|
plot_files_processed: uint32;
|
|
19
21
|
plot_files_total: uint32;
|
|
20
22
|
} | None;
|
|
21
23
|
last_sync_time: Optional<float>;
|
|
24
|
+
harvesting_mode: Optional<HarvestingMode>;
|
|
22
25
|
};
|
|
@@ -2,7 +2,14 @@ import { SpendBundle } from "./spend_bundle";
|
|
|
2
2
|
import { Coin } from "./blockchain_format/coin";
|
|
3
3
|
import { bytes32 } from "./blockchain_format/sized_bytes";
|
|
4
4
|
import { NPCResult } from "../consensus/cost_calculator";
|
|
5
|
-
import { Optional, uint32, uint64 } from "./_python_types_";
|
|
5
|
+
import { bool, Optional, uint32, uint64 } from "./_python_types_";
|
|
6
|
+
import { CoinSpend } from "./coin_spend";
|
|
7
|
+
export declare type BundleCoinSpend = {
|
|
8
|
+
coin_spend: CoinSpend;
|
|
9
|
+
eligible_for_dedup: bool;
|
|
10
|
+
additions: Coin[];
|
|
11
|
+
cost: Optional<uint64>;
|
|
12
|
+
};
|
|
6
13
|
export declare type MempoolItem = {
|
|
7
14
|
spend_bundle: SpendBundle;
|
|
8
15
|
fee: uint64;
|
|
@@ -12,6 +19,7 @@ export declare type MempoolItem = {
|
|
|
12
19
|
assert_height: Optional<uint32>;
|
|
13
20
|
assert_before_height: Optional<uint32>;
|
|
14
21
|
assert_before_seconds: Optional<uint64>;
|
|
22
|
+
bundle_coin_spends: Record<bytes32, BundleCoinSpend>;
|
|
15
23
|
};
|
|
16
24
|
export declare type MempoolItemInJsonDict = {
|
|
17
25
|
spend_bundle: SpendBundle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { bool, uint16, uint64 } from "../../../types/_python_types_";
|
|
2
|
+
import { bytes32 } from "../../../types/blockchain_format/sized_bytes";
|
|
3
|
+
export declare type AutoClaimSettings = {
|
|
4
|
+
enabled: bool;
|
|
5
|
+
tx_fee: uint64;
|
|
6
|
+
min_amount: uint64;
|
|
7
|
+
batch_size: uint16;
|
|
8
|
+
};
|
|
9
|
+
export declare type ClawbackMetadata = {
|
|
10
|
+
time_lock: uint64;
|
|
11
|
+
sender_puzzle_hash: bytes32;
|
|
12
|
+
recipient_puzzle_hash: bytes32;
|
|
13
|
+
};
|
|
@@ -2,6 +2,7 @@ import { bool, bytes, Optional, str, uint32, uint64, uint8 } from "../types/_pyt
|
|
|
2
2
|
import { SpendBundle } from "../types/spend_bundle";
|
|
3
3
|
import { Coin } from "../types/blockchain_format/coin";
|
|
4
4
|
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
5
|
+
import { ClawbackMetadata } from "./puzzles/clawback/metadata";
|
|
5
6
|
export declare type TransactionRecord = {
|
|
6
7
|
confirmed_at_height: uint32;
|
|
7
8
|
created_at_time: uint64;
|
|
@@ -24,3 +25,9 @@ export declare type TransactionRecordConvenience = {
|
|
|
24
25
|
to_address: str;
|
|
25
26
|
memos: Record<str, str>;
|
|
26
27
|
} & TransactionRecord;
|
|
28
|
+
export declare type TransactionRecordConvenienceWithMetadata = {
|
|
29
|
+
metadata: ClawbackMetadata & {
|
|
30
|
+
coin_id: str;
|
|
31
|
+
spent: bool;
|
|
32
|
+
};
|
|
33
|
+
} & TransactionRecordConvenience;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { uint32, uint64, uint8 } from "../../types/_python_types_";
|
|
2
|
+
import { bytes32 } from "../../types/blockchain_format/sized_bytes";
|
|
3
|
+
export declare type TransactionTypeFilter = {
|
|
4
|
+
values: uint8[];
|
|
5
|
+
mode: uint8;
|
|
6
|
+
};
|
|
7
|
+
export declare type HashFilter = {
|
|
8
|
+
values: bytes32[];
|
|
9
|
+
mode: uint8;
|
|
10
|
+
};
|
|
11
|
+
export declare type AmountFilter = {
|
|
12
|
+
values: uint64[];
|
|
13
|
+
mode: uint8;
|
|
14
|
+
};
|
|
15
|
+
export declare type UInt32Range = {
|
|
16
|
+
start: uint32;
|
|
17
|
+
stop: uint32;
|
|
18
|
+
};
|
|
19
|
+
export declare type UInt64Range = {
|
|
20
|
+
start: uint64;
|
|
21
|
+
stop: uint64;
|
|
22
|
+
};
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
import { uint32, uint8 } from "../../types/_python_types_";
|
|
1
2
|
export declare const WalletType: {
|
|
2
|
-
STANDARD_WALLET:
|
|
3
|
-
ATOMIC_SWAP:
|
|
4
|
-
AUTHORIZED_PAYEE:
|
|
5
|
-
MULTI_SIG:
|
|
6
|
-
CUSTODY:
|
|
7
|
-
CAT:
|
|
8
|
-
RECOVERABLE:
|
|
9
|
-
DECENTRALIZED_ID:
|
|
10
|
-
POOLING_WALLET:
|
|
11
|
-
NFT:
|
|
12
|
-
DATA_LAYER:
|
|
13
|
-
DATA_LAYER_OFFER:
|
|
3
|
+
readonly STANDARD_WALLET: 0;
|
|
4
|
+
readonly ATOMIC_SWAP: 2;
|
|
5
|
+
readonly AUTHORIZED_PAYEE: 3;
|
|
6
|
+
readonly MULTI_SIG: 4;
|
|
7
|
+
readonly CUSTODY: 5;
|
|
8
|
+
readonly CAT: 6;
|
|
9
|
+
readonly RECOVERABLE: 7;
|
|
10
|
+
readonly DECENTRALIZED_ID: 8;
|
|
11
|
+
readonly POOLING_WALLET: 9;
|
|
12
|
+
readonly NFT: 10;
|
|
13
|
+
readonly DATA_LAYER: 11;
|
|
14
|
+
readonly DATA_LAYER_OFFER: 12;
|
|
15
|
+
readonly VC: 13;
|
|
16
|
+
};
|
|
17
|
+
export declare const CoinType: {
|
|
18
|
+
readonly NORMAL: 0;
|
|
19
|
+
readonly CLAWBACK: 1;
|
|
20
|
+
};
|
|
21
|
+
export declare type StreamableWalletIdentifier = {
|
|
22
|
+
id: uint32;
|
|
23
|
+
type: uint8;
|
|
14
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WalletType = void 0;
|
|
3
|
+
exports.CoinType = exports.WalletType = void 0;
|
|
4
4
|
exports.WalletType = {
|
|
5
5
|
// # Wallet Types
|
|
6
6
|
STANDARD_WALLET: 0,
|
|
@@ -16,4 +16,9 @@ exports.WalletType = {
|
|
|
16
16
|
NFT: 10,
|
|
17
17
|
DATA_LAYER: 11,
|
|
18
18
|
DATA_LAYER_OFFER: 12,
|
|
19
|
+
VC: 13,
|
|
20
|
+
};
|
|
21
|
+
exports.CoinType = {
|
|
22
|
+
NORMAL: 0,
|
|
23
|
+
CLAWBACK: 1,
|
|
19
24
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { bytes32 } from "../../types/blockchain_format/sized_bytes";
|
|
2
|
+
import { Optional } from "../../types/_python_types_";
|
|
3
|
+
import { LineageProof } from "../lineage_proof";
|
|
4
|
+
import { Coin } from "../../types/blockchain_format/coin";
|
|
5
|
+
export declare type VCLineageProof = LineageProof & {
|
|
6
|
+
parent_proof_hash: Optional<bytes32>;
|
|
7
|
+
};
|
|
8
|
+
export declare type VerifiedCredential = {
|
|
9
|
+
coin: Coin;
|
|
10
|
+
singleton_lineage_proof: LineageProof;
|
|
11
|
+
eml_lineage_proof: VCLineageProof;
|
|
12
|
+
launcher_id: bytes32;
|
|
13
|
+
inner_puzzle_hash: bytes32;
|
|
14
|
+
proof_provider: bytes32;
|
|
15
|
+
proof_hash: Optional<bytes32>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { bool, int, Optional, str, uint32 } from "../types/_python_types_";
|
|
2
|
+
import { Coin } from "../types/blockchain_format/coin";
|
|
3
|
+
import { CoinType, StreamableWalletIdentifier, WalletType } from "./util/wallet_types";
|
|
4
|
+
import { VersionBlob } from "../util/misc";
|
|
5
|
+
import { ClawbackMetadata } from "./puzzles/clawback/metadata";
|
|
6
|
+
export declare type WalletCoinRecord = {
|
|
7
|
+
coin: Coin;
|
|
8
|
+
confirmed_block_height: uint32;
|
|
9
|
+
spent_block_height: uint32;
|
|
10
|
+
spent: bool;
|
|
11
|
+
coinbase: bool;
|
|
12
|
+
wallet_type: typeof WalletType[keyof typeof WalletType];
|
|
13
|
+
wallet_id: int;
|
|
14
|
+
coin_type: typeof CoinType[keyof typeof CoinType];
|
|
15
|
+
metadata: Optional<VersionBlob>;
|
|
16
|
+
};
|
|
17
|
+
export declare type WalletCoinRecordWithMetadata = WalletCoinRecord & {
|
|
18
|
+
id: str;
|
|
19
|
+
type: typeof CoinType[keyof typeof CoinType];
|
|
20
|
+
wallet_identifier: StreamableWalletIdentifier;
|
|
21
|
+
metadata: ClawbackMetadata;
|
|
22
|
+
confirmed_height: uint32;
|
|
23
|
+
spent_height: uint32;
|
|
24
|
+
coinbase: bool;
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { bool, Optional, uint32, uint8 } from "../types/_python_types_";
|
|
2
|
+
import { AmountFilter, HashFilter, UInt32Range, UInt64Range } from "./util/quality_filter";
|
|
3
|
+
export declare type GetCoinRecords = {
|
|
4
|
+
offset: uint32;
|
|
5
|
+
limit: uint32;
|
|
6
|
+
wallet_id: Optional<uint32>;
|
|
7
|
+
wallet_type: Optional<uint8>;
|
|
8
|
+
coin_type: Optional<uint8>;
|
|
9
|
+
coin_id_filter: Optional<HashFilter>;
|
|
10
|
+
puzzle_hash_filter: Optional<HashFilter>;
|
|
11
|
+
parent_coin_id_filter: Optional<HashFilter>;
|
|
12
|
+
amount_filter: Optional<AmountFilter>;
|
|
13
|
+
amount_range: Optional<UInt64Range>;
|
|
14
|
+
confirmed_range: Optional<UInt32Range>;
|
|
15
|
+
spent_range: Optional<UInt32Range>;
|
|
16
|
+
order: uint8;
|
|
17
|
+
reverse: bool;
|
|
18
|
+
include_total_count: bool;
|
|
19
|
+
};
|
|
@@ -2,8 +2,7 @@ import { TRPCAgent } from "../../../rpc/index";
|
|
|
2
2
|
import { bool, None, Optional, str, uint64 } from "../../chia/types/_python_types_";
|
|
3
3
|
import { TransactionRecord } from "../../chia/wallet/transaction_record";
|
|
4
4
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
5
|
-
import { OfferMarshalled, OfferStoreMarshalled, PluginStatusMarshalled, SyncStatus } from "../../chia/data_layer/data_layer_util";
|
|
6
|
-
import { TCancelOfferResponseDL, TTakeOfferResponseDL } from "../index";
|
|
5
|
+
import { OfferMarshalled, OfferStoreMarshalled, PluginStatusMarshalled, RootMarshalled, SyncStatus } from "../../chia/data_layer/data_layer_util";
|
|
7
6
|
import { GetMessageType, ResType } from "../../types";
|
|
8
7
|
import { TDaemon } from "../../../daemon/index";
|
|
9
8
|
export declare const chia_data_layer_service = "chia_data_layer";
|
|
@@ -290,8 +289,8 @@ export declare type TTakeOfferResponse = {
|
|
|
290
289
|
success: bool;
|
|
291
290
|
trade_id: str;
|
|
292
291
|
};
|
|
293
|
-
export declare type
|
|
294
|
-
export declare function take_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TTakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T,
|
|
292
|
+
export declare type WsTakeOfferMessage = GetMessageType<chia_data_layer_service, take_offer_command, TTakeOfferResponse>;
|
|
293
|
+
export declare function take_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TTakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TTakeOfferResponse, WsTakeOfferMessage>>;
|
|
295
294
|
export declare const verify_offer_command = "verify_offer";
|
|
296
295
|
export declare type verify_offer_command = typeof verify_offer_command;
|
|
297
296
|
export declare type TVerifyOfferRequest = {
|
|
@@ -316,8 +315,8 @@ export declare type TCancelOfferRequest = {
|
|
|
316
315
|
export declare type TCancelOfferResponse = {
|
|
317
316
|
success: bool;
|
|
318
317
|
};
|
|
319
|
-
export declare type
|
|
320
|
-
export declare function cancel_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TCancelOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T,
|
|
318
|
+
export declare type WsCancelOfferMessage = GetMessageType<chia_data_layer_service, cancel_offer_command, TCancelOfferResponse>;
|
|
319
|
+
export declare function cancel_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TCancelOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCancelOfferResponse, WsCancelOfferMessage>>;
|
|
321
320
|
export declare const get_sync_status_command = "get_sync_status";
|
|
322
321
|
export declare type get_sync_status_command = typeof get_sync_status_command;
|
|
323
322
|
export declare type TGetSyncStatusRequest = {
|
|
@@ -333,5 +332,16 @@ export declare type check_plugins_command = typeof check_plugins_command;
|
|
|
333
332
|
export declare type TCheckPluginsResponse = PluginStatusMarshalled;
|
|
334
333
|
export declare type WsCheckPluginsMessage = GetMessageType<chia_data_layer_service, check_plugins_command, TCheckPluginsResponse>;
|
|
335
334
|
export declare function check_plugins<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, PluginStatusMarshalled, WsCheckPluginsMessage>>;
|
|
336
|
-
export declare
|
|
337
|
-
export declare type
|
|
335
|
+
export declare const clear_pending_roots_command = "clear_pending_roots";
|
|
336
|
+
export declare type clear_pending_roots_command = typeof clear_pending_roots_command;
|
|
337
|
+
export declare type TClearPendingRootsRequest = {
|
|
338
|
+
store_id: str;
|
|
339
|
+
};
|
|
340
|
+
export declare type TClearPendingRootsResponse = {
|
|
341
|
+
success: bool;
|
|
342
|
+
root: Optional<RootMarshalled>;
|
|
343
|
+
};
|
|
344
|
+
export declare type WsClearPendingRootsMessage = GetMessageType<chia_data_layer_service, clear_pending_roots_command, TClearPendingRootsResponse>;
|
|
345
|
+
export declare function clear_pending_roots<T extends TRPCAgent | TDaemon>(agent: T, params: TClearPendingRootsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TClearPendingRootsResponse, WsClearPendingRootsMessage>>;
|
|
346
|
+
export declare type RpcDataLayerMessage = TCreateDataStoreResponse | TGetOwnedStoresResponse | TBatchUpdateResponse | TGetValueResponse | TGetKeysResponse | TGetKeysValuesResponse | TGetAncestorsResponse | TGetRootResponse | TGetLocalRootResponse | TGetRootsResponse | TDeleteKeyResponse | TInsertResponse | TSubscribeResponse | TUnsubscribeResponse | TAddMirrorResponse | TDeleteMirrorResponse | TGetMirrorsResponse | TRemoveSubscriptionsResponse | TSubscriptionsResponse | TGetKvDiffResponse | TGetRootHistoryResponse | TAddMissingFilesResponse | TMakeOfferResponse | TTakeOfferResponse | TVerifyOfferResponse | TCancelOfferResponse | TGetSyncStatusResponse | TCheckPluginsResponse | TClearPendingRootsResponse;
|
|
347
|
+
export declare type RpcDataLayerMessageOnWs = WsCreateDataStoreMessage | WsGetOwnedStoresMessage | WsBatchUpdateMessage | WsGetValueMessage | WsGetKeysMessage | WsGetKeysValuesMessage | WsGetAncestorsMessage | WsGetRootMessage | WsGetLocalRootMessage | WsGetRootsMessage | WsDeleteKeyMessage | WsInsertMessage | WsSubscribeMessage | WsUnsubscribeMessage | WsAddMirrorMessage | WsDeleteMirrorMessage | WsGetMirrorsMessage | WsRemoveSubscriptionsMessage | WsSubscriptionsMessage | WsGetKvDiffMessage | WsGetRootHistoryMessage | WsAddMissingFilesMessage | WsMakeOfferMessage | WsTakeOfferMessage | WsVerifyOfferMessage | WsCancelOfferMessage | WsGetSyncStatusMessage | WsCheckPluginsMessage | WsClearPendingRootsMessage;
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.verify_offer_command = exports.take_offer = exports.take_offer_command = exports.make_offer = exports.make_offer_command = exports.add_missing_files = exports.add_missing_files_command = exports.get_root_history = exports.get_root_history_command = exports.get_kv_diff = exports.get_kv_diff_command = exports.subscriptions = exports.subscriptions_command = exports.remove_subscriptions = exports.remove_subscriptions_command = exports.get_mirrors = exports.get_mirrors_command = exports.delete_mirror = exports.delete_mirror_command = exports.add_mirror = exports.add_mirror_command = exports.unsubscribe = exports.unsubscribe_command = exports.subscribe = exports.subscribe_command = exports.insert = exports.insert_command = exports.delete_key = exports.delete_key_command = exports.get_roots = exports.get_roots_command = exports.get_local_root = exports.get_local_root_command = exports.get_root = exports.get_root_command = exports.get_ancestors = exports.get_ancestors_command = exports.get_keys_values = exports.get_keys_values_command = exports.get_keys = exports.get_keys_command = exports.get_value = exports.get_value_command = exports.batch_update = exports.batch_update_command = exports.get_owned_stores = exports.get_owned_stores_command = exports.create_data_store = exports.create_data_store_command = exports.chia_data_layer_service = void 0;
|
|
13
|
-
exports.check_plugins = exports.check_plugins_command = exports.get_sync_status = exports.get_sync_status_command = exports.cancel_offer = exports.cancel_offer_command = exports.verify_offer = void 0;
|
|
13
|
+
exports.clear_pending_roots = exports.clear_pending_roots_command = exports.check_plugins = exports.check_plugins_command = exports.get_sync_status = exports.get_sync_status_command = exports.cancel_offer = exports.cancel_offer_command = exports.verify_offer = void 0;
|
|
14
14
|
exports.chia_data_layer_service = "chia_data_layer";
|
|
15
15
|
exports.create_data_store_command = "create_data_store";
|
|
16
16
|
function create_data_store(agent, params) {
|
|
@@ -208,3 +208,10 @@ function check_plugins(agent) {
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
exports.check_plugins = check_plugins;
|
|
211
|
+
exports.clear_pending_roots_command = "clear_pending_roots";
|
|
212
|
+
function clear_pending_roots(agent, params) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
return agent.sendMessage(exports.chia_data_layer_service, exports.clear_pending_roots_command, params);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
exports.clear_pending_roots = clear_pending_roots;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { str } from "../../chia/types/_python_types_";
|
|
1
|
+
import { bool, int, str, True, uint32 } from "../../chia/types/_python_types_";
|
|
2
2
|
import { TRPCAgent } from "../../../rpc";
|
|
3
3
|
import { Plot } from "../../chia/harvester/harvester";
|
|
4
4
|
import { GetMessageType, ResType } from "../../types";
|
|
@@ -53,5 +53,35 @@ export declare type TRemovePlotDirectoryRequest = {
|
|
|
53
53
|
export declare type TRemovePlotDirectoryResponse = {};
|
|
54
54
|
export declare type WsRemovePlotDirectoryMessage = GetMessageType<chia_harvester_service, remove_plot_directory_command, TRemovePlotDirectoryResponse>;
|
|
55
55
|
export declare function remove_plot_directory<T extends TRPCAgent | TDaemon>(agent: T, data: TRemovePlotDirectoryRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TRemovePlotDirectoryResponse, WsRemovePlotDirectoryMessage>>;
|
|
56
|
-
export declare
|
|
57
|
-
export declare type
|
|
56
|
+
export declare const get_harvester_config_command = "get_harvester_config";
|
|
57
|
+
export declare type get_harvester_config_command = typeof get_harvester_config_command;
|
|
58
|
+
export declare type TGetHarvesterConfigResponse = {
|
|
59
|
+
success: True;
|
|
60
|
+
use_gpu_harvesting: bool;
|
|
61
|
+
gpu_index: int;
|
|
62
|
+
enforce_gpu_index: bool;
|
|
63
|
+
disable_cpu_affinity: bool;
|
|
64
|
+
parallel_decompressor_count: int;
|
|
65
|
+
decompressor_thread_count: int;
|
|
66
|
+
recursive_plot_scan: bool;
|
|
67
|
+
refresh_parameter_interval_seconds: int;
|
|
68
|
+
};
|
|
69
|
+
export declare type WsGetHarvesterConfigMessage = GetMessageType<chia_harvester_service, get_harvester_config_command, TGetHarvesterConfigResponse>;
|
|
70
|
+
export declare function get_harvester_config<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc").ErrorResponse | ResType<T, TGetHarvesterConfigResponse, WsGetHarvesterConfigMessage>>;
|
|
71
|
+
export declare const update_harvester_config_command = "update_harvester_config";
|
|
72
|
+
export declare type update_harvester_config_command = typeof update_harvester_config_command;
|
|
73
|
+
export declare type TUpdateHarvesterConfigRequest = {
|
|
74
|
+
use_gpu_harvesting?: bool;
|
|
75
|
+
gpu_index?: int;
|
|
76
|
+
enforce_gpu_index?: bool;
|
|
77
|
+
disable_cpu_affinity?: bool;
|
|
78
|
+
parallel_decompressor_count?: int;
|
|
79
|
+
decompressor_thread_count?: int;
|
|
80
|
+
recursive_plot_scan?: bool;
|
|
81
|
+
refresh_parameter_interval_seconds?: uint32;
|
|
82
|
+
};
|
|
83
|
+
export declare type TUpdateHarvesterConfigResponse = {};
|
|
84
|
+
export declare type WsUpdateHarvesterConfigMessage = GetMessageType<chia_harvester_service, update_harvester_config_command, TUpdateHarvesterConfigResponse>;
|
|
85
|
+
export declare function update_harvester_config<T extends TRPCAgent | TDaemon>(agent: T, data: TUpdateHarvesterConfigRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TUpdateHarvesterConfigResponse, WsUpdateHarvesterConfigMessage>>;
|
|
86
|
+
export declare type RpcHarvesterMessage = TAddPlotDirectoryResponse | TDeletePlotResponse | TGetPlotDirectoriesResponse | TGetPlotsResponse | TRefreshPlotsResponse | TRemovePlotDirectoryResponse | TGetHarvesterConfigResponse | TUpdateHarvesterConfigResponse;
|
|
87
|
+
export declare type RpcHarvesterMessageOnWs = WsAddPlotDirectoryMessage | WsDeletePlotMessage | WsGetPlotDirectoriesMessage | WsGetPlotsMessage | WsRefreshPlotsMessage | WsRemovePlotDirectoryMessage | WsGetHarvesterConfigMessage | WsUpdateHarvesterConfigMessage;
|