Documentation ¶
Index ¶
- Constants
- Variables
- func InitExecutor(cfg *types.Chain33Config)
- func InitFork(cfg *types.Chain33Config)
- func RegisterTicketServer(s *grpc.Server, srv TicketServer)
- type MinerFlag
- type ReceiptTicket
- func (*ReceiptTicket) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiptTicket) GetAddr() string
- func (x *ReceiptTicket) GetPrevStatus() int32
- func (x *ReceiptTicket) GetStatus() int32
- func (x *ReceiptTicket) GetTicketId() string
- func (*ReceiptTicket) ProtoMessage()
- func (x *ReceiptTicket) ProtoReflect() protoreflect.Message
- func (x *ReceiptTicket) Reset()
- func (x *ReceiptTicket) String() string
- type ReceiptTicketBind
- func (*ReceiptTicketBind) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiptTicketBind) GetNewMinerAddress() string
- func (x *ReceiptTicketBind) GetOldMinerAddress() string
- func (x *ReceiptTicketBind) GetReturnAddress() string
- func (*ReceiptTicketBind) ProtoMessage()
- func (x *ReceiptTicketBind) ProtoReflect() protoreflect.Message
- func (x *ReceiptTicketBind) Reset()
- func (x *ReceiptTicketBind) String() string
- type ReplyBindMiner
- type ReplyTicketList
- type ReplyWalletTickets
- func (*ReplyWalletTickets) Descriptor() ([]byte, []int)deprecated
- func (x *ReplyWalletTickets) GetPrivkeys() [][]byte
- func (x *ReplyWalletTickets) GetTickets() []*Ticket
- func (*ReplyWalletTickets) ProtoMessage()
- func (x *ReplyWalletTickets) ProtoReflect() protoreflect.Message
- func (x *ReplyWalletTickets) Reset()
- func (x *ReplyWalletTickets) String() string
- type ReqBindMiner
- func (*ReqBindMiner) Descriptor() ([]byte, []int)deprecated
- func (x *ReqBindMiner) GetAmount() int64
- func (x *ReqBindMiner) GetBindAddr() string
- func (x *ReqBindMiner) GetCheckBalance() bool
- func (x *ReqBindMiner) GetOriginAddr() string
- func (*ReqBindMiner) ProtoMessage()
- func (x *ReqBindMiner) ProtoReflect() protoreflect.Message
- func (x *ReqBindMiner) Reset()
- func (x *ReqBindMiner) String() string
- type Ticket
- func (*Ticket) Descriptor() ([]byte, []int)deprecated
- func (x *Ticket) GetCreateTime() int64
- func (x *Ticket) GetIsGenesis() bool
- func (x *Ticket) GetMinerAddress() string
- func (x *Ticket) GetMinerTime() int64
- func (x *Ticket) GetMinerValue() int64
- func (x *Ticket) GetPrice() int64
- func (x *Ticket) GetReturnAddress() string
- func (x *Ticket) GetStatus() int32
- func (x *Ticket) GetTicketId() string
- func (*Ticket) ProtoMessage()
- func (x *Ticket) ProtoReflect() protoreflect.Message
- func (x *Ticket) Reset()
- func (x *Ticket) String() string
- type TicketAction
- func (*TicketAction) Descriptor() ([]byte, []int)deprecated
- func (x *TicketAction) GetGenesis() *TicketGenesis
- func (x *TicketAction) GetMiner() *TicketMiner
- func (x *TicketAction) GetTbind() *TicketBind
- func (x *TicketAction) GetTclose() *TicketClose
- func (x *TicketAction) GetTopen() *TicketOpen
- func (x *TicketAction) GetTy() int32
- func (m *TicketAction) GetValue() isTicketAction_Value
- func (*TicketAction) ProtoMessage()
- func (x *TicketAction) ProtoReflect() protoreflect.Message
- func (x *TicketAction) Reset()
- func (x *TicketAction) String() string
- type TicketAction_Genesis
- type TicketAction_Miner
- type TicketAction_Tbind
- type TicketAction_Tclose
- type TicketAction_Topen
- type TicketBind
- func (*TicketBind) Descriptor() ([]byte, []int)deprecated
- func (x *TicketBind) GetMinerAddress() string
- func (x *TicketBind) GetReturnAddress() string
- func (*TicketBind) ProtoMessage()
- func (x *TicketBind) ProtoReflect() protoreflect.Message
- func (x *TicketBind) Reset()
- func (x *TicketBind) String() string
- type TicketClient
- type TicketClose
- func (*TicketClose) Descriptor() ([]byte, []int)deprecated
- func (x *TicketClose) GetMinerAddress() string
- func (x *TicketClose) GetTicketId() []string
- func (*TicketClose) ProtoMessage()
- func (x *TicketClose) ProtoReflect() protoreflect.Message
- func (x *TicketClose) Reset()
- func (x *TicketClose) String() string
- type TicketGenesis
- func (*TicketGenesis) Descriptor() ([]byte, []int)deprecated
- func (x *TicketGenesis) GetCount() int32
- func (x *TicketGenesis) GetMinerAddress() string
- func (x *TicketGenesis) GetReturnAddress() string
- func (*TicketGenesis) ProtoMessage()
- func (x *TicketGenesis) ProtoReflect() protoreflect.Message
- func (x *TicketGenesis) Reset()
- func (x *TicketGenesis) String() string
- type TicketInfos
- type TicketList
- type TicketMiner
- func (*TicketMiner) Descriptor() ([]byte, []int)deprecated
- func (x *TicketMiner) GetBits() uint32
- func (x *TicketMiner) GetModify() []byte
- func (x *TicketMiner) GetPrivHash() []byte
- func (x *TicketMiner) GetReward() int64
- func (x *TicketMiner) GetTicketId() string
- func (x *TicketMiner) GetVrfHash() []byte
- func (x *TicketMiner) GetVrfProof() []byte
- func (*TicketMiner) ProtoMessage()
- func (x *TicketMiner) ProtoReflect() protoreflect.Message
- func (x *TicketMiner) Reset()
- func (x *TicketMiner) String() string
- type TicketMinerOld
- func (*TicketMinerOld) Descriptor() ([]byte, []int)deprecated
- func (x *TicketMinerOld) GetBits() uint32
- func (x *TicketMinerOld) GetModify() []byte
- func (x *TicketMinerOld) GetReward() int64
- func (x *TicketMinerOld) GetTicketId() string
- func (*TicketMinerOld) ProtoMessage()
- func (x *TicketMinerOld) ProtoReflect() protoreflect.Message
- func (x *TicketMinerOld) Reset()
- func (x *TicketMinerOld) String() string
- type TicketMinerParam
- type TicketOpen
- func (*TicketOpen) Descriptor() ([]byte, []int)deprecated
- func (x *TicketOpen) GetCount() int32
- func (x *TicketOpen) GetMinerAddress() string
- func (x *TicketOpen) GetPubHashes() [][]byte
- func (x *TicketOpen) GetRandSeed() int64
- func (x *TicketOpen) GetReturnAddress() string
- func (*TicketOpen) ProtoMessage()
- func (x *TicketOpen) ProtoReflect() protoreflect.Message
- func (x *TicketOpen) Reset()
- func (x *TicketOpen) String() string
- type TicketServer
- type TicketType
- type UnimplementedTicketServer
- func (*UnimplementedTicketServer) CreateBindMiner(context.Context, *ReqBindMiner) (*ReplyBindMiner, error)
- func (*UnimplementedTicketServer) GetTicketCount(context.Context, *types.ReqNil) (*types.Int64, error)
- func (*UnimplementedTicketServer) SetAutoMining(context.Context, *MinerFlag) (*types.Reply, error)
Constants ¶
const ( //TicketInit ticket init status TicketInit = iota //TicketOpened ticket opened status TicketOpened //TicketMined ticket mined status TicketMined //TicketClosed ticket closed status TicketClosed )
0 -> 未成熟 1 -> 可挖矿 2 -> 已挖成功 3-> 已关闭
const ( //TyLogNewTicket new ticket log type TyLogNewTicket = 111 // TyLogCloseTicket close ticket log type TyLogCloseTicket = 112 // TyLogMinerTicket miner ticket log type TyLogMinerTicket = 113 // TyLogTicketBind bind ticket log type TyLogTicketBind = 114 )
const ( // TicketActionGenesis action type TicketActionGenesis = 11 // TicketActionOpen action type TicketActionOpen = 12 // TicketActionClose action type TicketActionClose = 13 // TicketActionList action type TicketActionList = 14 //读的接口不直接经过transaction // TicketActionInfos action type TicketActionInfos = 15 //读的接口不直接经过transaction // TicketActionMiner action miner TicketActionMiner = 16 // TicketActionBind action bind TicketActionBind = 17 )
ticket
const TicketCountOpenOnce = 1000
TicketCountOpenOnce count open once
const TicketOldParts = 3
TicketOldParts old tick type
Variables ¶
var ( // ErrNoTicket error type ErrNoTicket = errors.New("ErrNoTicket") // ErrTicketCount error type ErrTicketCount = errors.New("ErrTicketCount") // ErrTime error type ErrTime = errors.New("ErrTime") // ErrTicketClosed err type ErrTicketClosed = errors.New("ErrTicketClosed") // ErrEmptyMinerTx err type ErrEmptyMinerTx = errors.New("ErrEmptyMinerTx") // ErrMinerNotPermit err type ErrMinerNotPermit = errors.New("ErrMinerNotPermit") // ErrMinerAddr err type ErrMinerAddr = errors.New("ErrMinerAddr") // ErrModify err type ErrModify = errors.New("ErrModify") // ErrMinerTx err type ErrMinerTx = errors.New("ErrMinerTx") // ErrNoVrf err type ErrNoVrf = errors.New("ErrNoVrf") // ErrVrfVerify err type ErrVrfVerify = errors.New("ErrVrfVerify") )
var ErrOpenTicketPubHash = errors.New("ErrOpenTicketPubHash")
ErrOpenTicketPubHash err type
var File_ticket_proto protoreflect.FileDescriptor
var TicketX = "ticket"
TicketX dapp name
Functions ¶
func RegisterTicketServer ¶
func RegisterTicketServer(s *grpc.Server, srv TicketServer)
Types ¶
type MinerFlag ¶
type MinerFlag struct { Flag int32 `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"` Reserve int64 `protobuf:"varint,2,opt,name=reserve,proto3" json:"reserve,omitempty"` // contains filtered or unexported fields }
func (*MinerFlag) Descriptor
deprecated
func (*MinerFlag) GetReserve ¶
func (*MinerFlag) ProtoMessage ¶
func (*MinerFlag) ProtoMessage()
func (*MinerFlag) ProtoReflect ¶ added in v1.65.3
func (x *MinerFlag) ProtoReflect() protoreflect.Message
type ReceiptTicket ¶
type ReceiptTicket struct { TicketId string `protobuf:"bytes,1,opt,name=ticketId,proto3" json:"ticketId,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` PrevStatus int32 `protobuf:"varint,3,opt,name=prevStatus,proto3" json:"prevStatus,omitempty"` Addr string `protobuf:"bytes,4,opt,name=addr,proto3" json:"addr,omitempty"` // contains filtered or unexported fields }
func (*ReceiptTicket) Descriptor
deprecated
func (*ReceiptTicket) Descriptor() ([]byte, []int)
Deprecated: Use ReceiptTicket.ProtoReflect.Descriptor instead.
func (*ReceiptTicket) GetAddr ¶
func (x *ReceiptTicket) GetAddr() string
func (*ReceiptTicket) GetPrevStatus ¶
func (x *ReceiptTicket) GetPrevStatus() int32
func (*ReceiptTicket) GetStatus ¶
func (x *ReceiptTicket) GetStatus() int32
func (*ReceiptTicket) GetTicketId ¶
func (x *ReceiptTicket) GetTicketId() string
func (*ReceiptTicket) ProtoMessage ¶
func (*ReceiptTicket) ProtoMessage()
func (*ReceiptTicket) ProtoReflect ¶ added in v1.65.3
func (x *ReceiptTicket) ProtoReflect() protoreflect.Message
func (*ReceiptTicket) Reset ¶
func (x *ReceiptTicket) Reset()
func (*ReceiptTicket) String ¶
func (x *ReceiptTicket) String() string
type ReceiptTicketBind ¶
type ReceiptTicketBind struct { OldMinerAddress string `protobuf:"bytes,1,opt,name=oldMinerAddress,proto3" json:"oldMinerAddress,omitempty"` NewMinerAddress string `protobuf:"bytes,2,opt,name=newMinerAddress,proto3" json:"newMinerAddress,omitempty"` ReturnAddress string `protobuf:"bytes,3,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` // contains filtered or unexported fields }
func (*ReceiptTicketBind) Descriptor
deprecated
func (*ReceiptTicketBind) Descriptor() ([]byte, []int)
Deprecated: Use ReceiptTicketBind.ProtoReflect.Descriptor instead.
func (*ReceiptTicketBind) GetNewMinerAddress ¶
func (x *ReceiptTicketBind) GetNewMinerAddress() string
func (*ReceiptTicketBind) GetOldMinerAddress ¶
func (x *ReceiptTicketBind) GetOldMinerAddress() string
func (*ReceiptTicketBind) GetReturnAddress ¶
func (x *ReceiptTicketBind) GetReturnAddress() string
func (*ReceiptTicketBind) ProtoMessage ¶
func (*ReceiptTicketBind) ProtoMessage()
func (*ReceiptTicketBind) ProtoReflect ¶ added in v1.65.3
func (x *ReceiptTicketBind) ProtoReflect() protoreflect.Message
func (*ReceiptTicketBind) Reset ¶
func (x *ReceiptTicketBind) Reset()
func (*ReceiptTicketBind) String ¶
func (x *ReceiptTicketBind) String() string
type ReplyBindMiner ¶
type ReplyBindMiner struct { TxHex string `protobuf:"bytes,1,opt,name=txHex,proto3" json:"txHex,omitempty"` // contains filtered or unexported fields }
func (*ReplyBindMiner) Descriptor
deprecated
func (*ReplyBindMiner) Descriptor() ([]byte, []int)
Deprecated: Use ReplyBindMiner.ProtoReflect.Descriptor instead.
func (*ReplyBindMiner) GetTxHex ¶
func (x *ReplyBindMiner) GetTxHex() string
func (*ReplyBindMiner) ProtoMessage ¶
func (*ReplyBindMiner) ProtoMessage()
func (*ReplyBindMiner) ProtoReflect ¶ added in v1.65.3
func (x *ReplyBindMiner) ProtoReflect() protoreflect.Message
func (*ReplyBindMiner) Reset ¶
func (x *ReplyBindMiner) Reset()
func (*ReplyBindMiner) String ¶
func (x *ReplyBindMiner) String() string
type ReplyTicketList ¶
type ReplyTicketList struct { Tickets []*Ticket `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"` // contains filtered or unexported fields }
func (*ReplyTicketList) Descriptor
deprecated
func (*ReplyTicketList) Descriptor() ([]byte, []int)
Deprecated: Use ReplyTicketList.ProtoReflect.Descriptor instead.
func (*ReplyTicketList) GetTickets ¶
func (x *ReplyTicketList) GetTickets() []*Ticket
func (*ReplyTicketList) ProtoMessage ¶
func (*ReplyTicketList) ProtoMessage()
func (*ReplyTicketList) ProtoReflect ¶ added in v1.65.3
func (x *ReplyTicketList) ProtoReflect() protoreflect.Message
func (*ReplyTicketList) Reset ¶
func (x *ReplyTicketList) Reset()
func (*ReplyTicketList) String ¶
func (x *ReplyTicketList) String() string
type ReplyWalletTickets ¶
type ReplyWalletTickets struct { Tickets []*Ticket `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"` Privkeys [][]byte `protobuf:"bytes,2,rep,name=privkeys,proto3" json:"privkeys,omitempty"` // contains filtered or unexported fields }
func (*ReplyWalletTickets) Descriptor
deprecated
func (*ReplyWalletTickets) Descriptor() ([]byte, []int)
Deprecated: Use ReplyWalletTickets.ProtoReflect.Descriptor instead.
func (*ReplyWalletTickets) GetPrivkeys ¶
func (x *ReplyWalletTickets) GetPrivkeys() [][]byte
func (*ReplyWalletTickets) GetTickets ¶
func (x *ReplyWalletTickets) GetTickets() []*Ticket
func (*ReplyWalletTickets) ProtoMessage ¶
func (*ReplyWalletTickets) ProtoMessage()
func (*ReplyWalletTickets) ProtoReflect ¶ added in v1.65.3
func (x *ReplyWalletTickets) ProtoReflect() protoreflect.Message
func (*ReplyWalletTickets) Reset ¶
func (x *ReplyWalletTickets) Reset()
func (*ReplyWalletTickets) String ¶
func (x *ReplyWalletTickets) String() string
type ReqBindMiner ¶
type ReqBindMiner struct { BindAddr string `protobuf:"bytes,1,opt,name=bindAddr,proto3" json:"bindAddr,omitempty"` OriginAddr string `protobuf:"bytes,2,opt,name=originAddr,proto3" json:"originAddr,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` CheckBalance bool `protobuf:"varint,4,opt,name=checkBalance,proto3" json:"checkBalance,omitempty"` // contains filtered or unexported fields }
func (*ReqBindMiner) Descriptor
deprecated
func (*ReqBindMiner) Descriptor() ([]byte, []int)
Deprecated: Use ReqBindMiner.ProtoReflect.Descriptor instead.
func (*ReqBindMiner) GetAmount ¶
func (x *ReqBindMiner) GetAmount() int64
func (*ReqBindMiner) GetBindAddr ¶
func (x *ReqBindMiner) GetBindAddr() string
func (*ReqBindMiner) GetCheckBalance ¶
func (x *ReqBindMiner) GetCheckBalance() bool
func (*ReqBindMiner) GetOriginAddr ¶
func (x *ReqBindMiner) GetOriginAddr() string
func (*ReqBindMiner) ProtoMessage ¶
func (*ReqBindMiner) ProtoMessage()
func (*ReqBindMiner) ProtoReflect ¶ added in v1.65.3
func (x *ReqBindMiner) ProtoReflect() protoreflect.Message
func (*ReqBindMiner) Reset ¶
func (x *ReqBindMiner) Reset()
func (*ReqBindMiner) String ¶
func (x *ReqBindMiner) String() string
type Ticket ¶
type Ticket struct { TicketId string `protobuf:"bytes,1,opt,name=ticketId,proto3" json:"ticketId,omitempty"` // 0 -> 未成熟 1 -> 可挖矿 2 -> 已挖成功 3-> 已关闭 Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // genesis 创建的私钥比较特殊 IsGenesis bool `protobuf:"varint,3,opt,name=isGenesis,proto3" json:"isGenesis,omitempty"` //创建时间 CreateTime int64 `protobuf:"varint,4,opt,name=createTime,proto3" json:"createTime,omitempty"` //挖矿时间 MinerTime int64 `protobuf:"varint,5,opt,name=minerTime,proto3" json:"minerTime,omitempty"` //挖到的币的数目 MinerValue int64 `protobuf:"varint,8,opt,name=minerValue,proto3" json:"minerValue,omitempty"` MinerAddress string `protobuf:"bytes,6,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` // return wallet ReturnAddress string `protobuf:"bytes,7,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` // miner Price Price int64 `protobuf:"varint,9,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*Ticket) Descriptor
deprecated
func (*Ticket) GetCreateTime ¶
func (*Ticket) GetIsGenesis ¶
func (*Ticket) GetMinerAddress ¶
func (*Ticket) GetMinerTime ¶
func (*Ticket) GetMinerValue ¶
func (*Ticket) GetReturnAddress ¶
func (*Ticket) GetTicketId ¶
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
func (*Ticket) ProtoReflect ¶ added in v1.65.3
func (x *Ticket) ProtoReflect() protoreflect.Message
type TicketAction ¶
type TicketAction struct { // Types that are assignable to Value: // *TicketAction_Tbind // *TicketAction_Topen // *TicketAction_Genesis // *TicketAction_Tclose // *TicketAction_Miner Value isTicketAction_Value `protobuf_oneof:"value"` Ty int32 `protobuf:"varint,10,opt,name=ty,proto3" json:"ty,omitempty"` // contains filtered or unexported fields }
message for execs.ticket
func (*TicketAction) Descriptor
deprecated
func (*TicketAction) Descriptor() ([]byte, []int)
Deprecated: Use TicketAction.ProtoReflect.Descriptor instead.
func (*TicketAction) GetGenesis ¶
func (x *TicketAction) GetGenesis() *TicketGenesis
func (*TicketAction) GetMiner ¶
func (x *TicketAction) GetMiner() *TicketMiner
func (*TicketAction) GetTbind ¶
func (x *TicketAction) GetTbind() *TicketBind
func (*TicketAction) GetTclose ¶
func (x *TicketAction) GetTclose() *TicketClose
func (*TicketAction) GetTopen ¶
func (x *TicketAction) GetTopen() *TicketOpen
func (*TicketAction) GetTy ¶
func (x *TicketAction) GetTy() int32
func (*TicketAction) GetValue ¶
func (m *TicketAction) GetValue() isTicketAction_Value
func (*TicketAction) ProtoMessage ¶
func (*TicketAction) ProtoMessage()
func (*TicketAction) ProtoReflect ¶ added in v1.65.3
func (x *TicketAction) ProtoReflect() protoreflect.Message
func (*TicketAction) Reset ¶
func (x *TicketAction) Reset()
func (*TicketAction) String ¶
func (x *TicketAction) String() string
type TicketAction_Genesis ¶
type TicketAction_Genesis struct {
Genesis *TicketGenesis `protobuf:"bytes,2,opt,name=genesis,proto3,oneof"`
}
type TicketAction_Miner ¶
type TicketAction_Miner struct {
Miner *TicketMiner `protobuf:"bytes,4,opt,name=miner,proto3,oneof"`
}
type TicketAction_Tbind ¶
type TicketAction_Tbind struct {
Tbind *TicketBind `protobuf:"bytes,5,opt,name=tbind,proto3,oneof"`
}
type TicketAction_Tclose ¶
type TicketAction_Tclose struct {
Tclose *TicketClose `protobuf:"bytes,3,opt,name=tclose,proto3,oneof"`
}
type TicketAction_Topen ¶
type TicketAction_Topen struct {
Topen *TicketOpen `protobuf:"bytes,1,opt,name=topen,proto3,oneof"`
}
type TicketBind ¶
type TicketBind struct { MinerAddress string `protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` ReturnAddress string `protobuf:"bytes,2,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` // contains filtered or unexported fields }
func (*TicketBind) Descriptor
deprecated
func (*TicketBind) Descriptor() ([]byte, []int)
Deprecated: Use TicketBind.ProtoReflect.Descriptor instead.
func (*TicketBind) GetMinerAddress ¶
func (x *TicketBind) GetMinerAddress() string
func (*TicketBind) GetReturnAddress ¶
func (x *TicketBind) GetReturnAddress() string
func (*TicketBind) ProtoMessage ¶
func (*TicketBind) ProtoMessage()
func (*TicketBind) ProtoReflect ¶ added in v1.65.3
func (x *TicketBind) ProtoReflect() protoreflect.Message
func (*TicketBind) Reset ¶
func (x *TicketBind) Reset()
func (*TicketBind) String ¶
func (x *TicketBind) String() string
type TicketClient ¶
type TicketClient interface { //创建绑定挖矿 CreateBindMiner(ctx context.Context, in *ReqBindMiner, opts ...grpc.CallOption) (*ReplyBindMiner, error) //查询钱包票数 GetTicketCount(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*types.Int64, error) // Miner //设置自动挖矿 SetAutoMining(ctx context.Context, in *MinerFlag, opts ...grpc.CallOption) (*types.Reply, error) }
TicketClient is the client API for Ticket service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewTicketClient ¶
func NewTicketClient(cc grpc.ClientConnInterface) TicketClient
type TicketClose ¶
type TicketClose struct { TicketId []string `protobuf:"bytes,1,rep,name=ticketId,proto3" json:"ticketId,omitempty"` MinerAddress string `protobuf:"bytes,2,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` // contains filtered or unexported fields }
func (*TicketClose) Descriptor
deprecated
func (*TicketClose) Descriptor() ([]byte, []int)
Deprecated: Use TicketClose.ProtoReflect.Descriptor instead.
func (*TicketClose) GetMinerAddress ¶
func (x *TicketClose) GetMinerAddress() string
func (*TicketClose) GetTicketId ¶
func (x *TicketClose) GetTicketId() []string
func (*TicketClose) ProtoMessage ¶
func (*TicketClose) ProtoMessage()
func (*TicketClose) ProtoReflect ¶ added in v1.65.3
func (x *TicketClose) ProtoReflect() protoreflect.Message
func (*TicketClose) Reset ¶
func (x *TicketClose) Reset()
func (*TicketClose) String ¶
func (x *TicketClose) String() string
type TicketGenesis ¶
type TicketGenesis struct { MinerAddress string `protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` ReturnAddress string `protobuf:"bytes,2,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*TicketGenesis) Descriptor
deprecated
func (*TicketGenesis) Descriptor() ([]byte, []int)
Deprecated: Use TicketGenesis.ProtoReflect.Descriptor instead.
func (*TicketGenesis) GetCount ¶
func (x *TicketGenesis) GetCount() int32
func (*TicketGenesis) GetMinerAddress ¶
func (x *TicketGenesis) GetMinerAddress() string
func (*TicketGenesis) GetReturnAddress ¶
func (x *TicketGenesis) GetReturnAddress() string
func (*TicketGenesis) ProtoMessage ¶
func (*TicketGenesis) ProtoMessage()
func (*TicketGenesis) ProtoReflect ¶ added in v1.65.3
func (x *TicketGenesis) ProtoReflect() protoreflect.Message
func (*TicketGenesis) Reset ¶
func (x *TicketGenesis) Reset()
func (*TicketGenesis) String ¶
func (x *TicketGenesis) String() string
type TicketInfos ¶
type TicketInfos struct { TicketIds []string `protobuf:"bytes,1,rep,name=ticketIds,proto3" json:"ticketIds,omitempty"` // contains filtered or unexported fields }
func (*TicketInfos) Descriptor
deprecated
func (*TicketInfos) Descriptor() ([]byte, []int)
Deprecated: Use TicketInfos.ProtoReflect.Descriptor instead.
func (*TicketInfos) GetTicketIds ¶
func (x *TicketInfos) GetTicketIds() []string
func (*TicketInfos) ProtoMessage ¶
func (*TicketInfos) ProtoMessage()
func (*TicketInfos) ProtoReflect ¶ added in v1.65.3
func (x *TicketInfos) ProtoReflect() protoreflect.Message
func (*TicketInfos) Reset ¶
func (x *TicketInfos) Reset()
func (*TicketInfos) String ¶
func (x *TicketInfos) String() string
type TicketList ¶
type TicketList struct { Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*TicketList) Descriptor
deprecated
func (*TicketList) Descriptor() ([]byte, []int)
Deprecated: Use TicketList.ProtoReflect.Descriptor instead.
func (*TicketList) GetAddr ¶
func (x *TicketList) GetAddr() string
func (*TicketList) GetStatus ¶
func (x *TicketList) GetStatus() int32
func (*TicketList) ProtoMessage ¶
func (*TicketList) ProtoMessage()
func (*TicketList) ProtoReflect ¶ added in v1.65.3
func (x *TicketList) ProtoReflect() protoreflect.Message
func (*TicketList) Reset ¶
func (x *TicketList) Reset()
func (*TicketList) String ¶
func (x *TicketList) String() string
type TicketMiner ¶
type TicketMiner struct { Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` Reward int64 `protobuf:"varint,2,opt,name=reward,proto3" json:"reward,omitempty"` TicketId string `protobuf:"bytes,3,opt,name=ticketId,proto3" json:"ticketId,omitempty"` Modify []byte `protobuf:"bytes,4,opt,name=modify,proto3" json:"modify,omitempty"` //挖到区块时公开 PrivHash []byte `protobuf:"bytes,5,opt,name=privHash,proto3" json:"privHash,omitempty"` // VRF计算得到的hash VrfHash []byte `protobuf:"bytes,6,opt,name=vrfHash,proto3" json:"vrfHash,omitempty"` // VRF计算得到的proof VrfProof []byte `protobuf:"bytes,7,opt,name=vrfProof,proto3" json:"vrfProof,omitempty"` // contains filtered or unexported fields }
func (*TicketMiner) Descriptor
deprecated
func (*TicketMiner) Descriptor() ([]byte, []int)
Deprecated: Use TicketMiner.ProtoReflect.Descriptor instead.
func (*TicketMiner) GetBits ¶
func (x *TicketMiner) GetBits() uint32
func (*TicketMiner) GetModify ¶
func (x *TicketMiner) GetModify() []byte
func (*TicketMiner) GetPrivHash ¶
func (x *TicketMiner) GetPrivHash() []byte
func (*TicketMiner) GetReward ¶
func (x *TicketMiner) GetReward() int64
func (*TicketMiner) GetTicketId ¶
func (x *TicketMiner) GetTicketId() string
func (*TicketMiner) GetVrfHash ¶
func (x *TicketMiner) GetVrfHash() []byte
func (*TicketMiner) GetVrfProof ¶
func (x *TicketMiner) GetVrfProof() []byte
func (*TicketMiner) ProtoMessage ¶
func (*TicketMiner) ProtoMessage()
func (*TicketMiner) ProtoReflect ¶ added in v1.65.3
func (x *TicketMiner) ProtoReflect() protoreflect.Message
func (*TicketMiner) Reset ¶
func (x *TicketMiner) Reset()
func (*TicketMiner) String ¶
func (x *TicketMiner) String() string
type TicketMinerOld ¶
type TicketMinerOld struct { Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` Reward int64 `protobuf:"varint,2,opt,name=reward,proto3" json:"reward,omitempty"` TicketId string `protobuf:"bytes,3,opt,name=ticketId,proto3" json:"ticketId,omitempty"` Modify []byte `protobuf:"bytes,4,opt,name=modify,proto3" json:"modify,omitempty"` // contains filtered or unexported fields }
func (*TicketMinerOld) Descriptor
deprecated
func (*TicketMinerOld) Descriptor() ([]byte, []int)
Deprecated: Use TicketMinerOld.ProtoReflect.Descriptor instead.
func (*TicketMinerOld) GetBits ¶
func (x *TicketMinerOld) GetBits() uint32
func (*TicketMinerOld) GetModify ¶
func (x *TicketMinerOld) GetModify() []byte
func (*TicketMinerOld) GetReward ¶
func (x *TicketMinerOld) GetReward() int64
func (*TicketMinerOld) GetTicketId ¶
func (x *TicketMinerOld) GetTicketId() string
func (*TicketMinerOld) ProtoMessage ¶
func (*TicketMinerOld) ProtoMessage()
func (*TicketMinerOld) ProtoReflect ¶ added in v1.65.3
func (x *TicketMinerOld) ProtoReflect() protoreflect.Message
func (*TicketMinerOld) Reset ¶
func (x *TicketMinerOld) Reset()
func (*TicketMinerOld) String ¶
func (x *TicketMinerOld) String() string
type TicketMinerParam ¶
type TicketMinerParam struct { CoinDevFund int64 CoinReward int64 FutureBlockTime int64 TicketPrice int64 TicketFrozenTime int64 TicketWithdrawTime int64 TicketMinerWaitTime int64 TargetTimespan time.Duration TargetTimePerBlock time.Duration RetargetAdjustmentFactor int64 }
TicketMinerParam ...
func GetTicketMinerParam ¶
func GetTicketMinerParam(cfg *types.Chain33Config, height int64) *TicketMinerParam
GetTicketMinerParam 获取ticket miner config params
type TicketOpen ¶
type TicketOpen struct { //用户挖矿的ticket 地址 MinerAddress string `protobuf:"bytes,1,opt,name=minerAddress,proto3" json:"minerAddress,omitempty"` //购买ticket的数目 Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` //币实际存储的地址 ReturnAddress string `protobuf:"bytes,3,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` //随机种子 RandSeed int64 `protobuf:"varint,4,opt,name=randSeed,proto3" json:"randSeed,omitempty"` //购买ticket时公开 PubHashes [][]byte `protobuf:"bytes,5,rep,name=pubHashes,proto3" json:"pubHashes,omitempty"` // contains filtered or unexported fields }
func (*TicketOpen) Descriptor
deprecated
func (*TicketOpen) Descriptor() ([]byte, []int)
Deprecated: Use TicketOpen.ProtoReflect.Descriptor instead.
func (*TicketOpen) GetCount ¶
func (x *TicketOpen) GetCount() int32
func (*TicketOpen) GetMinerAddress ¶
func (x *TicketOpen) GetMinerAddress() string
func (*TicketOpen) GetPubHashes ¶
func (x *TicketOpen) GetPubHashes() [][]byte
func (*TicketOpen) GetRandSeed ¶
func (x *TicketOpen) GetRandSeed() int64
func (*TicketOpen) GetReturnAddress ¶
func (x *TicketOpen) GetReturnAddress() string
func (*TicketOpen) ProtoMessage ¶
func (*TicketOpen) ProtoMessage()
func (*TicketOpen) ProtoReflect ¶ added in v1.65.3
func (x *TicketOpen) ProtoReflect() protoreflect.Message
func (*TicketOpen) Reset ¶
func (x *TicketOpen) Reset()
func (*TicketOpen) String ¶
func (x *TicketOpen) String() string
type TicketServer ¶
type TicketServer interface { //创建绑定挖矿 CreateBindMiner(context.Context, *ReqBindMiner) (*ReplyBindMiner, error) //查询钱包票数 GetTicketCount(context.Context, *types.ReqNil) (*types.Int64, error) // Miner //设置自动挖矿 SetAutoMining(context.Context, *MinerFlag) (*types.Reply, error) }
TicketServer is the server API for Ticket service.
type TicketType ¶
type TicketType struct {
types.ExecTypeBase
}
TicketType ticket exec type
func (TicketType) Amount ¶
func (ticket TicketType) Amount(tx *types.Transaction) (int64, error)
Amount get amount
func (*TicketType) GetLogMap ¶
func (ticket *TicketType) GetLogMap() map[int64]*types.LogInfo
GetLogMap get log map
func (*TicketType) GetPayload ¶
func (ticket *TicketType) GetPayload() types.Message
GetPayload get payload
func (*TicketType) GetTypeMap ¶
func (ticket *TicketType) GetTypeMap() map[string]int32
GetTypeMap get type map
type UnimplementedTicketServer ¶
type UnimplementedTicketServer struct { }
UnimplementedTicketServer can be embedded to have forward compatible implementations.
func (*UnimplementedTicketServer) CreateBindMiner ¶
func (*UnimplementedTicketServer) CreateBindMiner(context.Context, *ReqBindMiner) (*ReplyBindMiner, error)