package lite

// lite rpc  error struct
type LiteDataError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

// lite rpc  common result struct
type LiteDataResult struct {
	Result string        `json:"result"`
	Error  LiteDataError `json:"error"`
	Id     string        `json:"id"`
}

//get block count
type Blockcountresult struct {
	Result uint64
	Error  LiteDataError
	Id     string
}

// raw transaction info
type ScriptSiginfo struct {
	Asm string
	Hex string
}

type Vininfo struct {
	Txid        string
	Vout        uint64
	ScriptSig   ScriptSiginfo
	Sequence    uint64
	Txinwitness []string
	Coinbase    string
}

type ScriptPubKeyinfo struct {
	Asm       string
	Hex       string
	ReqSigs   uint64
	Type      string
	Addresses []string
}

type Voutinfo struct {
	Value        float64
	N            uint64
	ScriptPubKey ScriptPubKeyinfo
}

type Rawtransactioninfo struct {
	Hex           string
	Txid          string
	Hash          string
	Size          uint64
	Vsize         uint64
	Version       float64
	Locktime      uint64
	Vin           []Vininfo
	Vout          []Voutinfo
	Blockhash     string
	Confirmations uint64
	Time          uint64
	Blocktime     uint64
}

type RawtransactionResult struct {
	Result Rawtransactioninfo `json:"result"`
	Error  LiteDataError      `json:"error"`
	Id     string             `json:"id"`
}

type AddressInfo struct {
	Address []string `json:"address"`
	Asm     string   `json:"asm"`
	Value   float64  `json:"value"`
}

// get block info in litecoindb struct
type Liteblockinfoindb struct {
	Hash              string
	Size              uint64
	Version           uint64
	Merkleroot        string
	Txids             []string
	Time              uint64
	Nonce             uint64
	Difficulty        float64
	Previousblockhash string
	Nextblockhash     string
	Txcount           uint64
}

// get block info result struct
type Liteblock struct {
	Hash              string
	Confirmations     uint64
	Size              uint64
	Strippedsize      uint64
	Weight            uint64
	Height            uint64
	Version           uint64
	VersionHex        string
	Merkleroot        string
	Tx                []string
	Time              uint64
	Mediantime        uint64
	Nonce             uint64
	Bits              string
	Difficulty        float64
	Chainwork         string
	Previousblockhash string
	Nextblockhash     string
}

type LiteblockResult struct {
	Result Liteblock     `json:"result"`
	Error  LiteDataError `json:"error"`
	Id     string        `json:"id"`
}

//get wallet info result struct
type Litewalletinfo struct {
	Walletversion       uint64
	Balance             float64
	Unconfirmed_balance float64
	Immature_balance    float64
	Txcount             uint64
	Keypoololdest       uint64
	Keypoolsize         uint64
	Unlocked_until      uint64
	Paytxfee            float64
	Hdmasterkeyid       string
}

type LitewalletinfoResult struct {
	Result Litewalletinfo `json:"result"`
	Error  LiteDataError  `json:"error"`
	Id     string         `json:"id"`
}




