Documentation
¶
Index ¶
- Constants
- Variables
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetBits() string
- func (x *Block) GetChainwork() string
- func (x *Block) GetDifficulty() float64
- func (x *Block) GetHash() string
- func (x *Block) GetHeight() int64
- func (x *Block) GetMediantime() int64
- func (x *Block) GetMerkleRoot() string
- func (x *Block) GetNTx() uint32
- func (x *Block) GetNonce() uint32
- func (x *Block) GetPreviousHash() string
- func (x *Block) GetSize() int32
- func (x *Block) GetStrippedSize() int32
- func (x *Block) GetTime() int64
- func (x *Block) GetTx() []*Transaction
- func (x *Block) GetVersion() int32
- func (x *Block) GetVersionHex() string
- func (x *Block) GetWeight() int32
- func (b *Block) MustToBstreamBlock() *pbbstream.Block
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- func (b *Block) ToBstreamBlock() (*pbbstream.Block, error)
- type ScriptPubKey
- func (*ScriptPubKey) Descriptor() ([]byte, []int)deprecated
- func (x *ScriptPubKey) GetAddress() string
- func (x *ScriptPubKey) GetAddresses() []string
- func (x *ScriptPubKey) GetAsm() string
- func (x *ScriptPubKey) GetHex() string
- func (x *ScriptPubKey) GetReqSigs() int32
- func (x *ScriptPubKey) GetType() string
- func (*ScriptPubKey) ProtoMessage()
- func (x *ScriptPubKey) ProtoReflect() protoreflect.Message
- func (x *ScriptPubKey) Reset()
- func (x *ScriptPubKey) String() string
- type ScriptSig
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetBlockhash() string
- func (x *Transaction) GetBlocktime() int64
- func (x *Transaction) GetHash() string
- func (x *Transaction) GetHex() string
- func (x *Transaction) GetLocktime() uint32
- func (x *Transaction) GetSize() int32
- func (x *Transaction) GetTxid() string
- func (x *Transaction) GetVersion() uint32
- func (x *Transaction) GetVin() []*Vin
- func (x *Transaction) GetVout() []*Vout
- func (x *Transaction) GetVsize() int32
- func (x *Transaction) GetWeight() int32
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type Vin
- func (*Vin) Descriptor() ([]byte, []int)deprecated
- func (x *Vin) GetCoinbase() string
- func (x *Vin) GetScriptSig() *ScriptSig
- func (x *Vin) GetSequence() uint32
- func (x *Vin) GetTxid() string
- func (x *Vin) GetTxinwitness() []string
- func (x *Vin) GetVout() uint32
- func (*Vin) ProtoMessage()
- func (x *Vin) ProtoReflect() protoreflect.Message
- func (x *Vin) Reset()
- func (x *Vin) String() string
- type Vout
Constants ¶
View Source
const LibOffset = 6
Variables ¶
View Source
var File_sf_bitcoin_type_v1_type_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { //the block hash // Bitcoin core reverses the byte order of the hash when printing it out has Hex, to prevent // the end user from making a mistake we store it as a string directly Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // The block size Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // The block size excluding witness data StrippedSize int32 `protobuf:"varint,4,opt,name=stripped_size,json=strippedSize,proto3" json:"stripped_size,omitempty"` // The block weight as defined in BIP 141 Weight int32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"` // The block height or index Height int64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"` // The block version Version int32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // The block version formatted in hexadecimal VersionHex string `protobuf:"bytes,8,opt,name=version_hex,json=versionHex,proto3" json:"version_hex,omitempty"` // The merkle root MerkleRoot string `protobuf:"bytes,9,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` // Transaction array Tx []*Transaction `protobuf:"bytes,10,rep,name=tx,proto3" json:"tx,omitempty"` // The block time expressed in UNIX epoch time Time int64 `protobuf:"varint,11,opt,name=time,proto3" json:"time,omitempty"` // The median block time expressed in UNIX epoch time Mediantime int64 `protobuf:"varint,12,opt,name=mediantime,proto3" json:"mediantime,omitempty"` // The nonce Nonce uint32 `protobuf:"varint,13,opt,name=nonce,proto3" json:"nonce,omitempty"` // The bits Bits string `protobuf:"bytes,14,opt,name=bits,proto3" json:"bits,omitempty"` // The difficulty Difficulty float64 `protobuf:"fixed64,15,opt,name=difficulty,proto3" json:"difficulty,omitempty"` // Expected number of hashes required to produce the chain up to this block (in hex) Chainwork string `protobuf:"bytes,16,opt,name=chainwork,proto3" json:"chainwork,omitempty"` // The number of transactions in the block NTx uint32 `protobuf:"varint,17,opt,name=n_tx,json=nTx,proto3" json:"n_tx,omitempty"` // The hash of the previous block PreviousHash string `protobuf:"bytes,18,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) GetChainwork ¶
func (*Block) GetDifficulty ¶
func (*Block) GetMediantime ¶
func (*Block) GetMerkleRoot ¶
func (*Block) GetPreviousHash ¶
func (*Block) GetStrippedSize ¶
func (*Block) GetTx ¶
func (x *Block) GetTx() []*Transaction
func (*Block) GetVersion ¶
func (*Block) GetVersionHex ¶
func (*Block) MustToBstreamBlock ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type ScriptPubKey ¶
type ScriptPubKey struct { // the asm Asm string `protobuf:"bytes,1,opt,name=asm,proto3" json:"asm,omitempty"` // the hex Hex string `protobuf:"bytes,2,opt,name=hex,proto3" json:"hex,omitempty"` // The required sigs ReqSigs int32 `protobuf:"varint,3,opt,name=req_sigs,json=reqSigs,proto3" json:"req_sigs,omitempty"` // The type, eg 'pubkeyhash' Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // bitcoin address Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` // bitcoin addresses (deprecated, empty when 'address' is set) Addresses []string `protobuf:"bytes,6,rep,name=addresses,proto3" json:"addresses,omitempty"` // contains filtered or unexported fields }
func (*ScriptPubKey) Descriptor
deprecated
func (*ScriptPubKey) Descriptor() ([]byte, []int)
Deprecated: Use ScriptPubKey.ProtoReflect.Descriptor instead.
func (*ScriptPubKey) GetAddress ¶
func (x *ScriptPubKey) GetAddress() string
func (*ScriptPubKey) GetAddresses ¶
func (x *ScriptPubKey) GetAddresses() []string
func (*ScriptPubKey) GetAsm ¶
func (x *ScriptPubKey) GetAsm() string
func (*ScriptPubKey) GetHex ¶
func (x *ScriptPubKey) GetHex() string
func (*ScriptPubKey) GetReqSigs ¶
func (x *ScriptPubKey) GetReqSigs() int32
func (*ScriptPubKey) GetType ¶
func (x *ScriptPubKey) GetType() string
func (*ScriptPubKey) ProtoMessage ¶
func (*ScriptPubKey) ProtoMessage()
func (*ScriptPubKey) ProtoReflect ¶
func (x *ScriptPubKey) ProtoReflect() protoreflect.Message
func (*ScriptPubKey) Reset ¶
func (x *ScriptPubKey) Reset()
func (*ScriptPubKey) String ¶
func (x *ScriptPubKey) String() string
type ScriptSig ¶
type ScriptSig struct { // The asm Asm string `protobuf:"bytes,1,opt,name=asm,proto3" json:"asm,omitempty"` // The hex Hex string `protobuf:"bytes,2,opt,name=hex,proto3" json:"hex,omitempty"` // contains filtered or unexported fields }
func (*ScriptSig) Descriptor
deprecated
func (*ScriptSig) ProtoMessage ¶
func (*ScriptSig) ProtoMessage()
func (*ScriptSig) ProtoReflect ¶
func (x *ScriptSig) ProtoReflect() protoreflect.Message
type Transaction ¶
type Transaction struct { // The serialized, hex-encoded data for 'txid' Hex string `protobuf:"bytes,1,opt,name=hex,proto3" json:"hex,omitempty"` // The transaction id Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` // The transaction hash (differs from txid for witness transactions) Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // The serialized transaction size Size int32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` // The virtual transaction size (differs from size for witness transactions) Vsize int32 `protobuf:"varint,5,opt,name=vsize,proto3" json:"vsize,omitempty"` // The transaction's weight (between vsize*4-3 and vsize*4) Weight int32 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` // The version Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // The lock time Locktime uint32 `protobuf:"varint,8,opt,name=locktime,proto3" json:"locktime,omitempty"` Vin []*Vin `protobuf:"bytes,9,rep,name=vin,proto3" json:"vin,omitempty"` Vout []*Vout `protobuf:"bytes,10,rep,name=vout,proto3" json:"vout,omitempty"` // the block hash Blockhash string `protobuf:"bytes,11,opt,name=blockhash,proto3" json:"blockhash,omitempty"` // The block time expressed in UNIX epoch time Blocktime int64 `protobuf:"varint,12,opt,name=blocktime,proto3" json:"blocktime,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetBlockhash ¶
func (x *Transaction) GetBlockhash() string
func (*Transaction) GetBlocktime ¶
func (x *Transaction) GetBlocktime() int64
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() string
func (*Transaction) GetHex ¶
func (x *Transaction) GetHex() string
func (*Transaction) GetLocktime ¶
func (x *Transaction) GetLocktime() uint32
func (*Transaction) GetSize ¶
func (x *Transaction) GetSize() int32
func (*Transaction) GetTxid ¶
func (x *Transaction) GetTxid() string
func (*Transaction) GetVersion ¶
func (x *Transaction) GetVersion() uint32
func (*Transaction) GetVin ¶
func (x *Transaction) GetVin() []*Vin
func (*Transaction) GetVout ¶
func (x *Transaction) GetVout() []*Vout
func (*Transaction) GetVsize ¶
func (x *Transaction) GetVsize() int32
func (*Transaction) GetWeight ¶
func (x *Transaction) GetWeight() int32
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type Vin ¶
type Vin struct { // The transaction id Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` // The output number Vout uint32 `protobuf:"varint,2,opt,name=vout,proto3" json:"vout,omitempty"` // The script ScriptSig *ScriptSig `protobuf:"bytes,3,opt,name=script_sig,json=scriptSig,proto3" json:"script_sig,omitempty"` // The script sequence number Sequence uint32 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` // hex-encoded witness data (if any) Txinwitness []string `protobuf:"bytes,5,rep,name=txinwitness,proto3" json:"txinwitness,omitempty"` // hex-encoded coinbase Coinbase string `protobuf:"bytes,6,opt,name=coinbase,proto3" json:"coinbase,omitempty"` // contains filtered or unexported fields }
func (*Vin) Descriptor
deprecated
func (*Vin) GetCoinbase ¶
func (*Vin) GetScriptSig ¶
func (*Vin) GetSequence ¶
func (*Vin) GetTxinwitness ¶
func (*Vin) ProtoMessage ¶
func (*Vin) ProtoMessage()
func (*Vin) ProtoReflect ¶
func (x *Vin) ProtoReflect() protoreflect.Message
type Vout ¶
type Vout struct { // The value in BTC Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` // index N uint32 `protobuf:"varint,2,opt,name=n,proto3" json:"n,omitempty"` ScriptPubKey *ScriptPubKey `protobuf:"bytes,3,opt,name=script_pubKey,json=scriptPubKey,proto3" json:"script_pubKey,omitempty"` // contains filtered or unexported fields }
func (*Vout) Descriptor
deprecated
func (*Vout) GetScriptPubKey ¶
func (x *Vout) GetScriptPubKey() *ScriptPubKey
func (*Vout) ProtoMessage ¶
func (*Vout) ProtoMessage()
func (*Vout) ProtoReflect ¶
func (x *Vout) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.