Expand description
Provides various utilities that are commonly used throughout the Miden client library.
Structs§
- Lazy
Lock - A value which is initialized on the first access.
- Script
Builder Error
Enums§
- Deserialization
Error - Defines errors which can occur during deserialization.
- Token
Parse Error - Errors that can occur when parsing a token represented as a decimal number in a string into base units.
Traits§
- Byte
Reader - Defines how primitive values are to be read from
Self. - Byte
Writer - Defines how primitive values are to be written into
Self. - Deserializable
- Defines how to deserialize
Selffrom bytes. - Serializable
- Defines how to serialize
Selfinto bytes. - ToHex
- This trait represents a value that can be converted to a string of hexadecimal digits which represent the raw byte encoding of that value.
Functions§
- base_
units_ to_ tokens - Converts an amount in the faucet base units to the token’s decimals.
- bytes_
to_ hex_ string - Renders an array of bytes as hex into a String.
- get_
public_ keys_ from_ account - Gets the public key from the storage of an account. The function is required to create an
AccountFilefor exporting accounts in the cli and the web client. - hex_
to_ bytes - Parses a hex string into an array of bytes of known size.
- tokens_
to_ base_ units - Converts a decimal number, represented as a string, into an integer by shifting the decimal point to the right by a specified number of decimal places.
Type Aliases§
- RwLock
- A reader-writer lock
- RwLock
Read Guard - RAII structure used to release the shared read access of a lock when dropped.
- RwLock
Write Guard - RAII structure used to release the exclusive write access of a lock when dropped.