# Documentation - [Introduction](/docs): React hooks and Vue composables for Polkadot apps - [Getting started](/docs/getting-started): Install use-truapi, configure the provider and run your first query - [Provider & runtime](/docs/provider): TruapiProvider, TruapiPlugin, useRuntime and the QueryClient - [AI-assisted development](/docs/ai): Install the use-truapi agent skill and point coding agents at the docs - **Hooks** - Chain: Typed chain access: clients, queries, subscriptions - [useChainClient](/docs/chain/use-chain-client): The raw PAPI PolkadotClient for a configured chain - [useTypedApi](/docs/chain/use-typed-api): The descriptor-typed PAPI api for a configured chain - [useChainQuery](/docs/chain/use-chain-query): One-shot read against the typed api, cached by chain and deps - [useChainSubscription](/docs/chain/use-chain-subscription): Live subscription to any typed-api observable, shared - [useBlockNumber](/docs/chain/use-block-number): Best-block number of a chain, live - [useBalance](/docs/chain/use-balance): Live native balance of an address, in planck - [useChainSpec](/docs/chain/use-chain-spec): Chain name and properties as reported by the host - Accounts: Wallet connection, account selection and signing - [useAccounts](/docs/accounts/use-accounts): Wallet state plus connect, disconnect and select in one hook - [useSelectedAccount](/docs/accounts/use-selected-account): The currently selected account, or null - [useConnect](/docs/accounts/use-connect): Connect a wallet, with per-call pending and error state - [useDisconnect](/docs/accounts/use-disconnect): Disconnect the wallet and clear account state - [useSigner](/docs/accounts/use-signer): The PolkadotSigner of the selected account, or null - [useLogin](/docs/accounts/use-login): RFC-0009 host login, called from a user gesture - [useUserId](/docs/accounts/use-user-id): The user's primary DotNS username, or null - [useSignRaw](/docs/accounts/use-sign-raw): Sign arbitrary bytes with the selected account - Transactions: Sign, submit and watch transactions - [useTx](/docs/tx/use-tx): Sign, submit and watch a transaction - [useBatchTx](/docs/tx/use-batch-tx): Submit several calls as one transaction via Utility.batch_all - Contracts: PolkaVM smart contracts: typed handles, reads and transactions - [useContract](/docs/contracts/use-contract): Typed PolkaVM contract handle from a cdm.json manifest - [useContractAt](/docs/contracts/use-contract-at): Ad-hoc contract handle from an H160 address and an ABI - [useContractQuery](/docs/contracts/use-contract-query): Read-only contract call, a ReviveApi dry-run cached like any query - [useContractTx](/docs/contracts/use-contract-tx): Contract write with dry-run pre-flight, then sign, submit and watch - [useEnsureAccountMapped](/docs/contracts/use-ensure-account-mapped): Idempotent pallet-revive account mapping, required once before contract transactions - Host: Host detection, theme, permissions, navigation, notifications and KV storage - [useHostMode](/docs/host/use-host-mode): Whether the app runs inside a host container, as a three-state string - [useIsHost](/docs/host/use-is-host): True once the app is known to run inside a host container - [useTheme](/docs/host/use-theme): Live theme, from the host when embedded and prefers-color-scheme standalone - [usePermission](/docs/host/use-permission): Request an RFC-0002 remote permission from the host - [useDevicePermission](/docs/host/use-device-permission): Request a device capability such as camera or notifications from the host - [useResourceAllocation](/docs/host/use-resource-allocation): Request RFC-0010 allowances from the host in one up-front prompt - [useHostNavigate](/docs/host/use-host-navigate): Host deep-link navigation, .dot routes in-container and https external - [useFeatureSupported](/docs/host/use-feature-supported): Probe the host for support of a feature, such as a specific chain - [useDeriveEntropy](/docs/host/use-derive-entropy): Derive stable 32-byte secrets from the user's wallet (RFC-0007) - [useNotifications](/docs/host/use-notifications): Schedule and cancel host push notifications (RFC-0019) - [useHostStorage](/docs/host/use-host-storage): Product-scoped JSON key-value storage with a standalone fallback - Chat: Host chat rooms, live messages and bots - [useChatRoom](/docs/chat/use-chat-room): Register a chat room with the host, idempotently - [useChatBot](/docs/chat/use-chat-bot): Register a bot identity for posting into chat rooms - [useChatRooms](/docs/chat/use-chat-rooms): Rooms the product participates in, as a live list - [useChatMessages](/docs/chat/use-chat-messages): Live messages for a room, as a bounded accumulating list - [useChatActions](/docs/chat/use-chat-actions): Raw chat action stream (messages, button presses, commands) - [useSendChatMessage](/docs/chat/use-send-chat-message): Post a message into a chat room - Statements: Ephemeral pub/sub over the Polkadot statement store - [useStatements](/docs/statements/use-statements): Live statements on the app topic, accumulated into a bounded list - [usePublishStatement](/docs/statements/use-publish-statement): Publish small JSON payloads to the app topic - [useStatementChannel](/docs/statements/use-statement-channel): Last-write-wins channels for presence, cursors and ephemeral state - Payments: RFC-0006 payment balance, requests and top-ups - [usePaymentBalance](/docs/payments/use-payment-balance): Live RFC-0006 payment balance of the app's purse - [useRequestPayment](/docs/payments/use-request-payment): Ask the user to pay, with the host showing the confirmation UI - [useTopUp](/docs/payments/use-top-up): Fund the payment purse from a product account or provided keys - [usePaymentStatus](/docs/payments/use-payment-status): Track a payment id to its terminal state - Cloud storage: Bulletin-backed uploads and CID retrieval - [useUpload](/docs/storage/use-upload): Upload bytes to Bulletin-backed cloud storage and get a CID receipt - [useCid](/docs/storage/use-cid): Fetch CID content from cloud storage, as raw bytes or parsed JSON - [useStorageAuthorization](/docs/storage/use-storage-authorization): Cloud storage quota and authorization for the selected or given account - Formatting: Display helpers for planck amounts - [useFormattedBalance](/docs/format/use-formatted-balance): Format a planck bigint for display, memoized and null-safe