UNPKG

chia-agent

Version:
804 lines (761 loc) 136 kB
# Changelog ## [20.0.0] ### Breaking change - Fixed unsound `int` typing on numeric fields that can exceed `Number.MAX_SAFE_INTEGER` (`2^53 - 1`) - The RPC JSON parser (`@chiamine/json-bigint`, `alwaysParseAsBig: false`) returns a `BigInt` for any integer above `2^53 - 1` (≈ 9,007 XCH expressed in mojos). Fields that are `uint64` upstream had been typed `int` (= `number`), which hid that a `BigInt` can be returned and could mistype values at runtime. - Retyped these fields from `int` to `uint64` (= `number | bigint`), matching upstream and the parser's actual behavior. To read one as a `bigint`, just wrap it with the built-in `BigInt(x)` — it accepts both `number` and `bigint`, so no `typeof` branching is needed (`alwaysParseAsBig` stays `false`, so small fields like heights/ids/counts remain plain `number`). - Response fields affected: - `get_farmed_amount`: `farmed_amount`, `pool_reward_amount`, `farmer_reward_amount`, `fee_amount` - `get_offer_summary`: `fees`; `TradeRecord`: `fees`, `pending` (`Record<str, uint64>`) - `get_blockchain_state`: `mempool_fees`, `mempool_max_total_cost`, `block_max_cost`, `node_time_utc`, `last_block_cost` - Full Node WS mempool broadcast: `mempool_cost`, `mempool_max_total_cost`, `block_max_cost`, `transaction_generator_size_bytes` - Data Layer: `total_bytes` - Harvester `Plot`: `file_size`, `time_modified`; plot-sync: `total_plot_size`, `total_effective_plot_size` - Connection info: `bytes_read`, `bytes_written` - Request fields affected (now accept `number | bigint`): - `send_transaction` `amount`, `create_new_wallet` (DID) `amount`, `fee`, and `create_offer_for_ids` `offer` values (`Record<str, str | uint64>`) - Corrected `TradeRecord` `summary.offered` / `summary.requested` from `Record<str, int>` to `Record<str, str>` - These offer amounts are serialized as **strings** on the wire (since chia-blockchain 2.6.0, like `get_offer_summary`); they had been mistyped as numbers. (Not a `BigInt` issue — a string-vs-number fix.) ## [19.2.0] Support for [`chia-blockchain@2.7.1`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.7.1) ### Added - New Wallet RPC API [`get_puzzle_and_solution`](./src/api/rpc/wallet/README.md#get_puzzle_and_solutionagent-params) - exported as `get_puzzle_and_solution_of_wallet` from `chia-agent/api/rpc` (the Full Node RPC API of the same name keeps the plain export) - `get_height_info` - New optional request parameter `use_peak_height` - Response now includes `latest_timestamp`, `is_transaction_block` and `prev_transaction_block_height` - `CoinSelectionConfig`: new optional `included_coin_ids` and `primary_coin` request fields, accepted by all transaction endpoints as well as `select_coins` and `get_spendable_coins` - New optional `allow_unsynced` request field on all transaction endpoints, `select_coins`, `get_spendable_coins` and `get_coin_records_by_names` - All transaction endpoint responses now include `sync_status` (`0=SYNCED, 1=SLIGHTLY_BEHIND, 2=LONG_SYNC, 3=DISCONNECTED`) ### Changed - Synchronized with `chia_rs@0.42.1` (no type definition changes were required) - Several integer fields were widened from `uint16` to `uint32` upstream (`get_transaction_count.count`, `get_offers_count` counters, `nft_set_did_bulk` / `nft_transfer_bulk` `tx_num`, `nft_mint_bulk` `mint_number_start` / `mint_total`, `get_all_offers` `start` / `end`) - `get_height_info` now sends its request body (previously the optional request object was ignored) - Removed `chia/consensus/cost_calculator` to match chia-blockchain 2.7.1, which deleted `chia/consensus/cost_calculator.py` - The `NPCResult` type it held moved to `chia/types/mempool_item` (its only consumer); import it from there instead of `chia-agent/api/chia/consensus/cost_calculator` - Corrected the mempool `npc_result` field name from `error` to `Error` to match the wire - Relocated `CoinRecord` / `CoinRecordBackwardCompatible` from `chia/types/coin_record` to `chia_rs/chia-protocol/coin_record`, reflecting that `CoinRecord` moved into `chia_rs` upstream (chia-blockchain deleted `chia/types/coin_record.py` in 2.6.0). The type shape is unchanged; only the import path changed (`chia-agent/api/chia_rs/chia-protocol/coin_record`) ## [19.1.0] Support for [`chia-blockchain@2.7.0`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.7.0) ### Added - Remote Wallet support (introduced in chia-blockchain 2.7.0) - New Wallet RPC API [`register_remote_coins`](./src/api/rpc/wallet/README.md#register_remote_coinsagent-params) - `create_new_wallet` now accepts `wallet_type: "remote_wallet"` (with optional `name`) - `WalletType`: added `REMOTE: 205` ### Changed - Synchronized with `chia_rs@0.41.1` (no type definition changes were required) ## [19.0.0] Support for [`chia-blockchain@2.6.1`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.6.1) ### Breaking change - `ProofOfSpace` type was updated for v2 proof-of-space (follows `chia_rs@0.38.2`) - Added `version`, `plot_index`, `meta_group` and `strength` fields (between `plot_public_key` and `size`) - `size` now only carries the v1 k-size (0 for v2 proofs) - This affects every RPC response embedding a `ProofOfSpace` (e.g. block records) - `PartialProof`: `proof_fragments` was renamed to `fragments` (now 16 entries; follows `chia_rs@0.38.2`) ### Added - Structured RPC errors (added in chia-blockchain 2.6.1) - RPC error responses now always include `structuredError: {code, message, data}` (and `traceback` on the HTTP RPC path) - `RpcError` now exposes a `structuredError` property - Added `TStructuredError` and `TRpcErrorCode` types - `create_signed_transaction`: new optional request parameters `extra_delta`, `tail_reveal`, `tail_solution` (must be specified together) and `puzzle_decorator` - [Harvester Protocol](./src/api/chia/protocols/harvester_protocol.ts) - `PartialProofsData`: added `plot_index` and `meta_group` ### Changed - Synchronized `chia_rs` type definitions with `chia_rs@0.38.2` - `nft_mint_nft`: upstream reverted the `royalty_amount` rename back to `royalty_percentage` (chia-agent already used `royalty_percentage`; no type change) - `take_offer`: the `sign` request parameter is now ignored by the wallet (signing is handled internally) - `did_find_lost_did`: `latest_coin_id` now echoes the requested coin id ## [18.0.0] Support for [`chia-blockchain@2.6.0`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.6.0) ### Breaking change - `create_new_wallet` - The response `type` is now the `WalletType` name string (`"CAT"`, `"DECENTRALIZED_ID"`, `"NFT"`, `"POOLING_WALLET"`) instead of the integer enum value - Pool wallet `mode: "recovery"` was removed - Pool wallet response now includes `type` - `asset_id`, `coin_name`, `newpuzhash`, `pubkey`, `launcher_id` and `p2_singleton_puzzle_hash` in responses are now `0x`-prefixed hex - The `{success: false, error: "invalid request"}` success-path variant was removed (invalid requests now produce a standard RPC error response) - `get_offer_summary` - `summary.offered` / `summary.requested` amounts are now JSON strings (were numbers) - `additions` / `removals` are now `0x`-prefixed hex - DataLayer offer summaries are now typed as `TDataLayerOfferSummary` - `create_signed_transaction` / `send_transaction_multi` - Per-announcement `morph_bytes` was removed; only the top-level `morph_bytes` is applied - All transaction endpoints now require a fully synced wallet (may fail with `"Wallet needs to be fully synced before making transactions."`) - `split_coins` with `number_of_coins == 0` and `combine_coins` with `number_of_coins < 2` now error ### Added - [Harvester Protocol](./src/api/chia/protocols/harvester_protocol.ts) - `PartialProofsData`: `partial_proofs` is now `PartialProof[]`; added `strength` and `plot_id` - `Plot`: added `compression_level`; for v2 plots `size` now encodes `0x80 | strength` - [Solver Protocol](./src/api/chia/protocols/solver_protocol.ts) - `SolverInfo` is now `{partial_proof: PartialProof, plot_id, strength, size}` - `SolverResponse.partial_proof` is now `PartialProof` - Added `PartialProof` type (mirrors `chia_rs`) ### Changed - Synchronized `chia_rs` type definitions with `chia_rs@0.35.2` - `SubEpochSummary`: added `challenge_merkle_root` - `RewardChainBlock`: added `header_mmr_root` - `create_offer_for_ids`: `offer` dictionary values are canonically strings now (`Record<str, str | int>`) - `get_transactions`: `start` / `end` widened to `uint32` - `get_all_offers`: `start` / `end` are now bounded to `uint16` ## [17.0.0] Support for [`chia-blockchain@2.5.7`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.5.7) ### Breaking change - The following deprecated DID Wallet RPC APIs were removed (removed in chia-blockchain 2.5.7): - `did_update_recovery_ids` - `did_recovery_spend` - `did_get_recovery_list` - `did_create_attest` - `did_get_information_needed_for_recovery` - `TransactionRecord` wire format changed (chia-blockchain 2.5.7 now serializes transaction records with plain `to_json_dict()`; the previous "convenience" format was removed) - `memos` is now `Record<str, bytes[]>` (`{"0x<coin_id>": ["0x<memo>", ...]}`), previously `Array<[bytes32, bytes[]]>` - `to_address` is now a regular field of `TransactionRecord` - `TransactionRecordConvenience` and `TransactionRecordConvenienceWithMetadata` are deprecated aliases of `TransactionRecord` and the new `TransactionRecordWithMetadata` - [`get_block_spends_with_conditions`](./src/api/rpc/full_node/README.md#get_block_spends_with_conditionsagent-params) - `conditions` are now serialized as `Array<[opcode: int, args: bytes[]]>` instead of `{opcode, vars}` objects - `create_new_wallet` with `wallet_type: "did_wallet"` and `did_type: "new"` no longer accepts `backup_dids` / `num_of_backup_ids_needed` - `cat_spend`: `extra_delta` is now `str` (was `int`) - Wallet responses of `get_wallets` / `get_wallet_balance(s)` now always include previously-omitted keys (`fingerprint`, `asset_id`, `pending_approval_balance`, `authorized_providers`, `flags_needed`) with `null` defaults, and serialize `bytes`-like values as `0x`-prefixed hex ### Added - New `solver` RPC service support (introduced in chia-blockchain 2.5.7) - [`get_state`](./src/api/rpc/solver/README.md#get_stateagent) - `RPCAgent` now accepts `service: "solver"` - `chia_solver` was added to daemon `TService` - New Farmer RPC API [`connect_to_solver`](./src/api/rpc/farmer/README.md#connect_to_solveragent-params) - `add_key`: new optional `label` request parameter - `get_farmed_amount`: new optional `include_pool_rewards` request parameter - [Harvester Protocol](./src/api/chia/protocols/harvester_protocol.ts): added `PartialProofsData` - New [Solver Protocol](./src/api/chia/protocols/solver_protocol.ts): `SolverInfo`, `SolverResponse` - `NodeType`: added `SOLVER = 8` ### Changed - Synchronized `chia_rs` type definitions with `chia_rs@0.30.0` - `SpendConditions`: added `fingerprint` - `SpendBundleConditions`: added `num_atoms`, `num_pairs`, `heap_size` - `send_notification`: `amount` is now optional (defaults to 0) - `spend_clawback_coins`: `batch_size` is now optional `uint16` - `get_transactions`: `start` / `end` are now `uint16` - `get_next_address`: `new_address` is now optional - `cat_asset_id_to_name`: unknown asset ids now resolve to `{wallet_id: null, name: null}` instead of an error - `verify_signature`: `error` key is now always present (`null` on success) ## [16.1.6] ### Security - Hardened the supply chain against compromised dependency releases - All dependencies and devDependencies are now pinned to exact versions - Added `minimumReleaseAge: 10080` (7 days) pnpm setting so newly published package versions are not installed until they have aged, mitigating hijacked-release attacks - GitHub Actions are now pinned to full commit SHAs ### Changed - Confirmed compatibility with [`chia-blockchain@2.5.6`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.5.6) - chia-blockchain 2.5.6 does not introduce any RPC/Websocket API changes. The only protocol-level change (`NewSignagePointHarvester2`) is a farmer-harvester internal network message which is not part of the API surface covered by chia-agent. ## [16.1.5] ### Fixed - Added missing `create_block_generator` to the Full Node RPC API - Fixed CHIP-0029 response typing by discriminating `TXEndpointRequest` variants ## [16.1.4] ### Fixed - Fixed `TGetCoinRecordsByPuzzleHashesRequest` type definition - Made `start_height`, `end_height`, and `include_spent_coins` optional parameters ## [16.1.3] ### Fixed - RPC failures now reject with a typed `RpcError` instead of a raw response object ## [16.1.2] ### Fixed - Fixed `TGetCoinRecordsByPuzzleHashRequest` type definition - Made `start_height`, `end_height`, and `include_spent_coins` optional parameters ## [16.1.1] ### Fixed - Fixed incorrect response type for [`get_auto_farming`](./src/api/rpc/full_node/README.md#get_auto_farmingagent) - corrected from `{new_peak_height: uint64; success: bool}` to `{auto_farm_enabled: bool; success: bool}` ## [16.1.0] ### Added - [Farmer Protocol](./src/api/chia/protocols/farmer_protocol.ts) - `sp_source_data` to `NewSignagePoint` - `include_signature_source_data` to `DeclareProofOfSpace` - `rc_block_unfinished` to `RequestSignedValues` ### Internal Changes - Migrated multiple protocol/types to `chia_rs` sources: - `ProofOfSpace`, `PoolTarget`, `Foliage`, `FoliageTransactionBlock` - `RewardChainBlockUnfinished`, `ChallengeChainSubSlot`, `RewardChainSubSlot` - `EndOfSubSlotBundle`, `SpendBundle`, `CoinSpend` - All are now imported from `./src/api/chia_rs/chia-protocol/*` - Moved `NodeType` to [`./src/api/chia/protocols/outbound_message.ts`](./src/api/chia/protocols/outbound_message.ts) - Moved `owned_conditions.ts` from `./src/api/chia_rs/chia-consensus/gen/` to `./src/api/chia_rs/chia-consensus/` - Removed legacy python-derived type definitions in favor of `chia_rs`: - `./src/api/chia/consensus/block_record.ts` - `./src/api/chia/types/blockchain_format/proof_of_space.ts` - `./src/api/chia/types/blockchain_format/slots.ts` - `./src/api/chia/types/blockchain_format/sub_epoch_summary.ts` - `./src/api/chia/types/end_of_slot_bundle.ts` - `./src/api/chia/types/full_block.ts` - `./src/api/chia/types/spend_bundle.ts` - `./src/api/chia/types/spend_bundle_condition.ts` - `./src/api/chia/types/unfinished_block.ts` ## [16.0.2] ### Fixed - Fixed logging issues where it crashes upon stringifying an object with circular references ## [16.0.1] ### Fixed - Fixed an issue where it exhausts heap when logging an object with circular references ## [16.0.0] ### Breaking change - Changed `daemon.connect()` API signature from `connect(url?, timeoutMs?)` to `connect(url?, options?)` - All connection options are now consolidated into a single `options` parameter - Existing code calling `connect()` without parameters remains compatible ### Changed - Improved logger system - Added logger instance caching - Added support for multiple loggers with per-instance configuration - Added `NullWriter` for complete log suppression - Updated `ConsoleWriter` to use proper console methods - Added `trace` log level - Added environment variable support: `LOG_LEVEL` and `LOG_SUPPRESS` - Refactored API to use named loggers - Added customizable log formatting with built-in formatters - Auto-reconnection is now enabled by default ### Fixed - Fixed WebSocket message handling issues - Added timeout handling for sent messages (default 30s) - Fixed connection state check to use actual WebSocket readyState - Preserved event listeners on connection close for reconnection support - Added proper cleanup of message timeouts on response - Fixed RPC agent to properly handle HTTP connections with explicit host/port ### Added - Added automatic retry/reconnection mechanism for WebSocket connection attempts - Exponential backoff with configurable parameters - Configurable retry parameters (maxAttempts, initialDelay, maxDelay, backoffMultiplier) - Automatic re-subscription to services after reconnection - Same retry configuration applies to both initial connection and reconnection ### Internal change - Removed `TDestination` type in favor of Writer-based approach ## [15.0.0] ### Breaking change - The following Wallet RPC APIs for DAO were removed - dao_get_proposals - dao_create_proposal - dao_parse_proposal - dao_vote_on_proposal - dao_get_treasury_balance - dao_get_treasury_id - dao_get_rules - dao_close_proposal - dao_exit_lockup - dao_adjust_filter_level - dao_add_funds_to_treasury - dao_send_to_lockup - dao_get_proposal_state - dao_free_coins_from_finished_proposals - DAO wallet can no longer be created - `DAO` and `DAO_CAT` were removed from [`WalletType`](./src/api/chia/wallet/util/wallet_types.ts) ### Internal change - Upgraded eslint to v9 - Moved the definitions of `sized_ints` and `sized_bytes` under `chia_rs` - Updated the minimal Node.js support to 20 ## [14.5.0] ### Changed - Added error logs - [Wallet RPC API](./src/api/rpc/wallet) - Added CHIP-0029 support for the following Wallet RPC APIs - [`set_wallet_resync_on_startup`](./src/api/rpc/wallet/README.md#set_wallet_resync_on_startupagent-params) - [`get_sync_status`](./src/api/rpc/wallet/README.md#get_sync_statusagent) - [`get_height_info`](./src/api/rpc/wallet/README.md#get_height_infoagent) - [`push_tx`](./src/api/rpc/wallet/README.md#push_txagent-params) - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params) - [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#get_timestamp_for_heightagent) - [`set_auto_claim`](./src/api/rpc/wallet/README.md#set_auto_claimagent-params) - [`get_auto_claim`](./src/api/rpc/wallet/README.md#get_auto_claimagent-params) - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params) - [`vc_get`](./src/api/rpc/wallet/README.md#vc_getagent-params) - [`vc_get_list`](./src/api/rpc/wallet/README.md#vc_get_listagent-params) - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params) - [`vc_add_proofs`](./src/api/rpc/wallet/README.md#vc_add_proofsagent-params) - [`vc_get_proofs_for_root`](./src/api/rpc/wallet/README.md#vc_get_proofs_for_rootagent-params) - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params) - [`vc_get_list`](./src/api/rpc/wallet/README.md#vc_get_listagent-params) - Changed the response type of `proofs` - [`vc_add_proofs`](./src/api/rpc/wallet/README.md#vc_add_proofsagent-params) - Changed the request type - [`vc_get_proofs_for_root`](./src/api/rpc/wallet/README.md#vc_get_proofs_for_rootagent-params) - Changed the response type - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params) - Removed `signing_responses` from the response properties. - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params) - Removed `signing_responses` from the response properties. - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params) - Removed `signing_responses` from the response properties. - Add the following properties to `SpendBundleConditions` - `validated_signature` - `execution_cost` - `condition_cost` ### Added - [New Common RPC API](./src/api/rpc/common) - [`get_log_level`](./src/api/rpc/common/README.md#get_log_levelagent) - [`set_log_level`](./src/api/rpc/common/README.md#set_log_levelagent-params) - [`reset_log_level`](./src/api/rpc/common/README.md#reset_log_levelagent) ### Fixed - [`get_timestamp_for_height`](./src/api/rpc/wallet/README.md#get_timestamp_for_heightagent) - Fixed a missing request param - [`vc_get`](./src/api/rpc/wallet/README.md#vc_getagent-params) - Fixed the response type to `Optional<VCRecord>` from `VCRecord | None`. - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params) - Each element of `transactions` in the request can be `TransactionRecord` - Fixed the type of [`TransactionEndpointResponseCHIP0029`](./src/api/chia/rpc/wallet_request_types.ts) - Fixed a typo: `VersionBlob` -> `VersionedBlob` - Fixed incorrect type of [`WalletCoinRecordWithMetadata`](./src/api/chia/wallet/wallet_coin_record.ts) ## [14.4.0] ### Changed - Updated npm dependencies - `ws` to 8.18.0 from 8.17.0 - `@types/ws` to 8.5.12 from 8.5.10 - Changed the response type of `spend_bundle` for some Wallet RPC API to `WalletSpendBundle` from `SpendBundle`. (Currently `WalletSpendBundle` is equivalent to `SpendBundle`) - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params) - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params) - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params) - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params) - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params) - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params) - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params) - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params) - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params) - [`log_in`](./src/api/rpc/wallet/README.md#log_inagent-params) - Changed the type of `fingerprint` request/response properties to `uint32` from `int` - [`get_logged_in_fingerprint`](./src/api/rpc/wallet/README.md#get_logged_in_fingerprintagent) - Changed the type of `fingerprint` response properties to `uint32` from `int` - [`get_public_keys`](./src/api/rpc/wallet/README.md#get_public_keysagent) - Made response type of `public_key_fingerprints` optional and `uint32[]` - [`get_private_key`](./src/api/rpc/wallet/README.md#get_private_keyagent-params) - Dropped one of the possible response type where its `success` property is `False`. - [`add_key`](./src/api/rpc/wallet/README.md#add_keyagent-params) - Dropped one of the possible response type where its `success` property is `False`. - Changed the type of `fingerprint` response properties to `uint32` from `int` - [`delete_key`](./src/api/rpc/wallet/README.md#delete_keyagent-params) - Changed the type of `fingerprint` request properties to `uint32` from `int` - [`check_delete_key`](./src/api/rpc/wallet/README.md#check_delete_keyagent-params) - Changed the type of `fingerprint` request/response properties to `uint32` from `int` - Changed the type of `max_ph_to_search` request properties to `uint32?` from `int?` - [`delete_all_keys`](./src/api/rpc/wallet/README.md#delete_all_keysagent) - Dropped one of the possible response type where its `success` property is `False`. - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params) - Added `TXEndpointRequest` to request - Removed `sign` request property - Added `fee` request property - [`select_coins`](./src/api/rpc/wallet/README.md#select_coinsagent-params) - `CoinSelectionConfigLoader` was replaced by `TXConfigLoader` - [`dl_owned_singletons`](./src/api/rpc/wallet/README.md#dl_owned_singletonsagent-params) - Added error response - Updated the type of `spend_bundle` in [`TransactionRecordOld`](./src/api/chia/wallet/transaction_record.ts) to `WalletSpendBundle` from `SpendBundle` - Renamed `Spend` to [`SpendConditions`](./src/api/chia_rs/chia-consensus/gen/owned_conditions.ts) ### Removed - Removed document of `get_initial_freeze_period` (Wallet/FullNode RPC API) since it was removed in `chia-blockchain@2.4.4` ### Added - [New Wallet RPC API](./src/api/rpc/wallet) - [`split_coins`](./src/api/rpc/wallet/README.md#split_coinsagent-params) - [`combine_coins`](./src/api/rpc/wallet/README.md#combine_coinsagent-params) ### Fixed - Fixed `dao_rules` property was set [unknown](./src/api/chia/wallet/dao_wallet/dao_wallet.ts). (`unknown` -> `DAORules`) - Fixed missing types in [`ParsedProposalSpend`](./src/api/chia/wallet/dao_wallet/dao_wallet.ts) ## [14.3.3] ### Changed - The default service name which [`Daemon`](./src/daemon/index.ts) client tries to register is now `wallet_ui`. Previously `chia_agent` service and optionally `wallet_ui` service were registered to `chia-blockchain`'s `Daemon`. ## [14.3.2] ### Changed - Error logs are generated when - an error occurs during sending a message. - it receives a websocket message with unexpected format. - Debug logs are generated when ping/pong events are triggered. ## [14.3.1] ### Changed - Added a `Host` header when sending https request to a remote host. ## [14.3.0] ### Changed - Removed `RpcWalletMessageOnWs` since it's costly to maintain while there are a few use cases. - Enhanced type resolutions on Wallet RPC APIs with `TXEndpointRequest` ### Removed - Removed deprecated `TCreate_New_RL_WalletRequest` and `TCreate_New_RL_WalletResponse` ### Added - [New Wallet RPC API](./src/api/rpc/wallet) - [`execute_signing_instructions`](./src/api/rpc/wallet/README.md#execute_signing_instructionsagent-params) - [New Common RPC API](./src/api/rpc/common) - [`get_version`](./src/api/rpc/common/README.md#get_versionagent) - New property `translation` was added to [`Marshall`](./src/api/chia/rpc/util.ts). As a result of this addition, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected. - [`gather_signing_info`](./src/api/rpc/wallet/README.md#gather_signing_infoagent-params) - [`apply_signatures`](./src/api/rpc/wallet/README.md#apply_signaturesagent-params) - [`submit_transactions`](./src/api/rpc/wallet/README.md#submit_transactionsagent-params) - `translation` and `merge_spends` were added to [`TXEndpointRequest`](./src/api/chia/rpc/util.ts) As a result of this addition, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected. - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params) - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params) - [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params) - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params) - [`send_notification`](./src/api/rpc/wallet/README.md#send_notificationagent-params) - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params) - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params) - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params) - [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params) - [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params) - [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params) - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params) - [`did_create_attest`](./src/api/rpc/wallet/README.md#did_create_attestagent-params) - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params) - [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params) - [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params) - [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params) - [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params) - [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params) - [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params) - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params) - [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params) - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params) - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params) - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params) - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params) - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params) - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params) - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params) - [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params) - [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params) - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params) - [`create_new_dl`](./src/api/rpc/wallet/README.md#create_new_dlagent-params) - [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params) - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params) - [`dl_new_mirror`](./src/api/rpc/wallet/README.md#dl_new_mirroragent-params) - [`dl_delete_mirror`](./src/api/rpc/wallet/README.md#dl_delete_mirroragent-params) - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params) - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params) - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params) - [`crcat_approve_pending`](./src/api/rpc/wallet/README.md#crcat_approve_pendingagent-params) ### Fixed - Added missing `reason` response property to [`did_recovery_spend`](./src/api/rpc/wallet/README.md#did_recovery_spendagent-params) ## [14.2.2] ### Changed - For the log which is output when `success` property in API response is `false`, the log level is now `INFO` instead of `ERROR`. ## [14.2.1] ### Changed - [`daemon.connect()`](./src/daemon/README.md#daemonconnecturl-string-timeoutms-number) now returns a rejected promise on failure instead of throwing an uncaught exception - [`daemon.connect()`](./src/daemon/README.md#daemonconnecturl-string-timeoutms-number) now accepts connection timeout in milliseconds. ## [14.2.0] ### Note - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params) - The request parameters `kc_user` and `kc_service` is temporarily not working with `2.4.0` and `2.4.1` of `chia-blockchain`. (`2.4.2` fixed this issue) This is a bug and not spec change so `chia-agent` stays to be able to set those params for now. ### Changed - Reorganized directory structure under `src/api/` in order to make it clear the dependencies from `chia_rs`/`pool_reference` - [Daemon WebSocket API](./src/api/ws/daemon) - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params) - Added a `private` request parameter - [Common RPC API](./src/api/rpc/common) - [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent) - Added a `genesis_challenge` response parameter - [`Mirror`](./src/api/chia/data_layer/data_layer_wallet.ts) now has new `confirmed_at_height` property. As a result of this addition, [`dl_get_mirrors`](./src/api/rpc/wallet/README.md#dl_get_mirrorsagent-params) is affected. - [`PoolWalletInfo`](./src/api/chia/pools/pool_wallet_info.ts)'s `current_inner` property was removed. As a result of this removal, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected. - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params) - [`pw_status`](./src/api/rpc/wallet/README.md#pw_statusagent-params) - `CHIP-0029` and `sign` request params were added to [`TXEndpointRequest`](./src/api/chia/rpc/util.ts). Plus, `unsigned_transactions` and `signing_responses` were added to responses of TxEndpoint APIs. As a result of these additions, the following [Wallet RPC API](./src/api/rpc/wallet)s are affected. - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params) - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params) - [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params) - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params) - [`send_notification`](./src/api/rpc/wallet/README.md#send_notificationagent-params) - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params) - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params) - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params) - [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params) - [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params) - [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params) - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params) - [`did_create_attest`](./src/api/rpc/wallet/README.md#did_create_attestagent-params) - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params) - [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params) - [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params) - [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params) - [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params) - [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params) - [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params) - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params) - [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params) - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params) - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params) - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params) - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params) - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params) - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params) - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params) - [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params) - [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params) - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params) - [`create_new_dl`](./src/api/rpc/wallet/README.md#create_new_dlagent-params) - [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params) - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params) - [`dl_new_mirror`](./src/api/rpc/wallet/README.md#dl_new_mirroragent-params) - [`dl_delete_mirror`](./src/api/rpc/wallet/README.md#dl_delete_mirroragent-params) - [`vc_mint`](./src/api/rpc/wallet/README.md#vc_mintagent-params) - [`vc_spend`](./src/api/rpc/wallet/README.md#vc_spendagent-params) - [`vc_revoke`](./src/api/rpc/wallet/README.md#vc_revokeagent-params) - [`crcat_approve_pending`](./src/api/rpc/wallet/README.md#crcat_approve_pendingagent-params) - [FullNode RPC API](./src/api/rpc/full_node) - `TFarmBlockFullNodeRequest`, `TFarmBlockFullNodeResponse` and `farm_block_fullnode` are now `TFarmBlockRequest`, `TFarmBlockResponse` and `farm_block` - [Wallet RPC API](./src/api/rpc/wallet) - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params) - Added `sign` request parameter - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params) - Added `fee` optional request parameter - Removed `tx_records` from response ### Added - [New Daemon WebSocket API](./src/api/ws/daemon) - [`add_key`](./src/api/ws/daemon/README.md#add_keydaemon-params) - [New DataLayer RPC API](./src/api/rpc/data_layer) - [`multistore_batch_update`](./src/api/rpc/data_layer/README.md#multistore_batch_updateagent-params) - [`submit_all_pending_roots`](./src/api/rpc/data_layer/README.md#submit_all_pending_rootsagent-params) - [New FullNode WebSocket API](./src/api/ws/full_node) - [`unfinished_block`](./src/api/ws/full_node/README.md#on_unfinished_block) - [New Wallet RPC API](./src/api/rpc/wallet) - [`gather_signing_info`](./src/api/rpc/wallet/README.md#gather_signing_infoagent-params) - [`apply_signatures`](./src/api/rpc/wallet/README.md#apply_signaturesagent-params) - [`submit_transactions`](./src/api/rpc/wallet/README.md#submit_transactionsagent-params) ### Removed - [Wallet RPC API](./src/api/rpc/wallet) - `farm_block` ### Fixed - [Daemon WebSocket API](./src/api/ws/daemon) - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params) - Added missing `fingerprint` response property - [`add_private_key`](./src/api/ws/daemon/README.md#add_private_keydaemon-params) - [`check_keys`](./src/api/ws/daemon/README.md#check_keysdaemon-params) - [`delete_all_keys`](./src/api/ws/daemon/README.md#delete_all_keysdaemon-params) - [`delete_key_by_fingerprint`](./src/api/ws/daemon/README.md#delete_key_by_fingerprintdaemon-params) - [`get_all_private_keys`](./src/api/ws/daemon/README.md#get_all_private_keysdaemon-params) - [`get_first_private_key`](./src/api/ws/daemon/README.md#get_first_private_keydaemon-params) - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params) - [`get_key`](./src/api/ws/daemon/README.md#get_keydaemon-params) - [`get_keys`](./src/api/ws/daemon/README.md#get_keysdaemon-params) - [`get_public_key`](./src/api/ws/daemon/README.md#get_public_keydaemon-params) - [`get_public_keys`](./src/api/ws/daemon/README.md#get_public_keysdaemon-params) - [`set_label`](./src/api/ws/daemon/README.md#set_labeldaemon-params) - [`delete_label`](./src/api/ws/daemon/README.md#delete_labeldaemon-params) - Added a missing `kc_service` request parameter - Removed `kc_test` request parameter - [`get_key_for_fingerprint`](./src/api/ws/daemon/README.md#get_key_for_fingerprintdaemon-params) - Made `error` response parameter non-optional when `success == False` - [Common RPC API](./src/api/rpc/common) - [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent) - Added a missing `success` response parameter - [Wallet RPC API](./src/api/rpc/wallet) - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params) - Fixed CAT request/response documentation incorrectness - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params) - Fixed response documentation incorrectness - Fixed an issue where `Spend` and `SpendBundleCondition` were too old and missed several properties in the types. ## [14.1.0] ### Changed -`get_network_info` RPC API is now commonized and available in addition to `full_node` and `wallet`. - [DataLayer RPC API](./src/api/rpc/data_layer) - [`get_keys`](./src/api/rpc/data_layer/README.md#get_keysagent-params) - Added `page` to request parameter - Added `max_page_size` to request parameter - Added `total_pages`, `total_bytes` and `root_hash` to response - [`get_keys_values`](./src/api/rpc/data_layer/README.md#get_keys_valuesagent-params) - Added `page` to request parameter - Added `max_page_size` to request parameter - Added `total_pages`, `total_bytes` and `root_hash` to response - [`batch_update`](./src/api/rpc/data_layer/README.md#batch_updateagent-params) - Added `submit_on_chain` to request parameter - Made `tx_id` in response optional - [`get_kv_diff`](./src/api/rpc/data_layer/README.md#get_kv_diffagent-params) - Added `page` to request parameter - Added `max_page_size` to request parameter - Added `total_pages` and `total_bytes` to response - [Wallet RPC API](./src/api/rpc/wallet) - [`push_transactions`](./src/api/rpc/wallet/README.md#push_transactionsagent-params) - A request parameter `transactions` is allowed to be `TransactionRecordConvenience[]` - [`create_new_wallet`](./src/api/rpc/wallet/README.md#create_new_walletagent-params) - `transactions` is added to response for `cat_wallet` if `mode` in request is `new` - `transactions` is added to response for `dao_wallet` - `transactions` is added to response for `pool_wallet` if `mode` in request is `new` - [`send_transaction`](./src/api/rpc/wallet/README.md#send_transactionagent-params) - Changed the type of `fee` to `uint64` and made it optional - Added `transactions` to response - [`send_transaction_multi`](./src/api/rpc/wallet/README.md#send_transaction_multiagent-params) - Simplified `TSendTransactionMultiRequest` - Added `transactions` to response - [`spend_clawback_coins`](./src/api/rpc/wallet/README.md#spend_clawback_coinsagent-params) - Added `transactions` to response - [`send_notification`](./src/api/rpc/wallet/README.md#send_notificationagent-params) - Added `transactions` to response - [`cat_spend`](./src/api/rpc/wallet/README.md#cat_spendagent-params) - Added `transactions` to response - [`create_offer_for_ids`](./src/api/rpc/wallet/README.md#create_offer_for_idsagent-params) - Added `transactions` to response - [`take_offer`](./src/api/rpc/wallet/README.md#take_offeragent-params) - Added `transactions` to response - [`cancel_offer`](./src/api/rpc/wallet/README.md#cancel_offeragent-params) - Added `transactions` to response - [`cancel_offers`](./src/api/rpc/wallet/README.md#cancel_offersagent-params) - Added `transactions` to response - [`did_update_recovery_ids`](./src/api/rpc/wallet/README.md#did_update_recovery_idsagent-params) - Added `transactions` to response - [`did_message_spend`](./src/api/rpc/wallet/README.md#did_message_spendagent-params) - Added `transactions` to response - [`did_update_metadata`](./src/api/rpc/wallet/README.md#did_update_metadataagent-params) - Added `transactions` to response - [`did_recovery_spend`](./src/api/rpc/wallet/README.md#did_recovery_spendagent-params) - Added `transactions` to response - [`did_create_attest`](./src/api/rpc/wallet/README.md#did_create_attestagent-params) - Added `transactions` to response - [`did_transfer_did`](./src/api/rpc/wallet/README.md#did_transfer_didagent-params) - Added `transactions` to response - [`dao_add_funds_to_treasury`](./src/api/rpc/wallet/README.md#dao_add_funds_to_treasuryagent-params) - Added `transactions` to response - [`dao_send_to_lockup`](./src/api/rpc/wallet/README.md#dao_send_to_lockupagent-params) - Added `transactions` to response - [`dao_exit_lockup`](./src/api/rpc/wallet/README.md#dao_exit_lockupagent-params) - Added `transactions` to response - [`dao_create_proposal`](./src/api/rpc/wallet/README.md#dao_create_proposalagent-params) - Added `transactions` to response - [`dao_vote_on_proposal`](./src/api/rpc/wallet/README.md#dao_vote_on_proposalagent-params) - Added `transactions` to response - [`dao_close_proposal`](./src/api/rpc/wallet/README.md#dao_close_proposalagent-params) - Added `transactions` to response - [`dao_free_coins_from_finished_proposals`](./src/api/rpc/wallet/README.md#dao_free_coins_from_finished_proposalsagent-params) - Added `transactions` to response - [`nft_mint_nft`](./src/api/rpc/wallet/README.md#nft_mint_nftagent-params) - Added `transactions` to response - [`nft_set_nft_did`](./src/api/rpc/wallet/README.md#nft_set_nft_didagent-params) - Added `transactions` to response - [`nft_set_did_bulk`](./src/api/rpc/wallet/README.md#nft_set_did_bulkagent-params) - Added `transactions` to response - [`nft_transfer_bulk`](./src/api/rpc/wallet/README.md#nft_transfer_bulkagent-params) - Added `transactions` to response - [`nft_transfer_nft`](./src/api/rpc/wallet/README.md#nft_transfer_nftagent-params) - Added `transactions` to response - [`nft_add_uri`](./src/api/rpc/wallet/README.md#nft_add_uriagent-params) - Added `transactions` to response - [`nft_mint_bulk`](./src/api/rpc/wallet/README.md#nft_mint_bulkagent-params) - Added `transactions` to response - [`create_signed_transaction`](./src/api/rpc/wallet/README.md#create_signed_transactionagent-params) - Added `morph_bytes` to request parameter - Added `transactions` to response - [`pw_join_pool`](./src/api/rpc/wallet/README.md#pw_join_poolagent-params) - Added `transactions` to response - [`pw_self_pool`](./src/api/rpc/wallet/README.md#pw_self_poolagent-params) - Added `transactions` to response - [`pw_absorb_rewards`](./src/api/rpc/wallet/README.md#pw_absorb_rewardsagent-params) - Added `transactions` to response - [`dl_update_root`](./src/api/rpc/wallet/README.md#dl_update_rootagent-params) - Added `transactions` to response - [`dl_update_multiple`](./src/api/rpc/wallet/README.md#dl_update_multipleagent-params) - Added `transactions` to response - Moved `TxEndpoint` to [src/chia/rpc/util.ts](./src/api/chia/rpc/util.ts) (Previously `src/chia/wallet/util/tx_config.ts`) - Renamed `TxEndPoint` to `TXEndpointRequest` - Renamed `TxEndpointForCompat` to `TXEndpointForCompat` - Renamed `TxConfigLoader` to `TXConfigLoader` - Changed the types of `passed` and `closed` in ProposalInfo` to `bool` (Previously they were `Optional<bool>`) As a result, the RPC APIs below are affected - `dao_get_proposals` of Wallet RPC API - `dao_adjust_filter_level` of Wallet RPC API - Upgraded dependencies and replaced `yarn.lock` with `pnpm-lock.yaml` - Moved `FarmerRecord` to [src/chia/pool/record.ts](src/api/pool-reference/pool/record.ts) ( Previously `src/chia/pool/store.ts`) ### Added - [Daemon WebSocket API](./src/api/ws/daemon) - [`get_network_info`](./src/api/ws/daemon/README.md#get_network_infodaemon) - [Common RPC API](./src/api/rpc/common) - [`get_network_info`](./src/api/rpc/common/README.md#get_network_infoagent) - [DataLayer RPC API](./src/api/rpc/data_layer) - [`submit_pending_root`](./src/api/rpc/data_layer/README.md#submit_pending_rootagent-params) ### Fixed - Renamed `ReceiveBlockResult` to `AddBlockResult` (type `ReceiveBlockResult` is still available to avoid breaking change) - Fixed an invalid `TCreate_New_DAO_WalletRequest` README location. - Fixed an issue where `pubkey` and `pubhash` in request of Wallet RPC API `did_recovery_spend` was not optional in the API doc. - Fixed lint errors ### Removed - [FullNode RPC API](./src/api/rpc/data_layer) - `get_network_info_of_full_node` - [Wallet RPC API](./src/api/rpc/wallet) - `get_network_info_of_wallet` - Removed empty request parameter types like `{}` ## [14.0.0] ### Breaking change - When RPC API responds with `success: false`, its `Promise` now does `reject`. (Previously it does `resolve`) - At chia-blockchain@2.2.1, in `chia/consensus/cost_calculator.py`, `NPCResult.cost` was removed. As a result, the RPC APIs below might be incompatible between `2.1.4` and `2.2.1`. - `get_all_mempool_items` of FullNode RPC API - `get_mempool_item_by_tx_id` of FullNode RPC API ### Changed - Loosened a type of `agent` to call RPC APIs. RPC APIs can be invoked with `agent` which just implements `sendMessage` method depicted as below. ```typescript export interface APIAgent { sendMessage<M extends unknown>( destination: string, command: string, data?: Record<string, unknown>, ): Promise<M>; } ``` - `sp_source_data` was added to [`NewSignagePoint`](./src/api/chia/protocols/farmer_protocol.ts) As a result the following API responses were affected - [`on_signage_point`](./src/api/ws/full_node/README.md#on_signage_point) - [`on_new_signage_point`](./src/api/ws/farmer/README.md#on_new_signage_point) - `include_signature_source_data` was added to [`DeclareProofOfSpace`](./src/api/chia/protocols/farmer_protocol.ts) As a result the following API responses were affected - [`on_proof`](./src/api/ws/farmer/README.md#on_proof) - `foliage_block_data`, `foliage_transaction_block_data` and `rc_block_unfinished` were added to [`RequestSignedValues`](./src/api/chia/protocols/farmer_protocol.ts) - `eligible_for_fast_forward` was added to [`BundleCoinSpend`](./src/api/chia/types/mempool_item.ts) - `CHIP_0002_P2_DELEGATED_CONDITIONS` was added to [`SigningMode`](./src/api/chia/types/signing_mode.ts) As a result the following API responses were affected - [`verify_signature`](./src/api/rpc/wallet/README.md#verify_signatureagent-params) - [`sign_message_by_address`](./src/api/rpc/wallet/README.md#sign_message_by_addressagent-params) - [`sign_message_by_id`](./src/api/rpc/wallet/README.md#sign_message_by_idagent-params) - [Wallet RPC API](./src/api/rpc/wallet) - [`get_notifications`](./src/api/rpc/wallet/README.md#get_notificationsagent-params) - The types of request parameters were slightly changed - `ids` are now `bytes32[]` (previously `str[]`) - `start` are now `uint32` (previously `int[]`) - `end` are now `uint32` (previously `int[]`) - The types of response parameters were slightly changed - `id` are now `bytes32` (previously `str`) - `message` are now `bytes` (previously `str`) - [`get_offer_summary`](./src/api/rpc/wallet/README.md#get_offer_summaryagent-params) - The following properties were added to the response parameters - `additions: str[]` - `removals: str[]` - [`nft_get_info`](./src/api/rpc/wallet/README.md#nft_get_inf