Setting up your React App

Install Dependencies

As mentioned on the previous page, we will be interacting with the Exodus Bitcoin Wallet Standard, as well as Sats Connect. Let's go ahead and install the dependencies we'll need off the bat.

npm i @exodus/[email protected] @exodus/[email protected] @wallet-standard/[email protected] [email protected]

Wrap your application in the Wallet Standard Provider

The WalletStandardProvider is a React context provider from @wallet-standard/react, designed to interface with cryptocurrency wallets, specifically focusing on Bitcoin (BTC) transactions in this context. It abstracts wallet interactions, providing a standardized way to connect to, manage, and perform transactions with BTC wallets.

import { WalletStandardProvider } from '@wallet-standard/react';
import { ConnectionStatusProvider } from './ConnectionStatus';
import type { FC, ReactNode } from 'react';
import React from 'react';

export const AppContext: FC<{ children: NonNullable<ReactNode> }> = ({ children }) => {
    return (
        <WalletStandardProvider>
            <ConnectionStatusProvider>{children}</ConnectionStatusProvider>
        </WalletStandardProvider>
    );
};

}