跳到主要内容

WalletConnect Developer Guide

Intro

This guide will help developers to create dApps on Chia's blockchain using WalletConnect. It will be expanded upon as more tools are introduced.


RPC Calls

The following table shows each RPC for Chia WalletConnect dApps, along with a description of what each RPC does, and a link to the equivalent Chia RPC:

WalletConnect RPCChia Wallet RPCDescription
getTransactionget_transactionGet a transaction's details from its ID
getWalletBalanceget_wallet_balanceObtain the balance (and related info) from a wallet
getCATAssetIdcat_get_asset_idRetrieve a the asset ID from a CAT wallet
getNFTsnft_get_nftsShow all NFTs in a given wallet
getNFTInfonft_get_infoGet info about an NFT
getNFTCountnft_count_nftsCount the number of NFTs in a wallet
LogInlog_inLog into the wallet with the specified key
SignMessageByIdsign_message_by_idSign a message using a DID or NFT ID without incurring an on-chain transaction
SignMessageByAddresssign_message_by_addressSign a message using an XCH address without incurring an on-chain transaction
CreatNewCATWalletcreate_new_wallet*Create a new wallet for CATs (* for the Chia wallet RPC, you must specify a wallet_type of cat_wallet)
addCattoken
VerifySignatureverify_signatureGiven a public key, message and signature, verify if it is valid
getAllOffersget_all_offersShow the details of all offers for this wallet
getOffersCountget_offers_countObtain the number of offers from the current wallet
checkOfferValiditycheck_offer_validityCheck if an offer is valid
getOfferSummaryget_offer_summaryShow a summary of an offer
getOfferDataget_offerShow the details of one offer
getOfferRecordget_all_offersShow the details of all offers for this wallet
transferNFTnft_transfer_nftTransfer an NFT to a new wallet address
SendTransactionsend_transactionSend a transaction
waitForConfirmation
CreateOfferForIDscreate_offer_for_idsCreate a new offer
CancelOffercancel_offerCancel an offer
CheckOfferValiditycheck_offer_validityCheck if an offer is valid
takeOffertake_offerTake an offer
SpendCatcat_spendSend CAT funds to another wallet
getWalletsget_walletsShow all wallets associated with the current fingerprint, including (by default) coin information
getCurrentAddressget_next_address*Set new_address to false to use the current address
getNextAddressget_next_address*Set new_address to true to create a new address
getSyncStatusget_sync_statusShow whether the current wallet is syncing or synced