clef: bidirectional communication with UI (#19018)
* clef: initial implementation of bidirectional RPC communication for the UI * signer: fix tests to pass + formatting * clef: fix unused import + formatting * signer: gosimple nitpicks
This commit is contained in:
committed by
GitHub
parent
75d292bcf6
commit
b5d471a739
@ -32,12 +32,16 @@ type StdIOUI struct {
|
||||
}
|
||||
|
||||
func NewStdIOUI() *StdIOUI {
|
||||
log.Info("NewStdIOUI")
|
||||
client, err := rpc.DialContext(context.Background(), "stdio://")
|
||||
if err != nil {
|
||||
log.Crit("Could not create stdio client", "err", err)
|
||||
}
|
||||
return &StdIOUI{client: *client}
|
||||
ui := &StdIOUI{client: *client}
|
||||
return ui
|
||||
}
|
||||
|
||||
func (ui *StdIOUI) RegisterUIServer(api *UIServerAPI) {
|
||||
ui.client.RegisterName("clef", api)
|
||||
}
|
||||
|
||||
// dispatch sends a request over the stdio
|
||||
|
Reference in New Issue
Block a user