Skip to content

Latest commit

 

History

History
133 lines (101 loc) · 6.11 KB

README.md

File metadata and controls

133 lines (101 loc) · 6.11 KB

Anchor Source Generator Build Release

Generated Program Libraries

Repositories that hold program SDK's generated using this library.

Features

Leaf links provide concrete examples.

Instructions

Defined Types

TODO

If you need any of these or have something else in mind please reach out about your use case, context makes it easier to implement solutions.

New to anchor 0.30

  • Event discriminators
  • Bytemuck serialization (previously only borsh)
  • Generics

Ideas:

  • Support user provided common accounts to reduce wiring required to call instruction methods.

Generate Source

Replace the values below to fit your needs.

./genSrc.sh \
 --tabLength=2 \
 --sourceDirectory="src/main/java" \
 --moduleName="org.your.module" \
 --basePackageName="org.your.package.anchor.gen" \
 --programs="./main_net_programs.json" \
 --rpc="https://rpc.com" \
 --baseDelayMillis=200 \
 --numThreads=5 \
 --screen=[0|1]

Requirements

  • The latest generally available JDK. This project will continue to move to the latest and will not maintain versions released against previous JDK's.

Add Dependency

Create a GitHub user access token with read access to GitHub Packages.

Then add the following to your Gradle build script.

repositories {
  maven {
    url = "https://maven.pkg.github.com/sava-software/sava"
    credentials {
      username = GITHUB_USERNAME
      password = GITHUB_PERSONAL_ACCESS_TOKEN
    }
  }
  maven {
    url = "https://maven.pkg.github.com/sava-software/solana-programs"
  }
  maven {
    url = "https://maven.pkg.github.com/sava-software/anchor-src-gen"
  }
}

dependencies {
  implementation "software.sava:sava-core:$VERSION"
  implementation "software.sava:sava-rpc:$VERSION"
  implementation "software.sava:solana-programs:$VERSION"
  implementation "software.sava:anchor-src-gen:$VERSION"
}

Contribution

Unit tests are needed and welcomed. Otherwise, please open an issue or send an email before working on a pull request.

Warning

Young project, under active development, breaking changes are to be expected.