Connecting to the Wallet
Last updated
Last updated
This function is designed to initiate the connection process to a user's Bitcoin wallet. It leverages the to request a user's payment address (native segwit) and ordinals/runes address (taproot).
It makes use of the getBtcProvider
method we defined in .
Once resolved, the method returns an array of the user’s wallet address objects, defined as:
Where:
address
The user’s connected address
publicKey
A hex string representing the bytes of the public key of the account.
purpose
The purpose of the address:
payment
is used to manage the user’s bitcoin
ordinals
is used to manage the user’s ordinals
The getAddresss
method returns a that resolves if the user approves the connection request.