@okto_wallet/okto-connect-sdk v1.0.0
Okto Connect SDK
The Okto Connect SDK is a software package designed to simplify the integration of the "Connect with Okto" in your dapp. It currently supports integration with wagmi
and libraries using wagmi internally.
Usage
Install the package in your project using your preferred package manager. For example, using npm:
npm install @okto_wallet/okto-connect-sdk
or using yarn:
yarn add @okto_wallet/okto-connect-sdk
Generate a WalletConnect Project ID from WalletConnect Dashboard.
Import and initialize the connector in your application:
import { OktoConnector } from "@okto_wallet/okto-connect-sdk"; const oktoConnector = new NewOktoConnector({ chains, options: { projectId: "WALLET_CONNECT_PROJECT_ID", }, }); ;
Replace
WALLET_CONNECT_PROJECT_ID
with your WalletConnect Project ID.Add
oktoConnector
to wagmi config.const config = createConfig({ connectors: [ oktoConnector, ... ], ... });
Now you use the default wagmi hooks to intract with OktoConnect, such as
connect
hook to initialise OktoConnect. More ingormation about hooks can be found in official wagmi documentation.
Screenshot
Screenshot of Okto Connect Modal on Desktop
7 months ago
8 months ago
8 months ago
8 months ago
9 months ago