Documentation
¶
Index ¶
- func ScriptPubKeyDisplay(scriptPubKey ScriptPubKey) string
- type BTCString
- type BigInt
- func (b *BigInt) BigFloat() *big.Float
- func (b *BigInt) BigInt() *big.Int
- func (b *BigInt) MarshalJSON() ([]byte, error)
- func (b *BigInt) Positive() bool
- func (b *BigInt) SatoshisToBTC(strip bool) string
- func (b *BigInt) Scan(src interface{}) error
- func (b *BigInt) UnmarshalJSON(data []byte) error
- func (b BigInt) Value() (driver.Value, error)
- type Block
- type BlockLossSummary
- type BurnScript
- type BurnScriptSummary
- type DecodeScript
- type HeightLossSummary
- type IndexRollupStatistics
- type IndexStatistics
- type Loss
- type OpReturnSummary
- type Prevout
- type ScriptGroup
- type ScriptGroupSummary
- type ScriptPubKey
- type ScriptQueue
- type ScriptSig
- type Segwit
- type Transaction
- type TransactionDetail
- type TransactionLossSummary
- type TransactionQueue
- type TransactionSummary
- type TxOutSetInfo
- type Vin
- type Vout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScriptPubKeyDisplay ¶
func ScriptPubKeyDisplay(scriptPubKey ScriptPubKey) string
Types ¶
type BTCString ¶
type BTCString string
func (*BTCString) MarshalJSON ¶
func (*BTCString) UnmarshalJSON ¶
type BigInt ¶
TODO: Fix pointer/non-pointer issues
func FromBTCString ¶
func FromMathBigInt ¶
func ValueToBigInt ¶
func (*BigInt) MarshalJSON ¶
func (*BigInt) SatoshisToBTC ¶
func (*BigInt) UnmarshalJSON ¶
type Block ¶
type Block struct {
ID int
BlockHeight int64
BlockHash string
BlockTimestamp time.Time
ParentBlockHash string
NumTransactions int
CreatedAt time.Time
}
func FromRPCBlock ¶
func (Block) IsFutureBlock ¶
type BlockLossSummary ¶
type BurnScript ¶
type BurnScript struct {
ID int `json:"id"`
Script string `json:"script"`
ConfidenceLevel string `json:"confidence_level"`
Provenance string `json:"provenance"`
CreatedAt time.Time `json:"created_at"`
ScriptGroup string `json:"script_group"`
DecodeScript string `json:"decodescript"`
}
func (BurnScript) ParseDecodeScript ¶
func (bs BurnScript) ParseDecodeScript() (DecodeScript, error)
type BurnScriptSummary ¶
type BurnScriptSummary struct {
Script string
ConfidenceLevel string
Provenance string
Group string
DecodeScript string
Transactions int
TotalLoss *BigInt
}
func (BurnScriptSummary) ParseDecodeScript ¶
func (bss BurnScriptSummary) ParseDecodeScript() (DecodeScript, error)
type DecodeScript ¶
type DecodeScript struct {
Script string `json:"script"`
Asm string `json:"asm"`
Desc string `json:"desc"`
Type string `json:"type"`
Address string `json:"address"`
P2SH string `json:"p2sh"`
Segwit Segwit `json:"segwit"`
}
func ParseDecodeScriptJSON ¶
func ParseDecodeScriptJSON(jsonString string) (DecodeScript, error)
func (DecodeScript) DisplayAddress ¶
func (ds DecodeScript) DisplayAddress(fallback string) string
type HeightLossSummary ¶
type IndexRollupStatistics ¶
type IndexStatistics ¶
type IndexStatistics struct {
PlannedSupply *BigInt `json:"planned_supply"`
CirculatingSupply *BigInt `json:"circulating_supply"`
BurnedSupply *BigInt `json:"burned_supply"`
LastBlockHeight int64 `json:"last_block_height"`
LastBlockTime time.Time `json:"last_block_time"`
BurnOutputCount int64 `json:"burned_output_count"`
BurnScriptsCount int64 `json:"burned_scripts_count"`
CurrentPrice float64 `json:"current_price"`
AdjustedPrice float64 `json:"adjusted_price"`
PriceChange float64 `json:"price_change"`
}
type OpReturnSummary ¶
type Prevout ¶
type Prevout struct {
Generated bool `json:"generated"`
Height int `json:"height"`
Value BTCString `json:"value"`
ScriptPubKey ScriptPubKey `json:"scriptPubKey"`
}
type ScriptGroup ¶
type ScriptGroup struct {
ScriptGroup string `json:"script_group"`
}
type ScriptGroupSummary ¶
type ScriptPubKey ¶
type ScriptQueue ¶
type Transaction ¶
type Transaction struct {
TxID string
TransactionDetails string
BlockHeight int64
BlockHash string
}
func (Transaction) TransactionDetail ¶
func (t Transaction) TransactionDetail() (TransactionDetail, error)
We store TransactionDetails in sqlite as a raw JSON to avoid having to handle various edge cases with variance in the transaction information, while still being able to support showing the full raw RPC response in the UI.
This method will return the TransactionDetail struct from the raw JSON.
type TransactionDetail ¶
type TransactionDetail struct {
Txid string `json:"txid"`
Hash string `json:"hash"`
Version int `json:"version"`
Size int `json:"size"`
Vsize int `json:"vsize"`
Weight int `json:"weight"`
Locktime int `json:"locktime"`
Vin []Vin `json:"vin"`
Vout []Vout `json:"vout"`
Fee BTCString `json:"fee"`
Hex string `json:"hex"`
Blockhash string `json:"blockhash,omitempty"`
Time int `json:"time,omitempty"`
Blocktime int `json:"blocktime,omitempty"`
}
func (*TransactionDetail) NotePointers ¶
func (t *TransactionDetail) NotePointers() ([]notes.NotePointer, bool, []string)
type TransactionLossSummary ¶
type TransactionQueue ¶
type TransactionSummary ¶
type TxOutSetInfo ¶
type TxOutSetInfo struct {
ID int `json:"id"`
Height int64 `json:"height"`
Bestblock string `json:"bestblock"`
Txouts int `json:"txouts"`
Bogosize int64 `json:"bogosize"`
Muhash string `json:"muhash"`
TotalAmount *BigInt `json:"total_amount"`
TotalUnspendableAmount *BigInt `json:"total_unspendable_amount"`
GenesisBlock *BigInt `json:"genesis_block"`
Bip30 *BigInt `json:"bip30"`
Scripts *BigInt `json:"scripts"`
UnclaimedRewards *BigInt `json:"unclaimed_rewards"`
PrevoutSpent *BigInt `json:"prevout_spent"`
Coinbase *BigInt `json:"coinbase"`
NewOutputsExCoinbase *BigInt `json:"new_outputs_ex_coinbase"`
Unspendable *BigInt `json:"unspendable"`
CreatedAt time.Time `json:"created_at"`
}
func FromRPCTxOutSetInfo ¶
func FromRPCTxOutSetInfo(info btypes.TxOutSetInfo) TxOutSetInfo
type Vout ¶
type Vout struct {
Value BTCString `json:"value"`
N int `json:"n"`
ScriptPubKey ScriptPubKey `json:"scriptPubKey"`
}
Source Files
¶
- bigint.go
- block.go
- block_loss_summary.go
- btc_string.go
- burn_script.go
- burn_script_summary.go
- decodescript.go
- height_loss_summary.go
- index_statistics.go
- loss.go
- op_return_summary.go
- script_group.go
- script_group_summary.go
- script_queue.go
- transaction.go
- transaction_detail.go
- transaction_loss_summary.go
- transaction_queue.go
- transaction_summary.go
- tx_out_set_info.go
Click to show internal directories.
Click to hide internal directories.