watcher

package
v0.0.0-...-de21b2d Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface {
	Height() int64
	ChainID() string
	Time() time.Time
	Messages() []Message
}

Block is an interface providing array of messages (state transitions) as well as helper methods providing usefull information about the block all Block interface implementations are assumed to return messages in order in which those events / messages happened

type CloseChannel

type CloseChannel struct {
	ChannelID string
}

this message covers closeInit and closeConfirm

func (CloseChannel) Type

func (t CloseChannel) Type() string

type CreateChannel

type CreateChannel struct {
	ChannelID    string
	ConnectionID string
	PortID       string
}

this message covers openInit and openTry

func (CreateChannel) Type

func (t CreateChannel) Type() string

type CreateClient

type CreateClient struct {
	// client ID
	ClientID string
	// type of lite-client
	ClientType string
	// chain-ID of the blockchain to which client belongs to
	ChainID string
}

func (CreateClient) Type

func (t CreateClient) Type() string

type CreateConnection

type CreateConnection struct {
	ConnectionID string
	ClientID     string
}
Initialize connection with chain some other chain

this could be openInit on chain A or openTry on chain B

func (CreateConnection) Type

func (t CreateConnection) Type() string

type IBCTransfer

type IBCTransfer struct {
	ChannelID         string
	Sender, Recipient string
	Amount            []struct {
		Amount *big.Int
		Coin   string
	}
	// source must be true if this blockchain initiated the transfer
	// i.e. ics20 transfer
	Source bool
}

same as regular transfer, but with channel specified

func (IBCTransfer) Type

func (t IBCTransfer) Type() string

type Message

type Message interface {
	Type() string
}

Message represents some event / action that happened inside of blockchain

type OpenChannel

type OpenChannel struct {
	ChannelID string
}

this message covers openAck and openConfirm

func (OpenChannel) Type

func (t OpenChannel) Type() string

type Transaction

type Transaction struct {
	Sender   string
	Hash     string
	Accepted bool
	Messages []Message
}

Transaction is a special type of message because it can contain multiple other messages inside of it this is done in order to know what messages belong to what tx or to know even that they have happened outside of tx

func (Transaction) Type

func (t Transaction) Type() string

type Transfer

type Transfer struct {
	Sender, Recipient string
	Amount            []struct {
		Amount *big.Int
		Coin   string
	}
}

func (Transfer) Type

func (t Transfer) Type() string

Jump to

Keyboard shortcuts

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