Get started
This section is for builders (dApps, tooling, wallets). If you’re just using apps, start with:
You will need
- Node.js >= 20
- A Catalyst JSON-RPC URL
Steps
1) Install the SDK
note
@catalyst/sdk is a TypeScript package that is intended to be published to npm.
If the package is not published yet, use the repo-based workflow below (clone + build) or use the deploy CLI directly:
- Deploy a contract (uses
catalyst-sdkCLI)
Option A: npm (when published)
npm install @catalyst/sdk
Option B: repo (works today)
git clone https://github.com/catalyst-network/catalyst-sdk
cd catalyst-sdk
npm install
npm run build
2) Connect to RPC and fetch the tx signing domain
import { RpcClient, getTxDomain } from '@catalyst/sdk';
const client = new RpcClient('https://testnet-eu-rpc.catalystnet.org');
const domain = await getTxDomain(client);
console.log({
chainId: `0x${domain.chainId.toString(16)}`,
networkId: domain.networkId,
genesisHashLen: domain.genesisHash.length,
});
Verify
Your domain fetch should succeed and genesisHashLen should be 32.
Next steps
Troubleshooting
- Intermittent signature failures behind a load balancer: ensure you use
getTxDomain(single-call domain) rather than fetching chain identity via multiple RPC calls. - Wrong network: compare
network_id/chain_idagainst the wallet defaults (testnet) before signing.