core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(tms driver.TokenManagerService, network, channel, namespace string) error

type ConfigProvider added in v0.4.0

type ConfigProvider interface {
	Configurations() ([]driver.Configuration, error)
	ConfigurationFor(network string, channel string, namespace string) (driver.Configuration, error)
}

type PublicParameters added in v0.4.0

type PublicParameters struct {
	Path string `yaml:"path"`
}

type TMSProvider

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

TMSProvider is a token management service provider. It is responsible for creating token management services for different networks.

func NewTMSProvider

func NewTMSProvider(logger logging.Logger, configProvider ConfigProvider, vault Vault, tokenDriverService *driver.TokenDriverService) *TMSProvider

func (*TMSProvider) Configurations added in v0.4.0

func (m *TMSProvider) Configurations() ([]driver.Configuration, error)

func (*TMSProvider) GetTokenManagerService

func (m *TMSProvider) GetTokenManagerService(opts driver.ServiceOptions) (service driver.TokenManagerService, err error)

GetTokenManagerService returns a driver.TokenManagerService instance for the passed parameters. If a TokenManagerService is not available, it creates one by first fetching the public parameters using the passed driver.PublicParamsFetcher. If no driver is registered for the public params identifier, it returns an error.

func (*TMSProvider) NewTokenManagerService added in v0.4.0

func (m *TMSProvider) NewTokenManagerService(opts driver.ServiceOptions) (driver.TokenManagerService, error)

func (*TMSProvider) SetCallback added in v0.4.0

func (m *TMSProvider) SetCallback(callback CallbackFunc)

func (*TMSProvider) Update added in v0.4.0

func (m *TMSProvider) Update(opts driver.ServiceOptions) (err error)

type Vault added in v0.2.0

type Vault interface {
	PublicParams(networkID string, channel string, namespace string) ([]byte, error)
}

Directories

Path Synopsis
zkatdlog
crypto/audit/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
crypto/transfer/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
crypto/validator/mock
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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