models

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 4 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_client_response_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Address

type Address struct {
	ID            string `json:"id"` // unique od this address record = sha256(Address + TransactionID + BlockIndex)
	Address       string `json:"address"`
	TransactionID string `json:"transaction_id"`
	BlockHash     string `json:"block_hash"`
	BlockIndex    uint64 `json:"block_index"`
}

Address struct

type BlockHeader

type BlockHeader struct {
	Hash       string `json:"hash"`
	Coin       uint32 `json:"coin"`
	Height     uint32 `json:"height"`
	Time       uint32 `json:"time"`
	Nonce      uint32 `json:"nonce"`
	Version    uint32 `json:"version"`
	MerkleRoot string `json:"merkleroot"`
	Bits       string `json:"bits"`
	Synced     uint64 `json:"synced"`
}

BlockHeader is an object representing the BitCoin block header This comes from Bux models_block_headers.go

type ControlResponse

type ControlResponse struct {
	StatusCode   uint32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"`
	Status       string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Message      string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Block        uint32 `protobuf:"varint,4,opt,name=block,proto3" json:"block,omitempty"`
	Transactions uint64 `protobuf:"varint,5,opt,name=transactions,proto3" json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

func (*ControlResponse) Descriptor deprecated

func (*ControlResponse) Descriptor() ([]byte, []int)

Deprecated: Use ControlResponse.ProtoReflect.Descriptor instead.

func (*ControlResponse) GetBlock

func (x *ControlResponse) GetBlock() uint32

func (*ControlResponse) GetMessage

func (x *ControlResponse) GetMessage() string

func (*ControlResponse) GetStatus

func (x *ControlResponse) GetStatus() string

func (*ControlResponse) GetStatusCode

func (x *ControlResponse) GetStatusCode() uint32

func (*ControlResponse) GetTransactions

func (x *ControlResponse) GetTransactions() uint64

func (*ControlResponse) ProtoMessage

func (*ControlResponse) ProtoMessage()

func (*ControlResponse) ProtoReflect

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

func (*ControlResponse) Reset

func (x *ControlResponse) Reset()

func (*ControlResponse) String

func (x *ControlResponse) String() string

type StatusMessage

type StatusMessage struct {
	Code    uint   `json:"code"`
	Message string `json:"message"`
}

type Transaction

type Transaction struct {
	ID          string `json:"id"`
	Transaction []byte `json:"transaction"`
	BlockHash   string `json:"block_hash"`
	BlockHeight uint32 `json:"block_height"`
	BlockTime   uint32 `json:"block_time"`
	BlockIndex  uint64 `json:"block_index"`

	// index data
	// input/output types are
	// p2pkh, p2sh, token-stas, opreturn, tokenized, metanet, bitcom, run, map, bap, non-standard etc.
	Addresses   []string `json:"addresses"`
	Inputs      []string `json:"inputs"`
	Outputs     []string `json:"outputs"`
	InputTypes  []string `json:"input_types"`
	OutputTypes []string `json:"output_types"`
	Contexts    []string `json:"contexts"`     // optional contexts of output types, only for known protocols
	SubContexts []string `json:"sub_contexts"` // optional sub-contexts of output types, only for known protocols
	Data        []string `json:"data"`         // optional data of output types, only for known protocols

	// the merkle proof in binary
	MerkleProof []byte `json:"merkle_proof"`
}

Transaction struct

type TransactionResponse

type TransactionResponse struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	BlockHash   string `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	BlockIndex  uint64 `protobuf:"varint,4,opt,name=block_index,json=blockIndex,proto3" json:"block_index,omitempty"`
	BlockTime   uint32 `protobuf:"varint,5,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
	Transaction []byte `protobuf:"bytes,6,opt,name=transaction,proto3" json:"transaction,omitempty"`
	Merkle      []byte `protobuf:"bytes,7,opt,name=merkle,proto3" json:"merkle,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionResponse) Descriptor deprecated

func (*TransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.

func (*TransactionResponse) GetBlockHash

func (x *TransactionResponse) GetBlockHash() string

func (*TransactionResponse) GetBlockHeight

func (x *TransactionResponse) GetBlockHeight() uint32

func (*TransactionResponse) GetBlockIndex

func (x *TransactionResponse) GetBlockIndex() uint64

func (*TransactionResponse) GetBlockTime

func (x *TransactionResponse) GetBlockTime() uint32

func (*TransactionResponse) GetId

func (x *TransactionResponse) GetId() string

func (*TransactionResponse) GetMerkle

func (x *TransactionResponse) GetMerkle() []byte

func (*TransactionResponse) GetTransaction

func (x *TransactionResponse) GetTransaction() []byte

func (*TransactionResponse) ProtoMessage

func (*TransactionResponse) ProtoMessage()

func (*TransactionResponse) ProtoReflect

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

func (*TransactionResponse) Reset

func (x *TransactionResponse) Reset()

func (*TransactionResponse) String

func (x *TransactionResponse) String() string

Jump to

Keyboard shortcuts

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