Multiple File Pinning

TRON DAO
2 min readOct 16, 2019

--

BTFS Key Gen

The btfs key gen command allows users to pin multiple files onto one node, by letting users generate a new keypair for each file to be pinned.

For example, we can generate 4 key pairs using ECDSA, RSA, and ed25519 algorithms:

We first upload four image files to BTFS:

We can then pin the antelopecanyon.jpg file hash to a keypair:

The output tells the user the antelopecanyon.jpg hashed file has been pinned to keypair name “pin1”, which has the hash value of QmfQZaw58AvSAf9Ych8Qtt9GHgq9ET9BsDT5SLuuMnVaZ7. Thus, visiting the URL https://gateway.btfssoter.io/btns/QmfQZaw58AvSAf9Ych8Qtt9GHgq9ET9BsDT5SLuuMnVaZ7will show:

Let us pin hunanmountain.jpg to our same BTFS node, but using a different keypair. We will use “pin2”:

Likewise, the URL https://gateway.btfssoter.io/btns/QmTwunwcRUjAKSp9gNB79ZZyJ81eiTrWYb3epqbFQpvm5Pwill show:

Thus, we are able to pin multiple files to our BTFS node, at least up to the maximum storage capacity set in the configuration file.

--

--

TRON DAO
TRON DAO

Written by TRON DAO

The official Medium of TRON DAO.

No responses yet