paloma

package
v0.2.3-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnableToDecodeAddress = whoops.Errorf("unable to decode address: %s")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastMessageSignatureIn

type BroadcastMessageSignatureIn struct {
	ID              uint64
	QueueTypeName   string
	Signature       []byte
	ExtraData       []byte
	SignedByAddress string
}

type ChainInfoIn

type ChainInfoIn struct {
	ChainType  string
	ChainID    string
	AccAddress string
	PubKey     []byte
}

type Client

type Client struct {
	L            *chain.LensClient
	PalomaConfig config.Paloma

	GRPCClient grpc.ClientConn

	MessageSender MessageSender
	// contains filtered or unexported fields
}

func (Client) AddExternalChainInfo

func (c Client) AddExternalChainInfo(ctx context.Context, chainInfos ...ChainInfoIn) error

AddExternalChainInfo adds info about the external chain. It adds the chain's account addresses that the pigeon knows about.

func (Client) BroadcastMessageSignatures

func (c Client) BroadcastMessageSignatures(ctx context.Context, signatures ...BroadcastMessageSignatureIn) error

BroadcastMessageSignatures takes a list of signatures that need to be sent over to the chain. It build the message and sends it over.

func (Client) DeleteJob

func (c Client) DeleteJob(ctx context.Context, queueTypeName string, id uint64) error

TODO: this is only temporary for easier testing

func (*Client) Init

func (c *Client) Init()

func (Client) Keyring

func (c Client) Keyring() keyring.Keyring

func (Client) QueryGetEVMValsetByID

func (c Client) QueryGetEVMValsetByID(ctx context.Context, id uint64, chainID string) (*types.Valset, error)

func (Client) QueryGetSnapshotByID

func (c Client) QueryGetSnapshotByID(ctx context.Context, id uint64) (*valset.Snapshot, error)

func (Client) QueryMessagesForSigning

func (c Client) QueryMessagesForSigning(
	ctx context.Context,
	queueTypeName string,
) ([]chain.QueuedMessage, error)

QueryMessagesForSigning returns a list of messages from a given queueTypeName that need to be signed by the provided validator given the valAddress.

func (Client) QueryMessagesInQueue

func (c Client) QueryMessagesInQueue(ctx context.Context, queueTypeName string) ([]chain.MessageWithSignatures, error)

QueryMessagesInQueue returns all messages that are currently in the queue.

func (Client) QueryValidatorInfo

func (c Client) QueryValidatorInfo(ctx context.Context) ([]*valset.ExternalChainInfo, error)

QueryValidatorInfo returns info about the validator.

type MessageSender

type MessageSender interface {
	SendMsg(ctx context.Context, msg sdk.Msg) (*sdk.TxResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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