SPK Network File Storage
<p dir="auto">Reviews are starting to come in for the test SPK network. We are taking this time to respond to the feedback and put forth our proposal to include some quality of life changes. SPK Network is of course decentralized, and much like Hive with its various front ends, data can be displayed in a multitude of ways. So before we get the network in the wild, we thought we'd put fourth a proposed standard for meta data and inclusions.
<p dir="auto">Meta data is one string in a contract, this is transferred in the customJson and is limited to 8Kb currently by Hive.
<p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23tbKPsToT9EfZh5bx4ZZNm9tiaczn2Uz42X2oVxf4x9DcnAJQj6Pgm4FvyjWuBuLrwHd.png" alt="Upload Interface" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23tbKPsToT9EfZh5bx4ZZNm9tiaczn2Uz42X2oVxf4x9DcnAJQj6Pgm4FvyjWuBuLrwHd.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23tbKPsToT9EfZh5bx4ZZNm9tiaczn2Uz42X2oVxf4x9DcnAJQj6Pgm4FvyjWuBuLrwHd.png 2x" />
<h2>Auto-Renew
<p dir="auto">First up is Auto-Renew. This will allow a user to set it and forget it. When a contract is up for expiration the smart contract will check if the Auto-Renew bit is set to true, then will use up to half of their available Broca to extend the contract for a month. Users will no longer have to babysit their files to make sure they are stored, only that they have enough SPK powered up to match their use.
<p dir="auto">The first character of the metadata string will contain contract level flags like AutoRenew. Currently there is only the 1; leaving 5 bit flags unused.
<p dir="auto">Psuedo-code:
<p dir="auto"><code>if ( metadata[0] & 1 ) renew()
<h2>Encryption and Sharing
<p dir="auto">Following the first character of the metadata string is optional contract level encryption keys. This is one AES key encoded as following. <code>1#encrypted@toaccount;#encrypted@toaccount,... This will allow authorized accounts to see they can decrypt the file, decrypt the message to them, and use the key to decrypt the files with out making changes to the file. This does mean that once a key is shared it can only be psuedo revoked, as the customJson will live with its data on the blockchain, but changing these keys in the future will allow you to add accounts to the scheme fairly easily.
<h2>File Names
<p dir="auto">Following the contract level first string in the metadata, each file will have 4 slots on comma separated values. There is full unicode support here, and slot one in the file name. <code>1,name1,,,,name2,,,,name3,,, This will allow a user to find their files with relative ease.
<h2>File Types
<p dir="auto">Next is allowing front-ends to handle files based on file type. Image files, video files, audio files etc etc all require different handling. To accomplish this the 2nd of each files slows is reserved for an extension. <code>1,name1,mp3,,,name2,jpeg,,,name3,txt,,
<h2>Thumbnails
<p dir="auto">The next slot is reserved for a thumbnail, which can be in the form of a IPFS CID or a full resource link. At dlux we are piping the files extension into an SVG which allows us to render a preview for any file type if no thumbnail is provided. But if a thumbnail is here we will respect it and show it to the end user. Maybe...
<p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/Eo4Fqc15Q71gNGnKUxAAehMrpRVJoSGzELUpkhwME8kKriAdTiQW2wjzhSKWk5R4vqj.png" alt="SVG" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/Eo4Fqc15Q71gNGnKUxAAehMrpRVJoSGzELUpkhwME8kKriAdTiQW2wjzhSKWk5R4vqj.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/disregardfiat/Eo4Fqc15Q71gNGnKUxAAehMrpRVJoSGzELUpkhwME8kKriAdTiQW2wjzhSKWk5R4vqj.png 2x" />
<h2>Security and Visibility
<p dir="auto">The last slot in each file if for file level bit flags. All characters in this section are base64 numbers. These are:
<ul>
<li>1 Is the file encrypted
<li>2 Is the file a thumbnail
<li>4 Is the file NSFW
<li>8 Is the file executable
<li>16 Unused
<li>32 Unused
<p dir="auto"><code>1,cool,jpg,,6- Would flag this as a NSFW Thumbnail
<p dir="auto">The front ends can hide thumbnails from the file viewer by default, and use them to preview larger files, or obscure files if they are marked NSFW. Additional useful flag suggestions are welcome.
<h2>Licensing
<p dir="auto"><a href="https://creativecommons.org/share-your-work/cclicenses/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons has a few license types that we will support out of the box:
<ol>
<li>CC BY: <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons Attribution License
<li>CC BY-SA: <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons Share Alike License
<li>CC BY-ND: <a href="https://creativecommons.org/licenses/by-nd/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons No Derivatives License
<li>CC BY-NC-ND: <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons Non-Commercial No Derivatives License
<li>CC BY-NC: <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons Non-Commercial License
<li>CC BY-NC-SA: <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Creative Commons Non-Commercial Share Alike License
<li>CC0: <a href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Grant to Public Domain
<p dir="auto">Due to the nature of the blockchain, you can prove fair use in the future even if the author changed it's license level after your fair use. There can be a near infinite number of licenses, to include Stock license, and Hive Beneficiary... They only need to be written and agreed upon.
<p dir="auto"><code>1,cool,jpg,,A-7 Would CCO/Grant to Public Domain this JPEG.
<h2>Labels
<p dir="auto">After any license the user can select some label to better organize their files, as there are no folders in the SPK network. This is our list. For any additional uses the user may use a color which could have a personal significance.
<ul>
<li>0 - Miscellaneous
<li>1 - Important
<li>2 - Favorite
<li>3 - Random
<li>4 - Red
<li>5 - Orange
<li>6 - Yellow
<li>7 - Green
<li>8 - Blue
<li>9 - Purple
<li>A - Grey
<li>B - Work
<li>C - Personal
<li>D - Family
<li>E - Friends
<li>F - Projects
<li>G - Finance
<li>H - Health
<li>I - Education
<li>J - Travel
<li>K - Events
<li>L - Photography
<li>M - Gaming
<li>N - Sports
<li>O - Blogging
<li>P - Meme
<li>Q - Music
<li>R - Video
<li>S - Audio
<li>T - News
<li>U - Development
<li>V - Fashion
<li>W - Food
<li>X - Cooking
<li>Y - DIY
<li>Z - Art
<li>a - Design
<li>b - Technology
<li>c - Religion
<li>d - Government
<li>e - Politics
<li>f - Science
<li>g - Research
<li>h - Receipts
<li>i - Correspondence
<li>j - Templates
<li>k - Resources
<li>l - Reference
<li>m - Backups
<li>n - Archive
<li>o - Drafts
<li>p - Finished
<li>q - Sent
<li>r - Pending
<li>s - Approved
<li>t - Rejected
<li>u - Ideas
<li>v - Goals
<li>w - Tasks
<li>x - Legal
<li>y - Networking
<li>z - Feedback
<li><code>+ - Surveys
<li>= - Classified
<p dir="auto"><code>1#encKey@username,obscured,xxx,,1--15u Would be an encrypted file, with an obscured name, a hidden extension, no thumbnail, with an encryption flag, no license, and labeled as an <code>Important Orange Idea
<h2>Ease of Use
<p dir="auto"><img src="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23w2D74QmrPvhx4ej2epX5542QsANiL9S4yg2HGm9CqZdeMm14gbznGoMGfoBGrwVj9ro.png" alt="File Explorer" srcset="https://images.hive.blog/768x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23w2D74QmrPvhx4ej2epX5542QsANiL9S4yg2HGm9CqZdeMm14gbznGoMGfoBGrwVj9ro.png 1x, https://images.hive.blog/1536x0/https://files.peakd.com/file/peakd-hive/disregardfiat/23w2D74QmrPvhx4ej2epX5542QsANiL9S4yg2HGm9CqZdeMm14gbznGoMGfoBGrwVj9ro.png 2x" />
<p dir="auto">All this data, if agreed upon by the front ends supporting SPK, can make the user experience much more intuitive and friendly. Searching through files by name and filtering files by flag and labels is the ultimate goal. With an easy way to build upon the works of others, properly credit their origin, and potentially share rewards.
<p dir="auto">We are looking for all comments and feedback, there are unused flags at both the contract and file level, as well as more space behind the labels for any additional ideas.
Do you have a list of front ends that are currently supporting SPK?
As a developer, I think it would be helpful if there were an NPM package for the metadata enums and helpers. Then, my code can reference the enum strings instead of the integer flags, and its easier to maintain.
Also SPK Drive (a decentralised, incentivised replacement for cloud drive storage operates on SPK Network)
3speak dbuzz dlux... and I'm guessing Ecency will increase their support and actifit will add it. It's open to all.
we already support 3speak videos on both web and android, coming in few days ios support as well.
I think a package will be coming after our launch. We are still finalizing a lot of our code... and it's pretty complex.
!LADY
View or trade
LOH
tokens.Nice❤️ effort @disregardfiat. A meaningful post. I recommend to continue your effort.
Congratulations @disregardfiat! You received a personal badge!
Wait until the end of Power Up Day to find out the size of your Power-Bee.
May the Hive Power be with you!
You can view your badges on your board and compare yourself to others in the Ranking
Check out our last posts:
Congratulations @disregardfiat! You received a personal badge!
See you at the next Power Up day to see if you will repeat this feat.
May the Hive Power be with you!
You can view your badges on your board and compare yourself to others in the Ranking
Check out our last posts:
That's the man