stake

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

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

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

type AuthorizeWithSeedParam

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

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

type DelegateStakeParam

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

type InitializeParam

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

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

type SetLockupParam

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

type SplitParam

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

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