commands

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2017 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripHex

func StripHex(s string) string

Types

type AccountPresenter

type AccountPresenter struct{}

func (AccountPresenter) MakeKey

func (_ AccountPresenter) MakeKey(str string) ([]byte, error)

func (AccountPresenter) ParseData

func (_ AccountPresenter) ParseData(raw []byte) (interface{}, error)

type AppFlags

type AppFlags struct {
	Fee      string
	Gas      int64
	Amount   string
	Sequence int
}

func AppFlagSet

func AppFlagSet() (*flag.FlagSet, AppFlags)

type AppTx

type AppTx struct {
	Tx *bc.AppTx
	// contains filtered or unexported fields
}

func (*AppTx) Sign

func (s *AppTx) Sign(pubkey crypto.PubKey, sig crypto.Signature) error

Sign will add a signature and pubkey.

Depending on the Signable, one may be able to call this multiple times for multisig Returns error if called with invalid data or too many times

func (*AppTx) SignBytes

func (s *AppTx) SignBytes() []byte

SignBytes returned the unsigned bytes, needing a signature

func (*AppTx) Signers

func (s *AppTx) Signers() ([]crypto.PubKey, error)

Signers will return the public key(s) that signed if the signature is valid, or an error if there is any issue with the signature, including if there are no signatures

func (*AppTx) TxBytes

func (s *AppTx) TxBytes() ([]byte, error)

TxBytes returns the transaction data as well as all signatures It should return an error if Sign was never called

type AppTxReader

type AppTxReader struct {
	ChainID string
}

AppTxReader allows us to create AppTx

func (AppTxReader) ReadTxFlags

func (t AppTxReader) ReadTxFlags(data *AppFlags, app string, appData []byte, pk crypto.PubKey) (interface{}, error)

func (AppTxReader) ReadTxJSON

func (t AppTxReader) ReadTxJSON(data []byte, pk crypto.PubKey) (interface{}, error)

type BaseTxPresenter

type BaseTxPresenter struct {
	proofs.RawPresenter // this handles MakeKey as hex bytes
}

func (BaseTxPresenter) ParseData

func (_ BaseTxPresenter) ParseData(raw []byte) (interface{}, error)

type SendFlags

type SendFlags struct {
	To       string
	Amount   string
	Fee      string
	Gas      int64
	Sequence int
}

type SendTx

type SendTx struct {
	Tx *bc.SendTx
	// contains filtered or unexported fields
}

func (*SendTx) Sign

func (s *SendTx) Sign(pubkey crypto.PubKey, sig crypto.Signature) error

Sign will add a signature and pubkey.

Depending on the Signable, one may be able to call this multiple times for multisig Returns error if called with invalid data or too many times

func (*SendTx) SignBytes

func (s *SendTx) SignBytes() []byte

SignBytes returned the unsigned bytes, needing a signature

func (*SendTx) Signers

func (s *SendTx) Signers() ([]crypto.PubKey, error)

Signers will return the public key(s) that signed if the signature is valid, or an error if there is any issue with the signature, including if there are no signatures

func (*SendTx) TxBytes

func (s *SendTx) TxBytes() ([]byte, error)

TxBytes returns the transaction data as well as all signatures It should return an error if Sign was never called

type SendTxMaker

type SendTxMaker struct{}

func (SendTxMaker) Flags

func (m SendTxMaker) Flags() (*flag.FlagSet, interface{})

func (SendTxMaker) MakeReader

func (m SendTxMaker) MakeReader() (lightclient.TxReader, error)

type SendTxReader

type SendTxReader struct {
	ChainID string
}

SendTXReader allows us to create SendTx

func (SendTxReader) ReadTxFlags

func (t SendTxReader) ReadTxFlags(flags interface{}, pk crypto.PubKey) (interface{}, error)

func (SendTxReader) ReadTxJSON

func (t SendTxReader) ReadTxJSON(data []byte, pk crypto.PubKey) (interface{}, error)

Jump to

Keyboard shortcuts

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