endorsement

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FSCEndorsementKey = "services.network.fabric.fsc_endorsement"
)
View Source
const (
	// InvokeFunction is the name of the function to use to request the approval of a token request
	InvokeFunction = "invoke"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaincodeEndorsementService

type ChaincodeEndorsementService struct {
	TMSID token2.TMSID
}

func NewChaincodeEndorsementService

func NewChaincodeEndorsementService(tmsID token2.TMSID) *ChaincodeEndorsementService

func (*ChaincodeEndorsementService) Endorse

func (e *ChaincodeEndorsementService) Endorse(context view.Context, requestRaw []byte, signer view.Identity, txID driver.TxID) (driver.Envelope, error)

type EndorserService added in v0.7.0

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

EndorserService wraps the FSC's endorser service

func NewEndorserService added in v0.7.0

func NewEndorserService(tmsProvider *token2.ManagementServiceProvider, fabricProvider *fabric.NetworkServiceProvider) *EndorserService

NewEndorserService returns a new instance of EndorserService

func (*EndorserService) CollectEndorsements added in v0.7.0

func (e *EndorserService) CollectEndorsements(ctx view.Context, tx *endorser.Transaction, timeOut time.Duration, endorsers ...view.Identity) error

func (*EndorserService) Endorse added in v0.7.0

func (e *EndorserService) Endorse(ctx view.Context, tx *endorser.Transaction, identities ...view.Identity) (any, error)

func (*EndorserService) EndorserID added in v0.7.0

func (e *EndorserService) EndorserID(tmsID token2.TMSID) (view.Identity, error)

func (*EndorserService) NewTransaction added in v0.7.0

func (e *EndorserService) NewTransaction(context view.Context, opts ...fabric.TransactionOption) (*endorser.Transaction, error)

func (*EndorserService) ReceiveTx added in v0.7.0

func (e *EndorserService) ReceiveTx(ctx view.Context) (*endorser.Transaction, error)

type NamespaceTxProcessor added in v0.7.0

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

NamespaceTxProcessor models a namespace transaction processor for fabric

func NewNamespaceTxProcessor added in v0.7.0

func NewNamespaceTxProcessor(networkServiceProvider *fabric.NetworkServiceProvider) *NamespaceTxProcessor

NewNamespaceTxProcessor returns a new instance of NamespaceTxProcessor

func (*NamespaceTxProcessor) EnableTxProcessing added in v0.7.0

func (n *NamespaceTxProcessor) EnableTxProcessing(tmsID token2.TMSID) error

EnableTxProcessing signals the fabric committer to process all transactions in the network specified by the given tms id

type Service

type Service interface {
	Endorse(context view.Context, requestRaw []byte, signer view.Identity, txID driver.TxID) (driver.Envelope, error)
}

type ServiceProvider

type ServiceProvider struct {
	lazy.Provider[token2.TMSID, Service]
}

func NewServiceProvider

func NewServiceProvider(
	fnsp *fabric.NetworkServiceProvider,
	tmsp *token2.ManagementServiceProvider,
	configService common.Configuration,
	viewManager fsc.ViewManager,
	viewRegistry fsc.ViewRegistry,
	identityProvider fsc.IdentityProvider,
	keyTranslator translator.KeyTranslator,
	storeServiceManager ttxdb.StoreServiceManager,
) *ServiceProvider

type StorageProvider added in v0.7.0

type StorageProvider struct {
	ttxdb.StoreServiceManager
}

StorageProvider wraps ttxdb.StoreServiceManager

func NewStorageProvider added in v0.7.0

func NewStorageProvider(storeServiceManager ttxdb.StoreServiceManager) *StorageProvider

NewStorageProvider returns a new instance of StorageProvider

func (*StorageProvider) GetStorage added in v0.7.0

func (s *StorageProvider) GetStorage(id token2.TMSID) (fsc.Storage, error)

GetStorage returns the fsc.Storage instance for the given tms id.

Directories

Path Synopsis
fsc
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