wallet-connect-button-react
v1.1.10
Published
A React component for NL Wallet integration
Maintainers
Readme
wallet-connect-button-react
A React component for NL Wallet integration.
Installation
npm install wallet-connect-button-reactUsage
- Import the component in your React app:
import { WalletConnectButton } from 'wallet-connect-button-react';- Use the component in your JSX:
<WalletConnectButton
clientId="your-client-id"
apiKey="your-api-key"
walletConnectHost="https://wallet-connect.eu"
onSuccess={(attributes) => console.log('Success:', attributes)}
>
Connect Wallet
</WalletConnectButton>- Handle the success callback in your component:
const handleWalletSuccess = (attributes: any) => {
console.log('Wallet connected successfully:', attributes);
};API
Props
clientId: string- Required. Your client ID for wallet connectiononSuccess: (attributes: AttributeData | undefined) => void- Required. Callback function called when wallet connection succeedsapiKey?: string- Optional. API key for authenticationwalletConnectHost?: string- Optional. Custom wallet connect host URL (defaults to https://wallet-connect.eu)children?: React.ReactNode- Optional. Custom button content
For further explanation and documentation, visit: https://wallet-connect.eu
