This directory should contain the Anchor IDL (Interface Definition Language) for the QWAMI token program.
After deploying the qwami_token Anchor program, copy the generated IDL here:
# From the qwami project root
cp ../quami/solana/anchor/qwami-token/target/idl/qwami_token.json ./contracts/idl/The IDL is a JSON file that describes the program's interface:
- Instructions (functions you can call)
- Accounts (data structures)
- Types and error codes
Anchor generates this automatically when you build the program.
-
Navigate to the Anchor project:
cd ../quami/solana/anchor/qwami-token -
Build the program:
anchor build
-
Deploy to devnet:
anchor deploy
-
Copy the Program ID from the output and update
.env:NUXT_PUBLIC_QWAMI_TOKEN_PROGRAM_ID=<your_program_id> -
Initialize the token:
anchor run init
-
Update
.envwith the mint address and authority -
Copy the IDL to this directory (see command above)
The qwami_token program provides:
initialize- Set up the token mint and authoritymint_tokens- Mint new tokens (authority only)burn_tokens- Burn tokens (owner)update_base_price- Update base price (authority only)transfer_authority- Transfer control (authority only)
Once the IDL is in place, the following will work:
composables/useAnchor.ts- Client-side burn functionalityserver/api/qwami/purchase.post.ts- Server-side minting
Both have TODO comments marking where IDL integration is needed.