Documentation ¶
Index ¶
- Variables
- func Validate(payload *api.Payload) *api.Error
- type Server
- func (s *Server) ConfirmAddress(ctx context.Context, in *api.Address) (*api.AddressConfirmation, error)
- func (s *Server) Handle(ctx context.Context, p *postman.Packet) (err error)
- func (s *Server) HandleError(ctx context.Context, p *postman.Packet) (err error)
- func (s *Server) HandleSealed(ctx context.Context, p *postman.Packet) (err error)
- func (s *Server) KeyExchange(ctx context.Context, in *api.SigningKey) (out *api.SigningKey, err error)
- func (s *Server) Run(sock net.Listener)
- func (s *Server) Serve() (err error)
- func (s *Server) Shutdown() error
- func (s *Server) Status(ctx context.Context, in *api.HealthCheck) (out *api.ServiceState, err error)
- func (s *Server) Transfer(ctx context.Context, in *api.SecureEnvelope) (_ *api.SecureEnvelope, err error)
- func (s *Server) TransferStream(stream api.TRISANetwork_TransferStreamServer) (err error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingIdentity = &api.Error{ Code: api.Error_MISSING_FIELDS, Message: "identity payload is required", Retry: true, } ErrMissingTransaction = &api.Error{ Code: api.Error_MISSING_FIELDS, Message: "transaction payload is required", Retry: true, } ErrMissingSentAt = &api.Error{ Code: api.Error_MISSING_FIELDS, Message: "sent at payload field is required for non-repudiation", Retry: true, } ErrInvalidTimestamp = &api.Error{ Code: api.Error_VALIDATION_ERROR, Message: "could not parse payload timestamp as RFC3339 timestamp", Retry: true, } )
Functions ¶
Types ¶
type Server ¶
type Server struct { api.UnimplementedTRISAHealthServer api.UnimplementedTRISANetworkServer // contains filtered or unexported fields }
The TRISA server implements the TRISANetwork and TRISAHealth services defined by the TRISA protocol buffers in the github.com/trisacrypto/trisa repository. It can be run as a standalone service or can be embedded as a component in a larger service.
func New ¶
func New(conf config.TRISAConfig, network network.Network, store store.Store, echan chan<- error) (s *Server, err error)
Create a new TRISA server ready to handle gRPC requests.
func (*Server) ConfirmAddress ¶
func (s *Server) ConfirmAddress(ctx context.Context, in *api.Address) (*api.AddressConfirmation, error)
Address confirmation allows an originator VASP to establish that a beneficiary VASP has control of a crypto wallet address, prior to sending transaction information with sensitive PII data.
NOTE: this RPC is currently undefined by the v9 whitepaper
func (*Server) HandleError ¶ added in v0.22.0
func (*Server) HandleSealed ¶
func (*Server) KeyExchange ¶
func (s *Server) KeyExchange(ctx context.Context, in *api.SigningKey) (out *api.SigningKey, err error)
KeyExchange is a preperatory RPC that is required before Transfer RPCs to ensure each counterparty has the public keys needed to encrypt secure envelopes for the recipient.
func (*Server) Status ¶
func (s *Server) Status(ctx context.Context, in *api.HealthCheck) (out *api.ServiceState, err error)
Status implements the TRISAHealth gRPC interface and is used for GDS health checks. TODO: allow user to configure not before/after time window
func (*Server) Transfer ¶
func (s *Server) Transfer(ctx context.Context, in *api.SecureEnvelope) (_ *api.SecureEnvelope, err error)
func (*Server) TransferStream ¶
func (s *Server) TransferStream(stream api.TRISANetwork_TransferStreamServer) (err error)