HTTP API that can delegate capabilities to the agent DID using
w3up-client
- Install HTTP API dependencies:
pnpm i
- Install
w3up
CLI from NPM:
npm install -g @web3-storage/w3up-cli
- Create a DID and export your account settings for the HTTP API:
w3up id
w3up register <email>
w3up settings export settings.json
w3up upload <file>
- Start your HTTP API Server (same directory where
settings.json
was exported):
npm run start
- Create a new account DID
w3up id --profile secondary
✔ Agent DID: did:key:z6M...
✔ Account DID: did:key:z6M...
- Delegate capabilities to a Agent DID:
curl http://127.0.0.1:3000\?did\=did:key:z6M... --output delegation.txt
- Import UCAN elegation provided:
w3up delegate import delegation.txt main --profile secondary
- List uploads from main account the API uses
w3up delegate switch main --profile secondary
w3up list --profile secondary