Repository: vegaprotocol/vegawallet
Pull request #518 (2022-03-22 17:21:55)

Release version 0.13.2
Release version 0.13.2


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48715db..eb30d7e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,7 @@
 - [](https://github.com/vegaprotocol/vegawallet/pull/) -
 
 ### 🛠  Improvements
-- [496](https://github.com/vegaprotocol/vegawallet/pull/496) - Return tx in /api/v1/command response
+- [](https://github.com/vegaprotocol/vegawallet/pull/) -
 
 ### 🔥 Removal
 - [](https://github.com/vegaprotocol/vegawallet/pull/) -
@@ -17,6 +17,22 @@
 ### 🐛 Fixes
 - [](https://github.com/vegaprotocol/vegawallet/pull/) -
 
+
+## 0.13.2
+
+### 🚨 Breaking changes
+- [504](https://github.com/vegaprotocol/vegawallet/pull/504) - Add support for proof of work sent from the wallet as part of a transaction
+- [507](https://github.com/vegaprotocol/vegawallet/issues/507) - Flag `--level` in service run removed
+
+### 🛠  Improvements
+- [508](https://github.com/vegaprotocol/vegawallet/issues/508) - Introduce a command to list the service endpoints
+- [507](https://github.com/vegaprotocol/vegawallet/issues/507) - Redirect logs from command service run to a file
+- [516](https://github.com/vegaprotocol/vegawallet/issues/516) - Update protos for market update proposal
+
+### 🐛 Fixes
+- [502](https://github.com/vegaprotocol/vegawallet/pull/502) - Unwrap properly transfer and cancel transfer commands
+
+
 ## 0.13.1
 
 ### 🛠  Improvements
diff --git a/Jenkinsfile b/Jenkinsfile
index 5c2d882..053826a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,7 +17,7 @@ pipeline {
     options {
         skipDefaultCheckout true
         timestamps()
-        timeout(time: 30, unit: 'MINUTES')
+        timeout(time: 45, unit: 'MINUTES')
     }
     parameters {
         string( name: 'VEGA_CORE_BRANCH', defaultValue: '',
@@ -48,8 +48,12 @@ pipeline {
             steps {
                 cleanWs()
                 sh 'printenv'
-                echo "${params}"
+                echo "params=${params}"
                 echo "isPRBuild=${isPRBuild()}"
+                script {
+                    params = pr.injectPRParams()
+                }
+                echo "params (after injection)=${params}"
             }
         }
 
diff --git a/cmd/command_send.go b/cmd/command_send.go
index 57184eb..43cac47 100644
--- a/cmd/command_send.go
+++ b/cmd/command_send.go
@@ -7,7 +7,9 @@ import (
 	"io"
 
 	api "code.vegaprotocol.io/protos/vega/api/v1"
+	commandspb "code.vegaprotocol.io/protos/vega/commands/v1"
 	walletpb "code.vegaprotocol.io/protos/vega/wallet/v1"
+	"code.vegaprotocol.io/shared/libs/crypto"
 	vglog "code.vegaprotocol.io/shared/libs/zap"
 	"code.vegaprotocol.io/vegawallet/cmd/cli"
 	"code.vegaprotocol.io/vegawallet/cmd/flags"
@@ -210,7 +212,7 @@ type SendCommandRequest struct {
 }
 
 func SendCommand(w io.Writer, rf *RootFlags, req *SendCommandRequest) error {
-	log, err := Build(rf.Output, req.LogLevel)
+	log, err := BuildLogger(rf.Output, req.LogLevel)
 	if err != nil {
 		return err
 	}
@@ -260,13 +262,14 @@ func SendCommand(w io.Writer, rf *RootFlags, req *SendCommandRequest) error {
 	defer cancelFn()
 
 	log.Info("retrieving block height")
-	blockHeight, err := forwarder.LastBlockHeight(ctx)
+	blockData, cltIdx, err := forwarder.LastBlockHeightAndHash(ctx)
 	if err != nil {
 		return fmt.Errorf("couldn't get last block height: %w", err)
 	}
-	log.Info(fmt.Sprintf("last block height found: %d", blockHeight))
 
-	tx, err := handler.SignTx(req.Wallet, req.Request, blockHeight)
+	log.Info(fmt.Sprintf("last block height found: %d", blockData.Height))
+
+	tx, err := handler.SignTx(req.Wallet, req.Request, blockData.Height)
 	if err != nil {
 		log.Error("couldn't sign transaction", zap.Error(err))
 		return fmt.Errorf("couldn't sign transaction: %w", err)
@@ -274,7 +277,22 @@ func SendCommand(w io.Writer, rf *RootFlags, req *SendCommandRequest) error {
 
 	log.Info("transaction successfully signed", zap.String("signature", tx.Signature.Value))
 
-	txHash, err := forwarder.SendTx(ctx, tx, api.SubmitTransactionRequest_TYPE_ASYNC)
+	// generate a random transaction hash
+	tid := crypto.RandomHash()
+
+	// generate proof of work for the block hash, transaction id and given difficulty required and supported hash function
+	powNonce, _, err := crypto.PoW(blockData.Hash, tid, uint(blockData.SpamPowDifficulty), blockData.SpamPowHashFunction)
+	if err != nil {
+		return fmt.Errorf("couldn't generate proof of work for last block height: %w", err)
+	}
+	tx.Pow = &commandspb.ProofOfWork{
+		Tid:   tid,
+		Nonce: powNonce,
+	}
+
+	log.Info("calculated proof of work for transaction with signature", zap.String("signature", tx.Signature.Value))
+
+	txHash, err := forwarder.SendTx(ctx, tx, api.SubmitTransactionRequest_TYPE_ASYNC, cltIdx)
 	if err != nil {
 		log.Error("couldn't send transaction", zap.Error(err))
 		return fmt.Errorf("couldn't send transaction: %w", err)
diff --git a/cmd/logger.go b/cmd/logger.go
index f7096a3..2086d73 100644
--- a/cmd/logger.go
+++ b/cmd/logger.go
@@ -2,7 +2,10 @@ package cmd
 
 import (
 	"fmt"
+	"os"
+	"time"
 
+	"code.vegaprotocol.io/shared/paths"
 	"code.vegaprotocol.io/vegawallet/cmd/flags"
 	"go.uber.org/zap"
 	"go.uber.org/zap/zapcore"
@@ -53,7 +56,37 @@ func DefaultConfig() zap.Config {
 	}
 }
 
-func Build(output, level string) (*zap.Logger, error) {
+func BuildJSONLogger(level string, logsDir paths.StatePath) (*zap.Logger, error) {
+	cfg := DefaultConfig()
+
+	l, err := getLevel(level)
+	if err != nil {
+		return nil, err
+	}
+
+	cfg.Level = zap.NewAtomicLevelAt(*l)
+
+	pid := os.Getpid()
+	date := time.Now().UTC().Format("2006-01-02-15-04-05")
+	pathSuffix := fmt.Sprintf("%d-%s.log", pid, date)
+
+	logFile := paths.JoinStatePath(logsDir, pathSuffix)
+	appLogPath, err := paths.CreateDefaultStatePathFor(logFile)
+	if err != nil {
+		return nil, fmt.Errorf("failed getting path for %s: %w", logFile, err)
+	}
+
+	cfg.OutputPaths = []string{appLogPath}
+	cfg.ErrorOutputPaths = []string{appLogPath}
+
+	log, err := cfg.Build()
+	if err != nil {
+		return nil, fmt.Errorf("couldn't create logger: %w", err)
+	}
+	return log, nil
+}
+
+func BuildLogger(output, level string) (*zap.Logger, error) {
 	cfg := DefaultConfig()
 
 	l, err := getLevel(level)
diff --git a/cmd/sign_test.go b/cmd/message_sign_test.go
similarity index 100%
rename from cmd/sign_test.go
rename to cmd/message_sign_test.go
diff --git a/cmd/verify_test.go b/cmd/message_verify_test.go
similarity index 100%
rename from cmd/verify_test.go
rename to cmd/message_verify_test.go
diff --git a/cmd/service.go b/cmd/service.go
index 1d5ef4d..2f53ded 100644
--- a/cmd/service.go
+++ b/cmd/service.go
@@ -14,5 +14,6 @@ func NewCmdService(w io.Writer, rf *RootFlags) *cobra.Command {
 	}
 
 	cmd.AddCommand(NewCmdRunService(w, rf))
+	cmd.AddCommand(NewCmdListEndpoints(w, rf))
 	return cmd
 }
diff --git a/cmd/service_endpoints.go b/cmd/service_endpoints.go
new file mode 100644
index 0000000..7d49344
--- /dev/null
+++ b/cmd/service_endpoints.go
@@ -0,0 +1,145 @@
+package cmd
+
+import (
+	"fmt"
+	"io"
+	"os"
+	"text/template"
+
+	"code.vegaprotocol.io/vegawallet/cmd/cli"
+
+	"code.vegaprotocol.io/shared/paths"
+	"code.vegaprotocol.io/vegawallet/cmd/flags"
+	"code.vegaprotocol.io/vegawallet/cmd/printer"
+	netstore "code.vegaprotocol.io/vegawallet/network/store/v1"
+	"github.com/spf13/cobra"
+)
+
+const startupT = ` # Authentication
+ - login:                   POST   {{.WalletServiceLocalAddress}}/api/v1/auth/token
+ - logout:                  DELETE {{.WalletServiceLocalAddress}}/api/v1/auth/token
+
+ # Network management
+ - network:                 GET    {{.WalletServiceLocalAddress}}/api/v1/network
+
+ # Wallet management
+ - create a wallet:         POST   {{.WalletServiceLocalAddress}}/api/v1/wallets
+ - import a wallet:         POST   {{.WalletServiceLocalAddress}}/api/v1/wallets/import
+
+ # Key pair management
+ - generate a key pair:     POST   {{.WalletServiceLocalAddress}}/api/v1/keys
+ - list keys:               GET    {{.WalletServiceLocalAddress}}/api/v1/keys
+ - describe a key pair:     GET    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid
+ - taint a key pair:        PUT    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid/taint
+ - annotate a key pair:     PUT    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid/metadata
+
+ # Commands
+ - sign a command:          POST   {{.WalletServiceLocalAddress}}/api/v1/command
+ - sign a command (sync):   POST   {{.WalletServiceLocalAddress}}/api/v1/command/sync
+ - sign a command (commit): POST   {{.WalletServiceLocalAddress}}/api/v1/command/commit
+ - sign data:               POST   {{.WalletServiceLocalAddress}}/api/v1/sign
+ - verify data:             POST   {{.WalletServiceLocalAddress}}/api/v1/verify
+
+ # Information
+ - get service status:      GET    {{.WalletServiceLocalAddress}}/api/v1/status
+ - get the version:         GET    {{.WalletServiceLocalAddress}}/api/v1/version
+`
+
+var (
+	listEndpointsLong = cli.LongDesc(`
+		List the Vega wallet service HTTP endpoints
+	`)
+
+	listEndpointsExample = cli.Examples(`
+		# List service endpoints
+		vegawallet endpoints --network NETWORK
+	`)
+)
+
+type ListEndpointsHandler func(io.Writer, *RootFlags, *ListEndpointsFlags) error
+
+func NewCmdListEndpoints(w io.Writer, rf *RootFlags) *cobra.Command {
+	return BuildCmdListEndpoints(w, ListEndpoints, rf)
+}
+
+func BuildCmdListEndpoints(w io.Writer, handler ListEndpointsHandler, rf *RootFlags) *cobra.Command {
+	f := &ListEndpointsFlags{}
+
+	cmd := &cobra.Command{
+		Use:     "endpoints",
+		Short:   "List endpoints",
+		Long:    listEndpointsLong,
+		Example: listEndpointsExample,
+		RunE: func(_ *cobra.Command, _ []string) error {
+			if err := f.Validate(); err != nil {
+				return err
+			}
+
+			if err := handler(w, rf, f); err != nil {
+				return err
+			}
+
+			return nil
+		},
+	}
+
+	cmd.Flags().StringVarP(&f.Network,
+		"network", "n",
+		"",
+		"Network configuration to use",
+	)
+
+	return cmd
+}
+
+type ListEndpointsFlags struct {
+	Network string
+}
+
+func (f *ListEndpointsFlags) Validate() error {
+	if len(f.Network) == 0 {
+		return flags.FlagMustBeSpecifiedError("network")
+	}
+
+	return nil
+}
+
+func ListEndpoints(w io.Writer, rf *RootFlags, f *ListEndpointsFlags) error {
+	p := printer.NewInteractivePrinter(w)
+
+	vegaPaths := paths.New(rf.Home)
+	netStore, err := netstore.InitialiseStore(vegaPaths)
+	if err != nil {
+		return fmt.Errorf("couldn't initialise network store: %w", err)
+	}
+
+	cfg, err := netStore.GetNetwork(f.Network)
+	if err != nil {
+		return fmt.Errorf("couldn't initialise network store: %w", err)
+	}
+
+	serviceHost := fmt.Sprintf("http://%v:%v", cfg.Host, cfg.Port)
+
+	p.BlueArrow().InfoText("Available endpoints").NextLine()
+	printServiceEndpoints(serviceHost)
+	p.NextLine()
+
+	return nil
+}
+
+func printServiceEndpoints(serviceHost string) {
+	params := struct {
+		WalletServiceLocalAddress string
+	}{
+		WalletServiceLocalAddress: serviceHost,
+	}
+
+	tmpl, err := template.New("wallet-cmdline").Parse(startupT)
+	if err != nil {
+		panic(err)
+	}
+	err = tmpl.Execute(os.Stdout, params)
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/cmd/service_run.go b/cmd/service_run.go
index e6f6742..d1c3cb4 100644
--- a/cmd/service_run.go
+++ b/cmd/service_run.go
@@ -9,7 +9,6 @@ import (
 	"os"
 	"os/signal"
 	"syscall"
-	"text/template"
 
 	vglog "code.vegaprotocol.io/shared/libs/zap"
 	"code.vegaprotocol.io/shared/paths"
@@ -29,52 +28,21 @@ import (
 	"go.uber.org/zap"
 )
 
-const startupT = ` # Authentication
- - login:                   POST   {{.WalletServiceLocalAddress}}/api/v1/auth/token
- - logout:                  DELETE {{.WalletServiceLocalAddress}}/api/v1/auth/token
-
- # Network management
- - network:                 GET    {{.WalletServiceLocalAddress}}/api/v1/network
-
- # Wallet management
- - create a wallet:         POST   {{.WalletServiceLocalAddress}}/api/v1/wallets
- - import a wallet:         POST   {{.WalletServiceLocalAddress}}/api/v1/wallets/import
-
- # Key pair management
- - generate a key pair:     POST   {{.WalletServiceLocalAddress}}/api/v1/keys
- - list keys:               GET    {{.WalletServiceLocalAddress}}/api/v1/keys
- - describe a key pair:     GET    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid
- - taint a key pair:        PUT    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid/taint
- - annotate a key pair:     PUT    {{.WalletServiceLocalAddress}}/api/v1/keys/:keyid/metadata
-
- # Commands
- - sign a command:          POST   {{.WalletServiceLocalAddress}}/api/v1/command
- - sign a command (sync):   POST   {{.WalletServiceLocalAddress}}/api/v1/command/sync
- - sign a command (commit): POST   {{.WalletServiceLocalAddress}}/api/v1/command/commit
- - sign data:               POST   {{.WalletServiceLocalAddress}}/api/v1/sign
- - verify data:             POST   {{.WalletServiceLocalAddress}}/api/v1/verify
-
- # Information
- - get service status:      GET    {{.WalletServiceLocalAddress}}/api/v1/status
- - get the version:         GET    {{.WalletServiceLocalAddress}}/api/v1/version
-`
-
 var (
 	ErrProgramIsNotInitialised = errors.New("first, you need initialise the program, using the `init` command")
 
 	runServiceLong = cli.LongDesc(`
 		Start a Vega wallet service behind an HTTP server.
 
-		To terminate the service, hit ctrl+c.
+		To terminate the service, hit ctrl+c. 
+
+		NOTE: The --output flag is ignored in this command.
 	`)
 
 	runServiceExample = cli.Examples(`
 		# Start the service
 		vegawallet service run --network NETWORK
 
-		# Start the service with a log level set to debug
-		vegawallet service run --network NETWORK --level debug
-
 		# Start the service and open the console in the default browser
 		vegawallet service run --network NETWORK --with-console
 
@@ -136,14 +104,8 @@ func BuildCmdRunService(w io.Writer, handler RunServiceHandler, rf *RootFlags) *
 		false,
 		"Do not open the default browser when starting applications",
 	)
-	cmd.Flags().StringVar(&f.LogLevel,
-		"level",
-		"",
-		fmt.Sprintf("Set the log level: %v (default: value set by the network configuration)", SupportedLogLevels),
-	)
 
 	autoCompleteNetwork(cmd, rf.Home)
-	autoCompleteLogLevel(cmd)
 
 	return cmd
 }
@@ -153,7 +115,6 @@ type RunServiceFlags struct {
 	WithConsole   bool
 	WithTokenDApp bool
 	NoBrowser     bool
-	LogLevel      string
 }
 
 func (f *RunServiceFlags) Validate() error {
@@ -165,12 +126,6 @@ func (f *RunServiceFlags) Validate() error {
 		return flags.OneOfParentsFlagMustBeSpecifiedError("no-browser", "with-console", "with-token-dapp")
 	}
 
-	if len(f.LogLevel) != 0 {
-		if err := ValidateLogLevel(f.LogLevel); err != nil {
-			return err
-		}
-	}
-
 	return nil
 }
 
@@ -184,7 +139,8 @@ func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error {
 
 	handler := wallets.NewHandler(store)
 
-	netStore, err := netstore.InitialiseStore(paths.New(rf.Home))
+	vegaPaths := paths.New(rf.Home)
+	netStore, err := netstore.InitialiseStore(vegaPaths)
 	if err != nil {
 		return fmt.Errorf("couldn't initialise network store: %w", err)
 	}
@@ -206,15 +162,13 @@ func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error {
 		return err
 	}
 
-	logLevel := cfg.Level.String()
-	if len(f.LogLevel) != 0 {
-		logLevel = f.LogLevel
-	}
-	log, err := Build(rf.Output, logLevel)
+	svcLog, err := BuildJSONLogger(cfg.Level.String(), paths.WalletServiceLogsHome)
 	if err != nil {
 		return err
 	}
-	defer vglog.Sync(log)
+	defer vglog.Sync(svcLog)
+
+	svcLog = svcLog.Named("service")
 
 	ctx, cancel := context.WithCancel(context.Background())
 	defer cancel()
@@ -230,77 +184,79 @@ func RunService(w io.Writer, rf *RootFlags, f *RunServiceFlags) error {
 		return ErrProgramIsNotInitialised
 	}
 
-	auth, err := service.NewAuth(log.Named("auth"), svcStore, cfg.TokenExpiry.Get())
+	auth, err := service.NewAuth(svcLog.Named("auth"), svcStore, cfg.TokenExpiry.Get())
 	if err != nil {
 		return fmt.Errorf("couldn't initialise authentication: %w", err)
 	}
 
-	forwarder, err := node.NewForwarder(log.Named("forwarder"), cfg.API.GRPC)
+	forwarder, err := node.NewForwarder(svcLog.Named("forwarder"), cfg.API.GRPC)
 	if err != nil {
 		return fmt.Errorf("couldn't initialise the node forwarder: %w", err)
 	}
 
-	srv, err := service.NewService(log.Named("service"), cfg, handler, auth, forwarder)
+	srv, err := service.NewService(svcLog.Named("api"), cfg, handler, auth, forwarder)
 	if err != nil {
 		return err
 	}
 
-	log = log.Named("command")
+	cliLog, err := BuildJSONLogger(cfg.Level.String(), paths.WalletCLILogsHome)
+	if err != nil {
+		return err
+	}
+	defer vglog.Sync(cliLog)
+
+	cliLog = cliLog.Named("command")
 
 	go func() {
 		defer cancel()
 		if err := srv.Start(); err != nil && !errors.Is(err, http.ErrServerClosed) {
-			log.Error("error while starting HTTP server", zap.Error(err))
+			cliLog.Error("Error while starting HTTP server", zap.Error(err))
 		}
 	}()
 
 	serviceHost := fmt.Sprintf("http://%v:%v", cfg.Host, cfg.Port)
 	if rf.Output == flags.InteractiveOutput {
 		p.CheckMark().Text("HTTP service started at: ").SuccessText(serviceHost).NextLine()
-	} else if rf.Output == flags.JSONOutput {
-		log.Info(fmt.Sprintf("HTTP service started at: %s", serviceHost))
 	}
+	cliLog.Info(fmt.Sprintf("HTTP service started at: %s", serviceHost))
+
 	defer func() {
 		if err = srv.Stop(); err != nil {
-			log.Error("error while stopping HTTP server", zap.Error(err))
-		} else {
-			log.Info("HTTP server stopped with success")
+			cliLog.Error("Error while stopping HTTP server", zap.Error(err))
+			cliLog.Info("HTTP server stopped with success")
 		}
 	}()
 
 	var cs *proxy.Proxy
 	if f.WithConsole {
-		cs = startConsole(log, rf, !f.NoBrowser, cfg, cancel, p)
+		cs = startConsole(cliLog, rf, !f.NoBrowser, cfg, cancel, p)
 		defer func() {
 			if err = cs.Stop(); err != nil {
-				log.Error("error while stopping console proxy", zap.Error(err))
+				cliLog.Error("Error while stopping console proxy", zap.Error(err))
 			} else {
-				log.Info("console proxy stopped with success")
+				cliLog.Info("Console proxy stopped with success")
 			}
 		}()
 	}
 
 	var tokenDApp *proxy.Proxy
 	if f.WithTokenDApp {
-		tokenDApp = startTokenDApp(log, rf, !f.NoBrowser, cfg, cancel, p)
+		tokenDApp = startTokenDApp(cliLog, rf, !f.NoBrowser, cfg, cancel, p)
 		defer func() {
 			if err = tokenDApp.Stop(); err != nil {
-				log.Error("error while stopping token dApp proxy", zap.Error(err))
+				cliLog.Error("Error while stopping token dApp proxy", zap.Error(err))
 			} else {
-				log.Info("token dApp proxy stopped with success")
+				cliLog.Info("Token dApp proxy stopped with success")
 			}
 		}()
 	}
 
 	if rf.Output == flags.InteractiveOutput {
 		p.CheckMark().SuccessText("Starting successful").NextSection()
-		p.BlueArrow().InfoText("Available endpoints").NextLine()
-		printServiceEndpoints(serviceHost)
-		p.NextSection()
-		p.BlueArrow().InfoText("Logs").NextLine()
+		p.NextLine()
 	}
 
-	waitSig(ctx, cancel, log)
+	waitSig(ctx, cancel, cliLog)
 
 	return nil
 }
@@ -334,9 +290,8 @@ func startConsole(log *zap.Logger, rf *RootFlags, openBrowser bool, cfg *network
 	consoleLocalHost := fmt.Sprintf("http://127.0.0.1:%v", cfg.Console.LocalPort)
 	if rf.Output == flags.InteractiveOutput {
 		p.CheckMark().Text("Console proxy pointing to ").Bold(cfg.Console.URL).Text(" started at: ").SuccessText(consoleLocalHost).NextLine()
-	} else if rf.Output == "json" {
-		log.Info(fmt.Sprintf("console proxy pointing to %s started at: %s", cfg.Console.URL, consoleLocalHost))
 	}
+	log.Info(fmt.Sprintf("console proxy pointing to %s started at: %s", cfg.Console.URL, consoleLocalHost))
 
 	if openBrowser {
 		if err := open.Run(cs.GetBrowserURL()); err != nil {
@@ -359,9 +314,8 @@ func startTokenDApp(log *zap.Logger, rf *RootFlags, openBrowser bool, cfg *netwo
 	tokenDAppLocalHost := fmt.Sprintf("http://127.0.0.1:%v", cfg.TokenDApp.LocalPort)
 	if rf.Output == flags.InteractiveOutput {
 		p.CheckMark().Text("token dApp proxy pointing to ").Bold(cfg.TokenDApp.URL).Text(" started at: ").SuccessText(tokenDAppLocalHost).NextLine()
-	} else if rf.Output == "json" {
-		log.Info(fmt.Sprintf("token dApp proxy pointing to %s started at: %s", cfg.TokenDApp.URL, tokenDAppLocalHost))
 	}
+	log.Info(fmt.Sprintf("token dApp proxy pointing to %s started at: %s", cfg.TokenDApp.URL, tokenDAppLocalHost))
 
 	if openBrowser {
 		if err := open.Run(tokenDApp.GetBrowserURL()); err != nil {
@@ -386,20 +340,3 @@ func waitSig(ctx context.Context, cfunc func(), log *zap.Logger) {
 		// nothing to do
 	}
 }
-
-func printServiceEndpoints(serviceHost string) {
-	params := struct {
-		WalletServiceLocalAddress string
-	}{
-		WalletServiceLocalAddress: serviceHost,
-	}
-
-	tmpl, err := template.New("wallet-cmdline").Parse(startupT)
-	if err != nil {
-		panic(err)
-	}
-	err = tmpl.Execute(os.Stdout, params)
-	if err != nil {
-		panic(err)
-	}
-}
diff --git a/cmd/tx_send.go b/cmd/tx_send.go
index f802035..eee328e 100644
--- a/cmd/tx_send.go
+++ b/cmd/tx_send.go
@@ -102,7 +102,6 @@ func BuildCmdTxSend(w io.Writer, handler SendTxHandler, rf *RootFlags) *cobra.Co
 
 	autoCompleteNetwork(cmd, rf.Home)
 	autoCompleteLogLevel(cmd)
-
 	return cmd
 }
 
@@ -161,7 +160,7 @@ type SendTxRequest struct {
 }
 
 func SendTx(w io.Writer, rf *RootFlags, req *SendTxRequest) error {
-	log, err := Build(rf.Output, req.LogLevel)
+	log, err := BuildLogger(rf.Output, req.LogLevel)
 	if err != nil {
 		return err
 	}
@@ -198,7 +197,7 @@ func SendTx(w io.Writer, rf *RootFlags, req *SendTxRequest) error {
 	ctx, cancelFn := context.WithTimeout(context.Background(), ForwarderRequestTimeout)
 	defer cancelFn()
 
-	txHash, err := forwarder.SendTx(ctx, req.Tx, api.SubmitTransactionRequest_TYPE_ASYNC)
+	txHash, err := forwarder.SendTx(ctx, req.Tx, api.SubmitTransactionRequest_TYPE_ASYNC, -1)
 	if err != nil {
 		log.Error("Couldn't send transaction", zap.Error(err))
 		return fmt.Errorf("couldn't send transaction: %w", err)
diff --git a/commands/commands.go b/commands/commands.go
index 7e25036..350c2b4 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -55,6 +55,10 @@ func CheckSubmitTransactionRequest(req *walletpb.SubmitTransactionRequest) comma
 		cmdErr = commands.CheckLiquidityProvisionCancellation(cmd.LiquidityProvisionCancellation)
 	case *walletpb.SubmitTransactionRequest_LiquidityProvisionAmendment:
 		cmdErr = commands.CheckLiquidityProvisionAmendment(cmd.LiquidityProvisionAmendment)
+	case *walletpb.SubmitTransactionRequest_Transfer:
+		cmdErr = commands.CheckTransfer(cmd.Transfer)
+	case *walletpb.SubmitTransactionRequest_CancelTransfer:
+		cmdErr = commands.CheckCancelTransfer(cmd.CancelTransfer)
 	default:
 		errs.AddForProperty("input_data.command", commands.ErrIsNotSupported)
 	}
@@ -138,6 +142,14 @@ func wrapRequestCommandIntoInputData(data *commandspb.InputData, req *walletpb.S
 		data.Command = &commandspb.InputData_LiquidityProvisionAmendment{
 			LiquidityProvisionAmendment: req.GetLiquidityProvisionAmendment(),
 		}
+	case *walletpb.SubmitTransactionRequest_Transfer:
+		data.Command = &commandspb.InputData_Transfer{
+			Transfer: req.GetTransfer(),
+		}
+	case *walletpb.SubmitTransactionRequest_CancelTransfer:
+		data.Command = &commandspb.InputData_CancelTransfer{
+			CancelTransfer: req.GetCancelTransfer(),
+		}
 	default:
 		panic(fmt.Sprintf("command %v is not supported", cmd))
 	}
diff --git a/go.mod b/go.mod
index 7908cc8..939f521 100644
--- a/go.mod
+++ b/go.mod
@@ -3,33 +3,33 @@ module code.vegaprotocol.io/vegawallet
 go 1.17
 
 require (
-	code.vegaprotocol.io/protos v0.49.1
-	code.vegaprotocol.io/shared v0.0.0-20220202150846-b6aba31dcdb0
+	code.vegaprotocol.io/protos v0.49.3
+	code.vegaprotocol.io/shared v0.0.0-20220321185018-3b5684b00533
 	github.com/blang/semver/v4 v4.0.0
-	github.com/cenkalti/backoff/v4 v4.0.2
+	github.com/cenkalti/backoff/v4 v4.1.2
 	github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1
-	github.com/golang/mock v1.4.4
+	github.com/golang/mock v1.6.0
 	github.com/golang/protobuf v1.5.2
 	github.com/julienschmidt/httprouter v1.3.0
-	github.com/muesli/termenv v0.9.0
-	github.com/oasisprotocol/curve25519-voi v0.0.0-20210716083614-f38f8e8b0b84
-	github.com/rs/cors v1.7.0
+	github.com/muesli/termenv v0.11.0
+	github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17
+	github.com/rs/cors v1.8.2
 	github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
-	github.com/spf13/cobra v1.1.1
+	github.com/spf13/cobra v1.4.0
 	github.com/stretchr/testify v1.7.0
 	github.com/tyler-smith/go-bip39 v1.1.0
 	github.com/vegaprotocol/go-slip10 v0.1.0
-	go.uber.org/zap v1.20.0
-	golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
-	golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
-	google.golang.org/grpc v1.43.0
+	go.uber.org/zap v1.21.0
+	golang.org/x/sys v0.0.0-20220318055525-2edf467146b5
+	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
+	google.golang.org/grpc v1.45.0
 )
 
 require (
 	github.com/BurntSushi/toml v1.0.0 // indirect
-	github.com/adrg/xdg v0.3.3 // indirect
+	github.com/adrg/xdg v0.4.0 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 // indirect
 	github.com/inconshreveable/mousetrap v1.0.0 // indirect
 	github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
 	github.com/mattn/go-isatty v0.0.14 // indirect
@@ -37,12 +37,12 @@ require (
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/spf13/pflag v1.0.5 // indirect
-	go.uber.org/atomic v1.7.0 // indirect
-	go.uber.org/multierr v1.6.0 // indirect
-	golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
-	golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect
-	golang.org/x/text v0.3.6 // indirect
-	google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 // indirect
+	go.uber.org/atomic v1.9.0 // indirect
+	go.uber.org/multierr v1.8.0 // indirect
+	golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
+	golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
+	golang.org/x/text v0.3.7 // indirect
+	google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
 	google.golang.org/protobuf v1.27.1 // indirect
 	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
 )
diff --git a/go.sum b/go.sum
index 2cc6bdb..cbe3283 100644
--- a/go.sum
+++ b/go.sum
@@ -31,10 +31,10 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
 cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
 cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
 cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-code.vegaprotocol.io/protos v0.49.1 h1:U7apDIlcok9OSJsLSNoQnQdV4QDOyS2smZbKLfgESUU=
-code.vegaprotocol.io/protos v0.49.1/go.mod h1:sGGn35s31oBNLNCC5tFiKtfNEPiKm3UghOKNaO+bq58=
-code.vegaprotocol.io/shared v0.0.0-20220202150846-b6aba31dcdb0 h1:vDjKTd508FwIwoSdZBEvtEfmBeaYdodgLM96v253zKI=
-code.vegaprotocol.io/shared v0.0.0-20220202150846-b6aba31dcdb0/go.mod h1:pNHKwqRDkotUN0s6jErl7Eb2EpZa2HAf03lyPMTCUT0=
+code.vegaprotocol.io/protos v0.49.3 h1:hKFrfsMaoRHJNeOjJ1cTkyltmkZGc17m9F2r+84d3jE=
+code.vegaprotocol.io/protos v0.49.3/go.mod h1:K6FWDdxWzEgZjz2G1f8gmrSPMey720ryHnzNRn1pW7w=
+code.vegaprotocol.io/shared v0.0.0-20220321185018-3b5684b00533 h1:IxTWvyF0i0AgUAS+FTgQKIpbsS6Ki/Y9Ug0GSlgChJw=
+code.vegaprotocol.io/shared v0.0.0-20220321185018-3b5684b00533/go.mod h1:pNHKwqRDkotUN0s6jErl7Eb2EpZa2HAf03lyPMTCUT0=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
@@ -48,8 +48,9 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
 github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
 github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
 github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=
-github.com/adrg/xdg v0.3.3 h1:s/tV7MdqQnzB1nKY8aqHvAMD+uCiuEDzVB5HLRY849U=
 github.com/adrg/xdg v0.3.3/go.mod h1:61xAR2VZcggl2St4O9ohF5qCKe08+JDmE4VNzPFQvOQ=
+github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
+github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
 github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -92,8 +93,8 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f
 github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
 github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
 github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
-github.com/cenkalti/backoff/v4 v4.0.2 h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4eamEDs=
-github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
+github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
+github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
 github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -130,6 +131,7 @@ github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mV
 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
 github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
 github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
 github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -202,8 +204,9 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU
 github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
 github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
 github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
 github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
+github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -269,8 +272,9 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
 github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU=
 github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 h1:I8MsauTJQXZ8df8qJvEln0kYNc3bSapuaSsEsnFdEFU=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3/go.mod h1:lZdb/YAJUSj9OqrCHs2ihjtoO3+xK3G53wTYXFWRGDo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 h1:SLkFeyLhrg86Ny5Wme4MGGace7EHfgsb07uWX/QUGEQ=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0/go.mod h1:z5aB5opCfWSoAzCrC18hMgjy4oWJ2dPXkn+f3kqTHxI=
 github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
 github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
 github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=
@@ -343,7 +347,6 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
 github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
 github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
 github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -365,8 +368,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/muesli/termenv v0.9.0 h1:wnbOaGz+LUR3jNT0zOzinPnyDaCZUQRZj9GxK8eRVl8=
-github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw=
+github.com/muesli/termenv v0.11.0 h1:fwNUbu2mfWlgicwG7qYzs06aOI8Z/zKPAv8J4uKbT+o=
+github.com/muesli/termenv v0.11.0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
 github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
 github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
@@ -379,8 +382,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
 github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
-github.com/oasisprotocol/curve25519-voi v0.0.0-20210716083614-f38f8e8b0b84 h1:VGE87qI0pfuQ23PLPiXpXIdk4gVGFZpq5H5A2f1dZcY=
-github.com/oasisprotocol/curve25519-voi v0.0.0-20210716083614-f38f8e8b0b84/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM=
+github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17 h1:pxR+aWfo+famermIZvD+SiDQ3qmF7Iy2VPZuEsKTMtA=
+github.com/oasisprotocol/curve25519-voi v0.0.0-20220317090546-adb2f9614b17/go.mod h1:WUcXjUd98qaCVFb6j8Xc87MsKeMCXDu9Nk8JRJ9SeC8=
 github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
 github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
 github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
@@ -453,10 +456,12 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ
 github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
 github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
+github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
+github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
 github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
 github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
 github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10=
@@ -480,8 +485,9 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU
 github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
 github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
-github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
 github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
+github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
+github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
 github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
 github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
@@ -545,19 +551,21 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
 go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
-go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
 go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
+go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
 go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
 go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
 go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
-go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
 go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
+go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
 go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
 go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc=
-go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
+go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
+go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
 golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -574,9 +582,11 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ=
+golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220314234724-5d542ad81a58/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
+golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -652,14 +662,17 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
-golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A=
-golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -701,7 +714,6 @@ golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -726,20 +738,25 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
 golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 h1:saXMvIOKvRFwbOMicHXr0B1uwoxq9dGmLe5ExMES6c4=
+golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
-golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -794,6 +811,7 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc
 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -858,8 +876,10 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
 google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q=
 google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
+google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg=
+google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
 google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
 google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -886,8 +906,9 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
 google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
 google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
 google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
-google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM=
 google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
diff --git a/node/forwarder.go b/node/forwarder.go
index b9d5404..9a4bde4 100644
--- a/node/forwarder.go
+++ b/node/forwarder.go
@@ -63,7 +63,7 @@ func (n *Forwarder) HealthCheck(ctx context.Context) error {
 	req := api.GetVegaTimeRequest{}
 	return backoff.Retry(
 		func() error {
-			clt := n.nextClt()
+			clt := n.clts[n.nextClt()]
 			resp, err := clt.GetVegaTime(ctx, &req)
 			if err != nil {
 				return err
@@ -75,18 +75,21 @@ func (n *Forwarder) HealthCheck(ctx context.Context) error {
 	)
 }
 
-func (n *Forwarder) LastBlockHeight(ctx context.Context) (uint64, error) {
+// LastBlockHeightAndHash returns information about the last block from vega and the node it used to fetch it.
+func (n *Forwarder) LastBlockHeightAndHash(ctx context.Context) (*api.LastBlockHeightResponse, int, error) {
 	req := api.LastBlockHeightRequest{}
-	var height uint64
+	var resp *api.LastBlockHeightResponse
+	clt := -1
 	err := backoff.Retry(
 		func() error {
-			clt := n.nextClt()
-			resp, err := clt.LastBlockHeight(ctx, &req)
+			clt = n.nextClt()
+			r, err := n.clts[clt].LastBlockHeight(ctx, &req)
 			if err != nil {
 				n.log.Debug("Couldn't get last block", zap.Error(err))
 				return err
 			}
-			height = resp.Height
+			resp = r
+			n.log.Info("", zap.Uint64("block-height", r.Height), zap.String("block-hash", r.Hash), zap.Uint32("difficulty", r.SpamPowDifficulty), zap.String("function", r.SpamPowHashFunction))
 			return nil
 		},
 		backoff.WithMaxRetries(backoff.NewExponentialBackOff(), n.nodeCfgs.Retries),
@@ -94,25 +97,29 @@ func (n *Forwarder) LastBlockHeight(ctx context.Context) (uint64, error) {
 
 	if err != nil {
 		n.log.Error("Couldn't get last block", zap.Error(err))
+		clt = -1
 	} else {
 		n.log.Debug("Last block when sending transaction",
 			zap.Time("request.time", time.Now()),
-			zap.Uint64("block.height", height),
+			zap.Uint64("block.height", resp.Height),
 		)
 	}
 
-	return height, err
+	return resp, clt, err
 }
 
-func (n *Forwarder) SendTx(ctx context.Context, tx *commandspb.Transaction, ty api.SubmitTransactionRequest_Type) (string, error) {
+func (n *Forwarder) SendTx(ctx context.Context, tx *commandspb.Transaction, ty api.SubmitTransactionRequest_Type, cltIdx int) (string, error) {
 	req := api.SubmitTransactionRequest{
 		Tx:   tx,
 		Type: ty,
 	}
 	var resp *api.SubmitTransactionResponse
+	if cltIdx < 0 {
+		cltIdx = n.nextClt()
+	}
 	err := backoff.Retry(
 		func() error {
-			clt := n.nextClt()
+			clt := n.clts[cltIdx]
 			r, err := clt.SubmitTransaction(ctx, &req)
 			if err != nil {
 				n.log.Error("Couldn't send transaction", zap.Error(err))
@@ -133,10 +140,10 @@ func (n *Forwarder) SendTx(ctx context.Context, tx *commandspb.Transaction, ty a
 	return resp.TxHash, nil
 }
 
-func (n *Forwarder) nextClt() api.CoreServiceClient {
+func (n *Forwarder) nextClt() int {
 	i := atomic.AddUint64(&n.next, 1)
 	n.log.Info("Sending transaction to Vega node",
 		zap.String("host", n.nodeCfgs.Hosts[(int(i)-1)%len(n.clts)]),
 	)
-	return n.clts[(int(i)-1)%len(n.clts)]
+	return (int(i) - 1) % len(n.clts)
 }
diff --git a/service/errors.go b/service/errors.go
index d34dfae..2df580e 100644
--- a/service/errors.go
+++ b/service/errors.go
@@ -14,6 +14,7 @@ var (
 	ErrCouldNotGetBlockHeight = errors.New("couldn't get last block height")
 	ErrShouldBeBase64Encoded  = errors.New("should be base64 encoded")
 	ErrRSAKeysAlreadyExists   = errors.New("RSA keys already exist")
+	ErrCouldNotGetPoW         = errors.New("could not get proof of work")
 )
 
 type ErrorsResponse struct {
diff --git a/service/mocks/node_forward_mock.go b/service/mocks/node_forward_mock.go
index 88980cb..618f65a 100644
--- a/service/mocks/node_forward_mock.go
+++ b/service/mocks/node_forward_mock.go
@@ -5,37 +5,38 @@
 package mocks
 
 import (
+	context "context"
+	reflect "reflect"
+
 	v1 "code.vegaprotocol.io/protos/vega/api/v1"
 	v10 "code.vegaprotocol.io/protos/vega/commands/v1"
-	context "context"
 	gomock "github.com/golang/mock/gomock"
-	reflect "reflect"
 )
 
-// MockNodeForward is a mock of NodeForward interface
+// MockNodeForward is a mock of NodeForward interface.
 type MockNodeForward struct {
 	ctrl     *gomock.Controller
 	recorder *MockNodeForwardMockRecorder
 }
 
-// MockNodeForwardMockRecorder is the mock recorder for MockNodeForward
+// MockNodeForwardMockRecorder is the mock recorder for MockNodeForward.
 type MockNodeForwardMockRecorder struct {
 	mock *MockNodeForward
 }
 
-// NewMockNodeForward creates a new mock instance
+// NewMockNodeForward creates a new mock instance.
 func NewMockNodeForward(ctrl *gomock.Controller) *MockNodeForward {
 	mock := &MockNodeForward{ctrl: ctrl}
 	mock.recorder = &MockNodeForwardMockRecorder{mock}
 	return mock
 }
 
-// EXPECT returns an object that allows the caller to indicate expected use
+// EXPECT returns an object that allows the caller to indicate expected use.
 func (m *MockNodeForward) EXPECT() *MockNodeForwardMockRecorder {
 	return m.recorder
 }
 
-// HealthCheck mocks base method
+// HealthCheck mocks base method.
 func (m *MockNodeForward) HealthCheck(arg0 context.Context) error {
 	m.ctrl.T.Helper()
 	ret := m.ctrl.Call(m, "HealthCheck", arg0)
@@ -43,38 +44,39 @@ func (m *MockNodeForward) HealthCheck(arg0 context.Context) error {
 	return ret0
 }
 
-// HealthCheck indicates an expected call of HealthCheck
+// HealthCheck indicates an expected call of HealthCheck.
 func (mr *MockNodeForwardMockRecorder) HealthCheck(arg0 interface{}) *gomock.Call {
 	mr.mock.ctrl.T.Helper()
 	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockNodeForward)(nil).HealthCheck), arg0)
 }
 
-// LastBlockHeight mocks base method
-func (m *MockNodeForward) LastBlockHeight(arg0 context.Context) (uint64, error) {
+// LastBlockHeightAndHash mocks base method.
+func (m *MockNodeForward) LastBlockHeightAndHash(arg0 context.Context) (*v1.LastBlockHeightResponse, int, error) {
 	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "LastBlockHeight", arg0)
-	ret0, _ := ret[0].(uint64)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
+	ret := m.ctrl.Call(m, "LastBlockHeightAndHash", arg0)
+	ret0, _ := ret[0].(*v1.LastBlockHeightResponse)
+	ret1, _ := ret[1].(int)
+	ret2, _ := ret[2].(error)
+	return ret0, ret1, ret2
 }
 
-// LastBlockHeight indicates an expected call of LastBlockHeight
-func (mr *MockNodeForwardMockRecorder) LastBlockHeight(arg0 interface{}) *gomock.Call {
+// LastBlockHeightAndHash indicates an expected call of LastBlockHeightAndHash.
+func (mr *MockNodeForwardMockRecorder) LastBlockHeightAndHash(arg0 interface{}) *gomock.Call {
 	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastBlockHeight", reflect.TypeOf((*MockNodeForward)(nil).LastBlockHeight), arg0)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastBlockHeightAndHash", reflect.TypeOf((*MockNodeForward)(nil).LastBlockHeightAndHash), arg0)
 }
 
-// SendTx mocks base method
-func (m *MockNodeForward) SendTx(arg0 context.Context, arg1 *v10.Transaction, arg2 v1.SubmitTransactionRequest_Type) (string, error) {
+// SendTx mocks base method.
+func (m *MockNodeForward) SendTx(arg0 context.Context, arg1 *v10.Transaction, arg2 v1.SubmitTransactionRequest_Type, arg3 int) (string, error) {
 	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "SendTx", arg0, arg1, arg2)
+	ret := m.ctrl.Call(m, "SendTx", arg0, arg1, arg2, arg3)
 	ret0, _ := ret[0].(string)
 	ret1, _ := ret[1].(error)
 	return ret0, ret1
 }
 
-// SendTx indicates an expected call of SendTx
-func (mr *MockNodeForwardMockRecorder) SendTx(arg0, arg1, arg2 interface{}) *gomock.Call {
+// SendTx indicates an expected call of SendTx.
+func (mr *MockNodeForwardMockRecorder) SendTx(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
 	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTx", reflect.TypeOf((*MockNodeForward)(nil).SendTx), arg0, arg1, arg2)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTx", reflect.TypeOf((*MockNodeForward)(nil).SendTx), arg0, arg1, arg2, arg3)
 }
diff --git a/service/service.go b/service/service.go
index f16b760..c8cfeeb 100644
--- a/service/service.go
+++ b/service/service.go
@@ -15,6 +15,7 @@ import (
 	api "code.vegaprotocol.io/protos/vega/api/v1"
 	commandspb "code.vegaprotocol.io/protos/vega/commands/v1"
 	walletpb "code.vegaprotocol.io/protos/vega/wallet/v1"
+	vgcrypto "code.vegaprotocol.io/shared/libs/crypto"
 	wcommands "code.vegaprotocol.io/vegawallet/commands"
 	"code.vegaprotocol.io/vegawallet/network"
 	"code.vegaprotocol.io/vegawallet/version"
@@ -404,9 +405,9 @@ type Auth interface {
 // NodeForward ...
 //go:generate go run github.com/golang/mock/mockgen -destination mocks/node_forward_mock.go -package mocks code.vegaprotocol.io/vegawallet/service NodeForward
 type NodeForward interface {
-	SendTx(context.Context, *commandspb.Transaction, api.SubmitTransactionRequest_Type) (string, error)
+	SendTx(context.Context, *commandspb.Transaction, api.SubmitTransactionRequest_Type, int) (string, error)
 	HealthCheck(context.Context) error
-	LastBlockHeight(context.Context) (uint64, error)
+	LastBlockHeightAndHash(context.Context) (*api.LastBlockHeightResponse, int, error)
 }
 
 func NewService(log *zap.Logger, net *network.Network, h WalletHandler, a Auth, n NodeForward) (*Service, error) {
@@ -725,7 +726,7 @@ func (s *Service) signTx(token string, w http.ResponseWriter, r *http.Request, _
 		return
 	}
 
-	height, err := s.nodeForward.LastBlockHeight(r.Context())
+	blockData, cltIdx, err := s.nodeForward.LastBlockHeightAndHash(r.Context())
 	if err != nil {
 		s.writeInternalError(w, ErrCouldNotGetBlockHeight)
 		return
@@ -737,7 +738,7 @@ func (s *Service) signTx(token string, w http.ResponseWriter, r *http.Request, _
 		return
 	}
 
-	tx, err := s.handler.SignTx(name, req, height)
+	tx, err := s.handler.SignTx(name, req, blockData.Height)
 	if err != nil {
 		s.writeInternalError(w, err)
 		return
@@ -748,7 +749,19 @@ func (s *Service) signTx(token string, w http.ResponseWriter, r *http.Request, _
 		return
 	}
 
-	txHash, err := s.nodeForward.SendTx(r.Context(), tx, ty)
+	// generate proof of work for the transaction
+	tid := vgcrypto.RandomHash()
+	powNonce, _, err := vgcrypto.PoW(blockData.Hash, tid, uint(blockData.SpamPowDifficulty), vgcrypto.Sha3)
+	if err != nil {
+		s.writeInternalError(w, err)
+		return
+	}
+	tx.Pow = &commandspb.ProofOfWork{
+		Tid:   tid,
+		Nonce: powNonce,
+	}
+
+	txHash, err := s.nodeForward.SendTx(r.Context(), tx, ty, cltIdx)
 	if err != nil {
 		if st, ok := status.FromError(err); ok {
 			var details []string
diff --git a/version/version.go b/version/version.go
index d3ca5e1..0ade54b 100644
--- a/version/version.go
+++ b/version/version.go
@@ -10,7 +10,7 @@ const (
 	ReleasesAPI        = "https://api.github.com/repos/vegaprotocol/vegawallet/releases"
 	ReleasesURL        = "https://github.com/vegaprotocol/vegawallet/releases"
 	defaultVersionHash = "unknown"
-	defaultVersion     = "v0.13.1"
+	defaultVersion     = "v0.13.2"
 )
 
 var (


Test patch:
diff --git a/cmd/service_run_test.go b/cmd/service_run_test.go
index e0aa16a..bbc2068 100644
--- a/cmd/service_run_test.go
+++ b/cmd/service_run_test.go
@@ -13,7 +13,6 @@ import (
 func TestRunServiceFlags(t *testing.T) {
 	t.Run("Valid flags succeeds", testRunServiceFlagsValidFlagsSucceeds)
 	t.Run("Missing network fails", testRunServiceFlagsMissingNetworkFails)
-	t.Run("Unsupported log level fails", testRunServiceFlagsUnsupportedLogLevelFails)
 	t.Run("No browser without console nor token dApp fails", testRunServiceFlagsNoBrowserWithoutConsoleNorTokenDAppFails)
 }
 
@@ -26,7 +25,6 @@ func testRunServiceFlagsValidFlagsSucceeds(t *testing.T) {
 		WithConsole:   true,
 		WithTokenDApp: true,
 		NoBrowser:     true,
-		LogLevel:      "debug",
 	}
 
 	// when
@@ -48,18 +46,6 @@ func testRunServiceFlagsMissingNetworkFails(t *testing.T) {
 	assert.ErrorIs(t, err, flags.FlagMustBeSpecifiedError("network"))
 }
 
-func testRunServiceFlagsUnsupportedLogLevelFails(t *testing.T) {
-	// given
-	f := newRunServiceFlags(t)
-	f.LogLevel = vgrand.RandomStr(2)
-
-	// when
-	err := f.Validate()
-
-	// then
-	assert.ErrorIs(t, err, cmd.NewUnsupportedFlagValueError(f.LogLevel))
-}
-
 func testRunServiceFlagsNoBrowserWithoutConsoleNorTokenDAppFails(t *testing.T) {
 	// given
 	f := newRunServiceFlags(t)
@@ -84,6 +70,5 @@ func newRunServiceFlags(t *testing.T) *cmd.RunServiceFlags {
 		WithConsole:   true,
 		WithTokenDApp: true,
 		NoBrowser:     true,
-		LogLevel:      "debug",
 	}
 }
diff --git a/service/service_test.go b/service/service_test.go
index 9e0500e..c88a84f 100644
--- a/service/service_test.go
+++ b/service/service_test.go
@@ -687,8 +687,13 @@ func testSigningTransactionSucceeds(t *testing.T) {
 	// setup
 	s.auth.EXPECT().VerifyToken(token).Times(1).Return(walletName, nil)
 	s.handler.EXPECT().SignTx(walletName, gomock.Any(), gomock.Any()).Times(1).Return(&commandspb.Transaction{}, nil)
-	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC).Times(0)
-	s.nodeForward.EXPECT().LastBlockHeight(gomock.Any()).Times(1).Return(uint64(42), nil)
+	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC, gomock.Any()).Times(0)
+	s.nodeForward.EXPECT().LastBlockHeightAndHash(gomock.Any()).Times(1).Return(&api.LastBlockHeightResponse{
+		Height:              42,
+		Hash:                "0292041e2f0cf741894503fb3ead4cb817bca2375e543aa70f7c4d938157b5a6",
+		SpamPowDifficulty:   2,
+		SpamPowHashFunction: "sha3_24_rounds",
+	}, 0, nil)
 
 	// when
 	statusCode, _ := serveHTTP(t, s, signTxRequest(t, payload, headers))
@@ -710,8 +715,13 @@ func testSigningTransactionWithPropagationSucceeds(t *testing.T) {
 	// setup
 	s.auth.EXPECT().VerifyToken(token).Times(1).Return(walletName, nil)
 	s.handler.EXPECT().SignTx(walletName, gomock.Any(), gomock.Any()).Times(1).Return(&commandspb.Transaction{}, nil)
-	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC).Times(1)
-	s.nodeForward.EXPECT().LastBlockHeight(gomock.Any()).Times(1).Return(uint64(42), nil)
+	s.nodeForward.EXPECT().SendTx(gomock.Any(), gomock.Any(), api.SubmitTransactionRequest_TYPE_ASYNC, gomock.Any()).Times(1)
+	s.nodeForward.EXPECT().LastBlockHeightAndHash(gomock.Any()).Times(1).Return(&api.LastBlockHeightResponse{
+		Height:              42,
+		Hash:                "0292041e2f0cf741894503fb3ead4cb817bca2375e543aa70f7c4d938157b5a6",
+		SpamPowDifficulty:   2,
+		SpamPowHashFunction: "sha3_24_rounds",
+	}, 0, nil)
 
 	// when
 	statusCode, _ := serveHTTP(t, s, signTxRequest(t, payload, headers))
@@ -733,8 +743,13 @@ func testSigningTransactionWithFailedPropagationFails(t *testing.T) {
 	// setup
 	s.auth.EXPECT().VerifyToken(token).Times(1).Return(walletName, nil)
 	s.handler.EXPECT().SignTx(walletName, gomock.Any(), gomock.Any()).Times(1).Return(&commandspb.Transaction{}, nil)
-	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC).Times(1).Return("", assert.AnError)
-	s.nodeForward.EXPECT().LastBlockHeight(gomock.Any()).Times(1).Return(uint64(42), nil)
+	s.nodeForward.EXPECT().SendTx(gomock.Any(), gomock.Any(), api.SubmitTransactionRequest_TYPE_ASYNC, gomock.Any()).Times(1).Return("", assert.AnError)
+	s.nodeForward.EXPECT().LastBlockHeightAndHash(gomock.Any()).Times(1).Return(&api.LastBlockHeightResponse{
+		Height:              42,
+		Hash:                "0292041e2f0cf741894503fb3ead4cb817bca2375e543aa70f7c4d938157b5a6",
+		SpamPowDifficulty:   2,
+		SpamPowHashFunction: "sha3_24_rounds",
+	}, 0, nil)
 
 	// when
 	statusCode, _ := serveHTTP(t, s, signTxRequest(t, payload, headers))
@@ -756,8 +771,13 @@ func testFailedTransactionSigningFails(t *testing.T) {
 	// setup
 	s.auth.EXPECT().VerifyToken(token).Times(1).Return(walletName, nil)
 	s.handler.EXPECT().SignTx(walletName, gomock.Any(), gomock.Any()).Times(1).Return(nil, assert.AnError)
-	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC).Times(0)
-	s.nodeForward.EXPECT().LastBlockHeight(gomock.Any()).Times(1).Return(uint64(42), nil)
+	s.nodeForward.EXPECT().SendTx(gomock.Any(), &commandspb.Transaction{}, api.SubmitTransactionRequest_TYPE_ASYNC, gomock.Any()).Times(0)
+	s.nodeForward.EXPECT().LastBlockHeightAndHash(gomock.Any()).Times(1).Return(&api.LastBlockHeightResponse{
+		Height:              42,
+		Hash:                "0292041e2f0cf741894503fb3ead4cb817bca2375e543aa70f7c4d938157b5a6",
+		SpamPowDifficulty:   2,
+		SpamPowHashFunction: "sha3_24_rounds",
+	}, 0, nil)
 
 	// when
 	statusCode, _ := serveHTTP(t, s, signTxRequest(t, payload, headers))
diff --git a/wallet/handler_test.go b/wallet/handler_test.go
index 18be825..ab85314 100644
--- a/wallet/handler_test.go
+++ b/wallet/handler_test.go
@@ -111,11 +111,9 @@ func testGenerateKeyInExistingWalletSucceeds(t *testing.T) {
 	}
 
 	// setup
-	fakePath := fmt.Sprintf("/path/to/wallets/%s", req.Wallet)
 	store := handlerMocks(t)
 	store.EXPECT().WalletExists(req.Wallet).Times(1).Return(true)
 	store.EXPECT().GetWallet(req.Wallet, req.Passphrase).Times(1).Return(w, nil)
-	store.EXPECT().GetWalletPath(req.Wallet).Times(1).Return(fakePath)
 	store.EXPECT().SaveWallet(gomock.Any(), req.Passphrase).Times(1).Return(nil)
 
 	// when
diff --git a/wallets/handler_test.go b/wallets/handler_test.go
index 0023d9c..d512859 100644
--- a/wallets/handler_test.go
+++ b/wallets/handler_test.go
@@ -1277,7 +1277,7 @@ func testHandlerSigningTxSucceeds(t *testing.T) {
 
 	// then
 	require.NoError(t, err)
-	assert.Equal(t, uint32(1), tx.Version)
+	assert.Equal(t, uint32(2), tx.Version)
 	assert.NotEmpty(t, tx.From)
 	assert.Equal(t, tx.GetPubKey(), pubKey)
 	assert.NotEmpty(t, tx.InputData)