contract

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

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

New creates new Policy contract wrapper.

func (*Client) AddChain

func (c *Client) AddChain(kind policycontract.Kind, entity string, name []byte, chain []byte) (util.Uint256, uint32, error)

func (*Client) GetChain

func (c *Client) GetChain(kind policycontract.Kind, entity string, name []byte) ([]byte, error)

func (*Client) ListChains

func (c *Client) ListChains(kind policycontract.Kind, entity string, name []byte) ([][]byte, error)

func (*Client) RemoveChain

func (c *Client) RemoveChain(kind policycontract.Kind, entity string, name []byte) (util.Uint256, uint32, error)

func (*Client) SendTx

func (c *Client) SendTx(mtx policy.MultiTransaction) error

func (*Client) StartTx

func (c *Client) StartTx() policy.MultiTransaction

func (*Client) Wait

func (c *Client) Wait(tx util.Uint256, vub uint32, err error) error

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 policy.
	ProxyContract string

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

Jump to

Keyboard shortcuts

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