A simple script to push the stacks in your Akord Vault to IPFS.
You'll need to run a local IPFS node to use this script.
brew install ipfs
ipfs daemon
The script reads your email/password and vault id from a .env config file.
NOTE: Make sure you have an account with http://v2.akord.com
touch .env
echo "EMAIL='-- email --'" >> .env
echo "PASS='-- password --'" >> .env
echo "VAULTID='-- vault id --'" >> .env
Then install the npm modules:
yarn install
You should be ready to run the script now:
yarn go
Once the script completes, it will dump a JSON file to console with the IFPS CID's attached to each stack:
{
"vaultId": "ebKjhDPQ7VZy5bK8W8Qy0BKmRJHoZFLfD_DsHlJHK0I",
"stacks": [
{
"stack": {
"id": "69fd2d6d-f53e-4215-b667-fee6964c807f",
"createdAt": "2022-10-05T14:23:09.515Z",
"status": "ACTIVE",
"title": "my-photo.jpg",
"description": null,
"resourceVersion": 1,
"size": null,
"files": [
{
"title": "my-photo.jpg",
"resourceUrl": "public/a99b2501-d24f-4d1d-b883-dae92c790b20",
"thumbnailUrl": "public/da831fec-d2c6-4d0f-9c29-49d12363f435",
"postedAt": null,
"fileType": "image/jpeg",
"size": 42192,
"numberOfChunks": null,
"chunkSize": null,
"hash": "3cb1fbcb7035-54a5-4aa0-9526-3cbcb7035",
"resourceTx": "Mr_6ozOs6TwtFRRlPlG1YJwikBdIaG89387x9-Zeikg",
"thumbnailTx": null
}
]
},
"cid": "Qmp6jVm5mYstmd4ZjYk3UC4FQy5REQ19uAwkbo4617iD94"
}
]
}
Next you can test by opening the file:
ipfs cat Qmp6jVm5mYstmd4ZjYk3UC4FQy5REQ19uAwkbo4617iD94 | open -a Preview.app -f
We'd love to hear from you : https://discord.com/channels/890229689019432981/982206047227871262