paloma

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnableToDecodeAddress = whoops.Errorf("unable to decode address: %s")
	ErrNodeIsNotInSync       = whoops.String("paloma node is not in sync")

	ErrPalomaIsDown = whoops.String("paloma is down")
)

Variables

This section is empty.

Functions

func IsPalomaDown added in v0.7.0

func IsPalomaDown(err error) bool

Types

type BroadcastMessageSignatureIn

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

type ChainInfoIn

type ChainInfoIn struct {
	ChainType        string
	ChainReferenceID 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) AddMessageEvidence

func (c Client) AddMessageEvidence(ctx context.Context, queueTypeName string, messageID uint64, proof proto.Message) error

func (Client) BlockHeight added in v0.4.0

func (c Client) BlockHeight(ctx context.Context) (int64, error)

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) GetValidator added in v0.7.0

func (c Client) GetValidator(ctx context.Context) (*stakingtypes.Validator, error)

func (Client) GetValidatorAddress added in v0.4.0

func (c Client) GetValidatorAddress() sdk.ValAddress

func (*Client) Init

func (c *Client) Init()

func (Client) KeepValidatorAlive added in v0.5.0

func (c Client) KeepValidatorAlive(ctx context.Context) error

func (Client) Keyring

func (c Client) Keyring() keyring.Keyring

func (Client) PalomaStatus added in v0.7.0

func (c Client) PalomaStatus(ctx context.Context) error

func (Client) QueryGetEVMChainInfos

func (c Client) QueryGetEVMChainInfos(ctx context.Context) ([]*evm.ChainInfo, error)

TODO: this should return all chain infos. Not the ones from EVM only.

func (Client) QueryGetEVMValsetByID

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

func (Client) QueryGetSnapshotByID

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

QueryGetSnapshotByID returns the snapshot by id. If the ID is zero, then it returns the last snapshot.

func (Client) QueryGetValidatorAliveUntil added in v0.5.0

func (c Client) QueryGetValidatorAliveUntil(ctx context.Context) (time.Time, error)

func (Client) QueryMessagesForAttesting added in v1.2.0

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

QueryMessagesForAttesting returns all messages that are currently in the queue except those already attested for.

func (Client) QueryMessagesForRelaying added in v1.2.0

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

QueryMessagesForRelaying returns all messages that are currently in the queue.

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) QueryValidatorInfo

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

QueryValidatorInfo returns info about the validator.

func (Client) SetErrorData added in v1.2.0

func (c Client) SetErrorData(ctx context.Context, queueTypeName string, messageID uint64, data []byte) error

func (Client) SetPublicAccessData

func (c Client) SetPublicAccessData(ctx context.Context, queueTypeName string, messageID uint64, data []byte) error

func (Client) Status added in v0.7.0

func (c Client) Status(ctx context.Context) (*ResultStatus, error)

type GRPCClientDowner added in v0.7.0

type GRPCClientDowner struct {
	W grpc.ClientConn
}

func (GRPCClientDowner) Invoke added in v0.7.0

func (g GRPCClientDowner) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...ggrpc.CallOption) error

func (GRPCClientDowner) NewStream added in v0.7.0

func (g GRPCClientDowner) NewStream(ctx context.Context, desc *ggrpc.StreamDesc, method string, opts ...ggrpc.CallOption) (ggrpc.ClientStream, error)

type MessageSender

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

type MessageSenderDowner added in v0.7.0

type MessageSenderDowner struct {
	W MessageSender
}

func (MessageSenderDowner) SendMsg added in v0.7.0

func (m MessageSenderDowner) SendMsg(ctx context.Context, msg sdk.Msg, memo string) (*sdk.TxResponse, error)

type ResultStatus added in v0.7.0

type ResultStatus = coretypes.ResultStatus

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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