Support Tailwind in 5 minutes

1

Download Cosmoskit's Tailwind wallet adapter.

yarn add @tailwindzone/connect
2

Get wallet and signer from window, and pass to CosmJS for signing.

Tailwind has the same API as Keplr wallet using the keplr attribute of wallet below. Make sure Package version is at least 2.2.0.

import { connect } from "@tailwindzone/connect";
import { SigningStargateClient } from "@cosmjs/stargate";

const onSignClick = async () => {
  // wallet.keplr is the same as window.keplr
  // wallet.getOfflineSigner is the same as window.getOfflineSigner
  const wallet = await connect();
  const signer = wallet.getOfflineSigner("pacific-1");

  const [account] = await signer.getAccounts();
  const client = await SigningStargateClient.connectWithSigner(
    "https://rpc.sei.network",
    signer
  );
  const res = await client.signAndBroadcast(
    account.address,
    [msg],
    fee,
    memo
  );
}
3

Done!

Tailwind is now supported! To use our 1-click source funds and gas API, please follow the next section.