neofscontract

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindKeysArgs

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

BindKeysArgs groups the arguments of key binding call.

func (*BindKeysArgs) SetKeys

func (x *BindKeysArgs) SetKeys(v [][]byte)

SetKeys sets list of public keys in a binary format.

func (*BindKeysArgs) SetScriptHash

func (x *BindKeysArgs) SetScriptHash(v []byte)

SetScriptHash sets script hash of the NeoFS account identifier.

type Client

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

Client is a wrapper over StaticClient which makes calls with the names and arguments of the NeoFS contract.

Working client must be created via constructor New. Using the Client that has been created with new(Client) expression (or just declaring a Client variable) is unsafe and can lead to panic.

func New

func New(c *client.StaticClient, opts ...Option) *Client

New creates, initializes and returns the Client instance.

If StaticClient is nil, panic occurs.

Other values are set according to provided options, or by default:

  • key binding method name: bind;
  • key unbinding method name: unbind;

If desired option satisfies the default value, it can be omitted. If multiple options of the same config value are supplied, the option with the highest index in the arguments will be used.

func (*Client) AlphabetUpdate added in v0.22.0

func (x *Client) AlphabetUpdate(id []byte, pubs keys.PublicKeys) error

AlphabetUpdate update list of alphabet nodes.

func (*Client) BindKeys

func (x *Client) BindKeys(args BindKeysArgs) error

BindKeys invokes the call of key binding method of NeoFS contract.

func (*Client) Cheque added in v0.22.0

func (x *Client) Cheque(id []byte, user util.Uint160, amount int64, lock util.Uint160) error

Cheque invokes `cheque` method of NeoFS contract.

func (*Client) UnbindKeys

func (x *Client) UnbindKeys(args UnbindKeysArgs) error

UnbindKeys invokes the call of key unbinding method of NeoFS contract.

type Option

type Option func(*cfg)

Option is a client configuration change function.

func WithBindKeysMethod

func WithBindKeysMethod(n string) Option

WithBindKeysMethod returns a client constructor option that specifies the method name of key binding operation.

Ignores empty value.

func WithUnbindKeysMethod

func WithUnbindKeysMethod(n string) Option

WithUnbindKeysMethod returns a client constructor option that specifies the method name of key unbinding operation.

Ignores empty value.

type UnbindKeysArgs

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

UnbindKeysArgs groups the arguments of key unbinding call.

func (*UnbindKeysArgs) SetKeys

func (x *UnbindKeysArgs) SetKeys(v [][]byte)

SetKeys sets list of public keys in a binary format.

func (*UnbindKeysArgs) SetScriptHash

func (x *UnbindKeysArgs) SetScriptHash(v []byte)

SetScriptHash sets script hash of the NeoFS account identifier.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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