frostfs-node/cmd/neofs-node/session.go
Evgenii Stratonikov 3f07313604 [#562] cmd/neofs-node: use NEP-6 wallet for keys
Also use neo-go private key wrapper where possible, as it
already has methods for (un)marshaling.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-15 14:49:59 +03:00

26 lines
672 B
Go

package main
import (
sessionGRPC "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
sessionTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/session/grpc"
sessionSvc "github.com/nspcc-dev/neofs-node/pkg/services/session"
"github.com/nspcc-dev/neofs-node/pkg/services/session/storage"
)
func initSessionService(c *cfg) {
c.privateTokenStore = storage.New()
sessionGRPC.RegisterSessionServiceServer(c.cfgGRPC.server,
sessionTransportGRPC.New(
sessionSvc.NewSignService(
&c.key.PrivateKey,
sessionSvc.NewResponseService(
sessionSvc.NewExecutionService(
c.privateTokenStore,
),
c.respSvc,
),
),
),
)
}