@web3jskit/dapp
TypeScript icon, indicating that this package has built-in type declarations

1.3.8 • Public • Published

@web3jskit/dapp

Introduction

@web3jskit/dapp is an interface layer that communicates with Gel.Wallet. By integrating @web3jskit/dapp, web2 and web3 developers can easily use multi-chain wallets.

Documentation

Full documentation

Usage

import { Web3Kit, ChainType } from "@web3jskit/dapp";

// Web3Kit uses a singleton, multiple instances of new Web3Kit() will not cause memory consumption

// Example of getting user balance
function example() {
  const web3Kit = new Web3Kit();
  web3Kit.request({
    chainType: ChainType.PUT,
    methodName: "connect",
  });
}

// Send Connect And SignMessage
function multiple() {
  const web3Kit = new Web3Kit();
  const response = await web3Kit.multipleRequest({
    chainType: ChainType.PUT,
    events: [
      {
        methodName: "connect",
      },
      {
        methodName: "signMessage",
        params: {
          message: "", // base58
          display: "utf8",
        },
      },
    ],
  });
}

Readme

Keywords

none

Package Sidebar

Install

npm i @web3jskit/dapp

Weekly Downloads

11

Version

1.3.8

License

none

Unpacked Size

4.06 MB

Total Files

67

Last publish

Collaborators

  • robin.put