@hot-labs/wibe3
v1.0.33
Published
Wibe3 is chain agnostic connector with omni payments
Readme
Wibe3
yarn add @hot-labs/wibe3 react react-dom
Multi-chain connector for NEAR Intents support. Implements NEAR Intents support for the following networks:
- NEAR
- EVM
- Solana
- TON
- Stellar
- Cosmos
Also supported: Passkey accounts and Google Auth via HOT MPC Network
Vite: Node polyfills and React plugins
Wibe3 require you to install node polyfills and react to work, for vite you need to complete the following extra steps:
npm install vite-plugin-node-polyfills @vitejs/plugin-react
Then in your vite.config.ts add this plugins:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";
export default defineConfig({
plugins: [nodePolyfills(), react()],
});Getting started
import { HotConnector } from "@hot-labs/wibe3";
const connector = new HotConnector({
// optional for WalletConnect
projectId: "1292473190ce7eb75c9de67e15aaad99",
// optional for WalletConnect
metadata: {
name: "Example App",
description: "Example App",
url: window.location.origin,
icons: ["/favicon.ico"],
},
});
connector.onConnect(({ wallet }) => {});
connector.onDisconnect(({ wallet }) => {});Server side usage
import { Intents, OmniToken } from "@hot-labs/wibe3/server";
await Intents.builder //
.give(OmniToken.USDT, 1)
.take(OmniToken.USDC, 1)
.attachCommitment(signedCommitment)
.attachSigner({ ed25519PrivateKey: Buffer }) // omniAddress as optional, default use hex of public key
.execute(); // or sign or simulate