GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - phgoff/wagmi-bitkubnext-connector

BranchesTags
Open more actions menu

Latest commit

 

History

58 Commits
58 Commits

Folders and files

NameName
Last commit message
Last commit date
.changeset
.changeset
 
 
.github/workflows
.github/workflows
 
 
example/pages
example/pages
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.prettierrc
.prettierrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Wagmi Bitkubnext Connector

Use a bitkubnext wallet as a wagmi connector!

  • BitkubNextConnector - Wagmi connector for bitkubnext
  • BitkubNextCaller - To interact with smart contracts on bitkubnext

Installation

npm install wagmi-bitkubnext-connector

Usage

import { createClient } from "wagmi";
import { BitkubNextConnector, BitkubNextCaller } from "wagmi-bitkubnext-connector";


export const bitkubnextCaller = new BitkubNextCaller({
  clientId: // <YOUR_CLIENT_ID>,
  networkMode: // <YOUR_NETWORK_MODE>,
  oauthRedirectURI: //<YOUR_REDIRECT_URI>,
});

const client = createClient({
  connectors: [
    new BitkubNextConnector({
      options: {
        clientId: // <YOUR_CLIENT_ID>,
        networkMode: // <YOUR_NETWORK_MODE>,
        oauthRedirectURI: //<YOUR_REDIRECT_URI>,
      },
    }),
  ],
});

API

options

Key Value Required Example
networkMode testnet,mainnet true testnet
clientId string true XXXXXX
oauthRedirectURI string true http://localhost:3000/oauth/callback

Set up callback pages

You will need to set up a callback pages before using the connector and caller.

BitkubnextConnector

  1. create a callback page at /pages/oauth/callback.tsx
  2. set up a callback page to receive the access token and login to the wallet.

BitkubNextCaller

  1. create a callback folder /pages/callback
  2. set up these callback pages to send the transaction.

Send transaction

async function handleSendTransaction() {
  await bitkubnextCaller.send({
    contractAddr: "",
    methodName: "",
    methodParams: [""], // don't need to add sender to params
  });
}

Contribute

Feel free to contribute. Pull requests and issues are welcome!

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.