lupine_sdk 1.0.1 copy "lupine_sdk: ^1.0.1" to clipboard
lupine_sdk: ^1.0.1 copied to clipboard

A dart package to store files on nostr using blossom.

A dart package to store files on nostr using blossom.

Important

This project is in developpement, event kind can change.

How it work #

All files are stored on every user blossom servers. The file tree is stored on nostr relays. Files and path are encrypted but metadata are public !

This package is inspired by https://github.com/hzrd149/blossom-drive but with some changes. Each objects has it's own nostr events.

Use nip 09 to delete an object.

Files evenet #

{
    "kind": 40000,
    "content": encrypted(
        ["x", "<sha256>", "<absolute file path>", "<size in bytes>", "<optional MIME type>"]
    )
}

Folders event #

{
    "kind": 40000,
    "content": encrypted(
        ["folder", "<path>"]
    )
}

Examples #

// Init drive
DriveService().login(privkey: "nostr_private_key_in_hex");

// Listen for updates
DriveService().updateEvents.listen((_) => update());

// List objects in a path
DriveService().list("/path/on/drive")

// Store a file
DriveService().addFile("/path/on/my/computer", "/path/on/drive");

// Store a folder
DriveService().addFolder("/path/on/my/computer", "/path/on/drive");

Todo #

  • ❌ Use nip 44 for encryption
  • ❌ Sync folders

Contributing #

Contributions are welcome! Please open issues or submit pull requests.

0
likes
0
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A dart package to store files on nostr using blossom.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, encrypt, hex, mime, ndk, path, path_provider, pointycastle

More

Packages that depend on lupine_sdk