API Reference
Complete documentation for all 9 specialized canisters with code examples and type definitions.
Core Canisters
dao_backend
Main coordinator canister handling user management and admin operations.
Coordinator User Management
Key Methods:
- •
initialize(name, description, admins) - •
registerUser(profile) - •
getUserProfile(principal)
governance
Voting mechanisms and proposal lifecycle management.
Voting Proposals
Key Methods:
- •
createProposal(title, description, category) - •
vote(proposalId, vote) - •
executeProposal(proposalId)
staking
Token locking, rewards distribution, and voting power calculation.
Staking Rewards
Key Methods:
- •
stake(amount) - •
unstake(amount) - •
claimRewards() - •
getVotingPower(principal)
treasury
Multi-signature financial operations and balance tracking.
Finance Multi-sig
Key Methods:
- •
deposit(amount) - •
withdraw(recipient, amount) - •
getBalance()
Support Canisters
dao_registry
Global DAO discovery and search
dao_analytics
Platform metrics and time-series data
proposals
Proposal templates and categorization
assets
File storage with metadata and tags
icrc1_ledger
ICRC1 token standard implementation
Example Usage
Creating a Proposal
import { useGovernance } from './hooks/useGovernance';
const MyComponent = () => {
const { createProposal } = useGovernance();
const handleCreate = async () => {
try {
const result = await createProposal({
title: "Increase Staking Rewards",
description: "Proposal to increase rewards by 5%",
category: "tokenomics"
});
console.log("Proposal created:", result);
} catch (error) {
console.error("Failed:", error);
}
};
return <button onClick={handleCreate}>Create Proposal</button>;
}; 📖 Full API Documentation
For complete API documentation with all methods, parameters, and return types, see:
View Full API Documentation