Skip to main content

Detect Nightly

In order to detect Nightly Wallet in your iota app we recommend you use the @iota/wallet-standard package, like so.

Before fetching detected wallets, install the package by running the following command in

your terminal

# Using NPM
npm i @iota/wallet-standard
# Using Bun
bun add @iota/wallet-standard

After installing the package use this code to get access to all detected wallets.

import { getWallets } from '@iota/wallet-standard'

const { get } = getWallets()
const allWallets = get()

Then, to filter out the wallets that aren't compatible with the iota standard.

import { isWalletWithRequiredFeatureSet } from '@iota/wallet-standard'

const iotaWallets = allWallets.filter(wallet =>
isWalletWithRequiredFeatureSet(wallet, ['iota:signAndExecuteTransaction', 'iota:signTransaction'])
)

Now, after finding the Nightly wallet in the iotaWallets object, you will have access to all of the functions such as connect, which we will talk about in the next section.


Accessing the nightly object is also possible by finding the nightly.iota object on the window.

const nightlyIota = window.nightly?.iota