AlloKit SDK
The AlloKit SDK is a TypeScript/JavaScript library that provides a simple interface for interacting with AlloKit smart contracts. It handles all the low-level blockchain interactions, making it easy to integrate grant pools, allocations, and distributions into your applications.
Features
- Pool Management: Deploy and configure grant pools
- Project Registration: Register projects and manage applications
- Review System: Approve or reject project applications
- Allocation & Distribution: Manage fund allocation and distribution
- Type Safety: Full TypeScript support with generated types
- Multi-Chain: Support for multiple EVM-compatible chains
Core Concepts
Pool Lifecycle
- Deploy: Create a new grant pool with specific configuration
- Configure: Update pool settings and parameters
- Register: Projects apply to join the pool
- Review: Pool admins approve or reject applications
- Allocate: Determine funding amounts for approved projects
- Distribute: Transfer funds to recipients
Key Components
- Pool: The main smart contract that manages grants
- PoolFactory: Factory contract for deploying new pools
- Strategy: Pluggable allocation strategies (e.g., quadratic funding)
- Metadata: Off-chain data stored on IPFS for pools and projects
Quick Example
import { AlloKitSDK } from "@allo-kit/sdk";
import { createWalletClient, http } from "viem";
// Initialize the SDK
const client = createWalletClient({
transport: http(),
// ... wallet configuration
});
const sdk = new AlloKitSDK(client, 1); // mainnet
// Deploy a new pool
const { pool } = await sdk.deployPool(ownerAddress, {
owner: ownerAddress,
admins: [adminAddress],
allocationToken: tokenAddress,
distributionToken: tokenAddress,
maxAmount: parseUnits("10000", 18),
timestamps: [startTime, endTime],
metadataURI: "ipfs cid",
});
// Register a project
await sdk.register(pool, projectAddress, "ipfs cid");
// Approve the project
await sdk.review(pool, projectAddress, 1, "ipfs cid");
// Allocate funds
await sdk.allocate(
pool,
[projectAddress],
[parseUnits("1000", 18)],
tokenAddress
);
Next Steps
- Installation - Install and set up the SDK
- Quick Start Guide - Build your first integration
- API Reference - Complete method documentation
- Examples - Real-world usage examples
Last updated on