Documentation
¶
Index ¶
- Variables
- func GetTimeLeft(id int) time.Duration
- func Init()
- func ProcessMessages()
- func ProcessTimers()
- func Subscribe(topic ...string) chan *Message
- func TimerLoop(seconds int, every int, cancel_timer int, f func() (any, error, bool)) (any, error)
- func Unsubscribe(ch chan *Message)
- type B_EthBlockNumber
- type B_EthCall
- type B_EthEstimateGas
- type B_EthMultiCall
- type B_EthMultiCall_Call
- type B_EthSend
- type B_EthSendTx
- type B_EthSign
- type B_EthSignTypedData_v4
- type B_EthTxByHash
- type B_EthTxByHash_Response
- type B_ExplorerDownloadContract
- type B_Hail
- type B_LP_V2_Discover
- type B_LP_V2_GetPair
- type B_LP_V2_GetPositionStatus
- type B_LP_V2_GetPositionStatus_Response
- type B_LP_V2_GetReserves
- type B_LP_V2_GetReserves_Response
- type B_LP_V3_Discover
- type B_LP_V3_GetFactory
- type B_LP_V3_GetFeeGrowth
- type B_LP_V3_GetFeeGrowth_Response
- type B_LP_V3_GetNftPosition
- type B_LP_V3_GetNftPosition_Response
- type B_LP_V3_GetPool
- type B_LP_V3_GetPoolPosition
- type B_LP_V3_GetPoolPosition_Response
- type B_LP_V3_GetPositionStatus
- type B_LP_V3_GetPositionStatus_Response
- type B_LP_V3_GetSlot0
- type B_LP_V3_GetSlot0_Response
- type B_LP_V3_GetTick
- type B_LP_V3_GetTick_Response
- type B_LP_V4_Discover
- type B_LP_V4_GetNftPosition
- type B_LP_V4_GetNftPosition_Response
- type B_LP_V4_GetPositionStatus
- type B_LP_V4_GetPositionStatus_Response
- type B_SignerConnected
- type B_SignerGetAddresses
- type B_SignerGetAddresses_Response
- type B_SignerIsConnected
- type B_SignerIsConnected_Response
- type B_SignerList
- type B_SignerList_Response
- type B_SignerSign
- type B_SignerSignTx
- type B_SignerSignTypedData_v4
- type B_Staking_GetBalance
- type B_Staking_GetBalance_Response
- type B_Staking_GetDelegations
- type B_Staking_GetDelegations_Response
- type B_Staking_GetPending
- type B_Staking_GetPending_Response
- type B_TimerInit
- type B_TimerInitHard
- type B_TimerTick
- type B_UsbConnected
- type B_UsbDisconnected
- type B_UsbIsConnected
- type B_UsbIsConnected_Response
- type B_UsbList_Device
- type B_UsbList_Response
- type B_UsbRead
- type B_UsbRead_Response
- type B_UsbWrite
- type B_WsList_Conn
- type B_WsList_Response
- type Bus
- type BusTimer
- type Message
- func Fetch(topic, t string, data interface{}) *Message
- func FetchEx(topic, t string, data interface{}, timer_id int, limit time.Duration, ...) *Message
- func Send(topic, t string, data interface{}) *Message
- func SendEx(topic, t string, data interface{}, timer_id int, respond_to int, err error) *Message
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
View Source
var BusHardTimeout = 120 * time.Second
View Source
var BusTimeout = 60 * time.Second
View Source
var ErrInvalidMessageData = errors.New("invalid message data")
Functions ¶
func GetTimeLeft ¶
func ProcessMessages ¶
func ProcessMessages()
func ProcessTimers ¶
func ProcessTimers()
func Unsubscribe ¶
func Unsubscribe(ch chan *Message)
Types ¶
type B_EthBlockNumber ¶
type B_EthBlockNumber struct {
Blockchain string
}
type B_EthEstimateGas ¶
type B_EthMultiCall ¶
type B_EthMultiCall_Call ¶
type B_EthSend ¶
type B_EthSend struct {
ChainId int
Token string
From common.Address
To common.Address
Amount *big.Int
}
---------- eth ----------
type B_EthSendTx ¶
type B_EthSignTypedData_v4 ¶
type B_EthTxByHash ¶
type B_EthTxByHash_Response ¶
type B_EthTxByHash_Response struct {
BlockHash string `json:"blockHash"`
BlockNumber string `json:"blockNumber"`
ChainID int `json:"chainId"`
From string `json:"from"`
Gas string `json:"gas"`
GasPrice string `json:"gasPrice"`
Hash string `json:"hash"`
Input string `json:"input"`
Nonce string `json:"nonce"`
To string `json:"to"`
TransactionIndex string `json:"transactionIndex"`
Value string `json:"value"`
V string `json:"v"`
R string `json:"r"`
S string `json:"s"`
}
type B_ExplorerDownloadContract ¶
---------- explorer ----------
type B_Hail ¶
type B_Hail struct {
Priorized bool
Title string
Template string
OnOpen func(*Message, *gocui.Gui, *gocui.View)
OnClose func(*Message)
OnCancel func(*Message)
OnOk func(*Message, *gocui.View) bool // return true to close hail
OnSuspend func(*Message)
OnResume func(*Message)
OnTick func(*Message, int)
OnClickHotspot func(*Message, *gocui.View, *gocui.Hotspot)
OnOverHotspot func(*Message, *gocui.View, *gocui.Hotspot)
Suspended bool
}
type B_LP_V2_Discover ¶
type B_LP_V2_Discover struct {
ChainId int
Name string
Token0 common.Address // Optional: filter pairs by token0 address
Token1 common.Address // Optional: filter pairs by token1 address
}
---------- lp_v2 ----------
type B_LP_V2_GetPair ¶
type B_LP_V2_GetPositionStatus_Response ¶
type B_LP_V2_GetPositionStatus_Response struct {
Owner common.Address
ChainId int
Token0 common.Address
Token1 common.Address
Factory common.Address
Pair common.Address
LPBalance *big.Int
TotalSupply *big.Int
Reserve0 *big.Int
Reserve1 *big.Int
Liquidity0 *big.Int
Liquidity1 *big.Int
Liquidity0Dollars float64
Liquidity1Dollars float64
ProviderName string
}
type B_LP_V2_GetReserves ¶
type B_LP_V3_Discover ¶
---------- lp_v3 ----------
type B_LP_V3_GetFactory ¶
type B_LP_V3_GetFeeGrowth ¶
type B_LP_V3_GetNftPosition ¶
type B_LP_V3_GetPool ¶
type B_LP_V3_GetPoolPosition ¶
type B_LP_V3_GetPositionStatus_Response ¶
type B_LP_V3_GetPositionStatus_Response struct {
Owner common.Address
ChainId int
NFT_Token *big.Int
Token0 common.Address
Token1 common.Address
Provider common.Address
On bool
Liquidity0 *big.Int
Liquidity1 *big.Int
Liquidity0Dollars float64
Liquidity1Dollars float64
Gain0 *big.Int
Gain1 *big.Int
Gain0Dollars float64
Gain1Dollars float64
ProviderName string
FeeProtocol0 float32 // percentage
FeeProtocol1 float32 // percentage
}
type B_LP_V3_GetSlot0 ¶
type B_LP_V4_Discover ¶
type B_LP_V4_Discover struct {
ChainId int
Name string
TokenId *big.Int // Optional: specific NFT token ID to add
}
---------- lp_v4 ----------
type B_LP_V4_GetNftPosition ¶
type B_LP_V4_GetPositionStatus_Response ¶
type B_LP_V4_GetPositionStatus_Response struct {
Owner common.Address
ChainId int
NFT_Token *big.Int
Currency0 common.Address
Currency1 common.Address
Provider common.Address
PoolManager common.Address
PoolId [32]byte
TickLower int64
TickUpper int64
On bool
Fee int64
Liquidity *big.Int
Liquidity0 *big.Int
Liquidity1 *big.Int
Liquidity0Dollars float64
Liquidity1Dollars float64
Gain0 *big.Int
Gain1 *big.Int
Gain0Dollars float64
Gain1Dollars float64
ProviderName string
HookAddress common.Address
}
type B_SignerConnected ¶
type B_SignerGetAddresses ¶
type B_SignerGetAddresses struct {
Type string
Name string
MasterKey string
Path string
StartFrom int
Count int
}
---------- signer ----------
type B_SignerIsConnected ¶
type B_SignerIsConnected_Response ¶
type B_SignerIsConnected_Response struct {
Connected bool
}
type B_SignerList ¶
type B_SignerList struct {
Type string
}
type B_SignerList_Response ¶
type B_SignerList_Response struct {
Names []string
}
type B_SignerSign ¶
type B_SignerSignTx ¶
type B_Staking_GetBalance ¶
type B_Staking_GetBalance struct {
ChainId int
Contract common.Address
Owner common.Address
ValidatorId uint64 // Optional: for validator-based staking (e.g., Monad)
VaultAddress common.Address // Optional: for vault-based staking (e.g., Aztec)
}
---------- staking ----------
type B_Staking_GetDelegations_Response ¶
type B_Staking_GetDelegations_Response struct {
ValidatorIds []uint64
}
type B_Staking_GetPending ¶
type B_TimerInit ¶
---------- timer ----------
type B_TimerInitHard ¶
type B_TimerTick ¶
type B_UsbConnected ¶
type B_UsbDisconnected ¶
type B_UsbDisconnected struct {
USB_ID string
}
type B_UsbIsConnected ¶
type B_UsbIsConnected struct {
USB_ID string
}
type B_UsbIsConnected_Response ¶
type B_UsbIsConnected_Response struct {
Connected bool
}
type B_UsbList_Device ¶
type B_UsbList_Device struct {
USB_ID string
Path string
Vendor string
VendorID uint16
Product string
ProductID uint16
Connected bool
}
---------- usb ----------
type B_UsbList_Response ¶
type B_UsbList_Response []B_UsbList_Device
type B_UsbRead_Response ¶
type B_UsbRead_Response struct {
Data []byte
}
type B_UsbWrite ¶
type B_WsList_Response ¶
type B_WsList_Response []B_WsList_Conn
type Message ¶
type Message struct {
ID int
Topic string
Type string
Data interface{}
TimerID int
Error error
RespondTo int
OnCancel func(m *Message)
}
type Subscriber ¶
type Subscriber interface {
Notify(msg Message)
}
Click to show internal directories.
Click to hide internal directories.