Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRawHashlockLockTx(parm *HashlockLockTx) (*types.Transaction, error)
- func CreateRawHashlockSendTx(parm *HashlockSendTx) (*types.Transaction, error)
- func CreateRawHashlockUnlockTx(parm *HashlockUnlockTx) (*types.Transaction, error)
- type HashRecv
- func (*HashRecv) Descriptor() ([]byte, []int)
- func (m *HashRecv) GetHashlockId() []byte
- func (m *HashRecv) GetInformation() *Hashlockquery
- func (*HashRecv) ProtoMessage()
- func (m *HashRecv) Reset()
- func (m *HashRecv) String() string
- func (m *HashRecv) XXX_DiscardUnknown()
- func (m *HashRecv) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HashRecv) XXX_Merge(src proto.Message)
- func (m *HashRecv) XXX_Size() int
- func (m *HashRecv) XXX_Unmarshal(b []byte) error
- type Hashlock
- func (*Hashlock) Descriptor() ([]byte, []int)
- func (m *Hashlock) GetAmount() int64
- func (m *Hashlock) GetCreateTime() int64
- func (m *Hashlock) GetFrozentime() int64
- func (m *Hashlock) GetHashlockId() []byte
- func (m *Hashlock) GetReturnAddress() string
- func (m *Hashlock) GetStatus() int32
- func (m *Hashlock) GetToAddress() string
- func (*Hashlock) ProtoMessage()
- func (m *Hashlock) Reset()
- func (m *Hashlock) String() string
- func (m *Hashlock) XXX_DiscardUnknown()
- func (m *Hashlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Hashlock) XXX_Merge(src proto.Message)
- func (m *Hashlock) XXX_Size() int
- func (m *Hashlock) XXX_Unmarshal(b []byte) error
- type HashlockAction
- func (*HashlockAction) Descriptor() ([]byte, []int)
- func (m *HashlockAction) GetHlock() *HashlockLock
- func (m *HashlockAction) GetHsend() *HashlockSend
- func (m *HashlockAction) GetHunlock() *HashlockUnlock
- func (m *HashlockAction) GetTy() int32
- func (m *HashlockAction) GetValue() isHashlockAction_Value
- func (*HashlockAction) ProtoMessage()
- func (m *HashlockAction) Reset()
- func (m *HashlockAction) String() string
- func (m *HashlockAction) XXX_DiscardUnknown()
- func (m *HashlockAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HashlockAction) XXX_Merge(src proto.Message)
- func (*HashlockAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *HashlockAction) XXX_Size() int
- func (m *HashlockAction) XXX_Unmarshal(b []byte) error
- type HashlockAction_Hlock
- type HashlockAction_Hsend
- type HashlockAction_Hunlock
- type HashlockLock
- func (*HashlockLock) Descriptor() ([]byte, []int)
- func (m *HashlockLock) GetAmount() int64
- func (m *HashlockLock) GetHash() []byte
- func (m *HashlockLock) GetReturnAddress() string
- func (m *HashlockLock) GetTime() int64
- func (m *HashlockLock) GetToAddress() string
- func (*HashlockLock) ProtoMessage()
- func (m *HashlockLock) Reset()
- func (m *HashlockLock) String() string
- func (m *HashlockLock) XXX_DiscardUnknown()
- func (m *HashlockLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HashlockLock) XXX_Merge(src proto.Message)
- func (m *HashlockLock) XXX_Size() int
- func (m *HashlockLock) XXX_Unmarshal(b []byte) error
- type HashlockLockTx
- type HashlockSend
- func (*HashlockSend) Descriptor() ([]byte, []int)
- func (m *HashlockSend) GetSecret() []byte
- func (*HashlockSend) ProtoMessage()
- func (m *HashlockSend) Reset()
- func (m *HashlockSend) String() string
- func (m *HashlockSend) XXX_DiscardUnknown()
- func (m *HashlockSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HashlockSend) XXX_Merge(src proto.Message)
- func (m *HashlockSend) XXX_Size() int
- func (m *HashlockSend) XXX_Unmarshal(b []byte) error
- 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
- func (*HashlockUnlock) Descriptor() ([]byte, []int)
- func (m *HashlockUnlock) GetSecret() []byte
- func (*HashlockUnlock) ProtoMessage()
- func (m *HashlockUnlock) Reset()
- func (m *HashlockUnlock) String() string
- func (m *HashlockUnlock) XXX_DiscardUnknown()
- func (m *HashlockUnlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *HashlockUnlock) XXX_Merge(src proto.Message)
- func (m *HashlockUnlock) XXX_Size() int
- func (m *HashlockUnlock) XXX_Unmarshal(b []byte) error
- type HashlockUnlockTx
- type Hashlockquery
- func (*Hashlockquery) Descriptor() ([]byte, []int)
- func (m *Hashlockquery) GetAmount() int64
- func (m *Hashlockquery) GetCreateTime() int64
- func (m *Hashlockquery) GetCurrentTime() int64
- func (m *Hashlockquery) GetStatus() int32
- func (m *Hashlockquery) GetTime() int64
- func (*Hashlockquery) ProtoMessage()
- func (m *Hashlockquery) Reset()
- func (m *Hashlockquery) String() string
- func (m *Hashlockquery) XXX_DiscardUnknown()
- func (m *Hashlockquery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Hashlockquery) XXX_Merge(src proto.Message)
- func (m *Hashlockquery) XXX_Size() int
- func (m *Hashlockquery) XXX_Unmarshal(b []byte) error
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
Functions ¶
func CreateRawHashlockLockTx ¶
func CreateRawHashlockLockTx(parm *HashlockLockTx) (*types.Transaction, error)
CreateRawHashlockLockTx method
func CreateRawHashlockSendTx ¶
func CreateRawHashlockSendTx(parm *HashlockSendTx) (*types.Transaction, error)
CreateRawHashlockSendTx method
func CreateRawHashlockUnlockTx ¶
func CreateRawHashlockUnlockTx(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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HashRecv) Descriptor ¶
func (*HashRecv) GetHashlockId ¶
func (*HashRecv) GetInformation ¶
func (m *HashRecv) GetInformation() *Hashlockquery
func (*HashRecv) ProtoMessage ¶
func (*HashRecv) ProtoMessage()
func (*HashRecv) XXX_DiscardUnknown ¶
func (m *HashRecv) XXX_DiscardUnknown()
func (*HashRecv) XXX_Marshal ¶
func (*HashRecv) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Hashlock) Descriptor ¶
func (*Hashlock) GetCreateTime ¶
func (*Hashlock) GetFrozentime ¶
func (*Hashlock) GetHashlockId ¶
func (*Hashlock) GetReturnAddress ¶
func (*Hashlock) GetToAddress ¶
func (*Hashlock) ProtoMessage ¶
func (*Hashlock) ProtoMessage()
func (*Hashlock) XXX_DiscardUnknown ¶
func (m *Hashlock) XXX_DiscardUnknown()
func (*Hashlock) XXX_Marshal ¶
func (*Hashlock) XXX_Unmarshal ¶
type HashlockAction ¶
type HashlockAction struct { // Types that are valid to be assigned 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
message for hashlock
func (*HashlockAction) Descriptor ¶
func (*HashlockAction) Descriptor() ([]byte, []int)
func (*HashlockAction) GetHlock ¶
func (m *HashlockAction) GetHlock() *HashlockLock
func (*HashlockAction) GetHsend ¶
func (m *HashlockAction) GetHsend() *HashlockSend
func (*HashlockAction) GetHunlock ¶
func (m *HashlockAction) GetHunlock() *HashlockUnlock
func (*HashlockAction) GetTy ¶
func (m *HashlockAction) GetTy() int32
func (*HashlockAction) GetValue ¶
func (m *HashlockAction) GetValue() isHashlockAction_Value
func (*HashlockAction) ProtoMessage ¶
func (*HashlockAction) ProtoMessage()
func (*HashlockAction) Reset ¶
func (m *HashlockAction) Reset()
func (*HashlockAction) String ¶
func (m *HashlockAction) String() string
func (*HashlockAction) XXX_DiscardUnknown ¶
func (m *HashlockAction) XXX_DiscardUnknown()
func (*HashlockAction) XXX_Marshal ¶
func (m *HashlockAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HashlockAction) XXX_Merge ¶
func (dst *HashlockAction) XXX_Merge(src proto.Message)
func (*HashlockAction) XXX_OneofFuncs ¶
func (*HashlockAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*HashlockAction) XXX_Size ¶
func (m *HashlockAction) XXX_Size() int
func (*HashlockAction) XXX_Unmarshal ¶
func (m *HashlockAction) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HashlockLock) Descriptor ¶
func (*HashlockLock) Descriptor() ([]byte, []int)
func (*HashlockLock) GetAmount ¶
func (m *HashlockLock) GetAmount() int64
func (*HashlockLock) GetHash ¶
func (m *HashlockLock) GetHash() []byte
func (*HashlockLock) GetReturnAddress ¶
func (m *HashlockLock) GetReturnAddress() string
func (*HashlockLock) GetTime ¶
func (m *HashlockLock) GetTime() int64
func (*HashlockLock) GetToAddress ¶
func (m *HashlockLock) GetToAddress() string
func (*HashlockLock) ProtoMessage ¶
func (*HashlockLock) ProtoMessage()
func (*HashlockLock) Reset ¶
func (m *HashlockLock) Reset()
func (*HashlockLock) String ¶
func (m *HashlockLock) String() string
func (*HashlockLock) XXX_DiscardUnknown ¶
func (m *HashlockLock) XXX_DiscardUnknown()
func (*HashlockLock) XXX_Marshal ¶
func (m *HashlockLock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HashlockLock) XXX_Merge ¶
func (dst *HashlockLock) XXX_Merge(src proto.Message)
func (*HashlockLock) XXX_Size ¶
func (m *HashlockLock) XXX_Size() int
func (*HashlockLock) XXX_Unmarshal ¶
func (m *HashlockLock) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HashlockSend) Descriptor ¶
func (*HashlockSend) Descriptor() ([]byte, []int)
func (*HashlockSend) GetSecret ¶
func (m *HashlockSend) GetSecret() []byte
func (*HashlockSend) ProtoMessage ¶
func (*HashlockSend) ProtoMessage()
func (*HashlockSend) Reset ¶
func (m *HashlockSend) Reset()
func (*HashlockSend) String ¶
func (m *HashlockSend) String() string
func (*HashlockSend) XXX_DiscardUnknown ¶
func (m *HashlockSend) XXX_DiscardUnknown()
func (*HashlockSend) XXX_Marshal ¶
func (m *HashlockSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HashlockSend) XXX_Merge ¶
func (dst *HashlockSend) XXX_Merge(src proto.Message)
func (*HashlockSend) XXX_Size ¶
func (m *HashlockSend) XXX_Size() int
func (*HashlockSend) XXX_Unmarshal ¶
func (m *HashlockSend) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HashlockUnlock) Descriptor ¶
func (*HashlockUnlock) Descriptor() ([]byte, []int)
func (*HashlockUnlock) GetSecret ¶
func (m *HashlockUnlock) GetSecret() []byte
func (*HashlockUnlock) ProtoMessage ¶
func (*HashlockUnlock) ProtoMessage()
func (*HashlockUnlock) Reset ¶
func (m *HashlockUnlock) Reset()
func (*HashlockUnlock) String ¶
func (m *HashlockUnlock) String() string
func (*HashlockUnlock) XXX_DiscardUnknown ¶
func (m *HashlockUnlock) XXX_DiscardUnknown()
func (*HashlockUnlock) XXX_Marshal ¶
func (m *HashlockUnlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HashlockUnlock) XXX_Merge ¶
func (dst *HashlockUnlock) XXX_Merge(src proto.Message)
func (*HashlockUnlock) XXX_Size ¶
func (m *HashlockUnlock) XXX_Size() int
func (*HashlockUnlock) XXX_Unmarshal ¶
func (m *HashlockUnlock) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Hashlockquery) Descriptor ¶
func (*Hashlockquery) Descriptor() ([]byte, []int)
func (*Hashlockquery) GetAmount ¶
func (m *Hashlockquery) GetAmount() int64
func (*Hashlockquery) GetCreateTime ¶
func (m *Hashlockquery) GetCreateTime() int64
func (*Hashlockquery) GetCurrentTime ¶
func (m *Hashlockquery) GetCurrentTime() int64
func (*Hashlockquery) GetStatus ¶
func (m *Hashlockquery) GetStatus() int32
func (*Hashlockquery) GetTime ¶
func (m *Hashlockquery) GetTime() int64
func (*Hashlockquery) ProtoMessage ¶
func (*Hashlockquery) ProtoMessage()
func (*Hashlockquery) Reset ¶
func (m *Hashlockquery) Reset()
func (*Hashlockquery) String ¶
func (m *Hashlockquery) String() string
func (*Hashlockquery) XXX_DiscardUnknown ¶
func (m *Hashlockquery) XXX_DiscardUnknown()
func (*Hashlockquery) XXX_Marshal ¶
func (m *Hashlockquery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Hashlockquery) XXX_Merge ¶
func (dst *Hashlockquery) XXX_Merge(src proto.Message)
func (*Hashlockquery) XXX_Size ¶
func (m *Hashlockquery) XXX_Size() int
func (*Hashlockquery) XXX_Unmarshal ¶
func (m *Hashlockquery) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.