qlight

package
v22.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TokenCredentialsProvider rpc.HttpCredentialsProviderFunc = func(ctx context.Context) (string, error) {
	return GetCurrentToken(), nil
}

Functions

func GetCurrentToken

func GetCurrentToken() string

func NewTLSConfig

func NewTLSConfig(config *TLSConfig) (*tls.Config, error)

func SetCurrentToken

func SetCurrentToken(newToken string)

Types

type AuthManagerProvider

type AuthManagerProvider func() security.AuthenticationManager

type AuthProvider

type AuthProvider interface {
	Initialize() error
	Authorize(token string, psi string) error
}

func NewAuthProvider

func NewAuthProvider(privateStateManager mps.PrivateStateManager, authManagerProvider AuthManagerProvider) AuthProvider

type BlockPrivateData

type BlockPrivateData struct {
	BlockHash           common.Hash
	PSI                 types.PrivateStateIdentifier
	PrivateStateRoot    common.Hash
	PrivateTransactions []PrivateTransactionData
}

type CacheWithEmpty

type CacheWithEmpty interface {
	Cache(privateTxData *qlightptm.CachablePrivateTransactionData) error
	CheckAndAddEmptyToCache(hash common.EncryptedPayloadHash)
}

type PrivateBlockDataResolver

type PrivateBlockDataResolver interface {
	PrepareBlockPrivateData(block *types.Block, psi string) (*BlockPrivateData, error)
}

func NewPrivateBlockDataResolver

func NewPrivateBlockDataResolver(privateStateManager mps.PrivateStateManager, ptm private.PrivateTransactionManager) PrivateBlockDataResolver

type PrivateClientCache

type PrivateClientCache interface {
	PrivateStateRootHashValidator
	AddPrivateBlock(blockPrivateData BlockPrivateData) error
	CheckAndAddEmptyEntry(hash common.EncryptedPayloadHash)
}

func NewClientCache

func NewClientCache(db ethdb.Database) (PrivateClientCache, error)

func NewClientCacheWithEmpty

func NewClientCacheWithEmpty(db ethdb.Database, cacheWithEmpty CacheWithEmpty, gocache *gocache.Cache) (PrivateClientCache, error)

type PrivateQLightAPI

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

func NewPrivateQLightAPI

func NewPrivateQLightAPI(peerUpdater RunningPeerAuthUpdater, rpcClient *rpc.Client) *PrivateQLightAPI

NewPublicEthereumAPI creates a new Ethereum protocol API for full nodes.

func (*PrivateQLightAPI) GetCurrentToken

func (p *PrivateQLightAPI) GetCurrentToken() string

func (*PrivateQLightAPI) SetCurrentToken

func (p *PrivateQLightAPI) SetCurrentToken(token string)

type PrivateStateRootHashValidator

type PrivateStateRootHashValidator interface {
	ValidatePrivateStateRoot(blockHash common.Hash, blockPublicStateRoot common.Hash) error
}

type PrivateTransactionData

type PrivateTransactionData struct {
	Hash     *common.EncryptedPayloadHash
	Payload  []byte
	Extra    *engine.ExtraMetadata
	IsSender bool
}

func (*PrivateTransactionData) ToCachable

type QLightCacheKey

type QLightCacheKey struct {
	BlockHash common.Hash
	PSI       types.PrivateStateIdentifier
}

func (*QLightCacheKey) String

func (k *QLightCacheKey) String() string

type RunningPeerAuthUpdater

type RunningPeerAuthUpdater interface {
	UpdateTokenForRunningQPeers(token string) error
}

type TLSConfig

type TLSConfig struct {
	CACertFileName       string
	ClientCACertFileName string
	ClientAuth           int
	CertFileName         string
	KeyFileName          string
	InsecureSkipVerify   bool
	CipherSuites         string
	ServerName           string
}

Directories

Path Synopsis
Package qlighttest is a generated GoMock package.
Package qlighttest is a generated GoMock package.

Jump to

Keyboard shortcuts

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