types

package
v0.0.0-...-9259d71 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRawTx

func CreateRawTx(cmd *cobra.Command, to string, amount float64, note string, isWithdraw bool, tokenSymbol, execName string) (string, error)

func FormatAmountDisplay2Value

func FormatAmountDisplay2Value(amount float64) int64

FormatAmountDisplay2Value 将显示、输入的amount值格式话成传输、计算值

func FormatAmountValue2Display

func FormatAmountValue2Display(amount int64) string

FormatAmountValue2Display 将传输、计算的amount值格式化成显示值

func GetAmountValue

func GetAmountValue(cmd *cobra.Command, field string) int64

GetAmountValue 将命令行中的amount值转换成int64

func GetExecAddr

func GetExecAddr(exec string) (string, error)

func SendToAddress

func SendToAddress(rpcAddr string, from string, to string, amount int64, note string, isToken bool, tokenSymbol string, isWithdraw bool)

Types

type AccountResult

type AccountResult struct {
	Currency int32  `json:"currency,omitempty"`
	Balance  string `json:"balance,omitempty"`
	Frozen   string `json:"frozen,omitempty"`
	Addr     string `json:"addr,omitempty"`
}

func DecodeAccount

func DecodeAccount(acc *types.Account, precision int64) *AccountResult

type AccountsResult

type AccountsResult struct {
	Wallets []*WalletResult `json:"wallets"`
}

type AddrOverviewResult

type AddrOverviewResult struct {
	Receiver string `json:"receiver"`
	Balance  string `json:"balance"`
	TxCount  int64  `json:"txCount"`
}

type AllExecBalance

type AllExecBalance struct {
	Addr        string         `json:"addr"`
	ExecAccount []*ExecAccount `json:"execAccount"`
}

type BlockDetailResult

type BlockDetailResult struct {
	Block    *BlockResult                  `json:"block"`
	Receipts []*rpctypes.ReceiptDataResult `json:"receipts"`
}

type BlockDetailsResult

type BlockDetailsResult struct {
	Items []*BlockDetailResult `json:"items"`
}

type BlockResult

type BlockResult struct {
	Version    int64       `json:"version"`
	ParentHash string      `json:"parenthash"`
	TxHash     string      `json:"txhash"`
	StateHash  string      `json:"statehash"`
	Height     int64       `json:"height"`
	BlockTime  int64       `json:"blocktime"`
	Txs        []*TxResult `json:"txs"`
}

type CoinsGenesisCLI

type CoinsGenesisCLI struct {
	Amount        string `json:"amount,omitempty"`
	ReturnAddress string `json:"returnAddress,omitempty"`
}

type CoinsTransferCLI

type CoinsTransferCLI struct {
	Cointoken string `json:"cointoken,omitempty"`
	Amount    string `json:"amount,omitempty"`
	Note      string `json:"note,omitempty"`
	To        string `json:"to,omitempty"`
}

decodetx

type CoinsTransferToExecCLI

type CoinsTransferToExecCLI struct {
	Cointoken string `json:"cointoken,omitempty"`
	Amount    string `json:"amount,omitempty"`
	Note      string `json:"note,omitempty"`
	ExecName  string `json:"execName,omitempty"`
	To        string `json:"to,omitempty"`
}

type CoinsWithdrawCLI

type CoinsWithdrawCLI struct {
	Cointoken string `json:"cointoken,omitempty"`
	Amount    string `json:"amount,omitempty"`
	Note      string `json:"note,omitempty"`
	ExecName  string `json:"execName,omitempty"`
	To        string `json:"to,omitempty"`
}

type ExecAccount

type ExecAccount struct {
	Execer  string         `json:"execer"`
	Account *AccountResult `json:"account"`
}

type ExecBalance

type ExecBalance struct {
	ExecAddr string `json:"execAddr,omitempty"`
	Frozen   string `json:"frozen"`
	Active   string `json:"active"`
}

type GetExecBalanceResult

type GetExecBalanceResult struct {
	Amount       string         `json:"totalAmount"`
	AmountFrozen string         `json:"frozenAmount"`
	AmountActive string         `json:"activeAmount"`
	ExecBalances []*ExecBalance `json:"execBalances,omitempty"`
}

