3.2 HNDL Wallet

Introduction

As we develop our own HNDL Wallet App, this document explains its functionality and provides insights into integrating the HNDL ecosystem into your own wallet application. The HNDL Wallet App serves as our primary example throughout this explanation.

Sending and Receiving

The concept revolves around a transactional process involving two users, USER A (the sender) and USER B (the receiver), facilitated by a specialized wallet application named the HNDL Wallet App. This application manages transactions in both Bitcoin (BTC) and a tokenized version of Bitcoin on the Rootstock network (RBTC).

Here’s how it works:

  1. Wallet Application: The HNDL Wallet App serves as the interface for USER A to initiate transactions. It interacts with both Bitcoin and Rootstock networks to facilitate these transactions.

  2. Transaction Initiation: USER A can send either BTC or RBTC to USER B. The choice between BTC and RBTC determines which network the transaction will occur on.

  3. Token-Bound Accounts (TBA): The process involves resolving Token-Bound Account addresses through a registry mechanism. This ensures that transactions are correctly routed to the intended recipient on the appropriate blockchain network (Bitcoin or Rootstock).

  4. Blockchain Processing: Once initiated, the transaction details are processed on the Bitcoin and Rootstock networks. This includes verifying the transaction, updating balances, and ensuring the secure transfer of funds from USER A to USER B.

  5. Contract Interactions: Various smart contracts, such as the ERC6551 Registry Contract, HandleTBA Registry Contract, and HNDL Contract, play a role in managing and validating these transactions. They help resolve addresses, manage token identities, and ensure compliance with transaction protocols.

Overall, this setup enables secure and efficient cross-network transactions between users, leveraging both traditional Bitcoin transactions and tokenized versions on the Rootstock network, all managed through a single integrated wallet application.

Set Bitcoin Addresses and Computes TBA Address

The flowchart illustrates a transaction process where USER B uses the HNDL Wallet App to link the handle name "satoshi.₿" with the Bitcoin address "1A1z...DivfNa" and shows how the TBA address "0xA1...DivfNa" is computed associated with the handle. Here’s how it operates:

  1. Wallet Application (HNDL Wallet App): USER B executes the setBTCAddress function within the HNDL Wallet App, linking the handle "satoshi.₿" to the Bitcoin address "1A1z...DivfNa". The Bitcoin address is generated separately by the HNDL Wallet App.

  2. Bitcoin Address: This address (e.g., 1A1z...DivfNa) originates from the HNDL Wallet App and is associated with the handle "satoshi.₿". It's important to note that the ERC6551 Registry Contract specifically computes the Token-Bound Account (TBA) address on the Rootstock network, not the Bitcoin address.

  3. HandleTBA Registry Processing: Manages Token-Bound Accounts (TBA) data through smart contracts such as ERC6551 Registry Contract, HandleTBA Registry Contract, and HNDL Contract. These contracts resolve TBAs and manage the association between TBAs and Bitcoin addresses, ensuring accurate transaction routing.

  4. Transaction Flow: USER B initiates the transaction through the HNDL Wallet App, which collaborates with HandleTBA Registry Processing. This collaboration resolves both the TBA address (on Rootstock) and the associated Bitcoin address for transactions involving "satoshi.₿".

  5. Smart Contract Interaction: The ERC6551 Registry Contract identifies the token ID and computes the corresponding TBA address "0xA1...DivfNa" on Rootstock. Meanwhile, the HandleTBA Registry Contract manages the TBA associated with the handle "satoshi.₿" based on the token ID.

This setup ensures secure and efficient handling of transactions using tokenized assets like "satoshi.₿" on the Rootstock network. It leverages the capabilities of a robust wallet application and integrates smart contracts effectively to manage token binding and transaction execution across different blockchain networks.

Last updated