Documentation
¶
Index ¶
- Constants
- Variables
- func GetL1ActiveLcd(ctx context.Context) (string, error)
- func GetL1ActiveRpc(ctx context.Context) (string, error)
- func GetL1ChainId(ctx context.Context) (string, error)
- func GetL1GasDenom(ctx context.Context) (string, error)
- func GetL1GasPrices(ctx context.Context) (string, error)
- func GetL2ActiveLcd(ctx context.Context) (string, error)
- func GetL2ActiveRpc(ctx context.Context) (string, error)
- func GetL2ChainId(ctx context.Context) (string, error)
- func GetL2GasDenom(ctx context.Context) (string, error)
- func GetL2GasPrices(ctx context.Context) (string, error)
- func GetL2IBCChannelInfo(ctx context.Context, port, channel string) (types.ChannelResponse, error)
- func NewSelectSettingUpIBCChannelsMethod(ctx context.Context) (tea.Model, error)
- func NewTerminalState(ctx context.Context) tea.Model
- func WaitSettingUpRelayer(ctx context.Context) tea.Cmd
- type AddChallengerKeyToRelayer
- type AddChallengerKeyToRelayerOption
- type AddMoreIBCChannels
- type Config
- type Connection
- type CounterParty
- type Data
- type FetchingBalancesLoading
- type Field
- type FieldInputModel
- type FieldType
- type FillChannelL1
- type FillChannelL2
- type FillL2LCD
- type FillPortOnL1
- type FillPortOnL2
- type FundDefaultPresetBroadcastLoading
- type FundDefaultPresetConfirmationInput
- type FundManuallyL1BalanceInput
- type FundManuallyL2BalanceInput
- type FundingAmountSelect
- type FundingAmountSelectOption
- type GasPrice
- type GenerateL1RelayerKeyLoading
- type GenerateL2RelayerKeyLoading
- type IBCChannelsCheckbox
- type ImportL1RelayerKeyInput
- type ImportL2RelayerKeyInput
- type KeysMnemonicDisplayInput
- type L1KeySelect
- type L1KeySelectOption
- type L2KeySelect
- type L2KeySelectOption
- type NetworkSelectOption
- type PacketFilter
- type RollupSelect
- type RollupSelectOption
- type SelectSettingUpIBCChannelsMethod
- type SelectingL1Network
- type SelectingL1NetworkRegistry
- type SelectingL2Network
- type SettingUpIBCChannelOption
- type SettingUpRelayer
- type State
- type SubModel
- type TerminalState
Constants ¶
View Source
const ( DefaultGasPriceDenom = "uinit" DefaultGasPriceAmount = "0.015" InitiaTestnetChainId = "initiation-2" InitiaMainnetChainId = "interwoven-1" DefaultL1RelayerBalance = "1000000" DefaultL2RelayerBalance = "1000000" DefaultL1RelayerKeyName = "weave_l1_relayer" DefaultL2RelayerKeyName = "weave_l2_relayer" )
Variables ¶
View Source
var ( L1ExistingKey = L1KeySelectOption("Use an existing key " + styles.Text("(previously setup with Weave)", styles.Gray)) L1ImportKey = L1KeySelectOption("Import existing key " + styles.Text("(you will be prompted to enter your mnemonic)", styles.Gray)) )
View Source
var ( L2ExistingKey = L2KeySelectOption("Use an existing key " + styles.Text("(previously setup in Weave)", styles.Gray)) L2ImportKey = L2KeySelectOption("Import existing key " + styles.Text("(you will be prompted to enter your mnemonic)", styles.Gray)) )
Functions ¶
func GetL2IBCChannelInfo ¶ added in v0.3.0
Types ¶
type AddChallengerKeyToRelayer ¶
type AddChallengerKeyToRelayer struct {
ui.Selector[AddChallengerKeyToRelayerOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewAddChallengerKeyToRelayer ¶
func NewAddChallengerKeyToRelayer(ctx context.Context) *AddChallengerKeyToRelayer
func (*AddChallengerKeyToRelayer) GetQuestion ¶
func (m *AddChallengerKeyToRelayer) GetQuestion() string
func (*AddChallengerKeyToRelayer) Init ¶
func (m *AddChallengerKeyToRelayer) Init() tea.Cmd
func (*AddChallengerKeyToRelayer) View ¶
func (m *AddChallengerKeyToRelayer) View() string
type AddChallengerKeyToRelayerOption ¶
type AddChallengerKeyToRelayerOption string
const ( YesAddChallengerKeyToRelayerOption AddChallengerKeyToRelayerOption = "Yes (recommended, open the tooltip to see the details)" NoAddChallengerKeyToRelayerOption AddChallengerKeyToRelayerOption = "No, I want to setup relayer with a separate key" )
type AddMoreIBCChannels ¶
type AddMoreIBCChannels struct {
ui.Selector[string]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewAddMoreIBCChannels ¶
func NewAddMoreIBCChannels(ctx context.Context, idx int) *AddMoreIBCChannels
func (*AddMoreIBCChannels) GetQuestion ¶
func (m *AddMoreIBCChannels) GetQuestion() string
func (*AddMoreIBCChannels) Init ¶
func (m *AddMoreIBCChannels) Init() tea.Cmd
func (*AddMoreIBCChannels) View ¶
func (m *AddMoreIBCChannels) View() string
type Config ¶
type Config struct {
Chains []Data `toml:"chains"`
}
Config defines a structure for the top-level TOML
type Connection ¶ added in v0.3.0
type CounterParty ¶
type Data ¶
type Data struct {
ID string `toml:"id"`
RPCAddr string
RESTAddr string
GasPrice GasPrice
Mnemonic string
PacketFilter PacketFilter `toml:"packet_filter"`
ID2 string
RPCAddr2 string
RESTAddr2 string
GasPrice2 GasPrice
Mnemonic2 string
PacketFilter2 PacketFilter
}
Data holds all the dynamic data for the template
type FetchingBalancesLoading ¶
type FetchingBalancesLoading struct {
ui.Loading
weavecontext.BaseModel
}
func NewFetchingBalancesLoading ¶
func NewFetchingBalancesLoading(ctx context.Context) *FetchingBalancesLoading
func (*FetchingBalancesLoading) Init ¶
func (m *FetchingBalancesLoading) Init() tea.Cmd
func (*FetchingBalancesLoading) View ¶
func (m *FetchingBalancesLoading) View() string
type Field ¶
type FieldInputModel ¶
type FieldInputModel struct {
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewFieldInputModel ¶
func NewFieldInputModel(ctx context.Context, fields []*Field, newTerminalModel func(context.Context) (tea.Model, error)) *FieldInputModel
NewFieldInputModel initializes the parent model with the submodels
func (*FieldInputModel) Init ¶
func (m *FieldInputModel) Init() tea.Cmd
func (*FieldInputModel) View ¶
func (m *FieldInputModel) View() string
View delegates the view logic to the current active submodel
type FillChannelL1 ¶
type FillChannelL1 struct {
weavecontext.BaseModel
ui.TextInput
// contains filtered or unexported fields
}
func NewFillChannelL1 ¶
func NewFillChannelL1(ctx context.Context, port string, idx int) *FillChannelL1
func (*FillChannelL1) GetQuestion ¶
func (m *FillChannelL1) GetQuestion() string
func (*FillChannelL1) Init ¶
func (m *FillChannelL1) Init() tea.Cmd
func (*FillChannelL1) View ¶
func (m *FillChannelL1) View() string
type FillChannelL2 ¶
type FillChannelL2 struct {
weavecontext.BaseModel
ui.TextInput
// contains filtered or unexported fields
}
func NewFillChannelL2 ¶
func NewFillChannelL2(ctx context.Context, port string, idx int) *FillChannelL2
func (*FillChannelL2) GetQuestion ¶
func (m *FillChannelL2) GetQuestion() string
func (*FillChannelL2) Init ¶
func (m *FillChannelL2) Init() tea.Cmd
func (*FillChannelL2) View ¶
func (m *FillChannelL2) View() string
type FillL2LCD ¶
type FillL2LCD struct {
weavecontext.BaseModel
ui.TextInput
// contains filtered or unexported fields
}
func NewFillL2LCD ¶
func (*FillL2LCD) GetQuestion ¶
type FillPortOnL1 ¶
type FillPortOnL1 struct {
weavecontext.BaseModel
ui.TextInput
// contains filtered or unexported fields
}
func NewFillPortOnL1 ¶
func NewFillPortOnL1(ctx context.Context, idx int) *FillPortOnL1
func (*FillPortOnL1) GetQuestion ¶
func (m *FillPortOnL1) GetQuestion() string
func (*FillPortOnL1) Init ¶
func (m *FillPortOnL1) Init() tea.Cmd
func (*FillPortOnL1) View ¶
func (m *FillPortOnL1) View() string
type FillPortOnL2 ¶
type FillPortOnL2 struct {
weavecontext.BaseModel
ui.TextInput
// contains filtered or unexported fields
}
func NewFillPortOnL2 ¶
func NewFillPortOnL2(ctx context.Context, idx int, counterParty CounterParty) *FillPortOnL2
func (*FillPortOnL2) GetQuestion ¶
func (m *FillPortOnL2) GetQuestion() string
func (*FillPortOnL2) Init ¶
func (m *FillPortOnL2) Init() tea.Cmd
func (*FillPortOnL2) View ¶
func (m *FillPortOnL2) View() string
type FundDefaultPresetBroadcastLoading ¶
type FundDefaultPresetBroadcastLoading struct {
ui.Loading
weavecontext.BaseModel
}
func NewFundDefaultPresetBroadcastLoading ¶
func NewFundDefaultPresetBroadcastLoading(ctx context.Context) *FundDefaultPresetBroadcastLoading
func (*FundDefaultPresetBroadcastLoading) Init ¶
func (m *FundDefaultPresetBroadcastLoading) Init() tea.Cmd
func (*FundDefaultPresetBroadcastLoading) View ¶
func (m *FundDefaultPresetBroadcastLoading) View() string
type FundDefaultPresetConfirmationInput ¶
type FundDefaultPresetConfirmationInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewFundDefaultPresetConfirmationInput ¶
func NewFundDefaultPresetConfirmationInput(ctx context.Context) (*FundDefaultPresetConfirmationInput, error)
func (*FundDefaultPresetConfirmationInput) GetQuestion ¶
func (m *FundDefaultPresetConfirmationInput) GetQuestion() string
func (*FundDefaultPresetConfirmationInput) Init ¶
func (m *FundDefaultPresetConfirmationInput) Init() tea.Cmd
func (*FundDefaultPresetConfirmationInput) View ¶
func (m *FundDefaultPresetConfirmationInput) View() string
type FundManuallyL1BalanceInput ¶
type FundManuallyL1BalanceInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewFundManuallyL1BalanceInput ¶
func NewFundManuallyL1BalanceInput(ctx context.Context) (*FundManuallyL1BalanceInput, error)
func (*FundManuallyL1BalanceInput) GetQuestion ¶
func (m *FundManuallyL1BalanceInput) GetQuestion() string
func (*FundManuallyL1BalanceInput) Init ¶
func (m *FundManuallyL1BalanceInput) Init() tea.Cmd
func (*FundManuallyL1BalanceInput) View ¶
func (m *FundManuallyL1BalanceInput) View() string
type FundManuallyL2BalanceInput ¶
type FundManuallyL2BalanceInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewFundManuallyL2BalanceInput ¶
func NewFundManuallyL2BalanceInput(ctx context.Context) (*FundManuallyL2BalanceInput, error)
func (*FundManuallyL2BalanceInput) GetQuestion ¶
func (m *FundManuallyL2BalanceInput) GetQuestion() string
func (*FundManuallyL2BalanceInput) Init ¶
func (m *FundManuallyL2BalanceInput) Init() tea.Cmd
func (*FundManuallyL2BalanceInput) View ¶
func (m *FundManuallyL2BalanceInput) View() string
type FundingAmountSelect ¶
type FundingAmountSelect struct {
ui.Selector[FundingAmountSelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewFundingAmountSelect ¶
func NewFundingAmountSelect(ctx context.Context) (*FundingAmountSelect, error)
func (*FundingAmountSelect) GetQuestion ¶
func (m *FundingAmountSelect) GetQuestion() string
func (*FundingAmountSelect) Init ¶
func (m *FundingAmountSelect) Init() tea.Cmd
func (*FundingAmountSelect) View ¶
func (m *FundingAmountSelect) View() string
type FundingAmountSelectOption ¶
type FundingAmountSelectOption string
const ( FundingFillManually FundingAmountSelectOption = "○ Fill in an amount manually to fund from Gas Station Account" FundingUserTransfer FundingAmountSelectOption = "○ Skip funding from Gas station" )
var FundingDefaultPreset FundingAmountSelectOption = ""
type GenerateL1RelayerKeyLoading ¶
type GenerateL1RelayerKeyLoading struct {
ui.Loading
weavecontext.BaseModel
}
func NewGenerateL1RelayerKeyLoading ¶
func NewGenerateL1RelayerKeyLoading(ctx context.Context) *GenerateL1RelayerKeyLoading
func (*GenerateL1RelayerKeyLoading) Init ¶
func (m *GenerateL1RelayerKeyLoading) Init() tea.Cmd
func (*GenerateL1RelayerKeyLoading) View ¶
func (m *GenerateL1RelayerKeyLoading) View() string
type GenerateL2RelayerKeyLoading ¶
type GenerateL2RelayerKeyLoading struct {
ui.Loading
weavecontext.BaseModel
}
func NewGenerateL2RelayerKeyLoading ¶
func NewGenerateL2RelayerKeyLoading(ctx context.Context) *GenerateL2RelayerKeyLoading
func (*GenerateL2RelayerKeyLoading) Init ¶
func (m *GenerateL2RelayerKeyLoading) Init() tea.Cmd
func (*GenerateL2RelayerKeyLoading) View ¶
func (m *GenerateL2RelayerKeyLoading) View() string
type IBCChannelsCheckbox ¶
type IBCChannelsCheckbox struct {
ui.CheckBox[string]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewIBCChannelsCheckbox ¶
func NewIBCChannelsCheckbox(ctx context.Context, pairs []types.IBCChannelPair) *IBCChannelsCheckbox
func (*IBCChannelsCheckbox) GetQuestion ¶
func (m *IBCChannelsCheckbox) GetQuestion() string
func (*IBCChannelsCheckbox) Init ¶
func (m *IBCChannelsCheckbox) Init() tea.Cmd
func (*IBCChannelsCheckbox) View ¶
func (m *IBCChannelsCheckbox) View() string
type ImportL1RelayerKeyInput ¶
type ImportL1RelayerKeyInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewImportL1RelayerKeyInput ¶
func NewImportL1RelayerKeyInput(ctx context.Context) *ImportL1RelayerKeyInput
func (*ImportL1RelayerKeyInput) GetQuestion ¶
func (m *ImportL1RelayerKeyInput) GetQuestion() string
func (*ImportL1RelayerKeyInput) Init ¶
func (m *ImportL1RelayerKeyInput) Init() tea.Cmd
func (*ImportL1RelayerKeyInput) View ¶
func (m *ImportL1RelayerKeyInput) View() string
type ImportL2RelayerKeyInput ¶
type ImportL2RelayerKeyInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewImportL2RelayerKeyInput ¶
func NewImportL2RelayerKeyInput(ctx context.Context) *ImportL2RelayerKeyInput
func (*ImportL2RelayerKeyInput) GetQuestion ¶
func (m *ImportL2RelayerKeyInput) GetQuestion() string
func (*ImportL2RelayerKeyInput) Init ¶
func (m *ImportL2RelayerKeyInput) Init() tea.Cmd
func (*ImportL2RelayerKeyInput) View ¶
func (m *ImportL2RelayerKeyInput) View() string
type KeysMnemonicDisplayInput ¶
type KeysMnemonicDisplayInput struct {
ui.TextInput
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewKeysMnemonicDisplayInput ¶
func NewKeysMnemonicDisplayInput(ctx context.Context) *KeysMnemonicDisplayInput
func (*KeysMnemonicDisplayInput) GetQuestion ¶
func (m *KeysMnemonicDisplayInput) GetQuestion() string
func (*KeysMnemonicDisplayInput) Init ¶
func (m *KeysMnemonicDisplayInput) Init() tea.Cmd
func (*KeysMnemonicDisplayInput) View ¶
func (m *KeysMnemonicDisplayInput) View() string
type L1KeySelect ¶
type L1KeySelect struct {
ui.Selector[L1KeySelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewL1KeySelect ¶
func NewL1KeySelect(ctx context.Context) (*L1KeySelect, error)
func (*L1KeySelect) GetQuestion ¶
func (m *L1KeySelect) GetQuestion() string
func (*L1KeySelect) Init ¶
func (m *L1KeySelect) Init() tea.Cmd
func (*L1KeySelect) View ¶
func (m *L1KeySelect) View() string
type L1KeySelectOption ¶
type L1KeySelectOption string
const (
L1GenerateKey L1KeySelectOption = "Generate new system key"
)
type L2KeySelect ¶
type L2KeySelect struct {
ui.Selector[L2KeySelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewL2KeySelect ¶
func NewL2KeySelect(ctx context.Context) (*L2KeySelect, error)
func (*L2KeySelect) GetQuestion ¶
func (m *L2KeySelect) GetQuestion() string
func (*L2KeySelect) Init ¶
func (m *L2KeySelect) Init() tea.Cmd
func (*L2KeySelect) View ¶
func (m *L2KeySelect) View() string
type L2KeySelectOption ¶
type L2KeySelectOption string
const ( L2SameKey L2KeySelectOption = "Use the same key with L1" L2GenerateKey L2KeySelectOption = "Generate new system key" )
type NetworkSelectOption ¶
type NetworkSelectOption string
var ( Testnet NetworkSelectOption = "" Mainnet NetworkSelectOption = "" )
func (NetworkSelectOption) ToChainType ¶
func (n NetworkSelectOption) ToChainType() (registry.ChainType, error)
type PacketFilter ¶
type PacketFilter struct {
Connections []Connection
}
PacketFilter holds the packet filter configuration
type RollupSelect ¶
type RollupSelect struct {
ui.Selector[RollupSelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewRollupSelect ¶
func NewRollupSelect(ctx context.Context) (*RollupSelect, error)
func (*RollupSelect) GetQuestion ¶
func (m *RollupSelect) GetQuestion() string
func (*RollupSelect) Init ¶
func (m *RollupSelect) Init() tea.Cmd
func (*RollupSelect) View ¶
func (m *RollupSelect) View() string
type RollupSelectOption ¶
type RollupSelectOption string
const ( Whitelisted RollupSelectOption = "Whitelisted Rollup" Manual RollupSelectOption = "Manual Relayer Setup" )
var Local RollupSelectOption = "Local Rollup"
type SelectSettingUpIBCChannelsMethod ¶
type SelectSettingUpIBCChannelsMethod struct {
ui.Selector[SettingUpIBCChannelOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func (*SelectSettingUpIBCChannelsMethod) GetQuestion ¶
func (m *SelectSettingUpIBCChannelsMethod) GetQuestion() string
func (*SelectSettingUpIBCChannelsMethod) Init ¶
func (m *SelectSettingUpIBCChannelsMethod) Init() tea.Cmd
func (*SelectSettingUpIBCChannelsMethod) View ¶
func (m *SelectSettingUpIBCChannelsMethod) View() string
type SelectingL1Network ¶
type SelectingL1Network struct {
ui.Selector[NetworkSelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewSelectingL1Network ¶
func NewSelectingL1Network(ctx context.Context) (*SelectingL1Network, error)
func (*SelectingL1Network) GetQuestion ¶
func (m *SelectingL1Network) GetQuestion() string
func (*SelectingL1Network) Init ¶
func (m *SelectingL1Network) Init() tea.Cmd
func (*SelectingL1Network) View ¶
func (m *SelectingL1Network) View() string
type SelectingL1NetworkRegistry ¶
type SelectingL1NetworkRegistry struct {
ui.Selector[NetworkSelectOption]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewSelectingL1NetworkRegistry ¶
func NewSelectingL1NetworkRegistry(ctx context.Context) (*SelectingL1NetworkRegistry, error)
func (*SelectingL1NetworkRegistry) GetQuestion ¶
func (m *SelectingL1NetworkRegistry) GetQuestion() string
func (*SelectingL1NetworkRegistry) Init ¶
func (m *SelectingL1NetworkRegistry) Init() tea.Cmd
func (*SelectingL1NetworkRegistry) View ¶
func (m *SelectingL1NetworkRegistry) View() string
type SelectingL2Network ¶
type SelectingL2Network struct {
ui.Selector[string]
weavecontext.BaseModel
// contains filtered or unexported fields
}
func NewSelectingL2Network ¶
func (*SelectingL2Network) GetQuestion ¶
func (m *SelectingL2Network) GetQuestion() string
func (*SelectingL2Network) Init ¶
func (m *SelectingL2Network) Init() tea.Cmd
func (*SelectingL2Network) View ¶
func (m *SelectingL2Network) View() string
type SettingUpIBCChannelOption ¶
type SettingUpIBCChannelOption string
var ( Basic SettingUpIBCChannelOption = "Subscribe to only `transfer` and `nft-transfer` IBC Channels (minimal setup)" FillFromLCD SettingUpIBCChannelOption = "Fill in rollup REST endpoint to detect all available IBC Channels" Manually SettingUpIBCChannelOption = "Setup IBC Channels manually" )
type SettingUpRelayer ¶
type SettingUpRelayer struct {
ui.Loading
weavecontext.BaseModel
}
func NewSettingUpRelayer ¶
func NewSettingUpRelayer(ctx context.Context) *SettingUpRelayer
func (*SettingUpRelayer) Init ¶
func (m *SettingUpRelayer) Init() tea.Cmd
func (*SettingUpRelayer) View ¶
func (m *SettingUpRelayer) View() string
type State ¶
type State struct {
Config map[string]string
IBCChannels []types.IBCChannelPair
// contains filtered or unexported fields
}
func NewRelayerState ¶
func NewRelayerState() State
type SubModel ¶
func NewSubModel ¶
func (*SubModel) UpdateWithContext ¶
type TerminalState ¶
type TerminalState struct {
weavecontext.BaseModel
}
func (*TerminalState) Init ¶
func (m *TerminalState) Init() tea.Cmd
func (*TerminalState) View ¶
func (m *TerminalState) View() string
Click to show internal directories.
Click to hide internal directories.