type GetTicketMinerInfoResult

type GetTicketMinerInfoResult struct {
	TicketId     string `json:"ticketId"`
	Status       string `json:"status"`
	PrevStatus   string `json:"prevStatus"`
	IsGenesis    bool   `json:"isGenesis"`
	CreateTime   string `json:"createTime"`
	MinerTime    string `json:"minerTime"`
	CloseTime    string `json:"closeTime"`
	MinerValue   int64  `json:"minerValue,omitempty"`
	MinerAddress string `json:"minerAddress,omitempty"`
}

type GetTicketStatisticResult

type GetTicketStatisticResult struct {
	CurrentOpenCount int64 `json:"currentOpenCount"`
	TotalMinerCount  int64 `json:"totalMinerCount"`
	TotalCloseCount  int64 `json:"totalCloseCount"`
}

type GetTotalCoinsResult

type GetTotalCoinsResult struct {
	TxCount          int64  `json:"txCount"`
	AccountCount     int64  `json:"accountCount"`
	TotalAmount      string `json:"totalAmount"`
	ActualAmount     string `json:"actualAmount,omitempty"`
	DifferenceAmount string `json:"differenceAmount,omitempty"`
}

type HashlockLockCLI

type HashlockLockCLI struct {
	Amount        string `json:"amount,omitempty"`
	Time          int64  `json:"time,omitempty"`
	Hash          []byte `json:"hash,omitempty"`
	ToAddress     string `json:"toAddress,omitempty"`
	ReturnAddress string `json:"returnAddress,omitempty"`
}

type KeyInput

type KeyInput struct {
	Amount          string             `json:"amount,omitempty"`
	UtxoGlobalIndex []*UTXOGlobalIndex `json:"utxoGlobalIndex,omitempty"`
	KeyImage        string             `json:"keyImage,omitempty"`
}

type KeyOutput

type KeyOutput struct {
	Amount        string `json:"amount,omitempty"`
	Onetimepubkey string `json:"onetimepubkey,omitempty"`
}

privacy output

type Privacy2PrivacyCLI

type Privacy2PrivacyCLI struct {
	Tokenname string         `json:"tokenname,omitempty"`
	Amount    string         `json:"amount,omitempty"`
	Note      string         `json:"note,omitempty"`
	Input     *PrivacyInput  `json:"input,omitempty"`
	Output    *PrivacyOutput `json:"output,omitempty"`
}

type Privacy2PublicCLI

type Privacy2PublicCLI struct {
	Tokenname string         `json:"tokenname,omitempty"`
	Amount    string         `json:"amount,omitempty"`
	Note      string         `json:"note,omitempty"`
	Input     *PrivacyInput  `json:"input,omitempty"`
	Output    *PrivacyOutput `json:"output,omitempty"`
}

type PrivacyInput

type PrivacyInput struct {
	Keyinput []*KeyInput `json:"keyinput,omitempty"`
}

type PrivacyOutput

type PrivacyOutput struct {
	RpubKeytx string       `protobuf:"bytes,1,opt,name=RpubKeytx,proto3" json:"RpubKeytx,omitempty"`
	Keyoutput []*KeyOutput `protobuf:"bytes,2,rep,name=keyoutput" json:"keyoutput,omitempty"`
}

type Public2PrivacyCLI

type Public2PrivacyCLI struct {
	Tokenname string         `json:"tokenname,omitempty"`
	Amount    string         `json:"amount,omitempty"`
	Note      string         `json:"note,omitempty"`
	Output    *PrivacyOutput `json:"output,omitempty"`
}

type ReceiptAccountTransfer

