scclient

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SCClient

type SCClient struct {
	ChainClient   *chainclient.Client
	ContractHname isc.Hname
}

SCClient allows to send webapi requests targeted to a specific contract

func New

func New(
	chainClient *chainclient.Client,
	contractHname isc.Hname,
) *SCClient

New creates a new SCClient

func (*SCClient) CallView

func (c *SCClient) CallView(functionName string, args dict.Dict, optimisticReadTimeout ...time.Duration) (dict.Dict, error)

func (*SCClient) PostNRequests added in v0.3.0

func (c *SCClient) PostNRequests(fname string, n int, params ...chainclient.PostRequestParams) ([]*iotago.Transaction, error)

func (*SCClient) PostOffLedgerRequest added in v0.2.0

func (c *SCClient) PostOffLedgerRequest(fname string, params ...chainclient.PostRequestParams) (isc.OffLedgerRequest, error)

func (*SCClient) PostRequest

func (c *SCClient) PostRequest(fname string, params ...chainclient.PostRequestParams) (*iotago.Transaction, error)

func (*SCClient) StateGet added in v0.2.0

func (c *SCClient) StateGet(key string) ([]byte, error)

StateGet fetches the raw value associated with the given key in the smart contract state

Jump to

Keyboard shortcuts

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