Documentation ¶
Index ¶
- Constants
- func AppendBytes(args ...[]byte) []byte
- func GetPrefixFromBech32(bech32str string) (string, error)
- func GetRouterAddressFromBech32(address string) (sdk.AccAddress, error)
- func HashString(input string) []byte
- func IsMainnet(chainID string) bool
- func IsSupportedKey(pubkey cryptotypes.PubKey) bool
- func IsTestnet(chainID string) bool
- func StrToFixByteArray(s string) ([32]byte, error)
- func UInt64Bytes(n uint64) []byte
- func UInt64FromBytes(s []byte) uint64
- func UInt64FromString(s string) (uint64, error)
Constants ¶
const ( // CrosschainRequestCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkRequest message CrosschainRequestCheckpointABIJSON = `` /* 1091-byte string literal not displayed */ // CrosschainRequestNearCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkRequest message CrosschainRequestNearCheckpointABIJSON = `` /* 1085-byte string literal not displayed */ // CrosschainRequestAlephZeroCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkRequest message CrosschainRequestAlephZeroCheckpointABIJSON = `` /* 1112-byte string literal not displayed */ // CrosschainAckRequestCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkAckRequest message CrosschainAckRequestCheckpointABIJSON = `` /* 782-byte string literal not displayed */ // CrosschainAckRequestNearCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkAckRequest message CrosschainAckRequestNearCheckpointABIJSON = `` /* 780-byte string literal not displayed */ // CrosschainAckRequestNearCheckpointABIJSON checks the ETH ABI for compatibility of the CrossTalkAckRequest message CrosschainAckRequestAlephZeroCheckpointABIJSON = `` /* 799-byte string literal not displayed */ // ValsetCheckpointABIJSON checks the ETH ABI for compatibility of the Valset update message ValsetCheckpointABIJSON = `` /* 507-byte string literal not displayed */ // OutgoingLogicCallABIJSON checks the ETH ABI for compatibility of the logic call message OutgoingLogicCallABIJSON = `` /* 1153-byte string literal not displayed */ // OutboundBatchRequestEventABIJSON checks the ETH ABI for compatibility of the Outbound batch event OutboundBatchRequestEventABIJSON = `` /* 1286-byte string literal not displayed */ // InboundSudoRequestABIJSON checks the ETH ABI for compatibility of the Inbound Batch request InboundSudoRequestABIJSON = `` /* 535-byte string literal not displayed */ // OutboundAckSudoRequestABIJSON checks the ETH ABI for compatibility of the Outbound Ack request OutboundAckSudoRequestABIJSON = `` /* 777-byte string literal not displayed */ )
const ( // MainnetChainID defines the Router EIP155 chain ID for mainnet MainnetChainID = "router_9605" // TestnetChainID defines the Router EIP155 chain ID for testnet TestnetChainID = "router_9605" // BaseDenom defines the Router mainnet denomination BaseDenom = "route" )
Variables ¶
This section is empty.
Functions ¶
func AppendBytes ¶
func GetPrefixFromBech32 ¶
GetPrefixFromBech32 returns the human readable part of a bech32 string (excluding the 1 byte) Returns an error on too short input or when the 1 byte cannot be found Note: This is an excerpt from the Decode function for bech32 strings
func GetRouterAddressFromBech32 ¶
func GetRouterAddressFromBech32(address string) (sdk.AccAddress, error)
GetRouterAddressFromBech32 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: `router`). The function fails if the provided bech32 address is invalid.
func HashString ¶
Hashing string using cryptographic MD5 function returns 128bit(16byte) value
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 StrToFixByteArray ¶
func UInt64Bytes ¶
UInt64Bytes uses the SDK byte marshaling to encode a uint64
func UInt64FromBytes ¶
UInt64FromBytes create uint from binary big endian representation
func UInt64FromString ¶
UInt64FromString to parse out a uint64 for a nonce
Types ¶
This section is empty.