Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Complete reference for all TypeScript types exported by the SDK
import type { DAO, Proposal, Vote, ProposalState, PaginatedResponse } from 'daocafe-sdk';
interface DAO { /** Composite ID: chainId_governorAddress */ id: string; chainId: number; governor: string; token: string; timelock: string; creator: string; name: string; tokenName: string; tokenSymbol: string; totalSupply: string; proposalCount: number; /** Manager address (can be updated via governance) */ manager: string | null; /** Governance settings */ votingDelay: string | null; votingPeriod: string | null; proposalThreshold: string | null; quorumNumerator: string | null; createdAt: string; blockNumber: string; transactionHash: string; /** Optional relations (when requested) */ proposals?: Proposal[]; votes?: Vote[]; delegates?: Delegate[]; tokenHolders?: TokenHolder[]; settingsChanges?: GovernanceSettingsChange[]; }
interface Proposal { /** ID: chainId_governorAddress_proposalId */ id: string; daoId: string; chainId: number; governor: string; proposalId: string; proposer: string; /** Proposal content */ targets: string[]; values: string[]; calldatas: string[]; signatures: string[] | null; description: string; /** Timing */ voteStart: string; voteEnd: string; eta: string | null; /** Vote tallies */ forVotes: string; againstVotes: string; abstainVotes: string; state: ProposalState; createdAt: string; blockNumber: string; transactionHash: string; /** Optional relations */ dao?: DAO; votes?: Vote[]; }
interface Vote { /** ID: chainId_governor_proposalId_voter */ id: string; proposalId: string; daoId: string; chainId: number; governor: string; voter: string; support: VoteSupport; weight: string; reason: string | null; params: string | null; createdAt: string; blockNumber: string; transactionHash: string; /** Optional relations */ proposal?: Proposal; dao?: DAO; }
interface Delegate { /** ID: chainId_tokenAddress_delegatorAddress */ id: string; daoId: string; chainId: number; token: string; delegator: string; toDelegate: string; updatedAt: string; blockNumber: string; transactionHash: string; /** Optional relation */ dao?: DAO; }
interface TokenHolder { /** ID: chainId_tokenAddress_holderAddress */ id: string; daoId: string; chainId: number; token: string; holder: string; balance: string; votes: string; updatedAt: string; blockNumber: string; /** Optional relation */ dao?: DAO; }
interface GovernanceSettingsChange { /** ID: chainId_governor_blockNumber_logIndex */ id: string; daoId: string; chainId: number; governor: string; setting: SettingType; oldValue: string; newValue: string; createdAt: string; blockNumber: string; transactionHash: string; /** Optional relation */ dao?: DAO; }
type ProposalState = | 'PENDING' // 0 - Proposal created, voting not started | 'ACTIVE' // 1 - Voting in progress | 'CANCELED' // 2 - Proposal canceled | 'DEFEATED' // 3 - Voting ended, did not pass | 'SUCCEEDED' // 4 - Voting ended, passed | 'QUEUED' // 5 - In timelock queue | 'EXPIRED' // 6 - Timelock expired | 'EXECUTED'; // 7 - Proposal executed
type VoteSupport = | 'AGAINST' // 0 | 'FOR' // 1 | 'ABSTAIN'; // 2
type SettingType = | 'VOTING_DELAY' | 'VOTING_PERIOD' | 'PROPOSAL_THRESHOLD' | 'QUORUM_NUMERATOR';
interface PaginatedResponse<T> { items: T[]; pageInfo: PageInfo; }
interface PageInfo { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string | null; endCursor: string | null; }
interface PaginationParams { limit?: number; after?: string; before?: string; }
interface DAOQueryParams extends PaginationParams { orderBy?: 'createdAt' | 'proposalCount' | 'name'; orderDirection?: OrderDirection; }
interface ProposalQueryParams extends PaginationParams { daoId?: string; state?: ProposalState; proposer?: string; orderBy?: 'createdAt' | 'voteEnd' | 'voteStart'; orderDirection?: OrderDirection; }
interface VoteQueryParams extends PaginationParams { proposalId?: string; daoId?: string; voter?: string; support?: VoteSupport; orderBy?: 'createdAt' | 'weight'; orderDirection?: OrderDirection; }
interface DelegateQueryParams extends PaginationParams { daoId?: string; delegator?: string; toDelegate?: string; orderBy?: 'updatedAt'; orderDirection?: OrderDirection; }
interface TokenHolderQueryParams extends PaginationParams { daoId?: string; holder?: string; orderBy?: 'balance' | 'votes' | 'updatedAt'; orderDirection?: OrderDirection; }
type OrderDirection = 'asc' | 'desc';
{chainId}_{governorAddress}
11155111_0xf51C4b7b5AA34052B9C605A6BAf4DB8E844106B0
{chainId}_{governor}_{proposalId}
11155111_0xf51C4b7b..._12345
{chainId}_{governor}_{proposalId}_{voter}
11155111_0xf51C..._12345_0xAbc...
{chainId}_{tokenAddress}_{delegatorAddress}
11155111_0xcfCf..._0xAbc...
{chainId}_{tokenAddress}_{holderAddress}