HOT Kit
HOT Kit is a powerful library for blockchain and omni-balance management. It supports both browser-based dApps and servers. Key features include
Last updated
HOT Kit is a powerful library for blockchain and omni-balance management. It supports both browser-based dApps and servers. Key features include
Last updated
import { HotConnector } from "@hot-labs/kit";
import { defaultConnectors } from "@hot-labs/kit/defaults";
import google from "@hot-labs/kit/hot-wallet";
import cosmos from "@hot-labs/kit/cosmos";
export const kit = new HotConnector({
apiKey: "Get on https://pay.hot-labs.org/admin/api-keys for free",
connectors: [...defaultConnectors, cosmos(), google()],
walletConnect: { // Get from dashboard.reown.com
projectId: "3cbf324S21f18648ed6153e2c324l2cf",
metadata: {
name: "App",
description: "Awesome App",
url: "https://app.com",
icons: ["https://app.com/logo.png"],
},
},
});kit.openProfile() // to open popup with profile
// Get balances
kit.walletsTokens.forEach(({ wallet, token, balance }) => {
console.log(wallet.address, `${token.float(balance)} ${token.symbol}`)
})
// Refresh balances
const evmWallet = kit.evm // if connected or null
await kit.fetchTokens(evmWallet)
kit.openBridge() // to open popup with bridge
// Or use manual
const review = await kit.exchange.reviewSwap({ .. }) // get qoute
await kit.exchange.makeSwap(review) // do it!