forked from TrueCloudLab/frostfs-node
eb26f92678
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>
23 lines
538 B
Go
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)
|
|
}
|