sdk

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MPL-2.0 Imports: 18 Imported by: 3

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 NewClient

func NewClient(hmxURL string) *Client

func (*Client) BalanceOf

func (c *Client) BalanceOf(accid string) (amt *big.Int, err error)

func (*Client) Callback added in v0.1.1

func (c *Client) Callback(targetURL string) (res string, err error)

func (*Client) Close

func (c *Client) Close()

func (*Client) GetAssignByMessage

func (c *Client) GetAssignByMessage(msgid string) (item goarSchema.BundleItem, err error)

func (*Client) GetAssignByNonce

func (c *Client) GetAssignByNonce(pid string, nonce int64) (item goarSchema.BundleItem, err error)

func (*Client) GetMessage

func (c *Client) GetMessage(msgid string) (item goarSchema.BundleItem, err error)

func (*Client) GetMessageByNonce

func (c *Client) GetMessageByNonce(pid string, nonce int64) (item goarSchema.BundleItem, err error)

func (*Client) GetResult

func (c *Client) GetResult(pid, msgid string) (result vmmSchema.Result, err error)

func (*Client) GetResults

func (c *Client) GetResults(pid string, limit int64) (results serverSchema.ResponseResults, err error)

func (*Client) Info

func (c *Client) Info() (info nodeSchema.Info, err error)

func (*Client) Send

func (c *Client) Send(itemBin []byte) (res *serverSchema.Response, redirectedURL string, err error)

func (*Client) StakeOf

func (c *Client) StakeOf(accid string) (amt *big.Int, err error)

type SDK

type SDK struct {
	Bundler *goar.Bundler
	Client  *Client
}

func New

func New(nodeURL, keyPath string) *SDK

func NewFromBundler

func NewFromBundler(nodeURL string, bundler *goar.Bundler) *SDK

func (*SDK) Close

func (s *SDK) Close()

func (*SDK) GenerateModule

func (s *SDK) GenerateModule(moduleBytes []byte, module schema.Module) (item goarSchema.BundleItem, err error)

func (*SDK) GetAddress

func (s *SDK) GetAddress() string

func (*SDK) ResultAndWait

func (s *SDK) ResultAndWait(pid, msgid string) (result vmmSchema.Result, err error)

func (*SDK) Send

func (s *SDK) Send(processId, data string, tags []goarSchema.Tag) (res *serverSchema.Response, redirectedURL string, err error)

func (*SDK) SendAndWait

func (s *SDK) SendAndWait(processId, data string, tags []goarSchema.Tag) (res *serverSchema.Response, err error)

func (*SDK) SendMessage

func (s *SDK) SendMessage(target, data string, params []goarSchema.Tag) (resp *serverSchema.Response, err error)

Send message to process

func (*SDK) SendMessageAndWait

func (s *SDK) SendMessageAndWait(target, data string, params []goarSchema.Tag) (*serverSchema.Response, error)

func (*SDK) Spawn

func (s *SDK) Spawn(module, scheduler string, params []goarSchema.Tag) (resp *serverSchema.Response, err error)

Spawn for process creation

func (*SDK) SpawnAndWait

func (s *SDK) SpawnAndWait(module, scheduler string, params []goarSchema.Tag) (*serverSchema.Response, error)

Jump to

Keyboard shortcuts

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