Documentation ¶
Index ¶
- Constants
- Variables
- func Load()
- type Assets
- type AssetsData
- type AssetsList
- type Balance
- type Copyright
- type Ledger
- func (l *Ledger) DoQuery(req QueryRequest) (data interface{}, err error)
- func (l *Ledger) ExecuteTransaction(tx Transaction) (ret interface{}, err error)
- func (l *Ledger) GetOriginalTransactionWithBlockInfo(hash []byte) (tx TransactionWithBlockInfo, err error)
- func (l *Ledger) GetTransactionsFromPool() (txList []blockchainRequest.Entity, count uint32)
- func (l *Ledger) PushTransaction(req blockchainRequest.Entity) (err error)
- func (l *Ledger) RemoveTransactionFromPool(txKey string)
- func (l *Ledger) SaveTransactionWithBlockInfo(tx Transaction, reqHash []byte, blockHeight uint64, actIndex uint32) (err error)
- func (l *Ledger) VerifyTransaction(tx Transaction) (err error)
- type QueryRequest
- type SellingData
- type SellingOperationResult
- type Transaction
- type TransactionData
- type TransactionWithBlockInfo
- type UTXOInput
- type UTXOOutput
- type Unspent
- type UnspentList
- type UnspentListWithBalance
- type UnspentQueryParameter
- type UnspentUnderAssets
Constants ¶
View Source
const MarketAddress = "MarketAddress"
Variables ¶
View Source
var AssetsTypes struct { General enum.Element Copyright enum.Element }
View Source
var QueryTypes struct { Assets enum.Element AllAssets enum.Element UnspentList enum.Element Transaction enum.Element SellingList enum.Element Copyright enum.Element }
Functions ¶
Types ¶
type AssetsData ¶
type AssetsList ¶
type AssetsList struct {
List []Assets
}
type Ledger ¶
type Ledger struct { CryptoTools crypto.Tools Storage kvDatabase.IDriver // contains filtered or unexported fields }
func NewLedger ¶
func NewLedger(storage kvDatabase.IDriver) (ledger *Ledger)
func (*Ledger) DoQuery ¶
func (l *Ledger) DoQuery(req QueryRequest) (data interface{}, err error)
func (*Ledger) ExecuteTransaction ¶
func (l *Ledger) ExecuteTransaction(tx Transaction) (ret interface{}, err error)
func (*Ledger) GetOriginalTransactionWithBlockInfo ¶
func (l *Ledger) GetOriginalTransactionWithBlockInfo(hash []byte) (tx TransactionWithBlockInfo, err error)
func (*Ledger) GetTransactionsFromPool ¶
func (l *Ledger) GetTransactionsFromPool() (txList []blockchainRequest.Entity, count uint32)
func (*Ledger) PushTransaction ¶
func (l *Ledger) PushTransaction(req blockchainRequest.Entity) (err error)
func (*Ledger) RemoveTransactionFromPool ¶
func (*Ledger) SaveTransactionWithBlockInfo ¶
func (*Ledger) VerifyTransaction ¶
func (l *Ledger) VerifyTransaction(tx Transaction) (err error)
wrap verify transaction method to solve interlock
type QueryRequest ¶
type SellingData ¶
type SellingOperationResult ¶
type SellingOperationResult struct { UnspentListWithBalance SellingData }
type Transaction ¶
type Transaction struct { TransactionData CreateTime int64 Seal seal.Entity }
func (*Transaction) HashString ¶
func (t *Transaction) HashString() string
type TransactionData ¶
type TransactionWithBlockInfo ¶
type TransactionWithBlockInfo struct { Transaction BlockInfo struct { RequestHash []byte BlockHeight uint64 ActionIndex uint32 } }
type UTXOOutput ¶
type UnspentList ¶
type UnspentList struct {
List map[string]*UnspentUnderAssets
}
type UnspentListWithBalance ¶
type UnspentQueryParameter ¶
type UnspentUnderAssets ¶
Click to show internal directories.
Click to hide internal directories.