From 99ce5529ae2914ea13746ef1a30a15499f0a185a Mon Sep 17 00:00:00 2001 From: LeandroBitcoiner21 <107815651+leandro21b@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:51:36 -0300 Subject: [PATCH] Delete 60.md --- 60.md | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 60.md diff --git a/60.md b/60.md deleted file mode 100644 index b4d7776d..00000000 --- a/60.md +++ /dev/null @@ -1,39 +0,0 @@ -NIP-60 -====== - -Secure file load from URL -------------------------- - -`draft` `optional` `author:leandro21b` - -## Description: - -A mechanism that allows the client to verify the hash of a file such as image, video, source codes, and others And ensure that the server that hosted the file has not changed any data, in addition that same file can be stored on several servers at the same time, so if one server goes down the file can still be loaded via other servers. - -When a user is going to publish a file, the client takes the file type ex: (img), the format ex: (png), and generates a SHA256 hash, then the client sends the file to the servers that the user chooses, then the client takes the urls that carry the file, unites all this data and declares it in the field (tags), several different files can be declared in a post as in the example below: - -## Example: - -```json -{ - "id": , - "pubkey": , - "created_at": , - "kind": 1, - "tags": [ - ["img", "png", , , ], - ["vid", "mp4", , , ], - ["aud", "mp3", , , ], - ["code", "py", , , ], - ["compressedfile", "zip", , , ] - ], - "content": , - "sig": -} -``` - -## Hash Check: - -Hash checking will be performed according to the setting that a user programs the client to do based on its trust in the server hosting the file or the user who published a post with that file, if the client attempts to hash verify everyone files are being loaded, the client can be very slow depending on the device and the size of the files, so the user must choose when the client will check the hash. - -For this to work, the servers that will host the files cannot compress it, otherwise there will be an error in the hash check, if a file has to be compressed, this must be done on the user's device which is where the original hash will be generated.