Documentation
¶
Index ¶
- type Artifacts
- type BatchInfo
- type Bridge
- type BridgeConfig
- type Channel
- type ChannelResponse
- type ChannelsResponse
- type GenesisAccount
- type GenesisAccounts
- type IBCChannelPair
- type L1Config
- type L2Config
- type Metadata
- type MinitiaConfig
- type OpBridge
- type SystemAccount
- type SystemKeys
- type WeaveState
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 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 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 GenesisAccount ¶
type GenesisAccounts ¶
type GenesisAccounts []GenesisAccount
type IBCChannelPair ¶
type Metadata ¶
type Metadata struct {
PermChannels []Channel `json:"perm_channels"`
}
func DecodeBridgeMetadata ¶
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.