Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Name string `json:"name"` Writable bool `json:"writable,omitempty"` Signer bool `json:"signer,omitempty"` Address string `json:"address,omitempty"` PDA *PDA `json:"pda,omitempty"` }
Account represents an account in the IDL
type Arg ¶
type Arg struct { Name string `json:"name"` Type interface{} `json:"type"` }
Arg represents an argument in the IDL
type Field ¶
type Field struct { Name string `json:"name"` Type interface{} `json:"type"` }
Field represents a field in a type in the IDL
type IDL ¶
type IDL struct { Address string `json:"address"` Metadata Metadata `json:"metadata"` Instructions []Instruction `json:"instructions"` Accounts []Account `json:"accounts"` Errors []Error `json:"errors"` Types []Type `json:"types"` }
IDL represents the interface definition language for a Solana program more info: https://solana.com/hi/docs/programs/anchor/idl
func (IDL) GetDiscriminator ¶
GetDiscriminator returns the discriminator from the instruction name
type Instruction ¶
type Instruction struct { Name string `json:"name"` Discriminator [8]byte `json:"discriminator"` Accounts []Account `json:"accounts"` Args []Arg `json:"args"` }
Instruction represents a single instruction in the IDL
type Metadata ¶
type Metadata struct { Name string `json:"name"` Version string `json:"version"` Spec string `json:"spec"` Description string `json:"description"` }
Metadata represents the metadata of the IDL
type PDA ¶
type PDA struct {
Seeds []Seed `json:"seeds"`
}
PDA represents a program-derived address in the IDL
Click to show internal directories.
Click to hide internal directories.