1.0.2 âĸ Published 1 year ago
tokenbound-connectorkit v1.0.2
đšī¸ Tokenbound ConnectKit
Houses the Tokenbound Connectkit.
The Tokenbound Connectkit enables users connect to existing Starknet dApps with their Tokenbound accounts.
Installation
Install tokenbound connectorKit with npm, pnmp or yarn
$ npm install tokenbound-connector
# or with yarn:
$ yarn add tokenbound-connectorImports
After installation, we get access to different methods, such as connect, disconnect, etc which we should import for use in our application:
import { connect, disconnect } from "tokenbound-connector"Establishing a connection
To establish a wallet connection, we need to call the connect method which was imported earlier like this:
const wallet = await connect()const connectTBA = async () => {
try {
const { wallet } = await connect({
tokenboundOptions: {
chainId: constants.NetworkName.SN_SEPOLIA,
}
});
} catch (e) {
console.error(e)
alert((e as any).message)
}
}Reconnect to a previously connected wallet on load:
const wallet = await connect({ modalMode: "neverAsk" })Disconnect a wallet
await disconnect()đ Guides
Guides can be found here
đ License
Copyright (c) 2024
Licensed under the MIT license.