1.0.0 • Published 7 months ago

@okto_wallet/okto-connect-sdk v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

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

  1. 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
  2. Generate a WalletConnect Project ID from WalletConnect Dashboard.

  3. 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.

  4. Add oktoConnector to wagmi config.

    const config = createConfig({
      connectors: [
        oktoConnector,
        ...
      ],
      ...
    });
  5. 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
Screenshot of Okto Connect Modal on Desktop