Documentation
¶
Index ¶
- type BlockChain
- type BlockChains
- func (b BlockChains) AptosChains() (map[uint64]aptos.Chain, error)
- func (b BlockChains) EVMChains() (map[uint64]evm.Chain, error)
- func (b BlockChains) ListChainSelectors(options ...ChainSelectorsOption) []uint64
- func (b BlockChains) SolanaChains() (map[uint64]solana.Chain, error)
- func (b BlockChains) SuiChains() (map[uint64]sui.Chain, error)
- func (b BlockChains) TonChains() (map[uint64]ton.Chain, error)
- type ChainSelectorsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockChain ¶
type BlockChain interface {
// String returns chain name and selector "<name> (<selector>)"
String() string
// Name returns the name of the chain
Name() string
ChainSelector() uint64
}
BlockChain is an interface that represents a chain. A chain can be an EVM chain, Solana chain Aptos chain or others.
type BlockChains ¶
type BlockChains struct {
// contains filtered or unexported fields
}
BlockChains represents a collection of chains. It provides querying capabilities for different types of chains.
func NewBlockChains ¶
func NewBlockChains(chains map[uint64]BlockChain) BlockChains
NewBlockChains initializes a new BlockChains instance
func (BlockChains) AptosChains ¶
func (b BlockChains) AptosChains() (map[uint64]aptos.Chain, error)
AptosChains returns a map of all Aptos chains with their selectors.
func (BlockChains) EVMChains ¶
func (b BlockChains) EVMChains() (map[uint64]evm.Chain, error)
EVMChains returns a map of all EVM chains with their selectors.
func (BlockChains) ListChainSelectors ¶
func (b BlockChains) ListChainSelectors(options ...ChainSelectorsOption) []uint64
ListChainSelectors returns all chain selectors with optional filtering Options: - WithFamily: filter by family eg WithFamily(chain_selectors.FamilySolana) - WithChainSelectorsExclusion: exclude specific chain selectors
func (BlockChains) SolanaChains ¶
func (b BlockChains) SolanaChains() (map[uint64]solana.Chain, error)
SolanaChains returns a map of all Solana chains with their selectors.
type ChainSelectorsOption ¶
type ChainSelectorsOption func(*chainSelectorsOptions)
ChainSelectorsOption defines a function type for configuring ChainSelectors
func WithChainSelectorsExclusion ¶
func WithChainSelectorsExclusion(chainSelectors []uint64) ChainSelectorsOption
WithChainSelectorsExclusion returns an option to exclude specific chain selectors
func WithFamily ¶
func WithFamily(family string) ChainSelectorsOption
WithFamily returns an option to filter chains by family (evm, solana, aptos) Use constants from chain_selectors package eg WithFamily(chain_selectors.FamilySolana)