chia-agent 13.2.0-beta.2 → 13.2.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 +34 -0
- package/README.md +3 -3
- package/api/chia/farmer/farmer.d.ts +2 -0
- package/api/chia/types/coin_spend.d.ts +5 -0
- package/api/chia/types/signing_mode.d.ts +2 -1
- package/api/chia/wallet/dao_wallet/dao_info.d.ts +39 -0
- package/api/chia/wallet/dao_wallet/dao_wallet.d.ts +31 -0
- package/api/chia/wallet/dao_wallet/dao_wallet.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/full_node/index.d.ts +3 -4
- package/api/rpc/index.d.ts +1 -1
- package/api/rpc/index.js +17 -3
- package/api/rpc/wallet/index.d.ts +248 -7
- package/api/rpc/wallet/index.js +102 -2
- package/daemon/index.js +1 -1
- package/logger.d.ts +4 -4
- package/logger.js +45 -9
- package/package.json +1 -1
- package/api/chia/types/coin_spend_with_conditions.d.ts +0 -6
- /package/api/chia/{types/coin_spend_with_conditions.js → wallet/dao_wallet/dao_info.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,14 +4,48 @@
|
|
|
4
4
|
### Added
|
|
5
5
|
- [FullNode RPC API](./src/api/rpc/full_node)
|
|
6
6
|
- [`get_block_spends_with_conditions`](./src/api/rpc/full_node/README.md#get_block_spends_with_conditionsagent-params)
|
|
7
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
8
|
+
- [`dao_adjust_filter_level`](./src/api/rpc/wallet/README.md#dao_adjust_filter_levelagent-params)
|
|
9
|
+
- [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params)
|
|
10
|
+
- [`dao_get_treasury_balance`](./src/api/rpc/wallet/README.md#dao_get_treasury_balanceagent-params)
|
|
11
|
+
- [`dao_get_treasury_id`](./src/api/rpc/wallet/README.md#dao_get_treasury_idagent-params)
|
|
12
|
+
- [`dao_get_rules`](./src/api/rpc/wallet/README.md#dao_get_rulesagent-params)
|
|
13
|
+
- [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params)
|
|
14
|
+
- [`dao_get_proposals`](./src/api/rpc/wallet/README.md#dao_get_proposalsagent-params)
|
|
15
|
+
- [`dao_get_proposal_state`](./src/api/rpc/wallet/README.md#dao_get_proposal_stateagent-params)
|
|
16
|
+
- [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params)
|
|
17
|
+
- [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params)
|
|
18
|
+
- [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params)
|
|
19
|
+
- [`dao_parse_proposal`](./src/api/rpc/wallet/README.md#dao_parse_proposalagent-params)
|
|
20
|
+
- [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params)
|
|
21
|
+
- [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params)
|
|
22
|
+
- [SigningMode](./src/api/chia/types/full_block.ts)
|
|
23
|
+
- Added `CHIP_0002_HEX_INPUT` as `SigningMode`
|
|
24
|
+
- [WalletType](./src/api/chia/wallet/util/wallet_types.ts)
|
|
25
|
+
- Added `DAO` and `DAO_CAT` to `WalletType`
|
|
7
26
|
### Changed
|
|
8
27
|
- [RPC Agent](./src/rpc)
|
|
9
28
|
- Allow to specify `host` / `port` on instantiating `RPCAgent` when `protocol` is not specified.
|
|
10
29
|
```typescript
|
|
11
30
|
const agent = new RPCAgent({host: 'example.com', port: 8444, service: 'full_node', configPath: '...'});
|
|
12
31
|
```
|
|
32
|
+
- [Farmer RPC API](./src/api/rpc/farmer)
|
|
33
|
+
- [`get_pool_state`](./src/api/rpc/farmer/README.md#get_pool_stateagent)
|
|
34
|
+
- Added new properties
|
|
35
|
+
- `insufficient_partials_since_start`
|
|
36
|
+
- `insufficient_partials_24h`
|
|
37
|
+
- [Wallet RPC API](./src/api/rpc/wallet)
|
|
38
|
+
- [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params)
|
|
39
|
+
- The types of both `excluded_coins` and `exclude_coins` were changed to `Coin[]` from `str[]`.
|
|
40
|
+
- Please note that both of the above properties are just kept for compatibility so don't use them unless you have
|
|
41
|
+
strong reasons. Use `excluded_coin_ids: str[]` instead.
|
|
42
|
+
- [`sign_message_by_address`](./src/api/rpc/wallet/README.md#sign_message_by_addressagent-params)
|
|
43
|
+
- Added `safe_mode` to request parameter
|
|
44
|
+
- [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params)
|
|
45
|
+
- Added `safe_mode` to request parameter
|
|
13
46
|
### Fixed
|
|
14
47
|
- Typo in SpendBundle: `cons_spends` renamed to `coin_spends`
|
|
48
|
+
- Fixed an issue where sometimes error logs were not reported due to circular dependencies.
|
|
15
49
|
|
|
16
50
|
## [13.1.0]
|
|
17
51
|
### Added
|
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 2.1
|
|
5
|
+
Supports all RPC/Websocket API available at `chia 2.1.3`.
|
|
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
|
+
- [`3856324cadb913fa599c5378d4c43ab216194e75`](https://github.com/Chia-Network/chia-blockchain/tree/3856324cadb913fa599c5378d4c43ab216194e75) of [chia-blockchain 2.1.3](https://github.com/Chia-Network/chia-blockchain)
|
|
26
|
+
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/3856324cadb913fa599c5378d4c43ab216194e75...main)
|
|
27
27
|
- [`6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5`](https://github.com/Chia-Network/pool-reference/tree/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5) of [pool-reference](https://github.com/Chia-Network/pool-reference)
|
|
28
28
|
- [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/6c1c7ecd2ed7307760d1673dc2b1057f22e08fd5...main)
|
|
29
29
|
|
|
@@ -10,6 +10,8 @@ export declare type PoolState = {
|
|
|
10
10
|
valid_partials_24h: Array<[uint32, uint64]>;
|
|
11
11
|
invalid_partials_since_start: int;
|
|
12
12
|
invalid_partials_24h: Array<[uint32, uint64]>;
|
|
13
|
+
insufficient_partials_since_start: int;
|
|
14
|
+
insufficient_partials_24h: Array<[uint32, uint64]>;
|
|
13
15
|
stale_partials_since_start: int;
|
|
14
16
|
stale_partials_24h: Array<[uint32, uint64]>;
|
|
15
17
|
missing_partials_since_start: int;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Coin } from "./blockchain_format/coin";
|
|
2
2
|
import { SerializedProgram } from "./blockchain_format/serialized_program";
|
|
3
|
+
import { ConditionWithArgs } from "./condition_with_args";
|
|
3
4
|
export declare type CoinSpend = {
|
|
4
5
|
coin: Coin;
|
|
5
6
|
puzzle_reveal: SerializedProgram;
|
|
6
7
|
solution: SerializedProgram;
|
|
7
8
|
};
|
|
9
|
+
export declare type CoinSpendWithConditions = {
|
|
10
|
+
coin_spend: CoinSpend;
|
|
11
|
+
conditions: ConditionWithArgs[];
|
|
12
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare type CHIP_0002 = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:CHIP-0002_";
|
|
2
|
+
export declare type CHIP_0002_HEX_INPUT = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:CHIP-0002_HEX";
|
|
2
3
|
export declare type BLS_MESSAGE_AUGMENTATION_UTF8_INPUT = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:utf8input_";
|
|
3
4
|
export declare type BLS_MESSAGE_AUGMENTATION_HEX_INPUT = "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:hexinput_";
|
|
4
|
-
export declare type SigningMode = CHIP_0002 | BLS_MESSAGE_AUGMENTATION_UTF8_INPUT | BLS_MESSAGE_AUGMENTATION_HEX_INPUT;
|
|
5
|
+
export declare type SigningMode = CHIP_0002 | CHIP_0002_HEX_INPUT | BLS_MESSAGE_AUGMENTATION_UTF8_INPUT | BLS_MESSAGE_AUGMENTATION_HEX_INPUT;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { bool, Optional, uint32, uint64 } from "../../types/_python_types_";
|
|
2
|
+
import { bytes32 } from "../../types/blockchain_format/sized_bytes";
|
|
3
|
+
import { Program } from "../../types/blockchain_format/program";
|
|
4
|
+
import { Coin } from "../../types/blockchain_format/coin";
|
|
5
|
+
import { LineageProof } from "../lineage_proof";
|
|
6
|
+
export declare type ProposalInfo = {
|
|
7
|
+
proposal_id: bytes32;
|
|
8
|
+
inner_puzzle: Program;
|
|
9
|
+
amount_voted: uint64;
|
|
10
|
+
yes_votes: uint64;
|
|
11
|
+
current_coin: Coin;
|
|
12
|
+
current_innerpuz: Optional<Program>;
|
|
13
|
+
timer_coin: Optional<Coin>;
|
|
14
|
+
singleton_block_height: uint32;
|
|
15
|
+
passed: Optional<bool>;
|
|
16
|
+
closed: Optional<bool>;
|
|
17
|
+
};
|
|
18
|
+
export declare type DAOInfo = {
|
|
19
|
+
treasury_id: bytes32;
|
|
20
|
+
cat_wallet_id: uint32;
|
|
21
|
+
dao_cat_wallet_id: uint32;
|
|
22
|
+
proposals_list: ProposalInfo[];
|
|
23
|
+
parent_info: Array<[bytes32, Optional<LineageProof>]>;
|
|
24
|
+
current_treasury_coin: Optional<Coin>;
|
|
25
|
+
current_treasury_innerpuz: Optional<Program>;
|
|
26
|
+
singleton_block_height: uint32;
|
|
27
|
+
filter_below_vote_amount: uint64;
|
|
28
|
+
assets: Array<Optional<bytes32>>;
|
|
29
|
+
current_height: uint64;
|
|
30
|
+
};
|
|
31
|
+
export declare type DAORules = {
|
|
32
|
+
proposal_timelock: uint64;
|
|
33
|
+
soft_close_length: uint64;
|
|
34
|
+
attendance_required: uint64;
|
|
35
|
+
pass_percentage: uint64;
|
|
36
|
+
self_destruct_length: uint64;
|
|
37
|
+
oracle_spend_delay: uint64;
|
|
38
|
+
proposal_minimum_amount: uint64;
|
|
39
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { bool, bytes, int, None } from "../../types/_python_types_";
|
|
2
|
+
import { Program } from "../../types/blockchain_format/program";
|
|
3
|
+
export declare type ProposalState = {
|
|
4
|
+
total_votes_needed: int;
|
|
5
|
+
yes_votes_needed: int;
|
|
6
|
+
blocks_needed: int;
|
|
7
|
+
passed: bool;
|
|
8
|
+
closable: bool;
|
|
9
|
+
closed: bool | None;
|
|
10
|
+
};
|
|
11
|
+
export declare type ParsedProposalSpend = {
|
|
12
|
+
state: ProposalState;
|
|
13
|
+
proposal_type: "s";
|
|
14
|
+
proposed_puzzle_reveal: Program;
|
|
15
|
+
xch_conditions: Array<{
|
|
16
|
+
puzzle_hash: bytes;
|
|
17
|
+
amount: int;
|
|
18
|
+
}>;
|
|
19
|
+
asset_conditions: Array<{
|
|
20
|
+
asset_id: bytes;
|
|
21
|
+
condition: Array<{
|
|
22
|
+
puzzle_hash: bytes;
|
|
23
|
+
amount: int;
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
export declare type ParsedProposalUpdate = {
|
|
28
|
+
state: ProposalState;
|
|
29
|
+
proposal_type: "u";
|
|
30
|
+
dao_rules: unknown;
|
|
31
|
+
};
|
|
@@ -9,8 +9,7 @@ import { MempoolItemInJsonDict } from "../../chia/types/mempool_item";
|
|
|
9
9
|
import { TRPCAgent } from "../../../rpc";
|
|
10
10
|
import { EndOfSubSlotBundle } from "../../chia/types/end_of_slot_bundle";
|
|
11
11
|
import { SignagePoint } from "../../chia/full_node/signage_point";
|
|
12
|
-
import { CoinSpend } from "../../chia/types/coin_spend";
|
|
13
|
-
import { CoinSpendWithConditions } from "../../chia/types/coin_spend_with_conditions";
|
|
12
|
+
import { CoinSpend, CoinSpendWithConditions } from "../../chia/types/coin_spend";
|
|
14
13
|
import { CLVMCost } from "../../chia/types/clvm_cost";
|
|
15
14
|
import { GetMessageType, ResType } from "../../types";
|
|
16
15
|
import { TDaemon } from "../../../daemon/index";
|
|
@@ -452,5 +451,5 @@ export declare type TReorgBlocksResponse = {
|
|
|
452
451
|
};
|
|
453
452
|
export declare type WsReorgBlocksMessage = GetMessageType<chia_full_node_service, reorg_blocks_command, TReorgBlocksResponse>;
|
|
454
453
|
export declare function reorg_blocks<T extends TRPCAgent | TDaemon>(agent: T, data: TReorgBlocksRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TReorgBlocksResponse, WsReorgBlocksMessage>>;
|
|
455
|
-
export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetMempoolItemsByCoinNameResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse | TGetFeeEstimateResponse | TGetAllBlocksResponse | TFarmBlockResponse | TSetAutoFarmingResponse | TGetAutoFarmingResponse | TGetFarmingPhResponse | TGetAllCoinsResponse | TGetAllPuzzleHashesResponse | TRevertBlocksResponse | TReorgBlocksResponse;
|
|
456
|
-
export declare type RpcFullNodeMessageOnWs = WsGetAdditionsAndRemovalsMessage | WsGetAllMempoolItemsMessage | WsGetAllMempoolTxIdsMessage | WsGetBlockMessage | WsGetBlockRecordByHeightMessage | WsGetBlockRecordMessage | WsGetBlockRecordsMessage | WsGetBlockSpendsMessage | WsGetBlockchainStateMessage | WsGetBlocksMessage | WsGetBlockCountMetricsMessage | WsGetRecentSignagePointOrEOSCommandMessage | WsGetCoinRecordByNameMessage | WsGetCoinRecordsByNamesMessage | WsGetCoinRecordsByPuzzleHashMessage | WsGetCoinRecordsByPuzzleHashesMessage | WsGetCoinRecordsByParentIdsMessage | WsGetCoinRecordsByHintMessage | WsGetInitialFreezePeriodMessageOfFullNode | WsGetMempoolItemByTxIdMessage | WsGetMempoolItemsByCoinNameMessage | WsGetNetworkInfoMessageOfFullNode | WsGetNetworkSpaceMessage | WsGetUnfinishedBlockHeadersMessage | WsPushTxMessage | WsGetPuzzleAndSolutionMessage | WsGetFeeEstimateMessage | WsGetAllBlocksMessage | WsFarmBlockMessage | WsSetAutoFarmingMessage | WsGetAutoFarmingMessage | WsGetFarmingPhMessage | WsGetAllCoinsMessage | WsGetAllPuzzleHashesMessage | WsRevertBlocksMessage | WsReorgBlocksMessage;
|
|
454
|
+
export declare type RpcFullNodeMessage = TGetAdditionsAndRemovalsResponse | TGetAllMempoolItemsResponse | TGetAllMempoolTxIdsResponse | TGetBlockResponse | TGetBlockRecordByHeightResponse | TGetBlockRecordResponse | TGetBlockRecordsResponse | TGetBlockSpendsResponse | TGetBlockSpendsWithConditionsResponse | TGetBlockchainStateResponse | TGetBlocksResponse | TGetBlockCountMetricsResponse | TGetRecentSignagePointOrEOSCommandResponse | TGetCoinRecordByNameResponse | TGetCoinRecordsByNamesResponse | TGetCoinRecordsByPuzzleHashResponse | TGetCoinRecordsByPuzzleHashesResponse | TGetCoinRecordsByParentIdsResponse | TGetCoinRecordsByHintResponse | TGetInitialFreezePeriodResponseOfFullNode | TGetMempoolItemByTxIdResponse | TGetMempoolItemsByCoinNameResponse | TGetNetworkInfoResponseOfFullNode | TGetNetworkSpaceResponse | TGetUnfinishedBlockHeadersResponse | TPushTxResponse | TGetPuzzleAndSolutionResponse | TGetFeeEstimateResponse | TGetAllBlocksResponse | TFarmBlockResponse | TSetAutoFarmingResponse | TGetAutoFarmingResponse | TGetFarmingPhResponse | TGetAllCoinsResponse | TGetAllPuzzleHashesResponse | TRevertBlocksResponse | TReorgBlocksResponse;
|
|
455
|
+
export declare type RpcFullNodeMessageOnWs = WsGetAdditionsAndRemovalsMessage | WsGetAllMempoolItemsMessage | WsGetAllMempoolTxIdsMessage | WsGetBlockMessage | WsGetBlockRecordByHeightMessage | WsGetBlockRecordMessage | WsGetBlockRecordsMessage | WsGetBlockSpendsMessage | WsGetBlockSpendsWithConditionsMessage | WsGetBlockchainStateMessage | WsGetBlocksMessage | WsGetBlockCountMetricsMessage | WsGetRecentSignagePointOrEOSCommandMessage | WsGetCoinRecordByNameMessage | WsGetCoinRecordsByNamesMessage | WsGetCoinRecordsByPuzzleHashMessage | WsGetCoinRecordsByPuzzleHashesMessage | WsGetCoinRecordsByParentIdsMessage | WsGetCoinRecordsByHintMessage | WsGetInitialFreezePeriodMessageOfFullNode | WsGetMempoolItemByTxIdMessage | WsGetMempoolItemsByCoinNameMessage | WsGetNetworkInfoMessageOfFullNode | WsGetNetworkSpaceMessage | WsGetUnfinishedBlockHeadersMessage | WsPushTxMessage | WsGetPuzzleAndSolutionMessage | WsGetFeeEstimateMessage | WsGetAllBlocksMessage | WsFarmBlockMessage | WsSetAutoFarmingMessage | WsGetAutoFarmingMessage | WsGetFarmingPhMessage | WsGetAllCoinsMessage | WsGetAllPuzzleHashesMessage | WsRevertBlocksMessage | WsReorgBlocksMessage;
|
package/api/rpc/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { chia_full_node_service, TGetAdditionsAndRemovalsRequest, TGetAdditionsA
|
|
|
5
5
|
import type { RpcHarvesterMessage } from "./harvester/index";
|
|
6
6
|
export { chia_harvester_service, TAddPlotDirectoryRequest, TAddPlotDirectoryResponse, add_plot_directory, TDeletePlotRequest, TDeletePlotResponse, delete_plot, TGetPlotDirectoriesRequest, TGetPlotDirectoriesResponse, get_plot_directories, TGetPlotsRequest, TGetPlotsResponse, get_plots, TRefreshPlotsRequest, TRefreshPlotsResponse, refresh_plots, TRemovePlotDirectoryRequest, TRemovePlotDirectoryResponse, remove_plot_directory, TGetHarvesterConfigResponse, get_harvester_config, TUpdateHarvesterConfigRequest, TUpdateHarvesterConfigResponse, update_harvester_config, } from "./harvester/index";
|
|
7
7
|
import type { RpcWalletMessage } from "./wallet/index";
|
|
8
|
-
export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, add_key, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, add_rate_limited_funds, TAdditions, TCancelOfferRequest, TCancelOfferResponse, cancel_offer, TCancelOffersRequest, TCancelOffersResponse, cancel_offers, TCatGetAssetIdRequest, TCatGetAssetIdResponse, cat_get_asset_id, TCatGetNameRequest, TCatGetNameResponse, cat_get_name, TGetStrayCatsResponse, get_stray_cats, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, cat_asset_id_to_name, TCatSetNameRequest, TCatSetNameResponse, cat_set_name, TCatSpendRequest, TCatSpendResponse, cat_spend, TCheckOfferValidityRequest, TCheckOfferValidityResponse, check_offer_validity, TCreateNewWalletRequest, TCreateNewWalletResponse, create_new_wallet, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, create_offer_for_ids, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, create_signed_transaction, TDeleteUnconfirmedTransactionsRequest, TDeleteUnconfirmedTransactionsResponse, delete_unconfirmed_transactions, TSelectCoinsRequest, TSelectCoinsResponse, select_coins, TGetCurrentDerivationIndexResponse, get_current_derivation_index, TExtendDerivationIndexRequest, TExtendDerivationIndexResponse, extend_derivation_index, TGetNotificationsRequest, TGetNotificationsResponse, get_notifications, TDeleteNotificationsRequest, TDeleteNotificationsResponse, delete_notifications, TSendNotificationRequest, TSendNotificationResponse, send_notification, TSignMessageByAddressRequest, TSignMessageByAddressResponse, sign_message_by_address, TSignMessageByIdRequest, TSignMessageByIdResponse, sign_message_by_id, TVerifySignatureRequest, TVerifySignatureResponse, verify_signature, TGetTransactionMemoRequest, TGetTransactionMemoResponse, get_transaction_memo, TNftCalculateRoyaltiesRequest, TNftCalculateRoyaltiesResponse, nft_calculate_royalties, TNftMintBulkRequest, TNftMintBulkResponse, nft_mint_bulk, TNftSetDidBulkRequest, TNftSetDidBulkResponse, nft_set_did_bulk, TNftTransferBulkRequest, TNftTransferBulkResponse, nft_transfer_bulk, 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, delete_all_keys, TSetWalletResyncOnStartupRequest, TSetWalletResyncOnStartupResponse, set_wallet_resync_on_startup, TDeleteKeyRequest, TDeleteKeyResponse, delete_key, TDidSetWalletNameRequest, TDidSetWalletNameResponse, did_set_wallet_name, TDidGetWalletNameRequest, TDidGetWalletNameResponse, did_get_wallet_name, TDidCreateAttestRequest, TDidCreateAttestResponse, did_create_attest, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, did_create_backup_file, TDidTransferDidRequest, TDidTransferDidResponse, did_transfer_did, TDidGetDidRequest, TDidGetDidResponse, did_get_did, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, did_get_information_needed_for_recovery, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, did_get_current_coin_info, TDidGetPubkeyRequest, TDidGetPubkeyResponse, did_get_pubkey, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, did_get_recovery_list, TDidGetMetadataRequest, TDidGetMetadataResponse, did_get_metadata, TDidRecoverySpendRequest, TDidRecoverySpendResponse, did_recovery_spend, TDidSpendRequest, TDidSpendResponse, did_spend, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, did_update_recovery_ids, TDidUpdateMetadataRequest, TDidUpdateMetadataResponse, did_update_metadata, TNftMintNftRequest, TNftMintNftResponse, nft_mint_nft, TNftCountNftsRequest, TNftCountNftsResponse, nft_count_nfts, TNftGetNftsRequest, TNftGetNftsResponse, nft_get_nfts, TNftSetNftDidRequest, TNftSetNftDidResponse, nft_set_nft_did, TNftGetByDidRequest, TNftGetByDidResponse, nft_get_by_did, TNftGetWalletDidRequest, TNftGetWalletDidResponse, nft_get_wallet_did, TNftGetWalletsWithDidsResponse, nft_get_wallets_with_dids, TNftSetNftStatusRequest, TNftSetNftStatusResponse, nft_set_nft_status, TNftTransferNftRequest, TNftTransferNftResponse, nft_transfer_nft, TNftGetInfoRequest, TNftGetInfoResponse, nft_get_info, TNftAddUriRequest, TNftAddUriResponse, nft_add_uri, TFarmBlockRequest, TFarmBlockResponse, farm_block, TGetTimestampForHeightResponse, get_timestamp_for_height, TSetAutoClaimRequest, TSetAutoClaimResponse, set_auto_claim, TGetAutoClaimResponse, get_auto_claim, TGenerateMnemonicRequest, TGenerateMnemonicResponse, generate_mnemonic, TGetAllOffersRequest, TGetAllOffersResponse, get_all_offers, TGetCatListResponse, get_cat_list, TGetFarmedAmountRequest, TGetFarmedAmountResponse, get_farmed_amount, TGetHeightInfoRequest, TGetHeightInfoResponse, get_height_info, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, get_initial_freeze_period_of_wallet, TGetLoggedInFingerprintResponse, get_logged_in_fingerprint, TGetOfferRequest, TGetOfferResponse, get_offer, TGetOffersCountResponse, get_offers_count, TGetOfferSummaryRequest, TGetOfferSummaryResponse, get_offer_summary, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, get_network_info_of_wallet, TGetNextAddressRequest, TGetNextAddressResponse, get_next_address, TGetPrivateKeyRequest, TGetPrivateKeyResponse, get_private_key, TGetPublicKeysRequest, TGetPublicKeysResponse, get_public_keys, TGetSyncStatusRequest, TGetSyncStatusResponse, get_sync_status, TGetTransactionCountRequest, TGetTransactionCountResponse, get_transaction_count, TGetTransactionRequest, TGetTransactionResponse, get_transaction, TGetTransactionsRequest, TGetTransactionsResponse, get_transactions, TGetWalletBalanceRequest, TGetWalletBalanceResponse, get_wallet_balance, TGetWalletBalancesRequest, TGetWalletBalancesResponse, get_wallet_balances, TGetWalletsRequest, TGetWalletsResponse, get_wallets, TLoginRequest, TLoginResponse, log_in, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, push_tx as push_tx_wallet, TPushTransactionsRequest, TPushTransactionsResponse, push_transactions, TPwJoinPoolRequest, TPwJoinPoolResponse, pw_join_pool, TPwSelfPoolRequest, TPwSelfPoolResponse, pw_self_pool, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, pw_absorb_rewards, TPwStatusRequest, TPwStatusResponse, pw_status, TRlSetUserInfoRequest, TRlSetUserInfoResponse, rl_set_user_info, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, send_clawback_transaction, TSendTransactionRequest, TSendTransactionResponse, send_transaction, TSendTransactionMultiRequest, TSendTransactionMultiResponse, send_transaction_multi, TSpendClawbackCoinsRequest, TSpendClawbackCoinsResponse, spend_clawback_coins, TGetCoinRecordsRequest, TGetCoinRecordsResponse, get_coin_records, TTakeOfferRequest, TTakeOfferResponse, take_offer, TCreateNewDlRequest, TCreateNewDlResponse, create_new_dl, TDlTrackNewRequest, TDlTrackNewResponse, dl_track_new, TDlStopTrackingRequest, TDlStopTrackingResponse, dl_stop_tracking, TDlLatestSingletonRequest, TDlLatestSingletonResponse, dl_latest_singleton, TDlSingletonsByRootRequest, TDlSingletonsByRootResponse, dl_singletons_by_root, TDlUpdateRootRequest, TDlUpdateRootResponse, dl_update_root, TDlUpdateMultipleRequest, TDlUpdateMultipleResponse, dl_update_multiple, TDlHistoryRequest, TDlHistoryResponse, dl_history, TDlOwnedSingletonsResponse, dl_owned_singletons, TDlGetMirrorsRequest, TDlGetMirrorsResponse, dl_get_mirrors, TDlNewMirrorRequest, TDlNewMirrorResponse, dl_new_mirror, TDlDeleteMirrorRequest, TDlDeleteMirrorResponse, dl_delete_mirror, TVcMintRequest, TVcMintResponse, vc_mint, TVcGetRequest, TVcGetResponse, vc_get, TVcGetListRequest, TVcGetListResponse, vc_get_list, TVcSpendRequest, TVcSpendResponse, vc_spend, TVcAddProofsRequest, TVcAddProofsResponse, vc_add_proofs, TVcGetProofsForRootRequest, TVcGetProofsForRootResponse, vc_get_proofs_for_root, TVcRevokeRequest, TVcRevokeResponse, vc_revoke, TCrcatApprovePendingRequest, TCrcatApprovePendingResponse, crcat_approve_pending, } from "./wallet/index";
|
|
8
|
+
export { chia_wallet_service, TAddKeyRequest, TAddKeyResponse, add_key, TAddRateLimitedFundsRequest, TAddRateLimitedFundsResponse, add_rate_limited_funds, TAdditions, TCancelOfferRequest, TCancelOfferResponse, cancel_offer, TCancelOffersRequest, TCancelOffersResponse, cancel_offers, TCatGetAssetIdRequest, TCatGetAssetIdResponse, cat_get_asset_id, TCatGetNameRequest, TCatGetNameResponse, cat_get_name, TGetStrayCatsResponse, get_stray_cats, TCatAssetIdToNameRequest, TCatAssetIdToNameResponse, cat_asset_id_to_name, TCatSetNameRequest, TCatSetNameResponse, cat_set_name, TCatSpendRequest, TCatSpendResponse, cat_spend, TCheckOfferValidityRequest, TCheckOfferValidityResponse, check_offer_validity, TCreateNewWalletRequest, TCreateNewWalletResponse, create_new_wallet, TCreateOfferForIdsRequest, TCreateOfferForIdsResponse, create_offer_for_ids, TCreateSignedTransactionRequest, TCreateSignedTransactionResponse, create_signed_transaction, TDeleteUnconfirmedTransactionsRequest, TDeleteUnconfirmedTransactionsResponse, delete_unconfirmed_transactions, TSelectCoinsRequest, TSelectCoinsResponse, select_coins, TGetCurrentDerivationIndexResponse, get_current_derivation_index, TExtendDerivationIndexRequest, TExtendDerivationIndexResponse, extend_derivation_index, TGetNotificationsRequest, TGetNotificationsResponse, get_notifications, TDeleteNotificationsRequest, TDeleteNotificationsResponse, delete_notifications, TSendNotificationRequest, TSendNotificationResponse, send_notification, TSignMessageByAddressRequest, TSignMessageByAddressResponse, sign_message_by_address, TSignMessageByIdRequest, TSignMessageByIdResponse, sign_message_by_id, TVerifySignatureRequest, TVerifySignatureResponse, verify_signature, TGetTransactionMemoRequest, TGetTransactionMemoResponse, get_transaction_memo, TNftCalculateRoyaltiesRequest, TNftCalculateRoyaltiesResponse, nft_calculate_royalties, TNftMintBulkRequest, TNftMintBulkResponse, nft_mint_bulk, TNftSetDidBulkRequest, TNftSetDidBulkResponse, nft_set_did_bulk, TNftTransferBulkRequest, TNftTransferBulkResponse, nft_transfer_bulk, TCreate_New_CAT_WalletRequest, TCreate_New_CAT_WalletResponse, TCreate_New_DID_WalletRequest, TCreate_New_DID_WalletResponse, TCreate_New_DAO_WalletRequest, TCreate_New_DAO_WalletResponse, TCreate_New_RL_WalletRequest, TCreate_New_RL_WalletResponse, TDeleteAllKeysRequest, TDeleteAllKeysResponse, delete_all_keys, TSetWalletResyncOnStartupRequest, TSetWalletResyncOnStartupResponse, set_wallet_resync_on_startup, TDeleteKeyRequest, TDeleteKeyResponse, delete_key, TDidSetWalletNameRequest, TDidSetWalletNameResponse, did_set_wallet_name, TDidGetWalletNameRequest, TDidGetWalletNameResponse, did_get_wallet_name, TDidCreateAttestRequest, TDidCreateAttestResponse, did_create_attest, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, did_create_backup_file, TDidTransferDidRequest, TDidTransferDidResponse, did_transfer_did, TDidGetDidRequest, TDidGetDidResponse, did_get_did, TDidGetInformationNeededForRecoveryRequest, TDidGetInformationNeededForRecoveryResponse, did_get_information_needed_for_recovery, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, did_get_current_coin_info, TDidGetPubkeyRequest, TDidGetPubkeyResponse, did_get_pubkey, TDidGetRecoveryListRequest, TDidGetRecoveryListResponse, did_get_recovery_list, TDidGetMetadataRequest, TDidGetMetadataResponse, did_get_metadata, TDidRecoverySpendRequest, TDidRecoverySpendResponse, did_recovery_spend, TDidSpendRequest, TDidSpendResponse, did_spend, TDidUpdateRecoveryIdsRequest, TDidUpdateRecoveryIdsResponse, did_update_recovery_ids, TDidUpdateMetadataRequest, TDidUpdateMetadataResponse, did_update_metadata, TDaoAdjustFilterLevelRequest, TDaoAdjustFilterLevelResponse, dao_adjust_filter_level, TDaoAddFundsToTreasuryRequest, TDaoAddFundsToTreasuryResponse, dao_add_funds_to_treasury, TDaoGetTreasuryBalanceRequest, TDaoGetTreasuryBalanceResponse, dao_get_treasury_balance, TDaoGetTreasuryIdRequest, TDaoGetTreasuryIdResponse, dao_get_treasury_id, TDaoGetRulesRequest, TDaoGetRulesResponse, dao_get_rules, TDaoSendToLockupRequest, TDaoSendToLockupResponse, dao_send_to_lockup, TDaoGetProposalsRequest, TDaoGetProposalsResponse, dao_get_proposals, TDaoGetProposalStateRequest, TDaoGetProposalStateResponse, dao_get_proposal_state, TDaoExitLockupRequest, TDaoExitLockupResponse, dao_exit_lockup, TDaoCreateProposalRequest, TDaoCreateProposalResponse, dao_create_proposal, TDaoVoteOnProposalRequest, TDaoVoteOnProposalResponse, dao_vote_on_proposal, TDaoParseProposalRequest, TDaoParseProposalResponse, dao_parse_proposal, TDaoCloseProposalRequest, TDaoCloseProposalResponse, dao_close_proposal, TDaoFreeCoinsFromFinishedProposalsRequest, TDaoFreeCoinsFromFinishedProposalsResponse, dao_free_coins_from_finished_proposals, TNftMintNftRequest, TNftMintNftResponse, nft_mint_nft, TNftCountNftsRequest, TNftCountNftsResponse, nft_count_nfts, TNftGetNftsRequest, TNftGetNftsResponse, nft_get_nfts, TNftSetNftDidRequest, TNftSetNftDidResponse, nft_set_nft_did, TNftGetByDidRequest, TNftGetByDidResponse, nft_get_by_did, TNftGetWalletDidRequest, TNftGetWalletDidResponse, nft_get_wallet_did, TNftGetWalletsWithDidsResponse, nft_get_wallets_with_dids, TNftSetNftStatusRequest, TNftSetNftStatusResponse, nft_set_nft_status, TNftTransferNftRequest, TNftTransferNftResponse, nft_transfer_nft, TNftGetInfoRequest, TNftGetInfoResponse, nft_get_info, TNftAddUriRequest, TNftAddUriResponse, nft_add_uri, TFarmBlockRequest, TFarmBlockResponse, farm_block, TGetTimestampForHeightResponse, get_timestamp_for_height, TSetAutoClaimRequest, TSetAutoClaimResponse, set_auto_claim, TGetAutoClaimResponse, get_auto_claim, TGenerateMnemonicRequest, TGenerateMnemonicResponse, generate_mnemonic, TGetAllOffersRequest, TGetAllOffersResponse, get_all_offers, TGetCatListResponse, get_cat_list, TGetFarmedAmountRequest, TGetFarmedAmountResponse, get_farmed_amount, TGetHeightInfoRequest, TGetHeightInfoResponse, get_height_info, TGetInitialFreezePeriodRequestOfWallet, TGetInitialFreezePeriodResponseOfWallet, get_initial_freeze_period_of_wallet, TGetLoggedInFingerprintResponse, get_logged_in_fingerprint, TGetOfferRequest, TGetOfferResponse, get_offer, TGetOffersCountResponse, get_offers_count, TGetOfferSummaryRequest, TGetOfferSummaryResponse, get_offer_summary, TGetNetworkInfoRequestOfWallet, TGetNetworkInfoResponseOfWallet, get_network_info_of_wallet, TGetNextAddressRequest, TGetNextAddressResponse, get_next_address, TGetPrivateKeyRequest, TGetPrivateKeyResponse, get_private_key, TGetPublicKeysRequest, TGetPublicKeysResponse, get_public_keys, TGetSyncStatusRequest, TGetSyncStatusResponse, get_sync_status, TGetTransactionCountRequest, TGetTransactionCountResponse, get_transaction_count, TGetTransactionRequest, TGetTransactionResponse, get_transaction, TGetTransactionsRequest, TGetTransactionsResponse, get_transactions, TGetWalletBalanceRequest, TGetWalletBalanceResponse, get_wallet_balance, TGetWalletBalancesRequest, TGetWalletBalancesResponse, get_wallet_balances, TGetWalletsRequest, TGetWalletsResponse, get_wallets, TLoginRequest, TLoginResponse, log_in, TPushTxRequest as TPushTxRequestOfWallet, TPushTxResponse as TPushTxResponseOfWallet, push_tx as push_tx_wallet, TPushTransactionsRequest, TPushTransactionsResponse, push_transactions, TPwJoinPoolRequest, TPwJoinPoolResponse, pw_join_pool, TPwSelfPoolRequest, TPwSelfPoolResponse, pw_self_pool, TPwAbsorbRewardsRequest, TPwAbsorbRewardsResponse, pw_absorb_rewards, TPwStatusRequest, TPwStatusResponse, pw_status, TRlSetUserInfoRequest, TRlSetUserInfoResponse, rl_set_user_info, TSendClawbackTransactionRequest, TSendClawbackTransactionResponse, send_clawback_transaction, TSendTransactionRequest, TSendTransactionResponse, send_transaction, TSendTransactionMultiRequest, TSendTransactionMultiResponse, send_transaction_multi, TSpendClawbackCoinsRequest, TSpendClawbackCoinsResponse, spend_clawback_coins, TGetCoinRecordsRequest, TGetCoinRecordsResponse, get_coin_records, TTakeOfferRequest, TTakeOfferResponse, take_offer, TCreateNewDlRequest, TCreateNewDlResponse, create_new_dl, TDlTrackNewRequest, TDlTrackNewResponse, dl_track_new, TDlStopTrackingRequest, TDlStopTrackingResponse, dl_stop_tracking, TDlLatestSingletonRequest, TDlLatestSingletonResponse, dl_latest_singleton, TDlSingletonsByRootRequest, TDlSingletonsByRootResponse, dl_singletons_by_root, TDlUpdateRootRequest, TDlUpdateRootResponse, dl_update_root, TDlUpdateMultipleRequest, TDlUpdateMultipleResponse, dl_update_multiple, TDlHistoryRequest, TDlHistoryResponse, dl_history, TDlOwnedSingletonsResponse, dl_owned_singletons, TDlGetMirrorsRequest, TDlGetMirrorsResponse, dl_get_mirrors, TDlNewMirrorRequest, TDlNewMirrorResponse, dl_new_mirror, TDlDeleteMirrorRequest, TDlDeleteMirrorResponse, dl_delete_mirror, TVcMintRequest, TVcMintResponse, vc_mint, TVcGetRequest, TVcGetResponse, vc_get, TVcGetListRequest, TVcGetListResponse, vc_get_list, TVcSpendRequest, TVcSpendResponse, vc_spend, TVcAddProofsRequest, TVcAddProofsResponse, vc_add_proofs, TVcGetProofsForRootRequest, TVcGetProofsForRootResponse, vc_get_proofs_for_root, TVcRevokeRequest, TVcRevokeResponse, vc_revoke, TCrcatApprovePendingRequest, TCrcatApprovePendingResponse, crcat_approve_pending, } from "./wallet/index";
|
|
9
9
|
import type { RpcDataLayerMessage } from "./data_layer/index";
|
|
10
10
|
export { chia_data_layer_service, TWalletLogInRequest, TWalletLogInResponse, wallet_log_in, TCreateDataStoreRequest, TCreateDataStoreResponse, create_data_store, TGetOwnedStoresResponse, get_owned_stores, TBatchUpdateRequest, TBatchUpdateResponse, batch_update, TGetValueRequest, TGetValueResponse, get_value, TGetKeysRequest, TGetKeysResponse, get_keys, TGetKeysValuesRequest, TGetKeysValuesResponse, get_keys_values, TGetAncestorsRequest, TGetAncestorsResponse, get_ancestors, TGetRootRequest, TGetRootResponse, get_root, TGetLocalRootRequest, TGetLocalRootResponse, get_local_root, TGetRootsRequest, TGetRootsResponse, get_roots, TDeleteKeyRequest as TDeleteKeyDLRequest, TDeleteKeyResponse as TDeleteKeyDLResponse, delete_key as delete_key_dl, TInsertRequest, TInsertResponse, insert, TSubscribeRequest, TSubscribeResponse, subscribe, TUnsubscribeRequest, TUnsubscribeResponse, unsubscribe, TAddMirrorRequest, TAddMirrorResponse, add_mirror, TDeleteMirrorRequest, TDeleteMirrorResponse, delete_mirror, TGetMirrorsRequest, TGetMirrorsResponse, get_mirrors, TRemoveSubscriptionsRequest, TRemoveSubscriptionsResponse, remove_subscriptions, TSubscriptionsResponse, subscriptions, TGetKvDiffRequest, TGetKvDiffResponse, get_kv_diff, TGetRootHistoryRequest, TGetRootHistoryResponse, get_root_history, TAddMissingFilesRequest, TAddMissingFilesResponse, add_missing_files, TMakeOfferRequest, TMakeOfferResponse, make_offer, TTakeOfferRequest as TTakeOfferRequestDL, TTakeOfferResponse as TTakeOfferResponseDL, take_offer as take_offer_dl, TVerifyOfferRequest, TVerifyOfferResponse, verify_offer, TCancelOfferRequest as TCancelOfferRequestDL, TCancelOfferResponse as TCancelOfferResponseDL, cancel_offer as cancel_offer_dl, TGetSyncStatusRequest as TGetSyncStatusRequestDL, TGetSyncStatusResponse as TGetSyncStatusResponseDL, get_sync_status as get_sync_status_dl, TCheckPluginsResponse, check_plugins, TClearPendingRootsRequest, TClearPendingRootsResponse, clear_pending_roots, } from "./data_layer/index";
|
|
11
11
|
import type { RpcCrawlerMessage } from "./crawler/index";
|
package/api/rpc/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.get_all_puzzle_hashes = exports.get_all_coins = exports.get_farming_ph = exports.get_auto_farming = exports.set_auto_farming = exports.farm_block_fullnode = exports.get_all_blocks = exports.get_fee_estimate = 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_record_by_name = exports.get_coin_records_by_names = exports.get_recent_signage_point_or_eos = exports.get_block_count_metrics = exports.get_blocks = exports.get_blockchain_state = exports.get_block = exports.get_block_spends_with_conditions = exports.get_block_spends = exports.get_block_records = exports.get_block_record = exports.get_block_record_by_height = exports.get_mempool_items_by_coin_name = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_additions_and_removals = exports.chia_full_node_service = exports.get_pool_login_link = exports.get_pool_state = exports.set_pool_payout_instructions = 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
4
|
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.set_wallet_resync_on_startup = exports.delete_all_keys = exports.nft_transfer_bulk = exports.nft_set_did_bulk = exports.nft_mint_bulk = exports.nft_calculate_royalties = exports.get_transaction_memo = exports.verify_signature = exports.sign_message_by_id = exports.sign_message_by_address = exports.send_notification = exports.delete_notifications = exports.get_notifications = 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 = exports.add_rate_limited_funds = exports.add_key = exports.chia_wallet_service = exports.update_harvester_config = exports.get_harvester_config = 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.reorg_blocks = exports.revert_blocks = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
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.clear_pending_roots = exports.check_plugins = exports.get_sync_status_dl = exports.cancel_offer_dl = exports.verify_offer = exports.take_offer_dl = exports.make_offer = exports.add_missing_files = exports.get_root_history = exports.get_kv_diff = void 0;
|
|
5
|
+
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 = 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.get_auto_claim = exports.set_auto_claim = exports.get_timestamp_for_height = 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_count_nfts = exports.nft_mint_nft = exports.dao_free_coins_from_finished_proposals = exports.dao_close_proposal = exports.dao_parse_proposal = exports.dao_vote_on_proposal = exports.dao_create_proposal = exports.dao_exit_lockup = exports.dao_get_proposal_state = exports.dao_get_proposals = exports.dao_send_to_lockup = exports.dao_get_rules = exports.dao_get_treasury_id = exports.dao_get_treasury_balance = exports.dao_add_funds_to_treasury = exports.dao_adjust_filter_level = 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 = void 0;
|
|
6
|
+
exports.get_keys = exports.get_value = exports.batch_update = exports.get_owned_stores = exports.create_data_store = exports.wallet_log_in = exports.chia_data_layer_service = exports.crcat_approve_pending = exports.vc_revoke = exports.vc_get_proofs_for_root = exports.vc_add_proofs = exports.vc_spend = exports.vc_get_list = exports.vc_get = exports.vc_mint = exports.dl_delete_mirror = exports.dl_new_mirror = exports.dl_get_mirrors = exports.dl_owned_singletons = exports.dl_history = exports.dl_update_multiple = exports.dl_update_root = exports.dl_singletons_by_root = exports.dl_latest_singleton = exports.dl_stop_tracking = exports.dl_track_new = exports.create_new_dl = exports.take_offer = exports.get_coin_records = exports.spend_clawback_coins = 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_transactions = exports.push_tx_wallet = exports.log_in = exports.get_wallets = exports.get_wallet_balances = exports.get_wallet_balance = exports.get_transactions = exports.get_transaction = exports.get_transaction_count = exports.get_sync_status = exports.get_public_keys = exports.get_private_key = void 0;
|
|
7
|
+
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.clear_pending_roots = exports.check_plugins = exports.get_sync_status_dl = exports.cancel_offer_dl = exports.verify_offer = exports.take_offer_dl = exports.make_offer = exports.add_missing_files = exports.get_root_history = exports.get_kv_diff = exports.subscriptions = exports.remove_subscriptions = exports.get_mirrors = exports.delete_mirror = exports.add_mirror = exports.unsubscribe = exports.subscribe = exports.insert = exports.delete_key_dl = exports.get_roots = exports.get_local_root = exports.get_root = exports.get_ancestors = exports.get_keys_values = void 0;
|
|
8
8
|
var index_1 = require("./farmer/index");
|
|
9
9
|
Object.defineProperty(exports, "chia_farmer_service", { enumerable: true, get: function () { return index_1.chia_farmer_service; } });
|
|
10
10
|
Object.defineProperty(exports, "get_reward_targets", { enumerable: true, get: function () { return index_1.get_reward_targets; } });
|
|
@@ -118,6 +118,20 @@ Object.defineProperty(exports, "did_recovery_spend", { enumerable: true, get: fu
|
|
|
118
118
|
Object.defineProperty(exports, "did_spend", { enumerable: true, get: function () { return index_4.did_spend; } });
|
|
119
119
|
Object.defineProperty(exports, "did_update_recovery_ids", { enumerable: true, get: function () { return index_4.did_update_recovery_ids; } });
|
|
120
120
|
Object.defineProperty(exports, "did_update_metadata", { enumerable: true, get: function () { return index_4.did_update_metadata; } });
|
|
121
|
+
Object.defineProperty(exports, "dao_adjust_filter_level", { enumerable: true, get: function () { return index_4.dao_adjust_filter_level; } });
|
|
122
|
+
Object.defineProperty(exports, "dao_add_funds_to_treasury", { enumerable: true, get: function () { return index_4.dao_add_funds_to_treasury; } });
|
|
123
|
+
Object.defineProperty(exports, "dao_get_treasury_balance", { enumerable: true, get: function () { return index_4.dao_get_treasury_balance; } });
|
|
124
|
+
Object.defineProperty(exports, "dao_get_treasury_id", { enumerable: true, get: function () { return index_4.dao_get_treasury_id; } });
|
|
125
|
+
Object.defineProperty(exports, "dao_get_rules", { enumerable: true, get: function () { return index_4.dao_get_rules; } });
|
|
126
|
+
Object.defineProperty(exports, "dao_send_to_lockup", { enumerable: true, get: function () { return index_4.dao_send_to_lockup; } });
|
|
127
|
+
Object.defineProperty(exports, "dao_get_proposals", { enumerable: true, get: function () { return index_4.dao_get_proposals; } });
|
|
128
|
+
Object.defineProperty(exports, "dao_get_proposal_state", { enumerable: true, get: function () { return index_4.dao_get_proposal_state; } });
|
|
129
|
+
Object.defineProperty(exports, "dao_exit_lockup", { enumerable: true, get: function () { return index_4.dao_exit_lockup; } });
|
|
130
|
+
Object.defineProperty(exports, "dao_create_proposal", { enumerable: true, get: function () { return index_4.dao_create_proposal; } });
|
|
131
|
+
Object.defineProperty(exports, "dao_vote_on_proposal", { enumerable: true, get: function () { return index_4.dao_vote_on_proposal; } });
|
|
132
|
+
Object.defineProperty(exports, "dao_parse_proposal", { enumerable: true, get: function () { return index_4.dao_parse_proposal; } });
|
|
133
|
+
Object.defineProperty(exports, "dao_close_proposal", { enumerable: true, get: function () { return index_4.dao_close_proposal; } });
|
|
134
|
+
Object.defineProperty(exports, "dao_free_coins_from_finished_proposals", { enumerable: true, get: function () { return index_4.dao_free_coins_from_finished_proposals; } });
|
|
121
135
|
Object.defineProperty(exports, "nft_mint_nft", { enumerable: true, get: function () { return index_4.nft_mint_nft; } });
|
|
122
136
|
Object.defineProperty(exports, "nft_count_nfts", { enumerable: true, get: function () { return index_4.nft_count_nfts; } });
|
|
123
137
|
Object.defineProperty(exports, "nft_get_nfts", { enumerable: true, get: function () { return index_4.nft_get_nfts; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletInfo } from "../../chia/wallet/wallet_info";
|
|
2
2
|
import { Coin } from "../../chia/types/blockchain_format/coin";
|
|
3
|
-
import { bool, bytes, False, int, None, Optional, str, True, uint16, uint32, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
3
|
+
import { bool, bytes, False, int, None, Optional, str, True, uint128, uint16, uint32, uint64, uint8 } from "../../chia/types/_python_types_";
|
|
4
4
|
import { bytes32 } from "../../chia/types/blockchain_format/sized_bytes";
|
|
5
5
|
import { TransactionRecord, TransactionRecordConvenience, TransactionRecordConvenienceWithMetadata } from "../../chia/wallet/transaction_record";
|
|
6
6
|
import { SpendBundle } from "../../chia/types/spend_bundle";
|
|
@@ -22,8 +22,10 @@ import { GetCoinRecords } from "../../chia/wallet/wallet_coin_store";
|
|
|
22
22
|
import { WalletCoinRecordWithMetadata } from "../../chia/wallet/wallet_coin_record";
|
|
23
23
|
import { VCRecord } from "../../chia/wallet/vc_wallet/vc_store";
|
|
24
24
|
import { TransactionTypeFilter } from "../../chia/wallet/util/quality_filter";
|
|
25
|
-
import { TxEndpoint } from "../../chia/wallet/util/tx_config";
|
|
25
|
+
import { CoinSelectionConfigLoader, TxEndpoint } from "../../chia/wallet/util/tx_config";
|
|
26
26
|
import { ConditionValidTimes } from "../../chia/wallet/conditions";
|
|
27
|
+
import { DAOInfo, DAORules, ProposalInfo } from "../../chia/wallet/dao_wallet/dao_info";
|
|
28
|
+
import { ParsedProposalSpend, ParsedProposalUpdate, ProposalState } from "../../chia/wallet/dao_wallet/dao_wallet";
|
|
27
29
|
export declare const chia_wallet_service = "chia_wallet";
|
|
28
30
|
export declare type chia_wallet_service = typeof chia_wallet_service;
|
|
29
31
|
export declare const log_in_command = "log_in";
|
|
@@ -304,6 +306,25 @@ export declare type TCreate_New_DID_WalletResponse = {
|
|
|
304
306
|
backup_dids: bytes[];
|
|
305
307
|
num_verifications_required: uint64;
|
|
306
308
|
};
|
|
309
|
+
export declare type TCreate_New_DAO_WalletRequest = {
|
|
310
|
+
wallet_type: "dao_wallet";
|
|
311
|
+
name?: str;
|
|
312
|
+
mode: "new" | "existing";
|
|
313
|
+
amount_of_cats?: uint64;
|
|
314
|
+
filter_amount: uint64;
|
|
315
|
+
fee: uint64;
|
|
316
|
+
fee_for_cat: uint64;
|
|
317
|
+
treasury_id: str;
|
|
318
|
+
};
|
|
319
|
+
export declare type TCreate_New_DAO_WalletResponse = {
|
|
320
|
+
success: True;
|
|
321
|
+
type: uint8;
|
|
322
|
+
my_did: str;
|
|
323
|
+
wallet_id: uint32;
|
|
324
|
+
treasury_id: bytes32;
|
|
325
|
+
cat_wallet_id: uint32;
|
|
326
|
+
dao_cat_wallet_id: uint32;
|
|
327
|
+
};
|
|
307
328
|
export declare type TCreate_New_NFT_WalletRequest = {
|
|
308
329
|
fee?: uint64;
|
|
309
330
|
wallet_type: "nft_wallet";
|
|
@@ -346,8 +367,8 @@ export declare type TCreateWalletErrorResponse = {
|
|
|
346
367
|
};
|
|
347
368
|
export declare const create_new_wallet_command = "create_new_wallet";
|
|
348
369
|
export declare type create_new_wallet_command = typeof create_new_wallet_command;
|
|
349
|
-
export declare type TCreateNewWalletRequest = (TCreate_New_CAT_WalletRequest | TCreate_New_RL_WalletRequest | TCreate_New_DID_WalletRequest | TCreate_New_NFT_WalletRequest | TCreate_New_Pool_WalletRequest) & TxEndpoint;
|
|
350
|
-
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;
|
|
370
|
+
export declare type TCreateNewWalletRequest = (TCreate_New_CAT_WalletRequest | TCreate_New_RL_WalletRequest | TCreate_New_DID_WalletRequest | TCreate_New_DAO_WalletRequest | TCreate_New_NFT_WalletRequest | TCreate_New_Pool_WalletRequest) & TxEndpoint;
|
|
371
|
+
export declare type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_RL_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_DAO_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse | TCreateWalletErrorResponse;
|
|
351
372
|
export declare type WsCreateNewWalletMessage = GetMessageType<chia_wallet_service, create_new_wallet_command, TCreateNewWalletResponse>;
|
|
352
373
|
export declare function create_new_wallet<T extends TRPCAgent | TDaemon>(agent: T, data: TCreateNewWalletRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TCreateNewWalletResponse, WsCreateNewWalletMessage>>;
|
|
353
374
|
export declare type WalletBalance = Balance & {
|
|
@@ -561,7 +582,9 @@ export declare type select_coins_command = typeof select_coins_command;
|
|
|
561
582
|
export declare type TSelectCoinsRequest = {
|
|
562
583
|
amount: uint64;
|
|
563
584
|
wallet_id: uint32;
|
|
564
|
-
|
|
585
|
+
exclude_coins?: Optional<Coin[]>;
|
|
586
|
+
excluded_coins?: Optional<Coin[]>;
|
|
587
|
+
} & CoinSelectionConfigLoader;
|
|
565
588
|
export declare type TSelectCoinsResponse = {
|
|
566
589
|
coins: Coin[];
|
|
567
590
|
};
|
|
@@ -689,6 +712,7 @@ export declare type TSignMessageByAddressRequest = {
|
|
|
689
712
|
address: str;
|
|
690
713
|
message: str;
|
|
691
714
|
is_hex?: bool;
|
|
715
|
+
safe_mode?: bool;
|
|
692
716
|
};
|
|
693
717
|
export declare type TSignMessageByAddressResponse = {
|
|
694
718
|
success: True;
|
|
@@ -704,6 +728,7 @@ export declare type TSignMessageByIdRequest = {
|
|
|
704
728
|
id: str;
|
|
705
729
|
message: str;
|
|
706
730
|
is_hex?: bool;
|
|
731
|
+
safe_mode?: bool;
|
|
707
732
|
};
|
|
708
733
|
export declare type TSignMessageByIdResponse = {
|
|
709
734
|
success: False;
|
|
@@ -1181,6 +1206,222 @@ export declare type TDidTransferDidResponse = {
|
|
|
1181
1206
|
};
|
|
1182
1207
|
export declare type WsDidTransferDidMessage = GetMessageType<chia_wallet_service, did_transfer_did_command, TDidTransferDidResponse>;
|
|
1183
1208
|
export declare function did_transfer_did<T extends TRPCAgent | TDaemon>(agent: T, data: TDidTransferDidRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDidTransferDidResponse, WsDidTransferDidMessage>>;
|
|
1209
|
+
export declare const dao_adjust_filter_level_command = "dao_adjust_filter_level";
|
|
1210
|
+
export declare type dao_adjust_filter_level_command = typeof dao_adjust_filter_level_command;
|
|
1211
|
+
export declare type TDaoAdjustFilterLevelRequest = {
|
|
1212
|
+
wallet_id: uint32;
|
|
1213
|
+
filter_level: uint64;
|
|
1214
|
+
};
|
|
1215
|
+
export declare type TDaoAdjustFilterLevelResponse = {
|
|
1216
|
+
success: True;
|
|
1217
|
+
dao_info: DAOInfo;
|
|
1218
|
+
};
|
|
1219
|
+
export declare type WsDaoAdjustFilterLevelMessage = GetMessageType<chia_wallet_service, dao_adjust_filter_level_command, TDaoAdjustFilterLevelResponse>;
|
|
1220
|
+
export declare function dao_adjust_filter_level<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoAdjustFilterLevelRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoAdjustFilterLevelResponse, WsDaoAdjustFilterLevelMessage>>;
|
|
1221
|
+
export declare const dao_add_funds_to_treasury_command = "dao_add_funds_to_treasury";
|
|
1222
|
+
export declare type dao_add_funds_to_treasury_command = typeof dao_add_funds_to_treasury_command;
|
|
1223
|
+
export declare type TDaoAddFundsToTreasuryRequest = {
|
|
1224
|
+
wallet_id: uint32;
|
|
1225
|
+
funding_wallet_id: uint32;
|
|
1226
|
+
amount: uint64;
|
|
1227
|
+
fee?: uint64;
|
|
1228
|
+
} & TxEndpoint;
|
|
1229
|
+
export declare type TDaoAddFundsToTreasuryResponse = {
|
|
1230
|
+
success: True;
|
|
1231
|
+
tx_id: bytes32;
|
|
1232
|
+
tx: TransactionRecord;
|
|
1233
|
+
};
|
|
1234
|
+
export declare type WsDaoAddFundsToTreasuryMessage = GetMessageType<chia_wallet_service, dao_add_funds_to_treasury_command, TDaoAddFundsToTreasuryResponse>;
|
|
1235
|
+
export declare function dao_add_funds_to_treasury<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoAddFundsToTreasuryRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoAddFundsToTreasuryResponse, WsDaoAddFundsToTreasuryMessage>>;
|
|
1236
|
+
export declare const dao_get_treasury_balance_command = "dao_get_treasury_balance";
|
|
1237
|
+
export declare type dao_get_treasury_balance_command = typeof dao_get_treasury_balance_command;
|
|
1238
|
+
export declare type TDaoGetTreasuryBalanceRequest = {
|
|
1239
|
+
wallet_id: uint32;
|
|
1240
|
+
};
|
|
1241
|
+
export declare type TDaoGetTreasuryBalanceResponse = {
|
|
1242
|
+
success: True;
|
|
1243
|
+
balance: Record<str, uint128>;
|
|
1244
|
+
};
|
|
1245
|
+
export declare type WsDaoGetTreasuryBalanceMessage = GetMessageType<chia_wallet_service, dao_get_treasury_balance_command, TDaoGetTreasuryBalanceResponse>;
|
|
1246
|
+
export declare function dao_get_treasury_balance<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoGetTreasuryBalanceRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoGetTreasuryBalanceResponse, WsDaoGetTreasuryBalanceMessage>>;
|
|
1247
|
+
export declare const dao_get_treasury_id_command = "dao_get_treasury_id";
|
|
1248
|
+
export declare type dao_get_treasury_id_command = typeof dao_get_treasury_id_command;
|
|
1249
|
+
export declare type TDaoGetTreasuryIdRequest = {
|
|
1250
|
+
wallet_id: uint32;
|
|
1251
|
+
};
|
|
1252
|
+
export declare type TDaoGetTreasuryIdResponse = {
|
|
1253
|
+
success: True;
|
|
1254
|
+
treasury_id: bytes32;
|
|
1255
|
+
};
|
|
1256
|
+
export declare type WsDaoGetTreasuryIdMessage = GetMessageType<chia_wallet_service, dao_get_treasury_id_command, TDaoGetTreasuryIdResponse>;
|
|
1257
|
+
export declare function dao_get_treasury_id<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoGetTreasuryIdRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoGetTreasuryIdResponse, WsDaoGetTreasuryIdMessage>>;
|
|
1258
|
+
export declare const dao_get_rules_command = "dao_get_rules";
|
|
1259
|
+
export declare type dao_get_rules_command = typeof dao_get_rules_command;
|
|
1260
|
+
export declare type TDaoGetRulesRequest = {
|
|
1261
|
+
wallet_id: uint32;
|
|
1262
|
+
};
|
|
1263
|
+
export declare type TDaoGetRulesResponse = {
|
|
1264
|
+
success: True;
|
|
1265
|
+
rules: DAORules;
|
|
1266
|
+
};
|
|
1267
|
+
export declare type WsDaoGetRulesMessage = GetMessageType<chia_wallet_service, dao_get_rules_command, TDaoGetRulesResponse>;
|
|
1268
|
+
export declare function dao_get_rules<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoGetRulesRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoGetRulesResponse, WsDaoGetRulesMessage>>;
|
|
1269
|
+
export declare const dao_send_to_lockup_command = "dao_send_to_lockup";
|
|
1270
|
+
export declare type dao_send_to_lockup_command = typeof dao_send_to_lockup_command;
|
|
1271
|
+
export declare type TDaoSendToLockupRequest = {
|
|
1272
|
+
wallet_id: uint32;
|
|
1273
|
+
amount: uint64;
|
|
1274
|
+
fee?: uint64;
|
|
1275
|
+
} & TxEndpoint;
|
|
1276
|
+
export declare type TDaoSendToLockupResponse = {
|
|
1277
|
+
success: True;
|
|
1278
|
+
tx_id: bytes32;
|
|
1279
|
+
txs: TransactionRecord[];
|
|
1280
|
+
};
|
|
1281
|
+
export declare type WsDaoSendToLockupMessage = GetMessageType<chia_wallet_service, dao_send_to_lockup_command, TDaoSendToLockupResponse>;
|
|
1282
|
+
export declare function dao_send_to_lockup<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoSendToLockupRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoSendToLockupResponse, WsDaoSendToLockupMessage>>;
|
|
1283
|
+
export declare const dao_get_proposals_command = "dao_get_proposals";
|
|
1284
|
+
export declare type dao_get_proposals_command = typeof dao_get_proposals_command;
|
|
1285
|
+
export declare type TDaoGetProposalsRequest = {
|
|
1286
|
+
wallet_id: uint32;
|
|
1287
|
+
include_closed?: bool;
|
|
1288
|
+
};
|
|
1289
|
+
export declare type TDaoGetProposalsResponse = {
|
|
1290
|
+
success: True;
|
|
1291
|
+
proposals: ProposalInfo[];
|
|
1292
|
+
proposal_timelock: uint64;
|
|
1293
|
+
soft_close_length: uint64;
|
|
1294
|
+
};
|
|
1295
|
+
export declare type WsDaoGetProposalsMessage = GetMessageType<chia_wallet_service, dao_get_proposals_command, TDaoGetProposalsResponse>;
|
|
1296
|
+
export declare function dao_get_proposals<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoGetProposalsRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoGetProposalsResponse, WsDaoGetProposalsMessage>>;
|
|
1297
|
+
export declare const dao_get_proposal_state_command = "dao_get_proposal_state";
|
|
1298
|
+
export declare type dao_get_proposal_state_command = typeof dao_get_proposal_state_command;
|
|
1299
|
+
export declare type TDaoGetProposalStateRequest = {
|
|
1300
|
+
wallet_id: uint32;
|
|
1301
|
+
proposal_id: str;
|
|
1302
|
+
};
|
|
1303
|
+
export declare type TDaoGetProposalStateResponse = {
|
|
1304
|
+
success: True;
|
|
1305
|
+
state: ProposalState;
|
|
1306
|
+
};
|
|
1307
|
+
export declare type WsDaoGetProposalStateMessage = GetMessageType<chia_wallet_service, dao_get_proposal_state_command, TDaoGetProposalStateResponse>;
|
|
1308
|
+
export declare function dao_get_proposal_state<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoGetProposalStateRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoGetProposalStateResponse, WsDaoGetProposalStateMessage>>;
|
|
1309
|
+
export declare const dao_exit_lockup_command = "dao_exit_lockup";
|
|
1310
|
+
export declare type dao_exit_lockup_command = typeof dao_exit_lockup_command;
|
|
1311
|
+
export declare type TDaoExitLockupRequest = {
|
|
1312
|
+
wallet_id: uint32;
|
|
1313
|
+
coins: Coin[] | undefined;
|
|
1314
|
+
fee?: uint64;
|
|
1315
|
+
} & TxEndpoint;
|
|
1316
|
+
export declare type TDaoExitLockupResponse = {
|
|
1317
|
+
success: True;
|
|
1318
|
+
tx_id: bytes32;
|
|
1319
|
+
tx: TransactionRecord;
|
|
1320
|
+
};
|
|
1321
|
+
export declare type WsDaoExitLockupMessage = GetMessageType<chia_wallet_service, dao_exit_lockup_command, TDaoExitLockupResponse>;
|
|
1322
|
+
export declare function dao_exit_lockup<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoExitLockupRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoExitLockupResponse, WsDaoExitLockupMessage>>;
|
|
1323
|
+
export declare const dao_create_proposal_command = "dao_create_proposal";
|
|
1324
|
+
export declare type dao_create_proposal_command = typeof dao_create_proposal_command;
|
|
1325
|
+
export declare type TDaoCreateProposalRequest = ({
|
|
1326
|
+
wallet_id: uint32;
|
|
1327
|
+
proposal_type: "spend";
|
|
1328
|
+
additions: Array<{
|
|
1329
|
+
asset_id?: str;
|
|
1330
|
+
puzzle_hash: str;
|
|
1331
|
+
amount: uint64;
|
|
1332
|
+
}>;
|
|
1333
|
+
vote_amount?: uint64;
|
|
1334
|
+
fee?: uint64;
|
|
1335
|
+
} | {
|
|
1336
|
+
wallet_id: uint32;
|
|
1337
|
+
proposal_type: "spend";
|
|
1338
|
+
amount: uint64;
|
|
1339
|
+
inner_address: str;
|
|
1340
|
+
asset_id: str;
|
|
1341
|
+
vote_amount?: uint64;
|
|
1342
|
+
fee?: uint64;
|
|
1343
|
+
} | {
|
|
1344
|
+
wallet_id: uint32;
|
|
1345
|
+
proposal_type: "update";
|
|
1346
|
+
new_dao_rules: Partial<DAORules>;
|
|
1347
|
+
vote_amount?: uint64;
|
|
1348
|
+
fee?: uint64;
|
|
1349
|
+
} | {
|
|
1350
|
+
wallet_id: uint32;
|
|
1351
|
+
proposal_type: "mint";
|
|
1352
|
+
amount: uint64;
|
|
1353
|
+
cat_target_address: str;
|
|
1354
|
+
vote_amount?: uint64;
|
|
1355
|
+
fee?: uint64;
|
|
1356
|
+
}) & TxEndpoint;
|
|
1357
|
+
export declare type TDaoCreateProposalResponse = {
|
|
1358
|
+
success: False;
|
|
1359
|
+
error: str;
|
|
1360
|
+
} | {
|
|
1361
|
+
success: True;
|
|
1362
|
+
proposal_id: bytes32;
|
|
1363
|
+
tx_id: str;
|
|
1364
|
+
tx: TransactionRecord;
|
|
1365
|
+
};
|
|
1366
|
+
export declare type WsDaoCreateProposalMessage = GetMessageType<chia_wallet_service, dao_create_proposal_command, TDaoCreateProposalResponse>;
|
|
1367
|
+
export declare function dao_create_proposal<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoCreateProposalRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoCreateProposalResponse, WsDaoCreateProposalMessage>>;
|
|
1368
|
+
export declare const dao_vote_on_proposal_command = "dao_vote_on_proposal";
|
|
1369
|
+
export declare type dao_vote_on_proposal_command = typeof dao_vote_on_proposal_command;
|
|
1370
|
+
export declare type TDaoVoteOnProposalRequest = {
|
|
1371
|
+
wallet_id: uint32;
|
|
1372
|
+
vote_amount?: uint64;
|
|
1373
|
+
fee?: uint64;
|
|
1374
|
+
proposal_id: str;
|
|
1375
|
+
is_yes_vote: bool;
|
|
1376
|
+
} & TxEndpoint;
|
|
1377
|
+
export declare type TDaoVoteOnProposalResponse = {
|
|
1378
|
+
success: True;
|
|
1379
|
+
tx_id: bytes32;
|
|
1380
|
+
tx: TransactionRecord;
|
|
1381
|
+
};
|
|
1382
|
+
export declare type WsDaoVoteOnProposalMessage = GetMessageType<chia_wallet_service, dao_vote_on_proposal_command, TDaoVoteOnProposalResponse>;
|
|
1383
|
+
export declare function dao_vote_on_proposal<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoVoteOnProposalRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoVoteOnProposalResponse, WsDaoVoteOnProposalMessage>>;
|
|
1384
|
+
export declare const dao_parse_proposal_command = "dao_parse_proposal";
|
|
1385
|
+
export declare type dao_parse_proposal_command = typeof dao_parse_proposal_command;
|
|
1386
|
+
export declare type TDaoParseProposalRequest = {
|
|
1387
|
+
wallet_id: uint32;
|
|
1388
|
+
proposal_id: str;
|
|
1389
|
+
};
|
|
1390
|
+
export declare type TDaoParseProposalResponse = {
|
|
1391
|
+
success: True;
|
|
1392
|
+
proposal_dictionary: ParsedProposalSpend | ParsedProposalUpdate;
|
|
1393
|
+
};
|
|
1394
|
+
export declare type WsDaoParseProposalMessage = GetMessageType<chia_wallet_service, dao_parse_proposal_command, TDaoParseProposalResponse>;
|
|
1395
|
+
export declare function dao_parse_proposal<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoParseProposalRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoParseProposalResponse, WsDaoParseProposalMessage>>;
|
|
1396
|
+
export declare const dao_close_proposal_command = "dao_close_proposal";
|
|
1397
|
+
export declare type dao_close_proposal_command = typeof dao_close_proposal_command;
|
|
1398
|
+
export declare type TDaoCloseProposalRequest = {
|
|
1399
|
+
wallet_id: uint32;
|
|
1400
|
+
fee?: uint64;
|
|
1401
|
+
genesis_id?: str;
|
|
1402
|
+
self_destruct?: bool;
|
|
1403
|
+
proposal_id: str;
|
|
1404
|
+
} & TxEndpoint;
|
|
1405
|
+
export declare type TDaoCloseProposalResponse = {
|
|
1406
|
+
success: True;
|
|
1407
|
+
tx_id: bytes32;
|
|
1408
|
+
tx: TransactionRecord;
|
|
1409
|
+
};
|
|
1410
|
+
export declare type WsDaoCloseProposalMessage = GetMessageType<chia_wallet_service, dao_close_proposal_command, TDaoCloseProposalResponse>;
|
|
1411
|
+
export declare function dao_close_proposal<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoCloseProposalRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoCloseProposalResponse, WsDaoCloseProposalMessage>>;
|
|
1412
|
+
export declare const dao_free_coins_from_finished_proposals_command = "dao_free_coins_from_finished_proposals";
|
|
1413
|
+
export declare type dao_free_coins_from_finished_proposals_command = typeof dao_free_coins_from_finished_proposals_command;
|
|
1414
|
+
export declare type TDaoFreeCoinsFromFinishedProposalsRequest = {
|
|
1415
|
+
wallet_id: uint32;
|
|
1416
|
+
fee?: uint64;
|
|
1417
|
+
} & TxEndpoint;
|
|
1418
|
+
export declare type TDaoFreeCoinsFromFinishedProposalsResponse = {
|
|
1419
|
+
success: True;
|
|
1420
|
+
tx_id: bytes32;
|
|
1421
|
+
tx: TransactionRecord;
|
|
1422
|
+
};
|
|
1423
|
+
export declare type WsDaoFreeCoinsFromFinishedProposalsMessage = GetMessageType<chia_wallet_service, dao_free_coins_from_finished_proposals_command, TDaoFreeCoinsFromFinishedProposalsResponse>;
|
|
1424
|
+
export declare function dao_free_coins_from_finished_proposals<T extends TRPCAgent | TDaemon>(agent: T, data: TDaoFreeCoinsFromFinishedProposalsRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TDaoFreeCoinsFromFinishedProposalsResponse, WsDaoFreeCoinsFromFinishedProposalsMessage>>;
|
|
1184
1425
|
export declare const nft_mint_nft_command = "nft_mint_nft";
|
|
1185
1426
|
export declare type nft_mint_nft_command = typeof nft_mint_nft_command;
|
|
1186
1427
|
export declare type TNftMintNftRequest = {
|
|
@@ -1784,5 +2025,5 @@ export declare type TCrcatApprovePendingResponse = {
|
|
|
1784
2025
|
};
|
|
1785
2026
|
export declare type WsCrcatApprovePendingMessage = GetMessageType<chia_wallet_service, crcat_approve_pending_command, TCrcatApprovePendingResponse>;
|
|
1786
2027
|
export declare function crcat_approve_pending<T extends TRPCAgent | TDaemon>(agent: T, data: TCrcatApprovePendingRequest): Promise<import("../../../rpc").ErrorResponse | ResType<T, TCrcatApprovePendingResponse, WsCrcatApprovePendingMessage>>;
|
|
1787
|
-
export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCancelOffersResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TGetStrayCatsResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteUnconfirmedTransactionsResponse | TSelectCoinsResponse | TGetSpendableCoinsResponse | TGetCoinRecordsByNamesResponse | TGetCurrentDerivationIndexResponse | TExtendDerivationIndexResponse | TGetNotificationsResponse | TDeleteNotificationsResponse | TSendNotificationResponse | TSignMessageByAddressResponse | TSignMessageByIdResponse | TVerifySignatureResponse | TGetTransactionMemoResponse | TNftCalculateRoyaltiesResponse | TNftMintBulkResponse | TNftSetDidBulkResponse | TNftTransferBulkResponse | TDeleteAllKeysResponse | TSetWalletResyncOnStartupResponse | TDeleteKeyResponse | TCheckDeleteKeyResponse | TDidSetWalletNameResponse | TDidGetWalletNameResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidTransferDidResponse | TDidMessageSpendResponse | TDidGetInfoResponse | TDidFindLostDidResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetCurrentCoinInfoResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidGetMetadataResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TDidUpdateMetadataResponse | TNftMintNftResponse | TNftCountNftsResponse | TNftGetNftsResponse | TNftSetNftDidResponse | TNftGetByDidResponse | TNftGetWalletDidResponse | TNftGetWalletsWithDidsResponse | TNftSetNftStatusResponse | TNftTransferNftResponse | TNftGetInfoResponse | TNftAddUriResponse | TFarmBlockResponse | TGetTimestampForHeightResponse | TSetAutoClaimResponse | TGetAutoClaimResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletBalancesResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPushTransactionsResponse | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TSpendClawbackCoinsResponse | TGetCoinRecordsResponse | TTakeOfferResponse | TCreateNewDlResponse | TDlTrackNewResponse | TDlStopTrackingResponse | TDlLatestSingletonResponse | TDlSingletonsByRootResponse | TDlUpdateRootResponse | TDlUpdateMultipleResponse | TDlHistoryResponse | TDlOwnedSingletonsResponse | TDlGetMirrorsResponse | TDlNewMirrorResponse | TDlDeleteMirrorResponse | TVcMintResponse | TVcGetResponse | TVcGetListResponse | TVcSpendResponse | TVcAddProofsResponse | TVcGetProofsForRootResponse | TVcRevokeResponse | TCrcatApprovePendingResponse;
|
|
1788
|
-
export declare type RpcWalletMessageOnWs = WsAddKeyMessage | WsAddRateLimitedFundsMessage | WsCancelOfferMessage | WsCancelOffersMessage | WsCatGetAssetIdMessage | WsCatGetNameMessage | WsGetStrayCatsMessage | WsCatAssetIdToNameMessage | WsCatSetNameMessage | WsCatSpendMessage | WsCheckOfferValidityMessage | WsCreateNewWalletMessage | WsCreateOfferForIdsMessage | WsCreateSignedTransactionMessage | WsDeleteUnconfirmedTransactionsMessage | WsSelectCoinsMessage | WsGetSpendableCoinsMessage | WsGetCoinRecordsByNamesMessage | WsGetCurrentDerivationIndexMessage | WsExtendDerivationIndexMessage | WsGetNotificationsMessage | WsDeleteNotificationsMessage | WsSendNotificationMessage | WsSignMessageByAddressMessage | WsSignMessageByIdMessage | WsVerifySignatureMessage | WsGetTransactionMemoMessage | WsNftCalculateRoyaltiesMessage | WsNftMintBulkMessage | WsNftSetDidBulkMessage | WsNftTransferBulkMessage | WsDeleteAllKeysMessage | WsSetWalletResyncOnStartupMessage | WsDeleteKeyMessage | WsCheckDeleteKeyMessage | WsDidSetWalletNameMessage | WsDidGetWalletNameMessage | WsDidCreateAttestMessage | WsDidCreateBackupFileMessage | WsDidTransferDidMessage | WsDidMessageSpendMessage | WsDidGetInfoMessage | WsDidFindLostDidMessage | WsDidGetDidMessage | WsDidGetInformationNeededForRecoveryMessage | WsDidGetCurrentCoinInfoMessage | WsDidGetPubkeyMessage | WsDidGetRecoveryListMessage | WsDidGetMetadataMessage | WsDidRecoverySpendMessage | WsDidSpendMessage | WsDidUpdateRecoveryIdsMessage | WsDidUpdateMetadataMessage | WsNftMintNftMessage | WsNftCountNftsMessage | WsNftGetNftsMessage | WsNftSetNftDidMessage | WsNftGetByDidMessage | WsNftGetWalletDidMessage | WsNftGetWalletsWithDidsMessage | WsNftSetNftStatusMessage | WsNftTransferNftMessage | WsNftGetInfoMessage | WsNftAddUriMessage | WsFarmBlockMessage | WsGetTimestampForHeightMessage | WsSetAutoClaimMessage | WsGetAutoClaimMessage | WsGenerateMnemonicMessage | WsGetAllOffersMessage | WsGetCatListMessage | WsGetFarmedAmountMessage | WsGetHeightInfoMessage | WsGetInitialFreezePeriodMessageOfWallet | WsGetLoggedInFingerprintMessage | WsGetOfferMessage | WsGetOffersCountMessage | WsGetOfferSummaryMessage | WsGetNetworkInfoMessageOfWallet | WsGetNextAddressMessage | WsGetPrivateKeyMessage | WsGetPublicKeysMessage | WsGetSyncStatusMessage | WsGetTransactionMessage | WsGetTransactionCountMessage | WsGetTransactionsMessage | WsGetWalletBalanceMessage | WsGetWalletBalancesMessage | WsGetWalletsMessage | WsLoginMessage | WsPushTxMessageOfWallet | WsPushTransactionsMessage | WsPwJoinPoolMessage | WsPwSelfPoolMessage | WsPwAbsorbRewardsMessage | WsPwStatusMessage | WsRlSetUserInfoMessage | WsSendClawbackTransactionMessage | WsSendTransactionMessage | WsSendTransactionMultiMessage | WsSpendClawbackCoinsMessage | WsGetCoinRecordsMessage | WsTakeOfferMessage | WsCreateNewDlMessage | WsDlTrackNewMessage | WsDlStopTrackingMessage | WsDlLatestSingletonMessage | WsDlSingletonsByRootMessage | WsDlUpdateRootMessage | WsDlUpdateMultipleMessage | WsDlHistoryMessage | WsDlOwnedSingletonsMessage | WsDlGetMirrorsMessage | WsDlNewMirrorMessage | WsDlDeleteMirrorMessage | WsVcMintMessage | WsVcGetMessage | WsVcGetListMessage | WsVcSpendMessage | WsVcAddProofsMessage | WsVcGetProofsForRootMessage | WsVcRevokeMessage | WsCrcatApprovePendingMessage;
|
|
2028
|
+
export declare type RpcWalletMessage = TAddKeyResponse | TAddRateLimitedFundsResponse | TCancelOfferResponse | TCancelOffersResponse | TCatGetAssetIdResponse | TCatGetNameResponse | TGetStrayCatsResponse | TCatAssetIdToNameResponse | TCatSetNameResponse | TCatSpendResponse | TCheckOfferValidityResponse | TCreateNewWalletResponse | TCreateOfferForIdsResponse | TCreateSignedTransactionResponse | TDeleteUnconfirmedTransactionsResponse | TSelectCoinsResponse | TGetSpendableCoinsResponse | TGetCoinRecordsByNamesResponse | TGetCurrentDerivationIndexResponse | TExtendDerivationIndexResponse | TGetNotificationsResponse | TDeleteNotificationsResponse | TSendNotificationResponse | TSignMessageByAddressResponse | TSignMessageByIdResponse | TVerifySignatureResponse | TGetTransactionMemoResponse | TNftCalculateRoyaltiesResponse | TNftMintBulkResponse | TNftSetDidBulkResponse | TNftTransferBulkResponse | TDeleteAllKeysResponse | TSetWalletResyncOnStartupResponse | TDeleteKeyResponse | TCheckDeleteKeyResponse | TDidSetWalletNameResponse | TDidGetWalletNameResponse | TDidCreateAttestResponse | TDidCreateBackupFileResponse | TDidTransferDidResponse | TDidMessageSpendResponse | TDidGetInfoResponse | TDidFindLostDidResponse | TDidGetDidResponse | TDidGetInformationNeededForRecoveryResponse | TDidGetCurrentCoinInfoResponse | TDidGetPubkeyResponse | TDidGetRecoveryListResponse | TDidGetMetadataResponse | TDidRecoverySpendResponse | TDidSpendResponse | TDidUpdateRecoveryIdsResponse | TDidUpdateMetadataResponse | TDaoAdjustFilterLevelResponse | TDaoAddFundsToTreasuryResponse | TDaoGetTreasuryBalanceResponse | TDaoGetTreasuryIdResponse | TDaoGetRulesResponse | TDaoSendToLockupResponse | TDaoGetProposalsResponse | TDaoGetProposalStateResponse | TDaoExitLockupResponse | TDaoCreateProposalResponse | TDaoVoteOnProposalResponse | TDaoParseProposalResponse | TDaoCloseProposalResponse | TDaoFreeCoinsFromFinishedProposalsResponse | TNftMintNftResponse | TNftCountNftsResponse | TNftGetNftsResponse | TNftSetNftDidResponse | TNftGetByDidResponse | TNftGetWalletDidResponse | TNftGetWalletsWithDidsResponse | TNftSetNftStatusResponse | TNftTransferNftResponse | TNftGetInfoResponse | TNftAddUriResponse | TFarmBlockResponse | TGetTimestampForHeightResponse | TSetAutoClaimResponse | TGetAutoClaimResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | TGetNetworkInfoResponseOfWallet | TGetNextAddressResponse | TGetPrivateKeyResponse | TGetPublicKeysResponse | TGetSyncStatusResponse | TGetTransactionResponse | TGetTransactionCountResponse | TGetTransactionsResponse | TGetWalletBalanceResponse | TGetWalletBalancesResponse | TGetWalletsResponse | TLoginResponse | TPushTxResponseOfWallet | TPushTransactionsResponse | TPwJoinPoolResponse | TPwSelfPoolResponse | TPwAbsorbRewardsResponse | TPwStatusResponse | TRlSetUserInfoResponse | TSendClawbackTransactionResponse | TSendTransactionResponse | TSendTransactionMultiResponse | TSpendClawbackCoinsResponse | TGetCoinRecordsResponse | TTakeOfferResponse | TCreateNewDlResponse | TDlTrackNewResponse | TDlStopTrackingResponse | TDlLatestSingletonResponse | TDlSingletonsByRootResponse | TDlUpdateRootResponse | TDlUpdateMultipleResponse | TDlHistoryResponse | TDlOwnedSingletonsResponse | TDlGetMirrorsResponse | TDlNewMirrorResponse | TDlDeleteMirrorResponse | TVcMintResponse | TVcGetResponse | TVcGetListResponse | TVcSpendResponse | TVcAddProofsResponse | TVcGetProofsForRootResponse | TVcRevokeResponse | TCrcatApprovePendingResponse;
|
|
2029
|
+
export declare type RpcWalletMessageOnWs = WsAddKeyMessage | WsAddRateLimitedFundsMessage | WsCancelOfferMessage | WsCancelOffersMessage | WsCatGetAssetIdMessage | WsCatGetNameMessage | WsGetStrayCatsMessage | WsCatAssetIdToNameMessage | WsCatSetNameMessage | WsCatSpendMessage | WsCheckOfferValidityMessage | WsCreateNewWalletMessage | WsCreateOfferForIdsMessage | WsCreateSignedTransactionMessage | WsDeleteUnconfirmedTransactionsMessage | WsSelectCoinsMessage | WsGetSpendableCoinsMessage | WsGetCoinRecordsByNamesMessage | WsGetCurrentDerivationIndexMessage | WsExtendDerivationIndexMessage | WsGetNotificationsMessage | WsDeleteNotificationsMessage | WsSendNotificationMessage | WsSignMessageByAddressMessage | WsSignMessageByIdMessage | WsVerifySignatureMessage | WsGetTransactionMemoMessage | WsNftCalculateRoyaltiesMessage | WsNftMintBulkMessage | WsNftSetDidBulkMessage | WsNftTransferBulkMessage | WsDeleteAllKeysMessage | WsSetWalletResyncOnStartupMessage | WsDeleteKeyMessage | WsCheckDeleteKeyMessage | WsDidSetWalletNameMessage | WsDidGetWalletNameMessage | WsDidCreateAttestMessage | WsDidCreateBackupFileMessage | WsDidTransferDidMessage | WsDidMessageSpendMessage | WsDidGetInfoMessage | WsDidFindLostDidMessage | WsDidGetDidMessage | WsDidGetInformationNeededForRecoveryMessage | WsDidGetCurrentCoinInfoMessage | WsDidGetPubkeyMessage | WsDidGetRecoveryListMessage | WsDidGetMetadataMessage | WsDidRecoverySpendMessage | WsDidSpendMessage | WsDidUpdateRecoveryIdsMessage | WsDidUpdateMetadataMessage | WsDaoAdjustFilterLevelMessage | WsDaoAddFundsToTreasuryMessage | WsDaoGetTreasuryBalanceMessage | WsDaoGetTreasuryIdMessage | WsDaoGetRulesMessage | WsDaoSendToLockupMessage | WsDaoGetProposalsMessage | WsDaoGetProposalStateMessage | WsDaoExitLockupMessage | WsDaoCreateProposalMessage | WsDaoVoteOnProposalMessage | WsDaoParseProposalMessage | WsDaoCloseProposalMessage | WsDaoFreeCoinsFromFinishedProposalsMessage | WsNftMintNftMessage | WsNftCountNftsMessage | WsNftGetNftsMessage | WsNftSetNftDidMessage | WsNftGetByDidMessage | WsNftGetWalletDidMessage | WsNftGetWalletsWithDidsMessage | WsNftSetNftStatusMessage | WsNftTransferNftMessage | WsNftGetInfoMessage | WsNftAddUriMessage | WsFarmBlockMessage | WsGetTimestampForHeightMessage | WsSetAutoClaimMessage | WsGetAutoClaimMessage | WsGenerateMnemonicMessage | WsGetAllOffersMessage | WsGetCatListMessage | WsGetFarmedAmountMessage | WsGetHeightInfoMessage | WsGetInitialFreezePeriodMessageOfWallet | WsGetLoggedInFingerprintMessage | WsGetOfferMessage | WsGetOffersCountMessage | WsGetOfferSummaryMessage | WsGetNetworkInfoMessageOfWallet | WsGetNextAddressMessage | WsGetPrivateKeyMessage | WsGetPublicKeysMessage | WsGetSyncStatusMessage | WsGetTransactionMessage | WsGetTransactionCountMessage | WsGetTransactionsMessage | WsGetWalletBalanceMessage | WsGetWalletBalancesMessage | WsGetWalletsMessage | WsLoginMessage | WsPushTxMessageOfWallet | WsPushTransactionsMessage | WsPwJoinPoolMessage | WsPwSelfPoolMessage | WsPwAbsorbRewardsMessage | WsPwStatusMessage | WsRlSetUserInfoMessage | WsSendClawbackTransactionMessage | WsSendTransactionMessage | WsSendTransactionMultiMessage | WsSpendClawbackCoinsMessage | WsGetCoinRecordsMessage | WsTakeOfferMessage | WsCreateNewDlMessage | WsDlTrackNewMessage | WsDlStopTrackingMessage | WsDlLatestSingletonMessage | WsDlSingletonsByRootMessage | WsDlUpdateRootMessage | WsDlUpdateMultipleMessage | WsDlHistoryMessage | WsDlOwnedSingletonsMessage | WsDlGetMirrorsMessage | WsDlNewMirrorMessage | WsDlDeleteMirrorMessage | WsVcMintMessage | WsVcGetMessage | WsVcGetListMessage | WsVcSpendMessage | WsVcAddProofsMessage | WsVcGetProofsForRootMessage | WsVcRevokeMessage | WsCrcatApprovePendingMessage;
|
package/api/rpc/wallet/index.js
CHANGED
|
@@ -12,8 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.get_transaction_command = exports.get_wallet_balances = exports.get_wallet_balances_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.get_auto_claim = exports.get_auto_claim_command = exports.set_auto_claim = exports.set_auto_claim_command = exports.get_timestamp_for_height = exports.get_timestamp_for_height_command = exports.farm_block = exports.farm_block_command = exports.push_transactions = exports.push_transactions_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.set_wallet_resync_on_startup = exports.set_wallet_resync_on_startup_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
13
|
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.sign_message_by_id = exports.sign_message_by_id_command = exports.sign_message_by_address = exports.sign_message_by_address_command = exports.get_transaction_memo = exports.get_transaction_memo_command = exports.verify_signature = exports.verify_signature_command = exports.send_notification = exports.send_notification_command = exports.delete_notifications = exports.delete_notifications_command = exports.get_notifications = exports.get_notifications_command = exports.extend_derivation_index = exports.extend_derivation_index_command = exports.get_current_derivation_index = exports.get_current_derivation_index_command = exports.get_coin_records_by_names = exports.get_coin_records_by_names_command = exports.get_spendable_coins = exports.get_spendable_coins_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 = exports.get_farmed_amount_command = exports.get_transaction_count = exports.get_transaction_count_command = exports.get_coin_records = exports.get_coin_records_command = exports.spend_clawback_coins = exports.spend_clawback_coins_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 = void 0;
|
|
14
14
|
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 = 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 = void 0;
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
15
|
+
exports.nft_set_did_bulk_command = exports.nft_set_nft_did = exports.nft_set_nft_did_command = exports.nft_get_nfts = exports.nft_get_nfts_command = exports.nft_count_nfts = exports.nft_count_nfts_command = exports.nft_mint_nft = exports.nft_mint_nft_command = exports.dao_free_coins_from_finished_proposals = exports.dao_free_coins_from_finished_proposals_command = exports.dao_close_proposal = exports.dao_close_proposal_command = exports.dao_parse_proposal = exports.dao_parse_proposal_command = exports.dao_vote_on_proposal = exports.dao_vote_on_proposal_command = exports.dao_create_proposal = exports.dao_create_proposal_command = exports.dao_exit_lockup = exports.dao_exit_lockup_command = exports.dao_get_proposal_state = exports.dao_get_proposal_state_command = exports.dao_get_proposals = exports.dao_get_proposals_command = exports.dao_send_to_lockup = exports.dao_send_to_lockup_command = exports.dao_get_rules = exports.dao_get_rules_command = exports.dao_get_treasury_id = exports.dao_get_treasury_id_command = exports.dao_get_treasury_balance = exports.dao_get_treasury_balance_command = exports.dao_add_funds_to_treasury = exports.dao_add_funds_to_treasury_command = exports.dao_adjust_filter_level = exports.dao_adjust_filter_level_command = exports.did_transfer_did = exports.did_transfer_did_command = exports.did_find_lost_did = exports.did_find_lost_did_command = exports.did_get_info = exports.did_get_info_command = exports.did_message_spend = exports.did_message_spend_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 = void 0;
|
|
16
|
+
exports.dl_history_command = exports.dl_update_multiple = exports.dl_update_multiple_command = exports.dl_update_root = exports.dl_update_root_command = exports.dl_singletons_by_root = exports.dl_singletons_by_root_command = exports.dl_latest_singleton = exports.dl_latest_singleton_command = exports.dl_stop_tracking = exports.dl_stop_tracking_command = exports.dl_track_new = exports.dl_track_new_command = exports.create_new_dl = exports.create_new_dl_command = 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 = 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_mint_bulk = exports.nft_mint_bulk_command = exports.nft_calculate_royalties = exports.nft_calculate_royalties_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_transfer_bulk = exports.nft_transfer_bulk_command = exports.nft_set_did_bulk = void 0;
|
|
17
|
+
exports.crcat_approve_pending = exports.crcat_approve_pending_command = exports.vc_revoke = exports.vc_revoke_command = exports.vc_get_proofs_for_root = exports.vc_get_proofs_for_root_command = exports.vc_add_proofs = exports.vc_add_proofs_command = exports.vc_spend = exports.vc_spend_command = exports.vc_get_list = exports.vc_get_list_command = exports.vc_get = exports.vc_get_command = exports.vc_mint = exports.vc_mint_command = exports.dl_delete_mirror = exports.dl_delete_mirror_command = exports.dl_new_mirror = exports.dl_new_mirror_command = exports.dl_get_mirrors = exports.dl_get_mirrors_command = exports.dl_owned_singletons = exports.dl_owned_singletons_command = exports.dl_history = void 0;
|
|
17
18
|
exports.chia_wallet_service = "chia_wallet";
|
|
18
19
|
// # Key management
|
|
19
20
|
exports.log_in_command = "log_in";
|
|
@@ -588,6 +589,105 @@ function did_transfer_did(agent, data) {
|
|
|
588
589
|
});
|
|
589
590
|
}
|
|
590
591
|
exports.did_transfer_did = did_transfer_did;
|
|
592
|
+
// # DAO Wallet
|
|
593
|
+
exports.dao_adjust_filter_level_command = "dao_adjust_filter_level";
|
|
594
|
+
function dao_adjust_filter_level(agent, data) {
|
|
595
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
596
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_adjust_filter_level_command, data);
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
exports.dao_adjust_filter_level = dao_adjust_filter_level;
|
|
600
|
+
exports.dao_add_funds_to_treasury_command = "dao_add_funds_to_treasury";
|
|
601
|
+
function dao_add_funds_to_treasury(agent, data) {
|
|
602
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
603
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_add_funds_to_treasury_command, data);
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
exports.dao_add_funds_to_treasury = dao_add_funds_to_treasury;
|
|
607
|
+
exports.dao_get_treasury_balance_command = "dao_get_treasury_balance";
|
|
608
|
+
function dao_get_treasury_balance(agent, data) {
|
|
609
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
610
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_get_treasury_balance_command, data);
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
exports.dao_get_treasury_balance = dao_get_treasury_balance;
|
|
614
|
+
exports.dao_get_treasury_id_command = "dao_get_treasury_id";
|
|
615
|
+
function dao_get_treasury_id(agent, data) {
|
|
616
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
617
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_get_treasury_id_command, data);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
exports.dao_get_treasury_id = dao_get_treasury_id;
|
|
621
|
+
exports.dao_get_rules_command = "dao_get_rules";
|
|
622
|
+
function dao_get_rules(agent, data) {
|
|
623
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
624
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_get_rules_command, data);
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
exports.dao_get_rules = dao_get_rules;
|
|
628
|
+
exports.dao_send_to_lockup_command = "dao_send_to_lockup";
|
|
629
|
+
function dao_send_to_lockup(agent, data) {
|
|
630
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
631
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_send_to_lockup_command, data);
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
exports.dao_send_to_lockup = dao_send_to_lockup;
|
|
635
|
+
exports.dao_get_proposals_command = "dao_get_proposals";
|
|
636
|
+
function dao_get_proposals(agent, data) {
|
|
637
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_get_proposals_command, data);
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
exports.dao_get_proposals = dao_get_proposals;
|
|
642
|
+
exports.dao_get_proposal_state_command = "dao_get_proposal_state";
|
|
643
|
+
function dao_get_proposal_state(agent, data) {
|
|
644
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
645
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_get_proposal_state_command, data);
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
exports.dao_get_proposal_state = dao_get_proposal_state;
|
|
649
|
+
exports.dao_exit_lockup_command = "dao_exit_lockup";
|
|
650
|
+
function dao_exit_lockup(agent, data) {
|
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_exit_lockup_command, data);
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
exports.dao_exit_lockup = dao_exit_lockup;
|
|
656
|
+
exports.dao_create_proposal_command = "dao_create_proposal";
|
|
657
|
+
function dao_create_proposal(agent, data) {
|
|
658
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
659
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_create_proposal_command, data);
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
exports.dao_create_proposal = dao_create_proposal;
|
|
663
|
+
exports.dao_vote_on_proposal_command = "dao_vote_on_proposal";
|
|
664
|
+
function dao_vote_on_proposal(agent, data) {
|
|
665
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
666
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_vote_on_proposal_command, data);
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
exports.dao_vote_on_proposal = dao_vote_on_proposal;
|
|
670
|
+
exports.dao_parse_proposal_command = "dao_parse_proposal";
|
|
671
|
+
function dao_parse_proposal(agent, data) {
|
|
672
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
673
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_parse_proposal_command, data);
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
exports.dao_parse_proposal = dao_parse_proposal;
|
|
677
|
+
exports.dao_close_proposal_command = "dao_close_proposal";
|
|
678
|
+
function dao_close_proposal(agent, data) {
|
|
679
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
680
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_close_proposal_command, data);
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
exports.dao_close_proposal = dao_close_proposal;
|
|
684
|
+
exports.dao_free_coins_from_finished_proposals_command = "dao_free_coins_from_finished_proposals";
|
|
685
|
+
function dao_free_coins_from_finished_proposals(agent, data) {
|
|
686
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
687
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.dao_free_coins_from_finished_proposals_command, data);
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
exports.dao_free_coins_from_finished_proposals = dao_free_coins_from_finished_proposals;
|
|
591
691
|
// # NFT Wallet
|
|
592
692
|
exports.nft_mint_nft_command = "nft_mint_nft";
|
|
593
693
|
function nft_mint_nft(agent, data) {
|
package/daemon/index.js
CHANGED
|
@@ -85,7 +85,7 @@ class Daemon {
|
|
|
85
85
|
return true;
|
|
86
86
|
}
|
|
87
87
|
else if (this._connectedUrl) {
|
|
88
|
-
logger_1.getLogger().error(
|
|
88
|
+
logger_1.getLogger().error("Connection is still active. Please close living connection first");
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
91
91
|
logger_1.getLogger().debug(`Opening websocket connection to ${daemonServerURL}`);
|
package/logger.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ declare class Logger {
|
|
|
14
14
|
setLogLevel(level: TLogLevel): void;
|
|
15
15
|
shouldWrite(logLevel: TLogLevel): boolean;
|
|
16
16
|
formatMessage(level: TLogLevel, body: string): string;
|
|
17
|
-
debug(msg:
|
|
18
|
-
info(msg:
|
|
19
|
-
warning(msg:
|
|
20
|
-
error(msg:
|
|
17
|
+
debug(msg: any): void;
|
|
18
|
+
info(msg: any): void;
|
|
19
|
+
warning(msg: any): void;
|
|
20
|
+
error(msg: any): void;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
package/logger.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLogger = exports.setLogLevel = exports.getLogLevel = void 0;
|
|
4
4
|
const logPriority = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
none: 9999,
|
|
6
|
+
error: 4,
|
|
7
|
+
warning: 3,
|
|
8
|
+
info: 2,
|
|
9
|
+
debug: 1,
|
|
10
10
|
};
|
|
11
11
|
class ConsoleWriter {
|
|
12
12
|
write(message) {
|
|
@@ -18,6 +18,42 @@ function getLogLevel() { return currentLogLevel; }
|
|
|
18
18
|
exports.getLogLevel = getLogLevel;
|
|
19
19
|
function setLogLevel(logLevel) { return currentLogLevel = logLevel; }
|
|
20
20
|
exports.setLogLevel = setLogLevel;
|
|
21
|
+
function stringify(obj, indent) {
|
|
22
|
+
if (typeof obj === "string") {
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
else if (typeof obj === "number") {
|
|
26
|
+
return `${obj}`;
|
|
27
|
+
}
|
|
28
|
+
else if (typeof obj === "boolean") {
|
|
29
|
+
return `${obj}`;
|
|
30
|
+
}
|
|
31
|
+
else if (typeof obj === "bigint") {
|
|
32
|
+
return `${obj}`;
|
|
33
|
+
}
|
|
34
|
+
else if (typeof obj === "symbol") {
|
|
35
|
+
return obj.toString();
|
|
36
|
+
}
|
|
37
|
+
else if (typeof obj === "undefined") {
|
|
38
|
+
return "undefined";
|
|
39
|
+
}
|
|
40
|
+
else if (typeof obj === "function") {
|
|
41
|
+
return "[Function]";
|
|
42
|
+
}
|
|
43
|
+
const seen = new WeakSet();
|
|
44
|
+
return JSON.stringify(obj, (k, v) => {
|
|
45
|
+
if (typeof v === "object" && v !== null) {
|
|
46
|
+
if (seen.has(v)) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
seen.add(v);
|
|
50
|
+
}
|
|
51
|
+
else if (typeof v === "bigint") {
|
|
52
|
+
return `${v}n`;
|
|
53
|
+
}
|
|
54
|
+
return v;
|
|
55
|
+
}, indent);
|
|
56
|
+
}
|
|
21
57
|
const loggers = {};
|
|
22
58
|
function getLogger(writer) {
|
|
23
59
|
const w = writer || "console";
|
|
@@ -56,22 +92,22 @@ class Logger {
|
|
|
56
92
|
}
|
|
57
93
|
debug(msg) {
|
|
58
94
|
if (this.shouldWrite("debug")) {
|
|
59
|
-
this._writer.write(this.formatMessage("debug", msg));
|
|
95
|
+
this._writer.write(this.formatMessage("debug", stringify(msg)));
|
|
60
96
|
}
|
|
61
97
|
}
|
|
62
98
|
info(msg) {
|
|
63
99
|
if (this.shouldWrite("info")) {
|
|
64
|
-
this._writer.write(this.formatMessage("info", msg));
|
|
100
|
+
this._writer.write(this.formatMessage("info", stringify(msg)));
|
|
65
101
|
}
|
|
66
102
|
}
|
|
67
103
|
warning(msg) {
|
|
68
104
|
if (this.shouldWrite("warning")) {
|
|
69
|
-
this._writer.write(this.formatMessage("warning", msg));
|
|
105
|
+
this._writer.write(this.formatMessage("warning", stringify(msg)));
|
|
70
106
|
}
|
|
71
107
|
}
|
|
72
108
|
error(msg) {
|
|
73
109
|
if (this.shouldWrite("error")) {
|
|
74
|
-
this._writer.write(this.formatMessage("error", msg));
|
|
110
|
+
this._writer.write(this.formatMessage("error", stringify(msg)));
|
|
75
111
|
}
|
|
76
112
|
}
|
|
77
113
|
}
|
package/package.json
CHANGED
|
File without changes
|