Actalink Docs

Setup & Installation

@actalink/react-hooks provides hooks to integrate Actalink Smart Accounts into dApps seamlessly.

Follow the 5 steps mentioned below to set up and install @actalink/react-hooks:

  1. Create a nextjs typescript project
npx create-next-app@latest
  1. On installation, ensure prompts are as defined per below
What is your project named? my-app
Would you like to use TypeScript? No / Yes
Would you like to use ESLint? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to use Turbopack for `next dev`?  No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
What import alias would you like configured? @/*
  1. Install wagmi and its related dependencies
cd my-app
npm install wagmi@2.14.7 viem@2.21.55 @tanstack/react-query
  1. Create wagmi config file inside src/ folder of your project
// src/wagmi.ts
import { http, createConfig } from "wagmi";
import { polygon } from "wagmi/chains";
 
export const config = createConfig({
  chains: [polygon],
  transports: {
    [polygon.id]: http(),
  },
});
  1. Install @actalink/react-hooks .
npm install @actalink/react-hooks