payload

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressedPayload

type AddressedPayload struct {
	SourceAddress      common.Address `serialize:"true"`
	DestinationChainID common.Hash    `serialize:"true"`
	DestinationAddress common.Address `serialize:"true"`
	Payload            []byte         `serialize:"true"`
	// contains filtered or unexported fields
}

AddressedPayload defines the format for delivering a point to point message across VMs ie. (ChainA, AddressA) -> (ChainB, AddressB)

func NewAddressedPayload

func NewAddressedPayload(sourceAddress common.Address, destinationChainID common.Hash, destinationAddress common.Address, payload []byte) (*AddressedPayload, error)

NewAddressedPayload creates a new *AddressedPayload and initializes it.

func ParseAddressedPayload

func ParseAddressedPayload(b []byte) (*AddressedPayload, error)

ParseAddressedPayload converts a slice of bytes into an initialized AddressedPayload.

func (*AddressedPayload) Bytes

func (a *AddressedPayload) Bytes() []byte

Bytes returns the binary representation of this payload. It assumes that the payload is initialized from either NewAddressedPayload or ParseAddressedPayload.

Jump to

Keyboard shortcuts

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