One seamless wallet connect for your Ordinals dApp
Unleashing the next wave of developers on Bitcoin Ordinals
Unleashing the next wave of developers on Bitcoin Ordinals
yarn
yarn add @omnisat/lasereyes
Wallet Support ๐๏ธ
Get all leading walleting into your Ordinals frontend
Modular ๐งฉ
Composable modules to build applications & libraries with speed
Performant ๐
Quickly create new Bitcoin Ordinal dApps
Typed APIs ๐
Flexible programmatic APIs with extensive TypeScript typing
Overview
Wrap a top-level component with LaserEyesProvider
.
// MUST be rendered client-side
import { LaserEyesProvider } from '@omnisat/lasereyes'
import ConnectWallet from '@/components/ConnectWallet'
function App() {
return (
<LaserEyesProvider config={{
network: 'mainnet'
}}>
<ConnectWallet />
</LaserEyesProvider>
)
}
Then, use the useLaserEyes
hook to access the context in any child component.
import { LEATHER, UNISAT, XVERSE, useLaserEyes } from '@omnisat/lasereyes';
function ConnectWallet() {
const { connect, disconnect } = useLaserEyes();
return (
<>
<button onClick={() => connect(LEATHER)}>Connect Wallet</button>
<button onClick={() => connect(UNISAT)}>Connect Wallet</button>
<button onClick={() => connect(XVERSE)}>Connect Wallet</button>
<button onClick={disconnect}>Disconnect Wallet</button>
</>
);
}
Check out Getting Started for more details.
Features
Laser Eyes supports all these features out-of-the-box: - Support for multiple Bitcoin wallets: Leather, Unisat, and XVerse - Easy-to-use React context - Network switching between mainnet and testnet - Comprehensive wallet operations including balance checking, transaction signing, and message signing - TypeScript support
Example
Try Example
Community
Check out the following places for more laser eyes - related content:
- Follow @0xBunzy, @hathbanger
- Join the discussions on GitHub
- Share your project/organization that uses Laser Eyes
Support
Help support future development and make laser eyes a sustainable open-source project: