api

package
v0.2403.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package api implements the key manager management API and common data types.

Index

Constants

View Source
const (
	// ModuleName is a unique module name for the keymanager module.
	ModuleName = "keymanager"
)

Variables

View Source
var (
	// InsecureRAK is the insecure hardcoded key manager public key, used
	// in insecure builds when a RAK is unavailable.
	InsecureRAK signature.PublicKey

	// InsecureREK is the insecure hardcoded key manager public key, used
	// in insecure builds when a REK is unavailable.
	InsecureREK x25519.PublicKey

	// TestSigners contains a list of signers with corresponding test keys, used
	// in insecure builds when a RAK is unavailable.
	TestSigners []signature.Signer

	// RPCMethodConnect is the name of the method used to establish a Noise session.
	RPCMethodConnect = ""
)

Functions

func RegisterService

func RegisterService(server *grpc.Server, service Backend)

RegisterService registers a new keymanager backend service with the given gRPC server.

Types

type Backend

type Backend interface {
	// StateToGenesis returns the genesis state at specified block height.
	StateToGenesis(ctx context.Context, height int64) (*Genesis, error)

	// Secrets returns the key manager secrets management implementation.
	Secrets() secrets.Backend

	// Churp returns the key manager CHURP management implementation.
	Churp() churp.Backend
}

Backend is a key manager management implementation.

type Genesis

type Genesis struct {
	// Genesis is the secret genesis state.
	//
	// Embedded to ensure backward compatibility.
	secrets.Genesis

	// Churp is the optional CHURP genesis state.
	Churp *churp.Genesis `json:"churp,omitempty"`
}

Genesis is the key manager management genesis state.

type KeymanagerClient

type KeymanagerClient struct {
	// contains filtered or unexported fields
}

KeymanagerClient is a gRPC keymanager client.

func NewKeymanagerClient

func NewKeymanagerClient(c *grpc.ClientConn) *KeymanagerClient

NewKeymanagerClient creates a new gRPC keymanager client service.

func (*KeymanagerClient) Churp added in v0.2400.0

func (c *KeymanagerClient) Churp() *churp.Client

func (*KeymanagerClient) Secrets added in v0.2400.0

func (c *KeymanagerClient) Secrets() *secrets.Client

Jump to

Keyboard shortcuts

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