3 Steps to access your free storage space
- Step 1
Create your Crust account and get your address and mnemonic seeds
- Step 2
Apply for free storage:
- Step 3
Store your files by using one of following methods:
Crust AppsGo to crust apps and store your files:1. Go to the `IPFS` in the top navbar;2. Select the `Storage Orders` tab;3. Click the `place an order` button to store your file in Crust.
View the full process in Crust Wiki.Command line
You should have [SEEDS] created in step1. Make sure the IPFS is installed and running locally.// 0. Install crust-cli > npm i -g @crustio/crust-cli // 1. Login > crust-cli login [YOUR_SEEDS] # Login success! // 2. Add file > crust-cli pin ./test.txt Pin success: [YOUR_FILE_CID] // 3. Order file > crust-cli publish [YOUR_FILE_CID] ⛓ Send tx to chain... ↪ 💸 Transaction status: Ready, nonce: 121 ↪ 💸 Transaction status: Broadcast, nonce: 121 ↪ 💸 Transaction status: InBlock, nonce: 121 ↪ ✅ Send transaction(4) success. Publish [YOUR_FILE_CID] success // 4. Query status > crust-cli status [YOUR_FILE_CID] ✅ [YOUR_FILE_CID] picked, replicas: 36
SDK
Here is a code sample for key storage steps:// 1. Import dependencies import { ApiPromise, WsProvider } from '@polkadot/api'; import { typesBundleForPolkadot } from '@crustio/type-definitions'; // 2. Connect Crust chain const wsProvider = new WsProvider('wss://api.decloudf.com/'); const api = await ApiPromise.create({ provider: wsProvider, typesBundle: typesBundleForPolkadot }); await api.isReadyOrError; // 3. Load private key encryptor - Keyring const seeds = [YOUR_SEEDS]; const kr = new Keyring({ type: 'sr25519' }); const krp = kr.addFromUri(seeds); // 4. Send a storage order to chain const tx = api.tx.market.placeStorageOrder(cid, file_size, tips); tx.signAndSend(krp, ({ events = [], status }) => { console.log( ` ↪ 💸 Transaction status: ${status.type}, nonce: ${txnonce}` ); });
View the full code sample here.
GitHub
Apply via GitHub account of 6+ months.