Integrate Particle Account Abstraction
Introduction to BTC Connect: Configuration
yarn add @particle-network/connectkit @particle-network/chains
# OR
npm install @particle-network/connectkit @particle-network/chainsimport React from 'react';
import ReactDOM from 'react-dom/client';
import {
ConnectProvider,
OKXConnector,
BitgetConnector,
UnisatConnector,
} from '@particle-network/btc-connectkit';
import { BSquaredTestnet } from '@particle-network/chains';
import App from './App';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<ConnectProvider
options={{
projectId: process.env.REACT_APP_PROJECT_ID, // --
clientKey: process.env.REACT_APP_CLIENT_KEY, // Retrieved from https://dashboard.particle.network
appId: process.env.REACT_APP_APP_ID, // --
aaOptions: {
accountContracts: {
BTC: [
{
chainIds: [BSquaredTestnet.id],
version: '1.0.0', // Will always be 1.0.0 for now
},
],
},
},
walletOptions: {
visible: true, // Determines whether or not a dedicated wallet interface for the smart account is shown
}
}}
connectors={[new UnisatConnector(), new OKXConnector(), new BitgetConnector()]}
>
<App />
</ConnectProvider>
</React.StrictMode>
);Introduction to BTC Connect: General Usage
Learn More
Last updated