Lighthouse
  • 👋Introduction
  • Quick Start
  • How To
    • 🔑Create an API Key
    • 🔼Upload Data
      • 📁File
      • 🔤Text/JSON
      • 🔀Buffer
    • 🔒Upload Encrypted Data
      • 📁File
      • 🔤Text/JSON
      • 🔐Encryption Authentication
        • 📝Method 1: Signed Message
        • ⚕️Method 2: JWT
        • 📲Method 3: Passkey
    • Encryption Features
      • 👯Share File
      • ❌Revoke Access
      • 🔑Check Access Conditions
      • 🚪Token Gating
      • Chains Supported
      • 📃Access Control Conditions
      • 🔓Decrypt File
        • 🌐Browser Decrypt File
        • 💻NodeJS Decrypt File
      • 🚪Access control with zkTLS
      • 👬Account Delegation Tutorial
    • 📂List Files
    • 💁File Info
    • 💰Get Balance
    • 🔁Retrieve File
    • 💾Check for Filecoin Deals
    • 🔄IPNS - Handle Mutable Data
    • 📦Migrate Files
    • 📌Pin CID
    • 💸Pay per use
    • Resize Image
    • 💻Use CLI Tools
  • zkTLS
  • 🤝Account Delegation
  • 💾Filecoin First
    • Usage
    • 💰Pay Per Deal
  • Tutorials
    • 💸Pay to View Application
    • Use Python SDK
    • 📝Update Content with Lighthouse IPNS
    • 📹Add Video Player in UI
    • ✅Document Verification with PoDSI
    • 🎨Minting NFTs on EVM Chains
    • 🪙Minting NFTs on Solana
    • 👩‍💻Programmable Storage with Lighthouse SDK and Filecoin
    • 🔐Secure File Sharing
    • Upload Encrypted Files
    • 📄Token Gating and Custom Contract
    • 🔑Token Gating NFTs
    • 🏖️Pushing File Metadata Onchain
    • Use Radix Wallet on Lighthouse Filesdapp
  • Concepts
    • Glossary
    • IPFS CID Transition to v1
  • Support
    • 📞Contact
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Filecoin First

Usage

PreviousAccount DelegationNextPay Per Deal

Last updated 7 months ago

Was this helpful?

Filecoin first service will allow users to directly create deal with filecoin miner without uploading file to Lighthouse IPFS. Users need not pay for IPFS usage and directly store their files with Filecoin miners just by providing us with CID.

How to use Filecoin First:

1 - Create an API key

// Get authentication message
curl 'https://filecoin-first.lighthouse.storage/api/v1/user/get_auth_message?publicKey=${YOUR_PUBLIC_KEY}'

// Sign the message and call
curl 'https://filecoin-first.lighthouse.storage/api/v1/user/create_api_key?publicKey=${YOUR_PUBLIC_KEY}&signature=${SIGNED_MESSAGE}'

2 - Start sending CIDs

// Now you just have to start sending CIDs
curl 'https://filecoin-first.lighthouse.storage/api/v1/pin/add_cid?cid=PUT_CID' -H 'Authorization: Bearer API_KEY'

3 - Check for Filecoin Deals

Deals can be checked using the same endpoint mentioned in section of how to. It can take upto 2 days for deals to get created.

4 - File Retrieval

Files can be retrieved form the miner using or public gateway like ipfs.io and dweb.link

💾
Filecoin deal
Lassie