chia-agent 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +5 -5
- package/api/chia/data_layer/data_layer_util.d.ts +30 -0
- package/api/chia/data_layer/data_layer_util.js +2 -0
- package/api/chia/data_layer/data_layer_wallet.d.ts +21 -0
- package/api/chia/data_layer/data_layer_wallet.js +2 -0
- package/api/chia/server/outbound_message.d.ts +1 -1
- package/api/chia/wallet/lineage_proof.d.ts +7 -0
- package/api/chia/wallet/lineage_proof.js +2 -0
- package/api/chia/wallet/util/wallet_types.d.ts +2 -0
- package/api/chia/wallet/util/wallet_types.js +2 -0
- package/api/rpc/common/index.d.ts +6 -6
- package/api/rpc/crawler/index.d.ts +2 -2
- package/api/rpc/data_layer/index.d.ts +290 -0
- package/api/rpc/data_layer/index.js +196 -0
- package/api/rpc/farmer/index.d.ts +13 -13
- package/api/rpc/full_node/index.d.ts +25 -25
- package/api/rpc/harvester/index.d.ts +6 -6
- package/api/rpc/index.d.ts +10 -7
- package/api/rpc/index.js +60 -19
- package/api/rpc/wallet/index.d.ts +200 -78
- package/api/rpc/wallet/index.js +85 -1
- package/api/ws/wallet/index.d.ts +1 -1
- package/package.json +1 -1
- package/rpc/index.d.ts +6 -2
- package/rpc/index.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [9.1.0]
|
|
4
|
+
### Added
|
|
5
|
+
- Added Common RPC API Error format description and type
|
|
6
|
+
- [New DataLayer RPC API](./src/api/rpc/data_layer)
|
|
7
|
+
- [`create_data_store`](./src/api/rpc/data_layer/README.md#create_data_storeagent-params)
|
|
8
|
+
- [`get_owned_stores`](./src/api/rpc/data_layer/README.md#get_owned_storesagent)
|
|
9
|
+
- [`batch_update`](./src/api/rpc/data_layer/README.md#batch_updateagent-params)
|
|
10
|
+
- [`get_value`](./src/api/rpc/data_layer/README.md#get_valueagent-params)
|
|
11
|
+
- [`get_keys`](./src/api/rpc/data_layer/README.md#get_keysagent-params)
|
|
12
|
+
- [`get_keys_values`](./src/api/rpc/data_layer/README.md#get_keys_valuesagent-params)
|
|
13
|
+
- [`get_ancestors`](./src/api/rpc/data_layer/README.md#get_ancestorsagent-params)
|
|
14
|
+
- [`get_root`](./src/api/rpc/data_layer/README.md#get_rootagent-params)
|
|
15
|
+
- [`get_local_root`](./src/api/rpc/data_layer/README.md#get_local_rootagent-params)
|
|
16
|
+
- [`get_roots`](./src/api/rpc/data_layer/README.md#get_rootsagent-params)
|
|
17
|
+
- [`delete_key`](./src/api/rpc/data_layer/README.md#delete_keyagent-params)
|
|
18
|
+
- [`insert`](./src/api/rpc/data_layer/README.md#insertagent-params)
|
|
19
|
+
- [`subscribe`](./src/api/rpc/data_layer/README.md#subscribeagent-params)
|
|
20
|
+
- [`unsubscribe`](./src/api/rpc/data_layer/README.md#unsubscribeagent-params)
|
|
21
|
+
- [`add_mirror`](./src/api/rpc/data_layer/README.md#add_mirroragent-params)
|
|
22
|
+
- [`delete_mirror`](./src/api/rpc/data_layer/README.md#delete_mirroragent-params)
|
|
23
|
+
- [`get_mirrors`](./src/api/rpc/data_layer/README.md#get_mirrorsagent-params)
|
|
24
|
+
- [`remove_subscriptions`](./src/api/rpc/data_layer/README.md#remove_subscriptionsagent-params)
|
|
25
|
+
- [`subscriptions`](./src/api/rpc/data_layer/README.md#subscriptionsagent)
|
|
26
|
+
- [`get_kv_diff`](./src/api/rpc/data_layer/README.md#get_kv_diffagent-params)
|
|
27
|
+
- [`get_root_history`](./src/api/rpc/data_layer/README.md#get_root_historyagent-params)
|
|
28
|
+
- [`add_missing_files`](./src/api/rpc/data_layer/README.md#add_missing_filesagent-params)
|
|
29
|
+
- [`make_offer`](./src/api/rpc/data_layer/README.md#make_offeragent-params)
|
|
30
|
+
- [`take_offer`](./src/api/rpc/data_layer/README.md#take_offeragent-params)
|
|
31
|
+
- [`verify_offer`](./src/api/rpc/data_layer/README.md#verify_offeragent-params)
|
|
32
|
+
- [`cancel_offer`](./src/api/rpc/data_layer/README.md#cancel_offeragent-params)
|
|
33
|
+
- [New Wallet RPC API](./src/api/rpc/wallet)
|
|
34
|
+
- [`create_new_dl`](./src/api/rpc/wallet/README.md#create_new_dlagent-params)
|
|
35
|
+
- [`dl_track_new`](./src/api/rpc/wallet/README.md#dl_track_newagent-params)
|
|
36
|
+
- [`dl_stop_tracking`](./src/api/rpc/wallet/README.md#dl_stop_trackingagent-params)
|
|
37
|
+
- [`dl_latest_singleton`](./src/api/rpc/wallet/README.md#dl_latest_singletonagent-params)
|
|
38
|
+
- [`dl_singletons_by_root`](./src/api/rpc/wallet/README.md#dl_singletons_by_rootagent-params)
|
|
39
|
+
- [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params)
|
|
40
|
+
- [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params)
|
|
41
|
+
- [`dl_history`](./src/api/rpc/wallet/README.md#dl_historyagent-params)
|
|
42
|
+
- [`dl_owned_singletons`](./src/api/rpc/wallet/README.md#dl_owned_singletonsagent-params)
|
|
43
|
+
- [`dl_get_mirrors`](./src/api/rpc/wallet/README.md#dl_get_mirrorsagent-params)
|
|
44
|
+
- [`dl_new_mirror`](./src/api/rpc/wallet/README.md#dl_new_mirroragent-params)
|
|
45
|
+
- [`dl_delete_mirror`](./src/api/rpc/wallet/README.md#dl_delete_mirroragent-params)
|
|
46
|
+
- [New Wallet WebSocket API](./src/api/ws/wallet)
|
|
47
|
+
- Added `offer_added`, `offer_cancelled` to `state_changed` event.
|
|
48
|
+
### Changed
|
|
49
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
50
|
+
- [`get_offer_summary`](./src/api/rpc/wallet/README.md#get_offer_summaryagent-params)
|
|
51
|
+
- Added `advanced` request parameter
|
|
52
|
+
- [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params)
|
|
53
|
+
- Added `solver` request parameter
|
|
54
|
+
|
|
3
55
|
## [9.0.1]
|
|
4
56
|
### Fixed
|
|
5
57
|
- Fixed an issue where wallet `state_changed` events(notified via WebSocket API) below were missing.
|
|
@@ -580,6 +632,7 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
580
632
|
Initial release.
|
|
581
633
|
|
|
582
634
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
635
|
+
[9.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v9.0.1...v9.1.0
|
|
583
636
|
[9.0.1]: https://github.com/Chia-Mine/chia-agent/compare/v9.0.0...v9.0.1
|
|
584
637
|
[9.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v8.0.0...v9.0.0
|
|
585
638
|
[8.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v7.0.0...v8.0.0
|
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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
|
+
Supports all RPC/Websocket API available at `chia 1.6.0`.
|
|
6
6
|
\(If you need previous version, search for the corresponding release [here](https://github.com/Chia-Mine/chia-agent/releases)\)
|
|
7
7
|
|
|
8
8
|
you can develop your own nodejs script with `chia-agent` to:
|
|
9
|
-
- retrieve latest data from RPC servers like `farmer`, `harvester`, `full_node`, `wallet`, `pool`, `crawler`.
|
|
9
|
+
- retrieve latest data from RPC servers like `farmer`, `harvester`, `full_node`, `wallet`, `pool`, `data_layer`, `crawler`.
|
|
10
10
|
- send email when proof is found.
|
|
11
11
|
- trigger scripts when target event is observed.
|
|
12
12
|
- start/stop services.
|
|
@@ -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
|
+
- [`bf4759be503bf46c997b41e39a3c22a53316e404`](https://github.com/Chia-Network/chia-blockchain/tree/bf4759be503bf46c997b41e39a3c22a53316e404) of [chia-blockchain 1.6.0](https://github.com/Chia-Network/chia-blockchain)
|
|
26
|
+
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/bf4759be503bf46c997b41e39a3c22a53316e404...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
|
|
|
@@ -32,7 +32,7 @@ There are 2 kinds of APIs in chia.
|
|
|
32
32
|
`RPC API` and `Websocket API`.
|
|
33
33
|
|
|
34
34
|
### RPC API
|
|
35
|
-
RPC API is used to send message directly to chia services like `farmer`, `harvester`, `full_node`, `wallet`, `crawler`.
|
|
35
|
+
RPC API is used to send message directly to chia services like `farmer`, `harvester`, `full_node`, `wallet`, `data_layer`, `crawler`.
|
|
36
36
|
|
|
37
37
|
RPC API is just an async function in a traditional request/response style.
|
|
38
38
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { str } from "../types/_python_types_";
|
|
2
|
+
export declare type KeyValueMarshalled = {
|
|
3
|
+
key: str;
|
|
4
|
+
value: str;
|
|
5
|
+
};
|
|
6
|
+
export declare type OfferStoreMarshalled = {
|
|
7
|
+
store_id: str;
|
|
8
|
+
inclusions: KeyValueMarshalled[];
|
|
9
|
+
};
|
|
10
|
+
export declare type StoreProofsMarshalled = {
|
|
11
|
+
store_id: str;
|
|
12
|
+
proofs: ProofMarshalled[];
|
|
13
|
+
};
|
|
14
|
+
export declare type ProofMarshalled = {
|
|
15
|
+
key: str;
|
|
16
|
+
value: str;
|
|
17
|
+
node_hash: str;
|
|
18
|
+
layers: LayerMarshalled[];
|
|
19
|
+
};
|
|
20
|
+
export declare type LayerMarshalled = {
|
|
21
|
+
other_hash_side: "left" | "right";
|
|
22
|
+
other_hash: str;
|
|
23
|
+
combined_hash: str;
|
|
24
|
+
};
|
|
25
|
+
export declare type OfferMarshalled = {
|
|
26
|
+
trade_id: str;
|
|
27
|
+
offer: str;
|
|
28
|
+
taker: OfferStoreMarshalled[];
|
|
29
|
+
maker: StoreProofsMarshalled[];
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
2
|
+
import { bool, str, uint32, uint64 } from "../types/_python_types_";
|
|
3
|
+
import { LineageProof } from "../wallet/lineage_proof";
|
|
4
|
+
export declare type SingletonRecord = {
|
|
5
|
+
coin_id: bytes32;
|
|
6
|
+
launcher_id: bytes32;
|
|
7
|
+
root: bytes32;
|
|
8
|
+
inner_puzzle_hash: bytes32;
|
|
9
|
+
confirmed: bool;
|
|
10
|
+
confirmed_at_height: uint32;
|
|
11
|
+
lineage_proof: LineageProof;
|
|
12
|
+
generation: uint32;
|
|
13
|
+
timestamp: uint64;
|
|
14
|
+
};
|
|
15
|
+
export declare type Mirror = {
|
|
16
|
+
coin_id: str;
|
|
17
|
+
launcher_id: str;
|
|
18
|
+
amount: uint64;
|
|
19
|
+
urls: str[];
|
|
20
|
+
ours: bool;
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type NodeType = 1 | 2 | 3 | 4 | 5 | 6;
|
|
1
|
+
export declare type NodeType = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Optional, uint64 } from "../types/_python_types_";
|
|
2
|
+
import { bytes32 } from "../types/blockchain_format/sized_bytes";
|
|
3
|
+
export declare type LineageProof = {
|
|
4
|
+
parent_name: Optional<bytes32>;
|
|
5
|
+
inner_puzzle_hash: Optional<bytes32>;
|
|
6
|
+
amount: Optional<uint64>;
|
|
7
|
+
};
|
|
@@ -12,7 +12,7 @@ export declare type TGetConnectionsRequest = {
|
|
|
12
12
|
export declare type TGetConnectionsResponse = {
|
|
13
13
|
connections: TConnectionGeneral[] | TConnectionFullNode[];
|
|
14
14
|
};
|
|
15
|
-
export declare function get_connections(agent: TRPCAgent, params: TGetConnectionsRequest): Promise<TGetConnectionsResponse>;
|
|
15
|
+
export declare function get_connections(agent: TRPCAgent, params: TGetConnectionsRequest): Promise<TGetConnectionsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
16
16
|
export declare const open_connection_command = "open_connection";
|
|
17
17
|
export declare type open_connection_command = typeof open_connection_command;
|
|
18
18
|
export declare type TOpenConnectionRequest = {
|
|
@@ -20,27 +20,27 @@ export declare type TOpenConnectionRequest = {
|
|
|
20
20
|
port: uint16;
|
|
21
21
|
};
|
|
22
22
|
export declare type TOpenConnectionResponse = {};
|
|
23
|
-
export declare function open_connection(agent: TRPCAgent, params: TOpenConnectionRequest): Promise<TOpenConnectionResponse>;
|
|
23
|
+
export declare function open_connection(agent: TRPCAgent, params: TOpenConnectionRequest): Promise<TOpenConnectionResponse | import("../../../rpc/index").ErrorResponse>;
|
|
24
24
|
export declare const close_connection_command = "close_connection";
|
|
25
25
|
export declare type close_connection_command = typeof close_connection_command;
|
|
26
26
|
export declare type TCloseConnectionRequest = {
|
|
27
27
|
node_id: str;
|
|
28
28
|
};
|
|
29
29
|
export declare type TCloseConnectionResponse = {};
|
|
30
|
-
export declare function close_connection(agent: TRPCAgent, params: TCloseConnectionRequest): Promise<TCloseConnectionResponse>;
|
|
30
|
+
export declare function close_connection(agent: TRPCAgent, params: TCloseConnectionRequest): Promise<TCloseConnectionResponse | import("../../../rpc/index").ErrorResponse>;
|
|
31
31
|
export declare const stop_node_command = "stop_node";
|
|
32
32
|
export declare type stop_node_command = typeof stop_node_command;
|
|
33
33
|
export declare type TStopNodeResponse = {};
|
|
34
|
-
export declare function stop_node(agent: TRPCAgent): Promise<TStopNodeResponse>;
|
|
34
|
+
export declare function stop_node(agent: TRPCAgent): Promise<TStopNodeResponse | import("../../../rpc/index").ErrorResponse>;
|
|
35
35
|
export declare const get_routes_command = "get_routes";
|
|
36
36
|
export declare type get_routes_command = typeof get_routes_command;
|
|
37
37
|
export declare type TGetRoutesResponse = {
|
|
38
38
|
routes: str[];
|
|
39
39
|
};
|
|
40
|
-
export declare function get_routes(agent: TRPCAgent): Promise<TGetRoutesResponse>;
|
|
40
|
+
export declare function get_routes(agent: TRPCAgent): Promise<TGetRoutesResponse | import("../../../rpc/index").ErrorResponse>;
|
|
41
41
|
export declare const healthz_command = "healthz";
|
|
42
42
|
export declare type healthz_command = typeof healthz_command;
|
|
43
43
|
export declare type THealthzResponse = {
|
|
44
44
|
success: "true";
|
|
45
45
|
};
|
|
46
|
-
export declare function healthz(agent: TRPCAgent): Promise<THealthzResponse>;
|
|
46
|
+
export declare function healthz(agent: TRPCAgent): Promise<THealthzResponse | import("../../../rpc/index").ErrorResponse>;
|
|
@@ -14,7 +14,7 @@ export declare type TGetPeerCountsResponse = {
|
|
|
14
14
|
versions: Record<str, int>;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
export declare function get_peer_counts(agent: TRPCAgent): Promise<TGetPeerCountsResponse>;
|
|
17
|
+
export declare function get_peer_counts(agent: TRPCAgent): Promise<TGetPeerCountsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
18
18
|
export declare const get_ips_after_timestamp_command = "get_ips_after_timestamp";
|
|
19
19
|
export declare type get_ips_after_timestamp_command = typeof get_ips_after_timestamp_command;
|
|
20
20
|
export declare type TGetIpsAfterTimestampRequest = {
|
|
@@ -26,4 +26,4 @@ export declare type TGetIpsAfterTimestampResponse = {
|
|
|
26
26
|
ips: str[];
|
|
27
27
|
total: int;
|
|
28
28
|
};
|
|
29
|
-
export declare function get_ips_after_timestamp(agent: TRPCAgent, params: TGetIpsAfterTimestampRequest): Promise<TGetIpsAfterTimestampResponse>;
|
|
29
|
+
export declare function get_ips_after_timestamp(agent: TRPCAgent, params: TGetIpsAfterTimestampRequest): Promise<TGetIpsAfterTimestampResponse | import("../../../rpc/index").ErrorResponse>;
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { TRPCAgent } from "../../../rpc/index";
|
|
2
|
+
import { bool, None, Optional, str, uint64 } from "../../chia/types/_python_types_";
|
|
3
|
+
import { TransactionRecord } from "../../chia/wallet/transaction_record";
|
|
4
|
+
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
5
|
+
import { OfferMarshalled, OfferStoreMarshalled } from "../../chia/data_layer/data_layer_util";
|
|
6
|
+
export declare const chia_data_layer_service = "chia_data_layer";
|
|
7
|
+
export declare type chia_data_layer_service = typeof chia_data_layer_service;
|
|
8
|
+
export declare const create_data_store_command = "create_data_store";
|
|
9
|
+
export declare type create_data_store_command = typeof create_data_store_command;
|
|
10
|
+
export declare type TCreateDataStoreRequest = {
|
|
11
|
+
fee?: uint64;
|
|
12
|
+
};
|
|
13
|
+
export declare type TCreateDataStoreResponse = {
|
|
14
|
+
txs: TransactionRecord[];
|
|
15
|
+
id: str;
|
|
16
|
+
};
|
|
17
|
+
export declare function create_data_store(agent: TRPCAgent, params: TCreateDataStoreRequest): Promise<TCreateDataStoreResponse | import("../../../rpc/index").ErrorResponse>;
|
|
18
|
+
export declare const get_owned_stores_command = "get_owned_stores";
|
|
19
|
+
export declare type get_owned_stores_command = typeof get_owned_stores_command;
|
|
20
|
+
export declare type TGetOwnedStoresResponse = {
|
|
21
|
+
store_ids: str[];
|
|
22
|
+
};
|
|
23
|
+
export declare function get_owned_stores(agent: TRPCAgent): Promise<TGetOwnedStoresResponse | import("../../../rpc/index").ErrorResponse>;
|
|
24
|
+
export declare const batch_update_command = "batch_update";
|
|
25
|
+
export declare type batch_update_command = typeof batch_update_command;
|
|
26
|
+
export declare type TBatchUpdateRequest = {
|
|
27
|
+
fee?: uint64;
|
|
28
|
+
changelist: Array<{
|
|
29
|
+
key: str;
|
|
30
|
+
reference_node_hash?: str;
|
|
31
|
+
side?: 0 | 1;
|
|
32
|
+
value?: str;
|
|
33
|
+
}>;
|
|
34
|
+
id: str;
|
|
35
|
+
};
|
|
36
|
+
export declare type TBatchUpdateResponse = {
|
|
37
|
+
tx_id: bytes32;
|
|
38
|
+
};
|
|
39
|
+
export declare function batch_update(agent: TRPCAgent, params: TBatchUpdateRequest): Promise<TBatchUpdateResponse | import("../../../rpc/index").ErrorResponse>;
|
|
40
|
+
export declare const get_value_command = "get_value";
|
|
41
|
+
export declare type get_value_command = typeof get_value_command;
|
|
42
|
+
export declare type TGetValueRequest = {
|
|
43
|
+
id: str;
|
|
44
|
+
key: str;
|
|
45
|
+
};
|
|
46
|
+
export declare type TGetValueResponse = {
|
|
47
|
+
value: str | None;
|
|
48
|
+
};
|
|
49
|
+
export declare function get_value(agent: TRPCAgent, params: TGetValueRequest): Promise<TGetValueResponse | import("../../../rpc/index").ErrorResponse>;
|
|
50
|
+
export declare const get_keys_command = "get_keys";
|
|
51
|
+
export declare type get_keys_command = typeof get_keys_command;
|
|
52
|
+
export declare type TGetKeysRequest = {
|
|
53
|
+
id: str;
|
|
54
|
+
root_hash?: str;
|
|
55
|
+
};
|
|
56
|
+
export declare type TGetKeysResponse = {
|
|
57
|
+
keys: str[];
|
|
58
|
+
};
|
|
59
|
+
export declare function get_keys(agent: TRPCAgent, params: TGetKeysRequest): Promise<TGetKeysResponse | import("../../../rpc/index").ErrorResponse>;
|
|
60
|
+
export declare const get_keys_values_command = "get_keys_values";
|
|
61
|
+
export declare type get_keys_values_command = typeof get_keys_values_command;
|
|
62
|
+
export declare type TGetKeysValuesRequest = {
|
|
63
|
+
id: str;
|
|
64
|
+
root_hash?: str;
|
|
65
|
+
};
|
|
66
|
+
export declare type TGetKeysValuesResponse = {
|
|
67
|
+
keys_values: Array<{
|
|
68
|
+
hash: str;
|
|
69
|
+
key: str;
|
|
70
|
+
value: str;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
export declare function get_keys_values(agent: TRPCAgent, params: TGetKeysValuesRequest): Promise<TGetKeysValuesResponse | import("../../../rpc/index").ErrorResponse>;
|
|
74
|
+
export declare const get_ancestors_command = "get_ancestors";
|
|
75
|
+
export declare type get_ancestors_command = typeof get_ancestors_command;
|
|
76
|
+
export declare type TGetAncestorsRequest = {
|
|
77
|
+
id: str;
|
|
78
|
+
hash: str;
|
|
79
|
+
};
|
|
80
|
+
export declare type TGetAncestorsResponse = {
|
|
81
|
+
ancestors: Array<{
|
|
82
|
+
hash: bytes32;
|
|
83
|
+
left_hash: bytes32;
|
|
84
|
+
right_hash: bytes32;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
export declare function get_ancestors(agent: TRPCAgent, params: TGetAncestorsRequest): Promise<TGetAncestorsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
88
|
+
export declare const get_root_command = "get_root";
|
|
89
|
+
export declare type get_root_command = typeof get_root_command;
|
|
90
|
+
export declare type TGetRootRequest = {
|
|
91
|
+
id: str;
|
|
92
|
+
};
|
|
93
|
+
export declare type TGetRootResponse = {
|
|
94
|
+
hash: bytes32;
|
|
95
|
+
confirmed: bool;
|
|
96
|
+
timestamp: uint64;
|
|
97
|
+
};
|
|
98
|
+
export declare function get_root(agent: TRPCAgent, params: TGetRootRequest): Promise<TGetRootResponse | import("../../../rpc/index").ErrorResponse>;
|
|
99
|
+
export declare const get_local_root_command = "get_local_root";
|
|
100
|
+
export declare type get_local_root_command = typeof get_local_root_command;
|
|
101
|
+
export declare type TGetLocalRootRequest = {
|
|
102
|
+
id: str;
|
|
103
|
+
};
|
|
104
|
+
export declare type TGetLocalRootResponse = {
|
|
105
|
+
hash: bytes32 | None;
|
|
106
|
+
};
|
|
107
|
+
export declare function get_local_root(agent: TRPCAgent, params: TGetLocalRootRequest): Promise<TGetLocalRootResponse | import("../../../rpc/index").ErrorResponse>;
|
|
108
|
+
export declare const get_roots_command = "get_roots";
|
|
109
|
+
export declare type get_roots_command = typeof get_roots_command;
|
|
110
|
+
export declare type TGetRootsRequest = {
|
|
111
|
+
ids: str[];
|
|
112
|
+
};
|
|
113
|
+
export declare type TGetRootsResponse = {
|
|
114
|
+
root_hashes: Array<{
|
|
115
|
+
id: bytes32;
|
|
116
|
+
hash: bytes32;
|
|
117
|
+
confirmed: bool;
|
|
118
|
+
timestamp: uint64;
|
|
119
|
+
}>;
|
|
120
|
+
};
|
|
121
|
+
export declare function get_roots(agent: TRPCAgent, params: TGetRootsRequest): Promise<TGetRootsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
122
|
+
export declare const delete_key_command = "delete_key";
|
|
123
|
+
export declare type delete_key_command = typeof delete_key_command;
|
|
124
|
+
export declare type TDeleteKeyRequest = {
|
|
125
|
+
fee?: uint64;
|
|
126
|
+
key: str;
|
|
127
|
+
id: str;
|
|
128
|
+
};
|
|
129
|
+
export declare type TDeleteKeyResponse = {
|
|
130
|
+
tx_id: bytes32;
|
|
131
|
+
};
|
|
132
|
+
export declare function delete_key(agent: TRPCAgent, params: TDeleteKeyRequest): Promise<TDeleteKeyResponse | import("../../../rpc/index").ErrorResponse>;
|
|
133
|
+
export declare const insert_command = "insert";
|
|
134
|
+
export declare type insert_command = typeof insert_command;
|
|
135
|
+
export declare type TInsertRequest = {
|
|
136
|
+
fee?: uint64;
|
|
137
|
+
key: str;
|
|
138
|
+
value: str;
|
|
139
|
+
id: str;
|
|
140
|
+
};
|
|
141
|
+
export declare type TInsertResponse = {
|
|
142
|
+
tx_id: bytes32;
|
|
143
|
+
};
|
|
144
|
+
export declare function insert(agent: TRPCAgent, params: TInsertRequest): Promise<TInsertResponse | import("../../../rpc/index").ErrorResponse>;
|
|
145
|
+
export declare const subscribe_command = "subscribe";
|
|
146
|
+
export declare type subscribe_command = typeof subscribe_command;
|
|
147
|
+
export declare type TSubscribeRequest = {
|
|
148
|
+
id: str;
|
|
149
|
+
urls: str[];
|
|
150
|
+
};
|
|
151
|
+
export declare type TSubscribeResponse = {};
|
|
152
|
+
export declare function subscribe(agent: TRPCAgent, params: TSubscribeRequest): Promise<TSubscribeResponse | import("../../../rpc/index").ErrorResponse>;
|
|
153
|
+
export declare const unsubscribe_command = "unsubscribe";
|
|
154
|
+
export declare type unsubscribe_command = typeof unsubscribe_command;
|
|
155
|
+
export declare type TUnsubscribeRequest = {
|
|
156
|
+
id: str;
|
|
157
|
+
};
|
|
158
|
+
export declare type TUnsubscribeResponse = {};
|
|
159
|
+
export declare function unsubscribe(agent: TRPCAgent, params: TUnsubscribeRequest): Promise<TUnsubscribeResponse | import("../../../rpc/index").ErrorResponse>;
|
|
160
|
+
export declare const add_mirror_command = "add_mirror";
|
|
161
|
+
export declare type add_mirror_command = typeof add_mirror_command;
|
|
162
|
+
export declare type TAddMirrorRequest = {
|
|
163
|
+
id: str;
|
|
164
|
+
urls: str[];
|
|
165
|
+
amount: uint64;
|
|
166
|
+
fee?: uint64;
|
|
167
|
+
};
|
|
168
|
+
export declare type TAddMirrorResponse = {};
|
|
169
|
+
export declare function add_mirror(agent: TRPCAgent, params: TAddMirrorRequest): Promise<TAddMirrorResponse | import("../../../rpc/index").ErrorResponse>;
|
|
170
|
+
export declare const delete_mirror_command = "delete_mirror";
|
|
171
|
+
export declare type delete_mirror_command = typeof delete_mirror_command;
|
|
172
|
+
export declare type TDeleteMirrorRequest = {
|
|
173
|
+
coin_id: str;
|
|
174
|
+
fee?: uint64;
|
|
175
|
+
};
|
|
176
|
+
export declare type TDeleteMirrorResponse = {};
|
|
177
|
+
export declare function delete_mirror(agent: TRPCAgent, params: TDeleteMirrorRequest): Promise<TDeleteMirrorResponse | import("../../../rpc/index").ErrorResponse>;
|
|
178
|
+
export declare const get_mirrors_command = "get_mirrors";
|
|
179
|
+
export declare type get_mirrors_command = typeof get_mirrors_command;
|
|
180
|
+
export declare type TGetMirrorsRequest = {
|
|
181
|
+
id: str;
|
|
182
|
+
};
|
|
183
|
+
export declare type TGetMirrorsResponse = {
|
|
184
|
+
mirrors: Array<{
|
|
185
|
+
coin_id: str;
|
|
186
|
+
launcher_id: str;
|
|
187
|
+
amount: uint64;
|
|
188
|
+
urls: str[];
|
|
189
|
+
ours: bool;
|
|
190
|
+
}>;
|
|
191
|
+
};
|
|
192
|
+
export declare function get_mirrors(agent: TRPCAgent, params: TGetMirrorsRequest): Promise<TGetMirrorsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
193
|
+
export declare const remove_subscriptions_command = "remove_subscriptions";
|
|
194
|
+
export declare type remove_subscriptions_command = typeof remove_subscriptions_command;
|
|
195
|
+
export declare type TRemoveSubscriptionsRequest = {
|
|
196
|
+
id: str;
|
|
197
|
+
urls: str[];
|
|
198
|
+
};
|
|
199
|
+
export declare type TRemoveSubscriptionsResponse = {};
|
|
200
|
+
export declare function remove_subscriptions(agent: TRPCAgent, params: TRemoveSubscriptionsRequest): Promise<TRemoveSubscriptionsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
201
|
+
export declare const subscriptions_command = "subscriptions";
|
|
202
|
+
export declare type subscriptions_command = typeof subscriptions_command;
|
|
203
|
+
export declare type TSubscriptionsResponse = {
|
|
204
|
+
store_ids: str[];
|
|
205
|
+
};
|
|
206
|
+
export declare function subscriptions(agent: TRPCAgent): Promise<TSubscriptionsResponse | import("../../../rpc/index").ErrorResponse>;
|
|
207
|
+
export declare const get_kv_diff_command = "get_kv_diff";
|
|
208
|
+
export declare type get_kv_diff_command = typeof get_kv_diff_command;
|
|
209
|
+
export declare type TGetKvDiffRequest = {
|
|
210
|
+
id: str;
|
|
211
|
+
hash_1: str;
|
|
212
|
+
hash_2: str;
|
|
213
|
+
};
|
|
214
|
+
export declare type TGetKvDiffResponse = {
|
|
215
|
+
diff: Array<{
|
|
216
|
+
type: str;
|
|
217
|
+
key: str;
|
|
218
|
+
value: str;
|
|
219
|
+
}>;
|
|
220
|
+
};
|
|
221
|
+
export declare function get_kv_diff(agent: TRPCAgent, params: TGetKvDiffRequest): Promise<TGetKvDiffResponse | import("../../../rpc/index").ErrorResponse>;
|
|
222
|
+
export declare const get_root_history_command = "get_root_history";
|
|
223
|
+
export declare type get_root_history_command = typeof get_root_history_command;
|
|
224
|
+
export declare type TGetRootHistoryRequest = {
|
|
225
|
+
id: str;
|
|
226
|
+
};
|
|
227
|
+
export declare type TGetRootHistoryResponse = {
|
|
228
|
+
root_history: Array<{
|
|
229
|
+
root_hash: bytes32;
|
|
230
|
+
confirmed: bool;
|
|
231
|
+
timestamp: uint64;
|
|
232
|
+
}>;
|
|
233
|
+
};
|
|
234
|
+
export declare function get_root_history(agent: TRPCAgent, params: TGetRootHistoryRequest): Promise<TGetRootHistoryResponse | import("../../../rpc/index").ErrorResponse>;
|
|
235
|
+
export declare const add_missing_files_command = "add_missing_files";
|
|
236
|
+
export declare type add_missing_files_command = typeof add_missing_files_command;
|
|
237
|
+
export declare type TAddMissingFilesRequest = {
|
|
238
|
+
ids?: str[];
|
|
239
|
+
overwrite?: bool;
|
|
240
|
+
foldername?: str;
|
|
241
|
+
};
|
|
242
|
+
export declare type TAddMissingFilesResponse = {};
|
|
243
|
+
export declare function add_missing_files(agent: TRPCAgent, params: TAddMissingFilesRequest): Promise<TAddMissingFilesResponse | import("../../../rpc/index").ErrorResponse>;
|
|
244
|
+
export declare const make_offer_command = "make_offer";
|
|
245
|
+
export declare type make_offer_command = typeof make_offer_command;
|
|
246
|
+
export declare type TMakeOfferRequest = {
|
|
247
|
+
fee?: uint64;
|
|
248
|
+
maker: OfferStoreMarshalled;
|
|
249
|
+
taker: OfferStoreMarshalled;
|
|
250
|
+
};
|
|
251
|
+
export declare type TMakeOfferResponse = {
|
|
252
|
+
success: bool;
|
|
253
|
+
offer: OfferMarshalled;
|
|
254
|
+
};
|
|
255
|
+
export declare function make_offer(agent: TRPCAgent, params: TMakeOfferRequest): Promise<TMakeOfferResponse | import("../../../rpc/index").ErrorResponse>;
|
|
256
|
+
export declare const take_offer_command = "take_offer";
|
|
257
|
+
export declare type take_offer_command = typeof take_offer_command;
|
|
258
|
+
export declare type TTakeOfferRequest = {
|
|
259
|
+
fee?: uint64;
|
|
260
|
+
offer: OfferMarshalled;
|
|
261
|
+
};
|
|
262
|
+
export declare type TTakeOfferResponse = {
|
|
263
|
+
success: bool;
|
|
264
|
+
trade_id: str;
|
|
265
|
+
};
|
|
266
|
+
export declare function take_offer(agent: TRPCAgent, params: TTakeOfferRequest): Promise<TTakeOfferResponse | import("../../../rpc/index").ErrorResponse>;
|
|
267
|
+
export declare const verify_offer_command = "verify_offer";
|
|
268
|
+
export declare type verify_offer_command = typeof verify_offer_command;
|
|
269
|
+
export declare type TVerifyOfferRequest = {
|
|
270
|
+
fee?: uint64;
|
|
271
|
+
offer: OfferMarshalled;
|
|
272
|
+
};
|
|
273
|
+
export declare type TVerifyOfferResponse = {
|
|
274
|
+
success: bool;
|
|
275
|
+
valid: bool;
|
|
276
|
+
error: Optional<str>;
|
|
277
|
+
fee: Optional<uint64>;
|
|
278
|
+
};
|
|
279
|
+
export declare function verify_offer(agent: TRPCAgent, params: TVerifyOfferRequest): Promise<TVerifyOfferResponse | import("../../../rpc/index").ErrorResponse>;
|
|
280
|
+
export declare const cancel_offer_command = "cancel_offer";
|
|
281
|
+
export declare type cancel_offer_command = typeof cancel_offer_command;
|
|
282
|
+
export declare type TCancelOfferRequest = {
|
|
283
|
+
trade_id: str;
|
|
284
|
+
secure: bool;
|
|
285
|
+
fee?: uint64;
|
|
286
|
+
};
|
|
287
|
+
export declare type TCancelOfferResponse = {
|
|
288
|
+
success: bool;
|
|
289
|
+
};
|
|
290
|
+
export declare function cancel_offer(agent: TRPCAgent, params: TCancelOfferRequest): Promise<TCancelOfferResponse | import("../../../rpc/index").ErrorResponse>;
|