client

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BurnProof

func BurnProof(param string) string

func CreateAccount

func CreateAccount(secret string) string

* input : a big number hex string or empty string. * output: {'x':”, 'y':{'gx':”, 'gy':”}}

func ReadBalance

func ReadBalance(param string) int

func Shuffle

func Shuffle(param string) string

func Sign

func Sign(input string) string

func Some

func Some(accounts [][2]core.Point) bool

func TransferProof

func TransferProof(param string) string

func TxBurn added in v0.0.2

func TxBurn(param string) string

func TxFund added in v0.0.2

func TxFund(param string) string

func TxRegister added in v0.0.2

func TxRegister(param string) string

func TxSimulateAccounts added in v0.0.5

func TxSimulateAccounts(param string) string

func TxTransfer added in v0.0.2

func TxTransfer(param string) string

Types

type APIResponse added in v0.0.2

type APIResponse struct {
	Data string `json:"data"`
}

type BurnProofParam

type BurnProofParam struct {
	Accounts []types.Point `json:"accounts"`
	Epoch    int           `json:"epoch"`
	Value    int           `json:"value"`
	Diff     int           `json:"diff"`
	SK       string        `json:"sk"`
	Y        types.Point   `json:"y"`
	Sender   string        `json:"sender"`
}

type ReadBalanceParam

type ReadBalanceParam struct {
	CL types.Point `json:"CL"`
	CR types.Point `json:"CR"`
	X  string      `json:"x"`
}

* input: param is json string, {”}

type ShuffleParam

type ShuffleParam struct {
	Self   types.Point   `json:"self"`
	Friend types.Point   `json:"friend"`
	Decoys []types.Point `json:"decoys"`
}
  • input: {'self':{'gx':”, 'gy':”}, 'friend':{'gx':”, 'gy':”}, 'decoys':[ {'gx':”, 'gy':”}, {'gx':”, 'gy':”}]} output: { 'y': [ {'gx':”, 'gy':”}, {'gx':”, 'gy':”},....], 'index':[10, 20]}

type SignParam

type SignParam struct {
	ZSCAddr   string       `json:"address"`
	Accounter core.Account `json:"account"`
	Random    string       `json:"random"`
}
  • input: zscAddress : zsc contract address string, account : account json string. {'x':”, 'y': {'gx':”, 'gy':”}}
  • output: json string, content is big number hex string. {'c':”, 's':”}

type TransferProofParam

type TransferProofParam struct {
	Epoch    int              `json:"epoch"`
	Value    int              `json:"value"`
	Diff     int              `json:"diff"`
	SK       string           `json:"sk"`
	Y        []types.Point    `json:"y"`
	Index    []int            `json:"index"`
	Accounts [][2]types.Point `json:"accounts"`
}

type TxBurnParam added in v0.0.2

type TxBurnParam struct {
	Y     types.Point `json:"y"`
	B     uint64      `json:"value"`
	U     types.Point `json:"u"`
	Proof string      `json:"proof"`
}

type TxFundParam added in v0.0.2

type TxFundParam struct {
	Y types.Point `json:"y"`
	B uint64      `json:"b"`
}

type TxRegisterParam added in v0.0.2

type TxRegisterParam struct {
	Y types.Point `json:"y"`
	C string      `json:"c"`
	S string      `json:"s"`
}

type TxSimulateAccountsParam added in v0.0.5

type TxSimulateAccountsParam struct {
	Y     []types.Point `json:"y"`
	Epoch uint64        `json:"epoch"`
}

type TxTransferParam added in v0.0.2

type TxTransferParam struct {
	C     []types.Point `json:"C"`
	D     types.Point   `json:"D"`
	U     types.Point   `json:"u"`
	Y     []types.Point `json:"y"`
	Proof string        `json:"proof"`
}

Jump to

Keyboard shortcuts

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