Vector SDK
The Vector Bot Library is a Rust-based library for creating and managing Vector Bots that can send and receive private messages using the Nostr protocol. This library provides a structured and modular approach to building bots with configurable metadata and client settings.
Features
Create Vector Bots with customizable metadata
Send and receive private messages and files
Handle notifications for gift wrap events
Configure proxy settings for .onion relays
Add and manage relays
Modular architecture for easy extension and maintenance
Message Layer Security (MLS) for group messaging
Typing indicators for real-time feedback
Reaction support for messages
File uploads with progress tracking
Automatic failover for media servers
MLS Implementation Status
The Vector SDK includes Message Layer Security (MLS) support for group messaging. The following MLS features are currently implemented and ready for use:

Placeholder Functions (Not Yet Implemented):
The following MLS functions exist as stubs and will be implemented in future versions when needed:
create_group()- Group creation functionalityadd_member_device()- Adding members to groupsleave_group()- Leaving groupsremove_member_device_from_group()- Removing memberssend_group_message()- Direct group message sending (useGroup::send_group_message()instead)
These placeholder functions are available in the API but will return errors if called. They are included to provide a complete API surface for future expansion.
Documentation
For comprehensive documentation, see:
CONTRIBUTING - Development guidelines and contribution process
SECURITY - Security features, best practices, and threat model
ADVANCED - Advanced features including MLS, typing indicators, and debugging
TROUBLESHOOTING - Common issues and solutions
CHANGELOG - Release history and changes
Examples
For practical examples and working code demonstrations, see the Vector-SDK-Example repository, which contains:
Basic bot setup examples
Direct messaging implementations
Group messaging examples
File handling demonstrations
Advanced use cases
Complete working applications
Architecture
The library is organized into several modules, each responsible for a specific aspect of the bot's functionality:
VectorBot: The main struct representing the bot, containing metadata and client configuration.
Channel: A struct for managing communication with specific recipients.
Client: Functions for building and configuring the Nostr client.
Metadata: Functions for creating and managing bot metadata.
Subscription: Functions for setting up event subscriptions.
Crypto: Functions for encryption and decryption.
Upload: Functions for handling file uploads.
High Level Architecture
For more detailed information about the architecture and advanced features, see ADVANCED.md.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Last updated






