Documentation
¶
Index ¶
- Constants
- func DecodeProof(encodedProofString string) (*types.Proof, error)
- func GetChainRest(chainId, chainRest string) string
- func GetFinalizedBundle(restEndpoint string, poolId int64, bundleId int64) (*types.FinalizedBundle, error)
- func GetFromUrl(url string) ([]byte, string, error)
- func GetFromUrlWithBackoff(url string) (data []byte, err error)
- func TrustlessClientLogger(moduleName string) zerolog.Logger
Constants ¶
View Source
const ( ChainIdMainnet = "kyve-1" ChainIdKaon = "kaon-1" ChainIdKorellia = "korellia-2" RestEndpointMainnet = "https://api.kyve.network" RestEndpointKaon = "https://api.kaon.kyve.network" RestEndpointKorellia = "https://api.korellia.kyve.network" )
View Source
const (
BackoffMaxRetries = 10
)
Variables ¶
This section is empty.
Functions ¶
func DecodeProof ¶
DecodeProof decodes the proof of a data item from a byte array encodedProofString is the base64 string of the proof encoded in big endian Structure: - 1 byte: version (uint8) - 2 bytes: poolId (uint16) - 8 bytes: bundleId (uint64) - 16 bytes: chainId - 16 bytes: dataItemKey - 16 bytes: dataItemValueKey - Array of merkle nodes:
- 1 byte: left (true/false)
- 32 bytes: hash (sha256)
returns the proof as a struct
func GetChainRest ¶
func GetFinalizedBundle ¶
func GetFromUrl ¶
GetFromUrl tries to fetch data from url with a custom User-Agent header returns the data, the proof and an error
func GetFromUrlWithBackoff ¶
GetFromUrlWithBackoff tries to fetch data from url with exponential backoff
func TrustlessClientLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.