Module vaults

Module vaults 

Source
Expand description

§delta’s Vaults

Vaults are delta’s fundamental state containers, uniquely identified by an Address. A vault contains balances, nonces, and optional specialized data like token mints.

§Example

Reading vault data:

 
let client = BaseRpcClient::new("http://localhost:50051").await?;
let address = Address::new(ed25519::PubKey::generate().owner(), 1);
// Get a vault from the network
let vault = client.get_vault(address).await?;
println!("Balance: {}", vault.balance());

Modules§

fungible
Structures for defining non-native tokens, including supply and metadata.
nft
Structures for defining non-fungible tokens (NFTs) and NFT collections.

Structs§

Address
The unique address of a vault.
BaseVault
Vault structure for the base shard.
OwnedVault
A sharded::Vault paired with the OwnerId that corresponds to its owner.
OwnerId
The public identity of any actor on the network.
Vault
Vault structure for domains that can hold native tokens, custom data, and non-native tokens.

Enums§

TokenKind
Token kind (native or not)
VaultDataType
Available vault data types.

Traits§

ReadableBaseVault
Trait for read-only access to base vault data.
ReadableNativeBalance
Trait for read-only access to native balance.
ReadableShardedVault
Trait for read-only access to sharded vault data.
VaultFormatter
A trait to prettyprint vault information, extending ReadableShardedVault
WritableBaseVault
Trait for modifying base vault data.
WritableNativeBalance
Trait for modifying native balance.
WritableShardedVault
Trait for modifying sharded vault data.

Type Aliases§

TokenId
A unique identifier for non-native tokens in the system.