emerald

package
v0.0.0-...-964a6ab Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlocksToApi

func BlocksToApi(blocks map[protocol.BlockType]protocol.Block) *dshackle.ChainEvent

func ChainStatusToApi

func ChainStatusToApi(status protocol.AvailabilityStatus) *dshackle.ChainEvent

func HeadToApi

func HeadToApi(head protocol.Block) *dshackle.ChainEvent

func LabelsToApi

func LabelsToApi(labels []upstreams.AggregatedLabels) *dshackle.ChainEvent

func LowerBoundsToApi

func LowerBoundsToApi(lowerBounds []protocol.LowerBoundData) *dshackle.ChainEvent

func NewServer

func NewServer(appCtx *server_ctx.ApplicationServerContext, serverConfig *config.ServerConfig, baseOptions ...grpc.ServerOption) (*grpc.Server, error)

NewServer builds the dshackle grpc.Server: the emerald blockchain/auth services and default reflection (which advertises only the registered services). baseOptions carry the shared transport options (tls). The chain ingress runs as a separate server (internal/server/grpc_ingress) and never shares options, codecs or auth with this one.

func SubMethodsToApi

func SubMethodsToApi(methods []string) *dshackle.ChainEvent

func SubscribeChainStatus

func SubscribeChainStatus(
	upstreamSupervisor upstreams.UpstreamSupervisor,
	stream dshackle.Blockchain_SubscribeChainStatusServer,
) error

func SubscribeChainStatusWithResync

func SubscribeChainStatusWithResync(
	upstreamSupervisor upstreams.UpstreamSupervisor,
	stream dshackle.Blockchain_SubscribeChainStatusServer,
	resyncInterval time.Duration,
) error

SubscribeChainStatusWithResync is SubscribeChainStatus with a caller-chosen state-resync interval; tests use it to shrink the wait.

func SupportedMethodsToApi

func SupportedMethodsToApi(methods []string) *dshackle.ChainEvent

Types

type GrpcAuthService

type GrpcAuthService struct {
	dshackle.UnimplementedAuthServer
	// contains filtered or unexported fields
}

func NewGrpcAuthService

func NewGrpcAuthService(grpcAuthConfig *config.GrpcAuthConfig) (*GrpcAuthService, *grpcSessionAuth, error)

func (*GrpcAuthService) Authenticate

func (s *GrpcAuthService) Authenticate(_ context.Context, request *dshackle.AuthRequest) (*dshackle.AuthResponse, error)

type GrpcBlockchainService

type GrpcBlockchainService struct {
	dshackle.UnimplementedBlockchainServer
	// contains filtered or unexported fields
}

func NewGrpcBlockchainService

func NewGrpcBlockchainService(
	appCtx *server_ctx.ApplicationServerContext,
	sessionAuth *grpcSessionAuth,
	signer signature.ResponseSigner,
) *GrpcBlockchainService

func (*GrpcBlockchainService) NativeCall

func (*GrpcBlockchainService) NativeSubscribe

func (*GrpcBlockchainService) SubscribeChainStatus

Jump to

Keyboard shortcuts

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