Code Examples
Signing Transactions
This is a guide to signing transactions in the browser context. While these snippets leverage Ethers, it can be swapped out for other signers in the Viem or Solana contexts. See here for an example with both Ethers and Viem in the passkey + browser context, and here for a similar example with Solana.
Steps using @turnkey/sdk-react
This process is made the most seamless by leveraging our React package. Read on for a non-React implementation.
1
Initialize the React Provider
2
Initialize an Ethers Provider and Turnkey Signer using the Passkey Client
3
Call `sendTransaction` with the Turnkey Signer
Alternative Steps (non-React)
1
Initialize the Passkey Client
2
Initialize an Ethers Provider and Turnkey Signer
3
Call sendTransaction with the Turnkey Signer
Was this page helpful?