Releases: Chia-Mine/chia-agent
Releases · Chia-Mine/chia-agent
v14.3.3
Compatibility
This code is compatible with:
85ca5802143f6a7a0ec4e7c17c84e1ed9875770b
of chia-blockchain 2.4.30ee875ec25d458e3537df54728ea0a9f6b402eae
of pool-referencea1f567fab32c341006cad9ba83863054dbfe63f8
of chia_rs 0.10.0
Changed
- The default service name which
Daemon
client tries to register is nowwallet_ui
.
Previouslychia_agent
service and optionallywallet_ui
service were registered tochia-blockchain
'sDaemon
.
v14.3.2
Compatibility
This code is compatible with:
85ca5802143f6a7a0ec4e7c17c84e1ed9875770b
of chia-blockchain 2.4.30ee875ec25d458e3537df54728ea0a9f6b402eae
of pool-referencea1f567fab32c341006cad9ba83863054dbfe63f8
of chia_rs 0.10.0
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.
v14.3.1
Compatibility
This code is compatible with:
85ca5802143f6a7a0ec4e7c17c84e1ed9875770b
of chia-blockchain 2.4.30ee875ec25d458e3537df54728ea0a9f6b402eae
of pool-referencea1f567fab32c341006cad9ba83863054dbfe63f8
of chia_rs 0.10.0
Changed
- Added a
Host
header when sending https request to a remote host.
v14.3.0
Compatibility
This code is compatible with:
85ca5802143f6a7a0ec4e7c17c84e1ed9875770b
of chia-blockchain 2.4.30ee875ec25d458e3537df54728ea0a9f6b402eae
of pool-referencea1f567fab32c341006cad9ba83863054dbfe63f8
of chia_rs 0.10.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
andTCreate_New_RL_WalletResponse
Added
- New Wallet RPC API
- New Common RPC API
- New property
translation
was added toMarshall
.
As a result of this addition, the following Wallet RPC APIs are affected. translation
andmerge_spends
were added toTXEndpointRequest
As a result of this addition, the following Wallet RPC APIs are affected.create_new_wallet
send_transaction
spend_clawback_coins
create_signed_transaction
send_notification
cat_spend
create_offer_for_ids
take_offer
cancel_offer
cancel_offers
did_update_recovery_ids
did_update_metadata
did_create_attest
did_message_spend
did_transfer_did
dao_add_funds_to_treasury
dao_send_to_lockup
dao_exit_lockup
dao_create_proposal
dao_vote_on_proposal
dao_close_proposal
dao_free_coins_from_finished_proposals
nft_mint_nft
nft_set_nft_did
nft_set_did_bulk
nft_transfer_bulk
nft_transfer_nft
nft_add_uri
nft_mint_bulk
pw_join_pool
pw_self_pool
pw_absorb_rewards
create_new_dl
dl_update_root
dl_update_multiple
dl_new_mirror
dl_delete_mirror
vc_mint
vc_spend
vc_revoke
crcat_approve_pending
Fixed
- Added missing
reason
response property todid_recovery_spend
v14.2.2
Compatibility
This code is compatible with:
6ae45b70369eae3ab23391867846bb84d010a30b
of chia-blockchain 2.4.2284dfdffe0397413bfec2376da0c2f038b7ebe4d
of pool-reference3f8a42b9d81e513dfc6c151d952a1c3f17030a8d
of chia_rs
Changed
- For the log which is output when
success
property in API response isfalse
, the log level is nowINFO
instead ofERROR
.
v14.2.1
Compatibility
This code is compatible with:
4572390f40fce50ba186f13ae30b171887e3a104
of chia-blockchain 2.4.1284dfdffe0397413bfec2376da0c2f038b7ebe4d
of pool-reference3f8a42b9d81e513dfc6c151d952a1c3f17030a8d
of chia_rs 0.9.0
Changed
daemon.connect()
now returns a rejected promise on failure instead of throwing an uncaught exceptiondaemon.connect()
now accepts connection timeout in milliseconds.
v14.2.0
Compatibility
This code is compatible with:
4572390f40fce50ba186f13ae30b171887e3a104
of chia-blockchain 2.4.1284dfdffe0397413bfec2376da0c2f038b7ebe4d
of pool-reference3f8a42b9d81e513dfc6c151d952a1c3f17030a8d
of chia_rs 0.9.0
Note
add_private_key
- The request parameters
kc_user
andkc_service
is temporarily not working with2.4.0
and2.4.1
of
chia-blockchain
.
This is a bug and not spec change sochia-agent
stays to be able to set those params for now.
- The request parameters
Changed
- Reorganized directory structure under
src/api/
in order to make it clear the dependencies fromchia_rs
/pool_reference
- Daemon WebSocket API
get_key_for_fingerprint
- Added a
private
request parameter
- Added a
- Common RPC API
get_network_info
- Added a
genesis_challenge
response parameter
- Added a
Mirror
now has newconfirmed_at_height
property.
As a result of this addition,dl_get_mirrors
is affected.PoolWalletInfo
'scurrent_inner
property was removed.
As a result of this removal, the following Wallet RPC APIs are affected.CHIP-0029
andsign
request params were added toTXEndpointRequest
.
Plus,unsigned_transactions
andsigning_responses
were added to responses of TxEndpoint APIs.
As a result of these additions, the following Wallet RPC APIs are affected.create_new_wallet
send_transaction
spend_clawback_coins
create_signed_transaction
send_notification
cat_spend
create_offer_for_ids
take_offer
cancel_offer
cancel_offers
did_update_recovery_ids
did_update_metadata
did_create_attest
did_message_spend
did_transfer_did
dao_add_funds_to_treasury
dao_send_to_lockup
dao_exit_lockup
dao_create_proposal
dao_vote_on_proposal
dao_close_proposal
dao_free_coins_from_finished_proposals
nft_mint_nft
nft_set_nft_did
nft_set_did_bulk
nft_transfer_bulk
nft_transfer_nft
nft_add_uri
nft_mint_bulk
pw_join_pool
pw_self_pool
pw_absorb_rewards
create_new_dl
dl_update_root
dl_update_multiple
dl_new_mirror
dl_delete_mirror
vc_mint
vc_spend
vc_revoke
crcat_approve_pending
- FullNode RPC API
TFarmBlockFullNodeRequest
,TFarmBlockFullNodeResponse
andfarm_block_fullnode
are now
TFarmBlockRequest
,TFarmBlockResponse
andfarm_block
- Wallet RPC API
push_transactions
- Added
sign
request parameter
- Added
dl_update_multiple
- Added
fee
optional request parameter - Removed
tx_records
from response
- Added
Added
Removed
- Wallet RPC API
farm_block
Fixed
- Daemon WebSocket API
add_private_key
- Added missing
fingerprint
response property
- Added missing
add_private_key
check_keys
delete_all_keys
delete_key_by_fingerprint
get_all_private_keys
get_first_private_key
get_key_for_fingerprint
get_key
get_keys
get_public_key
get_public_keys
set_label
delete_label
- Added a missing
kc_service
request parameter - Removed
kc_test
request parameter
- Added a missing
get_key_for_fingerprint
- Made
error
response parameter non-optional whensuccess == False
- Made
- Common RPC API
get_network_info
- Added a missing
success
response parameter
- Added a missing
- Wallet RPC API
create_new_wallet
- Fixed CAT request/response documentation incorrectness
dao_close_proposal
- Fixed response do...
v14.1.0
Compatibility
This code is compatible with:
5ec14169475030d00767a821b674f76407f7f075
of chia-blockchain 2.3.066cfc09e01b8b3590efab6928867a6b463c5e557
of pool-reference
Changed
-get_network_info
RPC API is now commonized and available in addition to full_node
and wallet
.
- DataLayer RPC API
get_keys
- Added
page
to request parameter - Added
max_page_size
to request parameter - Added
total_pages
,total_bytes
androot_hash
to response
- Added
get_keys_values
- Added
page
to request parameter - Added
max_page_size
to request parameter - Added
total_pages
,total_bytes
androot_hash
to response
- Added
batch_update
- Added
submit_on_chain
to request parameter - Made
tx_id
in response optional
- Added
get_kv_diff
- Added
page
to request parameter - Added
max_page_size
to request parameter - Added
total_pages
andtotal_bytes
to response
- Added
- Wallet RPC API
push_transactions
- A request parameter
transactions
is allowed to beTransactionRecordConvenience[]
- A request parameter
create_new_wallet
transactions
is added to response forcat_wallet
ifmode
in request isnew
transactions
is added to response fordao_wallet
transactions
is added to response forpool_wallet
ifmode
in request isnew
send_transaction
- Changed the type of
fee
touint64
and made it optional - Added
transactions
to response
- Changed the type of
send_transaction_multi
- Simplified
TSendTransactionMultiRequest
- Added
transactions
to response
- Simplified
spend_clawback_coins
- Added
transactions
to response
- Added
send_notification
- Added
transactions
to response
- Added
cat_spend
- Added
transactions
to response
- Added
create_offer_for_ids
- Added
transactions
to response
- Added
take_offer
- Added
transactions
to response
- Added
cancel_offer
- Added
transactions
to response
- Added
cancel_offers
- Added
transactions
to response
- Added
did_update_recovery_ids
- Added
transactions
to response
- Added
did_message_spend
- Added
transactions
to response
- Added
did_update_metadata
- Added
transactions
to response
- Added
did_recovery_spend
- Added
transactions
to response
- Added
did_create_attest
- Added
transactions
to response
- Added
did_transfer_did
- Added
transactions
to response
- Added
dao_add_funds_to_treasury
- Added
transactions
to response
- Added
dao_send_to_lockup
- Added
transactions
to response
- Added
dao_exit_lockup
- Added
transactions
to response
- Added
dao_create_proposal
- Added
transactions
to response
- Added
dao_vote_on_proposal
- Added
transactions
to response
- Added
dao_close_proposal
- Added
transactions
to response
- Added
dao_free_coins_from_finished_proposals
- Added
transactions
to response
- Added
nft_mint_nft
- Added
transactions
to response
- Added
nft_set_nft_did
- Added
transactions
to response
- Added
nft_set_did_bulk
- Added
transactions
to response
- Added
nft_transfer_bulk
- Added
transactions
to response
- Added
nft_transfer_nft
- Added
transactions
to response
- Added
nft_add_uri
- Added
transactions
to response
- Added
nft_mint_bulk
- Added
transactions
to response
- Added
create_signed_transaction
- Added
morph_bytes
to request parameter - Added
transactions
to response
- Added
pw_join_pool
- Added
transactions
to response
- Added
pw_self_pool
- Added
transactions
to response
- Added
pw_absorb_rewards
- Added
transactions
to response
- Added
dl_update_root
- Added
transactions
to response
- Added
dl_update_multiple
- Added
transactions
to response
- Added
- Moved
TxEndpoint
to src/chia/rpc/util.ts (Previouslysrc/chia/wallet/util/tx_config.ts
) - Renamed
TxEndPoint
toTXEndpointRequest
- Renamed
TxEndpointForCompat
toTXEndpointForCompat
- Renamed
TxConfigLoader
toTXConfigLoader
- Changed the types of
passed
andclosed
in ProposalInfoto
bool(Previously they were
Optional`)
As a result, the RPC APIs below are affecteddao_get_proposals
of Wallet RPC APIdao_adjust_filter_level
of Wallet RPC API
- Upgraded dependencies and replaced
yarn.lock
withpnpm-lock.yaml
- Moved
FarmerRecord
to src/chia/pool/record.ts (
Previouslysrc/chia/pool/store.ts
)
Added
Fixed
- Renamed
ReceiveBlockResult
toAddBlockResult
(typeReceiveBlockResult
is still available to avoid breaking change) - Fixed an invalid
TCreate_New_DAO_WalletRequest
README location. - Fixed an issue where
pubkey
andpubhash
in request of Wallet RPC APIdid_recovery_spend
was not optional in the API doc. - Fixed lint errors
Removed
- FullNode RPC API
get_network_info_of_full_node
- Wallet RPC API
get_network_info_of_wallet
- Removed empty request parameter types like
{}
v14.0.0
Compatibility
This code is compatible with:
b98219687331fc6c8121d0c0243a49d2427ccd60
of chia-blockchain 2.2.1fc641b915d95ca00f33c268f820cee196c61ca65
of pool-reference
Breaking change
- When RPC API responds with
success: false
, itsPromise
now doesreject
. (Previously it doesresolve
) - At [email protected], in
chia/consensus/cost_calculator.py
,
NPCResult.cost
was removed.
As a result, the RPC APIs below might be incompatible between2.1.4
and2.2.1
.get_all_mempool_items
Of FullNode RPC APIget_mempool_item_by_tx_id
Of FullNode RPC API
Changed
- Loosened a type of
agent
to call RPC APIs. RPC APIs can be invoked withagent
which just implements
sendMessage
method depicted as below.
export interface APIAgent {
sendMessage<M extends unknown>(
destination: string,
command: string,
data?: Record<string, unknown>,
): Promise<M>;
}
sp_source_data
was added toNewSignagePoint
As a result the following API responses were affectedinclude_signature_source_data
was added toDeclareProofOfSpace
As a result the following API responses were affectedfoliage_block_data
,foliage_transaction_block_data
andrc_block_unfinished
were added toRequestSignedValues
eligible_for_fast_forward
was added toBundleCoinSpend
CHIP_0002_P2_DELEGATED_CONDITIONS
was added toSigningMode
As a result the following API responses were affected- Wallet RPC API
get_notifications
- The types of request parameters were slightly changed
ids
are nowbytes32[]
(previouslystr[]
)start
are nowuint32
(previouslyint[]
)end
are nowuint32
(previouslyint[]
)
- The types of response parameters were slightly changed
id
are nowbytes32
(previouslystr
)message
are nowbytes
(previouslystr
)
- The types of request parameters were slightly changed
get_offer_summary
- The following properties were added to the response parameters
additions: str[]
removals: str[]
- The following properties were added to the response parameters
nft_get_info
- The following properties were removed from the response parameters
ignore_size_limit
- The following properties were removed from the response parameters
Added
- Added connectivity options for
RPCAgent
.keepAlive
(default:true
)keepAliveMsecs
(default:1000
)maxSockets
(default:Infinity
)timeout
(default:undefined
)
// Usage
const {RPCAgent} = require("chia-agent");
const {get_plots} = require("chia-agent/api/rpc");
const agent = new RPCAgent({
service: "harvester",
keepAlive: true,
keepAliveMsecs: 3000,
maxSockets: 1, // Avoid to set `1` if your requests may be sent in parallel.
timeout: 5000,
});
const res = await get_plots(agent);
- Added
httpsAgent
,httpAgent
option forRPCAgent
.
You can now configure and inject your ownrequire('https').Agent
intoRPCAgent
.
// Usage
const {Agent: HttpsAgent} = require("https"); // or const {Agent: HttpAgent} = require('http');
const {RPCAgent} = require("chia-agent");
const {get_plots} = require("chia-agent/api/rpc");
const httpsAgent = new HttpsAgent({
host: "localhost",
port: 8560,
ca: ...,
cert: ...,
key: ...,
rejectUnauthorized: false,
});
const agent = new RPCAgent({httpsAgent: httpsAgent}); // `new RPCAgent({httpAgent: httpAgent});` is also allowed.
const res = await get_plots(agent);
Fixed
- Fixed an issue where some of the RPC Pool APIs did not handle request parameters correctly.
- Added missing attribute
peak_height
toNewSignagePoint
v13.2.0
Compatibility
This code is compatible with:
3856324cadb913fa599c5378d4c43ab216194e75
of chia-blockchain 2.1.36c1c7ecd2ed7307760d1673dc2b1057f22e08fd5
of pool-reference
Added
- FullNode RPC API
- Wallet RPC API
dao_adjust_filter_level
dao_add_funds_to_treasury
dao_get_treasury_balance
dao_get_treasury_id
dao_get_rules
dao_send_to_lockup
dao_get_proposals
dao_get_proposal_state
dao_exit_lockup
dao_create_proposal
dao_vote_on_proposal
dao_parse_proposal
dao_close_proposal
dao_free_coins_from_finished_proposals
- SigningMode
- Added
CHIP_0002_HEX_INPUT
asSigningMode
- Added
- WalletType
- Added
DAO
andDAO_CAT
toWalletType
- Added
Changed
- RPC Agent
- Allow to specify
host
/port
on instantiatingRPCAgent
whenprotocol
is not specified.
const agent = new RPCAgent({host: 'example.com', port: 8444, service: 'full_node', configPath: '...'});
- Allow to specify
- Farmer RPC API
get_pool_state
- Added new properties
insufficient_partials_since_start
insufficient_partials_24h
- Added new properties
- Wallet RPC API
select_coins
- The types of both
excluded_coins
andexclude_coins
were changed toCoin[]
fromstr[]
. - Please note that both of the above properties are just kept for compatibility so don't use them unless you have
strong reasons. Useexcluded_coin_ids: str[]
instead.
- The types of both
sign_message_by_address
- Added
safe_mode
to request parameter
- Added
sign_message_by_id
- Added
safe_mode
to request parameter
- Added
Fixed
- Typo in SpendBundle:
cons_spends
renamed tocoin_spends
- Fixed an issue where sometimes error logs were not reported due to circular dependencies.