All Projects → nandit123 → lighthouse

nandit123 / lighthouse

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE-APACHE MIT LICENSE-MIT
Get verifiable storage on Filecoin Network directly from Ethereum Smart Contracts

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
solidity
1140 projects
shell
77523 projects

Projects that are alternatives of or similar to lighthouse

filecoin-client
Golang的轻量级filecoin客户端,支持离线签名,基本满足钱包交易所充值提现逻辑
Stars: ✭ 50 (+163.16%)
Mutual labels:  filecoin
nft.storage
😋 Free decentralized storage and bandwidth for NFTs on IPFS and Filecoin.
Stars: ✭ 309 (+1526.32%)
Mutual labels:  filecoin
xmr-btc-atomic-swap
Cross-chain atomic swap protocol between Monero and Bitcoin
Stars: ✭ 67 (+252.63%)
Mutual labels:  cross-chain
js-filecoin-api-client
An API client for Filecoin
Stars: ✭ 45 (+136.84%)
Mutual labels:  filecoin
add-to-web3
⁂ Github Action to upload your website to web3.storage
Stars: ✭ 22 (+15.79%)
Mutual labels:  filecoin
bridge-ui
UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
Stars: ✭ 41 (+115.79%)
Mutual labels:  cross-chain
filsnap
MetaMask snap for interacting with Filecoin dapps.
Stars: ✭ 60 (+215.79%)
Mutual labels:  filecoin
ref-fvm
Reference implementation of the Filecoin Virtual Machine
Stars: ✭ 255 (+1242.11%)
Mutual labels:  filecoin
nft-website
NFT School: Community education platform for developers in the non-fungible token space.
Stars: ✭ 260 (+1268.42%)
Mutual labels:  filecoin
lightning-xchain-atomic-swap
Lightning Cross Chain Atomic Swap
Stars: ✭ 16 (-15.79%)
Mutual labels:  cross-chain
cpp-filecoin
C++17 implementation of Filecoin
Stars: ✭ 116 (+510.53%)
Mutual labels:  filecoin
borg
Client-server stack for Web3! Turn your Raspberry Pi to a BAS server in minutes and enjoy the freedom of decentralized Web with a superior user experience!
Stars: ✭ 25 (+31.58%)
Mutual labels:  filecoin
ethrelay
Ethereum smart contracts that enable the verification of transactions of a "target" blockchain on a different "verifying" blockchain in a trustless and decentralized way
Stars: ✭ 34 (+78.95%)
Mutual labels:  cross-chain
java-filecoin-api-client
An API client for Filecoin implemented in Java
Stars: ✭ 38 (+100%)
Mutual labels:  filecoin
go-ibax
An innovative Blockchain Protocol Platform, which everyone can deploy their own applications quickly and easily, such as Dapp, DeFi, DAO, Cross-Blockchain transactions, etc.
Stars: ✭ 3,376 (+17668.42%)
Mutual labels:  cross-chain
research
distributed system;blokchain;filecoin/ipfs,...
Stars: ✭ 39 (+105.26%)
Mutual labels:  filecoin
Venus
Filecoin Full Node Implementation in Go
Stars: ✭ 1,901 (+9905.26%)
Mutual labels:  filecoin
tokencore
The core components of the blockchain wallet backend, support a variety of blockchain address generation and offline signatures
Stars: ✭ 412 (+2068.42%)
Mutual labels:  filecoin
filecoin-docs
Filecoin Docs
Stars: ✭ 183 (+863.16%)
Mutual labels:  filecoin
sdk
Li.Fi - Bridge & DEX aggregation: Any-to-Any Cross-Chain-Swap SDK
Stars: ✭ 18 (-5.26%)
Mutual labels:  cross-chain

Lighthouse Node

This project provides a way for Ethereum smart contracts to request Filecoin storage of CIDs in IPFS via Powergate. Hence, Ethereum developers can use this to request verifiable storage of data to Filecoin from Ethereum smart contracts.

Website

http://lighthouse.ninja

Blog Post

Read more about it on the blog here - https://nanditmehra123.medium.com/lighthouse-filecoin-ethereum-cross-chain-infra-project-66c041a1a1db

Demo Video

https://vimeo.com/552468707
https://www.youtube.com/watch?v=E2-cfbdSXtM

alt text

The parser at src/parser:

  1. Takes data feed from external sources VulcanizeDB.
  2. Parses the data feed into a set of parameters which can be passed to the storage-adapter.

The Storage adapter at src/storage-adapter:

  1. Accepts the arguments passed from the parser. (storage adapter is modular enough to be taken out of this repo and used as an dependency. It can be used by any other project.)
  2. Uses the arguments passed to store the data (cid) according to the config.
  3. Publishes storage status via websocket.

How to run

  1. Clone this repo
  2. Open a terminal window and run > npm install
  3. To start the lighthouse node run > node src/index.js

Now the lighthouse node is up and running, feel free to run it locally on your system or host on a server.

This node also starts a socket.io server at port 3002 with which a socket.io client can interact to get the storage info of a file.

Sample code for socket.io client -

const io = require("socket.io-client");
const socket = io("ws://localhost:3002");

// handle the event sent with socket.send()
socket.on("message", data => {
  console.log(data);
});

socket.on("connect", () => {
  // or with emit() and custom event names
  socket.emit("cid", "QmbazJSQWTwmtAFqDgqxMG5JxGhg3kgYwdapaQDMM88HTP"); // put in your <cid> here for which storage-info is requested
});

// handle the event sent with socket.emit()
socket.on("storageInfo", (storageInfo) => {
  console.log('storageInfo for cid:', storageInfo);
});

Use Truffle box to Interact with Lighthouse

Demo Video - https://vimeo.com/552468707

  • make a new directory -
          mkdir lighthouse

  • cd into that -
          cd lighthouse

  • run the following command -
          truffle unbox nandit123/lighthouse

  • Install the packages -
          npm i

  • Compile Smart Contracts -
          truffle compile

  • Migrate and Deploy -
          truffle migrate --network rinkeby

  • Now start truffle console using -
          truffle console

  • Run the following command to get the instance of the deployed smart contract -
          let specificInstance = await FPS.at("0xdFEa08D7c2B43498Bfe32778334c9279956057F0");

  • Now run this command to store data to filecoin -
          let result = specificInstance.store("sampleCid", "SampleConfig");

  • You can get the transaction hash of the previous call by typing in -
          result

  • To get the storageInfo replace your cid in the client.js file and run -
          node client.js

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].