Utilities
Anchor IDL Source Generator
Generates utilities for interacting with on-chain programs and accounts.
GitHub Repository
Dependencies
- java.net.http
- systems.comodal.json_iterator
- software.sava.core
- software.sava.rpc
Features With Examples
Instructions
- (De)Serialization:
- Discriminators
- Convenient auto-wiring of common accounts and optional account defaults.
Defined Types
- (De)Serialization
- Structs:
- Accounts:
- Discriminators with corresponding RPC memory compare filters:
- PDA helpers:
- Enums:
- Simple:
- With arbitrary associated data structures:
- Constants:
- Events:
- Errors:
- RPC Filters:
- Memory compare filters:
- Data size filters
Generate Source
Configuration
GitHub Access Token: Generate a classic token with the read:packages
scope to access
dependencies hosted on GitHub Package Repository.
Create a gradle.properties
file in the project directory root or under $HOME/.gradle/
.
Compile & Run
Generated code will be placed under the basePackageName
in the sourceDirectory
.
Export declarations will be added to module-info.java.
The IDL for programs configured in the programs
JSON file will be fetched concurrently in numThreads
with a baseDelayMillis
between requests.