Documentation ¶
Index ¶
- func FilterLogsForReceipt(ctx context.Context, receipt *types.Receipt, account *gethcommon.Address, ...) ([]*types.Log, error)
- type SubscriptionManager
- func (s *SubscriptionManager) AddSubscription(id gethrpc.ID, encodedSubscription []byte) error
- func (s *SubscriptionManager) GetSubscribedLogsForBatch(ctx context.Context, batch *core.Batch, receipts types.Receipts) (common.EncryptedSubscriptionLogs, error)
- func (s *SubscriptionManager) RemoveSubscription(id gethrpc.ID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterLogsForReceipt ¶ added in v0.22.0
func FilterLogsForReceipt(ctx context.Context, receipt *types.Receipt, account *gethcommon.Address, registry components.BatchRegistry) ([]*types.Log, error)
FilterLogsForReceipt removes the logs that the sender of a transaction is not allowed to view
Types ¶
type SubscriptionManager ¶
type SubscriptionManager struct {
// contains filtered or unexported fields
}
SubscriptionManager manages the creation/deletion of subscriptions, and the filtering and encryption of logs for active subscriptions.
func NewSubscriptionManager ¶
func NewSubscriptionManager(storage storage.Storage, registry components.BatchRegistry, chainID int64, logger gethlog.Logger) *SubscriptionManager
func (*SubscriptionManager) AddSubscription ¶
func (s *SubscriptionManager) AddSubscription(id gethrpc.ID, encodedSubscription []byte) error
AddSubscription adds a log subscription to the enclave under the given ID, provided the request is authenticated correctly. If there is an existing subscription with the given ID, it is overwritten.
func (*SubscriptionManager) GetSubscribedLogsForBatch ¶
func (s *SubscriptionManager) GetSubscribedLogsForBatch(ctx context.Context, batch *core.Batch, receipts types.Receipts) (common.EncryptedSubscriptionLogs, error)
GetSubscribedLogsForBatch - Retrieves and encrypts the logs for the batch in live mode. The assumption is that this function is called synchronously after the batch is produced
func (*SubscriptionManager) RemoveSubscription ¶
func (s *SubscriptionManager) RemoveSubscription(id gethrpc.ID)
RemoveSubscription removes the log subscription with the given ID from the enclave. If there is no subscription with the given ID, nothing is deleted.