> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turnkey.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CosmJS

> [`@turnkey/cosmjs`](https://www.npmjs.com/package/@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](https://github.com/tkhq/sdk/tree/main/packages/cosmjs) for more details and examples.

```js theme={"system"}
// Initialize a Turnkey Signer
const 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;
```
