Expand description
Scrypto preludes.
Re-exports
pub use crate::resource::non_fungible::ScryptoNonFungibleLocalId;
pub use super::radix_engine_derive;
pub use super::radix_engine_interface;
pub use super::scrypto_abi;
pub use crate::abi::*;
pub use crate::component::*;
pub use crate::resource::*;
pub use crate::runtime::*;
Modules
Definitions of safe integers and uints.
Definitions of safe integers and uints.
Scrypto custom types
A contiguous growable array type with heap-allocated contents, written
Vec<T>
.Macros
Constructs argument list for Scrypto function/method invocation.
This macro converts a
ComponentAddress
into a &Component
via the
Radix Engine component subsystem.This macro creates a
&Package
from a PackageAddress
via the
Radix Engine component subsystem.This macro creates a
&ResourceManager
from a ResourceAddress
via the
Radix Engine resource subsystem.Logs a
DEBUG
message.Creates a
Decimal
from literals.Logs an
ERROR
message.Generates a bridge/stub to make package calls to a blueprint.
Generates a bridge/stub to make cross-component calls.
Creates a safe integer from literals.
You must specify the type of the
integer you want to create.
Imports a blueprint from its ABI.
Includes the ABI file of a Scrypto package.
Includes the WASM file of a Scrypto package.
Logs an
INFO
message.Creates a
PreciseDecimal
from literals.Logs a
TRACE
message.Logs a
WARN
message.Structs
Method authorization rules for a component
An ordered set based on a B-Tree.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Bytes, of length between 1 and 64.
Decimal
represents a 256 bit representation of a fixed-scale decimal number.Represents an ECDSA public key.
Represents an ECDSA signature.
EcdsaSecp256k1 signature verifier.
Represents an ED25519 public key.
Represents an ED25519 signature.
EddsaEd25519 signature verifier.
Represents a 32-byte hash digest.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Represents a Unix timestamp, capturing the seconds since the unix epoch.
Unsigned integers, up to u64.
Represents the global id of a non-fungible.
PreciseDecimal
represents a 512 bit representation of a fixed-scale decimal number.Royalty rules
A struct with the set of rule associated with each role - used when creating a new access
controller for the initial rules and also used during recovery for proposing a rule set.
Describes a value located in some sbor given a schema for that sbor
Scrypto function/method invocation.
A visitor the indexes scrypto custom values.
A UTF-8–encoded, growable string.
A string matching
[_0-9a-zA-Z]{1,64}
.Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
Provides safe integer arithmetic.
UUID, v4, variant 1, big endian. See https://www.rfc-editor.org/rfc/rfc4122
A
UtcDateTime
represents a Unix timestamp on the UTC Calendar.A contiguous growable array type, written as
Vec<T>
, short for ‘vector’.Enums
An instance of a blueprint, which lives in the ledger state.
Represents an error ocurred during decoding.
Represents the level of a log message.
Represents type of non-fungible id
Represents the local id of a non-fungible.
A collection of blueprints, compiled and published as a single unit.
Represents an error when parsing Decimal from another type.
Represents an error when parsing ECDSA public key from hex.
Represents an error when parsing ED25519 public key from hex.
Represents an error when parsing hash.
Represents an error when parsing ManifestBlobRef.
Represents an error when parsing ManifestBucket.
Represents an error when parsing ManifestExpression.
Represents an error when parsing ManifestProof.
Represents an error when parsing non-fungible address.
Represents an error when decoding non-fungible id.
Represents an error when parsing PreciseDecimal from another type.
Resource Proof Rules
Represents an error when validating proof.
Specifies the validation mode that should be used for validating a
Proof
.The set of roles allowed to propose recoveries. Only Primary and Recovery roles can initiate,
or propose recoveries, Confirmation can’t initiate nor propose.
Represents any natively supported public key.
Represents an error when reading the owned node ids from a value.
Represents an error when replacing manifest values.
Represents a resource address.
Represents the type of a resource.
An enum of the roles in the Access Controller component
Defines how rounding should be done.
A schema for the values that a codec can decode / views as valid
Represents any natively supported signature.
Represents any natively supported signature, including public key.
Constants
The address of the account package.
The ECDSA virtual resource address.
The ED25519 virtual resource address.
The address of the faucet component, test network only.
The address of the faucet package.
The XRD resource address.
The system token which allows access to system resources (e.g. setting epoch)
Traits
Trait for short hand notation for try_from().unwrap()
As opposed to
try_from(x).unwrap()
this will panic if the conversion fails.The
Categorize
trait marks a rust type as having a fixed value kind for SBOR encoding/decoding.A data structure that can be decoded from a byte array using SBOR.
A data structure that can be serialized into a byte array using SBOR.
A generic trait for converting a number to a value.
Parse a value from a string
Marks the rust type that represents a non-fungible id, of non-auto-generated kind (i.e. String, Integer and Bytes).
Marks the rust type that represents a non-fungible id, of any kind (i.e. String, Integer, Bytes and UUID).
Represents the data structure of a non-fungible.
Defines a multiplicative identity element for
Self
.Binary operator for raising a value to a power.
Useful functions for signed numbers (i.e. numbers that can be negative).
A generalization of
Clone
to borrowed data.A generic trait for converting a value to a number.
A trait for converting a value to a
String
.Defines an additive identity element for
Self
.Functions
Computes the hash digest of a message.
Decodes a data structure from a byte array.
Encodes a data structure into byte array.
Computes the SHA3 digest of a message.
Computes the SHA-256 digest of a message.
Computes the double SHA-256 digest of a message.
Type Definitions
Attribute Macros
Declares a blueprint.
Derive Macros
Derive code that returns the value kind.
Derive code that decodes this data structure from a byte array.
Derive code that encodes this data structure
Derive code that describes this data structure.
Derive code that describe a non-fungible data structure.
Derives code for categorizing a struct or enum with Scrypto value model.
Derives code for decoding a struct or enum with Scrypto value model.
Derives code for describing a struct or enum with Scrypto schema.
Derives code for encoding a struct or enum with Scrypto value model.
Derive code that implements
ScryptoCategorize
, ScryptoEncode
, ScryptoDecode
, and ScryptoDescribe
traits for this struct or enum.