Documentation ¶
Index ¶
- Constants
- type AutoGenerated
- type BannedAddress
- type Block
- type BlockChainInfo
- type BlockHashIndexState
- type BlockHeader
- type BlockReward
- type BlockTemplate
- type CellBase
- type CellData
- type CellDep
- type CellInfo
- type CellOutputWithOutPoint
- type CellStatus
- type CellTransaction
- type CellWithStatus
- type CellbaseTemplate
- type DepType
- type Epoch
- type FeeRate
- type HashType
- type Header
- type Input
- type LiveCell
- type NodeInfo
- type OutPoint
- type Output
- type PeerState
- type PoolInfo
- type RawTransaction
- type Script
- type Transaction
- type TransactionInfo
- type TransactionPoint
- type TransactionStatus
- type TransactionStatusInfo
- type TransactionTemplate
- type TxStatus
- type UncleBlock
- type UncleTemplate
- type Witness
Constants ¶
View Source
const ( DepTypeCode = "code" DepTypeDepGroup = "dep_group" )
View Source
const ( HashTypeType = "type" HashTypeData = "data" )
View Source
const ( TransactionStatusPending = "pending" TransactionStatusCommitted = "committed" )
View Source
const (
CellStatusLive = "live"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoGenerated ¶
type AutoGenerated struct { BytesLimit string `json:"bytes_limit"` Cellbase struct { Cycles interface{} `json:"cycles"` Data struct { CellDeps []interface{} `json:"cell_deps"` HeaderDeps []interface{} `json:"header_deps"` Inputs []struct { PreviousOutput struct { Index string `json:"index"` TxHash string `json:"tx_hash"` } `json:"previous_output"` Since string `json:"since"` } `json:"inputs"` Outputs []struct { Capacity string `json:"capacity"` Lock struct { Args []string `json:"args"` CodeHash string `json:"code_hash"` HashType string `json:"hash_type"` } `json:"lock"` Type interface{} `json:"type"` } `json:"outputs"` OutputsData []string `json:"outputs_data"` Version string `json:"version"` Witnesses []struct { Data []string `json:"data"` } `json:"witnesses"` } `json:"data"` Hash string `json:"hash"` } `json:"cellbase"` CompactTarget string `json:"compact_target"` CurrentTime string `json:"current_time"` CyclesLimit string `json:"cycles_limit"` Dao string `json:"dao"` Epoch string `json:"epoch"` Number string `json:"number"` ParentHash string `json:"parent_hash"` Proposals []interface{} `json:"proposals"` Transactions []interface{} `json:"transactions"` Uncles []interface{} `json:"uncles"` UnclesCountLimit string `json:"uncles_count_limit"` Version string `json:"version"` WorkID string `json:"work_id"` }
type BannedAddress ¶
type Block ¶
type Block struct { Header Header `json:"header"` Proposals []string `json:"proposals"` Transactions []Transaction `json:"transactions"` Uncles []UncleBlock `json:"uncles"` }
type BlockChainInfo ¶
type BlockChainInfo struct { Alerts []struct { ID string `json:"id"` Message string `json:"message"` NoticeUntil string `json:"notice_until"` Priority string `json:"priority"` } `json:"alerts"` Chain string `json:"chain"` Difficulty string `json:"difficulty"` Epoch string `json:"epoch"` IsInitialBlockDownload bool `json:"is_initial_block_download"` MedianTime string `json:"median_time"` }
type BlockHashIndexState ¶
type BlockHeader ¶
type BlockHeader struct { CompactTarget string `json:"compact_target"` Hash string `json:"hash"` Number string `json:"number"` ParentHash string `json:"parent_hash"` Nonce string `json:"nonce"` Timestamp string `json:"timestamp"` TransactionsRoot string `json:"transactions_root"` ProposalsHash string `json:"proposals_hash"` UnclesHash string `json:"uncles_hash"` Version string `json:"version"` Epoch string `json:"epoch"` DAO string `json:"dao"` }
type BlockReward ¶
type BlockTemplate ¶
type BlockTemplate struct { BytesLimit string `json:"bytes_limit"` Cellbase CellbaseTemplate `json:"cellbase"` CompactTarget string `json:"compact_target"` CurrentTime string `json:"current_time"` CyclesLimit string `json:"cycles_limit"` Dao string `json:"dao"` Epoch string `json:"epoch"` Number string `json:"number"` ParentHash string `json:"parent_hash"` Proposals []string `json:"proposals"` Transactions []TransactionTemplate `json:"transactions"` Uncles []UncleTemplate `json:"uncles"` UnclesCountLimit string `json:"uncles_count_limit"` Version string `json:"version"` WorkID string `json:"work_id"` }
type CellOutputWithOutPoint ¶
type CellStatus ¶
type CellStatus string
type CellTransaction ¶
type CellTransaction struct { ConsumedBy *TransactionPoint `json:"consumed_by,omitempty"` CreatedBy TransactionPoint `json:"created_by"` }
type CellWithStatus ¶
type CellbaseTemplate ¶
type CellbaseTemplate struct { Cycles interface{} `json:"cycles"` Data Transaction `json:"data"` Hash string `json:"hash"` }
type Header ¶
type Header struct { Dao string `json:"dao"` Difficulty string `json:"difficulty"` Epoch string `json:"epoch"` Hash string `json:"hash"` Nonce string `json:"nonce"` Number string `json:"number"` ParentHash string `json:"parent_hash"` ProposalsHash string `json:"proposals_hash"` Timestamp string `json:"timestamp"` TransactionsRoot string `json:"transactions_root"` UnclesCount string `json:"uncles_count"` UnclesHash string `json:"uncles_hash"` Version string `json:"version"` WitnessesRoot string `json:"witnesses_root"` }
type LiveCell ¶
type LiveCell struct { CellOutput Output `json:"cell_output"` CreatedBy TransactionPoint `json:"created_by"` }
type Output ¶
type RawTransaction ¶
type Script ¶
type Transaction ¶
type Transaction struct { CellDeps []CellDep `json:"cell_deps"` Hash string `json:"hash"` HeaderDeps []string `json:"header_deps"` Inputs []Input `json:"inputs"` Outputs []Output `json:"outputs"` OutputsData []string `json:"outputs_data"` Version string `json:"version"` Witnesses []interface{} `json:"witnesses"` }
func (Transaction) ToRaw ¶
func (transaction Transaction) ToRaw() RawTransaction
type TransactionInfo ¶
type TransactionInfo struct { Transaction Transaction `json:"transaction"` Status TransactionStatusInfo `json:"tx_status"` }
type TransactionPoint ¶
type TransactionStatus ¶
type TransactionStatus string
type TransactionStatusInfo ¶
type TransactionStatusInfo struct { BlockHash string `json:"block_hash"` Status TransactionStatus `json:"status"` }
type TransactionTemplate ¶
type TransactionTemplate struct { Hash string `json:"hash"` Required bool `json:"required"` Cycles string `json:"cycles"` Depends []string `json:"depends"` Data Transaction `json:"data"` }
type UncleBlock ¶
type UncleBlock struct { CellBase Transaction `json:"cellbase"` Header Header `json:"header"` Proposals []string `json:"proposals"` }
type UncleTemplate ¶
type UncleTemplate struct { Hash string `json:"hash"` Required bool `json:"required"` Proposals []string `json:"proposals"` Header BlockHeader `json:"header"` }
Source Files ¶
- banned_address.go
- block.go
- block_hash_index_state.go
- block_header.go
- block_reward.go
- block_template.go
- blockchain_info.go
- cell.go
- cell_data.go
- cell_dep.go
- cell_status.go
- cell_transaction.go
- cell_with_status.go
- cellbase_template.go
- coin_base.go
- dep_type.go
- epoch.go
- fee_rate.go
- hash_type.go
- input.go
- node_info.go
- out_point.go
- output.go
- peer_state.go
- poo_info.go
- script.go
- tip_header.go
- transaction.go
- transaction_info.go
- transaction_point.go
- transaction_status.go
- transaction_template.go
- tx_status.go
- uncle_block.go
- uncle_template.go
- witness.go
Click to show internal directories.
Click to hide internal directories.