lighttypes

package
v1.76.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: BSD-3-Clause Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TyUnknowAction = iota + 100
	TyBtcHeadersAction

	NameBtcHeadersAction = "BtcHeaders"
)

action类型id和name,这些常量可以自定义修改

View Source
const (
	TyUnknownLog = iota + 100
	TyBtcHeadersLog

	NameBtcHeadersLog = "BtcHeadersLog"
)

log类型id值

Variables

View Source
var File_lightclient_proto protoreflect.FileDescriptor
View Source
var (
	//LightclientX 执行器名称定义
	LightclientX = "lightclient"
)

Functions

func GetBtcChainParams

func GetBtcChainParams(netName string) *chaincfg.Params

GetBtcChainParams 获取比特币链参数

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor defines register executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork defines register fork

func NewType

func NewType(cfg *types.Chain33Config) *lightClientType

func RegisterLightclientServer

func RegisterLightclientServer(s *grpc.Server, srv LightclientServer)

Types

type BtcHeader

type BtcHeader struct {
	Hash          string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Confirmations uint64 `protobuf:"varint,2,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
	Height        uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	Version       uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
	MerkleRoot    string `protobuf:"bytes,5,opt,name=merkleRoot,proto3" json:"merkleRoot,omitempty"`
	Time          int64  `protobuf:"varint,6,opt,name=time,proto3" json:"time,omitempty"`
	Nonce         uint64 `protobuf:"varint,7,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Bits          int64  `protobuf:"varint,8,opt,name=bits,proto3" json:"bits,omitempty"`
	Difficulty    int64  `protobuf:"varint,9,opt,name=difficulty,proto3" json:"difficulty,omitempty"`
	PreviousHash  string `protobuf:"bytes,10,opt,name=previousHash,proto3" json:"previousHash,omitempty"`
	NextHash      string `protobuf:"bytes,11,opt,name=nextHash,proto3" json:"nextHash,omitempty"`
	// contains filtered or unexported fields
}

func (*BtcHeader) Descriptor deprecated

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

Deprecated: Use BtcHeader.ProtoReflect.Descriptor instead.

func (*BtcHeader) GetBits

func (x *BtcHeader) GetBits() int64

func (*BtcHeader) GetConfirmations

func (x *BtcHeader) GetConfirmations() uint64

func (*BtcHeader) GetDifficulty

func (x *BtcHeader) GetDifficulty() int64

func (*BtcHeader) GetHash

func (x *BtcHeader) GetHash() string

func (*BtcHeader) GetHeight

func (x *BtcHeader) GetHeight() uint64

func (*BtcHeader) GetMerkleRoot

func (x *BtcHeader) GetMerkleRoot() string

func (*BtcHeader) GetNextHash

func (x *BtcHeader) GetNextHash() string

func (*BtcHeader) GetNonce

func (x *BtcHeader) GetNonce() uint64

func (*BtcHeader) GetPreviousHash

func (x *BtcHeader) GetPreviousHash() string

func (*BtcHeader) GetTime

func (x *BtcHeader) GetTime() int64

func (*BtcHeader) GetVersion

func (x *BtcHeader) GetVersion() uint32

func (*BtcHeader) ProtoMessage

func (*BtcHeader) ProtoMessage()

func (*BtcHeader) ProtoReflect

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

func (*BtcHeader) Reset

func (x *BtcHeader) Reset()

func (*BtcHeader) String

func (x *BtcHeader) String() string

type BtcHeaders

type BtcHeaders struct {
	Headers []*BtcHeader `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*BtcHeaders) Descriptor deprecated

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

Deprecated: Use BtcHeaders.ProtoReflect.Descriptor instead.

func (*BtcHeaders) GetHeaders

func (x *BtcHeaders) GetHeaders() []*BtcHeader

func (*BtcHeaders) ProtoMessage

func (*BtcHeaders) ProtoMessage()

func (*BtcHeaders) ProtoReflect

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

func (*BtcHeaders) Reset

func (x *BtcHeaders) Reset()

func (*BtcHeaders) String

func (x *BtcHeaders) String() string

type BtcHeadersLog

type BtcHeadersLog struct {
	Confirmations uint64 `protobuf:"varint,1,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
	LastHeight    uint64 `protobuf:"varint,2,opt,name=lastHeight,proto3" json:"lastHeight,omitempty"`
	CommitHeight  uint64 `protobuf:"varint,3,opt,name=commitHeight,proto3" json:"commitHeight,omitempty"`
	LastHash      string `protobuf:"bytes,4,opt,name=lastHash,proto3" json:"lastHash,omitempty"`
	CommitHash    string `protobuf:"bytes,5,opt,name=commitHash,proto3" json:"commitHash,omitempty"`
	// contains filtered or unexported fields
}

