Documentation ¶
Index ¶
- Variables
- type Decision
- type EnteredPassphrase
- type Envelope
- type ErrorOccurred
- type Log
- type RequestPassphrase
- type RequestPermissionsReview
- type RequestSucceeded
- type RequestTransactionSendingReview
- type RequestTransactionSigningReview
- type RequestWalletConnectionReview
- type RequestWalletSelection
- type SequentialPipeline
- func (s *SequentialPipeline) Log(ctx context.Context, traceID string, t api.LogType, msg string)
- func (s *SequentialPipeline) NotifyError(ctx context.Context, traceID string, t api.ErrorType, err error)
- func (s *SequentialPipeline) NotifySuccessfulRequest(ctx context.Context, traceID string)
- func (s *SequentialPipeline) NotifyTransactionStatus(ctx context.Context, traceID, txHash, tx string, err error, sentAt time.Time)
- func (s *SequentialPipeline) RequestPassphrase(ctx context.Context, traceID, wallet string) (string, error)
- func (s *SequentialPipeline) RequestPermissionsReview(ctx context.Context, traceID, hostname, wallet string, perms map[string]string) (bool, error)
- func (s *SequentialPipeline) RequestTransactionSendingReview(ctx context.Context, traceID, hostname, wallet, pubKey, transaction string, ...) (bool, error)
- func (s *SequentialPipeline) RequestTransactionSigningReview(ctx context.Context, traceID, hostname, wallet, pubKey, transaction string, ...) (bool, error)
- func (s *SequentialPipeline) RequestWalletConnectionReview(ctx context.Context, traceID, hostname string) (bool, error)
- func (s *SequentialPipeline) RequestWalletSelection(ctx context.Context, traceID, hostname string, availableWallets []string) (api.SelectedWallet, error)
- type TransactionStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTraceIDMismatch = errors.New("the trace IDs between request and response mismatch") ErrWrongResponseType = errors.New("the received response does not match the expected response type") )
Functions ¶
This section is empty.
Types ¶
type EnteredPassphrase ¶
type EnteredPassphrase struct {
Passphrase string `json:"passphrase"`
}
type Envelope ¶
type Envelope struct { // TraceID is an identifier specifically made for client front-end to keep // track of a transaction during all of its lifetime, from transaction // review to sending confirmation and in-memory history. // It shouldn't be confused with the transaction hash that get assigned // only after it has been sent to the network. TraceID string `json:"traceID"` Content interface{} `json:"content"` }
type ErrorOccurred ¶
type RequestPassphrase ¶
type RequestPassphrase struct {
Wallet string `json:"wallet"`
}
type RequestSucceeded ¶
type RequestSucceeded struct{}
type RequestTransactionSendingReview ¶ added in v0.55.0
type RequestTransactionSigningReview ¶ added in v0.55.0
type RequestWalletConnectionReview ¶
type RequestWalletConnectionReview struct {
Hostname string `json:"hostname"`
}
type RequestWalletSelection ¶
type SequentialPipeline ¶
type SequentialPipeline struct {
// contains filtered or unexported fields
}
SequentialPipeline is a pipeline built to handle one request at a time. Concurrent requests are not supported and will result in errors.
func NewSequentialPipeline ¶
func NewSequentialPipeline(userCtx context.Context, receptionChan chan<- Envelope, responseChan <-chan Envelope) *SequentialPipeline
func (*SequentialPipeline) NotifyError ¶
func (*SequentialPipeline) NotifySuccessfulRequest ¶
func (s *SequentialPipeline) NotifySuccessfulRequest(ctx context.Context, traceID string)
func (*SequentialPipeline) NotifyTransactionStatus ¶
func (*SequentialPipeline) RequestPassphrase ¶
func (*SequentialPipeline) RequestPermissionsReview ¶
func (*SequentialPipeline) RequestTransactionSendingReview ¶ added in v0.55.0
func (*SequentialPipeline) RequestTransactionSigningReview ¶ added in v0.55.0
func (*SequentialPipeline) RequestWalletConnectionReview ¶
func (*SequentialPipeline) RequestWalletSelection ¶
func (s *SequentialPipeline) RequestWalletSelection(ctx context.Context, traceID, hostname string, availableWallets []string) (api.SelectedWallet, error)
Click to show internal directories.
Click to hide internal directories.