Documentation
¶
Index ¶
- Constants
- type AndCondition
- type BooleanCondition
- type CalledByContractCondition
- type CalledByEntryCondition
- type CalledByGroupCondition
- type GroupCondition
- type IWitnessCondition
- type NotCondition
- type OrCondition
- type ScriptHashCondition
- type WitnessCondition
- func DeserializeConditionFrom(br *io.BinaryReader, maxNestDepth int) *WitnessCondition
- func DeserializeConditions(br *io.BinaryReader, maxNestDepth int) []*WitnessCondition
- func NewWitnessCondition(t WitnessConditionType, v interface{}) *WitnessCondition
- func NewWitnessConditionWithError(t WitnessConditionType, v interface{}) (*WitnessCondition, error)
- type WitnessConditionType
Constants ¶
View Source
const ( MaxSubItems = 16 MaxNestingDepth = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndCondition ¶
type AndCondition struct {
// contains filtered or unexported fields
}
AndCondition Represents the condition that all conditions must be met.
func (AndCondition) GetSize ¶
func (this AndCondition) GetSize() int
func (AndCondition) GetType ¶
func (this AndCondition) GetType() WitnessConditionType
type BooleanCondition ¶
type BooleanCondition struct {
// contains filtered or unexported fields
}
BooleanCondition Indicates that the condition will always be met or not met.
func (BooleanCondition) GetSize ¶
func (this BooleanCondition) GetSize() int
func (BooleanCondition) GetType ¶
func (this BooleanCondition) GetType() WitnessConditionType
type CalledByContractCondition ¶
type CalledByContractCondition struct {
// contains filtered or unexported fields
}
CalledByContractCondition represents the contract script hash to be checked.
func (CalledByContractCondition) GetSize ¶
func (this CalledByContractCondition) GetSize() int
func (CalledByContractCondition) GetType ¶
func (this CalledByContractCondition) GetType() WitnessConditionType
type CalledByEntryCondition ¶
type CalledByEntryCondition struct { }
func (CalledByEntryCondition) GetSize ¶
func (this CalledByEntryCondition) GetSize() int
func (CalledByEntryCondition) GetType ¶
func (this CalledByEntryCondition) GetType() WitnessConditionType
type CalledByGroupCondition ¶
type CalledByGroupCondition struct {
// contains filtered or unexported fields
}
CalledByGroupCondition represents the group to be checked.
func (CalledByGroupCondition) GetSize ¶
func (this CalledByGroupCondition) GetSize() int
func (CalledByGroupCondition) GetType ¶
func (this CalledByGroupCondition) GetType() WitnessConditionType
type GroupCondition ¶
type GroupCondition struct {
// contains filtered or unexported fields
}
GroupCondition represents the group to be checked.
func (GroupCondition) GetSize ¶
func (this GroupCondition) GetSize() int
func (GroupCondition) GetType ¶
func (this GroupCondition) GetType() WitnessConditionType
type IWitnessCondition ¶
type IWitnessCondition interface { GetType() WitnessConditionType GetSize() int }
IWitnessCondition is not used, use WitnessCondition instead
func CreateWitnessCondition ¶
func CreateWitnessCondition(t WitnessConditionType, v interface{}) (IWitnessCondition, error)
type NotCondition ¶
type NotCondition struct {
// contains filtered or unexported fields
}
NotCondition Reverses another condition.
func (NotCondition) GetSize ¶
func (this NotCondition) GetSize() int
func (NotCondition) GetType ¶
func (this NotCondition) GetType() WitnessConditionType
type OrCondition ¶
type OrCondition struct {
// contains filtered or unexported fields
}
OrCondition Represents the condition that any of the conditions musts.
func (OrCondition) GetSize ¶
func (this OrCondition) GetSize() int
func (OrCondition) GetType ¶
func (this OrCondition) GetType() WitnessConditionType
type ScriptHashCondition ¶
type ScriptHashCondition struct {
// contains filtered or unexported fields
}
ScriptHashCondition represents the script hash to be checked.
func (ScriptHashCondition) GetSize ¶
func (this ScriptHashCondition) GetSize() int
func (ScriptHashCondition) GetType ¶
func (this ScriptHashCondition) GetType() WitnessConditionType
type WitnessCondition ¶
type WitnessCondition struct { Type WitnessConditionType // contains filtered or unexported fields }
func DeserializeConditionFrom ¶
func DeserializeConditionFrom(br *io.BinaryReader, maxNestDepth int) *WitnessCondition
func DeserializeConditions ¶
func DeserializeConditions(br *io.BinaryReader, maxNestDepth int) []*WitnessCondition
func NewWitnessCondition ¶
func NewWitnessCondition(t WitnessConditionType, v interface{}) *WitnessCondition
func NewWitnessConditionWithError ¶
func NewWitnessConditionWithError(t WitnessConditionType, v interface{}) (*WitnessCondition, error)
func (*WitnessCondition) Deserialize ¶
func (this *WitnessCondition) Deserialize(br *io.BinaryReader)
func (*WitnessCondition) GetCondition ¶
func (this *WitnessCondition) GetCondition() interface{}
func (*WitnessCondition) GetSize ¶
func (this *WitnessCondition) GetSize() int
func (*WitnessCondition) Serialize ¶
func (this *WitnessCondition) Serialize(bw *io.BinaryWriter)
type WitnessConditionType ¶
type WitnessConditionType byte
const ( Boolean WitnessConditionType = 0x00 Not WitnessConditionType = 0x01 And WitnessConditionType = 0x02 Or WitnessConditionType = 0x03 ScriptHash WitnessConditionType = 0x18 // 0b_0001_1000 Group WitnessConditionType = 0x19 // 0b_0001_1001 CalledByEntryType WitnessConditionType = 0x20 // 0b_0010_0000 CalledByContract WitnessConditionType = 0x28 // 0b_0010_1000 CalledByGroup WitnessConditionType = 0x29 // 0b_0010_1001 )
func (WitnessConditionType) GetSize ¶
func (w WitnessConditionType) GetSize() int
func (WitnessConditionType) String ¶
func (w WitnessConditionType) String() string
Click to show internal directories.
Click to hide internal directories.