contract

package
v0.31.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 9 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

	// Waiter contains options for awaiting blockchain transactions
	// submitted via the contract client.
	Waiter commonclient.WaiterOptions
}

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) SetSubjectName added in v0.30.0

func (f *FrostFSID) SetSubjectName(key *keys.PublicKey, name string) (util.Uint256, uint32, 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