Documentation
¶
Index ¶
- func Bech32ToHexAddr(bech32Addr string) (common.Address, error)
- func ComputeIBCDenom(portID, channelID, denom string) string
- func ComputeIBCDenomTrace(portID, channelID, denom string) ibctransfertypes.DenomTrace
- func CosmosToEthAddr(accAddr sdk.AccAddress) common.Address
- func CreateAccAddressFromBech32(address string, bech32prefix string) (addr sdk.AccAddress, err error)
- func EthHexToCosmosAddr(hexAddr string) sdk.AccAddress
- func EthToCosmosAddr(addr common.Address) sdk.AccAddress
- func GetAccAddressFromBech32(address string) (sdk.AccAddress, error)
- func GetIBCDenomAddress(denom string) (common.Address, error)
- func IsSupportedKey(pubkey cryptotypes.PubKey) bool
- func SortSlice[T constraints.Ordered](slice []T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bech32ToHexAddr ¶
Bech32ToHexAddr converts a given Bech32 address string and converts it to an Ethereum address.
func ComputeIBCDenom ¶
ComputeIBCDenom compute the ibc voucher denom associated to the portID, channelID, and the given a token denomination.
func ComputeIBCDenomTrace ¶
func ComputeIBCDenomTrace( portID, channelID, denom string, ) ibctransfertypes.DenomTrace
ComputeIBCDenomTrace compute the ibc voucher denom trace associated with the portID, channelID, and the given a token denomination.
func CosmosToEthAddr ¶
func CosmosToEthAddr(accAddr sdk.AccAddress) common.Address
CosmosToEthAddr converts a given SDK account address to an Ethereum address.
func CreateAccAddressFromBech32 ¶
func CreateAccAddressFromBech32(address string, bech32prefix string) (addr sdk.AccAddress, err error)
CreateAccAddressFromBech32 creates an AccAddress from a Bech32 string.
func EthHexToCosmosAddr ¶
func EthHexToCosmosAddr(hexAddr string) sdk.AccAddress
EthHexToCosmosAddr takes a given Hex string and derives a Cosmos SDK account address from it.
func EthToCosmosAddr ¶
func EthToCosmosAddr(addr common.Address) sdk.AccAddress
EthToCosmosAddr converts a given Ethereum style address to an SDK address.
func GetAccAddressFromBech32 ¶
func GetAccAddressFromBech32(address string) (sdk.AccAddress, error)
GetAccAddressFromBech32 returns the sdk.Account address of given address, while also changing bech32 human readable prefix (HRP) to the value set on the global sdk.Config (eg: `evmos`).
The function fails if the provided bech32 address is invalid.
func GetIBCDenomAddress ¶
GetIBCDenomAddress returns the address from the hash of the ICS20's DenomTrace Path.
func IsSupportedKey ¶
func IsSupportedKey(pubkey cryptotypes.PubKey) bool
IsSupportedKey returns true if the pubkey type is supported by the chain (i.e. eth_secp256k1, amino multisig, ed25519). NOTE: Nested multisigs are not supported.
func SortSlice ¶
func SortSlice[T constraints.Ordered](slice []T)
SortSlice sorts a slice of any ordered type.
Types ¶
This section is empty.