types

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifacts

type Artifacts struct {
	BridgeID                string `json:"BRIDGE_ID"`
	ExecutorL1MonitorHeight string `json:"EXECUTOR_L1_MONITOR_HEIGHT"`
	ExecutorL2MonitorHeight string `json:"EXECUTOR_L2_MONITOR_HEIGHT"`
}

Artifacts define the structure for the JSON data

type BatchInfo

type BatchInfo struct {
	Submitter string `json:"submitter"`
	ChainType string `json:"chain_type"`
}

type Bridge

type Bridge struct {
	BridgeID     string       `json:"bridge_id"`
	BridgeAddr   string       `json:"bridge_addr"`
	BridgeConfig BridgeConfig `json:"bridge_config"`
}

type BridgeConfig

type BridgeConfig struct {
	Challenger            string    `json:"challenger"`
	Proposer              string    `json:"proposer"`
	BatchInfo             BatchInfo `json:"batch_info"`
	SubmissionInterval    string    `json:"submission_interval"`
	FinalizationPeriod    string    `json:"finalization_period"`
	SubmissionStartHeight string    `json:"submission_start_height"`
	OracleEnabled         bool      `json:"oracle_enabled"`
	Metadata              string    `json:"metadata"`
}

type Channel

type Channel struct {
	PortID    string `json:"port_id"`
	ChannelID string `json:"channel_id"`
}

type ChannelResponse added in v0.3.0

type ChannelResponse struct {
	Channel struct {
		ConnectionHops []string `json:"connection_hops"`
		Counterparty   Channel  `json:"counterparty"`
	} `json:"channel"`
}

ChannelResponse define a minimal struct to parse just the counterparty field

type ChannelsResponse

type ChannelsResponse struct {
	Channels []struct {
		PortID         string   `json:"port_id"`
		ChannelID      string   `json:"channel_id"`
		ConnectionHops []string `json:"connection_hops"`
		Counterparty   Channel  `json:"counterparty"`
	} `json:"channels"`
}

type GenesisAccount

type GenesisAccount struct {
	Address string `json:"address,omitempty"`
	Coins   string `json:"coins,omitempty"`
}

type GenesisAccounts

type GenesisAccounts []GenesisAccount

type IBCChannelPair

type IBCChannelPair struct {
	L1ConnectionID string
	L1             Channel
	L2ConnectionID string
	L2             Channel
}

type L1Config

type L1Config struct {
	ChainID   string `json:"chain_id,omitempty"`
	RpcUrl    string `json:"rpc_url,omitempty"`
	GasPrices string `json:"gas_prices,omitempty"`
}

type L2Config

type L2Config struct {
	ChainID  string `json:"chain_id,omitempty"`
	Denom    string `json:"denom,omitempty"`
	Moniker  string `json:"moniker,omitempty"`
	BridgeID uint64 `json:"bridge_id,omitempty"`
}

type Metadata

type Metadata struct {
	PermChannels []Channel `json:"perm_channels"`
}

func DecodeBridgeMetadata

func DecodeBridgeMetadata(base64Str string) (Metadata, error)

type MinitiaConfig

type MinitiaConfig struct {
	L1Config        *L1Config        `json:"l1_config,omitempty"`
	L2Config        *L2Config        `json:"l2_config,omitempty"`
	OpBridge        *OpBridge        `json:"op_bridge,omitempty"`
	SystemKeys      *SystemKeys      `json:"system_keys,omitempty"`
	GenesisAccounts *GenesisAccounts `json:"genesis_accounts,omitempty"`
}

func (*MinitiaConfig) Clone

func (m *MinitiaConfig) Clone() *MinitiaConfig

Clone returns a deep copy of MinitiaConfig. Returns nil if the receiver is nil.

type OpBridge

type OpBridge struct {
	OutputSubmissionInterval    string `json:"output_submission_interval,omitempty"`
	OutputFinalizationPeriod    string `json:"output_finalization_period,omitempty"`
	OutputSubmissionStartHeight uint64 `json:"output_submission_start_height,omitempty"`
	BatchSubmissionTarget       string `json:"batch_submission_target"`
	EnableOracle                bool   `json:"enable_oracle"`
}

type SystemAccount

type SystemAccount struct {
	L1Address string `json:"l1_address,omitempty"`
	L2Address string `json:"l2_address,omitempty"`
	DAAddress string `json:"da_address,omitempty"`
	Mnemonic  string `json:"mnemonic,omitempty"`
}

func NewBatchSubmitterAccount

func NewBatchSubmitterAccount(mnemonic, address string) *SystemAccount

func NewSystemAccount

func NewSystemAccount(mnemonic, addresses string) *SystemAccount

type SystemKeys

type SystemKeys struct {
	Validator       *SystemAccount `json:"validator,omitempty"`
	BridgeExecutor  *SystemAccount `json:"bridge_executor,omitempty"`
	OutputSubmitter *SystemAccount `json:"output_submitter,omitempty"`
	BatchSubmitter  *SystemAccount `json:"batch_submitter,omitempty"`
	Challenger      *SystemAccount `json:"challenger,omitempty"`
}

type WeaveState

type WeaveState struct {
	PreviousResponse []string
}

func NewWeaveState

func NewWeaveState() WeaveState

NewWeaveState initializes a new WeaveState with an empty PreviousResponse slice.

func (WeaveState) Clone

func (w WeaveState) Clone() WeaveState

Clone creates a deep copy of WeaveState, duplicating the PreviousResponse slice.

func (*WeaveState) PopPreviousResponse

func (w *WeaveState) PopPreviousResponse()

PopPreviousResponse removes the last response in the PreviousResponse slice.

func (*WeaveState) PopPreviousResponseAtIndex

func (w *WeaveState) PopPreviousResponseAtIndex(index int)

PopPreviousResponseAtIndex removes a response at a specific index. Use with care.

func (*WeaveState) PushPreviousResponse

func (w *WeaveState) PushPreviousResponse(s string)

PushPreviousResponse adds a response to the end of the PreviousResponse slice.

func (*WeaveState) Render

func (w *WeaveState) Render() string

Render concatenates all responses into a single string.

Jump to

Keyboard shortcuts

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