rpc

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RpcRemote       = "http://0.0.0.0:26657"
	DryRun          = false
	AddressByteSize = 20

	TxBroadcastOption string
)

Functions

func ABCIQuery

func ABCIQuery(path string, queryData interface{}) ([]byte, error)

func QueryAddressIncentive added in v1.2.0

func QueryAddressIncentive(address string) ([]byte, error)

func QueryAppConfig added in v1.3.0

func QueryAppConfig() ([]byte, error)

func QueryBalance

func QueryBalance(udc uint32, address string) ([]byte, error)

func QueryBlockIncentive added in v1.2.0

func QueryBlockIncentive(height string) ([]byte, error)

func QueryDelegate

func QueryDelegate(address string) ([]byte, error)

func QueryDraft added in v1.4.1

func QueryDraft(draftID string) ([]byte, error)

func QueryIncentive added in v1.2.0

func QueryIncentive(height string, address string) ([]byte, error)

func QueryParcel

func QueryParcel(parcelID string) ([]byte, error)

func QueryRequest

func QueryRequest(buyer string, target string) ([]byte, error)

func QueryStake

func QueryStake(address string) ([]byte, error)

func QueryStorage added in v1.4.1

func QueryStorage(storageID string) ([]byte, error)

func QueryUsage

func QueryUsage(buyer string, target string) ([]byte, error)

func QueryVote added in v1.4.1

func QueryVote(draftID, address string) ([]byte, error)

Types

type ABCIQueryParams

type ABCIQueryParams struct {
	Path   string `json:"path"`
	Data   string `json:"data"`
	Height string `json:"height"`
	Prove  bool   `json:"prove"`
}

type ABCIQueryResponse

type ABCIQueryResponse struct {
	Log   string `json:"log"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

type BroadcastParams

type BroadcastParams struct {
	Tx []byte `json:"tx"`
}

type TmQueryResult

type TmQueryResult struct {
	Response ABCIQueryResponse `json:"response"`
}

XXX: Weired, but tendermint does this anyway

type TmStatusResult

type TmStatusResult struct {
	NodeInfo      json.RawMessage `json:"node_info"`
	SyncInfo      json.RawMessage `json:"sync_info"`
	ValidatorInfo json.RawMessage `json:"validator_info"`
}

func NodeStatus

func NodeStatus() (TmStatusResult, error)

type TmTxResult

type TmTxResult struct {
	CheckTx struct {
		Code int64  `json:"code,omitempty"`
		Info string `json:"info,omitempty"`
	} `json:"check_tx"`
	DeliverTx struct {
		Code int64  `json:"code,omitempty"`
		Info string `json:"info,omitempty"`
	} `json:"deliver_tx"`
	Hash   string `json:"hash"`
	Height string `json:"height"` // number as a string
}

func BroadcastTx

func BroadcastTx(tx []byte) (TmTxResult, error)

func Cancel

func Cancel(target string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Close added in v1.4.1

func Close(storageID string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Delegate

func Delegate(to, amount string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Discard

func Discard(target string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Grant

func Grant(target, grantee, custody, extra string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Propose added in v1.4.1

func Propose(draftID, config, desc string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Register

func Register(target, custody, proxy, extra string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Request

func Request(target, payment, extra string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Retract

func Retract(amount string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Revoke

func Revoke(target, grantee string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Setup added in v1.4.1

func Setup(storageID, url, regFee, hostFee string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func SignSendTx

func SignSendTx(txType string, payload interface{}, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Stake

func Stake(validator, amount string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Transfer

func Transfer(udc uint32, to, amount string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Vote added in v1.4.1

func Vote(draftID string, approve bool, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

func Withdraw

func Withdraw(amount string, key keys.KeyEntry, fee, lastHeight string) (TmTxResult, error)

type TxSig

type TxSig struct {
	Pubkey   string `json:"pubkey"`
	SigBytes string `json:"sig_bytes"`
}

type TxToSend

type TxToSend struct {
	Type       string          `json:"type"`
	Sender     string          `json:"sender"`
	Fee        string          `json:"fee"`
	LastHeight string          `json:"last_height"`
	Payload    json.RawMessage `json:"payload"`
	Signature  TxSig           `json:"signature"`
}

type TxToSign

type TxToSign struct {
	Type       string          `json:"type"`
	Sender     string          `json:"sender"`
	Fee        string          `json:"fee"`
	LastHeight string          `json:"last_height"`
	Payload    json.RawMessage `json:"payload"`
}

Jump to

Keyboard shortcuts

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