Standard Library
The IOTA Move Framework includes a comprehensive standard library that provides essential functionality for smart contract development. This page provides an overview of the major modules.Core Modules
Object Management
iota::object
Provides object identifiers (ID and UID) and functions for creating and managing objects.
Key types:
ID- An object identifier (copyable)UID- A unique object identifier (not droppable)
iota::transfer
Functions for transferring object ownership between addresses and converting objects between ownership models.
Key functions:
transfer- Transfer to an addressshare_object- Make object sharedfreeze_object- Make object immutablereceive- Receive transferred objects
Asset Management
iota::coin
Implements fungible tokens with standard operations like minting, burning, and transferring.
Key types:
Coin<T>- A coin holding a balanceTreasuryCap<T>- Capability to mint/burn coinsCoinMetadata<T>- Coin metadata (name, symbol, decimals)
iota::balance
Low-level balance operations that underpin the Coin module.
Key types:
Balance<T>- Storable balance without object wrapperSupply<T>- Tracks total supply
Collections
iota::table
A map-like collection where keys and values are stored in IOTA’s object system.
iota::bag
A heterogeneous map-like collection that can store different value types.
iota::vec_map
A simple map backed by a vector of key-value pairs.
iota::vec_set
A set backed by a vector.
Dynamic Fields
iota::dynamic_field
Allows adding fields to objects after they’ve been constructed. Field names can be any type with copy + drop + store.
Key functions:
add- Add a dynamic fieldborrow- Borrow a field immutablyborrow_mut- Borrow a field mutablyremove- Remove a fieldexists_- Check if a field exists
iota::dynamic_object_field
Similar to dynamic_field but stores objects as fields.
System Functions
iota::clock
Provides access to blockchain time through a shared singleton object at address 0x6.
iota::event
Emit custom events that can be tracked off-chain.
iota::tx_context
Provides access to transaction context including sender, digest, and epoch.
Trading and Marketplaces
iota::kiosk
A primitive for building decentralized, trustless trading experiences.
Key types:
Kiosk- Container for storing and trading assetsKioskOwnerCap- Capability to manage a kioskPurchaseCap<T>- Capability to purchase a specific item
iota::transfer_policy
Defines rules that must be satisfied for transfers to complete.
Package Management
iota::package
Functions for package publishing, upgrades, and version management.
Key types:
Publisher- Proof of package publicationUpgradeCap- Capability to upgrade a packageUpgradeTicket- Authorization for a specific upgrade
claim- Claim a Publisher object using one-time witnessauthorize_upgrade- Create an upgrade ticketcommit_upgrade- Finalize an upgrade
Cryptography
The framework includes modules for various cryptographic operations:iota::hash- Hashing functions (SHA256, BLAKE2b, Keccak)iota::ed25519- Ed25519 signaturesiota::ecdsa_k1- ECDSA with secp256k1iota::ecdsa_r1- ECDSA with secp256r1iota::bls12381- BLS12-381 operationsiota::groth16- Groth16 zero-knowledge proofsiota::hmac- HMAC functions
Utility Modules
iota::address
Utilities for working with addresses.
iota::bcs
Binary Canonical Serialization encoding/decoding.
iota::hex
Hexadecimal encoding/decoding.
iota::url
URL handling for object metadata.
iota::display
Define display metadata for objects (how they appear in wallets/explorers).
Module Dependencies
Many framework modules depend on each other:Usage Patterns
The standard library supports common patterns:- Capability pattern: Use capability objects for access control
- Witness pattern: Use one-time witnesses to prove module authority
- Hot potato pattern: Use types without
dropto enforce workflows
Best Practices
- Use appropriate ownership models: Choose between owned, shared, and immutable objects based on your use case
- Leverage capabilities: Use capability objects for fine-grained access control
- Emit events: Emit events for important state changes to enable off-chain tracking
- Handle errors properly: Use descriptive error constants and assertions
- Document your code: Add comments explaining complex logic and invariants