Welcome to the MetaDAO Futarchy SDK! This guide will help you get up and running with the tools you need to interact with futarchy-based governance on Solana.

📦 Installation

https://www.npmjs.com/package/@metadaoproject/futarchy

# Using pnpm
pnpm install -P @metadaoproject/futarchy@^0.4.0-alpha.62

# Or using npm
npm install @metadaoproject/futarchy@^0.4.0-alpha.62

# Or using yarn
yarn add @metadaoproject/futarchy@^0.4.0-alpha.62

# Or using bun
bun add @metadaoproject/futarchy@^0.4.0-alpha.62

🧱 Prerequisites


🚀 Quick Start Example

import { Connection, Keypair } from "@solana/web3.js";
import { AnchorProvider, Wallet } from "@coral-xyz/anchor";
import { AutocratClient } from "@metadaoproject/futarchy/v0.4";

// Connect to the Solana cluster
const connection = new Connection(process.env.ANCHOR_PROVIDER_URL); // Replace with your RPC or include in .env
const wallet = new Wallet(Keypair.generate()); // Replace with your wallet
const provider = new AnchorProvider(connection, wallet, {});

// Create the client
const autocratClient = AutocratClient.createClient({
  provider,
});

const main = async () => {
  // Fetch all DAOs
  const daos = await autocratClient.autocrat.account.dao.all();
  console.log("DAOs:", daos);
};

main();

📚 Previously

Overview

📚 Next Up

API Reference