@macalinao/clients-spl-governance
v0.3.0
Published
TypeScript client for the SPL Governance program
Maintainers
Readme
@macalinao/clients-spl-governance
TypeScript client for the SPL Governance program, generated using Coda with full ESM support.
IDL changes:
RealmConfigArgsis renamed toRealmConfigParamsGoverningTokenConfigArgsis renamed toGoverningTokenConfigParams
Installation
bun add @macalinao/clients-spl-governanceDevelopment
This client is generated from the SPL Governance IDL using Coda CLI:
# Generate the client from idls/spl_governance.json
bun run codegen
# Build the TypeScript
bun run buildConfiguration
The coda.config.mjs file defines custom PDAs for the SPL Governance program, including:
- Realm identified by its name
- Token holding accounts for community and council tokens
- Governance accounts and proposals
- Vote records and signatory records
- Treasury accounts and transaction instructions
Usage
import {
getCreateRealmInstruction,
findRealmPda,
} from "@macalinao/clients-spl-governance";
// Create a new realm
const realmPda = await findRealmPda({ name: "my-dao" });
// Use the generated client functionsLicense
Copyright © 2025 Ian Macalinao
Licensed under the Apache License, Version 2.0
