Documentation
¶
Index ¶
- Constants
- func ComputeIBCDenom(portID, channelID, denom string) string
- func ComputeIBCDenomTrace(portID, channelID, denom string) ibctransfertypes.DenomTrace
- func CreateAccAddressFromBech32(address string, bech32prefix string) (addr sdk.AccAddress, err error)
- func GetAddressFromBech32(address string) (sdk.AccAddress, error)
- func GetIBCDenomAddress(denom string) (common.Address, error)
- func IsMainnet(chainID string) bool
- func IsSupportedKey(pubkey cryptotypes.PubKey) bool
- func IsTestnet(chainID string) bool
Constants ¶
const ( // MainnetChainID defines the BounceBit EIP155 chain ID for mainnet MainnetChainID = "bouncebit_6001" // TestnetChainID defines the BounceBit EIP155 chain ID for testnet TestnetChainID = "bouncebit_6000" // BaseDenom defines the BounceBit mainnet denomination BaseDenom = "bit" )
Variables ¶
This section is empty.
Functions ¶
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 CreateAccAddressFromBech32 ¶
func CreateAccAddressFromBech32(address string, bech32prefix string) (addr sdk.AccAddress, err error)
CreateAccAddressFromBech32 creates an AccAddress from a Bech32 string.
func GetAddressFromBech32 ¶
func GetAddressFromBech32(address string) (sdk.AccAddress, error)
GetAddressFromBech32 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: `bouncebit`). 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 IsMainnet ¶
IsMainnet returns true if the chain-id has the BounceBit mainnet EIP155 chain prefix.
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.
Types ¶
This section is empty.