Expand description
This crate contains types that are used across the Tari Template ecosystem.
This includes:
- Substate address types (e.g.
ComponentAddress,ResourceAddress,NonFungibleAddressetc.) - Auth and access rules (e.g.
AccessRule,OwnerRule) - a 128-bit unsigned
Amounttype and a 192-bit signedPrecisionAmounttype (if theprecisionfeature is enabled) - stealth crypto types and traits (e.g.
EncryptedData,StealthTransferStatementetc.) - various utility types and traits (e.g.
Metadata,Hash,MaxBytes,MaxStringetc.)
Include this crate when you need these types but aren’t authoring a template (e.g. building a wallet).
For template authors, you typically want to use the tari_template_lib crate instead, which re-exports this crate.
no_std is supported by excluding the std feature and enabling the alloc feature.
Re-exports§
pub use access_rules::AccessRule;
Modules§
- access_
rules - Access control rules for template-related data like component methods and resources
- address_
prefixes - bytes
- confidential
- constants
- A collection of convenient constant values
- crypto
- Cryptography utilities related to public keys and balance proofs
- engine_
args - hex
- public_
macros - serde_
helpers - stealth
Macros§
- __
build_ vec - __
build_ vec_ inner - __
expr_ counter - Low-level macro used for counting characters in the encoding of arguments. Not intended for general usage
- __
require_ rule - __
restricted_ access_ rule - __
rule_ requirement - amount
- Creates a constant
Amountfrom a string literal representing a base-10 integer at compile time. - custom_
signature_ domain - impl_
from - Macro to implement
Fromtrait for a type that can be constructed from an integer. - impl_
try_ from - metadata
- Creates a metadata object
- newtype_
struct_ serde_ impl - Low-level macro used for generating serde serializers/deserializers for newtype structs that should be represented as string in human-readable contexts. Not intended for general usage
- op_impl
- partial_
eq_ impl - partial_
ord_ impl - rule
- A macro to build access rules for components and resources.
Structs§
- Amount
- A 128-bit signed amount.
- Auth
Hook - Auth
Hook Caller - Claimed
Output Tombstone Address - The global identifier of a claimed layer-one output in the Tari network. This substate is created when a L1 UTXO is claimed to prevent double claims.
- Component
Address - A component’s unique global identifier.
- Component
Key - Encrypted
Data - Used by the receiver to determine the value and mask of the commitment. Used in stealth and confidential transfers, as well as Minotari burns
- Entity
Id - Hash32
- Representation of a 32-byte hash value
- Hash
Parse Error - Representation of a hash parsing error
- Invalid
Byte Length Error - Represents an error that occurs when reading byte data with an unexpected length
- KeyParse
Error - Representation of a hash parsing error
- LogLevel
Parse Error - Error when trying to parse a log level from an
String - MaxBytes
- MaxString
- MaxString
Error - MaxVec
- Metadata
- A collection of user-defined data used to describe other types, for example, non-fungible tokens or events
- NonFungible
Address - The unique identifier of a non-fungible index in the Tari network
- NonFungible
Address Contents - A NonFungibleId namespaced by a ResourceAddress.
- Object
Key - Representation of a 32-byte object key
- Parse
Resource Type Error - Resource
Address - The globally-unique identifier of a resource.
- Resource
Info - Info for a resource, including its type and divisibility.
- Transaction
Receipt Address - Utxo
Address - Utxo
Address Contents - A NonFungibleId namespaced by a ResourceAddress.
- UtxoId
- Validator
FeePool Address - VaultId
- A vault’s unique identification in the Tari network
Enums§
- Binary
Tag - A tag applied to various engine types. We use an unassigned CBOR tag range (128 to 255 inclusive). https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml
- LogLevel
- All the possible log levels
- NonFungible
Id - The unique identification of a non-fungible token inside it’s parent resource
- Owner
Rule - An enum for all possible ways to specify ownership of values
- Parse
NonFungible Address Error - All the types of errors that can occur when parsing a non-fungible addresses
- Parse
NonFungible IdError - All the types of errors that can occur when parsing a non-fungible ID
- Resource
Type - Represents every possible type of resource in the Tari network.
- Substate
Owner Rule
Functions§
Type Aliases§
- Function
Name - Template
Address - The address of a Template