frostfscontract

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphabetUpdatePrm

type AlphabetUpdatePrm struct {
	client.InvokePrmOptional
	// contains filtered or unexported fields
}

AlphabetUpdatePrm groups parameters of AlphabetUpdate operation.

func (*AlphabetUpdatePrm) SetID

func (a *AlphabetUpdatePrm) SetID(id []byte)

SetID sets update ID.

func (*AlphabetUpdatePrm) SetPubs

func (a *AlphabetUpdatePrm) SetPubs(pubs keys.PublicKeys)

SetPubs sets new alphabet public keys.

type BindKeysPrm

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

BindKeysPrm groups parameters of BindKeys operation.

func (*BindKeysPrm) SetKeys

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

SetKeys sets a list of public keys in a binary format.

func (*BindKeysPrm) SetOptionalPrm

func (x *BindKeysPrm) SetOptionalPrm(op client.InvokePrmOptional)

SetOptionalPrm sets optional client parameters.

func (*BindKeysPrm) SetScriptHash

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

SetScriptHash sets script hash of the FrostFS account identifier.

type ChequePrm

type ChequePrm struct {
	client.InvokePrmOptional
	// contains filtered or unexported fields
}

ChequePrm groups parameters of Cheque operation.

func (*ChequePrm) SetAmount

func (c *ChequePrm) SetAmount(amount int64)

SetAmount sets amount.

func (*ChequePrm) SetID

func (c *ChequePrm) SetID(id []byte)

SetID sets ID of the cheque.

func (*ChequePrm) SetLock

func (c *ChequePrm) SetLock(lock util.Uint160)

SetLock sets lock.

func (*ChequePrm) SetUser

func (c *ChequePrm) SetUser(user util.Uint160)

SetUser sets user.

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 FrostFS 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 NewFromMorph

func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, opts ...Option) (*Client, error)

NewFromMorph wraps client to work with FrostFS contract.

func (*Client) AlphabetUpdate

func (x *Client) AlphabetUpdate(p AlphabetUpdatePrm) error

AlphabetUpdate update list of alphabet nodes.

func (*Client) BindKeys

func (x *Client) BindKeys(p BindKeysPrm) error

BindKeys binds list of public keys from FrostFS account by script hash.

func (*Client) Cheque

func (x *Client) Cheque(p ChequePrm) error

Cheque invokes `cheque` method of FrostFS contract.

func (*Client) ContractAddress

func (x *Client) ContractAddress() util.Uint160

ContractAddress returns the address of the associated contract.

func (*Client) UnbindKeys

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

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

type Option

type Option func(*opts)

Option allows to set an optional parameter of ClientWrapper.

func AsAlphabet

func AsAlphabet() Option

AsAlphabet returns option to sign main TX of notary requests with client's private key.

Considered to be used by IR nodes only.

func TryNotary

func TryNotary() Option

TryNotary returns option to enable notary invocation tries.

type UnbindKeysPrm

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

UnbindKeysPrm groups parameters of UnbindKeys operation.

func (*UnbindKeysPrm) SetKeys

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

SetKeys sets a list of public keys in a binary format.

func (*UnbindKeysPrm) SetOptionalPrm

func (x *UnbindKeysPrm) SetOptionalPrm(op client.InvokePrmOptional)

SetOptionalPrm sets optional client parameters.

func (*UnbindKeysPrm) SetScriptHash

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

SetScriptHash sets script hash of the FrostFS account identifier.

Jump to

Keyboard shortcuts

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