solana

package
v0.0.0-...-49ff46f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxSeedLen = 32
View Source
const MaxSeeds = 16
View Source
const PdaMarker = "ProgramDerivedAddress"
View Source
const PublicKeyLength = 32

Variables

View Source
var (
	ErrSeedLength          = errors.New("Max seeds (16) exceeded")
	ErrAddressLength       = errors.New("Wrong key length; addresses are 32 bytes long")
	ErrOnCurveInvalidSeeds = errors.New("Invalid seeds - generated address must be off-curve")
)

Functions

func CreateProgramAddressBytes

func CreateProgramAddressBytes(seeds [][]byte, programID []byte) ([]byte, error)

func IsOnCurve

func IsOnCurve(b []byte) bool

IsOnCurve checks if 'b' is on the ed25519 curve

Types

type Address

type Address [32]byte

func MustAddress

func MustAddress(s string) Address

func (*Address) String

func (p *Address) String() string

func (*Address) UnmarshalText

func (p *Address) UnmarshalText(b []byte) error

type Hash

type Hash [32]byte

func (*Hash) String

func (p *Hash) String() string

func (*Hash) UnmarshalText

func (p *Hash) UnmarshalText(b []byte) error

type Signature

type Signature [64]byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL