types

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 10 Imported by: 12

Documentation

Index

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

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

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) Descriptor() ([]byte, []int)

Deprecated: Use HashRecv.ProtoReflect.Descriptor instead.

func (*HashRecv) GetHashlockId

func (x *HashRecv) GetHashlockId() []byte

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

func (*HashRecv) Reset

func (x *HashRecv) Reset()

func (*HashRecv) String

func (x *HashRecv) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Hashlock.ProtoReflect.Descriptor instead.

func (*Hashlock) GetAmount

func (x *Hashlock) GetAmount() int64

func (*Hashlock) GetCreateTime

func (x *Hashlock) GetCreateTime() int64

func (*Hashlock) GetFrozentime

func (x *Hashlock) GetFrozentime() int64

func (*Hashlock) GetHashlockId

func (x *Hashlock) GetHashlockId() []byte

func (*Hashlock) GetReturnAddress

func (x *Hashlock) GetReturnAddress() string

func (*Hashlock) GetStatus

func (x *Hashlock) GetStatus() int32

func (*Hashlock) GetToAddress

func (x *Hashlock) GetToAddress() string

func (*Hashlock) ProtoMessage

func (*Hashlock) ProtoMessage()

func (*Hashlock) ProtoReflect added in v1.65.3

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

func (*Hashlock) Reset

func (x *Hashlock) Reset()

func (*Hashlock) String

func (x *Hashlock) String() string

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

type HashlockSendTx struct {
	Secret string `json:"secret"`
	Fee    int64  `json:"fee"`
}

HashlockSendTx for construction

type HashlockType

type HashlockType struct {
	types.ExecTypeBase
}

HashlockType def

func NewType

func NewType(cfg *types.Chain33Config) *HashlockType

NewType method

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) GetName

func (hashlock *HashlockType) GetName() string

GetName 获取执行器名称

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

type HashlockUnlockTx struct {
	Secret string `json:"secret"`
	Fee    int64  `json:"fee"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL