Skip to main content

Getting Started

To develop for Hoogii, install Hoogii on Chrome Web Store.

Detecting Hoogii Installation

To easily verify if Hoogii Wallet is properly installed for development, navigate to any web page, and copy the following code segment and paste it in the development console of the browser:

if (window.chia.hoogii && window.chia.hoogii.isHoogii) {
console.log('Hoogii is installed!');

We inject an object to window.chia.hoogii, and additionally add a variable window.chia.hoogii.isHoogii to label the extension as Hoogii Wallet. Note that any wallet can unverifiably label their isHoogii to be true and pretend to be Hoogii, so it is up to the developers to make sure they are activating the right extension.

Connecting to Hoogii

To start accessing user's account or interacting with Hoogii, it is necessary to first establish a connection to Hoogii. On connection request, there are several steps users will have to complete for a proper authorization:

  1. We ask users to unlock their Hoogii wallet with the password they created. Note the wallet is password-locked every 15 minutes without activity or when the application request it be locked.

  2. Users are then prompted to add the web application to their allowlist. Further connection requests from the requested domain are automatically allowed, unless the user delete the domain from the allowlist.

The command to connect to Hoogii looks like:

const connected = await window.chia.hoogii.request({ method: 'connect' });

Once connected, you can start to enjoy an array of functionalities to access the users' wallet, interact with the Chia Blockchain on users' behalf, and retrieve information from the blockchain, all provided by the Hoogii Wallet.