type ReceiptAccountTransfer struct {
	Prev    *AccountResult `protobuf:"bytes,1,opt,name=prev" json:"prev,omitempty"`
	Current *AccountResult `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
}

type ReceiptExecAccountTransfer

type ReceiptExecAccountTransfer struct {
	ExecAddr string         `protobuf:"bytes,1,opt,name=execAddr" json:"execAddr,omitempty"`
	Prev     *AccountResult `protobuf:"bytes,2,opt,name=prev" json:"prev,omitempty"`
	Current  *AccountResult `protobuf:"bytes,3,opt,name=current" json:"current,omitempty"`
}

type ReceiptPrivacyOutput

type ReceiptPrivacyOutput struct {
	Token     string       `json:"token,omitempty"`
	Keyoutput []*KeyOutput `json:"keyoutput,omitempty"`
}

type TicketMinerCLI

type TicketMinerCLI struct {
	Bits     uint32 `json:"bits,omitempty"`
	Reward   string `json:"reward,omitempty"`
	TicketId string `json:"ticketId,omitempty"`
	Modify   []byte `json:"modify,omitempty"`
}

type TokenAccountResult

type TokenAccountResult struct {
	Token    string `json:"Token,omitempty"`
	Currency int32  `json:"currency,omitempty"`
	Balance  string `json:"balance,omitempty"`
	Frozen   string `json:"frozen,omitempty"`
	Addr     string `json:"addr,omitempty"`
}

type TokenPreCreateCLI

type TokenPreCreateCLI struct {
	Name         string `json:"name,omitempty"`
	Symbol       string `json:"symbol,omitempty"`
	Introduction string `json:"introduction,omitempty"`
	Total        int64  `json:"total,omitempty"`
	Price        string `json:"price,omitempty"`
	Owner        string `json:"owner,omitempty"`
}

type TxDetailResult

type TxDetailResult struct {
	Tx         *TxResult                   `json:"tx"`
	Receipt    *rpctypes.ReceiptDataResult `json:"receipt"`
	Proofs     []string                    `json:"proofs,omitempty"`
	Height     int64                       `json:"height"`
	Index      int64                       `json:"index"`
	Blocktime  int64                       `json:"blocktime"`
	Amount     string                      `json:"amount"`
	Fromaddr   string                      `json:"fromaddr"`
	ActionName string                      `json:"actionname"`
	Assets     []*types.Asset              `json:"assets"`
}

type TxDetailsResult

type TxDetailsResult struct {
	Txs []*TxDetailResult `json:"txs"`
}

type TxListResult

type TxListResult struct {
	Txs []*TxResult `json:"txs"`
}

type TxResult

type TxResult struct {
	Execer     string              `json:"execer"`
	Payload    interface{}         `json:"payload"`
	RawPayload string              `json:"rawpayload"`
	Signature  *rpctypes.Signature `json:"signature"`
	Fee        string              `json:"fee"`
	Expire     int64               `json:"expire"`
	Nonce      int64               `json:"nonce"`
	To         string              `json:"to"`
	Amount     string              `json:"amount,omitempty"`
	From       string              `json:"from,omitempty"`
	GroupCount int32               `json:"groupCount,omitempty"`
	Header     string              `json:"header,omitempty"`
	Next       string              `json:"next,omitempty"`
}

func DecodeTransaction

func DecodeTransaction(tx *rpctypes.Transaction) *TxResult

type UTXOGlobalIndex

type UTXOGlobalIndex struct {
	// Height   int64  `json:"height,omitempty"`
	// Txindex  int32  `json:"txindex,omitempty"`
	Outindex int32  `json:"outindex,omitempty"`
	Txhash   string `json:"txhash,omitempty"`
}

type WalletResult

type WalletResult struct {
	Acc   *AccountResult `json:"acc,omitempty"`
	Label string         `json:"label,omitempty"`
}

type WalletTxDetailResult

type WalletTxDetailResult struct {
	Tx         *TxResult                   `json:"tx"`
	Receipt    *rpctypes.ReceiptDataResult `json:"receipt"`
	Height     int64                       `json:"height"`
	Index      int64                       `json:"index"`
	Blocktime  int64                       `json:"blocktime"`
	Amount     string                      `json:"amount"`
	Fromaddr   string                      `json:"fromaddr"`
	Txhash     string                      `json:"txhash"`
	ActionName string                      `json:"actionname"`
}

type WalletTxDetailsResult

type WalletTxDetailsResult struct {
	TxDetails []*WalletTxDetailResult `json:"txDetails"`
}

Jump to

Keyboard shortcuts

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