Documentation
¶
Index ¶
- Constants
- Variables
- func GetBtcChainParams(netName string) *chaincfg.Params
- func InitExecutor(cfg *types.Chain33Config)
- func InitFork(cfg *types.Chain33Config)
- func NewType(cfg *types.Chain33Config) *lightClientType
- func RegisterLightclientServer(s *grpc.Server, srv LightclientServer)
- type BtcHeader
- func (*BtcHeader) Descriptor() ([]byte, []int)deprecated
- func (x *BtcHeader) GetBits() int64
- func (x *BtcHeader) GetConfirmations() uint64
- func (x *BtcHeader) GetDifficulty() int64
- func (x *BtcHeader) GetHash() string
- func (x *BtcHeader) GetHeight() uint64
- func (x *BtcHeader) GetMerkleRoot() string
- func (x *BtcHeader) GetNextHash() string
- func (x *BtcHeader) GetNonce() uint64
- func (x *BtcHeader) GetPreviousHash() string
- func (x *BtcHeader) GetTime() int64
- func (x *BtcHeader) GetVersion() uint32
- func (*BtcHeader) ProtoMessage()
- func (x *BtcHeader) ProtoReflect() protoreflect.Message
- func (x *BtcHeader) Reset()
- func (x *BtcHeader) String() string
- type BtcHeaders
- type BtcHeadersLog
- func (*BtcHeadersLog) Descriptor() ([]byte, []int)deprecated
- func (x *BtcHeadersLog) GetCommitHash() string
- func (x *BtcHeadersLog) GetCommitHeight() uint64
- func (x *BtcHeadersLog) GetConfirmations() uint64
- func (x *BtcHeadersLog) GetLastHash() string
- func (x *BtcHeadersLog) GetLastHeight() uint64
- func (*BtcHeadersLog) ProtoMessage()
- func (x *BtcHeadersLog) ProtoReflect() protoreflect.Message
- func (x *BtcHeadersLog) Reset()
- func (x *BtcHeadersLog) String() string
- type BtcSpv
- func (*BtcSpv) Descriptor() ([]byte, []int)deprecated
- func (x *BtcSpv) GetBlockHash() string
- func (x *BtcSpv) GetBranchProof() [][]byte
- func (x *BtcSpv) GetHeight() uint64
- func (x *BtcSpv) GetTime() int64
- func (x *BtcSpv) GetTxHash() string
- func (x *BtcSpv) GetTxIndex() uint32
- func (*BtcSpv) ProtoMessage()
- func (x *BtcSpv) ProtoReflect() protoreflect.Message
- func (x *BtcSpv) Reset()
- func (x *BtcSpv) String() string
- type BtcTransaction
- func (*BtcTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *BtcTransaction) GetBlockHeight() uint64
- func (x *BtcTransaction) GetConfirmations() uint64
- func (x *BtcTransaction) GetHash() string
- func (x *BtcTransaction) GetTime() int64
- func (x *BtcTransaction) GetVin() []*Vin
- func (x *BtcTransaction) GetVout() []*Vout
- func (*BtcTransaction) ProtoMessage()
- func (x *BtcTransaction) ProtoReflect() protoreflect.Message
- func (x *BtcTransaction) Reset()
- func (x *BtcTransaction) String() string
- type LightClientAction
- func (*LightClientAction) Descriptor() ([]byte, []int)deprecated
- func (x *LightClientAction) GetBtcHeaders() *BtcHeaders
- func (x *LightClientAction) GetTy() int32
- func (m *LightClientAction) GetValue() isLightClientAction_Value
- func (*LightClientAction) ProtoMessage()
- func (x *LightClientAction) ProtoReflect() protoreflect.Message
- func (x *LightClientAction) Reset()
- func (x *LightClientAction) String() string
- type LightClientAction_BtcHeaders
- type LightclientClient
- type LightclientServer
- type ReqGetBtcHeader
- type TssSignNotify
- func (*TssSignNotify) Descriptor() ([]byte, []int)deprecated
- func (x *TssSignNotify) GetBtcTxData() []byte
- func (x *TssSignNotify) GetInputAmounts() []int64
- func (x *TssSignNotify) GetPayload() []byte
- func (x *TssSignNotify) GetSigners() []string
- func (x *TssSignNotify) GetTxType() string
- func (*TssSignNotify) ProtoMessage()
- func (x *TssSignNotify) ProtoReflect() protoreflect.Message
- func (x *TssSignNotify) Reset()
- func (x *TssSignNotify) String() string
- type UnimplementedLightclientServer
- type Vin
- type Vout
Constants ¶
const ( TyUnknowAction = iota + 100 TyBtcHeadersAction NameBtcHeadersAction = "BtcHeaders" )
action类型id和name,这些常量可以自定义修改
const ( TyUnknownLog = iota + 100 TyBtcHeadersLog NameBtcHeadersLog = "BtcHeadersLog" )
log类型id值
Variables ¶
var File_lightclient_proto protoreflect.FileDescriptor
var (
//LightclientX 执行器名称定义
LightclientX = "lightclient"
)
Functions ¶
func GetBtcChainParams ¶
GetBtcChainParams 获取比特币链参数
func InitExecutor ¶
func InitExecutor(cfg *types.Chain33Config)
InitExecutor defines register executor
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) GetConfirmations ¶
func (*BtcHeader) GetDifficulty ¶
func (*BtcHeader) GetMerkleRoot ¶
func (*BtcHeader) GetNextHash ¶
func (*BtcHeader) GetPreviousHash ¶
func (*BtcHeader) GetVersion ¶
func (*BtcHeader) ProtoMessage ¶
func (*BtcHeader) ProtoMessage()
func (*BtcHeader) ProtoReflect ¶
func (x *BtcHeader) ProtoReflect() protoreflect.Message
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) GetBlockHash ¶
func (*BtcSpv) GetBranchProof ¶
func (*BtcSpv) GetTxIndex ¶
func (*BtcSpv) ProtoMessage ¶
func (*BtcSpv) ProtoMessage()
func (*BtcSpv) ProtoReflect ¶
func (x *BtcSpv) ProtoReflect() protoreflect.Message
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.
func NewLightclientClient ¶
func NewLightclientClient(cc grpc.ClientConnInterface) LightclientClient
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) GetAddress ¶
func (*Vin) ProtoMessage ¶
func (*Vin) ProtoMessage()
func (*Vin) ProtoReflect ¶
func (x *Vin) ProtoReflect() protoreflect.Message
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) GetAddress ¶
func (*Vout) GetCoinbase ¶
func (*Vout) ProtoMessage ¶
func (*Vout) ProtoMessage()
func (*Vout) ProtoReflect ¶
func (x *Vout) ProtoReflect() protoreflect.Message