docs ⦿ dedot 🧑‍💻
DedotXTelegramGithub
typink ✏️
typink ✏️
  • Welcome to Typink
  • Introducing Typink
  • Getting started
    • Start a new dapp
    • Migrate from existing dapp
    • Supported networks
  • create-typink CLI
  • Hooks & Providers
    • TypinkProvider
    • useTypink
    • useContract
    • useContractQuery
    • useContractTx
    • useDeployer & useDeployerTx
    • useWatchContractEvent
    • useBalance & useBalances
    • usePSP22Balance
  • Utilities
    • formatBalance
    • txToaster
    • dedot/utils
  • HELP & FAQ
    • Tutorials
      • Develop ink! dApp using Typink
  • Telegram
  • Github
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Hooks & Providers

useTypink

useTypink to access various shared states from TypinkProvider, you will probably use this a lot when accessing current connected account or network information ...

// ...
const { 
  accounts, // list available accounts connected from the wallet
  connectedAccount, // connected account to interact with contracts & networks
  network, // current connected network info
  client, // Dedot clients to interact with network
  deployments, // contract deployments
  connectedWallet, // connected wallet
  connectWallet, // func to connect to a wallet given its id
  disconnect, // func to sign out and disconnect from the wallet
  wallets, // available wallets
  ...
} = useTypink();
// ...

PreviousTypinkProviderNextuseContract

Last updated 3 months ago

Was this helpful?