Documentation ¶
Index ¶
Constants ¶
View Source
const VERIFICATION_KEY_HASH_SIZE = 28
Variables ¶
This section is empty.
Functions ¶
func Blake2bHash ¶
*
Blake2bHash computes the Blake2b hash of the given data. Params: data ([]byte): The data to hash. Returns: []byte: The Blake2b hash of the data. error: An error if the hashing fails.
Types ¶
type ConstrainedBytes ¶
type ConstrainedBytes struct {
Payload []byte
}
func (*ConstrainedBytes) MarshalCBOR ¶
func (cb *ConstrainedBytes) MarshalCBOR() ([]byte, error)
*
MarshalCBOR serializes ConstrainedBytes into a CBOR-encoded byte slice. Returns: []byte: A CBOR-encoded byte slice representing the ConstrainedBytes. error: An error if serialization fails.
func (*ConstrainedBytes) UnmarshalCBOR ¶
func (cb *ConstrainedBytes) UnmarshalCBOR(data []byte) error
*
UnmarshalCBOR deserializes a CBOR-encoded byte slice into ConstrainedBytes. Params: data ([]byte): The CBOR-encoded byte slice. Returns: error: An error if deserialization fails.
type CustomBytes ¶
type CustomBytes struct { Value string // contains filtered or unexported fields }
func (*CustomBytes) MarshalCBOR ¶
func (cb *CustomBytes) MarshalCBOR() ([]byte, error)
*
MarshalCBOR serializes CustomBytes into a CBOR-encoded byte slice. Returns: []byte: A CBOR-encoded byte slice representing the CustomBytes. error: An error if serialization fails.
func (CustomBytes) String ¶
func (cb CustomBytes) String() string
*
String returns the Value's string representation of a CustomBytes. Returns: string: The Value's string representation of CustomBytes.
func (*CustomBytes) UnmarshalCBOR ¶
func (cb *CustomBytes) UnmarshalCBOR(value []byte) error
*
UnmarshalCBOR deserializes a CBOR-encoded byte slice into CustomBytes. Params: value ([]byte): The CBOR-encoded byte slice. Returns: error: An error if deserialization fails.
type DatumHash ¶
type DatumHash ConstrainedBytes
type PubKeyHash ¶
type PubKeyHash [28]byte
type ScriptDataHash ¶
type ScriptDataHash ConstrainedBytes
type ScriptHash ¶
type ScriptHash [28]byte
func (*ScriptHash) Bytes ¶
func (sh *ScriptHash) Bytes() []byte
*
Bytes returns the underlying byte slice of a ScriptHash. Returns: []byte: The byte slice representation of the ScriptHash.
type TransactionId ¶
type TransactionId ConstrainedBytes
Click to show internal directories.
Click to hide internal directories.