frostfsid

package
v0.29.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// RPCAddress is an endpoint to connect to neo rpc.
	RPCAddress string

	// Contract is hash of contract or its name in NNS.
	Contract string

	// ProxyContract is hash of proxy contract or its name in NNS to interact with frostfsid.
	ProxyContract string

	// Key is used to interact with frostfsid contract.
	// If this is nil than random key will be generated.
	Key *keys.PrivateKey
}

type FrostFSID

type FrostFSID struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, cfg Config) (*FrostFSID, error)

New creates new FrostfsID contract wrapper that implements auth.FrostFSID interface.

func (*FrostFSID) GetUserAddress

func (f *FrostFSID) GetUserAddress(namespace, name string) (string, error)

func (*FrostFSID) GetUserGroupIDs

func (f *FrostFSID) GetUserGroupIDs(userHash util.Uint160) ([]string, error)

func (*FrostFSID) GetUserKey

func (f *FrostFSID) GetUserKey(account, name string) (string, error)

func (*FrostFSID) RegisterPublicKey

func (f *FrostFSID) RegisterPublicKey(ns string, key *keys.PublicKey) error

func (*FrostFSID) ValidatePublicKey

func (f *FrostFSID) ValidatePublicKey(key *keys.PublicKey) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL