frostfs-node/pkg/morph/client/neofsid/wrapper/client.go
Leonard Lyubich eb26f92678 [#505] neofsid: Implement wrapper over contract client
Implement wrapper over NeoFS ID contact's client which allows to which
allows you to conveniently interact with the contract. Implement
`AccountKeys` method for getting a list of keys by account ID.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-19 13:55:10 +03:00

23 lines
538 B
Go

package neofsid
import (
"github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid"
)
// ClientWrapper is a wrapper over NeoFS ID contract
// client which provides convenient methods for
// working with a contract.
//
// Working ClientWrapper must be created via Wrap.
type ClientWrapper neofsid.Client
// Wrap creates, initializes and returns the ClientWrapper instance.
//
// If c is nil, panic occurs.
func Wrap(c *neofsid.Client) *ClientWrapper {
if c == nil {
panic("neofs ID client is nil")
}
return (*ClientWrapper)(c)
}