Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRawHashlockLockTx(cfg *types.Chain33Config, parm *HashlockLockTx) (*types.Transaction, error)
- func CreateRawHashlockSendTx(cfg *types.Chain33Config, parm *HashlockSendTx) (*types.Transaction, error)
- func CreateRawHashlockUnlockTx(cfg *types.Chain33Config, parm *HashlockUnlockTx) (*types.Transaction, error)
- func InitExecutor(cfg *types.Chain33Config)
- func InitFork(cfg *types.Chain33Config)
- type HashRecv
- type Hashlock
- func (*Hashlock) Descriptor() ([]byte, []int)deprecated
- func (x *Hashlock) GetAmount() int64
- func (x *Hashlock) GetCreateTime() int64
- func (x *Hashlock) GetFrozentime() int64
- func (x *Hashlock) GetHashlockId() []byte
- func (x *Hashlock) GetReturnAddress() string
- func (x *Hashlock) GetStatus() int32
- func (x *Hashlock) GetToAddress() string
- func (*Hashlock) ProtoMessage()
- func (x *Hashlock) ProtoReflect() protoreflect.Message
- func (x *Hashlock) Reset()
- func (x *Hashlock) String() string
- type HashlockAction
- func (*HashlockAction) Descriptor() ([]byte, []int)deprecated
- func (x *HashlockAction) GetHlock() *HashlockLock
- func (x *HashlockAction) GetHsend() *HashlockSend
- func (x *HashlockAction) GetHunlock() *HashlockUnlock
- func (x *HashlockAction) GetTy() int32
- func (m *HashlockAction) GetValue() isHashlockAction_Value
- func (*HashlockAction) ProtoMessage()
- func (x *HashlockAction) ProtoReflect() protoreflect.Message
- func (x *HashlockAction) Reset()
- func (x *HashlockAction) String() string
- type HashlockAction_Hlock
- type HashlockAction_Hsend
- type HashlockAction_Hunlock
- type HashlockLock
- func (*HashlockLock) Descriptor() ([]byte, []int)deprecated
- func (x *HashlockLock) GetAmount() int64
- func (x *HashlockLock) GetHash() []byte
- func (x *HashlockLock) GetReturnAddress() string
- func (x *HashlockLock) GetTime() int64
- func (x *HashlockLock) GetToAddress() string
- func (*HashlockLock) ProtoMessage()
- func (x *HashlockLock) ProtoReflect() protoreflect.Message
- func (x *HashlockLock) Reset()
- func (x *HashlockLock) String() string
- type HashlockLockTx
- type HashlockSend
- type HashlockSendTx
- type HashlockType
- func (hashlock *HashlockType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)
- func (hashlock *HashlockType) GetLogMap() map[int64]*types.LogInfo
- func (hashlock *HashlockType) GetName() string
- func (hashlock *HashlockType) GetPayload() types.Message
- func (hashlock *HashlockType) GetTypeMap() map[string]int32
- type HashlockUnlock
- type HashlockUnlockTx
- type Hashlockquery
- func (*Hashlockquery) Descriptor() ([]byte, []int)deprecated
- func (x *Hashlockquery) GetAmount() int64
- func (x *Hashlockquery) GetCreateTime() int64
- func (x *Hashlockquery) GetCurrentTime() int64
- func (x *Hashlockquery) GetStatus() int32
- func (x *Hashlockquery) GetTime() int64
- func (*Hashlockquery) ProtoMessage()
- func (x *Hashlockquery) ProtoReflect() protoreflect.Message
- func (x *Hashlockquery) Reset()
- func (x *Hashlockquery) String() string
Constants ¶
View Source
const ( HashlockActionLock = 1 HashlockActionSend = 2 HashlockActionUnlock = 3 )
hashlock status
Variables ¶
View Source
var ( ErrHashlockAmount = errors.New("ErrHashlockAmount") ErrHashlockHash = errors.New("ErrHashlockHash") ErrHashlockStatus = errors.New("ErrHashlockStatus") ErrTime = errors.New("ErrTime") ErrHashlockReturnAddrss = errors.New("ErrHashlockReturnAddrss") ErrHashlockTime = errors.New("ErrHashlockTime") ErrHashlockReapeathash = errors.New("ErrHashlockReapeathash") ErrHashlockSendAddress = errors.New("ErrHashlockSendAddress") )
hashlock errors
View Source
var ( HashlockX = "hashlock" ForkBadRepeatSecretX = "ForkBadRepeatSecret" )
HashlockX name
View Source
var File_hashlock_proto protoreflect.FileDescriptor
Functions ¶
func CreateRawHashlockLockTx ¶
func CreateRawHashlockLockTx(cfg *types.Chain33Config, parm *HashlockLockTx) (*types.Transaction, error)
CreateRawHashlockLockTx method
func CreateRawHashlockSendTx ¶
func CreateRawHashlockSendTx(cfg *types.Chain33Config, parm *HashlockSendTx) (*types.Transaction, error)
CreateRawHashlockSendTx method
func CreateRawHashlockUnlockTx ¶
func CreateRawHashlockUnlockTx(cfg *types.Chain33Config, parm *HashlockUnlockTx) (*types.Transaction, error)
CreateRawHashlockUnlockTx method
Types ¶
type HashRecv ¶
type HashRecv struct { HashlockId []byte `protobuf:"bytes,1,opt,name=HashlockId,proto3" json:"HashlockId,omitempty"` Information *Hashlockquery `protobuf:"bytes,2,opt,name=Information,proto3" json:"Information,omitempty"` // contains filtered or unexported fields }
func (*HashRecv) Descriptor
deprecated
func (*HashRecv) GetHashlockId ¶
func (*HashRecv) GetInformation ¶
func (x *HashRecv) GetInformation() *Hashlockquery
func (*HashRecv) ProtoMessage ¶
func (*HashRecv) ProtoMessage()
func (*HashRecv) ProtoReflect ¶ added in v1.65.3
func (x *HashRecv) ProtoReflect() protoreflect.Message
type Hashlock ¶
type Hashlock struct { HashlockId []byte `protobuf:"bytes,1,opt,name=hashlockId,proto3" json:"hashlockId,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"` ToAddress string `protobuf:"bytes,4,opt,name=toAddress,proto3" json:"toAddress,omitempty"` ReturnAddress string `protobuf:"bytes,5,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` Amount int64 `protobuf:"varint,6,opt,name=amount,proto3" json:"amount,omitempty"` Frozentime int64 `protobuf:"varint,7,opt,name=frozentime,proto3" json:"frozentime,omitempty"` // contains filtered or unexported fields }
func (*Hashlock) Descriptor
deprecated
func (*Hashlock) GetCreateTime ¶
func (*Hashlock) GetFrozentime ¶
func (*Hashlock) GetHashlockId ¶
func (*Hashlock) GetReturnAddress ¶
func (*Hashlock) GetToAddress ¶
func (*Hashlock) ProtoMessage ¶
func (*Hashlock) ProtoMessage()
func (*Hashlock) ProtoReflect ¶ added in v1.65.3
func (x *Hashlock) ProtoReflect() protoreflect.Message
type HashlockAction ¶
type HashlockAction struct { // Types that are assignable to Value: // *HashlockAction_Hlock // *HashlockAction_Hsend // *HashlockAction_Hunlock Value isHashlockAction_Value `protobuf_oneof:"value"` Ty int32 `protobuf:"varint,4,opt,name=ty,proto3" json:"ty,omitempty"` // contains filtered or unexported fields }
message for hashlock
func (*HashlockAction) Descriptor
deprecated
func (*HashlockAction) Descriptor() ([]byte, []int)
Deprecated: Use HashlockAction.ProtoReflect.Descriptor instead.
func (*HashlockAction) GetHlock ¶
func (x *HashlockAction) GetHlock() *HashlockLock
func (*HashlockAction) GetHsend ¶
func (x *HashlockAction) GetHsend() *HashlockSend
func (*HashlockAction) GetHunlock ¶
func (x *HashlockAction) GetHunlock() *HashlockUnlock
func (*HashlockAction) GetTy ¶
func (x *HashlockAction) GetTy() int32
func (*HashlockAction) GetValue ¶
func (m *HashlockAction) GetValue() isHashlockAction_Value
func (*HashlockAction) ProtoMessage ¶
func (*HashlockAction) ProtoMessage()
func (*HashlockAction) ProtoReflect ¶ added in v1.65.3
func (x *HashlockAction) ProtoReflect() protoreflect.Message
func (*HashlockAction) Reset ¶
func (x *HashlockAction) Reset()
func (*HashlockAction) String ¶
func (x *HashlockAction) String() string
type HashlockAction_Hlock ¶
type HashlockAction_Hlock struct {
Hlock *HashlockLock `protobuf:"bytes,1,opt,name=hlock,proto3,oneof"`
}
type HashlockAction_Hsend ¶
type HashlockAction_Hsend struct {
Hsend *HashlockSend `protobuf:"bytes,2,opt,name=hsend,proto3,oneof"`
}
type HashlockAction_Hunlock ¶
type HashlockAction_Hunlock struct {
Hunlock *HashlockUnlock `protobuf:"bytes,3,opt,name=hunlock,proto3,oneof"`
}
type HashlockLock ¶
type HashlockLock struct { Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` ToAddress string `protobuf:"bytes,4,opt,name=toAddress,proto3" json:"toAddress,omitempty"` ReturnAddress string `protobuf:"bytes,5,opt,name=returnAddress,proto3" json:"returnAddress,omitempty"` // contains filtered or unexported fields }
func (*HashlockLock) Descriptor
deprecated
func (*HashlockLock) Descriptor() ([]byte, []int)
Deprecated: Use HashlockLock.ProtoReflect.Descriptor instead.
func (*HashlockLock) GetAmount ¶
func (x *HashlockLock) GetAmount() int64
func (*HashlockLock) GetHash ¶
func (x *HashlockLock) GetHash() []byte
func (*HashlockLock) GetReturnAddress ¶
func (x *HashlockLock) GetReturnAddress() string
func (*HashlockLock) GetTime ¶
func (x *HashlockLock) GetTime() int64
func (*HashlockLock) GetToAddress ¶
func (x *HashlockLock) GetToAddress() string
func (*HashlockLock) ProtoMessage ¶
func (*HashlockLock) ProtoMessage()
func (*HashlockLock) ProtoReflect ¶ added in v1.65.3
func (x *HashlockLock) ProtoReflect() protoreflect.Message
func (*HashlockLock) Reset ¶
func (x *HashlockLock) Reset()
func (*HashlockLock) String ¶
func (x *HashlockLock) String() string
type HashlockLockTx ¶
type HashlockLockTx struct { Secret string `json:"secret"` Amount int64 `json:"amount"` Time int64 `json:"time"` ToAddr string `json:"toAddr"` ReturnAddr string `json:"returnAddr"` Fee int64 `json:"fee"` }
HashlockLockTx for construction
type HashlockSend ¶
type HashlockSend struct { Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // bytes hash = 3; // contains filtered or unexported fields }
func (*HashlockSend) Descriptor
deprecated
func (*HashlockSend) Descriptor() ([]byte, []int)
Deprecated: Use HashlockSend.ProtoReflect.Descriptor instead.
func (*HashlockSend) GetSecret ¶
func (x *HashlockSend) GetSecret() []byte
func (*HashlockSend) ProtoMessage ¶
func (*HashlockSend) ProtoMessage()
func (*HashlockSend) ProtoReflect ¶ added in v1.65.3
func (x *HashlockSend) ProtoReflect() protoreflect.Message
func (*HashlockSend) Reset ¶
func (x *HashlockSend) Reset()
func (*HashlockSend) String ¶
func (x *HashlockSend) String() string
type HashlockSendTx ¶
HashlockSendTx for construction
type HashlockType ¶
type HashlockType struct {
types.ExecTypeBase
}
HashlockType def
func (*HashlockType) CreateTx ¶
func (hashlock *HashlockType) CreateTx(action string, message json.RawMessage) (*types.Transaction, error)
CreateTx method
func (*HashlockType) GetLogMap ¶
func (hashlock *HashlockType) GetLogMap() map[int64]*types.LogInfo
GetLogMap method
func (*HashlockType) GetPayload ¶
func (hashlock *HashlockType) GetPayload() types.Message
GetPayload method
func (*HashlockType) GetTypeMap ¶
func (hashlock *HashlockType) GetTypeMap() map[string]int32
GetTypeMap method
type HashlockUnlock ¶
type HashlockUnlock struct { Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // bytes hash = 3; // contains filtered or unexported fields }
func (*HashlockUnlock) Descriptor
deprecated
func (*HashlockUnlock) Descriptor() ([]byte, []int)
Deprecated: Use HashlockUnlock.ProtoReflect.Descriptor instead.
func (*HashlockUnlock) GetSecret ¶
func (x *HashlockUnlock) GetSecret() []byte
func (*HashlockUnlock) ProtoMessage ¶
func (*HashlockUnlock) ProtoMessage()
func (*HashlockUnlock) ProtoReflect ¶ added in v1.65.3
func (x *HashlockUnlock) ProtoReflect() protoreflect.Message
func (*HashlockUnlock) Reset ¶
func (x *HashlockUnlock) Reset()
func (*HashlockUnlock) String ¶
func (x *HashlockUnlock) String() string
type HashlockUnlockTx ¶
HashlockUnlockTx for construction
type Hashlockquery ¶
type Hashlockquery struct { Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` CreateTime int64 `protobuf:"varint,4,opt,name=createTime,proto3" json:"createTime,omitempty"` CurrentTime int64 `protobuf:"varint,5,opt,name=currentTime,proto3" json:"currentTime,omitempty"` // contains filtered or unexported fields }
func (*Hashlockquery) Descriptor
deprecated
func (*Hashlockquery) Descriptor() ([]byte, []int)
Deprecated: Use Hashlockquery.ProtoReflect.Descriptor instead.
func (*Hashlockquery) GetAmount ¶
func (x *Hashlockquery) GetAmount() int64
func (*Hashlockquery) GetCreateTime ¶
func (x *Hashlockquery) GetCreateTime() int64
func (*Hashlockquery) GetCurrentTime ¶
func (x *Hashlockquery) GetCurrentTime() int64
func (*Hashlockquery) GetStatus ¶
func (x *Hashlockquery) GetStatus() int32
func (*Hashlockquery) GetTime ¶
func (x *Hashlockquery) GetTime() int64
func (*Hashlockquery) ProtoMessage ¶
func (*Hashlockquery) ProtoMessage()
func (*Hashlockquery) ProtoReflect ¶ added in v1.65.3
func (x *Hashlockquery) ProtoReflect() protoreflect.Message
func (*Hashlockquery) Reset ¶
func (x *Hashlockquery) Reset()
func (*Hashlockquery) String ¶
func (x *Hashlockquery) String() string
Click to show internal directories.
Click to hide internal directories.