comm

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2017-2018 OneLedger

Cover over the Tendermint client handling.

TODO: Make this generic to handle HTTP and local clients

Cover over the arguments of client requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block added in v0.7.1

func Block(height int64) (res *ctypes.ResultBlock)

func Broadcast

func Broadcast(packet []byte) *ctypes.ResultBroadcastTxCommit

A sync'ed broadcast to the chain that waits for the commit to happen

func BroadcastAsync added in v0.6.1

func BroadcastAsync(packet []byte) *ctypes.ResultBroadcastTx

An async Broadcast to the chain

func BroadcastSync added in v0.6.2

func BroadcastSync(packet []byte) *ctypes.ResultBroadcastTx

A sync'ed broadcast to the chain that waits for the commit to happen

func GetClient

func GetClient() (client rpcclient.Client)

HTTP interface, allows Broadcast? TODO: Want to switch client type, based on config or cli args.

func IsError added in v0.6.2

func IsError(result interface{}) *string

func NewAppClient

func NewAppClient() client.Client

Generic Client interface, allows SetOption

func NewSDKClient added in v0.7.1

func NewSDKClient() pb.SDKClient

func Query

func Query(path string, packet []byte) interface{}

Send a very specific query

func Register added in v0.7.1

func Register(base []byte)

Register the request

func SDKRequest added in v0.7.1

func SDKRequest(base interface{}) interface{}

Register the request

func Search(query string, prove bool, page, perPage int) (res *ctypes.ResultTxSearch)

func SetOption

func SetOption(key string, value string)

Set an option in the ABCi app directly

func StopClient added in v0.8.1

func StopClient()

func Tx added in v0.7.0

func Tx(hash []byte, prove bool) (res *ctypes.ResultTx)

Types

type ApplyValidatorArguments added in v0.7.1

type ApplyValidatorArguments struct {
	Id     string
	Amount float64
	Purge  bool
}

type ExSendArguments added in v0.8.0

type ExSendArguments struct {
	SenderId        string
	ReceiverId      string
	SenderAddress   string
	ReceiverAddress string
	Currency        string
	Amount          float64

	Gas int64
	Fee float64

	Chain string
	ExGas string
	ExFee string
}

type SendArguments added in v0.8.0

type SendArguments struct {
	Party        string
	CounterParty string
	Currency     string
	Amount       float64
	Fee          float64
}

type SwapArguments added in v0.8.0

type SwapArguments struct {
	Party        string
	CounterParty string
	Amount       float64
	Currency     string
	Exchange     float64
	Excurrency   string
	Nonce        int64

	Fee float64
	Gas int64
}

Jump to

Keyboard shortcuts

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