M10 Platform Documentation

website·Indexed 31 days ago

https://docs-app.dev.m10.net

A distributed ledger platform designed to manage digital assets, including regulated stablecoins, tokenized deposits, and central bank digital currencies. The platform features a hierarchical ledger, a gRPC-based API, and SDKs for TypeScript, Dart, and Rust. Documentation covers transaction management, RBAC permissions, account metadata, and integration guides for issuers.

Tokens
20K
Snippets
106
Records
188
Agent score
47%

What's inside M10

  1. Overview of M10 API and SDKs

    The M10 platform provides an API based on gRPC for transport and uses standardized protobuf messages for all objects and requests. While not RESTful, it follows object-oriented concepts (e.g., operations performed on transfers and accounts objects). Developers can interact with the platform via the raw gRPC API or through official SDKs which provide a thin extension layer to handle signing and reduce boilerplate.
  2. Overview of the M10 Platform

    The M10 Platform is a high-volume, low-latency system designed to manage digital assets, including regulated stablecoins, tokenized deposits, and central bank digital currencies (CBDC). The core component of the platform is the ledger, which developers can interact with via APIs, SDKs, and a Command Line Interface (CLI).
  3. Understand Role Binding fundamentals

    Role bindings connect roles to public keys to grant permissions to users. A role binding consists of a unique ID (UUID recommended), a name for identification, the ID of the role being bound, an optional expiry time, and optional attributes.
  4. Understand the M10 Bank object model

    The Bank object is a metadata entity used to discover information about accounts on the ledger. It does not impact ledger functionality. A Bank object contains the following fields:

    • short_name: Machine-readable identifier.
    • display_name: Human-friendly name.
    • status: The operational state of the bank.
    • country_code: ISO 3166-1 alpha-2 jurisdiction identifier (e.g., "US").
    • endpoint: The bank's integration service URL.
    • logo_url: URL for the bank's logo image.
    • description: Free-form human-readable description.
    • bic_swift_code: ISO 9362 BIC/SWIFT code for international transfers.

    Additionally, it contains a list of account references, each consisting of a ledger account ID and an account type:

    • CBDC (Central Bank Digital Currency): Backs bank deposits 1:1 with reserves.
    • DRM (Digital Regulated Money): Backed by fractional reserves.
  5. Understand M10 Actions and their use cases

    Actions are used to send messages between ledger accounts. Unlike transfers, they do not contain an amount. They support two primary payload types:

    1. Payment Requests (Request-to-Pay): A business requests payment from a customer by sending an invoice. The target is set to the customer's account. These use a protobuf-defined payload and include a PaymentRequestStatus enum to track the request status.
    2. Remote Procedure Calls (RPCs): On-ledger requests for information or services. For example, sending a quote request to an FX provider's ledger account and receiving a response action in return.
  6. Understand M10 Ledger Transfer Fundamentals

    Transfers in the M10 ledger are used to send funds between accounts. Each transfer consists of one or more 'transfer steps' that are applied atomically; if any single step fails, the entire transfer fails.

    Each transfer step contains:

    • from_account: The sender
    • to_account: The receiver
    • The amount
    • A metadata field for unstructured data

    Transfers are generally formatted as protobufs. Because they support multiple steps, you can perform complex atomic actions, such as sending a main payment to a recipient and a transaction fee to a separate fee account in a single operation.

  7. Understand the AccountSet data model

    An AccountSet is a 'Document' stored on the ledger that allows the association of multiple ledger accounts with one user. It consists of a list of account IDs.
  8. Initialize the M10 SDK

    Regardless of the language used, initializing the M10 SDK always requires two fundamental steps: connecting to the ledger and adding the signer.
  9. Use the AccountInfo message for account details

    The AccountInfo message in the m10.sdk.model package provides basic details about a financial account, including its unique identifier, parent account, and currency-related display codes.
    message AccountInfo {
      bytes account_id = 1;        // Unique identifier for the account.
      bytes parent_account_id = 2; // Identifier of the parent account, if any.
      string public_name = 3;       // Public name of the account.
      string profile_image_url = 4; // URL of the account's profile image.
      string code = 5;             // Account code (e.g., currency code).
      uint32 decimal_places = 6;    // Number of decimal places for the account's value.
      string display_code = 7;      // Unique display code for the account. Equals `code` if not set.
    }
  10. Use context_id for multi-ledger transaction tracking

    The context_id is a unique identifier used to link multiple transactions that are part of a larger, multi-legged operation (e.g., foreign exchange transfers across different ledgers). It serves three primary purposes:

    1. Tracking: Ties together various legs of a multi-ledger transfer to monitor overall progress.
    2. Remote Lookup: Acts as a shared secret allowing users to verify the status of remote transactions without direct authorization to the remote ledger.
    3. Disambiguation: Helps distinguish between multiple similar transactions (e.g., same amount and account) to match them to a specific user request.
  11. Use the Bank message for bank entity details

    The Bank message contains comprehensive information about a banking institution, including its operational status, jurisdiction (ISO 3166-1 alpha-2), and BIC/SWIFT code.
    message Bank {
      bytes id = 1;               // Unique identifier for the bank.
      bytes owner = 2;            // Owner of the bank collection record.
      string short_name = 3;       // Short name of the bank.
      string display_name = 4;     // Display name of the bank.
      repeated BankAccountRef accounts = 5; // List of BankAccountRef's.
      Bank.BankStatus status = 6;  // Operational status of the bank.
      string country_code = 7;     // ISO 3166-1 alpha-2 country code of the bank's jurisdiction.
      string endpoint = 8;         // URL of the bank's integration service endpoint.
      string logo_url = 9;         // URL of the bank's logo image.
      string description = 10;     // Human-readable description of the bank.
      string bic_swift_code = 11; // BIC/SWIFT code identifying the bank in international transfers.
    }
  12. M10 Ledger Overview

    The M10 ledger is a permissioned, distributed database optimized for financial transactions and small amounts of metadata. It is Byzantine Fault Tolerant (BFT), meaning it can withstand failures or malicious intrusions by some nodes. Key characteristics include:

    • High performance: Up to one million transactions per second with sub-second latency (time to finality).
    • Security: Every operation must be digitally signed by a cryptographic key.
    • Access Control: Permissions are managed via a Role-Based Access Control (RBAC) system.
    • Privacy: It is a private ledger run by a single entity or a small group of trusted entities.