@turnkey/cosmjs exports a TurnkeyDirectWallet that serves as a drop-in replacement for a CosmJS direct wallet. It includes support for signDirect. See full implementation here for more details and examples.
Copy
Ask AI
// Initialize a Turnkey Signerconst turnkeySigner = await TurnkeyDirectWallet.init({ config: { ... }, prefix: "celestia", // can be replaced with other Cosmos chains});const account = refineNonNull((await turnkeySigner.getAccounts())[0]);const compressedPublicKey = toHex(account.pubkey);const selfAddress = account.address;