Go bindings for Solana's BPF Loader v3 program.
go get github.com/base/loader-v3-go-bindings/bindings
import "github.com/base/loader-v3-go-bindings/bindings"
// Example: Create an initialize buffer instruction
instruction, err := bindings.NewInitializeBufferInstruction(
sourceAccount,
bufferAuthority,
)
The bindings are generated from the IDL using the anchor-go tool.
The IDL (loader-v3.json) is sourced from the solana-program/loader-v3 repository and converted to be parsable by anchor-go
using:
anchor convert idl <path-to-original-idl> loader-v3.json
To regenerate the bindings after updating the IDL:
bash scripts/generate-bindings.sh