Documentation
¶
Index ¶
- type NativeScript
- func NewInvalidBefore(before int64) NativeScript
- func NewInvalidHereafter(after int64) NativeScript
- func NewScriptAll(nativeScripts []NativeScript) NativeScript
- func NewScriptAny(nativeScripts []NativeScript) NativeScript
- func NewScriptNofK(nativeScripts []NativeScript, noK int) NativeScript
- func NewScriptPubKey(keyHash []byte) NativeScript
- type ScriptTag
- type SerialHash
- type SerialInt
- type SerialNok
- type SerialScripts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeScript ¶
type NativeScript struct {
Tag ScriptTag
KeyHash []byte
NativeScripts []NativeScript
NoK int
Before int64
After int64
}
func NewInvalidBefore ¶ added in v1.0.11
func NewInvalidBefore(before int64) NativeScript
func NewInvalidHereafter ¶ added in v1.0.11
func NewInvalidHereafter(after int64) NativeScript
func NewScriptAll ¶ added in v1.0.11
func NewScriptAll(nativeScripts []NativeScript) NativeScript
func NewScriptAny ¶ added in v1.0.11
func NewScriptAny(nativeScripts []NativeScript) NativeScript
func NewScriptNofK ¶ added in v1.0.11
func NewScriptNofK(nativeScripts []NativeScript, noK int) NativeScript
func NewScriptPubKey ¶ added in v1.0.11
func NewScriptPubKey(keyHash []byte) NativeScript
func (NativeScript) Hash ¶
func (ns NativeScript) Hash() (serialization.ScriptHash, error)
*
Hash computes the script hash for the NativeScript. Returns: serialization.ScriptHash: The computed script hash. error: An error if the hashing fails.
func (*NativeScript) MarshalCBOR ¶
func (ns *NativeScript) MarshalCBOR() ([]uint8, error)
*
MarshalCBOR encodes the NativeScript into CBOR format. Returns: []uint8: The CBOR-encoded data. error: An error if encoding fails, nil otherwise.
func (*NativeScript) UnmarshalCBOR ¶
func (ns *NativeScript) UnmarshalCBOR(value []byte) error
*
UnmarshalCBOR decodes the CBOR-encoded data and populates the NativeScript fields. Params: value []byte: The CBOR-encoded data to encode. Returns: error: An error if decoding fails, nil otherwise.
type SerialHash ¶
type SerialNok ¶
type SerialNok struct {
Tag ScriptTag
NoK int
NativeScripts []NativeScript
// contains filtered or unexported fields
}
type SerialScripts ¶
type SerialScripts struct {
Tag ScriptTag
NativeScripts []NativeScript
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.