chia-agent 8.0.0 → 9.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 +74 -0
- package/README.md +3 -3
- package/api/chia/types/blockchain_format/coin.d.ts +4 -0
- package/api/chia/types/spend_bundle_condition.d.ts +8 -0
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +2 -2
- package/api/rpc/common/index.d.ts +6 -0
- package/api/rpc/common/index.js +8 -1
- package/api/rpc/farmer/index.d.ts +17 -17
- package/api/rpc/full_node/index.d.ts +9 -0
- package/api/rpc/full_node/index.js +9 -1
- package/api/rpc/index.d.ts +9 -9
- package/api/rpc/index.js +7 -3
- package/api/rpc/wallet/index.d.ts +38 -24
- package/api/rpc/wallet/index.js +10 -3
- package/api/ws/wallet/index.d.ts +10 -5
- package/api/ws/wallet/index.js +12 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [9.0.0]
|
|
4
|
+
### Breaking Change
|
|
5
|
+
`series_total` and `series_number` in `NFTInfo` class have been renamed to `edition_total` and `edition_number`
|
|
6
|
+
(defined in `chia/wallet/nft_wallet/nft_info.py`.)
|
|
7
|
+
As a result, the following Wallet RPC APIs in `chia-blockchain@1.5.1` become not compatible with `chia-blockchain@1.5.0`
|
|
8
|
+
- [`nft_get_info`](./src/api/rpc/wallet/README.md#nft_get_infoagent-params)
|
|
9
|
+
- `nft_info.series_total` was renamed to `nft_info.edition_total`
|
|
10
|
+
- `nft_info.series_number` was renamed to `nft_info.edition_number`
|
|
11
|
+
- [`nft_get_nfts`](./src/api/rpc/wallet/README.md#nft_get_nftsagent-params)
|
|
12
|
+
- `nft_list.series_total` was renamed to `nft_list.edition_total`
|
|
13
|
+
- `nft_list.series_number` was renamed to `nft_list.edition_number`
|
|
14
|
+
### Added
|
|
15
|
+
- [New FullNode RPC API](./src/api/rpc/full_node)
|
|
16
|
+
- [`get_block_spends`](./src/api/rpc/full_node/README.md#get_block_spendsagent-params)
|
|
17
|
+
- [New Wallet RPC API](./src/api/rpc/wallet)
|
|
18
|
+
- [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params)
|
|
19
|
+
### Changed
|
|
20
|
+
- [Farmer RPC API](./src/api/rpc/farmer)
|
|
21
|
+
- [`get_harvester_plots_valid`](./src/api/rpc/farmer/README.md#get_harvester_plots_validagent-params)
|
|
22
|
+
- [`get_harvester_plots_invalid`](./src/api/rpc/farmer/README.md#get_harvester_plots_invalidagent-params)
|
|
23
|
+
- [`get_harvester_plots_keys_missing`](./src/api/rpc/farmer/README.md#get_harvester_plots_keys_missingagent-params)
|
|
24
|
+
- [`get_harvester_plots_duplicates`](./src/api/rpc/farmer/README.md#get_harvester_plots_duplicatesagent-params)
|
|
25
|
+
- Changed type of `page` to `uint32` from `int`
|
|
26
|
+
- Changed type of `page_size` to `uint32` from `int`
|
|
27
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
28
|
+
- [`get_wallets`](./src/api/rpc/wallet/README.md#get_walletsagent-params)
|
|
29
|
+
- Added `fingerprint` to response
|
|
30
|
+
- [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params)
|
|
31
|
+
- Added new error response
|
|
32
|
+
- [`get_wallet_balance`](./src/api/rpc/wallet/README.md#get_wallet_balanceagent-params)
|
|
33
|
+
- Added `wallet_type` to response
|
|
34
|
+
- Added `asset_id` to response
|
|
35
|
+
- [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params)
|
|
36
|
+
- Changed request type of `wallet_id` to `uint32` from `int`
|
|
37
|
+
- Changed request type of `min_coin_amount` to `uint64` from `uint128`
|
|
38
|
+
- [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
|
|
39
|
+
- Added `min_coin_amount` to request.
|
|
40
|
+
- Added `excluded_coins` to request.
|
|
41
|
+
- [`cat_set_name`](./src/api/rpc/wallet/README.md#cat_set_nameagent-params)
|
|
42
|
+
- Changed type of `wallet_id` to `uint32` from `int`
|
|
43
|
+
- [`cat_get_name`](./src/api/rpc/wallet/README.md#cat_get_nameagent-params)
|
|
44
|
+
- Changed type of `wallet_id` to `uint32` from `int`
|
|
45
|
+
- [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params)
|
|
46
|
+
- Changed type of `wallet_id` to `uint32` from `int`
|
|
47
|
+
- Changed request type of `min_coin_amount` to `uint64` from `uint128`
|
|
48
|
+
- [`cat_get_asset_id`](./src/api/rpc/wallet/README.md#cat_get_asset_idagent-params)
|
|
49
|
+
- Changed type of `wallet_id` to `uint32` from `int`
|
|
50
|
+
- [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params)
|
|
51
|
+
- Changed request type of `min_coin_amount` to `uint64` from `uint128`
|
|
52
|
+
- [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
|
|
53
|
+
- Changed request type of `min_coin_amount` to `uint64` from `uint128`
|
|
54
|
+
- [`send_clawback_transaction`](./src/api/rpc/wallet/README.md#send_clawback_transactionagent-params)
|
|
55
|
+
- Changed type of `wallet_id` to `uint32` from `int`
|
|
56
|
+
- [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params)
|
|
57
|
+
- Changed request type of `min_coin_amount` to `uint64` from `uint128`
|
|
58
|
+
- Added `excluded_coins` to request.
|
|
59
|
+
- [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params)
|
|
60
|
+
- [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params)
|
|
61
|
+
- [`pw_status`](./src/api/rpc/wallet/README.md#pw_statusagent-params)
|
|
62
|
+
- Removed error response
|
|
63
|
+
- [`nft_get_info`](./src/api/rpc/wallet/README.md#nft_get_infoagent-params)
|
|
64
|
+
- `nft_info.series_total` was renamed to `nft_info.edition_total`
|
|
65
|
+
- `nft_info.series_number` was renamed to `nft_info.edition_number`
|
|
66
|
+
- [`nft_get_nfts`](./src/api/rpc/wallet/README.md#nft_get_nftsagent-params)
|
|
67
|
+
- `nft_list.series_total` was renamed to `nft_list.edition_total`
|
|
68
|
+
- `nft_list.series_number` was renamed to `nft_list.edition_number`
|
|
69
|
+
- [Wallet WebSocket API](./src/api/ws/wallet)
|
|
70
|
+
- Added `added_stray_cat`, `new_derivation_index` events
|
|
71
|
+
### Fixed
|
|
72
|
+
- Fixed an issue where type information of `get_puzzle_and_solution` was missing.
|
|
73
|
+
- Fixed an issue where event destination of `sync_changed` and `coin_added` Wallet WebSocket API was not correct.
|
|
74
|
+
- Fixed an issue where `healthz` common RPC API was missing.
|
|
75
|
+
|
|
3
76
|
## [8.0.0]
|
|
4
77
|
### Breaking Change
|
|
5
78
|
- [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params)
|
|
@@ -498,6 +571,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
498
571
|
Initial release.
|
|
499
572
|
|
|
500
573
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
574
|
+
[9.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v8.0.0...v9.0.0
|
|
501
575
|
[8.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v7.0.0...v8.0.0
|
|
502
576
|
[7.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v6.0.0...v7.0.0
|
|
503
577
|
[6.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v5.0.0...v6.0.0
|
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.5.
|
|
5
|
+
Supports all RPC/Websocket API available at `chia 1.5.1`.
|
|
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
|
+
- [`6ec6bd799b43c040fe0097d27729348272e42e21`](https://github.com/Chia-Network/chia-blockchain/tree/6ec6bd799b43c040fe0097d27729348272e42e21) of [chia-blockchain 1.5.1](https://github.com/Chia-Network/chia-blockchain)
|
|
26
|
+
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/6ec6bd799b43c040fe0097d27729348272e42e21...main)
|
|
27
27
|
- [`495f71e3acc93b18f10cfa9aac6a5b68cc7064c2`](https://github.com/Chia-Network/pool-reference/tree/495f71e3acc93b18f10cfa9aac6a5b68cc7064c2) 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/495f71e3acc93b18f10cfa9aac6a5b68cc7064c2...main)
|
|
29
29
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { bytes32 } from "./sized_bytes";
|
|
2
2
|
import { uint64 } from "../_python_types_";
|
|
3
|
+
/**
|
|
4
|
+
* The actual definition of `Coin` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/coin.rs
|
|
5
|
+
* from chia-blockchain@1.5.1
|
|
6
|
+
*/
|
|
3
7
|
export declare type Coin = {
|
|
4
8
|
parent_coin_info: bytes32;
|
|
5
9
|
puzzle_hash: bytes32;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { bytes32, bytes48 } from "./blockchain_format/sized_bytes";
|
|
2
2
|
import { bytes, Optional, uint32, uint64 } from "./_python_types_";
|
|
3
|
+
/**
|
|
4
|
+
* The actual definition of `Spend` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/run_generator.rs
|
|
5
|
+
* from chia-blockchain@1.5.1
|
|
6
|
+
*/
|
|
3
7
|
export declare type Spend = {
|
|
4
8
|
coin_id: bytes32;
|
|
5
9
|
puzzle_hash: bytes32;
|
|
@@ -8,6 +12,10 @@ export declare type Spend = {
|
|
|
8
12
|
create_coin: Array<[bytes32, uint64, bytes]>;
|
|
9
13
|
agg_sig_me: Array<[bytes48, bytes]>;
|
|
10
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* The actual definition of `SpendBundleConditions` type was moved to https://github.com/Chia-Network/chia_rs/blob/main/wheel/src/run_generator.rs
|
|
17
|
+
* from chia-blockchain@1.5.1
|
|
18
|
+
*/
|
|
11
19
|
export declare type SpendBundleConditions = {
|
|
12
20
|
spends: Spend[];
|
|
13
21
|
reserve_fee: uint64;
|
|
@@ -12,8 +12,8 @@ export declare type NFTInfo = {
|
|
|
12
12
|
metadata_hash: bytes;
|
|
13
13
|
license_uris: str[];
|
|
14
14
|
license_hash: bytes;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
edition_total: uint64;
|
|
16
|
+
edition_number: uint64;
|
|
17
17
|
updater_puzhash: bytes32;
|
|
18
18
|
chain_info: str;
|
|
19
19
|
mint_height: uint32;
|
|
@@ -38,3 +38,9 @@ export declare type TGetRoutesResponse = {
|
|
|
38
38
|
routes: str[];
|
|
39
39
|
};
|
|
40
40
|
export declare function get_routes(agent: TRPCAgent): Promise<TGetRoutesResponse>;
|
|
41
|
+
export declare const healthz_command = "healthz";
|
|
42
|
+
export declare type healthz_command = typeof healthz_command;
|
|
43
|
+
export declare type THealthzResponse = {
|
|
44
|
+
success: "true";
|
|
45
|
+
};
|
|
46
|
+
export declare function healthz(agent: TRPCAgent): Promise<THealthzResponse>;
|
package/api/rpc/common/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.get_routes = exports.get_routes_command = exports.stop_node = exports.stop_node_command = exports.close_connection = exports.close_connection_command = exports.open_connection = exports.open_connection_command = exports.get_connections = exports.get_connections_command = exports.chia_common_service = void 0;
|
|
12
|
+
exports.healthz = exports.healthz_command = exports.get_routes = exports.get_routes_command = exports.stop_node = exports.stop_node_command = exports.close_connection = exports.close_connection_command = exports.open_connection = exports.open_connection_command = exports.get_connections = exports.get_connections_command = exports.chia_common_service = void 0;
|
|
13
13
|
exports.chia_common_service = "";
|
|
14
14
|
exports.get_connections_command = "get_connections";
|
|
15
15
|
function get_connections(agent, params) {
|
|
@@ -46,3 +46,10 @@ function get_routes(agent) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
exports.get_routes = get_routes;
|
|
49
|
+
exports.healthz_command = "healthz";
|
|
50
|
+
function healthz(agent) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return agent.sendMessage(exports.chia_common_service, exports.healthz_command);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
exports.healthz = healthz;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProofOfSpace } from "../../chia/types/blockchain_format/proof_of_space";
|
|
2
|
-
import { bool, int, Optional, str, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
2
|
+
import { bool, int, Optional, str, uint32, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
3
3
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
4
4
|
import { TRPCAgent } from "../../../rpc/index";
|
|
5
5
|
import { PoolState } from "../../chia/farmer/farmer";
|
|
@@ -87,8 +87,8 @@ export declare const get_harvester_plots_valid_command = "get_harvester_plots_va
|
|
|
87
87
|
export declare type get_harvester_plots_valid_command = typeof get_harvester_plots_valid_command;
|
|
88
88
|
export declare type TGetHarvesterPlotsValidRequest = {
|
|
89
89
|
node_id: bytes32;
|
|
90
|
-
page:
|
|
91
|
-
page_size:
|
|
90
|
+
page: uint32;
|
|
91
|
+
page_size: uint32;
|
|
92
92
|
filter: Array<{
|
|
93
93
|
key: str;
|
|
94
94
|
value: Optional<str>;
|
|
@@ -98,8 +98,8 @@ export declare type TGetHarvesterPlotsValidRequest = {
|
|
|
98
98
|
};
|
|
99
99
|
export declare type TGetHarvesterPlotsValidResponse = {
|
|
100
100
|
node_id: str;
|
|
101
|
-
page:
|
|
102
|
-
page_count:
|
|
101
|
+
page: uint32;
|
|
102
|
+
page_count: uint32;
|
|
103
103
|
total_count: int;
|
|
104
104
|
plots: Plot[];
|
|
105
105
|
};
|
|
@@ -108,15 +108,15 @@ export declare const get_harvester_plots_invalid_command = "get_harvester_plots_
|
|
|
108
108
|
export declare type get_harvester_plots_invalid_command = typeof get_harvester_plots_invalid_command;
|
|
109
109
|
export declare type TGetHarvesterPlotsInvalidRequest = {
|
|
110
110
|
node_id: bytes32;
|
|
111
|
-
page:
|
|
112
|
-
|
|
111
|
+
page: uint32;
|
|
112
|
+
page_count: uint32;
|
|
113
113
|
filter: str[];
|
|
114
114
|
reverse: bool;
|
|
115
115
|
};
|
|
116
116
|
export declare type TGetHarvesterPlotsInvalidResponse = {
|
|
117
117
|
node_id: str;
|
|
118
|
-
page:
|
|
119
|
-
page_count:
|
|
118
|
+
page: uint32;
|
|
119
|
+
page_count: uint32;
|
|
120
120
|
total_count: int;
|
|
121
121
|
plots: str[];
|
|
122
122
|
};
|
|
@@ -125,15 +125,15 @@ export declare const get_harvester_plots_keys_missing_command = "get_harvester_p
|
|
|
125
125
|
export declare type get_harvester_plots_keys_missing_command = typeof get_harvester_plots_keys_missing_command;
|
|
126
126
|
export declare type TGetHarvesterPlotsKeysMissingRequest = {
|
|
127
127
|
node_id: bytes32;
|
|
128
|
-
page:
|
|
129
|
-
|
|
128
|
+
page: uint32;
|
|
129
|
+
page_count: uint32;
|
|
130
130
|
filter: str[];
|
|
131
131
|
reverse: bool;
|
|
132
132
|
};
|
|
133
133
|
export declare type TGetHarvesterPlotsKeysMissingResponse = {
|
|
134
134
|
node_id: str;
|
|
135
|
-
page:
|
|
136
|
-
page_count:
|
|
135
|
+
page: uint32;
|
|
136
|
+
page_count: uint32;
|
|
137
137
|
total_count: int;
|
|
138
138
|
plots: str[];
|
|
139
139
|
};
|
|
@@ -142,15 +142,15 @@ export declare const get_harvester_plots_duplicates_command = "get_harvester_plo
|
|
|
142
142
|
export declare type get_harvester_plots_duplicates_command = typeof get_harvester_plots_duplicates_command;
|
|
143
143
|
export declare type TGetHarvesterPlotsDuplicatesRequest = {
|
|
144
144
|
node_id: bytes32;
|
|
145
|
-
page:
|
|
146
|
-
|
|
145
|
+
page: uint32;
|
|
146
|
+
page_count: uint32;
|
|
147
147
|
filter: str[];
|
|
148
148
|
reverse: bool;
|
|
149
149
|
};
|
|
150
150
|
export declare type TGetHarvesterPlotsDuplicatesResponse = {
|
|
151
151
|
node_id: str;
|
|
152
|
-
page:
|
|
153
|
-
page_count:
|
|
152
|
+
page: uint32;
|
|
153
|
+
page_count: uint32;
|
|
154
154
|
total_count: int;
|
|
155
155
|
plots: str[];
|
|
156
156
|
};
|
|
@@ -100,6 +100,15 @@ export declare type TGetBlockRecordsResponse = {
|
|
|
100
100
|
block_records: BlockRecord[];
|
|
101
101
|
};
|
|
102
102
|
export declare function get_block_records(agent: TRPCAgent, data: TGetBlockRecordsRequest): Promise<TGetBlockRecordsResponse>;
|
|
103
|
+
export declare const get_block_spends_command = "get_block_spends";
|
|
104
|
+
export declare type get_block_spends_command = typeof get_block_spends_command;
|
|
105
|
+
export declare type TGetBlockSpendsRequest = {
|
|
106
|
+
header_hash: str;
|
|
107
|
+
};
|
|
108
|
+
export declare type TGetBlockSpendsResponse = {
|
|
109
|
+
block_spends: CoinSpend[];
|
|
110
|
+
};
|
|
111
|
+
export declare function get_block_spends(agent: TRPCAgent, data: TGetBlockSpendsRequest): Promise<TGetBlockSpendsResponse>;
|
|
103
112
|
export declare const get_unfinished_block_headers_command = "get_unfinished_block_headers";
|
|
104
113
|
export declare type get_unfinished_block_headers_command = typeof get_unfinished_block_headers_command;
|
|
105
114
|
export declare type TGetUnfinishedBlockHeadersRequest = {};
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.get_mempool_item_by_tx_id_command = exports.get_all_mempool_items = exports.get_all_mempool_items_command = exports.get_all_mempool_tx_ids = exports.get_all_mempool_tx_ids_command = exports.get_puzzle_and_solution = exports.get_puzzle_and_solution_command = exports.push_tx = exports.push_tx_command = exports.get_coin_records_by_hint = exports.get_coin_records_by_hint_command = exports.get_coin_records_by_parent_ids = exports.get_coin_records_by_parent_ids_command = exports.get_coin_records_by_names = exports.get_coin_records_by_names_command = exports.get_coin_record_by_name = exports.get_coin_record_by_name_command = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hashes_command = exports.get_coin_records_by_puzzle_hash = exports.get_coin_records_by_puzzle_hash_command = exports.get_recent_signage_point_or_eos = exports.get_recent_signage_point_or_eos_command = exports.get_network_info_of_full_node = exports.get_network_info_command_of_full_node = exports.get_initial_freeze_period_of_full_node = exports.get_initial_freeze_period_command_of_full_node = exports.get_additions_and_removals = exports.get_additions_and_removals_command = exports.get_network_space = exports.get_network_space_command = exports.get_unfinished_block_headers = exports.get_unfinished_block_headers_command = exports.get_block_spends = exports.get_block_spends_command = exports.get_block_records = exports.get_block_records_command = exports.get_block_record = exports.get_block_record_command = exports.get_block_record_by_height = exports.get_block_record_by_height_command = exports.get_block_count_metrics = exports.get_block_count_metrics_command = exports.get_blocks = exports.get_blocks_command = exports.get_block = exports.get_block_command = exports.get_blockchain_state = exports.get_blockchain_state_command = exports.chia_full_node_service = void 0;
|
|
13
|
+
exports.get_mempool_item_by_tx_id = void 0;
|
|
13
14
|
exports.chia_full_node_service = "chia_full_node";
|
|
14
15
|
exports.get_blockchain_state_command = "get_blockchain_state";
|
|
15
16
|
function get_blockchain_state(agent) {
|
|
@@ -60,6 +61,13 @@ function get_block_records(agent, data) {
|
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
63
|
exports.get_block_records = get_block_records;
|
|
64
|
+
exports.get_block_spends_command = "get_block_spends";
|
|
65
|
+
function get_block_spends(agent, data) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
return agent.sendMessage(exports.chia_full_node_service, exports.get_block_spends_command, data);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
exports.get_block_spends = get_block_spends;
|
|
63
71
|
exports.get_unfinished_block_headers_command = "get_unfinished_block_headers";
|
|
64
72
|
function get_unfinished_block_headers(agent) {
|
|
65
73
|
return __awaiter(this, void 0, void 0, function* () {
|
package/api/rpc/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { TGetRewardTargetResponse, TGetSignagePointResponse, TGetSignagePointsResponse, TSetRewardTargetResponse, TGetHarvestersResponse, TGetHarvestersSummaryResponse, TGetHarvesterPlotsValidResponse, TGetHarvesterPlotsInvalidResponse, TGetHarvesterPlotsKeysMissingResponse, TGetHarvesterPlotsDuplicatesResponse, TSetPayoutInstructionsResponse, TGetPoolStateResponse, TGetPoolLinkResponse } from "./farmer/index";
|
|
2
2
|
export { chia_farmer_service, TGetRewardTargetRequest, TGetRewardTargetResponse, TGetSignagePointRequest, TGetSignagePointResponse, TGetSignagePointsRequest, TGetSignagePointsResponse, TSetRewardTargetRequest, TSetRewardTargetResponse, TGetHarvestersRequest, TGetHarvestersResponse, TGetHarvestersSummaryResponse, TGetHarvesterPlotsValidRequest, TGetHarvesterPlotsValidResponse, TGetHarvesterPlotsInvalidRequest, TGetHarvesterPlotsInvalidResponse, TGetHarvesterPlotsKeysMissingRequest, TGetHarvesterPlotsKeysMissingResponse, TGetHarvesterPlotsDuplicatesRequest, TGetHarvesterPlotsDuplicatesResponse, TSetPayoutInstructionsRequest, TSetPayoutInstructionsResponse, TGetPoolStateRequest, TGetPoolStateResponse, TGetPoolLinkRequest, TGetPoolLinkResponse, get_reward_targets, get_signage_point, get_signage_points, set_reward_targets, get_harvesters, get_harvesters_summary, get_harvester_plots_valid, get_harvester_plots_invalid, get_harvester_plots_keys_missing, get_harvester_plots_duplicates, get_pool_login_link, set_pool_payout_instructions, get_pool_state, } from "./farmer/index";
|
|
3
|
-
import type { TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightResponse, TGetBlockRecordResponse, TGetBlockRecordsResponse, TGetBlockResponse, TGetBlockchainStateResponse, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordByNameResponse, TGetCoinRecordsByNamesResponse, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdResponse, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersResponse, TPushTxResponse } from "./full_node/index";
|
|
4
|
-
export { chia_full_node_service, TGetAdditionsAndRemovalsRequest, TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsRequest, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsRequest, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightRequest, TGetBlockRecordByHeightResponse, TGetBlockRecordRequest, TGetBlockRecordResponse, TGetBlockRecordsRequest, TGetBlockRecordsResponse, TGetBlockRequest, TGetBlockResponse, TGetBlockchainStateRequest, TGetBlockchainStateResponse, TGetBlocksRequest, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandRequest, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordsByNamesRequest, TGetCoinRecordsByNamesResponse, TGetCoinRecordByNameRequest, TGetCoinRecordByNameResponse, TGetCoinRecordsByPuzzleHashRequest, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesRequest, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsRequest, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintRequest, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodRequestOfFullNode, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdRequest, TGetMempoolItemByTxIdResponse, TGetNetworkInfoRequestOfFullNode, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceRequest, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersRequest, TGetUnfinishedBlockHeadersResponse, TPushTxRequest, TPushTxResponse, get_additions_and_removals, get_all_mempool_items, get_all_mempool_tx_ids, get_block, get_block_record, get_block_record_by_height, get_block_records, get_blockchain_state, get_blocks, get_block_count_metrics, get_recent_signage_point_or_eos, get_coin_record_by_name, get_coin_records_by_names, get_coin_records_by_puzzle_hash, get_coin_records_by_puzzle_hashes, get_coin_records_by_parent_ids, get_coin_records_by_hint, get_initial_freeze_period_of_full_node, get_mempool_item_by_tx_id, get_network_info_of_full_node, get_network_space, get_unfinished_block_headers, push_tx, } from "./full_node/index";
|
|
3
|
+
import type { TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightResponse, TGetBlockRecordResponse, TGetBlockRecordsResponse, TGetBlockSpendsResponse, TGetBlockResponse, TGetBlockchainStateResponse, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordByNameResponse, TGetCoinRecordsByNamesResponse, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdResponse, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersResponse, TPushTxResponse, TGetPuzzleAndSolutionResponse } from "./full_node/index";
|
|
4
|
+
export { chia_full_node_service, TGetAdditionsAndRemovalsRequest, TGetAdditionsAndRemovalsResponse, TGetAllMempoolItemsRequest, TGetAllMempoolItemsResponse, TGetAllMempoolTxIdsRequest, TGetAllMempoolTxIdsResponse, TGetBlockRecordByHeightRequest, TGetBlockRecordByHeightResponse, TGetBlockRecordRequest, TGetBlockRecordResponse, TGetBlockRecordsRequest, TGetBlockRecordsResponse, TGetBlockSpendsRequest, TGetBlockSpendsResponse, TGetBlockRequest, TGetBlockResponse, TGetBlockchainStateRequest, TGetBlockchainStateResponse, TGetBlocksRequest, TGetBlocksResponse, TGetBlockCountMetricsResponse, TGetRecentSignagePointOrEOSCommandRequest, TGetRecentSignagePointOrEOSCommandResponse, TGetCoinRecordsByNamesRequest, TGetCoinRecordsByNamesResponse, TGetCoinRecordByNameRequest, TGetCoinRecordByNameResponse, TGetCoinRecordsByPuzzleHashRequest, TGetCoinRecordsByPuzzleHashResponse, TGetCoinRecordsByPuzzleHashesRequest, TGetCoinRecordsByPuzzleHashesResponse, TGetCoinRecordsByParentIdsRequest, TGetCoinRecordsByParentIdsResponse, TGetCoinRecordsByHintRequest, TGetCoinRecordsByHintResponse, TGetInitialFreezePeriodRequestOfFullNode, TGetInitialFreezePeriodResponseOfFullNode, TGetMempoolItemByTxIdRequest, TGetMempoolItemByTxIdResponse, TGetNetworkInfoRequestOfFullNode, TGetNetworkInfoResponseOfFullNode, TGetNetworkSpaceRequest, TGetNetworkSpaceResponse, TGetUnfinishedBlockHeadersRequest, TGetUnfinishedBlockHeadersResponse, TPushTxRequest, TPushTxResponse, TGetPuzzleAndSolutionRequest, TGetPuzzleAndSolutionResponse, get_additions_and_removals, get_all_mempool_items, get_all_mempool_tx_ids, get_block, get_block_record, get_block_record_by_height, get_block_records, get_block_spends, get_blockchain_state, get_blocks, get_block_count_metrics, get_recent_signage_point_or_eos, get_coin_record_by_name, get_coin_records_by_names, get_coin_records_by_puzzle_hash, get_coin_records_by_puzzle_hashes, get_coin_records_by_parent_ids, get_coin_records_by_hint, get_initial_freeze_period_of_full_node, get_mempool_item_by_tx_id, get_network_info_of_full_node, get_network_space, get_unfinished_block_headers, push_tx, get_puzzle_and_solution, } from "./full_node/index";
|
|
5
5
|
import type { TAddPlotDirectoryResponse, TDeletePlotResponse, TGetPlotDirectoriesResponse, TGetPlotsResponse, TRefreshPlotsResponse, TRemovePlotDirectoryResponse } from "./harvester/index";
|
|
6
6
|
export { chia_harvester_service, TAddPlotDirectoryRequest, TAddPlotDirectoryResponse, TDeletePlotRequest, TDeletePlotResponse, TGetPlotDirectoriesRequest, TGetPlotDirectoriesResponse, TGetPlotsRequest, TGetPlotsResponse, TRefreshPlotsRequest, TRefreshPlotsResponse, TRemovePlotDirectoryRequest, TRemovePlotDirectoryResponse, add_plot_directory, delete_plot, get_plot_directories, get_plots, refresh_plots, remove_plot_directory, } from "./harvester/index";
|
|
7
|
-
import type { TAddKeyResponse, TAddRateLimitedFundsResponse, TCancelOfferResponse, TCatGetAssetIdResponse, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameResponse, TCatSetNameResponse, TCatSpendResponse, TCheckOfferValidityResponse, TCreateNewWalletResponse, TCreateOfferForIdsResponse, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsResponse, TGetCurrentDerivationIndexResponse, TExtendDerivationIndexResponse, TDeleteAllKeysResponse, TDeleteKeyResponse, TDidSetWalletNameResponse, TDidGetWalletNameResponse, TDidCreateAttestResponse, TDidCreateBackupFileResponse, TDidTransferDidResponse, TDidGetDidResponse, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyResponse, TDidGetRecoveryListResponse, TDidGetCurrentCoinInfoResponse, TDidGetMetadataResponse, TDidRecoverySpendResponse, TDidSpendResponse, TDidUpdateRecoveryIdsResponse, TDidUpdateMetadataResponse, TNftMintNftResponse, TNftGetNftsResponse, TNftSetNftDidResponse, TNftGetByDidResponse, TNftGetWalletDidResponse, TNftGetWalletsWithDidsResponse, TNftSetNftStatusResponse, TNftTransferNftResponse, TNftGetInfoResponse, TNftAddUriResponse, TFarmBlockResponse, TGenerateMnemonicResponse, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountResponse, TGetHeightInfoResponse, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetNetworkInfoResponseOfWallet, TGetNextAddressResponse, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryResponse, TGetPrivateKeyResponse, TGetPublicKeysResponse, TGetSyncStatusResponse, TGetTransactionCountResponse, TGetTransactionResponse, TGetTransactionsResponse, TGetWalletBalanceResponse, TGetWalletsResponse, TLoginResponse, TPushTxResponse as TPushTxResponseOfWallet, TPwAbsorbRewardsResponse, TPwStatusResponse, TRlSetUserInfoResponse, TSendClawbackTransactionResponse, TSendTransactionResponse, TSendTransactionMultiResponse, TTakeOfferResponse, TPwJoinPoolResponse, TPwSelfPoolResponse } from "./wallet/index";
|
|
8
|
-
export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, TAdditions, TCancelOfferRequest, TCancelOfferResponse, TCatGetAssetIdRequest, TCatGetAssetIdResponse, TCatGetNameRequest, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, TCatSetNameRequest, TCatSetNameResponse, TCatSpendRequest, TCatSpendResponse, TCheckOfferValidityRequest, TCheckOfferValidityResponse, TCreateNewWalletRequest, TCreateNewWalletResponse, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsRequest, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsRequest, TSelectCoinsResponse, TGetCurrentDerivationIndexResponse, TExtendDerivationIndexRequest, TExtendDerivationIndexResponse, TCreate_New_CAT_WalletRequest, TCreate_New_CAT_WalletResponse, TCreate_New_DID_WalletRequest, TCreate_New_DID_WalletResponse, TCreate_New_RL_WalletRequest, TCreate_New_RL_WalletResponse, TDeleteAllKeysRequest, TDeleteAllKeysResponse, TDeleteKeyRequest, TDeleteKeyResponse, TDidSetWalletNameRequest, TDidSetWalletNameResponse, TDidGetWalletNameRequest, TDidGetWalletNameResponse, TDidCreateAttestRequest, TDidCreateAttestResponse, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, TDidTransferDidRequest, TDidTransferDidResponse, TDidGetDidRequest, TDidGetDidResponse, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, TDidGetPubkeyRequest, TDidGetPubkeyResponse, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, TDidGetMetadataRequest, TDidGetMetadataResponse, TDidRecoverySpendRequest, TDidRecoverySpendResponse, TDidSpendRequest, TDidSpendResponse, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, TDidUpdateMetadataRequest, TDidUpdateMetadataResponse, TNftMintNftRequest, TNftMintNftResponse, TNftGetNftsRequest, TNftGetNftsResponse, TNftSetNftDidRequest, TNftSetNftDidResponse, TNftGetByDidRequest, TNftGetByDidResponse, TNftGetWalletDidRequest, TNftGetWalletDidResponse, TNftGetWalletsWithDidsResponse, TNftSetNftStatusRequest, TNftSetNftStatusResponse, TNftTransferNftRequest, TNftTransferNftResponse, TNftGetInfoRequest, TNftGetInfoResponse, TNftAddUriRequest, TNftAddUriResponse, TFarmBlockRequest, TFarmBlockResponse, TGenerateMnemonicRequest, TGenerateMnemonicResponse, TGetAllOffersRequest, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountRequest, TGetFarmedAmountResponse, TGetHeightInfoRequest, TGetHeightInfoResponse, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetOfferRequest, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryRequest, TGetOfferSummaryResponse, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, TGetNextAddressRequest, TGetNextAddressResponse, TGetPrivateKeyRequest, TGetPrivateKeyResponse, TGetPublicKeysRequest, TGetPublicKeysResponse, TGetSyncStatusRequest, TGetSyncStatusResponse, TGetTransactionCountRequest, TGetTransactionCountResponse, TGetTransactionRequest, TGetTransactionResponse, TGetTransactionsRequest, TGetTransactionsResponse, TGetWalletBalanceRequest, TGetWalletBalanceResponse, TGetWalletsRequest, TGetWalletsResponse, TLoginRequest, TLoginResponse, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, TPwJoinPoolRequest, TPwJoinPoolResponse, TPwSelfPoolRequest, TPwSelfPoolResponse, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, TPwStatusRequest, TPwStatusResponse, TRlSetUserInfoRequest, TRlSetUserInfoResponse, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, TSendTransactionRequest, TSendTransactionResponse, TSendTransactionMultiRequest, TSendTransactionMultiResponse, TTakeOfferRequest, TTakeOfferResponse, add_key, add_rate_limited_funds, cancel_offer, cat_get_asset_id, cat_get_name, get_stray_cats, cat_asset_id_to_name, cat_set_name, cat_spend, check_offer_validity, create_new_wallet, create_offer_for_ids, create_signed_transaction, delete_unconfirmed_transactions, select_coins, get_current_derivation_index, extend_derivation_index, delete_all_keys, delete_key, did_set_wallet_name, did_get_wallet_name, did_create_attest, did_create_backup_file, did_transfer_did, did_get_did, did_get_information_needed_for_recovery, did_get_current_coin_info, did_get_pubkey, did_get_recovery_list, did_get_metadata, did_recovery_spend, did_spend, did_update_recovery_ids, did_update_metadata, nft_mint_nft, nft_get_nfts, nft_set_nft_did, nft_get_by_did, nft_get_wallet_did, nft_get_wallets_with_dids, nft_set_nft_status, nft_transfer_nft, nft_get_info, nft_add_uri, farm_block, generate_mnemonic, get_all_offers, get_cat_list, get_farmed_amount, get_height_info, get_initial_freeze_period_of_wallet, get_logged_in_fingerprint, get_offer, get_offers_count, get_offer_summary, get_network_info_of_wallet, get_next_address, get_private_key, get_public_keys, get_sync_status, get_transaction, get_transaction_count, get_transactions, get_wallet_balance, get_wallets, log_in, push_tx as push_tx_wallet, pw_join_pool, pw_self_pool, pw_absorb_rewards, pw_status, rl_set_user_info, send_clawback_transaction, send_transaction, send_transaction_multi, take_offer, } from "./wallet/index";
|
|
7
|
+
import type { TAddKeyResponse, TAddRateLimitedFundsResponse, TCancelOfferResponse, TCancelOffersResponse, TCatGetAssetIdResponse, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameResponse, TCatSetNameResponse, TCatSpendResponse, TCheckOfferValidityResponse, TCreateNewWalletResponse, TCreateOfferForIdsResponse, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsResponse, TGetCurrentDerivationIndexResponse, TExtendDerivationIndexResponse, TDeleteAllKeysResponse, TDeleteKeyResponse, TDidSetWalletNameResponse, TDidGetWalletNameResponse, TDidCreateAttestResponse, TDidCreateBackupFileResponse, TDidTransferDidResponse, TDidGetDidResponse, TDidGetInformationNeededForRecoveryResponse, TDidGetPubkeyResponse, TDidGetRecoveryListResponse, TDidGetCurrentCoinInfoResponse, TDidGetMetadataResponse, TDidRecoverySpendResponse, TDidSpendResponse, TDidUpdateRecoveryIdsResponse, TDidUpdateMetadataResponse, TNftMintNftResponse, TNftGetNftsResponse, TNftSetNftDidResponse, TNftGetByDidResponse, TNftGetWalletDidResponse, TNftGetWalletsWithDidsResponse, TNftSetNftStatusResponse, TNftTransferNftResponse, TNftGetInfoResponse, TNftAddUriResponse, TFarmBlockResponse, TGenerateMnemonicResponse, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountResponse, TGetHeightInfoResponse, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetNetworkInfoResponseOfWallet, TGetNextAddressResponse, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryResponse, TGetPrivateKeyResponse, TGetPublicKeysResponse, TGetSyncStatusResponse, TGetTransactionCountResponse, TGetTransactionResponse, TGetTransactionsResponse, TGetWalletBalanceResponse, TGetWalletsResponse, TLoginResponse, TPushTxResponse as TPushTxResponseOfWallet, TPwAbsorbRewardsResponse, TPwStatusResponse, TRlSetUserInfoResponse, TSendClawbackTransactionResponse, TSendTransactionResponse, TSendTransactionMultiResponse, TTakeOfferResponse, TPwJoinPoolResponse, TPwSelfPoolResponse } from "./wallet/index";
|
|
8
|
+
export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, TAdditions, TCancelOfferRequest, TCancelOfferResponse, TCancelOffersRequest, TCancelOffersResponse, TCatGetAssetIdRequest, TCatGetAssetIdResponse, TCatGetNameRequest, TCatGetNameResponse, TGetStrayCatsResponse, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, TCatSetNameRequest, TCatSetNameResponse, TCatSpendRequest, TCatSpendResponse, TCheckOfferValidityRequest, TCheckOfferValidityResponse, TCreateNewWalletRequest, TCreateNewWalletResponse, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, TDeleteUnconfirmedTransactionsRequest, TDeleteUnconfirmedTransactionsResponse, TSelectCoinsRequest, TSelectCoinsResponse, TGetCurrentDerivationIndexResponse, TExtendDerivationIndexRequest, TExtendDerivationIndexResponse, TCreate_New_CAT_WalletRequest, TCreate_New_CAT_WalletResponse, TCreate_New_DID_WalletRequest, TCreate_New_DID_WalletResponse, TCreate_New_RL_WalletRequest, TCreate_New_RL_WalletResponse, TDeleteAllKeysRequest, TDeleteAllKeysResponse, TDeleteKeyRequest, TDeleteKeyResponse, TDidSetWalletNameRequest, TDidSetWalletNameResponse, TDidGetWalletNameRequest, TDidGetWalletNameResponse, TDidCreateAttestRequest, TDidCreateAttestResponse, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, TDidTransferDidRequest, TDidTransferDidResponse, TDidGetDidRequest, TDidGetDidResponse, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, TDidGetPubkeyRequest, TDidGetPubkeyResponse, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, TDidGetMetadataRequest, TDidGetMetadataResponse, TDidRecoverySpendRequest, TDidRecoverySpendResponse, TDidSpendRequest, TDidSpendResponse, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, TDidUpdateMetadataRequest, TDidUpdateMetadataResponse, TNftMintNftRequest, TNftMintNftResponse, TNftGetNftsRequest, TNftGetNftsResponse, TNftSetNftDidRequest, TNftSetNftDidResponse, TNftGetByDidRequest, TNftGetByDidResponse, TNftGetWalletDidRequest, TNftGetWalletDidResponse, TNftGetWalletsWithDidsResponse, TNftSetNftStatusRequest, TNftSetNftStatusResponse, TNftTransferNftRequest, TNftTransferNftResponse, TNftGetInfoRequest, TNftGetInfoResponse, TNftAddUriRequest, TNftAddUriResponse, TFarmBlockRequest, TFarmBlockResponse, TGenerateMnemonicRequest, TGenerateMnemonicResponse, TGetAllOffersRequest, TGetAllOffersResponse, TGetCatListResponse, TGetFarmedAmountRequest, TGetFarmedAmountResponse, TGetHeightInfoRequest, TGetHeightInfoResponse, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, TGetLoggedInFingerprintResponse, TGetOfferRequest, TGetOfferResponse, TGetOffersCountResponse, TGetOfferSummaryRequest, TGetOfferSummaryResponse, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, TGetNextAddressRequest, TGetNextAddressResponse, TGetPrivateKeyRequest, TGetPrivateKeyResponse, TGetPublicKeysRequest, TGetPublicKeysResponse, TGetSyncStatusRequest, TGetSyncStatusResponse, TGetTransactionCountRequest, TGetTransactionCountResponse, TGetTransactionRequest, TGetTransactionResponse, TGetTransactionsRequest, TGetTransactionsResponse, TGetWalletBalanceRequest, TGetWalletBalanceResponse, TGetWalletsRequest, TGetWalletsResponse, TLoginRequest, TLoginResponse, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, TPwJoinPoolRequest, TPwJoinPoolResponse, TPwSelfPoolRequest, TPwSelfPoolResponse, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, TPwStatusRequest, TPwStatusResponse, TRlSetUserInfoRequest, TRlSetUserInfoResponse, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, TSendTransactionRequest, TSendTransactionResponse, TSendTransactionMultiRequest, TSendTransactionMultiResponse, TTakeOfferRequest, TTakeOfferResponse, add_key, add_rate_limited_funds, cancel_offer, cancel_offers, cat_get_asset_id, cat_get_name, get_stray_cats, cat_asset_id_to_name, cat_set_name, cat_spend, check_offer_validity, create_new_wallet, create_offer_for_ids, create_signed_transaction, delete_unconfirmed_transactions, select_coins, get_current_derivation_index, extend_derivation_index, delete_all_keys, delete_key, did_set_wallet_name, did_get_wallet_name, did_create_attest, did_create_backup_file, did_transfer_did, did_get_did, did_get_information_needed_for_recovery, did_get_current_coin_info, did_get_pubkey, did_get_recovery_list, did_get_metadata, did_recovery_spend, did_spend, did_update_recovery_ids, did_update_metadata, nft_mint_nft, nft_get_nfts, nft_set_nft_did, nft_get_by_did, nft_get_wallet_did, nft_get_wallets_with_dids, nft_set_nft_status, nft_transfer_nft, nft_get_info, nft_add_uri, farm_block, generate_mnemonic, get_all_offers, get_cat_list, get_farmed_amount, get_height_info, get_initial_freeze_period_of_wallet, get_logged_in_fingerprint, get_offer, get_offers_count, get_offer_summary, get_network_info_of_wallet, get_next_address, get_private_key, get_public_keys, get_sync_status, get_transaction, get_transaction_count, get_transactions, get_wallet_balance, get_wallets, log_in, push_tx as push_tx_wallet, pw_join_pool, pw_self_pool, pw_absorb_rewards, pw_status, rl_set_user_info, send_clawback_transaction, send_transaction, send_transaction_multi, take_offer, } from "./wallet/index";
|
|
9
9
|
import type { TGetIpsAfterTimestampResponse, TGetPeerCountsResponse } from "./crawler/index";
|
|
10
10
|
export { chia_crawler_service, TGetIpsAfterTimestampRequest, TGetIpsAfterTimestampResponse, TGetPeerCountsResponse, get_ips_after_timestamp, get_peer_counts, } from "./crawler/index";
|
|
11
|
-
import type { TGetConnectionsResponse, TOpenConnectionResponse, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse } from "./common/index";
|
|
12
|
-
export { chia_common_service, TGetConnectionsRequest, TGetConnectionsResponse, TOpenConnectionRequest, TOpenConnectionResponse, TCloseConnectionRequest, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse, get_connections, open_connection, close_connection, stop_node, get_routes, } from "./common/index";
|
|
11
|
+
import type { TGetConnectionsResponse, TOpenConnectionResponse, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse, THealthzResponse } from "./common/index";
|
|
12
|
+
export { chia_common_service, TGetConnectionsRequest, TGetConnectionsResponse, TOpenConnectionRequest, TOpenConnectionResponse, TCloseConnectionRequest, TCloseConnectionResponse, TStopNodeResponse, TGetRoutesResponse, THealthzResponse, get_connections, open_connection, close_connection, stop_node, get_routes, healthz, } from "./common/index";
|
|
13
13
|
export declare type RpcFarmerMessage = TGetRewardTargetResponse | TGetSignagePointResponse | TGetSignagePointsResponse | TSetRewardTargetResponse | TGetHarvestersResponse | TGetHarvestersSummaryResponse | TGetHarvesterPlotsValidResponse | TGetHarvesterPlotsInvalidResponse | TGetHarvesterPlotsKeysMissingResponse | TGetHarvesterPlotsDuplicatesResponse | TSetPayoutInstructionsResponse | TGetPoolStateResponse | TGetPoolLinkResponse;
|
|
14
|
-
export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse;
|
|
14
|
+
export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse;
|
|
15
15
|
export declare type RpcHarvesterMessage = TAddPlotDirectoryResponse | TDeletePlotResponse | TGetPlotDirectoriesResponse | TGetPlotsResponse | TRefreshPlotsResponse | TRemovePlotDirectoryResponse;
|
|
16
|
-
export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TGetStrayCatsResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteUnconfirmedTransactionsResponse | TSelectCoinsResponse | TGetCurrentDerivationIndexResponse | TExtendDerivationIndexResponse | TDeleteAllKeysResponse | TDeleteKeyResponse | TDidSetWalletNameResponse | TDidGetWalletNameResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidTransferDidResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetCurrentCoinInfoResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidGetMetadataResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TDidUpdateMetadataResponse | TNftMintNftResponse | TNftGetNftsResponse | TNftSetNftDidResponse | TNftGetByDidResponse | TNftGetWalletDidResponse | TNftGetWalletsWithDidsResponse | TNftSetNftStatusResponse | TNftTransferNftResponse | TNftGetInfoResponse | TNftAddUriResponse | TFarmBlockResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TTakeOfferResponse;
|
|
16
|
+
export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCancelOffersResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TGetStrayCatsResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteUnconfirmedTransactionsResponse | TSelectCoinsResponse | TGetCurrentDerivationIndexResponse | TExtendDerivationIndexResponse | TDeleteAllKeysResponse | TDeleteKeyResponse | TDidSetWalletNameResponse | TDidGetWalletNameResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidTransferDidResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetCurrentCoinInfoResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidGetMetadataResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TDidUpdateMetadataResponse | TNftMintNftResponse | TNftGetNftsResponse | TNftSetNftDidResponse | TNftGetByDidResponse | TNftGetWalletDidResponse | TNftGetWalletsWithDidsResponse | TNftSetNftStatusResponse | TNftTransferNftResponse | TNftGetInfoResponse | TNftAddUriResponse | TFarmBlockResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TTakeOfferResponse;
|
|
17
17
|
export declare type RpcCrawlerMessage = TGetIpsAfterTimestampResponse | TGetPeerCountsResponse;
|
|
18
|
-
export declare type RpcCommonMessage = TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse;
|
|
18
|
+
export declare type RpcCommonMessage = TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse | THealthzResponse;
|
|
19
19
|
export declare type RpcMessage = RpcFarmerMessage | RpcFullNodeMessage | RpcHarvesterMessage | RpcWalletMessage | RpcCrawlerMessage | RpcCommonMessage;
|
package/api/rpc/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.get_routes = exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.chia_common_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.take_offer = exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_offer_summary = void 0;
|
|
3
|
+
exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.remove_plot_directory = exports.refresh_plots = exports.get_plots = exports.get_plot_directories = exports.delete_plot = exports.add_plot_directory = exports.chia_harvester_service = exports.get_puzzle_and_solution = exports.push_tx = exports.get_unfinished_block_headers = exports.get_network_space = exports.get_network_info_of_full_node = exports.get_mempool_item_by_tx_id = exports.get_initial_freeze_period_of_full_node = exports.get_coin_records_by_hint = exports.get_coin_records_by_parent_ids = exports.get_coin_records_by_puzzle_hashes = exports.get_coin_records_by_puzzle_hash = exports.get_coin_records_by_names = exports.get_coin_record_by_name = exports.get_recent_signage_point_or_eos = exports.get_block_count_metrics = exports.get_blocks = exports.get_blockchain_state = exports.get_block_spends = exports.get_block_records = exports.get_block_record_by_height = exports.get_block_record = exports.get_block = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_state = exports.set_pool_payout_instructions = exports.get_pool_login_link = exports.get_harvester_plots_duplicates = exports.get_harvester_plots_keys_missing = exports.get_harvester_plots_invalid = exports.get_harvester_plots_valid = exports.get_harvesters_summary = exports.get_harvesters = exports.set_reward_targets = exports.get_signage_points = exports.get_signage_point = exports.get_reward_targets = exports.chia_farmer_service = void 0;
|
|
4
|
+
exports.get_initial_freeze_period_of_wallet = exports.get_height_info = exports.get_farmed_amount = exports.get_cat_list = exports.get_all_offers = exports.generate_mnemonic = exports.farm_block = exports.nft_add_uri = exports.nft_get_info = exports.nft_transfer_nft = exports.nft_set_nft_status = exports.nft_get_wallets_with_dids = exports.nft_get_wallet_did = exports.nft_get_by_did = exports.nft_set_nft_did = exports.nft_get_nfts = exports.nft_mint_nft = exports.did_update_metadata = exports.did_update_recovery_ids = exports.did_spend = exports.did_recovery_spend = exports.did_get_metadata = exports.did_get_recovery_list = exports.did_get_pubkey = exports.did_get_current_coin_info = exports.did_get_information_needed_for_recovery = exports.did_get_did = exports.did_transfer_did = exports.did_create_backup_file = exports.did_create_attest = exports.did_get_wallet_name = exports.did_set_wallet_name = exports.delete_key = exports.delete_all_keys = exports.extend_derivation_index = exports.get_current_derivation_index = exports.select_coins = exports.delete_unconfirmed_transactions = exports.create_signed_transaction = exports.create_offer_for_ids = exports.create_new_wallet = exports.check_offer_validity = exports.cat_spend = exports.cat_set_name = exports.cat_asset_id_to_name = exports.get_stray_cats = exports.cat_get_name = exports.cat_get_asset_id = exports.cancel_offers = exports.cancel_offer = void 0;
|
|
5
|
+
exports.healthz = exports.get_routes = exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.chia_common_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.take_offer = exports.send_transaction_multi = exports.send_transaction = exports.send_clawback_transaction = exports.rl_set_user_info = exports.pw_status = exports.pw_absorb_rewards = exports.pw_self_pool = exports.pw_join_pool = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction_count = exports.get_transaction = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = exports.get_next_address = exports.get_network_info_of_wallet = exports.get_offer_summary = exports.get_offers_count = exports.get_offer = exports.get_logged_in_fingerprint = void 0;
|
|
6
6
|
var index_1 = require("./farmer/index");
|
|
7
7
|
Object.defineProperty(exports, "chia_farmer_service", { enumerable: true, get: function () { return index_1.chia_farmer_service; } });
|
|
8
8
|
Object.defineProperty(exports, "get_reward_targets", { enumerable: true, get: function () { return index_1.get_reward_targets; } });
|
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "get_block", { enumerable: true, get: function ()
|
|
|
27
27
|
Object.defineProperty(exports, "get_block_record", { enumerable: true, get: function () { return index_2.get_block_record; } });
|
|
28
28
|
Object.defineProperty(exports, "get_block_record_by_height", { enumerable: true, get: function () { return index_2.get_block_record_by_height; } });
|
|
29
29
|
Object.defineProperty(exports, "get_block_records", { enumerable: true, get: function () { return index_2.get_block_records; } });
|
|
30
|
+
Object.defineProperty(exports, "get_block_spends", { enumerable: true, get: function () { return index_2.get_block_spends; } });
|
|
30
31
|
Object.defineProperty(exports, "get_blockchain_state", { enumerable: true, get: function () { return index_2.get_blockchain_state; } });
|
|
31
32
|
Object.defineProperty(exports, "get_blocks", { enumerable: true, get: function () { return index_2.get_blocks; } });
|
|
32
33
|
Object.defineProperty(exports, "get_block_count_metrics", { enumerable: true, get: function () { return index_2.get_block_count_metrics; } });
|
|
@@ -43,6 +44,7 @@ Object.defineProperty(exports, "get_network_info_of_full_node", { enumerable: tr
|
|
|
43
44
|
Object.defineProperty(exports, "get_network_space", { enumerable: true, get: function () { return index_2.get_network_space; } });
|
|
44
45
|
Object.defineProperty(exports, "get_unfinished_block_headers", { enumerable: true, get: function () { return index_2.get_unfinished_block_headers; } });
|
|
45
46
|
Object.defineProperty(exports, "push_tx", { enumerable: true, get: function () { return index_2.push_tx; } });
|
|
47
|
+
Object.defineProperty(exports, "get_puzzle_and_solution", { enumerable: true, get: function () { return index_2.get_puzzle_and_solution; } });
|
|
46
48
|
var index_3 = require("./harvester/index");
|
|
47
49
|
Object.defineProperty(exports, "chia_harvester_service", { enumerable: true, get: function () { return index_3.chia_harvester_service; } });
|
|
48
50
|
Object.defineProperty(exports, "add_plot_directory", { enumerable: true, get: function () { return index_3.add_plot_directory; } });
|
|
@@ -56,6 +58,7 @@ Object.defineProperty(exports, "chia_wallet_service", { enumerable: true, get: f
|
|
|
56
58
|
Object.defineProperty(exports, "add_key", { enumerable: true, get: function () { return index_4.add_key; } });
|
|
57
59
|
Object.defineProperty(exports, "add_rate_limited_funds", { enumerable: true, get: function () { return index_4.add_rate_limited_funds; } });
|
|
58
60
|
Object.defineProperty(exports, "cancel_offer", { enumerable: true, get: function () { return index_4.cancel_offer; } });
|
|
61
|
+
Object.defineProperty(exports, "cancel_offers", { enumerable: true, get: function () { return index_4.cancel_offers; } });
|
|
59
62
|
Object.defineProperty(exports, "cat_get_asset_id", { enumerable: true, get: function () { return index_4.cat_get_asset_id; } });
|
|
60
63
|
Object.defineProperty(exports, "cat_get_name", { enumerable: true, get: function () { return index_4.cat_get_name; } });
|
|
61
64
|
Object.defineProperty(exports, "get_stray_cats", { enumerable: true, get: function () { return index_4.get_stray_cats; } });
|
|
@@ -140,3 +143,4 @@ Object.defineProperty(exports, "open_connection", { enumerable: true, get: funct
|
|
|
140
143
|
Object.defineProperty(exports, "close_connection", { enumerable: true, get: function () { return index_6.close_connection; } });
|
|
141
144
|
Object.defineProperty(exports, "stop_node", { enumerable: true, get: function () { return index_6.stop_node; } });
|
|
142
145
|
Object.defineProperty(exports, "get_routes", { enumerable: true, get: function () { return index_6.get_routes; } });
|
|
146
|
+
Object.defineProperty(exports, "healthz", { enumerable: true, get: function () { return index_6.healthz; } });
|
|
@@ -161,6 +161,7 @@ export declare type TGetWalletsRequest = {
|
|
|
161
161
|
};
|
|
162
162
|
export declare type TGetWalletsResponse = {
|
|
163
163
|
wallets: WalletInfo[];
|
|
164
|
+
fingerprint?: int;
|
|
164
165
|
};
|
|
165
166
|
export declare function get_wallets(agent: TRPCAgent, data: TGetWalletsRequest): Promise<TGetWalletsResponse>;
|
|
166
167
|
export declare type TCreate_New_CAT_WalletRequest = {
|
|
@@ -271,10 +272,14 @@ export declare type TCreate_New_Pool_WalletResponse = {
|
|
|
271
272
|
launcher_id: str;
|
|
272
273
|
p2_singleton_puzzle_hash: str;
|
|
273
274
|
};
|
|
275
|
+
export declare type TCreateWalletErrorResponse = {
|
|
276
|
+
success: False;
|
|
277
|
+
error: str;
|
|
278
|
+
};
|
|
274
279
|
export declare const create_new_wallet_command = "create_new_wallet";
|
|
275
280
|
export declare type create_new_wallet_command = typeof create_new_wallet_command;
|
|
276
281
|
export declare type TCreateNewWalletRequest = TCreate_New_CAT_WalletRequest | TCreate_New_RL_WalletRequest | TCreate_New_DID_WalletRequest | TCreate_New_NFT_WalletRequest | TCreate_New_Pool_WalletRequest;
|
|
277
|
-
export declare type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_RL_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse;
|
|
282
|
+
export declare type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_RL_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse | TCreateWalletErrorResponse;
|
|
278
283
|
export declare function create_new_wallet(agent: TRPCAgent, data: TCreateNewWalletRequest): Promise<TCreateNewWalletResponse>;
|
|
279
284
|
export declare const get_wallet_balance_command = "get_wallet_balance";
|
|
280
285
|
export declare type get_wallet_balance_command = typeof get_wallet_balance_command;
|
|
@@ -291,7 +296,9 @@ export declare type TGetWalletBalanceResponse = {
|
|
|
291
296
|
max_send_amount: uint64;
|
|
292
297
|
unspent_coin_count: int;
|
|
293
298
|
pending_coin_removal_count: int;
|
|
299
|
+
wallet_type: int;
|
|
294
300
|
fingerprint?: int;
|
|
301
|
+
asset_id?: str;
|
|
295
302
|
};
|
|
296
303
|
};
|
|
297
304
|
export declare function get_wallet_balance(agent: TRPCAgent, data: TGetWalletBalanceRequest): Promise<TGetWalletBalanceResponse>;
|
|
@@ -334,12 +341,12 @@ export declare function get_next_address(agent: TRPCAgent, data: TGetNextAddress
|
|
|
334
341
|
export declare const send_transaction_command = "send_transaction";
|
|
335
342
|
export declare type send_transaction_command = typeof send_transaction_command;
|
|
336
343
|
export declare type TSendTransactionRequest = {
|
|
337
|
-
wallet_id:
|
|
344
|
+
wallet_id: uint32;
|
|
338
345
|
amount: int;
|
|
339
346
|
fee: int;
|
|
340
347
|
address: str;
|
|
341
348
|
memos?: str[];
|
|
342
|
-
min_coin_amount?:
|
|
349
|
+
min_coin_amount?: uint64;
|
|
343
350
|
};
|
|
344
351
|
export declare type TSendTransactionResponse = {
|
|
345
352
|
transaction: TransactionRecordConvenience;
|
|
@@ -402,8 +409,9 @@ export declare type create_signed_transaction_command = typeof create_signed_tra
|
|
|
402
409
|
export declare type TCreateSignedTransactionRequest = {
|
|
403
410
|
additions: TAdditions[];
|
|
404
411
|
fee?: uint64;
|
|
405
|
-
min_coin_amount?:
|
|
412
|
+
min_coin_amount?: uint64;
|
|
406
413
|
coins?: Coin[];
|
|
414
|
+
exclude_coins?: Coin[];
|
|
407
415
|
coin_announcements?: TCoinAnnouncement[];
|
|
408
416
|
puzzle_announcements?: TPuzzleAnnouncement[];
|
|
409
417
|
};
|
|
@@ -423,6 +431,8 @@ export declare type select_coins_command = typeof select_coins_command;
|
|
|
423
431
|
export declare type TSelectCoinsRequest = {
|
|
424
432
|
amount: uint64;
|
|
425
433
|
wallet_id: uint32;
|
|
434
|
+
min_coin_amount?: uint64;
|
|
435
|
+
excluded_coins?: Coin[];
|
|
426
436
|
};
|
|
427
437
|
export declare type TSelectCoinsResponse = {
|
|
428
438
|
coins: Coin[];
|
|
@@ -454,11 +464,11 @@ export declare function get_cat_list(agent: TRPCAgent): Promise<TGetCatListRespo
|
|
|
454
464
|
export declare const cat_set_name_command = "cat_set_name";
|
|
455
465
|
export declare type cat_set_name_command = typeof cat_set_name_command;
|
|
456
466
|
export declare type TCatSetNameRequest = {
|
|
457
|
-
wallet_id:
|
|
467
|
+
wallet_id: uint32;
|
|
458
468
|
name: str;
|
|
459
469
|
};
|
|
460
470
|
export declare type TCatSetNameResponse = {
|
|
461
|
-
wallet_id:
|
|
471
|
+
wallet_id: uint32;
|
|
462
472
|
};
|
|
463
473
|
export declare function cat_set_name(agent: TRPCAgent, data: TCatSetNameRequest): Promise<TCatSetNameResponse>;
|
|
464
474
|
export declare const cat_asset_id_to_name_command = "cat_asset_id_to_name";
|
|
@@ -474,10 +484,10 @@ export declare function cat_asset_id_to_name(agent: TRPCAgent, data: TCatAssetId
|
|
|
474
484
|
export declare const cat_get_name_command = "cat_get_name";
|
|
475
485
|
export declare type cat_get_name_command = typeof cat_get_name_command;
|
|
476
486
|
export declare type TCatGetNameRequest = {
|
|
477
|
-
wallet_id:
|
|
487
|
+
wallet_id: uint32;
|
|
478
488
|
};
|
|
479
489
|
export declare type TCatGetNameResponse = {
|
|
480
|
-
wallet_id:
|
|
490
|
+
wallet_id: uint32;
|
|
481
491
|
name: str;
|
|
482
492
|
};
|
|
483
493
|
export declare function cat_get_name(agent: TRPCAgent, data: TCatGetNameRequest): Promise<TCatGetNameResponse>;
|
|
@@ -495,12 +505,12 @@ export declare function get_stray_cats(agent: TRPCAgent): Promise<TGetStrayCatsR
|
|
|
495
505
|
export declare const cat_spend_command = "cat_spend";
|
|
496
506
|
export declare type cat_spend_command = typeof cat_spend_command;
|
|
497
507
|
export declare type TCatSpendRequest = {
|
|
498
|
-
wallet_id:
|
|
508
|
+
wallet_id: uint32;
|
|
499
509
|
inner_address: str;
|
|
500
510
|
memos?: str[];
|
|
501
511
|
amount: uint64;
|
|
502
512
|
fee: uint64;
|
|
503
|
-
min_coin_amount?:
|
|
513
|
+
min_coin_amount?: uint64;
|
|
504
514
|
};
|
|
505
515
|
export declare type TCatSpendResponse = {
|
|
506
516
|
transaction: TransactionRecordConvenience;
|
|
@@ -510,11 +520,11 @@ export declare function cat_spend(agent: TRPCAgent, data: TCatSpendRequest): Pro
|
|
|
510
520
|
export declare const cat_get_asset_id_command = "cat_get_asset_id";
|
|
511
521
|
export declare type cat_get_asset_id_command = typeof cat_get_asset_id_command;
|
|
512
522
|
export declare type TCatGetAssetIdRequest = {
|
|
513
|
-
wallet_id:
|
|
523
|
+
wallet_id: uint32;
|
|
514
524
|
};
|
|
515
525
|
export declare type TCatGetAssetIdResponse = {
|
|
516
526
|
asset_id: str;
|
|
517
|
-
wallet_id:
|
|
527
|
+
wallet_id: uint32;
|
|
518
528
|
};
|
|
519
529
|
export declare function cat_get_asset_id(agent: TRPCAgent, data: TCatGetAssetIdRequest): Promise<TCatGetAssetIdResponse>;
|
|
520
530
|
export declare const create_offer_for_ids_command = "create_offer_for_ids";
|
|
@@ -524,7 +534,7 @@ export declare type TCreateOfferForIdsRequest = {
|
|
|
524
534
|
fee?: uint64;
|
|
525
535
|
validate_only?: bool;
|
|
526
536
|
driver_dict?: TDriverDict;
|
|
527
|
-
min_coin_amount?:
|
|
537
|
+
min_coin_amount?: uint64;
|
|
528
538
|
};
|
|
529
539
|
export declare type TCreateOfferForIdsResponse = {
|
|
530
540
|
offer: str;
|
|
@@ -559,7 +569,7 @@ export declare type take_offer_command = typeof take_offer_command;
|
|
|
559
569
|
export declare type TTakeOfferRequest = {
|
|
560
570
|
offer: str;
|
|
561
571
|
fee?: uint64;
|
|
562
|
-
min_coin_amount?:
|
|
572
|
+
min_coin_amount?: uint64;
|
|
563
573
|
};
|
|
564
574
|
export declare type TTakeOfferResponse = {
|
|
565
575
|
trade_record: TradeRecordConvenience;
|
|
@@ -610,6 +620,19 @@ export declare type TCancelOfferRequest = {
|
|
|
610
620
|
};
|
|
611
621
|
export declare type TCancelOfferResponse = {};
|
|
612
622
|
export declare function cancel_offer(agent: TRPCAgent, data: TCancelOfferRequest): Promise<TCancelOfferResponse>;
|
|
623
|
+
export declare const cancel_offers_command = "cancel_offers";
|
|
624
|
+
export declare type cancel_offers_command = typeof cancel_offers_command;
|
|
625
|
+
export declare type TCancelOffersRequest = {
|
|
626
|
+
secure: bool;
|
|
627
|
+
batch_fee?: uint64;
|
|
628
|
+
batch_size?: int;
|
|
629
|
+
cancel_all?: bool;
|
|
630
|
+
asset_id?: str;
|
|
631
|
+
};
|
|
632
|
+
export declare type TCancelOffersResponse = {
|
|
633
|
+
success: True;
|
|
634
|
+
};
|
|
635
|
+
export declare function cancel_offers(agent: TRPCAgent, data: TCancelOffersRequest): Promise<TCancelOffersResponse>;
|
|
613
636
|
export declare const did_set_wallet_name_command = "did_set_wallet_name";
|
|
614
637
|
export declare type did_set_wallet_name_command = typeof did_set_wallet_name_command;
|
|
615
638
|
export declare type TDidSetWalletNameRequest = {
|
|
@@ -972,7 +995,7 @@ export declare function rl_set_user_info(agent: TRPCAgent, data: TRlSetUserInfoR
|
|
|
972
995
|
export declare const send_clawback_transaction_command = "send_clawback_transaction:";
|
|
973
996
|
export declare type send_clawback_transaction_command = typeof send_clawback_transaction_command;
|
|
974
997
|
export declare type TSendClawbackTransactionRequest = {
|
|
975
|
-
wallet_id:
|
|
998
|
+
wallet_id: uint32;
|
|
976
999
|
fee: int;
|
|
977
1000
|
};
|
|
978
1001
|
export declare type TSendClawbackTransactionResponse = {
|
|
@@ -1019,9 +1042,6 @@ export declare type TPwSelfPoolResponse = {
|
|
|
1019
1042
|
total_fee: uint64;
|
|
1020
1043
|
transaction: TransactionRecord;
|
|
1021
1044
|
fee_transaction: Optional<TransactionRecord>;
|
|
1022
|
-
} | {
|
|
1023
|
-
success: False;
|
|
1024
|
-
error: "not_initialized";
|
|
1025
1045
|
};
|
|
1026
1046
|
export declare function pw_self_pool(agent: TRPCAgent, data: TPwSelfPoolRequest): Promise<TPwSelfPoolResponse>;
|
|
1027
1047
|
export declare const pw_absorb_rewards_command = "pw_absorb_rewards";
|
|
@@ -1035,9 +1055,6 @@ export declare type TPwAbsorbRewardsResponse = {
|
|
|
1035
1055
|
state: PoolWalletInfo;
|
|
1036
1056
|
transaction: TransactionRecord;
|
|
1037
1057
|
fee_transaction: Optional<TransactionRecord>;
|
|
1038
|
-
} | {
|
|
1039
|
-
success: False;
|
|
1040
|
-
error: "not_initialized";
|
|
1041
1058
|
};
|
|
1042
1059
|
export declare function pw_absorb_rewards(agent: TRPCAgent, data: TPwAbsorbRewardsRequest): Promise<TPwAbsorbRewardsResponse>;
|
|
1043
1060
|
export declare const pw_status_command = "pw_status";
|
|
@@ -1048,8 +1065,5 @@ export declare type TPwStatusRequest = {
|
|
|
1048
1065
|
export declare type TPwStatusResponse = {
|
|
1049
1066
|
state: PoolWalletInfo;
|
|
1050
1067
|
unconfirmed_transactions: TransactionRecord[];
|
|
1051
|
-
} | {
|
|
1052
|
-
success: False;
|
|
1053
|
-
error: "not_initialized";
|
|
1054
1068
|
};
|
|
1055
1069
|
export declare function pw_status(agent: TRPCAgent, data: TPwStatusRequest): Promise<TPwStatusResponse>;
|
package/api/rpc/wallet/index.js
CHANGED
|
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.get_farmed_amount_command = exports.get_transaction_count = exports.get_transaction_count_command = exports.send_transaction_multi = exports.send_transaction_multi_command = exports.send_transaction = exports.send_transaction_command = exports.get_next_address = exports.get_next_address_command = exports.get_transactions = exports.get_transactions_command = exports.get_transaction = exports.get_transaction_command = exports.get_wallet_balance = exports.get_wallet_balance_command = exports.create_new_wallet = exports.create_new_wallet_command = exports.get_wallets = exports.get_wallets_command = exports.get_network_info_of_wallet = exports.get_network_info_command_of_wallet = exports.get_initial_freeze_period_of_wallet = exports.get_initial_freeze_period_command_of_wallet = exports.farm_block = exports.farm_block_command = exports.push_tx = exports.push_tx_command = exports.get_height_info = exports.get_height_info_command = exports.get_sync_status = exports.get_sync_status_command = exports.delete_all_keys = exports.delete_all_keys_command = exports.check_delete_key = exports.check_delete_key_command = exports.delete_key = exports.delete_key_command = exports.add_key = exports.add_key_command = exports.generate_mnemonic = exports.generate_mnemonic_command = exports.get_private_key = exports.get_private_key_command = exports.get_public_keys = exports.get_public_keys_command = exports.get_logged_in_fingerprint = exports.get_logged_in_fingerprint_command = exports.log_in = exports.log_in_command = exports.chia_wallet_service = void 0;
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = void 0;
|
|
13
|
+
exports.did_update_metadata_command = exports.did_update_recovery_ids = exports.did_update_recovery_ids_command = exports.did_get_wallet_name = exports.did_get_wallet_name_command = exports.did_set_wallet_name = exports.did_set_wallet_name_command = exports.cancel_offers = exports.cancel_offers_command = exports.cancel_offer = exports.cancel_offer_command = exports.get_offers_count = exports.get_offers_count_command = exports.get_all_offers = exports.get_all_offers_command = exports.get_offer = exports.get_offer_command = exports.take_offer = exports.take_offer_command = exports.check_offer_validity = exports.check_offer_validity_command = exports.get_offer_summary = exports.get_offer_summary_command = exports.create_offer_for_ids = exports.create_offer_for_ids_command = exports.cat_get_asset_id = exports.cat_get_asset_id_command = exports.cat_spend = exports.cat_spend_command = exports.get_stray_cats = exports.get_stray_cats_command = exports.cat_get_name = exports.cat_get_name_command = exports.cat_asset_id_to_name = exports.cat_asset_id_to_name_command = exports.cat_set_name = exports.cat_set_name_command = exports.get_cat_list = exports.get_cat_list_command = exports.extend_derivation_index = exports.extend_derivation_index_command = exports.get_current_derivation_index = exports.get_current_derivation_index_command = exports.select_coins = exports.select_coins_command = exports.delete_unconfirmed_transactions = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction = exports.create_signed_transaction_command = exports.get_farmed_amount = void 0;
|
|
14
|
+
exports.pw_join_pool_command = exports.add_rate_limited_funds = exports.add_rate_limited_funds_command = exports.send_clawback_transaction = exports.send_clawback_transaction_command = exports.rl_set_user_info = exports.rl_set_user_info_command = exports.nft_add_uri = exports.nft_add_uri_command = exports.nft_get_info = exports.nft_get_info_command = exports.nft_transfer_nft = exports.nft_transfer_nft_command = exports.nft_set_nft_status = exports.nft_set_nft_status_command = exports.nft_get_wallets_with_dids = exports.nft_get_wallets_with_dids_command = exports.nft_get_wallet_did = exports.nft_get_wallet_did_command = exports.nft_get_by_did = exports.nft_get_by_did_command = exports.nft_set_nft_did = exports.nft_set_nft_did_command = exports.nft_get_nfts = exports.nft_get_nfts_command = exports.nft_mint_nft = exports.nft_mint_nft_command = exports.did_transfer_did = exports.did_transfer_did_command = exports.did_create_backup_file = exports.did_create_backup_file_command = exports.did_get_current_coin_info = exports.did_get_current_coin_info_command = exports.did_get_information_needed_for_recovery = exports.did_get_information_needed_for_recovery_command = exports.did_create_attest = exports.did_create_attest_command = exports.did_get_metadata = exports.did_get_metadata_command = exports.did_get_recovery_list = exports.did_get_recovery_list_command = exports.did_recovery_spend = exports.did_recovery_spend_command = exports.did_get_did = exports.did_get_did_command = exports.did_get_pubkey = exports.did_get_pubkey_command = exports.did_spend = exports.did_spend_command = exports.did_update_metadata = void 0;
|
|
15
|
+
exports.pw_status = exports.pw_status_command = exports.pw_absorb_rewards = exports.pw_absorb_rewards_command = exports.pw_self_pool = exports.pw_self_pool_command = exports.pw_join_pool = void 0;
|
|
16
16
|
exports.chia_wallet_service = "chia_wallet";
|
|
17
17
|
// # Key management
|
|
18
18
|
exports.log_in_command = "log_in";
|
|
@@ -334,6 +334,13 @@ function cancel_offer(agent, data) {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
exports.cancel_offer = cancel_offer;
|
|
337
|
+
exports.cancel_offers_command = "cancel_offers";
|
|
338
|
+
function cancel_offers(agent, data) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.cancel_offers_command, data);
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
exports.cancel_offers = cancel_offers;
|
|
337
344
|
// # DID Wallet
|
|
338
345
|
exports.did_set_wallet_name_command = "did_set_wallet_name";
|
|
339
346
|
function did_set_wallet_name(agent, data) {
|
package/api/ws/wallet/index.d.ts
CHANGED
|
@@ -10,14 +10,10 @@ export declare type TGetConnectionsBroadCast = {
|
|
|
10
10
|
connections: TConnectionGeneral[];
|
|
11
11
|
};
|
|
12
12
|
export declare function on_get_connections(daemon: TDaemon, callback: (e: GetMessageType<chia_wallet_service, get_connections_command, TGetConnectionsBroadCast>) => unknown): Promise<() => void>;
|
|
13
|
-
export declare const sync_changed_command_of_wallet = "sync_changed";
|
|
14
|
-
export declare type sync_changed_command_of_wallet = typeof sync_changed_command_of_wallet;
|
|
15
|
-
export declare type TSyncChangedBroadCastOfWallet = {};
|
|
16
|
-
export declare function on_sync_changed_of_wallet(daemon: TDaemon, callback: (e: GetMessageType<chia_wallet_service, sync_changed_command_of_wallet, TSyncChangedBroadCastOfWallet>) => unknown): Promise<() => void>;
|
|
17
13
|
export declare const state_changed_command_of_wallet = "state_changed";
|
|
18
14
|
export declare type state_changed_command_of_wallet = typeof state_changed_command_of_wallet;
|
|
19
15
|
export declare type TStateChangedBroadCastOfWallet = {
|
|
20
|
-
state: "add_connection" | "new_block" | "wallet_created";
|
|
16
|
+
state: "add_connection" | "new_block" | "wallet_created" | "added_stray_cat";
|
|
21
17
|
} | {
|
|
22
18
|
state: "coin_removed" | "coin_added" | "pending_transaction";
|
|
23
19
|
wallet_id: uint32;
|
|
@@ -27,8 +23,17 @@ export declare type TStateChangedBroadCastOfWallet = {
|
|
|
27
23
|
additional_data: {
|
|
28
24
|
transaction: TransactionRecord;
|
|
29
25
|
};
|
|
26
|
+
} | {
|
|
27
|
+
state: "new_derivation_index";
|
|
28
|
+
additional_data: {
|
|
29
|
+
index: uint32;
|
|
30
|
+
};
|
|
30
31
|
};
|
|
31
32
|
export declare function on_state_changed_of_wallet(daemon: TDaemon, callback: (e: GetMessageType<chia_wallet_service, state_changed_command_of_wallet, TStateChangedBroadCastOfWallet>) => unknown): Promise<() => void>;
|
|
33
|
+
export declare const sync_changed_command_of_wallet = "sync_changed";
|
|
34
|
+
export declare type sync_changed_command_of_wallet = typeof sync_changed_command_of_wallet;
|
|
35
|
+
export declare type TSyncChangedBroadCastOfWallet = {};
|
|
36
|
+
export declare function on_sync_changed_of_wallet(daemon: TDaemon, callback: (e: GetMessageType<chia_wallet_service, sync_changed_command_of_wallet, TSyncChangedBroadCastOfWallet>) => unknown): Promise<() => void>;
|
|
32
37
|
export declare const coin_added_command_of_wallet = "coin_added";
|
|
33
38
|
export declare type coin_added_command_of_wallet = typeof coin_added_command_of_wallet;
|
|
34
39
|
export declare type TCoinAddedBroadCastOfWallet = {
|
package/api/ws/wallet/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.on_message_from_wallet = exports.on_coin_added_of_wallet = exports.coin_added_command_of_wallet = exports.
|
|
12
|
+
exports.on_message_from_wallet = exports.on_coin_added_of_wallet = exports.coin_added_command_of_wallet = exports.on_sync_changed_of_wallet = exports.sync_changed_command_of_wallet = exports.on_state_changed_of_wallet = exports.state_changed_command_of_wallet = exports.on_get_connections = exports.get_connections_command = exports.chia_wallet_service = void 0;
|
|
13
13
|
const types_1 = require("../../types");
|
|
14
14
|
exports.chia_wallet_service = "chia_wallet";
|
|
15
15
|
exports.get_connections_command = "get_connections";
|
|
@@ -25,32 +25,33 @@ function on_get_connections(daemon, callback) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
exports.on_get_connections = on_get_connections;
|
|
28
|
-
exports.
|
|
29
|
-
function
|
|
28
|
+
exports.state_changed_command_of_wallet = "state_changed";
|
|
29
|
+
function on_state_changed_of_wallet(daemon, callback) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
yield daemon.subscribe(types_1.
|
|
31
|
+
yield daemon.subscribe(types_1.wallet_ui_service);
|
|
32
32
|
const messageListener = (e) => {
|
|
33
|
-
if (e.origin === exports.chia_wallet_service && e.command === exports.
|
|
33
|
+
if (e.origin === exports.chia_wallet_service && e.command === exports.state_changed_command_of_wallet) {
|
|
34
34
|
callback(e);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
return daemon.addMessageListener(exports.chia_wallet_service, messageListener);
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
exports.
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
exports.on_state_changed_of_wallet = on_state_changed_of_wallet;
|
|
41
|
+
// "sync_changed" and "coin_added" below are for metrics services.
|
|
42
|
+
exports.sync_changed_command_of_wallet = "sync_changed";
|
|
43
|
+
function on_sync_changed_of_wallet(daemon, callback) {
|
|
43
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
yield daemon.subscribe(types_1.
|
|
45
|
+
yield daemon.subscribe(types_1.metrics_service);
|
|
45
46
|
const messageListener = (e) => {
|
|
46
|
-
if (e.origin === exports.chia_wallet_service && e.command === exports.
|
|
47
|
+
if (e.origin === exports.chia_wallet_service && e.command === exports.sync_changed_command_of_wallet) {
|
|
47
48
|
callback(e);
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
return daemon.addMessageListener(exports.chia_wallet_service, messageListener);
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
exports.
|
|
54
|
+
exports.on_sync_changed_of_wallet = on_sync_changed_of_wallet;
|
|
54
55
|
exports.coin_added_command_of_wallet = "coin_added";
|
|
55
56
|
function on_coin_added_of_wallet(daemon, callback) {
|
|
56
57
|
return __awaiter(this, void 0, void 0, function* () {
|