The IXO Matrix Bot SDK provides encrypted data storage, secure messaging, and automated room management through Matrix protocol integration.

Key Features

Matrix Client

Provides the interface for standard Matrix server interactions

Room Bot

Automates Matrix room management, with blockchain integration

State Bot

Manages Matrix room state data and access controls

Utilities

Helper functions and validators

Installation

npm install @ixo/matrixclient-sdk
# or
yarn add @ixo/matrixclient-sdk

Quick Start

API Client

Room Bot

State Bot

Utilities

MXC Helpers

import { utils } from "@ixo/matrixclient-sdk";

// Convert MXC to HTTP URL
const httpUrl = utils.mxcUrlToHttp(
  "mxc://ixo.world/abc123",
  "https://matrix.ixo.world"
);

// Validate MXC URL
const isValid = utils.isMxcUri("mxc://ixo.world/abc123");

Validators

// Validate Matrix IDs
const isValidUserId = utils.isUserId("@alice:ixo.world");
const isValidRoomId = utils.isRoomId("!room:ixo.world");
const isValidAlias = utils.isAlias("#general:ixo.world");

Error Handling

400
error

Invalid request parameters

401
error

Invalid access token

403
error

Insufficient permissions

Best Practices

Follow these guidelines for secure and efficient Matrix integration

Security

  • Use encrypted rooms for sensitive data

  • Implement proper access control

  • Rotate access tokens regularly

  • Validate all user inputs

Performance

  • Batch state updates

  • Implement proper error handling

  • Cache room states

  • Monitor room sizes

Next Steps

Room Guide

Learn room management

Bot Guide

Implement automation

Security Guide

Secure your rooms