Fuelet | Wallet on Fuel
  • Introduction
  • Intergration guide
    • Intro
    • Detecting wallet presence
    • Selecting Fuelet as a connector
    • Best practice
    • Audit and Security Assurance
  • Wallet API
    • Intro
    • Connecting
    • Getting current account
    • Getting current network
    • Signing messages
    • Sending transactions
    • Events
  • Resources
    • Media Kit
Powered by GitBook
On this page
  1. Intergration guide

Detecting wallet presence

To begin integrating with Fuelet Wallet, you first need to install the packages @fuel-wallet/sdk and fuels.

npm install @fuel-wallet/sdk fuels

With these dependencies installed you're able to create a Fuel object to interact with any supported wallet on Fuel:

import {
  Fuel,
  FuelWalletConnector,
  FueletWalletConnector,
} from "@fuel-wallet/sdk";

const fuel = new Fuel({
  connectors: [
    new FueletWalletConnector(),
    new FuelWalletConnector(),
  ],
});

To detect that Fuelet wallet is installed you need to specify FueletWalletConnector when creating an instance of Fuel and then check the status of the needed connector:

const fuel = new Fuel({connectors: [new FueletWalletConnector()]});
const connectors = await window.fuel.connectors();
const fueletWalletInstalled = connectors.find((c) => {
  return c.name === 'Fuelet Wallet';
})?.installed ?? false;

Last updated 8 months ago

See more on .

SDK documentation page