1.4.0 • Published 2 years ago

lighthouse-web3 v1.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Lighthouse

Lighthouse is a permanent decentralized file storage protocol that allows the ability to pay once and store forever. While traditionally, users need to repeatedly keep track and pay for their storage after every fixed amount of time, Lighthouse manages this for them and makes sure that user files are stored forever. The aim is to move users from a rent-based cost model where they are renting their own files on cloud storage to a permanent ownership model. It is built on top of IPFS, Filecoin, and Polygon. It uses the existing miner network and storage capacity of the filecoin network.

Installation

npm install -g lighthouse-web3

CLI Usage

# create-wallet
lighthouse-web3 create-wallet

# import-wallet
lighthouse-web3 import-wallet --key <private_key>
lighthouse-web3 import-wallet --path <path_to_wallet_file>

# wallet-forget
lighthouse-web3 wallet-forget

# balance
lighthouse-web3 balance

# deploy
lighthouse-web3 deploy <path>

# status
lighthouse-web3 status <cid>

# get-uploads
lighthouse-web3 get-uploads

# wallet
lighthouse-web3 wallet

NodeJs Example

const lighthouse = require("lighthouse-web3");

// Create wallet
const balance = await lighthouse.createWallet(
  "Password for private key encryption"
);

// Get wallet balance
const balance = await lighthouse.getBalance("Public Key");

// Get Quote
const quote = await lighthouse.getQuote('/home/cosmos/Desktop/wow.jpg' '0x1Ec09D4B3Cb565b7CCe2eEAf71CC90c9b46c5c26', 'fantom');

// Deploy File
const deploy = await lighthouse.deploy('/home/cosmos/Desktop/wow.jpg', signer, false, signedMessage, publicKey, "fantom");

Refer GitBook

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.4.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago