---
title: 'Adding support for 99starz Wallet'
disqus: hackmd
---
Adding support for 99starz Wallet
===
## Table of Contents
[TOC]
## Detecting 99starz Wallet
To verify if the 99starz wallet is installed as a browser extension, use the code snippet below:
```javascript=
if (typeof window.starzwallet !== 'undefined') {
console.log('99starz Wallet is installed!');
}
```
## Detecting Wallet connection
To check if wallet is connected, use the code snippet below.
```javascript=
if (starzwallet.isConnected()) {
console.log('99starz Wallet is connected!');
}
```
## Requesting Accounts
To connect to or requesting accounts from 99starz Wallet, use the code snippet below.
```htmlembedded=
<button class="btn-connect">Connect To 99starz</button>
```
and in your javascript you can do like this
```javascript=
const connectBtn = document.querySelector('.btn-connect');
connectBtn.addEventListener('click', async () => {
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
const account = accounts[0];
console.log(account) // connected account
});
```
## Using with web3 libraries
### Web3 Js
```javascript=
import Web3 from 'web3';
const web3 = new Web3(window.starzwallet)
```
### Ethers Js
```javascript=
import { ethers } from 'ethersjs';
const provider = ethers.providers.Web3Provider(window.starzwallet)
```