func (*BtcHeadersLog) Descriptor deprecated

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

Deprecated: Use BtcHeadersLog.ProtoReflect.Descriptor instead.

func (*BtcHeadersLog) GetCommitHash

func (x *BtcHeadersLog) GetCommitHash() string

func (*BtcHeadersLog) GetCommitHeight

func (x *BtcHeadersLog) GetCommitHeight() uint64

func (*BtcHeadersLog) GetConfirmations

func (x *BtcHeadersLog) GetConfirmations() uint64

func (*BtcHeadersLog) GetLastHash

func (x *BtcHeadersLog) GetLastHash() string

func (*BtcHeadersLog) GetLastHeight

func (x *BtcHeadersLog) GetLastHeight() uint64

func (*BtcHeadersLog) ProtoMessage

func (*BtcHeadersLog) ProtoMessage()

func (*BtcHeadersLog) ProtoReflect

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

func (*BtcHeadersLog) Reset

func (x *BtcHeadersLog) Reset()

func (*BtcHeadersLog) String

func (x *BtcHeadersLog) String() string

type BtcSpv

type BtcSpv struct {
	TxHash      string   `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"`
	Time        int64    `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	Height      uint64   `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	BlockHash   string   `protobuf:"bytes,4,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	TxIndex     uint32   `protobuf:"varint,5,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
	BranchProof [][]byte `protobuf:"bytes,6,rep,name=branchProof,proto3" json:"branchProof,omitempty"`
	// contains filtered or unexported fields
}

func (*BtcSpv) Descriptor deprecated

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

Deprecated: Use BtcSpv.ProtoReflect.Descriptor instead.

func (*BtcSpv) GetBlockHash

func (x *BtcSpv) GetBlockHash() string

func (*BtcSpv) GetBranchProof

func (x *BtcSpv) GetBranchProof() [][]byte

func (*BtcSpv) GetHeight

func (x *BtcSpv) GetHeight() uint64

func (*BtcSpv) GetTime

func (x *BtcSpv) GetTime() int64

func (*BtcSpv) GetTxHash

func (x *BtcSpv) GetTxHash() string

func (*BtcSpv) GetTxIndex

func (x *BtcSpv) GetTxIndex() uint32

func (*BtcSpv) ProtoMessage

func (*BtcSpv) ProtoMessage()

func (*BtcSpv) ProtoReflect

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

func (*BtcSpv) Reset

func (x *BtcSpv) Reset()

func (*BtcSpv) String

func (x *BtcSpv) String() string

type BtcTransaction

type BtcTransaction struct {
	Hash          string  `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	BlockHeight   uint64  `protobuf:"varint,2,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"`
	Vin           []*Vin  `protobuf:"bytes,3,rep,name=vin,proto3" json:"vin,omitempty"`
	Vout          []*Vout `protobuf:"bytes,4,rep,name=vout,proto3" json:"vout,omitempty"`
	Time          int64   `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"`
	Confirmations uint64  `protobuf:"varint,6,opt,name=confirmations,proto3" json:"confirmations,omitempty"`
	// contains filtered or unexported fields
}

func (*BtcTransaction) Descriptor deprecated

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

Deprecated: Use BtcTransaction.ProtoReflect.Descriptor instead.

func (*BtcTransaction) GetBlockHeight

func (x *BtcTransaction) GetBlockHeight() uint64

func (*BtcTransaction) GetConfirmations

func (x *BtcTransaction) GetConfirmations() uint64

func (*BtcTransaction) GetHash

func (x *BtcTransaction) GetHash() string

func (*BtcTransaction) GetTime

func (x *BtcTransaction) GetTime() int64

func (*BtcTransaction) GetVin

func (x *BtcTransaction) GetVin() []*Vin

func (*BtcTransaction) GetVout

func (x *BtcTransaction) GetVout() []*Vout

func (*BtcTransaction) ProtoMessage

func (*BtcTransaction) ProtoMessage()

func (*BtcTransaction) ProtoReflect

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

func (*BtcTransaction) Reset

func (x *BtcTransaction) Reset()

func (*BtcTransaction) String

func (x *BtcTransaction) String() string

type LightClientAction

type LightClientAction struct {
	Ty int32 `protobuf:"varint,1,opt,name=ty,proto3" json:"ty,omitempty"`
	// Types that are assignable to Value:
	//	*LightClientAction_BtcHeaders
	Value isLightClientAction_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*LightClientAction) Descriptor deprecated

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

