Skip to content

marmot-protocol/mdk-python-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MDK Python Example

CLI app showing how Marmot Development Kit works in a python application. Not meant to be a real world application of course.

Get it running

First build the UniFFI bindings (you need this or nothing works):

cargo build -p mdk-uniffi

Then grab the Python deps:

uv pip install -r requirements.txt

Setup

Toss your private key in an env variable:

export PRIVATE_KEY=your_hex_encoded_private_key

Running it

Just do:

uv python main.py

What you can do

1. Generate key package - Makes a key package and pushes it to relays (you need this before joining groups, otherwise you're invisible to the MLS protocol)

2. Create group - Start a new group with other people

3. View pending invites - Check invites you've got waiting

4. Invite to group - Add someone to a group you're in

5. Send message to group - Send a message to whichever group you pick

6. Publish metadata - Push your profile and relay list info

7. Exit - Get out and touch grass

Quick notes

Default relays are wss://relay.damus.io and wss://relay.arx-ccn.com.

About

WIP test/usage example of mdk's python bindings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages