{"_id":"@bws-sdk/ipfs","_rev":"3-e690a475dc45cd84d5031a1b49d8adc0","name":"@bws-sdk/ipfs","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.1":{"name":"@bws-sdk/ipfs","version":"1.0.1","description":"Blockchain Web Services NodeJS IPFS library.","main":"_index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs.git"},"publishConfig":{"registry":"https://registry.npmjs.org"},"keywords":["ipfs","blockchain","bws","node","common"],"author":{"name":"Blockchain Web Services"},"license":"ISC","bugs":{"url":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues"},"homepage":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs#readme","dependencies":{"axios":"^1.5.1","fs":"^0.0.1-security"},"_id":"@bws-sdk/ipfs@1.0.1","gitHead":"8f77ac6e4dab87ce867ff9685febfbd9001352fb","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-2VR1YTc/lLC1pdeF15NRq7QEzw14NIOSQQTV4Zd/UNjql/N8R2bbciSeke3pn6vFsydbTm5+7vXygzrkHgBxkg==","shasum":"23b5f0e6745460f062a29d4497d107a616d23ea4","tarball":"https://registry.npmjs.org/@bws-sdk/ipfs/-/ipfs-1.0.1.tgz","fileCount":5,"unpackedSize":7998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDH9C4FKW5lImyMk+RfglzugDRCglCXmGIQTOierUPryQIgY/7wFJypFNFJ7mcat0WDws9Ic7rWpo/4q4RRA1KOBTg="}]},"_npmUser":{"name":"nachocoll","email":"nacho.coll@bws.ninja"},"directories":{},"maintainers":[{"name":"nachocoll","email":"nacho.coll@bws.ninja"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs_1.0.1_1701629911992_0.9326752223888861"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bws-sdk/ipfs","version":"1.0.2","description":"Blockchain Web Services NodeJS IPFS library.","main":"_index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs.git"},"publishConfig":{"registry":"https://registry.npmjs.org"},"keywords":["ipfs","blockchain","bws","node","common"],"author":{"name":"Blockchain Web Services"},"license":"ISC","bugs":{"url":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues"},"homepage":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs#readme","dependencies":{"axios":"^1.5.1","fs":"^0.0.1-security"},"_id":"@bws-sdk/ipfs@1.0.2","gitHead":"472ef2841dbc4b222419155143d83368ac8bea63","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-IB6sYf3A/wLCfDAYFJPvl+KndoR8BDqXxjcO0of+UhMHzHBkgpe+bhQoVUKMLGA/r08Yvnp/5vVIVIMO3AyCfQ==","shasum":"8ddffbe561c92bacec021658ecf2531e99c0069a","tarball":"https://registry.npmjs.org/@bws-sdk/ipfs/-/ipfs-1.0.2.tgz","fileCount":5,"unpackedSize":7998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaZkE9bMIWJI4QAEnsw19unAnfd73oSlc1yyGrikfumgIgMbdFFhiGH3CmsGX0jzpiU1epSX7ofCwD2g+6epjVT/I="}]},"_npmUser":{"name":"nachocoll","email":"nacho.coll@bws.ninja"},"directories":{},"maintainers":[{"name":"nachocoll","email":"nacho.coll@bws.ninja"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs_1.0.2_1701631114947_0.9990257772487596"},"_hasShrinkwrap":false},"1.0.3":{"name":"@bws-sdk/ipfs","version":"1.0.3","description":"Blockchain Web Services NodeJS IPFS library.","main":"_index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs.git"},"publishConfig":{"registry":"https://registry.npmjs.org"},"keywords":["ipfs","blockchain","bws","node","common"],"author":{"name":"Blockchain Web Services"},"license":"ISC","bugs":{"url":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues"},"homepage":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs#readme","dependencies":{"axios":"^1.5.1","fs":"^0.0.1-security"},"_id":"@bws-sdk/ipfs@1.0.3","gitHead":"493b6c684d8689d09a08aa6d6d90b0fe04105c64","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-Sq42F5ObLRmuf/cLp0RsMaq7OqKg7OECpTuCtOfknGGztLanO/UcDhk6ur1VUuQlBPI6nGpu7Sa7S2EYLEd8Wg==","shasum":"872efbdd612d4beb8e7e6457f508e3f456c8b4ad","tarball":"https://registry.npmjs.org/@bws-sdk/ipfs/-/ipfs-1.0.3.tgz","fileCount":5,"unpackedSize":7998,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsjgJOoKuLSIcqs9o4eL1BDheuzNrOhktRbLtg6ht8eAIgFd/F4urfQVydkVVug+cuLDWCEBLk8j2eDBoN8de1IL8="}]},"_npmUser":{"name":"nachocoll","email":"nacho.coll@bws.ninja"},"directories":{},"maintainers":[{"name":"nachocoll","email":"nacho.coll@bws.ninja"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs_1.0.3_1701633529359_0.9103619129204998"},"_hasShrinkwrap":false},"1.0.4":{"name":"@bws-sdk/ipfs","version":"1.0.4","description":"Blockchain Web Services NodeJS IPFS library.","main":"_index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs.git"},"publishConfig":{"registry":"https://registry.npmjs.org"},"keywords":["ipfs","blockchain","bws","node","common"],"author":{"name":"Blockchain Web Services"},"license":"ISC","bugs":{"url":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues"},"homepage":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs#readme","dependencies":{"axios":"^1.5.1","fs":"^0.0.1-security"},"_id":"@bws-sdk/ipfs@1.0.4","gitHead":"a4291df1620294d5a5295611bfe182e3f59482bc","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-Pj0PadEcLp3eHsBqONpHZo8qwcZ9GnTGkFma9EM0CNeb8nS7+F5wPatgN0qQ1LHfMpktSaRGizuTc+eyp6wMVQ==","shasum":"970c967e2c396830763b0506c2d8c316141dbae2","tarball":"https://registry.npmjs.org/@bws-sdk/ipfs/-/ipfs-1.0.4.tgz","fileCount":6,"unpackedSize":11369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFsbnzX8vMBp28gJwpIi3BTc6hWXGSYxXf784z6Y9J9QIgBDbgh+stPjzYmfkh7Xnn2laj69Az7YowTxId+EpokpA="}]},"_npmUser":{"name":"nachocoll","email":"nacho.coll@bws.ninja"},"directories":{},"maintainers":[{"name":"nachocoll","email":"nacho.coll@bws.ninja"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipfs_1.0.4_1701676832555_0.7016416114490152"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-03T18:58:31.860Z","1.0.1":"2023-12-03T18:58:32.188Z","modified":"2023-12-04T08:00:33.020Z","1.0.2":"2023-12-03T19:18:35.108Z","1.0.3":"2023-12-03T19:58:49.574Z","1.0.4":"2023-12-04T08:00:32.853Z"},"maintainers":[{"name":"nachocoll","email":"nacho.coll@bws.ninja"}],"description":"Blockchain Web Services NodeJS IPFS library.","homepage":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs#readme","keywords":["ipfs","blockchain","bws","node","common"],"repository":{"type":"git","url":"git+https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs.git"},"author":{"name":"Blockchain Web Services"},"bugs":{"url":"https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues"},"license":"ISC","readme":"# BWS IPFS SDK\n\nOfficial Blockchain Web Services [IPFS solution](https://docs.bws.ninja/solutions/bws.ipfs.upload) NodeJS SDK.\n\n[![Create Release](https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/actions/workflows/on-push_create-release.yml/badge.svg?branch=master)](https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/actions/workflows/on-push_create-release.yml)\n\n## Overview\n\nBlockchain Web Services (BWS) is a comprehensive platform offering a suite of blockchain-based solutions, designed to simplify and enhance the integration of blockchain technology into various business and individual needs.\n\nThis SDK provides the easiest way to save data into the [InterPlanetary File System (IPFS)](https://en.wikipedia.org/wiki/InterPlanetary_File_System). Use it to save your NFT metadata and images.\n\n## Installation\n\n```bash\nnpm install --save @bws-sdk/ipfs\n```\n\n## How to use it\n\nOnce installed, just import the SDK, create an instance using your API Key and start using the available functions. To get your API Key go to [www.bws.ninja](https://www.bws.ninja) and sign up - it's free.\n\n```javascript\nimport { BWSIPFS } from @bws-sdk/ipfs;\nconst ipfs = new BWSIPFS('<your API key>')\n```\n\n## Operations\n\nUse the following available operations:\n\n- [uploadJSONAsync](#uploadJSONAsync-anchor) to save JSON data (e.g. NFT Metadata), \n- [uploadFileAsync](#uploadFileAsync-anchor) to upload images or PDF files, or \n- [uploadStreamAsync](#uploadStreamAsync-anchor) if you need to pass a stream for sending your file(s).\n\nAll the operations will return the following IPFS related information (pointing to your newly created IPFS file):\n\n```json\n{\n    \"cid\": \"QmU7avmnTb4iVbNGCHMJmdEbsx9nRtUx7dWGpKeE7zjo8T\",\n    \"uris\": {\n        \"ipfs\": \"ipfs://QmU7avmnTb4iVbNGCHMJmdEbsx9nRtUx7dWGpKeE7zjo8T\",\n        \"url\": \"https://ipfs.bws.ninja/ipfs/QmU7avmnTb4iVbNGCHMJmdEbsx9nRtUx7dWGpKeE7zjo8T\"\n    }\n}\n```\n\n<a name=\"uploadJSONAsync-anchor\"></a>\n### `uploadJSONAsync`\n\nUpload a JSON to IPFS. You can pass the JSON object or the string representation.\n\n```javascript\nimport { BWSIPFS } from @bws-sdk/ipfs;\nconst ipfs = new BWSIPFS('<your API key>')\n\nawait ipfs.uploadJSONAsync({ timestamp: Date.now() }).then(data => {\n    console.log(data);\n}).catch(err => {\n    console.log(err);\n});\n```\n\n\n<a name=\"uploadFileAsync-anchor\"></a>\n### `uploadFileAsync`\n\nUpload a file to IPFS by indicating the file path.\n\n```javascript\nimport { BWSIPFS } from @bws-sdk/ipfs;\nconst ipfs = new BWSIPFS('<your API key>')\n\nawait ipfs.uploadFileAsync('./files/image.png').then(data => {\n    console.log(data);\n}).catch(err => {\n    console.log(err);\n});\n```\n\n<a name=\"uploadStreamAsync-anchor\"></a>\n### `uploadStreamAsync`\n\nUpload content to IPFS by passing a stream.\n\n```javascript\nimport fs from 'fs';\n\nimport { BWSIPFS } from @bws-sdk/ipfs;\nconst ipfs = new BWSIPFS('<your API key>')\n\nawait ipfs.uploadFileAsync(fs.createReadStream('./files/image.png').then(data => {\n    console.log(data);\n}).catch(err => {\n    console.log(err);\n});\n```\n\n## Have a question? Found an issue?\n\nPlease feel free to file an [issue](https://github.com/Blockchain-Web-Services/bws-api-sdk-node-ipfs/issues) or send us an email: hello@bws.ninja.\n\n## Need an extended feature or some help?\n\nPlease do not hesitate to ask for help or an extended feature for your project use case, we love improving!\n","readmeFilename":"README.md"}