pbbtc

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBits

func (x *Block) GetBits() string

func (*Block) GetChainwork

func (x *Block) GetChainwork() string

func (*Block) GetDifficulty

func (x *Block) GetDifficulty() float64

func (*Block) GetHash

func (x *Block) GetHash() string

func (*Block) GetHeight

func (x *Block) GetHeight() int64

func (*Block) GetMediantime

func (x *Block) GetMediantime() int64

func (*Block) GetMerkleRoot

func (x *Block) GetMerkleRoot() string

func (*Block) GetNTx

func (x *Block) GetNTx() uint32

func (*Block) GetNonce

func (x *Block) GetNonce() uint32

func (*Block) GetPreviousHash

func (x *Block) GetPreviousHash() string

func (*Block) GetSize

func (x *Block) GetSize() int32

func (*Block) GetStrippedSize

func (x *Block) GetStrippedSize() int32

func (*Block) GetTime

func (x *Block) GetTime() int64

func (*Block) GetTx

func (x *Block) GetTx() []*Transaction

func (*Block) GetVersion

func (x *Block) GetVersion() int32

func (*Block) GetVersionHex

func (x *Block) GetVersionHex() string

func (*Block) GetWeight

func (x *Block) GetWeight() int32

func (*Block) MustToBstreamBlock

func (b *Block) MustToBstreamBlock() *pbbstream.Block

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

func (*Block) ToBstreamBlock

func (b *Block) ToBstreamBlock() (*pbbstream.Block, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use ScriptSig.ProtoReflect.Descriptor instead.

func (*ScriptSig) GetAsm

func (x *ScriptSig) GetAsm() string

func (*ScriptSig) GetHex

func (x *ScriptSig) GetHex() string

func (*ScriptSig) ProtoMessage

func (*ScriptSig) ProtoMessage()

func (*ScriptSig) ProtoReflect

func (x *ScriptSig) ProtoReflect() protoreflect.Message

func (*ScriptSig) Reset

func (x *ScriptSig) Reset()

func (*ScriptSig) String

func (x *ScriptSig) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Vin.ProtoReflect.Descriptor instead.

func (*Vin) GetCoinbase

func (x *Vin) GetCoinbase() string

func (*Vin) GetScriptSig

func (x *Vin) GetScriptSig() *ScriptSig

func (*Vin) GetSequence

func (x *Vin) GetSequence() uint32

func (*Vin) GetTxid

func (x *Vin) GetTxid() string

func (*Vin) GetTxinwitness

func (x *Vin) GetTxinwitness() []string

func (*Vin) GetVout

func (x *Vin) GetVout() uint32

func (*Vin) ProtoMessage

func (*Vin) ProtoMessage()

func (*Vin) ProtoReflect

func (x *Vin) ProtoReflect() protoreflect.Message

func (*Vin) Reset

func (x *Vin) Reset()

func (*Vin) String

func (x *Vin) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Vout.ProtoReflect.Descriptor instead.

func (*Vout) GetN

func (x *Vout) GetN() uint32

func (*Vout) GetScriptPubKey

func (x *Vout) GetScriptPubKey() *ScriptPubKey

func (*Vout) GetValue

func (x *Vout) GetValue() float64

func (*Vout) ProtoMessage

func (*Vout) ProtoMessage()

func (*Vout) ProtoReflect

func (x *Vout) ProtoReflect() protoreflect.Message

func (*Vout) Reset

func (x *Vout) Reset()

func (*Vout) String

func (x *Vout) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL