scclient

package
v1.0.1-rc.14 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

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(context context.Context, functionName string, args dict.Dict) (dict.Dict, error)

func (*SCClient) PostNRequests

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

func (*SCClient) PostOffLedgerRequest

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

func (c *SCClient) StateGet(ctx context.Context, 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