chia-agent 9.2.0 → 10.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 +115 -1
- package/README.md +12 -5
- package/api/chia/data_layer/data_layer_util.d.ts +8 -1
- package/api/chia/types/mempool_item.d.ts +0 -1
- package/api/rpc/common/index.d.ts +16 -7
- package/api/rpc/crawler/index.d.ts +8 -2
- package/api/rpc/data_layer/index.d.ts +68 -27
- package/api/rpc/data_layer/index.js +8 -1
- package/api/rpc/farmer/index.d.ts +30 -13
- package/api/rpc/full_node/index.d.ts +57 -26
- package/api/rpc/harvester/index.d.ts +16 -6
- package/api/rpc/index.d.ts +9 -16
- package/api/rpc/index.js +2 -1
- package/api/rpc/wallet/index.d.ts +354 -100
- package/api/rpc/wallet/index.js +53 -3
- package/api/types.d.ts +3 -0
- package/api/ws/chia_plots_create/index.d.ts +4 -2
- package/api/ws/crawler/index.d.ts +5 -2
- package/api/ws/daemon/index.d.ts +71 -38
- package/api/ws/farmer/index.d.ts +16 -8
- package/api/ws/full_node/index.d.ts +10 -5
- package/api/ws/harvester/index.d.ts +7 -3
- package/api/ws/index.d.ts +8 -17
- package/api/ws/timelord/index.d.ts +9 -4
- package/api/ws/wallet/index.d.ts +11 -6
- package/daemon/index.d.ts +6 -7
- package/package.json +1 -1
- package/rpc/index.d.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,118 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.0.0]
|
|
4
|
+
### Breaking change
|
|
5
|
+
In `chia/types/mempool_items.py`, `removals` of `MempoolItem` is now flagged as `@property`.
|
|
6
|
+
As a result of this, `removals` of `MempoolItem` is removed from 2 RPC API responses listed below.
|
|
7
|
+
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
8
|
+
- [`get_all_mempool_items`](./src/api/rpc/full_node/README.md#getallmempoolitemsagent)
|
|
9
|
+
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#getmempoolitembytxidagent-params)
|
|
10
|
+
### Minor breaking change
|
|
11
|
+
- Response params of`keyring_status` daemon WebSocket API below are deprecated
|
|
12
|
+
- `needs_migration`
|
|
13
|
+
- `can_remove_legacy_keys`
|
|
14
|
+
### Removed
|
|
15
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
16
|
+
(Code will remain awhile on chia-agent for backward compatibility. Only document is removed for now.)
|
|
17
|
+
- Removed `migrate_keyring`
|
|
18
|
+
- Removed `notify_keyring_migration_completed`
|
|
19
|
+
### Added
|
|
20
|
+
- [New DataLayer RPC API](./src/api/rpc/data_layer)
|
|
21
|
+
- [`get_sync_status`](./src/api/rpc/data_layer/README.md#getsyncstatusagent-params)
|
|
22
|
+
- [New Wallet RPC API](./src/api/rpc/wallet)
|
|
23
|
+
- [`get_spendable_coins`](./src/api/rpc/wallet/README.md#getspendablecoinsagent-params)
|
|
24
|
+
- [`get_coin_records_by_names`](./src/api/rpc/wallet/README.md#getcoinrecordsbynamesagent-params)
|
|
25
|
+
- [`verify_signature`](./src/api/rpc/wallet/README.md#verifysignatureagent-params)
|
|
26
|
+
- [`did_message_spend`](./src/api/rpc/wallet/README.md#didmessagespendagent-params)
|
|
27
|
+
- [`did_get_info`](./src/api/rpc/wallet/README.md#didgetinfoagent-params)
|
|
28
|
+
- [`did_find_lost_did`](./src/api/rpc/wallet/README.md#didfindlostdidagent-params)
|
|
29
|
+
- [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nftsetdidbulkagent-params)
|
|
30
|
+
### Changed
|
|
31
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
32
|
+
- [`keyring_status`](./src/api/ws/daemon/README.md#keyringstatusdaemon)
|
|
33
|
+
- Removed `needs_migration` from response
|
|
34
|
+
- Removed `can_remove_legacy_keys` from response
|
|
35
|
+
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
36
|
+
- [`get_mempool_item_by_tx_id`](./src/api/rpc/full_node/README.md#getmempoolitembytxidagent-params)
|
|
37
|
+
- Added `include_pending` to request parameter
|
|
38
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
39
|
+
- [`send_transaction`](./src/api/rpc/wallet/README.md#sendtransactionagent-params)
|
|
40
|
+
- Added `max_coin_amount` to request parameter
|
|
41
|
+
- Added `exclude_coin_amounts` to request parameter
|
|
42
|
+
- Added `exclude_coin_ids` to request parameter
|
|
43
|
+
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#sendtransactionmultiagent-params)
|
|
44
|
+
- Added `max_coin_amount` to request parameter
|
|
45
|
+
- Added `exclude_coin_amounts` to request parameter
|
|
46
|
+
- Added parameters for cat spends.
|
|
47
|
+
- [`select_coins`](./src/api/rpc/wallet/README.md#selectcoinsagent-params)
|
|
48
|
+
- Added `max_coin_amount` to request parameter
|
|
49
|
+
- Added `exclude_coin_amounts` to request parameter
|
|
50
|
+
- [`cat_spend`](./src/api/rpc/wallet/README.md#catspendagent-params)
|
|
51
|
+
- Added `additions` to request parameter
|
|
52
|
+
- Added `max_coin_amount` to request parameter
|
|
53
|
+
- Added `exclude_coin_amounts` to request parameter
|
|
54
|
+
- Added `exclude_coin_ids` to request parameter
|
|
55
|
+
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#signmessagebyidagent-params)
|
|
56
|
+
- Added `latest_coin_id` to request parameter
|
|
57
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#createofferforidsagent-params)
|
|
58
|
+
- Added `max_coin_amount` to request parameter
|
|
59
|
+
- [`take_offer`](./src/api/rpc/wallet/README.md#takeofferagent-params)
|
|
60
|
+
- Added `max_coin_amount` to request parameter
|
|
61
|
+
- [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nftmintnftagent-params)
|
|
62
|
+
- Added `nft_id` to return parameter
|
|
63
|
+
- [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nftmintbulkagent-params)
|
|
64
|
+
- Added `nft_id_list` to return parameter
|
|
65
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#createsignedtransactionagent-params)
|
|
66
|
+
- Added `max_coin_amount` to return parameter
|
|
67
|
+
- Added `exclude_coin_amounts` to return parameter
|
|
68
|
+
- [Wallet WebSocket API](./src/api/ws/wallet)
|
|
69
|
+
- [`state_changed`](./src/api/ws/wallet/README.md#onstatechangedofwallet)
|
|
70
|
+
- Added `new_on_chain_notification` state.
|
|
71
|
+
- `TBladeBitParams` has been renamed to `TBladeBitRamParams`
|
|
72
|
+
- `plot_type: "ramplot"` has been added
|
|
73
|
+
- `TBladeBit2Params` has been renamed to `TBladeBitDiskParams`
|
|
74
|
+
- `plot_type: "diskplot"` has been added
|
|
75
|
+
- `plotter` type has been converted to `"bladebit"` from `"bladebit2"`
|
|
76
|
+
- Eased type requirement of `daemon.sendMessage()` and `agent.sendMessage()`
|
|
77
|
+
You can request **RPC** API on Daemon WebSocket channel like this:
|
|
78
|
+
```typescript
|
|
79
|
+
const {getDaemon} = require("chia-agent");
|
|
80
|
+
const {get_harvesters_summary} = require("chia-agent/api/rpc/farmer");
|
|
81
|
+
const daemon = getDaemon();
|
|
82
|
+
await daemon.connect();
|
|
83
|
+
res = await get_harvesters_summary(daemon);
|
|
84
|
+
// or specify service name and API command
|
|
85
|
+
res = await daemon.sendMessage("chia_farmer", "get_harvesters_summary");
|
|
86
|
+
/*
|
|
87
|
+
{
|
|
88
|
+
ack: true,
|
|
89
|
+
command: 'get_harvesters_summary',
|
|
90
|
+
data: { harvesters: [ [Object] ], success: true },
|
|
91
|
+
destination: 'chia_agent',
|
|
92
|
+
origin: 'chia_farmer',
|
|
93
|
+
request_id: '4e31c04df234538901d9270932d04301b5b3a1a895d762144400852b8167973f'
|
|
94
|
+
}
|
|
95
|
+
*/
|
|
96
|
+
```
|
|
97
|
+
Please note that when you use RPC API, you can directly request to the RPC endpoint of the service(full_node/farmer/...).
|
|
98
|
+
However, when you request RPC API on Daemon WebSocket channel, you get a response from the service
|
|
99
|
+
which the daemon is connecting to.
|
|
100
|
+
In other word, you can choose the exact ip:port of a service if you use RPC API,
|
|
101
|
+
while it is the daemon which chooses the services it connects to if you use Daemon WebSocket channel.
|
|
102
|
+
### Fixed
|
|
103
|
+
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
104
|
+
- [`get_blockchain_state`](./src/api/rpc/full_node/README.md#getblockchainstateagent)
|
|
105
|
+
- Made `sync_tip_height` as `uint32`(previously `Optional<uint32>`) because `None` value would never be set
|
|
106
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
107
|
+
- [`send_transaction_multi`](./src/api/rpc/wallet/README.md#sendtransactionmultiagent-params)
|
|
108
|
+
- Added missing `min_coin_amount` to request parameter
|
|
109
|
+
- Added missing `exclude_coins` to request parameter
|
|
110
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#createofferforidsagent-params)
|
|
111
|
+
- Added missing `solver` to request parameter
|
|
112
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#createsignedtransactionagent-params)
|
|
113
|
+
- Added missing `wallet_id` to return parameter in README
|
|
114
|
+
- Added missing `exclude_coins` to return parameter in README
|
|
115
|
+
|
|
3
116
|
## [9.2.0]
|
|
4
117
|
### Minor breaking change
|
|
5
118
|
- `add_private_key` daemon WebSocket API now deprecated `passphrase` request param
|
|
@@ -39,7 +152,7 @@
|
|
|
39
152
|
- [`nft_calculate_royalties`](./src/api/rpc/wallet/README.md#nft_calculate_royaltiesagent-params)
|
|
40
153
|
- [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params)
|
|
41
154
|
### Changed
|
|
42
|
-
- [Daemon WebSocket API](./src/api/
|
|
155
|
+
- [Daemon WebSocket API](./src/api/ws/daemon)
|
|
43
156
|
- [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params)
|
|
44
157
|
- Removed `passphrase` request parameter
|
|
45
158
|
- Added `label` request parameter
|
|
@@ -706,6 +819,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
706
819
|
Initial release.
|
|
707
820
|
|
|
708
821
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
822
|
+
[10.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.2.0...v10.0.0
|
|
709
823
|
[9.2.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.1.0...v9.2.0
|
|
710
824
|
[9.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.0.1...v9.1.0
|
|
711
825
|
[9.0.1]: https://github.com/Chia-Mine/chia-agent/compare/v9.0.0...v9.0.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 1.6.
|
|
5
|
+
Supports all RPC/Websocket API available at `chia 1.6.2`.
|
|
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
|
+
- [`ba1ff12b31f8fea600e8ee2058bf472e211f1f7a`](https://github.com/Chia-Network/chia-blockchain/tree/ba1ff12b31f8fea600e8ee2058bf472e211f1f7a) of [chia-blockchain 1.6.2](https://github.com/Chia-Network/chia-blockchain)
|
|
26
|
+
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/ba1ff12b31f8fea600e8ee2058bf472e211f1f7a...main)
|
|
27
|
+
- [`41a16695db4c6e032aeb18e0af5ab9f01db864cf`](https://github.com/Chia-Network/pool-reference/tree/41a16695db4c6e032aeb18e0af5ab9f01db864cf) 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/41a16695db4c6e032aeb18e0af5ab9f01db864cf...main)
|
|
29
29
|
|
|
30
30
|
## API
|
|
31
31
|
There are 2 kinds of APIs in chia.
|
|
@@ -61,6 +61,13 @@ console.log(res.plots[0]);
|
|
|
61
61
|
time_modified: 1619540745
|
|
62
62
|
}
|
|
63
63
|
*/
|
|
64
|
+
|
|
65
|
+
// Or you can request RPC API via daemon websocket like this
|
|
66
|
+
const {getDaemon, setLogLevel} = require("chia-agent");
|
|
67
|
+
const {get_plots} = require("chia-agent/api/rpc");
|
|
68
|
+
const daemon = getDaemon();
|
|
69
|
+
await daemon.connect(); // connect to local daemon using config file.
|
|
70
|
+
const res = await get_plots(daemon);
|
|
64
71
|
```
|
|
65
72
|
|
|
66
73
|
### Websocket API
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { str } from "../types/_python_types_";
|
|
1
|
+
import { int, str } from "../types/_python_types_";
|
|
2
|
+
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
2
3
|
export declare type KeyValueMarshalled = {
|
|
3
4
|
key: str;
|
|
4
5
|
value: str;
|
|
@@ -28,3 +29,9 @@ export declare type OfferMarshalled = {
|
|
|
28
29
|
taker: OfferStoreMarshalled[];
|
|
29
30
|
maker: StoreProofsMarshalled[];
|
|
30
31
|
};
|
|
32
|
+
export declare type SyncStatus = {
|
|
33
|
+
root_hash: bytes32;
|
|
34
|
+
generation: int;
|
|
35
|
+
target_root_hash: bytes32;
|
|
36
|
+
target_generation: int;
|
|
37
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { str, True, uint16 } from "../../chia/types/_python_types_";
|
|
2
2
|
import { TRPCAgent } from "../../../rpc/index";
|
|
3
|
-
import { TConnectionGeneral } from "../../types";
|
|
3
|
+
import { GetMessageType, ResType, TConnectionGeneral } from "../../types";
|
|
4
4
|
import { TConnectionFullNode } from "../../ws/full_node/index";
|
|
5
|
+
import { TDaemon } from "../../../daemon/index";
|
|
5
6
|
export declare const chia_common_service = "";
|
|
6
7
|
export declare type chia_common_service = typeof chia_common_service;
|
|
7
8
|
export declare const get_connections_command = "get_connections";
|
|
@@ -12,7 +13,8 @@ export declare type TGetConnectionsRequest = {
|
|
|
12
13
|
export declare type TGetConnectionsResponse = {
|
|
13
14
|
connections: TConnectionGeneral[] | TConnectionFullNode[];
|
|
14
15
|
};
|
|
15
|
-
export declare
|
|
16
|
+
export declare type WsGetConnectionsMessage = GetMessageType<chia_common_service, get_connections_command, TGetConnectionsResponse>;
|
|
17
|
+
export declare function get_connections<T extends TRPCAgent | TDaemon>(agent: T, params: TGetConnectionsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetConnectionsResponse, WsGetConnectionsMessage>>;
|
|
16
18
|
export declare const open_connection_command = "open_connection";
|
|
17
19
|
export declare type open_connection_command = typeof open_connection_command;
|
|
18
20
|
export declare type TOpenConnectionRequest = {
|
|
@@ -20,28 +22,35 @@ export declare type TOpenConnectionRequest = {
|
|
|
20
22
|
port: uint16;
|
|
21
23
|
};
|
|
22
24
|
export declare type TOpenConnectionResponse = {};
|
|
23
|
-
export declare
|
|
25
|
+
export declare type WsOpenConnectionMessage = GetMessageType<chia_common_service, open_connection_command, TOpenConnectionResponse>;
|
|
26
|
+
export declare function open_connection<T extends TRPCAgent | TDaemon>(agent: T, params: TOpenConnectionRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TOpenConnectionResponse, WsOpenConnectionMessage>>;
|
|
24
27
|
export declare const close_connection_command = "close_connection";
|
|
25
28
|
export declare type close_connection_command = typeof close_connection_command;
|
|
26
29
|
export declare type TCloseConnectionRequest = {
|
|
27
30
|
node_id: str;
|
|
28
31
|
};
|
|
29
32
|
export declare type TCloseConnectionResponse = {};
|
|
30
|
-
export declare
|
|
33
|
+
export declare type WsCloseConnectionMessage = GetMessageType<chia_common_service, close_connection_command, TCloseConnectionResponse>;
|
|
34
|
+
export declare function close_connection<T extends TRPCAgent | TDaemon>(agent: T, params: TCloseConnectionRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCloseConnectionResponse, WsCloseConnectionMessage>>;
|
|
31
35
|
export declare const stop_node_command = "stop_node";
|
|
32
36
|
export declare type stop_node_command = typeof stop_node_command;
|
|
33
37
|
export declare type TStopNodeResponse = {};
|
|
34
|
-
export declare
|
|
38
|
+
export declare type WsStopNodeMessage = GetMessageType<chia_common_service, stop_node_command, TStopNodeResponse>;
|
|
39
|
+
export declare function stop_node<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TStopNodeResponse, WsStopNodeMessage>>;
|
|
35
40
|
export declare const get_routes_command = "get_routes";
|
|
36
41
|
export declare type get_routes_command = typeof get_routes_command;
|
|
37
42
|
export declare type TGetRoutesResponse = {
|
|
38
43
|
success: True;
|
|
39
44
|
routes: str[];
|
|
40
45
|
};
|
|
41
|
-
export declare
|
|
46
|
+
export declare type WsGetRoutesMessage = GetMessageType<chia_common_service, get_routes_command, TGetRoutesResponse>;
|
|
47
|
+
export declare function get_routes<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRoutesResponse, WsGetRoutesMessage>>;
|
|
42
48
|
export declare const healthz_command = "healthz";
|
|
43
49
|
export declare type healthz_command = typeof healthz_command;
|
|
44
50
|
export declare type THealthzResponse = {
|
|
45
51
|
success: True;
|
|
46
52
|
};
|
|
47
|
-
export declare
|
|
53
|
+
export declare type WsHealthzMessage = GetMessageType<chia_common_service, healthz_command, THealthzResponse>;
|
|
54
|
+
export declare function healthz<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, THealthzResponse, WsHealthzMessage>>;
|
|
55
|
+
export declare type RpcCommonMessage = TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse | THealthzResponse;
|
|
56
|
+
export declare type RpcCommonMessageOnWs = WsGetConnectionsMessage | WsOpenConnectionMessage | WsCloseConnectionMessage | WsStopNodeMessage | WsGetRoutesMessage | WsHealthzMessage;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { int, str, uint64 } from "../../chia/types/_python_types_";
|
|
2
2
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
3
3
|
import { TRPCAgent } from "../../../rpc/index";
|
|
4
|
+
import { TDaemon } from "../../../daemon/index";
|
|
5
|
+
import { GetMessageType, ResType } from "../../types";
|
|
4
6
|
export declare const chia_crawler_service = "chia_crawler";
|
|
5
7
|
export declare type chia_crawler_service = typeof chia_crawler_service;
|
|
6
8
|
export declare const get_peer_counts_command = "get_peer_counts";
|
|
@@ -14,7 +16,8 @@ export declare type TGetPeerCountsResponse = {
|
|
|
14
16
|
versions: Record<str, int>;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
|
-
export declare
|
|
19
|
+
export declare type WsGetPeerCountsMessage = GetMessageType<chia_crawler_service, get_peer_counts_command, TGetPeerCountsResponse>;
|
|
20
|
+
export declare function get_peer_counts<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetPeerCountsResponse, WsGetPeerCountsMessage>>;
|
|
18
21
|
export declare const get_ips_after_timestamp_command = "get_ips_after_timestamp";
|
|
19
22
|
export declare type get_ips_after_timestamp_command = typeof get_ips_after_timestamp_command;
|
|
20
23
|
export declare type TGetIpsAfterTimestampRequest = {
|
|
@@ -26,4 +29,7 @@ export declare type TGetIpsAfterTimestampResponse = {
|
|
|
26
29
|
ips: str[];
|
|
27
30
|
total: int;
|
|
28
31
|
};
|
|
29
|
-
export declare
|
|
32
|
+
export declare type WsGetIpsAfterTimestampMessage = GetMessageType<chia_crawler_service, get_ips_after_timestamp_command, TGetIpsAfterTimestampResponse>;
|
|
33
|
+
export declare function get_ips_after_timestamp<T extends TRPCAgent | TDaemon>(agent: T, params: TGetIpsAfterTimestampRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetIpsAfterTimestampResponse, WsGetIpsAfterTimestampMessage>>;
|
|
34
|
+
export declare type RpcCrawlerMessage = TGetIpsAfterTimestampResponse | TGetPeerCountsResponse;
|
|
35
|
+
export declare type RpcCrawlerMessageOnWs = WsGetIpsAfterTimestampMessage | WsGetPeerCountsMessage;
|
|
@@ -2,7 +2,10 @@ 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 } from "../../chia/data_layer/data_layer_util";
|
|
5
|
+
import { OfferMarshalled, OfferStoreMarshalled, SyncStatus } from "../../chia/data_layer/data_layer_util";
|
|
6
|
+
import { TCancelOfferResponseDL, TTakeOfferResponseDL } from "../index";
|
|
7
|
+
import { GetMessageType, ResType } from "../../types";
|
|
8
|
+
import { TDaemon } from "../../../daemon/index";
|
|
6
9
|
export declare const chia_data_layer_service = "chia_data_layer";
|
|
7
10
|
export declare type chia_data_layer_service = typeof chia_data_layer_service;
|
|
8
11
|
export declare const create_data_store_command = "create_data_store";
|
|
@@ -14,13 +17,15 @@ export declare type TCreateDataStoreResponse = {
|
|
|
14
17
|
txs: TransactionRecord[];
|
|
15
18
|
id: str;
|
|
16
19
|
};
|
|
17
|
-
export declare
|
|
20
|
+
export declare type WsCreateDataStoreMessage = GetMessageType<chia_data_layer_service, create_data_store_command, TCreateDataStoreResponse>;
|
|
21
|
+
export declare function create_data_store<T extends TRPCAgent | TDaemon>(agent: T, params: TCreateDataStoreRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCreateDataStoreResponse, WsCreateDataStoreMessage>>;
|
|
18
22
|
export declare const get_owned_stores_command = "get_owned_stores";
|
|
19
23
|
export declare type get_owned_stores_command = typeof get_owned_stores_command;
|
|
20
24
|
export declare type TGetOwnedStoresResponse = {
|
|
21
25
|
store_ids: str[];
|
|
22
26
|
};
|
|
23
|
-
export declare
|
|
27
|
+
export declare type WsGetOwnedStoresMessage = GetMessageType<chia_data_layer_service, get_owned_stores_command, TGetOwnedStoresResponse>;
|
|
28
|
+
export declare function get_owned_stores<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetOwnedStoresResponse, WsGetOwnedStoresMessage>>;
|
|
24
29
|
export declare const batch_update_command = "batch_update";
|
|
25
30
|
export declare type batch_update_command = typeof batch_update_command;
|
|
26
31
|
export declare type TBatchUpdateRequest = {
|
|
@@ -36,7 +41,8 @@ export declare type TBatchUpdateRequest = {
|
|
|
36
41
|
export declare type TBatchUpdateResponse = {
|
|
37
42
|
tx_id: bytes32;
|
|
38
43
|
};
|
|
39
|
-
export declare
|
|
44
|
+
export declare type WsBatchUpdateMessage = GetMessageType<chia_data_layer_service, batch_update_command, TBatchUpdateResponse>;
|
|
45
|
+
export declare function batch_update<T extends TRPCAgent | TDaemon>(agent: T, params: TBatchUpdateRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TBatchUpdateResponse, WsBatchUpdateMessage>>;
|
|
40
46
|
export declare const get_value_command = "get_value";
|
|
41
47
|
export declare type get_value_command = typeof get_value_command;
|
|
42
48
|
export declare type TGetValueRequest = {
|
|
@@ -47,7 +53,8 @@ export declare type TGetValueRequest = {
|
|
|
47
53
|
export declare type TGetValueResponse = {
|
|
48
54
|
value: str | None;
|
|
49
55
|
};
|
|
50
|
-
export declare
|
|
56
|
+
export declare type WsGetValueMessage = GetMessageType<chia_data_layer_service, get_value_command, TGetValueResponse>;
|
|
57
|
+
export declare function get_value<T extends TRPCAgent | TDaemon>(agent: T, params: TGetValueRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetValueResponse, WsGetValueMessage>>;
|
|
51
58
|
export declare const get_keys_command = "get_keys";
|
|
52
59
|
export declare type get_keys_command = typeof get_keys_command;
|
|
53
60
|
export declare type TGetKeysRequest = {
|
|
@@ -57,7 +64,8 @@ export declare type TGetKeysRequest = {
|
|
|
57
64
|
export declare type TGetKeysResponse = {
|
|
58
65
|
keys: str[];
|
|
59
66
|
};
|
|
60
|
-
export declare
|
|
67
|
+
export declare type WsGetKeysMessage = GetMessageType<chia_data_layer_service, get_keys_command, TGetKeysResponse>;
|
|
68
|
+
export declare function get_keys<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKeysRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKeysResponse, WsGetKeysMessage>>;
|
|
61
69
|
export declare const get_keys_values_command = "get_keys_values";
|
|
62
70
|
export declare type get_keys_values_command = typeof get_keys_values_command;
|
|
63
71
|
export declare type TGetKeysValuesRequest = {
|
|
@@ -71,7 +79,8 @@ export declare type TGetKeysValuesResponse = {
|
|
|
71
79
|
value: str;
|
|
72
80
|
}>;
|
|
73
81
|
};
|
|
74
|
-
export declare
|
|
82
|
+
export declare type WsGetKeysValuesMessage = GetMessageType<chia_data_layer_service, get_keys_values_command, TGetKeysValuesResponse>;
|
|
83
|
+
export declare function get_keys_values<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKeysValuesRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKeysValuesResponse, WsGetKeysValuesMessage>>;
|
|
75
84
|
export declare const get_ancestors_command = "get_ancestors";
|
|
76
85
|
export declare type get_ancestors_command = typeof get_ancestors_command;
|
|
77
86
|
export declare type TGetAncestorsRequest = {
|
|
@@ -85,7 +94,8 @@ export declare type TGetAncestorsResponse = {
|
|
|
85
94
|
right_hash: bytes32;
|
|
86
95
|
}>;
|
|
87
96
|
};
|
|
88
|
-
export declare
|
|
97
|
+
export declare type WsGetAncestorsMessage = GetMessageType<chia_data_layer_service, get_ancestors_command, TGetAncestorsResponse>;
|
|
98
|
+
export declare function get_ancestors<T extends TRPCAgent | TDaemon>(agent: T, params: TGetAncestorsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetAncestorsResponse, WsGetAncestorsMessage>>;
|
|
89
99
|
export declare const get_root_command = "get_root";
|
|
90
100
|
export declare type get_root_command = typeof get_root_command;
|
|
91
101
|
export declare type TGetRootRequest = {
|
|
@@ -96,7 +106,8 @@ export declare type TGetRootResponse = {
|
|
|
96
106
|
confirmed: bool;
|
|
97
107
|
timestamp: uint64;
|
|
98
108
|
};
|
|
99
|
-
export declare
|
|
109
|
+
export declare type WsGetRootMessage = GetMessageType<chia_data_layer_service, get_root_command, TGetRootResponse>;
|
|
110
|
+
export declare function get_root<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootResponse, WsGetRootMessage>>;
|
|
100
111
|
export declare const get_local_root_command = "get_local_root";
|
|
101
112
|
export declare type get_local_root_command = typeof get_local_root_command;
|
|
102
113
|
export declare type TGetLocalRootRequest = {
|
|
@@ -105,7 +116,8 @@ export declare type TGetLocalRootRequest = {
|
|
|
105
116
|
export declare type TGetLocalRootResponse = {
|
|
106
117
|
hash: bytes32 | None;
|
|
107
118
|
};
|
|
108
|
-
export declare
|
|
119
|
+
export declare type WsGetLocalRootMessage = GetMessageType<chia_data_layer_service, get_local_root_command, TGetLocalRootResponse>;
|
|
120
|
+
export declare function get_local_root<T extends TRPCAgent | TDaemon>(agent: T, params: TGetLocalRootRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetLocalRootResponse, WsGetLocalRootMessage>>;
|
|
109
121
|
export declare const get_roots_command = "get_roots";
|
|
110
122
|
export declare type get_roots_command = typeof get_roots_command;
|
|
111
123
|
export declare type TGetRootsRequest = {
|
|
@@ -119,7 +131,8 @@ export declare type TGetRootsResponse = {
|
|
|
119
131
|
timestamp: uint64;
|
|
120
132
|
}>;
|
|
121
133
|
};
|
|
122
|
-
export declare
|
|
134
|
+
export declare type WsGetRootsMessage = GetMessageType<chia_data_layer_service, get_roots_command, TGetRootsResponse>;
|
|
135
|
+
export declare function get_roots<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootsResponse, WsGetRootsMessage>>;
|
|
123
136
|
export declare const delete_key_command = "delete_key";
|
|
124
137
|
export declare type delete_key_command = typeof delete_key_command;
|
|
125
138
|
export declare type TDeleteKeyRequest = {
|
|
@@ -130,7 +143,8 @@ export declare type TDeleteKeyRequest = {
|
|
|
130
143
|
export declare type TDeleteKeyResponse = {
|
|
131
144
|
tx_id: bytes32;
|
|
132
145
|
};
|
|
133
|
-
export declare
|
|
146
|
+
export declare type WsDeleteKeyMessage = GetMessageType<chia_data_layer_service, delete_key_command, TDeleteKeyResponse>;
|
|
147
|
+
export declare function delete_key<T extends TRPCAgent | TDaemon>(agent: T, params: TDeleteKeyRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TDeleteKeyResponse, WsDeleteKeyMessage>>;
|
|
134
148
|
export declare const insert_command = "insert";
|
|
135
149
|
export declare type insert_command = typeof insert_command;
|
|
136
150
|
export declare type TInsertRequest = {
|
|
@@ -142,7 +156,8 @@ export declare type TInsertRequest = {
|
|
|
142
156
|
export declare type TInsertResponse = {
|
|
143
157
|
tx_id: bytes32;
|
|
144
158
|
};
|
|
145
|
-
export declare
|
|
159
|
+
export declare type WsInsertMessage = GetMessageType<chia_data_layer_service, insert_command, TInsertResponse>;
|
|
160
|
+
export declare function insert<T extends TRPCAgent | TDaemon>(agent: T, params: TInsertRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TInsertResponse, WsInsertMessage>>;
|
|
146
161
|
export declare const subscribe_command = "subscribe";
|
|
147
162
|
export declare type subscribe_command = typeof subscribe_command;
|
|
148
163
|
export declare type TSubscribeRequest = {
|
|
@@ -150,14 +165,16 @@ export declare type TSubscribeRequest = {
|
|
|
150
165
|
urls: str[];
|
|
151
166
|
};
|
|
152
167
|
export declare type TSubscribeResponse = {};
|
|
153
|
-
export declare
|
|
168
|
+
export declare type WsSubscribeMessage = GetMessageType<chia_data_layer_service, subscribe_command, TSubscribeResponse>;
|
|
169
|
+
export declare function subscribe<T extends TRPCAgent | TDaemon>(agent: T, params: TSubscribeRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSubscribeResponse, WsSubscribeMessage>>;
|
|
154
170
|
export declare const unsubscribe_command = "unsubscribe";
|
|
155
171
|
export declare type unsubscribe_command = typeof unsubscribe_command;
|
|
156
172
|
export declare type TUnsubscribeRequest = {
|
|
157
173
|
id: str;
|
|
158
174
|
};
|
|
159
175
|
export declare type TUnsubscribeResponse = {};
|
|
160
|
-
export declare
|
|
176
|
+
export declare type WsUnsubscribeMessage = GetMessageType<chia_data_layer_service, unsubscribe_command, TUnsubscribeResponse>;
|
|
177
|
+
export declare function unsubscribe<T extends TRPCAgent | TDaemon>(agent: T, params: TUnsubscribeRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TUnsubscribeResponse, WsUnsubscribeMessage>>;
|
|
161
178
|
export declare const add_mirror_command = "add_mirror";
|
|
162
179
|
export declare type add_mirror_command = typeof add_mirror_command;
|
|
163
180
|
export declare type TAddMirrorRequest = {
|
|
@@ -167,7 +184,8 @@ export declare type TAddMirrorRequest = {
|
|
|
167
184
|
fee?: uint64;
|
|
168
185
|
};
|
|
169
186
|
export declare type TAddMirrorResponse = {};
|
|
170
|
-
export declare
|
|
187
|
+
export declare type WsAddMirrorMessage = GetMessageType<chia_data_layer_service, add_mirror_command, TAddMirrorResponse>;
|
|
188
|
+
export declare function add_mirror<T extends TRPCAgent | TDaemon>(agent: T, params: TAddMirrorRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TAddMirrorResponse, WsAddMirrorMessage>>;
|
|
171
189
|
export declare const delete_mirror_command = "delete_mirror";
|
|
172
190
|
export declare type delete_mirror_command = typeof delete_mirror_command;
|
|
173
191
|
export declare type TDeleteMirrorRequest = {
|
|
@@ -175,7 +193,8 @@ export declare type TDeleteMirrorRequest = {
|
|
|
175
193
|
fee?: uint64;
|
|
176
194
|
};
|
|
177
195
|
export declare type TDeleteMirrorResponse = {};
|
|
178
|
-
export declare
|
|
196
|
+
export declare type WsDeleteMirrorMessage = GetMessageType<chia_data_layer_service, delete_mirror_command, TDeleteMirrorResponse>;
|
|
197
|
+
export declare function delete_mirror<T extends TRPCAgent | TDaemon>(agent: T, params: TDeleteMirrorRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TDeleteMirrorResponse, WsDeleteMirrorMessage>>;
|
|
179
198
|
export declare const get_mirrors_command = "get_mirrors";
|
|
180
199
|
export declare type get_mirrors_command = typeof get_mirrors_command;
|
|
181
200
|
export declare type TGetMirrorsRequest = {
|
|
@@ -190,7 +209,8 @@ export declare type TGetMirrorsResponse = {
|
|
|
190
209
|
ours: bool;
|
|
191
210
|
}>;
|
|
192
211
|
};
|
|
193
|
-
export declare
|
|
212
|
+
export declare type WsGetMirrorsMessage = GetMessageType<chia_data_layer_service, get_mirrors_command, TGetMirrorsResponse>;
|
|
213
|
+
export declare function get_mirrors<T extends TRPCAgent | TDaemon>(agent: T, params: TGetMirrorsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetMirrorsResponse, WsGetMirrorsMessage>>;
|
|
194
214
|
export declare const remove_subscriptions_command = "remove_subscriptions";
|
|
195
215
|
export declare type remove_subscriptions_command = typeof remove_subscriptions_command;
|
|
196
216
|
export declare type TRemoveSubscriptionsRequest = {
|
|
@@ -198,13 +218,15 @@ export declare type TRemoveSubscriptionsRequest = {
|
|
|
198
218
|
urls: str[];
|
|
199
219
|
};
|
|
200
220
|
export declare type TRemoveSubscriptionsResponse = {};
|
|
201
|
-
export declare
|
|
221
|
+
export declare type WsRemoveSubscriptionsMessage = GetMessageType<chia_data_layer_service, remove_subscriptions_command, TRemoveSubscriptionsResponse>;
|
|
222
|
+
export declare function remove_subscriptions<T extends TRPCAgent | TDaemon>(agent: T, params: TRemoveSubscriptionsRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TRemoveSubscriptionsResponse, WsRemoveSubscriptionsMessage>>;
|
|
202
223
|
export declare const subscriptions_command = "subscriptions";
|
|
203
224
|
export declare type subscriptions_command = typeof subscriptions_command;
|
|
204
225
|
export declare type TSubscriptionsResponse = {
|
|
205
226
|
store_ids: str[];
|
|
206
227
|
};
|
|
207
|
-
export declare
|
|
228
|
+
export declare type WsSubscriptionsMessage = GetMessageType<chia_data_layer_service, subscriptions_command, TSubscriptionsResponse>;
|
|
229
|
+
export declare function subscriptions<T extends TRPCAgent | TDaemon>(agent: T): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TSubscriptionsResponse, WsSubscriptionsMessage>>;
|
|
208
230
|
export declare const get_kv_diff_command = "get_kv_diff";
|
|
209
231
|
export declare type get_kv_diff_command = typeof get_kv_diff_command;
|
|
210
232
|
export declare type TGetKvDiffRequest = {
|
|
@@ -219,7 +241,8 @@ export declare type TGetKvDiffResponse = {
|
|
|
219
241
|
value: str;
|
|
220
242
|
}>;
|
|
221
243
|
};
|
|
222
|
-
export declare
|
|
244
|
+
export declare type WsGetKvDiffMessage = GetMessageType<chia_data_layer_service, get_kv_diff_command, TGetKvDiffResponse>;
|
|
245
|
+
export declare function get_kv_diff<T extends TRPCAgent | TDaemon>(agent: T, params: TGetKvDiffRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetKvDiffResponse, WsGetKvDiffMessage>>;
|
|
223
246
|
export declare const get_root_history_command = "get_root_history";
|
|
224
247
|
export declare type get_root_history_command = typeof get_root_history_command;
|
|
225
248
|
export declare type TGetRootHistoryRequest = {
|
|
@@ -232,7 +255,8 @@ export declare type TGetRootHistoryResponse = {
|
|
|
232
255
|
timestamp: uint64;
|
|
233
256
|
}>;
|
|
234
257
|
};
|
|
235
|
-
export declare
|
|
258
|
+
export declare type WsGetRootHistoryMessage = GetMessageType<chia_data_layer_service, get_root_history_command, TGetRootHistoryResponse>;
|
|
259
|
+
export declare function get_root_history<T extends TRPCAgent | TDaemon>(agent: T, params: TGetRootHistoryRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetRootHistoryResponse, WsGetRootHistoryMessage>>;
|
|
236
260
|
export declare const add_missing_files_command = "add_missing_files";
|
|
237
261
|
export declare type add_missing_files_command = typeof add_missing_files_command;
|
|
238
262
|
export declare type TAddMissingFilesRequest = {
|
|
@@ -241,7 +265,8 @@ export declare type TAddMissingFilesRequest = {
|
|
|
241
265
|
foldername?: str;
|
|
242
266
|
};
|
|
243
267
|
export declare type TAddMissingFilesResponse = {};
|
|
244
|
-
export declare
|
|
268
|
+
export declare type WsAddMissingFilesMessage = GetMessageType<chia_data_layer_service, add_missing_files_command, TAddMissingFilesResponse>;
|
|
269
|
+
export declare function add_missing_files<T extends TRPCAgent | TDaemon>(agent: T, params: TAddMissingFilesRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TAddMissingFilesResponse, WsAddMissingFilesMessage>>;
|
|
245
270
|
export declare const make_offer_command = "make_offer";
|
|
246
271
|
export declare type make_offer_command = typeof make_offer_command;
|
|
247
272
|
export declare type TMakeOfferRequest = {
|
|
@@ -253,7 +278,8 @@ export declare type TMakeOfferResponse = {
|
|
|
253
278
|
success: bool;
|
|
254
279
|
offer: OfferMarshalled;
|
|
255
280
|
};
|
|
256
|
-
export declare
|
|
281
|
+
export declare type WsMakeOfferMessage = GetMessageType<chia_data_layer_service, make_offer_command, TMakeOfferResponse>;
|
|
282
|
+
export declare function make_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TMakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TMakeOfferResponse, WsMakeOfferMessage>>;
|
|
257
283
|
export declare const take_offer_command = "take_offer";
|
|
258
284
|
export declare type take_offer_command = typeof take_offer_command;
|
|
259
285
|
export declare type TTakeOfferRequest = {
|
|
@@ -264,7 +290,8 @@ export declare type TTakeOfferResponse = {
|
|
|
264
290
|
success: bool;
|
|
265
291
|
trade_id: str;
|
|
266
292
|
};
|
|
267
|
-
export declare
|
|
293
|
+
export declare type WsTakeOfferMessageDL = GetMessageType<chia_data_layer_service, take_offer_command, TTakeOfferResponse>;
|
|
294
|
+
export declare function take_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TTakeOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TTakeOfferResponseDL, WsTakeOfferMessageDL>>;
|
|
268
295
|
export declare const verify_offer_command = "verify_offer";
|
|
269
296
|
export declare type verify_offer_command = typeof verify_offer_command;
|
|
270
297
|
export declare type TVerifyOfferRequest = {
|
|
@@ -277,7 +304,8 @@ export declare type TVerifyOfferResponse = {
|
|
|
277
304
|
error: Optional<str>;
|
|
278
305
|
fee: Optional<uint64>;
|
|
279
306
|
};
|
|
280
|
-
export declare
|
|
307
|
+
export declare type WsVerifyOfferMessage = GetMessageType<chia_data_layer_service, verify_offer_command, TVerifyOfferResponse>;
|
|
308
|
+
export declare function verify_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TVerifyOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TVerifyOfferResponse, WsVerifyOfferMessage>>;
|
|
281
309
|
export declare const cancel_offer_command = "cancel_offer";
|
|
282
310
|
export declare type cancel_offer_command = typeof cancel_offer_command;
|
|
283
311
|
export declare type TCancelOfferRequest = {
|
|
@@ -288,4 +316,17 @@ export declare type TCancelOfferRequest = {
|
|
|
288
316
|
export declare type TCancelOfferResponse = {
|
|
289
317
|
success: bool;
|
|
290
318
|
};
|
|
291
|
-
export declare
|
|
319
|
+
export declare type WsCancelOfferMessageDL = GetMessageType<chia_data_layer_service, cancel_offer_command, TCancelOfferResponse>;
|
|
320
|
+
export declare function cancel_offer<T extends TRPCAgent | TDaemon>(agent: T, params: TCancelOfferRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TCancelOfferResponseDL, WsCancelOfferMessageDL>>;
|
|
321
|
+
export declare const get_sync_status_command = "get_sync_status";
|
|
322
|
+
export declare type get_sync_status_command = typeof get_sync_status_command;
|
|
323
|
+
export declare type TGetSyncStatusRequest = {
|
|
324
|
+
id: str;
|
|
325
|
+
};
|
|
326
|
+
export declare type TGetSyncStatusResponse = {
|
|
327
|
+
sync_status: SyncStatus;
|
|
328
|
+
};
|
|
329
|
+
export declare type WsGetSyncStatusMessage = GetMessageType<chia_data_layer_service, get_sync_status_command, TGetSyncStatusResponse>;
|
|
330
|
+
export declare function get_sync_status<T extends TRPCAgent | TDaemon>(agent: T, params: TGetSyncStatusRequest): Promise<import("../../../rpc/index").ErrorResponse | ResType<T, TGetSyncStatusResponse, WsGetSyncStatusMessage>>;
|
|
331
|
+
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 | TTakeOfferResponseDL | TVerifyOfferResponse | TCancelOfferResponseDL | TGetSyncStatusResponse;
|
|
332
|
+
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 | WsTakeOfferMessageDL | WsVerifyOfferMessage | WsCancelOfferMessageDL | WsGetSyncStatusMessage;
|
|
@@ -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.cancel_offer = exports.cancel_offer_command = exports.verify_offer = void 0;
|
|
13
|
+
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) {
|
|
@@ -194,3 +194,10 @@ function cancel_offer(agent, params) {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
exports.cancel_offer = cancel_offer;
|
|
197
|
+
exports.get_sync_status_command = "get_sync_status";
|
|
198
|
+
function get_sync_status(agent, params) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
return agent.sendMessage(exports.chia_data_layer_service, exports.get_sync_status_command, params);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
exports.get_sync_status = get_sync_status;
|