chia-agent 14.4.0 → 15.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 +78 -0
- package/README.md +7 -7
- package/api/chia/consensus/cost_calculator.d.ts +2 -1
- package/api/chia/data_layer/data_layer_util.d.ts +3 -2
- package/api/chia/data_layer/data_layer_wallet.d.ts +2 -14
- package/api/chia/data_layer/singleton_record.d.ts +15 -0
- package/api/chia/farmer/farmer.d.ts +2 -1
- package/api/chia/harvester/harvester.d.ts +4 -2
- package/api/chia/plot-sync/receiver.d.ts +3 -2
- package/api/chia/pools/pool_config.d.ts +3 -2
- package/api/chia/pools/pool_wallet_info.d.ts +4 -2
- package/api/chia/protocols/farmer_protocol.d.ts +7 -5
- package/api/chia/protocols/harvester_protocol.d.ts +4 -2
- package/api/chia/protocols/pool_protocol.d.ts +4 -2
- package/api/chia/rpc/util.d.ts +6 -20
- package/api/chia/rpc/wallet_request_types.d.ts +105 -6
- package/api/chia/rpc/wallet_rpc_api.d.ts +19 -0
- package/api/chia/types/_python_types_.d.ts +0 -14
- package/api/chia/types/clvm_cost.d.ts +1 -1
- package/api/chia/types/coin_record.d.ts +2 -1
- package/api/chia/types/mempool_item.d.ts +4 -2
- package/api/chia/types/mojos.d.ts +1 -1
- package/api/chia/types/unfinished_header_block.d.ts +2 -2
- package/api/chia/util/keychain.d.ts +4 -1
- package/api/chia/util/streamable.d.ts +3 -2
- package/api/chia/wallet/conditions.d.ts +2 -1
- package/api/chia/wallet/lineage_proof.d.ts +3 -2
- package/api/chia/wallet/nft_wallet/nft_info.d.ts +3 -2
- package/api/chia/wallet/notification_store.d.ts +3 -2
- package/api/chia/wallet/puzzles/clawback/metadata.d.ts +5 -2
- package/api/chia/wallet/signer_protocol.d.ts +3 -2
- package/api/chia/wallet/trade_record.d.ts +3 -2
- package/api/chia/wallet/transaction_record.d.ts +3 -2
- package/api/chia/wallet/util/quality_filter.d.ts +2 -2
- package/api/chia/wallet/util/tx_config.d.ts +3 -2
- package/api/chia/wallet/util/wallet_types.d.ts +1 -3
- package/api/chia/wallet/util/wallet_types.js +0 -2
- package/api/chia/wallet/vc_wallet/vc_drivers.d.ts +1 -1
- package/api/chia/wallet/vc_wallet/vc_store.d.ts +1 -1
- package/api/chia/wallet/wallet_coin_record.d.ts +12 -7
- package/api/chia/wallet/wallet_coin_store.d.ts +2 -1
- package/api/chia/wallet/wallet_info.d.ts +2 -1
- package/api/chia/wallet/wallet_node.d.ts +1 -1
- package/api/chia_rs/chia-bls/lib.d.ts +4 -0
- package/api/chia_rs/chia-bls/public_key.d.ts +1 -2
- package/api/chia_rs/chia-bls/secret_key.d.ts +1 -0
- package/api/chia_rs/chia-bls/signature.d.ts +1 -0
- package/api/chia_rs/chia-consensus/gen/owned_conditions.d.ts +6 -2
- package/api/chia_rs/chia-protocol/block_record.d.ts +3 -2
- package/api/chia_rs/chia-protocol/classgroup.d.ts +1 -1
- package/api/chia_rs/chia-protocol/coin.d.ts +2 -2
- package/api/chia_rs/chia-protocol/foliage.d.ts +4 -2
- package/api/chia_rs/chia-protocol/fullblock.d.ts +2 -1
- package/api/chia_rs/chia-protocol/pool_target.d.ts +2 -2
- package/api/chia_rs/chia-protocol/proof_of_space.d.ts +4 -2
- package/api/chia_rs/chia-protocol/reward_chain_block.d.ts +4 -2
- package/api/chia_rs/chia-protocol/slots.d.ts +3 -2
- package/api/chia_rs/chia-protocol/spend_bundle.d.ts +1 -1
- package/api/chia_rs/chia-protocol/sub_epoch_summary.d.ts +3 -2
- package/api/chia_rs/chia-protocol/unfinished_block.d.ts +2 -1
- package/api/chia_rs/chia-protocol/vdf.d.ts +3 -2
- package/api/chia_rs/wheel/python/sized_bytes.d.ts +7 -0
- package/api/chia_rs/wheel/python/sized_ints.d.ts +11 -0
- package/api/chia_rs/wheel/python/sized_ints.js +2 -0
- package/api/pool-reference/pool/record.d.ts +4 -2
- package/api/rpc/common/index.d.ts +29 -3
- package/api/rpc/common/index.js +40 -50
- package/api/rpc/crawler/index.d.ts +3 -2
- package/api/rpc/crawler/index.js +7 -20
- package/api/rpc/data_layer/index.d.ts +3 -2
- package/api/rpc/data_layer/index.js +106 -186
- package/api/rpc/farmer/index.d.ts +3 -2
- package/api/rpc/farmer/index.js +40 -75
- package/api/rpc/full_node/index.d.ts +6 -5
- package/api/rpc/full_node/index.js +112 -196
- package/api/rpc/harvester/index.d.ts +2 -1
- package/api/rpc/harvester/index.js +25 -50
- package/api/rpc/index.d.ts +3 -3
- package/api/rpc/index.js +6 -17
- package/api/rpc/pool/index.d.ts +2 -1
- package/api/rpc/pool/index.js +18 -40
- package/api/rpc/wallet/index.d.ts +60 -371
- package/api/rpc/wallet/index.js +388 -755
- package/api/types.d.ts +3 -2
- package/api/ws/chia_plots_create/index.js +20 -32
- package/api/ws/crawler/index.d.ts +3 -2
- package/api/ws/crawler/index.js +21 -32
- package/api/ws/daemon/index.d.ts +3 -1
- package/api/ws/daemon/index.js +125 -212
- package/api/ws/farmer/index.d.ts +3 -2
- package/api/ws/farmer/index.js +112 -134
- package/api/ws/full_node/index.d.ts +8 -7
- package/api/ws/full_node/index.js +59 -76
- package/api/ws/harvester/index.d.ts +2 -1
- package/api/ws/harvester/index.js +60 -76
- package/api/ws/timelord/index.d.ts +3 -2
- package/api/ws/timelord/index.js +40 -54
- package/api/ws/wallet/index.d.ts +2 -1
- package/api/ws/wallet/index.js +72 -90
- package/bin/cli.js +40 -51
- package/config/index.js +13 -9
- package/daemon/connection.js +2 -2
- package/daemon/index.d.ts +1 -0
- package/daemon/index.js +119 -109
- package/index.d.ts +3 -0
- package/logger.js +11 -8
- package/package.json +8 -4
- package/rpc/index.d.ts +0 -3
- package/rpc/index.js +145 -134
- package/api/chia/types/blockchain_format/foliage.d.ts +0 -1
- package/api/chia/types/blockchain_format/pool_target.d.ts +0 -1
- package/api/chia/types/blockchain_format/reward_chain_block.d.ts +0 -1
- package/api/chia/types/blockchain_format/sized_bytes.d.ts +0 -8
- package/api/chia/wallet/dao_wallet/dao_info.d.ts +0 -39
- package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +0 -35
- /package/api/chia/{types/blockchain_format/foliage.js → data_layer/singleton_record.js} +0 -0
- /package/api/chia/{types/blockchain_format/pool_target.js → rpc/wallet_rpc_api.js} +0 -0
- /package/api/{chia/types/blockchain_format/reward_chain_block.js → chia_rs/chia-bls/lib.js} +0 -0
- /package/api/{chia/types/blockchain_format/sized_bytes.js → chia_rs/chia-bls/secret_key.js} +0 -0
- /package/api/{chia/wallet/dao_wallet/dao_info.js → chia_rs/chia-bls/signature.js} +0 -0
- /package/api/{chia/wallet/dao_wallet/dao_wallet.js → chia_rs/wheel/python/sized_bytes.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { bool, bytes,
|
|
1
|
+
import { bool, bytes, Optional, str } from "../types/_python_types_";
|
|
2
|
+
import { int, uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
|
|
2
3
|
import { Coin } from "../types/blockchain_format/coin";
|
|
3
|
-
import { bytes32 } from "
|
|
4
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
4
5
|
import { TDriverDict } from "./puzzle_drivers";
|
|
5
6
|
import { ConditionValidTimes } from "./conditions";
|
|
6
7
|
export type TradeRecordOld = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { bool, bytes, Optional, str
|
|
1
|
+
import { bool, bytes, Optional, str } from "../types/_python_types_";
|
|
2
|
+
import { uint32, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
|
|
2
3
|
import { Coin } from "../types/blockchain_format/coin";
|
|
3
|
-
import { bytes32 } from "
|
|
4
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
4
5
|
import { ClawbackMetadata } from "./puzzles/clawback/metadata";
|
|
5
6
|
import { ConditionValidTimes } from "./conditions";
|
|
6
7
|
import { WalletSpendBundle } from "./wallet_spend_bundle";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uint32, uint64, uint8 } from "
|
|
2
|
-
import { bytes32 } from "
|
|
1
|
+
import { uint32, uint64, uint8 } from "../../../chia_rs/wheel/python/sized_ints";
|
|
2
|
+
import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
|
|
3
3
|
export type TransactionTypeFilter = {
|
|
4
4
|
values: uint8[];
|
|
5
5
|
mode: uint8;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { bool, Optional
|
|
2
|
-
import {
|
|
1
|
+
import { bool, Optional } from "../../types/_python_types_";
|
|
2
|
+
import { uint64 } from "../../../chia_rs/wheel/python/sized_ints";
|
|
3
|
+
import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
|
|
3
4
|
export type CoinSelectionConfigLoader = {
|
|
4
5
|
min_coin_amount?: Optional<uint64>;
|
|
5
6
|
max_coin_amount?: Optional<uint64>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { uint32, uint8 } from "
|
|
1
|
+
import { uint32, uint8 } from "../../../chia_rs/wheel/python/sized_ints";
|
|
2
2
|
export declare const WalletType: {
|
|
3
3
|
readonly STANDARD_WALLET: 0;
|
|
4
4
|
readonly ATOMIC_SWAP: 2;
|
|
@@ -13,8 +13,6 @@ export declare const WalletType: {
|
|
|
13
13
|
readonly DATA_LAYER: 11;
|
|
14
14
|
readonly DATA_LAYER_OFFER: 12;
|
|
15
15
|
readonly VC: 13;
|
|
16
|
-
readonly DAO: 14;
|
|
17
|
-
readonly DAO_CAT: 15;
|
|
18
16
|
readonly CRCAT: 57;
|
|
19
17
|
};
|
|
20
18
|
export declare const CoinType: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
1
|
+
import { bytes32 } from "../../../chia_rs/wheel/python/sized_bytes";
|
|
2
2
|
import { Optional } from "../../types/_python_types_";
|
|
3
3
|
import { LineageProof } from "../lineage_proof";
|
|
4
4
|
import { Coin } from "../../types/blockchain_format/coin";
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { bool,
|
|
1
|
+
import { bool, Optional, str } from "../types/_python_types_";
|
|
2
|
+
import { int, uint32, uint64 } from "../../chia_rs/wheel/python/sized_ints";
|
|
2
3
|
import { Coin } from "../types/blockchain_format/coin";
|
|
3
4
|
import { CoinType, StreamableWalletIdentifier, WalletType } from "./util/wallet_types";
|
|
4
5
|
import { ClawbackMetadata } from "./puzzles/clawback/metadata";
|
|
5
|
-
import {
|
|
6
|
+
import { VersionedBlob } from "../util/streamable";
|
|
7
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
6
8
|
export type WalletCoinRecord = {
|
|
7
9
|
coin: Coin;
|
|
8
10
|
confirmed_block_height: uint32;
|
|
9
11
|
spent_block_height: uint32;
|
|
10
12
|
spent: bool;
|
|
11
13
|
coinbase: bool;
|
|
12
|
-
wallet_type: typeof WalletType[keyof typeof WalletType];
|
|
14
|
+
wallet_type: (typeof WalletType)[keyof typeof WalletType];
|
|
13
15
|
wallet_id: int;
|
|
14
|
-
coin_type: typeof CoinType[keyof typeof CoinType];
|
|
15
|
-
metadata: Optional<
|
|
16
|
+
coin_type: (typeof CoinType)[keyof typeof CoinType];
|
|
17
|
+
metadata: Optional<VersionedBlob>;
|
|
16
18
|
};
|
|
17
|
-
export type WalletCoinRecordWithMetadata =
|
|
19
|
+
export type WalletCoinRecordWithMetadata = {
|
|
20
|
+
parent_coin_info: bytes32;
|
|
21
|
+
puzzle_hash: bytes32;
|
|
22
|
+
amount: uint64;
|
|
18
23
|
id: str;
|
|
19
|
-
type: typeof CoinType[keyof typeof CoinType];
|
|
24
|
+
type: (typeof CoinType)[keyof typeof CoinType];
|
|
20
25
|
wallet_identifier: StreamableWalletIdentifier;
|
|
21
26
|
metadata: ClawbackMetadata;
|
|
22
27
|
confirmed_height: uint32;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { bool, Optional
|
|
1
|
+
import { bool, Optional } from "../types/_python_types_";
|
|
2
|
+
import { uint32, uint8 } from "../../chia_rs/wheel/python/sized_ints";
|
|
2
3
|
import { AmountFilter, HashFilter, UInt32Range, UInt64Range } from "./util/quality_filter";
|
|
3
4
|
export type GetCoinRecords = {
|
|
4
5
|
offset: uint32;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export type PublicKey = G1Element;
|
|
1
|
+
export type PublicKey = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PrivateKey = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Signature = string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { bytes, Optional
|
|
2
|
-
import {
|
|
1
|
+
import { bool, bytes, Optional } from "../../../chia/types/_python_types_";
|
|
2
|
+
import { uint128, uint32, uint64 } from "../../wheel/python/sized_ints";
|
|
3
|
+
import { bytes32 } from "../../wheel/python/sized_bytes";
|
|
3
4
|
import { PublicKey } from "../../chia-bls/public_key";
|
|
4
5
|
export type SpendConditions = {
|
|
5
6
|
coin_id: bytes32;
|
|
@@ -33,4 +34,7 @@ export type SpendBundleConditions = {
|
|
|
33
34
|
cost: uint64;
|
|
34
35
|
removal_amount: uint128;
|
|
35
36
|
addition_amount: uint128;
|
|
37
|
+
validated_signature: bool;
|
|
38
|
+
execution_cost: uint64;
|
|
39
|
+
condition_cost: uint64;
|
|
36
40
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { bool, Optional
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { bool, Optional } from "../../chia/types/_python_types_";
|
|
3
|
+
import { uint128, uint32, uint64, uint8 } from "../wheel/python/sized_ints";
|
|
3
4
|
import { ClassgroupElement } from "./classgroup";
|
|
4
5
|
import { Coin } from "./coin";
|
|
5
6
|
import { SubEpochSummary } from "./sub_epoch_summary";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { uint64 } from "
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { uint64 } from "../wheel/python/sized_ints";
|
|
3
3
|
export type Coin = {
|
|
4
4
|
parent_coin_info: bytes32;
|
|
5
5
|
puzzle_hash: bytes32;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import {
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { Optional } from "../../chia/types/_python_types_";
|
|
3
|
+
import { G2Element } from "../chia-bls/lib";
|
|
4
|
+
import { uint64 } from "../wheel/python/sized_ints";
|
|
3
5
|
import { PoolTarget } from "./pool_target";
|
|
4
6
|
import { Coin } from "./coin";
|
|
5
7
|
export type Foliage = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Optional
|
|
1
|
+
import { Optional } from "../../chia/types/_python_types_";
|
|
2
|
+
import { uint32 } from "../wheel/python/sized_ints";
|
|
2
3
|
import { EndOfSubSlotBundle } from "./end_of_sub_slot_bundle";
|
|
3
4
|
import { RewardChainBlock } from "./reward_chain_block";
|
|
4
5
|
import { VDFProof } from "./vdf";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { uint32 } from "
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { uint32 } from "../wheel/python/sized_ints";
|
|
3
3
|
export type PoolTarget = {
|
|
4
4
|
puzzle_hash: bytes32;
|
|
5
5
|
max_height: uint32;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { bytes,
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { bytes, Optional } from "../../chia/types/_python_types_";
|
|
3
|
+
import { G1Element } from "../chia-bls/lib";
|
|
4
|
+
import { uint8 } from "../wheel/python/sized_ints";
|
|
3
5
|
export type ProofOfSpace = {
|
|
4
6
|
challenge: bytes32;
|
|
5
7
|
pool_public_key: Optional<G1Element>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { bool,
|
|
2
|
-
import {
|
|
1
|
+
import { bool, Optional } from "../../chia/types/_python_types_";
|
|
2
|
+
import { G2Element } from "../chia-bls/lib";
|
|
3
|
+
import { uint128, uint32, uint8 } from "../wheel/python/sized_ints";
|
|
4
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
3
5
|
import { ProofOfSpace } from "./proof_of_space";
|
|
4
6
|
import { VDFInfo } from "./vdf";
|
|
5
7
|
export type RewardChainBlockUnfinished = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Optional
|
|
2
|
-
import {
|
|
1
|
+
import { Optional } from "../../chia/types/_python_types_";
|
|
2
|
+
import { uint64, uint8 } from "../wheel/python/sized_ints";
|
|
3
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
3
4
|
import { VDFInfo, VDFProof } from "./vdf";
|
|
4
5
|
export type ChallengeChainSubSlot = {
|
|
5
6
|
challenge_chain_end_of_slot_vdf: VDFInfo;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { Optional
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { Optional } from "../../chia/types/_python_types_";
|
|
3
|
+
import { uint64, uint8 } from "../wheel/python/sized_ints";
|
|
3
4
|
export type SubEpochSummary = {
|
|
4
5
|
prev_subepoch_summary_hash: bytes32;
|
|
5
6
|
reward_chain_hash: bytes32;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Optional
|
|
1
|
+
import { Optional } from "../../chia/types/_python_types_";
|
|
2
|
+
import { uint32 } from "../wheel/python/sized_ints";
|
|
2
3
|
import { VDFProof } from "./vdf";
|
|
3
4
|
import { Foliage, FoliageTransactionBlock, TransactionsInfo } from "./foliage";
|
|
4
5
|
import { RewardChainBlockUnfinished } from "./reward_chain_block";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { bytes32 } from "
|
|
2
|
-
import { bool, bytes
|
|
1
|
+
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
|
+
import { bool, bytes } from "../../chia/types/_python_types_";
|
|
3
|
+
import { uint64, uint8 } from "../wheel/python/sized_ints";
|
|
3
4
|
import { ClassgroupElement } from "./classgroup";
|
|
4
5
|
export type VDFInfo = {
|
|
5
6
|
challenge: bytes32;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type int = number;
|
|
2
|
+
export type int8 = number;
|
|
3
|
+
export type uint8 = number;
|
|
4
|
+
export type int16 = number;
|
|
5
|
+
export type uint16 = number;
|
|
6
|
+
export type int32 = number;
|
|
7
|
+
export type uint32 = number;
|
|
8
|
+
export type int64 = number | bigint;
|
|
9
|
+
export type uint64 = number | bigint;
|
|
10
|
+
export type uint128 = number | bigint;
|
|
11
|
+
export type int512 = number | bigint;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { bytes32 } from "../../
|
|
2
|
-
import { bool,
|
|
1
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
2
|
+
import { bool, str } from "../../chia/types/_python_types_";
|
|
3
|
+
import { G1Element } from "../../chia_rs/chia-bls/lib";
|
|
4
|
+
import { uint64 } from "../../chia_rs/wheel/python/sized_ints";
|
|
3
5
|
import { CoinSpend } from "../../chia/types/coin_spend";
|
|
4
6
|
import { PoolState } from "../../chia/pools/pool_wallet_info";
|
|
5
7
|
export type FarmerRecord = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { False, str, True
|
|
1
|
+
import { bool, False, str, True } from "../../chia/types/_python_types_";
|
|
2
|
+
import { uint16 } from "../../chia_rs/wheel/python/sized_ints";
|
|
2
3
|
import { TRPCAgent } from "../../../rpc/index";
|
|
3
4
|
import { GetMessageType, ResType, TConnectionGeneral } from "../../types";
|
|
4
5
|
import { TConnectionFullNode } from "../../ws/full_node/index";
|
|
@@ -74,5 +75,30 @@ export type THealthzResponse = {
|
|
|
74
75
|
};
|
|
75
76
|
export type WsHealthzMessage = GetMessageType<chia_common_service, healthz_command, THealthzResponse>;
|
|
76
77
|
export declare function healthz<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, THealthzResponse, WsHealthzMessage>>;
|
|
77
|
-
export
|
|
78
|
-
export type
|
|
78
|
+
export declare const get_log_level_command = "get_log_level";
|
|
79
|
+
export type get_log_level_command = typeof get_log_level_command;
|
|
80
|
+
export type TGetLogLevelResponse = {
|
|
81
|
+
success: True;
|
|
82
|
+
level: str;
|
|
83
|
+
available_levels: str[];
|
|
84
|
+
};
|
|
85
|
+
export type WsGetLogLevelMessage = GetMessageType<chia_common_service, get_log_level_command, TGetLogLevelResponse>;
|
|
86
|
+
export declare function get_log_level<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TGetLogLevelResponse, WsGetLogLevelMessage>>;
|
|
87
|
+
export declare const set_log_level_command = "set_log_level";
|
|
88
|
+
export type set_log_level_command = typeof set_log_level_command;
|
|
89
|
+
export type TSetLogLevelRequest = {
|
|
90
|
+
level: str;
|
|
91
|
+
};
|
|
92
|
+
export type TSetLogLevelResponse = TGetLogLevelResponse & {
|
|
93
|
+
success: bool;
|
|
94
|
+
errors: str[];
|
|
95
|
+
};
|
|
96
|
+
export type WsSetLogLevelMessage = GetMessageType<chia_common_service, set_log_level_command, TSetLogLevelResponse>;
|
|
97
|
+
export declare function set_log_level<T extends TRPCAgent | TDaemon>(agent: T, params: TSetLogLevelRequest): Promise<ResType<T, TSetLogLevelResponse, WsSetLogLevelMessage>>;
|
|
98
|
+
export declare const reset_log_level_command = "reset_log_level";
|
|
99
|
+
export type reset_log_level_command = typeof reset_log_level_command;
|
|
100
|
+
export type TResetLogLevelResponse = TSetLogLevelResponse;
|
|
101
|
+
export type WsResetLogLevelMessage = GetMessageType<chia_common_service, reset_log_level_command, TResetLogLevelResponse>;
|
|
102
|
+
export declare function reset_log_level<T extends TRPCAgent | TDaemon>(agent: T): Promise<ResType<T, TSetLogLevelResponse, WsResetLogLevelMessage>>;
|
|
103
|
+
export type RpcCommonMessage = TGetNetworkInfoResponse | TGetConnectionsResponse | TOpenConnectionResponse | TCloseConnectionResponse | TStopNodeResponse | TGetRoutesResponse | TGetVersionResponse | THealthzResponse | TGetLogLevelResponse | TSetLogLevelResponse | TResetLogLevelResponse;
|
|
104
|
+
export type RpcCommonMessageOnWs = WsGetNetworkInfoMessage | WsGetConnectionsMessage | WsOpenConnectionMessage | WsCloseConnectionMessage | WsStopNodeMessage | WsGetRoutesMessage | WsGetVersionMessage | WsHealthzMessage | WsGetLogLevelMessage | WsSetLogLevelMessage | WsResetLogLevelMessage;
|
package/api/rpc/common/index.js
CHANGED
|
@@ -1,69 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
3
|
+
exports.reset_log_level_command = exports.set_log_level_command = exports.get_log_level_command = exports.healthz_command = exports.get_version_command = exports.get_routes_command = exports.stop_node_command = exports.close_connection_command = exports.open_connection_command = exports.get_connections_command = exports.get_network_info_command = exports.chia_common_service = void 0;
|
|
4
|
+
exports.get_network_info = get_network_info;
|
|
5
|
+
exports.get_connections = get_connections;
|
|
6
|
+
exports.open_connection = open_connection;
|
|
7
|
+
exports.close_connection = close_connection;
|
|
8
|
+
exports.stop_node = stop_node;
|
|
9
|
+
exports.get_routes = get_routes;
|
|
10
|
+
exports.get_version = get_version;
|
|
11
|
+
exports.healthz = healthz;
|
|
12
|
+
exports.get_log_level = get_log_level;
|
|
13
|
+
exports.set_log_level = set_log_level;
|
|
14
|
+
exports.reset_log_level = reset_log_level;
|
|
13
15
|
exports.chia_common_service = "";
|
|
14
16
|
exports.get_network_info_command = "get_network_info";
|
|
15
|
-
function get_network_info(agent) {
|
|
16
|
-
return
|
|
17
|
-
return agent.sendMessage(exports.chia_common_service, exports.get_network_info_command);
|
|
18
|
-
});
|
|
17
|
+
async function get_network_info(agent) {
|
|
18
|
+
return agent.sendMessage(exports.chia_common_service, exports.get_network_info_command);
|
|
19
19
|
}
|
|
20
|
-
exports.get_network_info = get_network_info;
|
|
21
20
|
exports.get_connections_command = "get_connections";
|
|
22
|
-
function get_connections(agent, params) {
|
|
23
|
-
return
|
|
24
|
-
return agent.sendMessage(exports.chia_common_service, exports.get_connections_command, params);
|
|
25
|
-
});
|
|
21
|
+
async function get_connections(agent, params) {
|
|
22
|
+
return agent.sendMessage(exports.chia_common_service, exports.get_connections_command, params);
|
|
26
23
|
}
|
|
27
|
-
exports.get_connections = get_connections;
|
|
28
24
|
exports.open_connection_command = "open_connection";
|
|
29
|
-
function open_connection(agent, params) {
|
|
30
|
-
return
|
|
31
|
-
return agent.sendMessage(exports.chia_common_service, exports.open_connection_command, params);
|
|
32
|
-
});
|
|
25
|
+
async function open_connection(agent, params) {
|
|
26
|
+
return agent.sendMessage(exports.chia_common_service, exports.open_connection_command, params);
|
|
33
27
|
}
|
|
34
|
-
exports.open_connection = open_connection;
|
|
35
28
|
exports.close_connection_command = "close_connection";
|
|
36
|
-
function close_connection(agent, params) {
|
|
37
|
-
return
|
|
38
|
-
return agent.sendMessage(exports.chia_common_service, exports.close_connection_command, params);
|
|
39
|
-
});
|
|
29
|
+
async function close_connection(agent, params) {
|
|
30
|
+
return agent.sendMessage(exports.chia_common_service, exports.close_connection_command, params);
|
|
40
31
|
}
|
|
41
|
-
exports.close_connection = close_connection;
|
|
42
32
|
exports.stop_node_command = "stop_node";
|
|
43
|
-
function stop_node(agent) {
|
|
44
|
-
return
|
|
45
|
-
return agent.sendMessage(exports.chia_common_service, exports.stop_node_command);
|
|
46
|
-
});
|
|
33
|
+
async function stop_node(agent) {
|
|
34
|
+
return agent.sendMessage(exports.chia_common_service, exports.stop_node_command);
|
|
47
35
|
}
|
|
48
|
-
exports.stop_node = stop_node;
|
|
49
36
|
exports.get_routes_command = "get_routes";
|
|
50
|
-
function get_routes(agent) {
|
|
51
|
-
return
|
|
52
|
-
return agent.sendMessage(exports.chia_common_service, exports.get_routes_command);
|
|
53
|
-
});
|
|
37
|
+
async function get_routes(agent) {
|
|
38
|
+
return agent.sendMessage(exports.chia_common_service, exports.get_routes_command);
|
|
54
39
|
}
|
|
55
|
-
exports.get_routes = get_routes;
|
|
56
40
|
exports.get_version_command = "get_version";
|
|
57
|
-
function get_version(agent) {
|
|
58
|
-
return
|
|
59
|
-
return agent.sendMessage(exports.chia_common_service, exports.get_version_command);
|
|
60
|
-
});
|
|
41
|
+
async function get_version(agent) {
|
|
42
|
+
return agent.sendMessage(exports.chia_common_service, exports.get_version_command);
|
|
61
43
|
}
|
|
62
|
-
exports.get_version = get_version;
|
|
63
44
|
exports.healthz_command = "healthz";
|
|
64
|
-
function healthz(agent) {
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
45
|
+
async function healthz(agent) {
|
|
46
|
+
return agent.sendMessage(exports.chia_common_service, exports.healthz_command);
|
|
47
|
+
}
|
|
48
|
+
exports.get_log_level_command = "get_log_level";
|
|
49
|
+
async function get_log_level(agent) {
|
|
50
|
+
return agent.sendMessage(exports.chia_common_service, exports.get_log_level_command);
|
|
51
|
+
}
|
|
52
|
+
exports.set_log_level_command = "set_log_level";
|
|
53
|
+
async function set_log_level(agent, params) {
|
|
54
|
+
return agent.sendMessage(exports.chia_common_service, exports.set_log_level_command, params);
|
|
55
|
+
}
|
|
56
|
+
exports.reset_log_level_command = "reset_log_level";
|
|
57
|
+
async function reset_log_level(agent) {
|
|
58
|
+
return agent.sendMessage(exports.chia_common_service, exports.reset_log_level_command);
|
|
68
59
|
}
|
|
69
|
-
exports.healthz = healthz;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { str } from "../../chia/types/_python_types_";
|
|
2
|
+
import { int, uint64 } from "../../chia_rs/wheel/python/sized_ints";
|
|
3
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
3
4
|
import { TRPCAgent } from "../../../rpc/index";
|
|
4
5
|
import { TDaemon } from "../../../daemon/index";
|
|
5
6
|
import { GetMessageType, ResType } from "../../types";
|
package/api/rpc/crawler/index.js
CHANGED
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
3
|
+
exports.get_ips_after_timestamp_command = exports.get_peer_counts_command = exports.chia_crawler_service = void 0;
|
|
4
|
+
exports.get_peer_counts = get_peer_counts;
|
|
5
|
+
exports.get_ips_after_timestamp = get_ips_after_timestamp;
|
|
13
6
|
exports.chia_crawler_service = "chia_crawler";
|
|
14
7
|
exports.get_peer_counts_command = "get_peer_counts";
|
|
15
|
-
function get_peer_counts(agent) {
|
|
16
|
-
return
|
|
17
|
-
return agent.sendMessage(exports.chia_crawler_service, exports.get_peer_counts_command);
|
|
18
|
-
});
|
|
8
|
+
async function get_peer_counts(agent) {
|
|
9
|
+
return agent.sendMessage(exports.chia_crawler_service, exports.get_peer_counts_command);
|
|
19
10
|
}
|
|
20
|
-
exports.get_peer_counts = get_peer_counts;
|
|
21
11
|
exports.get_ips_after_timestamp_command = "get_ips_after_timestamp";
|
|
22
|
-
function get_ips_after_timestamp(agent, params) {
|
|
23
|
-
return
|
|
24
|
-
return agent.sendMessage(exports.chia_crawler_service, exports.get_ips_after_timestamp_command, params);
|
|
25
|
-
});
|
|
12
|
+
async function get_ips_after_timestamp(agent, params) {
|
|
13
|
+
return agent.sendMessage(exports.chia_crawler_service, exports.get_ips_after_timestamp_command, params);
|
|
26
14
|
}
|
|
27
|
-
exports.get_ips_after_timestamp = get_ips_after_timestamp;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TRPCAgent } from "../../../rpc/index";
|
|
2
|
-
import { bool, bytes,
|
|
2
|
+
import { bool, bytes, None, Optional, str } from "../../chia/types/_python_types_";
|
|
3
|
+
import { int, uint64 } from "../../chia_rs/wheel/python/sized_ints";
|
|
3
4
|
import { TransactionRecord } from "../../chia/wallet/transaction_record";
|
|
4
|
-
import { bytes32 } from "../../
|
|
5
|
+
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
5
6
|
import { DLProof, OfferMarshalled, OfferStoreMarshalled, PluginStatusMarshalled, RootMarshalled, SyncStatus, VerifyProofResponse } from "../../chia/data_layer/data_layer_util";
|
|
6
7
|
import { GetMessageType, ResType } from "../../types";
|
|
7
8
|
import { TDaemon } from "../../../daemon/index";
|