Massa Documentation
website·Indexed 34 days ago
https://docs.massa.net/Documentation for Massa, a scalable and secure public blockchain. Includes guides on installing and running nodes, staking, network constants, and using Massa Station. Covers DeWeb for decentralized website hosting, the Massa Wallet for transaction management, and technical details on tokenomics, gas, and operation execution formats.
What's inside Massa
- Staking in Massa requires a minimum of 100 MAS to purchase one unit of staking rights, known as a "roll". Addresses are randomly selected to create blocks across all threads based on the number of rolls they possess. The total initial supply of 1B MAS allows for a theoretical maximum of 10 million staking participants.
Overview of Massa node architecture modules
A Massa node consists of several interconnected modules that handle the lifecycle of blocks and operations. The core process manages execution and consensus, while pool and factory components may run in separate processes. The primary modules include:
- Bootstrap Module: Handles initial synchronization (peers, block graph, ledger, PoS state).
- API Module: The public interface for external clients and factories.
- Protocol/Network Module: Manages the binary transport layer and gossip synchronization between consensus nodes.
- Selector Module: Determines which node is elected to build a block for a specific slot.
- Graph/Consensus Module: Integrates proposed blocks into slots and verifies integrity using a Directed Acyclic Graph (DAG).
- Execution Module: Processes operations and provides balance updates to the Selector Module.
Overview of Massa Station
Massa Station is a desktop application that acts as a gateway to the Massa blockchain. It allows users to interact with the blockchain via a web browser and functions as a modular application store. Key capabilities include:
- Decentralized Web Access: Once installed, it enables the browser to resolve
.massaURL domains, allowing users to visit websites hosted directly on-chain. - Wallet Management: Includes a built-in Massa Wallet for managing accounts and signing/sending transactions with enhanced security compared to traditional browser-plugin wallets.
- Extensibility: Supports the installation of community-developed modules via the Massa Plugin Store.
- Decentralized Web Access: Once installed, it enables the browser to resolve
Overview of Massa Wallet functionality
The Massa Wallet module is an extension of Massa Station that provides essential wallet and account management tools. Key capabilities include:
- Account management: Creating accounts, transferring funds, and checking balances.
- Private key management: Signing transactions and generating random messages.
Overview of DeWeb interaction paths
The DeWeb allows websites to be stored on-chain to provide a fully decentralized web experience. Depending on the goal, users can choose from three primary paths:
- Local Server Setup: Used to browse decentralized websites directly from the blockchain for maximum privacy and autonomy without intermediaries.
- Becoming a Provider: Used to host a gateway via a custom domain, making decentralized websites accessible to any user on any device (PC, mobile, tablet) without requiring them to install software.
- Uploading a Website: Used to host on-chain frontends, protect against DNS hacks, and build decentralized dApps.
Overview of Massa-Web3 JS Library
Massa-web3 is a comprehensive JavaScript library used to interact with the Massa blockchain in both browser and Node.js environments. It acts as a wrapper for the Massa JsonRPC API (divided into Public and Private segments). Key capabilities include sending transactions, deploying smart contracts, managing addresses, node management, and fetching blockchain events.Overview of Massa Web3 Providers
In@massalabs/massa-web3, a Provider is a core component that encapsulates an account and manages the connection to the Massa blockchain. It allows developers to execute transactions, query blockchain data, and interact with smart contracts. Providers can be initialized from a KeyPair, accessed via a Wallet account, or used as read-only public providers.Overview of Massa Web3 JS Contract Wrappers
Contract wrappers in the Massa Web3 JS Library provide a type-safe, streamlined interface for interacting with common smart contract standards on the Massa blockchain. They abstract low-level interaction details, provide compile-time error checking via strongly-typed interfaces, and promote interoperability by encouraging the use of standard interfaces.Overview of MAS token handling in Massa smart contracts
In Massa smart contracts, MAS tokens are represented asu64values. All MAS token-related functionality is provided by the@massalabs/massa-as-sdkpackage. A critical architectural detail is that all exported contract functions are payable by default, meaning they can receive MAS tokens regardless of whether the function logic explicitly handles them.Overview of Massa MetaMask Snap
Massa Snap is a MetaMask plugin that integrates the Massa blockchain into the MetaMask wallet. It allows users to manage MAS tokens, interact with smart contracts, and engage with the Massa ecosystem. Key capabilities include sending/receiving MAS, viewing transaction history, deploying smart contracts, and buying/selling rolls. Accounts are derived from the MetaMask seed phrase, ensuring funds are not lost even if Snap support is discontinued.Overview of @massalabs/wallet-provider
wallet-provideris a library that connects dApps with user wallets adhering to Massa wallet standards. It can be used as a standalone utility or alongsidemassa-web3to facilitate secure dApp-to-wallet communication. Key capabilities include wallet discovery, account management, transaction signing, and real-time balance inquiries.Overview of @massalabs/massa-web3 library
@massalabs/massa-web3 is a TypeScript library used to build decentralized applications (dApps) on the Massa blockchain. It provides utilities similar to ethers.js or Viem for managing accounts, transferring MAS tokens, interacting with smart contracts, reading contract datastores, and handling on-chain events. It includes anArgsutility for data serialization between TypeScript and AssemblyScript, as well as built-in contract wrappers for standard Massa protocols (Fungible Tokens, NFTs, and the Massa Name System).