Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
51 lines (45 sloc) 1.85 KB
/**
* @copyright defined in chopsticks/LICENSE.txt
* @author Romain Pellerin - romain@eminent.ly
*
* Donation appreciated :)
*
* Bitcoin Cash $BCH wallet: 1HrhBfFRFovHv8EMxsuB9EcZgamtuH3fMc
*/
package model
import "github.com/eminently/chopsticks/errors"
type Transaction struct {
DataVersion int `json:"data_version"`
Uid string `json:"uid"`
Created int64 `json:"created"`
UserId string `json:"user_id"`
Inputs map[string]int64 `json:"inputs,omitempty"`
Outputs map[string]int64 `json:"outputs,omitempty"`
Amount int64 `json:"amount,omitempty"`
SignedTx string `json:"tx_signed,omitempty"`
Hash string `json:"tx_hash,omitempty"`
ChainType string `json:"blockchain_type,omitempty"`
ChainVersion string `json:"blockchain_version,omitempty"`
BlockHeight int `json:"block_height,omitempty"`
BlockEcmh string `json:"block_ecmh,omitempty"`
Time int64 `json:"time,omitempty"`
BlockTime int64 `json:"block_time,omitempty"`
Status int `json:"status,omitempty"`
UnsignedTx string `json:"unsignedtx,omitempty"`
IsLegacy int `json:"is_legacy,omitempty"`
}
type TransactionRequest struct {
TxHex string `json:"tx_hex,omitempty"`
Blockchains []string `json:"blockchains,omitempty"`
Voting bool `json:"voting,omitempty"`
}
type TransactionResponse struct {
TxHex string `json:"tx_hex,omitempty"`
Transactions []Transaction `json:"transactions,omitempty"`
Vote Vote `json:"vote,omitempty"`
VoteSignature string `json:"vote_signature,omitempty"`
Errors []errors.AppError `json:"errors,omitempty"`
}
type Transactions struct {
Transactions []Transaction `json:"transactions,omitempty"`
}
You can’t perform that action at this time.