Documentation ¶
Overview ¶
Package rings provides the RingCache interface that is used to build rings for applications by either the application itself or a gateway. This ring is used to sign the relay requests. The RingCache is responsible for caching the rings for future use and invalidating the cache when the application's delegated gateways change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrRingsNotSecp256k1Curve = sdkerrors.Register(codespace, 1, "key is not a secp256k1 public key") ErrRingClientEmptyRelayRequestSignature = sdkerrors.Register(codespace, 2, "empty relay request signature") ErrRingClientInvalidRelayRequest = sdkerrors.Register(codespace, 3, "invalid relay request") ErrRingClientInvalidRelayRequestSignature = sdkerrors.Register(codespace, 4, "invalid relay request signature") )
Functions ¶
func NewRingCache ¶
NewRingCache returns a new RingCache instance. It requires a depinject.Config to be passed in, which is used to inject the dependencies of the RingCache.
Required dependencies: - polylog.Logger - client.DelegationClient - client.ApplicationQueryClient - client.AccountQueryClient
func NewRingClient ¶
func NewRingClient(deps depinject.Config) (_ crypto.RingClient, err error)
NewRingClient returns a new ring client constructed from the given dependencies. It returns an error if the required dependencies are not supplied.
Required dependencies: - polylog.Logger - client.ApplicationQueryClient - client.AccountQueryClient
Types ¶
This section is empty.