0x2 and provide fundamental functionality.
Core Modules
object.move
Defines Sui’s object model and provides functions for object operations. Key Types:UID- Unique identifier for objectsID- Reference to an object’s UID
coin.move
Defines theCoin type and provides functions for working with fungible tokens.
Key Types:
Coin<T>- A coin of type TTreasuryCap<T>- Capability to mint/burn coinsCoinMetadata<T>- Metadata for a coin type
transfer.move
Provides functions for transferring objects between addresses. Key Functions:tx_context.move
Provides transaction context information. Key Functions:balance.move
Defines theBalance type for managing fungible token amounts.
Key Types:
Balance<T>- A balance of type T (not an object)
event.move
Provides functions for emitting on-chain events. Key Functions:table.move
Provides a key-value store (dynamic fields that are objects). Key Types:Table<K, V>- A table with key type K and value type V
dynamic_field.move
Provides dynamic fields (fields added at runtime). Key Functions:bag.move
Provides a heterogeneous collection (like Table but can store different value types). Key Types:Bag- A heterogeneous map
clock.move
Provides access to on-chain time. Key Functions:package.move
Provides package publishing capabilities. Key Types:Publisher- Capability proving package authorshipUpgradeCap- Capability to upgrade a package
Common Patterns
Creating Custom Coins
Using Display
Full Module List
The Sui Framework at0x2 includes:
object- Object modelcoin- Fungible tokensbalance- Token balancestransfer- Object transferstx_context- Transaction contextevent- Event emissiontable- Key-value storebag- Heterogeneous mapobject_table- Table with object valuesobject_bag- Bag with object valuesdynamic_field- Dynamic fieldsdynamic_object_field- Dynamic object fieldsvec_map- Vector-based mapvec_set- Vector-based setlinked_table- Linked list tabletable_vec- Vector-like tablepriority_queue- Priority queuedisplay- Object display metadatapackage- Package publishingclock- On-chain timebcs- Binary serializationaddress- Address utilitieshex- Hex encodingmath- Math utilitiessui- SUI coin moduletoken- Token standard (new)random- Randomness APIcrypto- Cryptographic primitivesauthenticator_state- zkLogin statedeny_list- Address deny listingkiosk- Kiosk trading protocol