Documentation ¶
Index ¶
- Constants
- Variables
- func IsValidChainID(chainID string) bool
- func IsValidInt256(i *big.Int) bool
- func ParseChainID(chainID string) (*big.Int, error)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func SafeInt64(value uint64) (int64, error)
- func SafeNewIntFromBigInt(i *big.Int) (sdkmath.Int, error)
- type HDPathIterator
Constants ¶
View Source
const (
// RootCodespace is the codespace for all errors defined in this package
RootCodespace = "ethermint"
)
Variables ¶
View Source
var ( // ErrInvalidValue returns an error resulting from an invalid value. ErrInvalidValue = errorsmod.Register(RootCodespace, 2, "invalid value") // ErrInvalidChainID returns an error resulting from an invalid chain ID. ErrInvalidChainID = errorsmod.Register(RootCodespace, 3, "invalid chain ID") // ErrMarshalBigInt returns an error resulting from marshaling a big.Int to a string. ErrMarshalBigInt = errorsmod.Register(RootCodespace, 5, "cannot marshal big.Int to string") // ErrUnmarshalBigInt returns an error resulting from unmarshaling a big.Int from a string. ErrUnmarshalBigInt = errorsmod.Register(RootCodespace, 6, "cannot unmarshal big.Int from string") ErrInvalidEIP712Object = errorsmod.Register(RootCodespace, 7, "invalid EIP-712 object type. could not resolve type") )
View Source
var ( // Bip44CoinType satisfies EIP84. See https://github.com/ethereum/EIPs/issues/84 for more info. Bip44CoinType uint32 = 60 // BIP44HDPath is the default BIP44 HD path used on Ethereum. BIP44HDPath = ethaccounts.DefaultBaseDerivationPath.String() )
Functions ¶
func IsValidChainID ¶
IsValidChainID returns false if the given chain identifier is incorrectly formatted.
func IsValidInt256 ¶
IsValidInt256 check the bound of 256 bit number
func ParseChainID ¶
ParseChainID parses a string chain identifier's epoch to an Ethereum-compatible chain-id in *big.Int format. The function returns an error if the chain-id has an invalid format
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the tendermint concrete client-related implementations and interfaces.
Types ¶
type HDPathIterator ¶
type HDPathIterator func() ethaccounts.DerivationPath
func NewHDPathIterator ¶
func NewHDPathIterator(basePath string, ledgerIter bool) (HDPathIterator, error)
HDPathIterator receives a base path as a string and a boolean for the desired iterator type and returns a function that iterates over the base HD path, returning the string.
Click to show internal directories.
Click to hide internal directories.