Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // global variable to be accessed by other packages // singleton gateway to interact with private transaction manager P = FromEnvironmentOrNil("PRIVATE_CONFIG") )
Functions ¶
This section is empty.
Types ¶
type Identifiable ¶
type Identifiable interface { Name() string HasFeature(f engine.PrivateTransactionManagerFeature) bool }
type PrivateTransactionManager ¶
type PrivateTransactionManager interface { Identifiable Send(data []byte, from string, to []string, extra *engine.ExtraMetadata) (string, []string, common.EncryptedPayloadHash, error) StoreRaw(data []byte, from string) (common.EncryptedPayloadHash, error) SendSignedTx(data common.EncryptedPayloadHash, to []string, extra *engine.ExtraMetadata) (string, []string, []byte, error) // Returns nil payload if not found Receive(data common.EncryptedPayloadHash) (string, []string, []byte, *engine.ExtraMetadata, error) // Returns nil payload if not found ReceiveRaw(data common.EncryptedPayloadHash) ([]byte, string, *engine.ExtraMetadata, error) IsSender(txHash common.EncryptedPayloadHash) (bool, error) GetParticipants(txHash common.EncryptedPayloadHash) ([]string, error) EncryptPayload(data []byte, from string, to []string, extra *engine.ExtraMetadata) ([]byte, error) DecryptPayload(payload common.DecryptRequest) ([]byte, *engine.ExtraMetadata, error) }
Interacting with Private Transaction Manager APIs
func FromEnvironmentOrNil ¶
func FromEnvironmentOrNil(name string) PrivateTransactionManager
func MustNewPrivateTxManager ¶
func MustNewPrivateTxManager(cfgPath string) PrivateTransactionManager
func NewPrivateTxManager ¶
func NewPrivateTxManager(cfgPath string) (PrivateTransactionManager, error)
Click to show internal directories.
Click to hide internal directories.