Categorygithub.com/openrelayxyz/cardinal-types
modulepackage
1.1.1
Repository: https://github.com/openrelayxyz/cardinal-types.git
Documentation: pkg.go.dev

# README

cardinal-types is an element of the Cardinal Blockchain paraclient.

This package provides a lot of common data types used across numerous Cardinal components.

# Packages

Package hexutil implements hex encoding with 0x prefix.
No description provided by the author

# Functions

BigToHash sets byte representation of b to hash.
Bytes2Hex returns the hexadecimal encoding of d.
BytesToHash sets b to hash.
CopyBytes returns an exact copy of the provided bytes.
FromHex returns the bytes represented by the hexadecimal string s.
Hex2Bytes returns the bytes represented by the hexadecimal string str.
Hex2BytesFixed returns bytes of a specified fixed length flen.
HexToHash sets byte representation of s to hash.
LeftPadBytes zero-pads slice to the left up to length l.
NewSubscription runs a producer function as a subscription in a new goroutine.
Resubscribe calls fn repeatedly to keep a subscription established.
ResubscribeErr calls fn repeatedly to keep a subscription established.
RightPadBytes zero-pads slice to the right up to length l.
TrimLeftZeroes returns a subslice of s without leading zeroes.
TrimRightZeroes returns a subslice of s without trailing zeroes.

# Constants

HashLength is the expected length of the hash.

# Structs

Feed implements one-to-many subscriptions where the carrier of events is a channel.
SubscriptionScope provides a facility to unsubscribe multiple subscriptions at once.

# Interfaces

Subscription represents a stream of events.

# Type aliases

Hash represents the 32 byte Keccak256 hash of arbitrary data.
A ResubscribeErrFunc attempts to establish a subscription.
A ResubscribeFunc attempts to establish a subscription.
UnprefixedHash allows marshaling a Hash without 0x prefix.