Docs

TrustWallet

A wallet configurator for Trust to integrate the wallet with the React Native SDK

import { trustWallet } from "@thirdweb-dev/react-native";
const trustConfig = trustWallet(options);

options

Usage with ConnectWallet

To allow users to connect to this wallet using the ConnectWallet component, you can add it to ThirdwebProvider's supportedWallets prop.

<ThirdwebProvider
supportedWallets={[trustWallet()]}
clientId="your-client-id"
>
<YourApp />
</ThirdwebProvider>;

Usage with useConnect

you can use the useConnect hook to programmatically connect to the wallet without using the ConnectWallet component.

The wallet also needs to be added in ThirdwebProvider's supportedWallets if you want the wallet to auto-connect on next page load.

const trustConfig = trustWallet();
function App() {
const connect = useConnect();
const handleConnect = async () => {
await connect(trustConfig, connectOptions);
};
return <View> ... </View>;
}

connectOptions

{ chainId?: number } | undefined