Documentation ¶
Index ¶
- func EthAddressFromPubKey(pk secp256k1.PublicKey) ethCommon.Address
- func FormatConsensusDenomination(net *config.Network, amount types.Quantity) string
- func FormatParaTimeDenomination(pt *config.ParaTime, amount types.BaseUnits) string
- func ParseConsensusDenomination(net *config.Network, amount string) (*types.Quantity, error)
- func ParseParaTimeDenomination(pt *config.ParaTime, amount string, denom types.Denomination) (*types.BaseUnits, error)
- func ParseTestAccountAddress(name string) string
- func PrettyPrintAccountBalanceAndDelegationsFrom(network *config.Network, addr *types.Address, ...)
- func PrettyPrintAllowances(network *config.Network, addr *types.Address, ...)
- func PrettyPrintDelegationsTo(network *config.Network, addr *types.Address, sharePool staking.SharePool, ...)
- func ResolveAddress(net *config.Network, address string) (*types.Address, *ethCommon.Address, error)
- func ResolveEthOrOasisAddress(address string) (*types.Address, *ethCommon.Address, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EthAddressFromPubKey ¶ added in v0.3.0
EthAddressFromPubKey takes public key, extracts the ethereum address and returns it.
func FormatConsensusDenomination ¶
FormatConsensusDenomination formats the given base unit amount as a consensus layer denomination.
func FormatParaTimeDenomination ¶
FormatParaTimeDenomination formats the given base unit amount as a ParaTime denomination.
func ParseConsensusDenomination ¶
ParseConsensusDenomination parses an amount for the consensus layer denomination.
func ParseParaTimeDenomination ¶
func ParseParaTimeDenomination(pt *config.ParaTime, amount string, denom types.Denomination) (*types.BaseUnits, error)
ParseParaTimeDenomination parses an amount for the given ParaTime denomination.
func ParseTestAccountAddress ¶ added in v0.3.0
ParseTestAccountAddress extracts test account name from "test:some_test_account" format or returns an empty string, if the format doesn't match.
func PrettyPrintAccountBalanceAndDelegationsFrom ¶ added in v0.3.0
func PrettyPrintAccountBalanceAndDelegationsFrom( network *config.Network, addr *types.Address, generalAccount staking.GeneralAccount, actDelegationInfos map[staking.Address]*staking.DelegationInfo, debDelegationInfos map[staking.Address][]*staking.DebondingDelegationInfo, prefix string, w io.Writer, )
PrettyPrintAccountBalanceAndDelegationsFrom pretty-prints the given account's general balance and (outgoing) delegations from this account.
func PrettyPrintAllowances ¶ added in v0.3.0
func PrettyPrintAllowances( network *config.Network, addr *types.Address, allowances map[staking.Address]types.Quantity, prefix string, w io.Writer, )
PrettyPrintAllowances pretty-prints the given incoming allowances to the given account.
func PrettyPrintDelegationsTo ¶ added in v0.3.0
func PrettyPrintDelegationsTo( network *config.Network, addr *types.Address, sharePool staking.SharePool, delegations interface{}, prefix string, w io.Writer, )
PrettyPrintDelegationsTo pretty-prints the given incoming (debonding) delegations to the given escrow account.
func ResolveAddress ¶
func ResolveAddress(net *config.Network, address string) (*types.Address, *ethCommon.Address, error)
ResolveAddress resolves a string address into the corresponding account address.
func ResolveEthOrOasisAddress ¶ added in v0.3.0
ResolveEthOrOasisAddress decodes the given oasis bech32-encoded or ethereum hex-encoded address and returns the corresponding ethereum address object and/or account address. If the encoding is not valid, returns error. If the format is not known, does nothing.
Types ¶
This section is empty.