bnonni / drpm.tools

Decentralized Registry Package Manager (DRPM)
https://drpm.tools/
Apache License 2.0
2 stars 0 forks source link

Track DPK Installs #22

Open bnonni opened 1 week ago

bnonni commented 1 week ago

Tracking installs is difficult in a decentralized package registry management system. Below is a potential solution.

Includes adding features to the web app being developed at @csuwildcat/dpm

Solution

const response = await fetch('https://api.drpm.tools/v1/dpk/install', {
    method: 'POST',
    body: JSON.stringify({
        name: 'tool5',
        version: '5.0.1',
        publisher: 'did:dht:publisher',
        dwnEndpoint: 'https://dwn.nonni.org',
        dwnProtocol: 'aHR0cHM6Ly9kcG0uc29mdHdhcmUvcHJvdG9jb2xzL2RwbQ',
        count: 1,
        challenge: 'random challenge message',
        signature: 'sigOfInstaller',
        installer: 'did:dht:installer'
    }));

In this way, we can track installs in a distributed manner until we can deploy a DWN server aggregator to search for the drpm protocol in DWNs. We need not wait for DPK publishers to manually visit our site, signup and add their dpks. We can actually do discovery as early as the first install of a DPK and keep some minimal info about it in our DWN.

This would be a non-func feature / stretch goal for TAB, but def should be on the roadmap.