scclient

package
v0.6.1-alpha.6-prerelease Latest Latest
Warning

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

Go to latest
Published: Apr 6, 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