npm

@tailwindzone/connect
TypeScript icon, indicating that this package has built-in type declarations

2.4.3 • Public • Published

@tailwindzone/connect

Tailwind Connect is a wallet connection library for Tailwind wallet.

See full developer documentation at developer.tailwind.zone.

Getting Started

# install dependencies
pnpm install
# Typescript transpile 
pnpm build

Using the library

You can use Tailwind with its own interface or existing Keplr-compatible interface.

import { connect } from "@tailwindzone/connect"

// because CosmJS is the standard for client-side   
const wallet = await connect();
const signer = wallet.getOfflineSigner("osmosis-1", {
  fundsRequired: [{
    token: { denom: "uosmo", chain: "osmosis-1" },
    amount: "1000000",
  }],
  maxGas: 200_000,
  signMode: "direct"
});

// Sign tranasction
const [account] = await signer.getAccounts();
const client = await SigningStargateClient.connectWithSigner(
  OSMO_RPC_URL,
  signer
);
const res = await client.signAndBroadcast(
  account.address,
  [msg],
  fee,
  memo
);

Readme

Keywords

none

Package Sidebar

Install

npm i @tailwindzone/connect

Weekly Downloads

12

Version

2.4.3

License

ISC

Unpacked Size

16.3 kB

Total Files

19

Last publish

Collaborators

  • baoskee