Deprecated: Use LightClientAction.ProtoReflect.Descriptor instead.

func (*LightClientAction) GetBtcHeaders

func (x *LightClientAction) GetBtcHeaders() *BtcHeaders

func (*LightClientAction) GetTy

func (x *LightClientAction) GetTy() int32

func (*LightClientAction) GetValue

func (m *LightClientAction) GetValue() isLightClientAction_Value

func (*LightClientAction) ProtoMessage

func (*LightClientAction) ProtoMessage()

func (*LightClientAction) ProtoReflect

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

func (*LightClientAction) Reset

func (x *LightClientAction) Reset()

func (*LightClientAction) String

func (x *LightClientAction) String() string

type LightClientAction_BtcHeaders

type LightClientAction_BtcHeaders struct {
	BtcHeaders *BtcHeaders `protobuf:"bytes,2,opt,name=btcHeaders,proto3,oneof"`
}

type LightclientClient

type LightclientClient interface {
}

LightclientClient is the client API for Lightclient service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type LightclientServer

type LightclientServer interface {
}

LightclientServer is the server API for Lightclient service.

type ReqGetBtcHeader

type ReqGetBtcHeader struct {
	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqGetBtcHeader) Descriptor deprecated

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

Deprecated: Use ReqGetBtcHeader.ProtoReflect.Descriptor instead.

func (*ReqGetBtcHeader) GetHeight

func (x *ReqGetBtcHeader) GetHeight() uint64

func (*ReqGetBtcHeader) ProtoMessage

func (*ReqGetBtcHeader) ProtoMessage()

func (*ReqGetBtcHeader) ProtoReflect

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

func (*ReqGetBtcHeader) Reset

func (x *ReqGetBtcHeader) Reset()

func (*ReqGetBtcHeader) String

func (x *ReqGetBtcHeader) String() string

type TssSignNotify

type TssSignNotify struct {
	InputAmounts []int64  `protobuf:"varint,1,rep,packed,name=inputAmounts,proto3" json:"inputAmounts,omitempty"`
	Payload      []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	TxType       string   `protobuf:"bytes,3,opt,name=txType,proto3" json:"txType,omitempty"`
	BtcTxData    []byte   `protobuf:"bytes,4,opt,name=btcTxData,proto3" json:"btcTxData,omitempty"`
	Signers      []string `protobuf:"bytes,5,rep,name=signers,proto3" json:"signers,omitempty"`
	// contains filtered or unexported fields
}

func (*TssSignNotify) Descriptor deprecated

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

Deprecated: Use TssSignNotify.ProtoReflect.Descriptor instead.

func (*TssSignNotify) GetBtcTxData

func (x *TssSignNotify) GetBtcTxData() []byte

func (*TssSignNotify) GetInputAmounts

func (x *TssSignNotify) GetInputAmounts() []int64

func (*TssSignNotify) GetPayload

func (x *TssSignNotify) GetPayload() []byte

func (*TssSignNotify) GetSigners

func (x *TssSignNotify) GetSigners() []string

func (*TssSignNotify) GetTxType

func (x *TssSignNotify) GetTxType() string

func (*TssSignNotify) ProtoMessage

func (*TssSignNotify) ProtoMessage()

func (*TssSignNotify) ProtoReflect

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

func (*TssSignNotify) Reset

func (x *TssSignNotify) Reset()

func (*TssSignNotify) String

func (x *TssSignNotify) String() string

type UnimplementedLightclientServer

type UnimplementedLightclientServer struct {
}

UnimplementedLightclientServer can be embedded to have forward compatible implementations.

type Vin

type Vin struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Value   uint64 `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"`
	// contains filtered or unexported fields
}

func (*Vin) Descriptor deprecated

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

Deprecated: Use Vin.ProtoReflect.Descriptor instead.

func (*Vin) GetAddress

func (x *Vin) GetAddress() string

func (*Vin) GetValue

func (x *Vin) GetValue() uint64

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 {
	Coinbase bool   `protobuf:"varint,1,opt,name=coinbase,proto3" json:"coinbase,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Value    uint64 `protobuf:"varint,3,opt,name=Value,proto3" json:"Value,omitempty"`
	// contains filtered or unexported fields
}

func (*Vout) Descriptor deprecated

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

Deprecated: Use Vout.ProtoReflect.Descriptor instead.

func (*Vout) GetAddress

func (x *Vout) GetAddress() string

func (*Vout) GetCoinbase

func (x *Vout) GetCoinbase() bool

func (*Vout) GetValue

func (x *Vout) GetValue() uint64

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