Documentation
¶
Index ¶
- Variables
- func AddressTo32Slice(addr common.Address) [32]byte
- func AssertHexDecode(s string) []byte
- func BuildLogger(options config.LogOptions) (*zap.Logger, *zap.Config, error)
- func BuildNamespace(privateKey string, nodesAddress string) string
- func ClientIPFromContext(ctx context.Context) string
- func DecodeBytes32ToUint64(b [32]byte) uint64
- func EcdsaPrivateKeyToString(key *ecdsa.PrivateKey) string
- func EcdsaPublicKeyToAddress(key *ecdsa.PublicKey) string
- func EcdsaPublicKeyToString(key *ecdsa.PublicKey) string
- func EncodeUint64ToBytes32(v uint64) [32]byte
- func GenerateEcdsaPrivateKey() (*ecdsa.PrivateKey, error)
- func GetCredentialsForAddress(isTLS bool) (credentials.TransportCredentials, error)
- func GetEventSig(abi *abi.ABI, eventName string) (string, error)
- func GetEventTopic(abi *abi.ABI, eventName string) (common.Hash, error)
- func HashJWTSignatureInput(textToSign []byte) []byte
- func HashOriginatorSignatureInput(unsignedOriginatorEnvelope []byte) []byte
- func HashPayerReportInput(packedBytes []byte, domainSeparator common.Hash) common.Hash
- func HashPayerSignatureInput(originatorID uint32, unsignedClientEnvelope []byte) []byte
- func HexDecode(s string) ([]byte, error)
- func HexEncode(data []byte) string
- func HttpAddressToGrpcTarget(httpAddress string) (string, bool, error)
- func Int32SliceToUint32Slice(slice []int32) []uint32
- func MinutesSinceEpoch(timestamp time.Time) int32
- func MinutesSinceEpochNow() int32
- func NewNullBytes(b []byte) []byte
- func NewNullInt16[T ~int16 | ~uint16](i *T) sql.NullInt16
- func NewNullInt16Slice[T ~int16 | ~uint16](ints []T) []int16
- func NewNullInt32[T ~int32 | ~uint32](i *T) sql.NullInt32
- func NewNullInt64[T ~int64 | ~uint64](i *T) sql.NullInt64
- func NewNullTime(ts time.Time) sql.NullTime
- func NsToDate(ns int64) time.Time
- func PackAndHashNodeIDs(nodeIDs []uint32) common.Hash
- func ParseEcdsaPrivateKey(key string) (*ecdsa.PrivateKey, error)
- func ParseEcdsaPublicKey(key string) (*ecdsa.PublicKey, error)
- func ParseGroupID(groupID []byte) ([16]byte, error)
- func ParseInboxID(inboxID []byte) ([32]byte, error)
- func RandomSleep(ctx context.Context, maxDuration time.Duration)
- func SignClientEnvelope(originatorID uint32, unsignedClientEnvelope []byte, ...) ([]byte, error)
- func SliceToArray32(slice []byte) ([32]byte, error)
- func Uint32FromBytes(b []byte) (uint32, error)
- func Uint32SliceToInt32Slice(slice []uint32) ([]int32, error)
- func Uint32ToBytes(u uint32) []byte
- func Uint32ToInt32(u uint32) (int32, error)
- func Uint64ToInt64(u uint64) (int64, error)
- func Unimplemented(message string, unusedVariables ...interface{})
- func UnmarshalClientEnvelope(envelope []byte) (*envelopes.ClientEnvelope, error)
- func UnmarshalOriginatorEnvelope(envelope []byte) (*envelopes.OriginatorEnvelope, error)
- func UnmarshalUnsignedEnvelope(unsignedEnvelopeBytes []byte) (*envelopes.UnsignedOriginatorEnvelope, error)
- func Unused(unusedVariables ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIntOverflow = errors.New("overflow in conversion from uint to int")
View Source
var ErrSliceNot32Bytes = errors.New("slice must be 32 bytes long")
Functions ¶
func AddressTo32Slice ¶ added in v0.5.0
func AssertHexDecode ¶
func BuildLogger ¶
func BuildNamespace ¶ added in v0.1.2
func ClientIPFromContext ¶ added in v0.5.0
func DecodeBytes32ToUint64 ¶ added in v0.5.0
func EcdsaPrivateKeyToString ¶
func EcdsaPrivateKeyToString(key *ecdsa.PrivateKey) string
func EcdsaPublicKeyToAddress ¶
func EcdsaPublicKeyToString ¶
func EncodeUint64ToBytes32 ¶ added in v0.5.0
func GenerateEcdsaPrivateKey ¶
func GenerateEcdsaPrivateKey() (*ecdsa.PrivateKey, error)
func GetCredentialsForAddress ¶
func GetCredentialsForAddress( isTLS bool, ) (credentials.TransportCredentials, error)
func GetEventSig ¶
Extract the an event signature from an ABI by event name
func GetEventTopic ¶
Extract the an event topic (the hash of the signature) from an ABI by event name
func HashJWTSignatureInput ¶
func HashPayerReportInput ¶ added in v0.4.0
func HashPayerSignatureInput ¶
func HttpAddressToGrpcTarget ¶
Maps from a URL, as defined in https://pkg.go.dev/net/url#URL, to a gRPC target, as defined in https://github.com/grpc/grpc/blob/master/doc/naming.md
func Int32SliceToUint32Slice ¶ added in v0.5.0
func MinutesSinceEpoch ¶ added in v0.3.0
func MinutesSinceEpochNow ¶ added in v0.3.0
func MinutesSinceEpochNow() int32
func NewNullBytes ¶ added in v0.5.0
func NewNullInt16Slice ¶ added in v0.5.0
func NewNullInt64 ¶ added in v0.5.0
Generic version that accepts both int64 and uint64 types
func PackAndHashNodeIDs ¶ added in v0.5.0
func ParseEcdsaPrivateKey ¶
func ParseEcdsaPrivateKey(key string) (*ecdsa.PrivateKey, error)
func ParseEcdsaPublicKey ¶
Take the stringified form of an ECDSA public key and return the *ecdsa.PublicKey
func ParseGroupID ¶ added in v0.5.0
func ParseInboxID ¶ added in v0.5.0
func SignClientEnvelope ¶ added in v0.1.1
func SliceToArray32 ¶ added in v0.4.0
func Uint32FromBytes ¶ added in v0.5.0
func Uint32SliceToInt32Slice ¶ added in v0.5.0
func Uint32ToBytes ¶ added in v0.5.0
func Uint32ToInt32 ¶ added in v0.5.0
func Uint64ToInt64 ¶ added in v0.5.0
func Unimplemented ¶
func Unimplemented(message string, unusedVariables ...interface{})
Unimplemented panics with a message indicating that the function is not implemented.
func UnmarshalClientEnvelope ¶
func UnmarshalClientEnvelope(envelope []byte) (*envelopes.ClientEnvelope, error)
func UnmarshalOriginatorEnvelope ¶
func UnmarshalOriginatorEnvelope(envelope []byte) (*envelopes.OriginatorEnvelope, error)
func UnmarshalUnsignedEnvelope ¶
func UnmarshalUnsignedEnvelope( unsignedEnvelopeBytes []byte, ) (*envelopes.UnsignedOriginatorEnvelope, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.