utils

package
v0.0.0-...-ae8e89f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSha256HashString

func GenerateSha256HashString(input string) string

GenerateSha256HashString A hash function to obfuscate the input string. This is to prevent the input from being leaked to the public.

func ParseBlockchain

func ParseBlockchain(blockchainName string) (common.Blockchain, error)

ParseBlockchain converts a blockchain name, e.g. `ethereum`, to the proto definition, e.g. `common.Blockchain_BLOCKCHAIN_ETHEREUM`.

func ParseCompression

func ParseCompression(compression string) (api.Compression, error)

func ParseNetwork

func ParseNetwork(networkName string) (common.Network, error)

ParseNetwork converts a network name, e.g. `stellar-testnet`, to the proto definition, e.g. `common.Network_NETWORK_STELLAR_TESTNET`

func ParseSidechain

func ParseSidechain(sidechainName string) (api.SideChain, error)

ParseSidechain converts a sidechain name, e.g. `ethereum-mainnet-beacon`, to the proto definition, e.g. `api.SideChain_SIDECHAIN_ETHEREUM_MAINNET_BEACON`

func SinceTimestamp

func SinceTimestamp(timestamp *timestamppb.Timestamp) time.Duration

func ToTimestamp

func ToTimestamp(seconds int64) *timestamppb.Timestamp

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL