Tokenbound Connectkit
ERC-6551 gives NFTs unimaginable capabilities. They empower NFTs to do everything a normal wallet can do. But connecting to accounts and executing transactions might be a little bit more complex, as the __execute__ method can only be called by the owner of the NFT bound to the Tokenbound account.
With this connectorKit, dApps can enable tokenbound accounts to seamlessly connect and use their dApps like every normal account on Starknet.
To get started:
- Install the
tokenbound-connector dependency:
npm install tokenbound-connector
- Import all neeeded methods:
import { TokenboundConnector, TokenBoundModal, useTokenBoundModal } from "../index";
- import the existing methods in the
useTokenBoundModal hook:
const {
isOpen,
openModal,
closeModal,
value,
selectedOption,
handleChange,
handleChangeInput,
resetInputValues,
} = useTokenBoundModal();
- Create all needed functions, then instantiate the connector:
const tokenbound = new TokenboundConnector({
tokenboundAddress: value,
parentAccountId: selectedOption,
});
PS: connector would be made available for easy use from starknetkit.