contract

package
v0.30.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: AGPL-3.0 Imports: 8 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) CreateSubject

func (f *FrostFSID) CreateSubject(namespace string, key *keys.PublicKey) (util.Uint256, uint32, error)

func (*FrostFSID) GetSubjectExtended

func (f *FrostFSID) GetSubjectExtended(userHash util.Uint160) (*client.SubjectExtended, error)

func (*FrostFSID) GetSubjectKeyByName

func (f *FrostFSID) GetSubjectKeyByName(namespace, name string) (*keys.PublicKey, error)

func (*FrostFSID) Wait

func (f *FrostFSID) Wait(tx util.Uint256, vub uint32, err error) error

Jump to

Keyboard shortcuts

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