React wrappers, hooks, components, and utilities for Router Protocol's Tangled SDK. Enable crosschain interactions with your DApp with the Tangled SDK. Compatbile with Next.js 13 and React 18.
Built with @shadcn/ui and tailwind so you can paint it your way :D
yarn add @tangled3/react
OR
pnpm i @tangled3/react
import { QueryClient, QueryClientProvider } from 'react-query';
import { TangledProvider } from '@tangled3/react';
export default function App({ Component, pageProps }) {
return (
<QueryClientProvider client={new QueryClient()}>
<TangledProvider
config={{
projectName: 'multi chain project',
chainConfigs: {},
// chains
}}
>
<Component {...pageProps} />
</TangledProvider>
</QueryClientProvider>
);
}
- EVM
- Solana
- Tron
- Cosmos
- Near
- AlephZero
- Sui
- Bitcoin
πΈ - In Progress β - Supported β - Not Supported
Chain | Wallet Connection | Token Fetch | Transaction Handlers | Tx Watch | Tx Receipt |
---|---|---|---|---|---|
EVM | β | β | πΈ | πΈ | πΈ |
Solana | β | β | πΈ | πΈ | πΈ |
Tron | β | β | πΈ | πΈ | πΈ |
AlephZero | β | β | β | β | β |
Sui | πΈ | β | β | β | β |
Cosmos | β | β | β | β | β |
Near | β | β | β | β | β |
Bitcoin | β | β | β | β | β |
Casper | β | β | β | β | β |
Ton | β | β | β | β | β |
Algorand | β | β | β | β | β |
-
useChainsConfig
- config for all chains -
useChains
- data for all chains -
useChain
- data for a specific chain -
useChainId
- current chain id -
useWallet
- current wallet -
useWallets
- all wallets -
useAccount
- current account -
useWallet
- current wallet -
useWatchTransaction
- watch a transaction, return receipt and callback fns -
useSendTransaction
- send a transaction, return receipt -
useTransactionReceipt
- get a transaction receipt -
useNitroTransactionReceipt
- get a transaction receipt from Nitro explorer -
useReadContract
- read a contract -
useSignMessage
- sign a message with current connected account -
useToken
- get token data like name, symbol, decimals -
useTokenAddressData
- get token data for an account to get balance, allowance and permit information -
useTokens
- get token list for one/multiple chains -
useTransactionHistory
- get transaction history for an account stored in local storage
-
Connect Button
-
Account Dialog
-
Network Button
-
Network Selector Dialog
-
Crosschain Transaction Receipt
-
Receipt Status
-
Transaction Status
-
Transaction Progress
-
SIWE and similar