Getting Started

Install

yarn:

yarn add @hatsprotocol/hats-account-sdk viem

npm:

npm install @hatsprotocol/hats-account-sdk viem

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

HatsAccount1ofNClient Initialization

Import and initialize HatsAccount1ofNClient:

import { HatsAccount1ofNClient } from "@hatsprotocol/hats-account-sdk";

const hatsAccount1ofNClient = new HatsAccount1ofNClient({
    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