chia-agent 18.0.0 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +5 -5
- package/api/chia/protocols/harvester_protocol.d.ts +3 -1
- package/api/chia/wallet/util/wallet_types.d.ts +1 -0
- package/api/chia/wallet/util/wallet_types.js +1 -0
- package/api/chia_rs/chia-protocol/partial_proof.d.ts +1 -1
- package/api/chia_rs/chia-protocol/proof_of_space.d.ts +5 -1
- package/api/rpc/index.d.ts +1 -1
- package/api/rpc/index.js +5 -4
- package/api/rpc/wallet/index.d.ts +28 -4
- package/api/rpc/wallet/index.js +6 -1
- package/package.json +1 -1
- package/rpc/index.d.ts +7 -0
- package/rpc/index.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [19.1.0]
|
|
4
|
+
Support for [`chia-blockchain@2.7.0`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.7.0)
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
- Remote Wallet support (introduced in chia-blockchain 2.7.0)
|
|
8
|
+
- New Wallet RPC API [`register_remote_coins`](./src/api/rpc/wallet/README.md#register_remote_coinsagent-params)
|
|
9
|
+
- `create_new_wallet` now accepts `wallet_type: "remote_wallet"` (with optional `name`)
|
|
10
|
+
- `WalletType`: added `REMOTE: 205`
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Synchronized with `chia_rs@0.41.1` (no type definition changes were required)
|
|
14
|
+
|
|
15
|
+
## [19.0.0]
|
|
16
|
+
Support for [`chia-blockchain@2.6.1`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.6.1)
|
|
17
|
+
|
|
18
|
+
### Breaking change
|
|
19
|
+
- `ProofOfSpace` type was updated for v2 proof-of-space (follows `chia_rs@0.38.2`)
|
|
20
|
+
- Added `version`, `plot_index`, `meta_group` and `strength` fields (between `plot_public_key` and `size`)
|
|
21
|
+
- `size` now only carries the v1 k-size (0 for v2 proofs)
|
|
22
|
+
- This affects every RPC response embedding a `ProofOfSpace` (e.g. block records)
|
|
23
|
+
- `PartialProof`: `proof_fragments` was renamed to `fragments` (now 16 entries; follows `chia_rs@0.38.2`)
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Structured RPC errors (added in chia-blockchain 2.6.1)
|
|
27
|
+
- RPC error responses now always include `structuredError: {code, message, data}`
|
|
28
|
+
(and `traceback` on the HTTP RPC path)
|
|
29
|
+
- `RpcError` now exposes a `structuredError` property
|
|
30
|
+
- Added `TStructuredError` and `TRpcErrorCode` types
|
|
31
|
+
- `create_signed_transaction`: new optional request parameters
|
|
32
|
+
`extra_delta`, `tail_reveal`, `tail_solution` (must be specified together) and `puzzle_decorator`
|
|
33
|
+
- [Harvester Protocol](./src/api/chia/protocols/harvester_protocol.ts)
|
|
34
|
+
- `PartialProofsData`: added `plot_index` and `meta_group`
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
- Synchronized `chia_rs` type definitions with `chia_rs@0.38.2`
|
|
38
|
+
- `nft_mint_nft`: upstream reverted the `royalty_amount` rename back to `royalty_percentage`
|
|
39
|
+
(chia-agent already used `royalty_percentage`; no type change)
|
|
40
|
+
- `take_offer`: the `sign` request parameter is now ignored by the wallet (signing is handled internally)
|
|
41
|
+
- `did_find_lost_did`: `latest_coin_id` now echoes the requested coin id
|
|
42
|
+
|
|
3
43
|
## [18.0.0]
|
|
4
44
|
Support for [`chia-blockchain@2.6.0`](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.6.0)
|
|
5
45
|
|
|
@@ -2042,6 +2082,8 @@ daemon.sendMessage(destination, get_block_record_by_height_command, data);
|
|
|
2042
2082
|
Initial release.
|
|
2043
2083
|
|
|
2044
2084
|
<!-- [Unreleased]: https://github.com/Chia-Mine/chia-agent/compare/v0.0.1...v0.0.2 -->
|
|
2085
|
+
[19.1.0]: https://github.com/Chia-Mine/chia-agent/compare/v19.0.0...v19.1.0
|
|
2086
|
+
[19.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v18.0.0...v19.0.0
|
|
2045
2087
|
[18.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v17.0.0...v18.0.0
|
|
2046
2088
|
[17.0.0]: https://github.com/Chia-Mine/chia-agent/compare/v16.1.6...v17.0.0
|
|
2047
2089
|
[16.1.6]: https://github.com/Chia-Mine/chia-agent/compare/v16.1.5...v16.1.6
|
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 `2.
|
|
5
|
+
Supports all RPC/Websocket API available at `2.7.0` of [`chia-blockchain`](https://github.com/Chia-Network/chia-blockchain/).
|
|
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,10 +22,10 @@ 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/
|
|
27
|
-
- [`
|
|
28
|
-
- [Diff to the main branch of chia_rs](https://github.com/Chia-Network/chia_rs/compare/
|
|
25
|
+
- [`ab8090a653768d835f07cca106ea7602538a761b`](https://github.com/Chia-Network/chia-blockchain/tree/ab8090a653768d835f07cca106ea7602538a761b) of [chia-blockchain 2.7.0](https://github.com/Chia-Network/chia-blockchain)
|
|
26
|
+
- [Diff to the main branch of chia-blockchain](https://github.com/Chia-Network/chia-blockchain/compare/ab8090a653768d835f07cca106ea7602538a761b...main)
|
|
27
|
+
- [`1143ff126a63de7732c1ecb672dfe0aa734c078f`](https://github.com/Chia-Network/chia_rs/tree/1143ff126a63de7732c1ecb672dfe0aa734c078f) of [chia_rs 0.41.1](https://github.com/Chia-Network/chia_rs)
|
|
28
|
+
- [Diff to the main branch of chia_rs](https://github.com/Chia-Network/chia_rs/compare/1143ff126a63de7732c1ecb672dfe0aa734c078f...main)
|
|
29
29
|
- [`ef49150171cc243b09c0e5d5cb27f2249ffa3793`](https://github.com/Chia-Network/pool-reference/tree/ef49150171cc243b09c0e5d5cb27f2249ffa3793) of [pool-reference](https://github.com/Chia-Network/pool-reference)
|
|
30
30
|
- [Diff to the main branch of pool-reference](https://github.com/Chia-Network/pool-reference/compare/ef49150171cc243b09c0e5d5cb27f2249ffa3793...main)
|
|
31
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Optional, str } from "../types/_python_types_";
|
|
2
2
|
import { G1Element } from "../../chia_rs/chia-bls/lib";
|
|
3
|
-
import { uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
|
|
3
|
+
import { uint16, uint64, uint8 } from "../../chia_rs/wheel/python/sized_ints";
|
|
4
4
|
import { bytes32 } from "../../chia_rs/wheel/python/sized_bytes";
|
|
5
5
|
import { PartialProof } from "../../chia_rs/chia-protocol/partial_proof";
|
|
6
6
|
export type PartialProofsData = {
|
|
@@ -10,6 +10,8 @@ export type PartialProofsData = {
|
|
|
10
10
|
partial_proofs: PartialProof[];
|
|
11
11
|
signage_point_index: uint8;
|
|
12
12
|
plot_size: uint8;
|
|
13
|
+
plot_index: uint16;
|
|
14
|
+
meta_group: uint8;
|
|
13
15
|
strength: uint8;
|
|
14
16
|
plot_id: bytes32;
|
|
15
17
|
pool_public_key: Optional<G1Element>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { bytes32 } from "../wheel/python/sized_bytes";
|
|
2
2
|
import { bytes, Optional } from "../../chia/types/_python_types_";
|
|
3
3
|
import { G1Element } from "../chia-bls/lib";
|
|
4
|
-
import { uint8 } from "../wheel/python/sized_ints";
|
|
4
|
+
import { uint16, uint8 } from "../wheel/python/sized_ints";
|
|
5
5
|
export type ProofOfSpace = {
|
|
6
6
|
challenge: bytes32;
|
|
7
7
|
pool_public_key: Optional<G1Element>;
|
|
8
8
|
pool_contract_puzzle_hash: Optional<bytes32>;
|
|
9
9
|
plot_public_key: G1Element;
|
|
10
|
+
version: uint8;
|
|
11
|
+
plot_index: uint16;
|
|
12
|
+
meta_group: uint8;
|
|
13
|
+
strength: uint8;
|
|
10
14
|
size: uint8;
|
|
11
15
|
proof: bytes;
|
|
12
16
|
};
|
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, TGetPlotDirectoriesResponse, get_plot_directories, TGetPlotsResponse, get_plots, 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, TSplitCoinsRequest, TSplitCoinsResponse, split_coins, TCombineCoinsRequest, TCombineCoinsResponse, combine_coins, 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, 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, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, did_create_backup_file, TDidTransferDidRequest, TDidTransferDidResponse, did_transfer_did, TDidGetDidRequest, TDidGetDidResponse, did_get_did, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, did_get_current_coin_info, TDidGetPubkeyRequest, TDidGetPubkeyResponse, did_get_pubkey, TDidGetMetadataRequest, TDidGetMetadataResponse, did_get_metadata, TDidSpendRequest, TDidSpendResponse, did_spend, 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, TGetTimestampForHeightResponse, get_timestamp_for_height, TSetAutoClaimRequest, TSetAutoClaimResponse, set_auto_claim, TGetAutoClaimResponse, get_auto_claim, TGenerateMnemonicResponse, generate_mnemonic, TGetAllOffersRequest, TGetAllOffersResponse, get_all_offers, TGetCatListResponse, get_cat_list, TGetFarmedAmountResponse, get_farmed_amount, TGetHeightInfoResponse, get_height_info, 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, TGetNextAddressRequest, TGetNextAddressResponse, get_next_address, TGetPrivateKeyRequest, TGetPrivateKeyResponse, get_private_key, TGetPublicKeysResponse, get_public_keys, 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, TDlVerifyProofRequest, TDlVerifyProofResponse, dl_verify_proof, 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, TGatherSigningInfoRequest, TGatherSigningInfoResponse, gather_signing_info, TApplySignaturesRequest, TApplySignaturesResponse, apply_signatures, TSubmitTransactionsRequest, TSubmitTransactionsResponse, submit_transactions, TExecuteSigningInstructionsRequest, TExecuteSigningInstructionsResponse, execute_signing_instructions, } 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, TRegisterRemoteCoinsRequest, TRegisterRemoteCoinsResponse, register_remote_coins, 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, TSplitCoinsRequest, TSplitCoinsResponse, split_coins, TCombineCoinsRequest, TCombineCoinsResponse, combine_coins, 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, 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, TDidCreateBackupFileRequest, TDidCreateBackupFileResponse, did_create_backup_file, TDidTransferDidRequest, TDidTransferDidResponse, did_transfer_did, TDidGetDidRequest, TDidGetDidResponse, did_get_did, TDidGetCurrentCoinInfoRequest, TDidGetCurrentCoinInfoResponse, did_get_current_coin_info, TDidGetPubkeyRequest, TDidGetPubkeyResponse, did_get_pubkey, TDidGetMetadataRequest, TDidGetMetadataResponse, did_get_metadata, TDidSpendRequest, TDidSpendResponse, did_spend, 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, TGetTimestampForHeightResponse, get_timestamp_for_height, TSetAutoClaimRequest, TSetAutoClaimResponse, set_auto_claim, TGetAutoClaimResponse, get_auto_claim, TGenerateMnemonicResponse, generate_mnemonic, TGetAllOffersRequest, TGetAllOffersResponse, get_all_offers, TGetCatListResponse, get_cat_list, TGetFarmedAmountResponse, get_farmed_amount, TGetHeightInfoResponse, get_height_info, 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, TGetNextAddressRequest, TGetNextAddressResponse, get_next_address, TGetPrivateKeyRequest, TGetPrivateKeyResponse, get_private_key, TGetPublicKeysResponse, get_public_keys, 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, TDlVerifyProofRequest, TDlVerifyProofResponse, dl_verify_proof, 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, TGatherSigningInfoRequest, TGatherSigningInfoResponse, gather_signing_info, TApplySignaturesRequest, TApplySignaturesResponse, apply_signatures, TSubmitTransactionsRequest, TSubmitTransactionsResponse, submit_transactions, TExecuteSigningInstructionsRequest, TExecuteSigningInstructionsResponse, execute_signing_instructions, } 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, TMultistoreBatchUpdateRequest, TMultistoreBatchUpdateResponse, multistore_batch_update, TSubmitPendingRootResponse, TSubmitPendingRootRequest, submit_pending_root, TSubmitAllPendingRootsRequest, TSubmitAllPendingRootsResponse, submit_all_pending_roots, 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, TGetProofRequest, TGetProofResponse, get_proof, TVerifyProofRequest, TVerifyProofResponse, verify_proof, } from "./data_layer/index";
|
|
11
11
|
import type { RpcCrawlerMessage } from "./crawler/index";
|
package/api/rpc/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.get_all_coins = exports.get_farming_ph = exports.get_auto_farming = exports.set_auto_farming = exports.farm_block = 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_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.create_block_generator = exports.get_mempool_items_by_coin_name = exports.get_all_mempool_tx_ids = exports.get_all_mempool_items = exports.get_aggsig_additional_data = 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
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.reset_log_level = exports.set_log_level = exports.get_log_level = exports.healthz = exports.get_version = exports.get_routes = exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.get_network_info = exports.chia_common_service = exports.get_state = exports.chia_solver_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.verify_proof = exports.get_proof = 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 = void 0;
|
|
4
|
+
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.combine_coins = exports.split_coins = 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.register_remote_coins = 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 = exports.get_all_puzzle_hashes = void 0;
|
|
5
|
+
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 = exports.get_next_address = 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.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.did_update_metadata = exports.did_spend = exports.did_get_metadata = exports.did_get_pubkey = exports.did_get_current_coin_info = exports.did_get_did = exports.did_transfer_did = exports.did_create_backup_file = void 0;
|
|
6
|
+
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 = exports.get_keys = exports.get_value = exports.submit_all_pending_roots = exports.submit_pending_root = exports.multistore_batch_update = exports.batch_update = exports.get_owned_stores = exports.create_data_store = exports.wallet_log_in = exports.chia_data_layer_service = exports.execute_signing_instructions = exports.submit_transactions = exports.apply_signatures = exports.gather_signing_info = 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_verify_proof = 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 = void 0;
|
|
7
|
+
exports.reset_log_level = exports.set_log_level = exports.get_log_level = exports.healthz = exports.get_version = exports.get_routes = exports.stop_node = exports.close_connection = exports.open_connection = exports.get_connections = exports.get_network_info = exports.chia_common_service = exports.get_state = exports.chia_solver_service = exports.get_peer_counts = exports.get_ips_after_timestamp = exports.chia_crawler_service = exports.verify_proof = exports.get_proof = 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 = 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; } });
|
|
@@ -84,6 +84,7 @@ Object.defineProperty(exports, "cat_set_name", { enumerable: true, get: function
|
|
|
84
84
|
Object.defineProperty(exports, "cat_spend", { enumerable: true, get: function () { return index_4.cat_spend; } });
|
|
85
85
|
Object.defineProperty(exports, "check_offer_validity", { enumerable: true, get: function () { return index_4.check_offer_validity; } });
|
|
86
86
|
Object.defineProperty(exports, "create_new_wallet", { enumerable: true, get: function () { return index_4.create_new_wallet; } });
|
|
87
|
+
Object.defineProperty(exports, "register_remote_coins", { enumerable: true, get: function () { return index_4.register_remote_coins; } });
|
|
87
88
|
Object.defineProperty(exports, "create_offer_for_ids", { enumerable: true, get: function () { return index_4.create_offer_for_ids; } });
|
|
88
89
|
Object.defineProperty(exports, "create_signed_transaction", { enumerable: true, get: function () { return index_4.create_signed_transaction; } });
|
|
89
90
|
Object.defineProperty(exports, "delete_unconfirmed_transactions", { enumerable: true, get: function () { return index_4.delete_unconfirmed_transactions; } });
|
|
@@ -246,13 +246,24 @@ export type TCreate_New_Pool_WalletResponse = {
|
|
|
246
246
|
launcher_id: str;
|
|
247
247
|
p2_singleton_puzzle_hash: str;
|
|
248
248
|
};
|
|
249
|
+
export type TCreate_New_Remote_WalletRequest = {
|
|
250
|
+
fee?: uint64;
|
|
251
|
+
wallet_type: "remote_wallet";
|
|
252
|
+
name?: str;
|
|
253
|
+
};
|
|
254
|
+
export type TCreate_New_Remote_WalletResponse = {
|
|
255
|
+
success: True;
|
|
256
|
+
type: "REMOTE";
|
|
257
|
+
wallet_id: uint32;
|
|
258
|
+
transactions: TransactionRecordConvenience[];
|
|
259
|
+
};
|
|
249
260
|
export declare const create_new_wallet_command = "create_new_wallet";
|
|
250
261
|
export type create_new_wallet_command = typeof create_new_wallet_command;
|
|
251
262
|
export type TCreateNewWalletRequestWithTx = TCreate_New_CAT_WalletRequest | TCreate_New_Pool_WalletRequest;
|
|
252
|
-
export type TCreateNewWalletRequestWithoutTx = TCreate_New_DID_WalletRequest | TCreate_New_NFT_WalletRequest;
|
|
263
|
+
export type TCreateNewWalletRequestWithoutTx = TCreate_New_DID_WalletRequest | TCreate_New_NFT_WalletRequest | TCreate_New_Remote_WalletRequest;
|
|
253
264
|
export type TCreateNewWalletRequest = (TCreateNewWalletRequestWithTx | TCreateNewWalletRequestWithoutTx) & TXEndpointRequest;
|
|
254
|
-
export type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse;
|
|
255
|
-
export type GetCreateNewWalletResponse<REQ extends TCreateNewWalletRequest> = REQ extends TCreate_New_CAT_WalletRequest ? TCreate_New_CAT_WalletResponse : REQ extends TCreate_New_DID_WalletRequest ? REQ extends TCreateNewDidWalletRequestNew ? TCreateNewDidWalletResponseNew : TCreateNewDidWalletResponseRecovery : REQ extends TCreate_New_NFT_WalletRequest ? TCreate_New_NFT_WalletResponse : TCreate_New_Pool_WalletResponse;
|
|
265
|
+
export type TCreateNewWalletResponse = TCreate_New_CAT_WalletResponse | TCreate_New_DID_WalletResponse | TCreate_New_NFT_WalletResponse | TCreate_New_Pool_WalletResponse | TCreate_New_Remote_WalletResponse;
|
|
266
|
+
export type GetCreateNewWalletResponse<REQ extends TCreateNewWalletRequest> = REQ extends TCreate_New_CAT_WalletRequest ? TCreate_New_CAT_WalletResponse : REQ extends TCreate_New_DID_WalletRequest ? REQ extends TCreateNewDidWalletRequestNew ? TCreateNewDidWalletResponseNew : TCreateNewDidWalletResponseRecovery : REQ extends TCreate_New_NFT_WalletRequest ? TCreate_New_NFT_WalletResponse : REQ extends TCreate_New_Remote_WalletRequest ? TCreate_New_Remote_WalletResponse : TCreate_New_Pool_WalletResponse;
|
|
256
267
|
export type WsCreateNewWalletMessage<R> = GetMessageType<chia_wallet_service, create_new_wallet_command, R>;
|
|
257
268
|
export declare function create_new_wallet<T extends TRPCAgent | TDaemon, D extends TCreateNewWalletRequest>(agent: T, data: D): Promise<ResType<T, D extends TCreateNewWalletRequestWithTx ? TxeResp<D, GetCreateNewWalletResponse<D>> : GetCreateNewWalletResponse<D>, WsCreateNewWalletMessage<D extends TCreateNewWalletRequestWithTx ? TxeResp<D, GetCreateNewWalletResponse<D>> : GetCreateNewWalletResponse<D>>>>;
|
|
258
269
|
export type WalletBalance = Balance & {
|
|
@@ -434,6 +445,10 @@ export type TCreateSignedTransactionRequest = {
|
|
|
434
445
|
coin_announcements?: TCoinAnnouncement[];
|
|
435
446
|
puzzle_announcements?: TPuzzleAnnouncement[];
|
|
436
447
|
morph_bytes?: str;
|
|
448
|
+
extra_delta?: str;
|
|
449
|
+
tail_reveal?: str;
|
|
450
|
+
tail_solution?: str;
|
|
451
|
+
puzzle_decorator?: ClawbackPuzzleDecoratorOverride[];
|
|
437
452
|
} & TXEndpointRequest;
|
|
438
453
|
export type TCreateSignedTransactionResponse = {
|
|
439
454
|
signed_txs: TransactionRecordConvenience[];
|
|
@@ -1667,4 +1682,13 @@ export type TExecuteSigningInstructionsRequest = ExecuteSigningInstructions | Ex
|
|
|
1667
1682
|
export type TExecuteSigningInstructionsResponse = ExecuteSigningInstructionsResponse | ExecuteSigningInstructionsResponseCHIP0029;
|
|
1668
1683
|
export type WsExecuteSigningInstructionsMessage<R> = GetMessageType<chia_wallet_service, execute_signing_instructions_command, R>;
|
|
1669
1684
|
export declare function execute_signing_instructions<T extends TRPCAgent | TDaemon, D extends TExecuteSigningInstructionsRequest>(agent: T, data: D): Promise<ResType<T, D extends ExecuteSigningInstructionsCHIP0029 ? ExecuteSigningInstructionsResponseCHIP0029 : ExecuteSigningInstructionsResponse, WsExecuteSigningInstructionsMessage<D extends ExecuteSigningInstructionsCHIP0029 ? ExecuteSigningInstructionsResponseCHIP0029 : ExecuteSigningInstructionsResponse>>>;
|
|
1670
|
-
export
|
|
1685
|
+
export declare const register_remote_coins_command = "register_remote_coins";
|
|
1686
|
+
export type register_remote_coins_command = typeof register_remote_coins_command;
|
|
1687
|
+
export type TRegisterRemoteCoinsRequest = {
|
|
1688
|
+
wallet_id: uint32;
|
|
1689
|
+
coin_ids: str[];
|
|
1690
|
+
};
|
|
1691
|
+
export type TRegisterRemoteCoinsResponse = Record<string, never>;
|
|
1692
|
+
export type WsRegisterRemoteCoinsMessage = GetMessageType<chia_wallet_service, register_remote_coins_command, TRegisterRemoteCoinsResponse>;
|
|
1693
|
+
export declare function register_remote_coins<T extends TRPCAgent | TDaemon>(agent: T, data: TRegisterRemoteCoinsRequest): Promise<ResType<T, TRegisterRemoteCoinsResponse, WsRegisterRemoteCoinsMessage>>;
|
|
1694
|
+
export type RpcWalletMessage = TRegisterRemoteCoinsResponse | 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 | TSplitCoinsResponse | TCombineCoinsResponse | TNftCalculateRoyaltiesResponse | TNftMintBulkResponse | TNftSetDidBulkResponse | TNftTransferBulkResponse | TDeleteAllKeysResponse | TSetWalletResyncOnStartupResponse | TDeleteKeyResponse | TCheckDeleteKeyResponse | TDidSetWalletNameResponse | TDidGetWalletNameResponse | TDidCreateBackupFileResponse | TDidTransferDidResponse | TDidMessageSpendResponse | TDidGetInfoResponse | TDidFindLostDidResponse | TDidGetDidResponse | TDidGetCurrentCoinInfoResponse | TDidGetPubkeyResponse | TDidGetMetadataResponse | TDidSpendResponse | TDidUpdateMetadataResponse | TNftMintNftResponse | TNftCountNftsResponse | TNftGetNftsResponse | TNftSetNftDidResponse | TNftGetByDidResponse | TNftGetWalletDidResponse | TNftGetWalletsWithDidsResponse | TNftSetNftStatusResponse | TNftTransferNftResponse | TNftGetInfoResponse | TNftAddUriResponse | TGetTimestampForHeightResponse | TSetAutoClaimResponse | TGetAutoClaimResponse | TGenerateMnemonicResponse | TGetAllOffersResponse | TGetCatListResponse | TGetFarmedAmountResponse | TGetHeightInfoResponse | TGetInitialFreezePeriodResponseOfWallet | TGetLoggedInFingerprintResponse | TGetOfferResponse | TGetOffersCountResponse | TGetOfferSummaryResponse | 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 | TDlVerifyProofResponse | TVcMintResponse | TVcGetResponse | TVcGetListResponse | TVcSpendResponse | TVcAddProofsResponse | TVcGetProofsForRootResponse | TVcRevokeResponse | TCrcatApprovePendingResponse | TGatherSigningInfoResponse | TApplySignaturesResponse | TSubmitTransactionsResponse | TExecuteSigningInstructionsResponse;
|
package/api/rpc/wallet/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cat_set_name_command = exports.get_cat_list_command = exports.sign_message_by_id_command = exports.sign_message_by_address_command = exports.combine_coins_command = exports.split_coins_command = exports.get_transaction_memo_command = exports.verify_signature_command = exports.send_notification_command = exports.delete_notifications_command = exports.get_notifications_command = exports.extend_derivation_index_command = exports.get_current_derivation_index_command = exports.get_coin_records_by_names_command = exports.get_spendable_coins_command = exports.select_coins_command = exports.delete_unconfirmed_transactions_command = exports.create_signed_transaction_command = exports.get_farmed_amount_command = exports.get_transaction_count_command = exports.get_coin_records_command = exports.spend_clawback_coins_command = exports.send_transaction_multi_command = exports.send_transaction_command = exports.get_next_address_command = exports.get_transactions_command = exports.get_transaction_command = exports.get_wallet_balances_command = exports.get_wallet_balance_command = exports.create_new_wallet_command = exports.get_wallets_command = exports.get_initial_freeze_period_command_of_wallet = exports.get_auto_claim_command = exports.set_auto_claim_command = exports.get_timestamp_for_height_command = exports.push_transactions_command = exports.push_tx_command = exports.get_height_info_command = exports.get_sync_status_command = exports.set_wallet_resync_on_startup_command = exports.delete_all_keys_command = exports.check_delete_key_command = exports.delete_key_command = exports.add_key_command = exports.generate_mnemonic_command = exports.get_private_key_command = exports.get_public_keys_command = exports.get_logged_in_fingerprint_command = exports.log_in_command = exports.chia_wallet_service = void 0;
|
|
4
4
|
exports.create_new_dl_command = exports.pw_status_command = exports.pw_absorb_rewards_command = exports.pw_self_pool_command = exports.pw_join_pool_command = exports.add_rate_limited_funds_command = exports.send_clawback_transaction_command = exports.rl_set_user_info_command = exports.nft_mint_bulk_command = exports.nft_calculate_royalties_command = exports.nft_add_uri_command = exports.nft_get_info_command = exports.nft_transfer_nft_command = exports.nft_set_nft_status_command = exports.nft_get_wallets_with_dids_command = exports.nft_get_wallet_did_command = exports.nft_get_by_did_command = exports.nft_transfer_bulk_command = exports.nft_set_did_bulk_command = exports.nft_set_nft_did_command = exports.nft_get_nfts_command = exports.nft_count_nfts_command = exports.nft_mint_nft_command = exports.did_transfer_did_command = exports.did_find_lost_did_command = exports.did_get_info_command = exports.did_message_spend_command = exports.did_create_backup_file_command = exports.did_get_current_coin_info_command = exports.did_get_metadata_command = exports.did_get_did_command = exports.did_get_pubkey_command = exports.did_spend_command = exports.did_update_metadata_command = exports.did_get_wallet_name_command = exports.did_set_wallet_name_command = exports.cancel_offers_command = exports.cancel_offer_command = exports.get_offers_count_command = exports.get_all_offers_command = exports.get_offer_command = exports.take_offer_command = exports.check_offer_validity_command = exports.get_offer_summary_command = exports.create_offer_for_ids_command = exports.cat_get_asset_id_command = exports.cat_spend_command = exports.get_stray_cats_command = exports.cat_get_name_command = exports.cat_asset_id_to_name_command = void 0;
|
|
5
|
-
exports.execute_signing_instructions_command = exports.submit_transactions_command = exports.apply_signatures_command = exports.gather_signing_info_command = exports.crcat_approve_pending_command = exports.vc_revoke_command = exports.vc_get_proofs_for_root_command = exports.vc_add_proofs_command = exports.vc_spend_command = exports.vc_get_list_command = exports.vc_get_command = exports.vc_mint_command = exports.dl_verify_proof_command = exports.dl_delete_mirror_command = exports.dl_new_mirror_command = exports.dl_get_mirrors_command = exports.dl_owned_singletons_command = exports.dl_history_command = exports.dl_update_multiple_command = exports.dl_update_root_command = exports.dl_singletons_by_root_command = exports.dl_latest_singleton_command = exports.dl_stop_tracking_command = exports.dl_track_new_command = void 0;
|
|
5
|
+
exports.register_remote_coins_command = exports.execute_signing_instructions_command = exports.submit_transactions_command = exports.apply_signatures_command = exports.gather_signing_info_command = exports.crcat_approve_pending_command = exports.vc_revoke_command = exports.vc_get_proofs_for_root_command = exports.vc_add_proofs_command = exports.vc_spend_command = exports.vc_get_list_command = exports.vc_get_command = exports.vc_mint_command = exports.dl_verify_proof_command = exports.dl_delete_mirror_command = exports.dl_new_mirror_command = exports.dl_get_mirrors_command = exports.dl_owned_singletons_command = exports.dl_history_command = exports.dl_update_multiple_command = exports.dl_update_root_command = exports.dl_singletons_by_root_command = exports.dl_latest_singleton_command = exports.dl_stop_tracking_command = exports.dl_track_new_command = void 0;
|
|
6
6
|
exports.log_in = log_in;
|
|
7
7
|
exports.get_logged_in_fingerprint = get_logged_in_fingerprint;
|
|
8
8
|
exports.get_public_keys = get_public_keys;
|
|
@@ -126,6 +126,7 @@ exports.gather_signing_info = gather_signing_info;
|
|
|
126
126
|
exports.apply_signatures = apply_signatures;
|
|
127
127
|
exports.submit_transactions = submit_transactions;
|
|
128
128
|
exports.execute_signing_instructions = execute_signing_instructions;
|
|
129
|
+
exports.register_remote_coins = register_remote_coins;
|
|
129
130
|
exports.chia_wallet_service = "chia_wallet";
|
|
130
131
|
// # Key management
|
|
131
132
|
exports.log_in_command = "log_in";
|
|
@@ -628,3 +629,7 @@ exports.execute_signing_instructions_command = "execute_signing_instructions";
|
|
|
628
629
|
async function execute_signing_instructions(agent, data) {
|
|
629
630
|
return agent.sendMessage(exports.chia_wallet_service, exports.execute_signing_instructions_command, data);
|
|
630
631
|
}
|
|
632
|
+
exports.register_remote_coins_command = "register_remote_coins";
|
|
633
|
+
async function register_remote_coins(agent, data) {
|
|
634
|
+
return agent.sendMessage(exports.chia_wallet_service, exports.register_remote_coins_command, data);
|
|
635
|
+
}
|
package/package.json
CHANGED
package/rpc/index.d.ts
CHANGED
|
@@ -2,8 +2,15 @@ import { Agent as HttpsAgent } from "https";
|
|
|
2
2
|
import { Agent as HttpAgent } from "http";
|
|
3
3
|
import { TConfig } from "../config/index";
|
|
4
4
|
import { APIAgent } from "../agent/index";
|
|
5
|
+
export type TRpcErrorCode = "API_ERROR" | "BLOCK_DOES_NOT_EXIST" | "BLOCK_HASH_NOT_FOUND" | "BLOCK_HEIGHT_NOT_FOUND" | "BLOCK_IN_FORK" | "BLOCK_NOT_FOUND" | "COIN_RECORD_NOT_FOUND" | "CONSENSUS_ERROR" | "EOS_NOT_IN_CACHE" | "HEADER_HASH_NOT_IN_REQUEST" | "HEIGHT_NOT_IN_BLOCKCHAIN" | "HINT_NOT_IN_REQUEST" | "INTERNAL_ERROR" | "INVALID_BLOCK_OR_GENERATOR" | "INVALID_COST" | "INVALID_HEIGHT_FOR_COIN" | "INVALID_NETWORK_SPACE_REQUEST" | "NAME_NOT_IN_REQUEST" | "NAMES_NOT_IN_REQUEST" | "NEW_AND_OLD_MUST_DIFFER" | "NEWER_BLOCK_NOT_FOUND" | "NO_BLOCKS_IN_CHAIN" | "NO_COIN_NAME_IN_REQUEST" | "NO_END_IN_REQUEST" | "NO_HEADER_HASH_IN_REQUEST" | "NO_HEIGHT_IN_REQUEST" | "NO_START_IN_REQUEST" | "NO_TX_ID_IN_REQUEST" | "OLDER_BLOCK_NOT_FOUND" | "PARENT_IDS_NOT_IN_REQUEST" | "PEAK_IS_NONE" | "PROTOCOL_ERROR" | "PUZZLE_HASH_NOT_IN_REQUEST" | "PUZZLE_HASHES_NOT_IN_REQUEST" | "PUZZLE_SOLUTION_FAILED" | "REQUEST_MUST_CONTAIN_EXACTLY_ONE" | "SP_NOT_IN_CACHE" | "SPEND_BUNDLE_NOT_IN_REQUEST" | "TARGET_TIMES_NON_NEGATIVE" | "TARGET_TIMES_REQUIRED" | "TIMESTAMP_ERROR" | "TRANSACTION_FAILED" | "TX_NOT_IN_MEMPOOL" | "UNKNOWN" | "VALIDATION_ERROR";
|
|
6
|
+
export type TStructuredError = {
|
|
7
|
+
code: TRpcErrorCode | string;
|
|
8
|
+
message: string;
|
|
9
|
+
data: Record<string, unknown>;
|
|
10
|
+
};
|
|
5
11
|
export declare class RpcError extends Error {
|
|
6
12
|
response: unknown;
|
|
13
|
+
structuredError?: TStructuredError;
|
|
7
14
|
constructor(message: string, response: unknown);
|
|
8
15
|
}
|
|
9
16
|
type TDestination = "farmer" | "harvester" | "full_node" | "wallet" | "data_layer" | "solver" | "daemon" | "pool";
|
package/rpc/index.js
CHANGED
|
@@ -19,6 +19,11 @@ class RpcError extends Error {
|
|
|
19
19
|
super(message);
|
|
20
20
|
this.name = "RpcError";
|
|
21
21
|
this.response = response;
|
|
22
|
+
if (response &&
|
|
23
|
+
typeof response === "object" &&
|
|
24
|
+
"structuredError" in response) {
|
|
25
|
+
this.structuredError = response.structuredError;
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
exports.RpcError = RpcError;
|