sdk

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RSASignerType = "RSASigner"
	EccSignerType = "EccSigner"
)

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(haloURL string) *Client

func (*Client) GetInfo

func (c *Client) GetInfo() (info schema.InfoRes, err error)

func (*Client) GetTx added in v0.0.2

func (c *Client) GetTx(haloHash string) (haloTx *schema.HaloTransaction, err error)

func (*Client) SubmitTx

func (c *Client) SubmitTx(tx hvmSchema.Transaction) (everhash string, err error)

type SDK

type SDK struct {
	HaloAddr string

	AccId string
	Cli   *Client
	// contains filtered or unexported fields
}

func New

func New(signer interface{}, haloUrl string) (*SDK, error)

func (*SDK) Join

func (s *SDK) Join(routerState schema.RouterState) (*schema.Transaction, error)

func (*SDK) Leave

func (s *SDK) Leave() (*schema.Transaction, error)

func (*SDK) Sign

func (s *SDK) Sign(msg string) (string, error)

func (*SDK) Stake

func (s *SDK) Stake(stakePool, amount string) (*schema.Transaction, error)

func (*SDK) Transfer

func (s *SDK) Transfer(to, amount string) (*schema.Transaction, error)

func (*SDK) Unstake

func (s *SDK) Unstake(stakePool, amount string) (*schema.Transaction, error)

Jump to

Keyboard shortcuts

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