stakeprog

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Deprecated: please use github.com/portto/solana-go-sdk/program/stake

Index

Constants

View Source
const AccountSize uint64 = 200

Variables

This section is empty.

Functions

func Authorize

func Authorize(param AuthorizeParam) types.Instruction

func AuthorizeWithSeed

func AuthorizeWithSeed(param AuthorizeWithSeedParam) types.Instruction

func Deactivate

func Deactivate(param DeactivateParam) types.Instruction

func DelegateStake

func DelegateStake(param DelegateStakeParam) types.Instruction

func Initialize

func Initialize(param InitializeParam) types.Instruction

func Merge

func Merge(param MergeParam) types.Instruction

func SetLockup

func SetLockup(param SetLockupParam) types.Instruction

func Split

func Split(param SplitParam) types.Instruction

func Withdraw

func Withdraw(param WithdrawParam) types.Instruction

Types

type AuthorizeParam added in v1.9.0

type AuthorizeParam struct {
	Stake     common.PublicKey
	Auth      common.PublicKey
	NewAuth   common.PublicKey
	AuthType  StakeAuthorizationType
	Custodian *common.PublicKey
}

type AuthorizeWithSeedParam added in v1.9.0

type AuthorizeWithSeedParam struct {
	Stake     common.PublicKey
	AuthBase  common.PublicKey
	AuthSeed  string
	AuthOwner common.PublicKey
	NewAuth   common.PublicKey
	AuthType  StakeAuthorizationType
	Custodian *common.PublicKey
}

type Authorized

type Authorized struct {
	Staker     common.PublicKey
	Withdrawer common.PublicKey
}

type DeactivateParam added in v1.9.0

type DeactivateParam struct {
	Stake common.PublicKey
	Auth  common.PublicKey
}

type DelegateStakeParam added in v1.9.0

type DelegateStakeParam struct {
	Stake common.PublicKey
	Auth  common.PublicKey
	Vote  common.PublicKey
}

type InitializeParam added in v1.9.0

type InitializeParam struct {
	Stake  common.PublicKey
	Auth   Authorized
	Lockup Lockup
}

type Instruction

type Instruction uint32
const (
	InstructionInitialize Instruction = iota
	InstructionAuthorize
	InstructionDelegateStake
	InstructionSplit
	InstructionWithdraw
	InstructionDeactivate
	InstructionSetLockup
	InstructionMerge
	InstructionAuthorizeWithSeed
)

type Lockup

type Lockup struct {
	UnixTimestamp int64
	Epoch         uint64
	Cusodian      common.PublicKey
}

type LockupParam

type LockupParam struct {
	UnixTimestamp *int64
	Epoch         *uint64
	Cusodian      *common.PublicKey
}

type MergeParam added in v1.9.0

type MergeParam struct {
	From common.PublicKey
	Auth common.PublicKey
	To   common.PublicKey
}

type SetLockupParam added in v1.9.0

type SetLockupParam struct {
	Stake  common.PublicKey
	Auth   common.PublicKey
	Lockup LockupParam
}

type SplitParam added in v1.9.0

type SplitParam struct {
	Stake      common.PublicKey
	Auth       common.PublicKey
	SplitStake common.PublicKey
	Lamports   uint64
}

type StakeAuthorizationType

type StakeAuthorizationType uint32
const (
	StakeAuthorizationTypeStaker StakeAuthorizationType = iota
	StakeAuthorizationTypeWithdrawer
)

type WithdrawParam added in v1.9.0

type WithdrawParam struct {
	Stake     common.PublicKey
	Auth      common.PublicKey
	To        common.PublicKey
	Lamports  uint64
	Custodian *common.PublicKey
}

Jump to

Keyboard shortcuts

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