Getting Started

Install

yarn:

yarn add @hatsprotocol/hsg-sdk viem

npm:

npm install @hatsprotocol/hsg-sdk viem

The SDK uses Viem in order to interact with the various chains and includes it as a peer dependency.

HatsSignerGateClient Initialization

Import and initialize HatsSignerGateClient:

import { HatsSignerGateClient } from "@hatsprotocol/hsg-sdk";

const hatsSignerGateClient = new HatsSignerGateClient({
    publicClient,
    walletClient,
});

Arguments:

{
    publicClient: PublicClient;
    walletClient: WalletClient;
}
  • publicClient - A Viem Public Client, used for onchain read operations.

  • walletClient - A Viem Wallet Client, used for onchain write operations.

Last updated