solana

package
v0.0.0-...-59ef1fd Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistencyLevel

type ConsistencyLevel uint8

func (ConsistencyLevel) Commitment

func (c ConsistencyLevel) Commitment() (rpc.CommitmentType, error)

type MessagePublicationAccount

type MessagePublicationAccount struct {
	VaaVersion uint8
	// Borsh does not seem to support booleans, so 0=false / 1=true
	ConsistencyLevel    uint8
	VaaTime             uint32
	VaaSignatureAccount vaa.Address
	SubmissionTime      uint32
	Nonce               uint32
	Sequence            uint64
	EmitterChain        uint16
	EmitterAddress      vaa.Address
	Payload             []byte
}

func ParseTransferOutProposal

func ParseTransferOutProposal(data []byte) (*MessagePublicationAccount, error)

type PostMessageData

type PostMessageData struct {
	Nonce            uint32
	Payload          []byte
	ConsistencyLevel ConsistencyLevel
}

PostMessageData represents the user-supplied, untrusted instruction data for message publications. We use this to determine consistency level before fetching accounts.

type SolanaWatcher

type SolanaWatcher struct {
	// contains filtered or unexported fields
}

func NewSolanaWatcher

func NewSolanaWatcher(
	wsUrl, rpcUrl string,
	contractAddress solana.PublicKey,
	messageEvents chan *common.MessagePublication,
	commitment rpc.CommitmentType) *SolanaWatcher

func (*SolanaWatcher) Run

func (s *SolanaWatcher) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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