Tailwind Connect is a wallet connection library for Tailwind wallet.
See full developer documentation at developer.tailwind.zone.
# install dependencies
pnpm install
# Typescript transpile
pnpm build
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
);