Wrap the SDK's chain reads + subscriptions in idiomatic React hooks. Ship as a sibling package (@sentriscloud/sdk-ts-react) or sub-export so dApp builders don't have to write the useEffect/useState dance themselves.
Scope
useChainTip() — current height, auto-updating via newHeads subscription
useBlock(blockNumber | hash) — fetch + cache a block
useBalance(address) — native or ERC-20 balance, re-fetches on new block
useTransaction(hash) — tx + receipt
useSendTransaction() — write hook with wallet integration
- Internal cache layer (React Query underneath, optional)
Why
Every dApp on Sentrix reimplements these. A canonical package = consistent UX + faster build time.
Out of scope
- Wallet connector logic (WalletConnect / RainbowKit) — those have their own libraries; this package consumes their connection result
- Storybook / docs site — separate effort
Wrap the SDK's chain reads + subscriptions in idiomatic React hooks. Ship as a sibling package (
@sentriscloud/sdk-ts-react) or sub-export so dApp builders don't have to write the useEffect/useState dance themselves.Scope
useChainTip()— current height, auto-updating via newHeads subscriptionuseBlock(blockNumber | hash)— fetch + cache a blockuseBalance(address)— native or ERC-20 balance, re-fetches on new blockuseTransaction(hash)— tx + receiptuseSendTransaction()— write hook with wallet integrationWhy
Every dApp on Sentrix reimplements these. A canonical package = consistent UX + faster build time.
Out of scope