@zeek-wallet/react
v1.1.0
Published
A React gasless wallet infrastructure SDK for seamless dApp integration.
Maintainers
Readme
ZEEK WALLET REACT SDK
A gasless react wallet infrastructure that allows your users to authenticate into your application without wallets and gas fees (sponsored by you).
CHANGELOG (coming soon)
For changelog, kindly visit changelog.
Installation
npm install @zeek-wallet/reactUSAGE
Setup your integration by wrapping any React components that will use the zeek wallet SDK with the ZeekProvider. This gives your wrapped React components access to the zeek wallet SDK and all zeek contexts.
import { ZeekProvider } from '@zeek-wallet/react';
// how to use
function App() {
return (
<ZeekProvider clientId="<ZEEK-CLIENT-ID>">
// components to used in react app
</ZeekProvider>
);
}Now, from inside your React components, you can access the Zeek wallet SDK via the useZeek hook!
import { useZeek } from '@zeek-wallet/react';
function MyComponent() {
const { login, user } = useZeek();
return (
<div>
<button type="button" onClick={login}>Sign In</button>
<p>{user ? user.walletAddress : "Sign in to view your wallet address"}</p>
</div>
);
}