Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize Lava Docs #180

Merged
merged 51 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5230ca5
add cosmoshub chain page template
KagemniKarimu Oct 16, 2023
2fd40a6
add ethereum chain pages template
KagemniKarimu Oct 16, 2023
37f01fe
add lava chain pages
KagemniKarimu Oct 16, 2023
45b1fe8
update cosmoshub page
KagemniKarimu Oct 19, 2023
79c0404
update ethereum chain page
KagemniKarimu Oct 19, 2023
aa864b8
update lava chain page
KagemniKarimu Oct 19, 2023
e128d0c
fix cosmoshub pages
KagemniKarimu Oct 19, 2023
90a89dd
fix avalanche chain page
KagemniKarimu Oct 19, 2023
2cf0659
upgrade docusaurus & tailwindcss
KagemniKarimu Oct 19, 2023
0db3016
change navbars (top & side)
KagemniKarimu Oct 19, 2023
615498b
swizzle DocCard & DocCardList
KagemniKarimu Oct 19, 2023
a54c309
add chains landing page
KagemniKarimu Oct 19, 2023
2f6c1ac
add banners & banner templates to static img folder
KagemniKarimu Oct 20, 2023
e9245da
add banners to tops of main pages
KagemniKarimu Oct 20, 2023
f85bffd
add latestversion react component
KagemniKarimu Oct 20, 2023
ae9922f
add blockchain integration request link to chains page
KagemniKarimu Oct 20, 2023
3361316
update docs thumbnail (theme config image)
KagemniKarimu Oct 24, 2023
6cf4a99
add starknet public endpoints to starknet-dev page
KagemniKarimu Oct 25, 2023
f332cd0
add official endpoints to lava dev page
KagemniKarimu Oct 25, 2023
9aefbd9
update lava chain provider page
KagemniKarimu Oct 26, 2023
20a3d60
update chain pages with new sdk interfaces
KagemniKarimu Oct 26, 2023
2f7577d
update README
KagemniKarimu Oct 27, 2023
c3260c6
fix README
KagemniKarimu Oct 27, 2023
5695cfb
move discord README widget
KagemniKarimu Oct 27, 2023
64d7ca3
adjust README formatting
KagemniKarimu Oct 27, 2023
ec844fb
correct discord link in README
KagemniKarimu Oct 27, 2023
9736b25
update README order
KagemniKarimu Oct 27, 2023
f14f1e3
rename section to Lava Protocol
KagemniKarimu Nov 1, 2023
57ced48
repair formatting in access-intro
KagemniKarimu Nov 1, 2023
97f4ef5
finalize intro page; add version information
KagemniKarimu Nov 1, 2023
8575f4e
spruce up tutorials page
KagemniKarimu Nov 1, 2023
ac58a20
restore sdk install example to sdk-prerequisites
KagemniKarimu Nov 1, 2023
d7338a3
add shields & wip note to supported chains page
KagemniKarimu Nov 1, 2023
a20b0b3
fix typo, update avalanche methods
KagemniKarimu Nov 1, 2023
9dc599d
add caution popout to axelar node page
KagemniKarimu Nov 1, 2023
b47a03e
fix chain command on axelar chain page
KagemniKarimu Nov 1, 2023
7c44efe
add emojis to celo node page
KagemniKarimu Nov 1, 2023
61f830b
add supported methods to celo chain page
KagemniKarimu Nov 1, 2023
1f9f4ec
update cosmoshub-dev sdk input
KagemniKarimu Nov 1, 2023
db09095
add content to cosmoshub node page
KagemniKarimu Nov 1, 2023
63aaf45
add content to cosmoshub chain page
KagemniKarimu Nov 1, 2023
12aad9d
correct chainIds on ETH dev page
KagemniKarimu Nov 1, 2023
ed9ce05
add content to eth node page
KagemniKarimu Nov 1, 2023
3c790a1
add content to eth chain page
KagemniKarimu Nov 1, 2023
aa6520e
remove sdk output from lava dev page
KagemniKarimu Nov 1, 2023
65819dc
add content to lava node page
KagemniKarimu Nov 1, 2023
f0fcf8f
add cosmos icon file for tutorials page
KagemniKarimu Nov 1, 2023
a9aeea0
add content to lava chain page
KagemniKarimu Nov 1, 2023
2a1d833
fix lava supported method formatting
KagemniKarimu Nov 1, 2023
de4d475
add kapa.ai demo script to docusaurus config
KagemniKarimu Nov 1, 2023
459626d
fix broken links
KagemniKarimu Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add cosmoshub chain page template
KagemniKarimu committed Oct 24, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
bastelfreak Tim Meusel
commit 5230ca5bd1225e60b0bbce30359029311cf6099d
95 changes: 95 additions & 0 deletions docs/chains/cosmoshub-chain/cosmoshub-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
slug: /filecoin-dev
title: Getting Filecoin RPC
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Getting Filecoin RPC

## [SDK](https://github.com/lavanet/lava-sdk)

:::caution

Lava SDK is currently in Alpha. Please observe the documentation on both [frontend](https://docs.lavanet.xyz/sdk-frontend?utm_source=getting-filecoin-rpc&utm_medium=docs&utm_campaign=docs-to-docs) and [backend](https://docs.lavanet.xyz/sdk-backend?utm_source=getting-filecoin-rpc&utm_medium=docs&utm_campaign=docs-to-docs) use before getting started.

:::

### Input 📥

<Tabs>
<TabItem value="backend" label="BackEnd">

```jsx
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")

async function useFilecoinMainnet() {

const filecoinMainnet = await new LavaSDK({
privateKey: process.env.PRIVATE_KEY, //hide your private key in an environmental variable
chainID: 'FVM',
});

const filecoinBlockResponse = await filecoinMainnet.sendRelay({
method: "eth_blockNumber",
params: [],
});

console.log(filecoinBlockResponse);
}

(async () => {
await useFilecoinMainnet();
})();
```

</TabItem>
<TabItem value="frontend" label="FrontEnd">

```jsx
// Install lavaSDK with the following command:
// npm i @lavanet/lava-sdk
const { LavaSDK } = require("@lavanet/lava-sdk")

async function useFilecoinMainnet() {

const filecoinMainnet = await new LavaSDK({
badge: {
badgeServerAddress: "https://badges.lavanet.xyz", // Or your own Badge-Server URL
projectId: "enter_your_project_id_here"
},
chainID: 'FVM',
});

const filecoinBlockResponse = await filecoinMainnet.sendRelay({
method: "eth_blockNumber",
params: [],
});

console.log(filecoinBlockResponse);
}

(async () => {
await useFilecoinMainnet();
})();
```
</TabItem>
</Tabs>

### Output 📤

<iframe width="100%" src="/img/chains/filecoin_call.webm" frameborder="0" allow="autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

To learn more about our SDK visit the [Getting Started guide](https://docs.lavanet.xyz/sdk-getting-started?utm_source=getting-filecoin-rpc&utm_medium=docs&utm_campaign=docs-to-docs)

<hr />

## [Gateway](https://gateway.lavanet.xyz/?utm_source=filecoin-dev&utm_medium=docs&utm_campaign=docs-to-gateway)

To learn more about using the Lava Gateway visit the [Getting Started guide](https://docs.lavanet.xyz/gateway-getting-started?utm_source=filecoin-dev&utm_medium=docs&utm_campaign=docs-to-docs)

<hr />
<br />
102 changes: 102 additions & 0 deletions docs/chains/cosmoshub-chain/cosmoshub-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
slug: /filecoin-node
title: Running a Filecoin RPC Node
---

# Running a Filecoin RPC Node

## Requirements 📄

Before getting started, Filecoin node setup requires many dependencies to setup correctly. These dependencies are commonly already installed on most modern linux machines, but include the following:

```
mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget
```

The list above is specific to Debian/Ubuntu-based OSes. For a different configuration, check out [Lotus docs](https://lotus.filecoin.io/lotus/install/linux/#system-specific).

:::info

Note that you will also need [Go v1.19.7](https://go.dev/dl/) or higher for a successful install.

:::

## Install Lotus Filecoin Node 🚀

Filecoin is a divers ecosystem with different node implementations. Each node implementation has different ways to generate and manage authentication tokens. This guide uses [Lotus Filecoin](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/), which is the reference node implementation for the Filecoin network.

### Get Lotus
To get started, input the following into the terminal:

```bash

git clone https://github.com/filecoin-project/lotus.git
cd lotus/
git checkout releases

```

### Decide Mainnet or Testnet

```bash
# join mainnet
make clean all

# Or to join a testnet or devnet:
make clean calibnet # Calibration with min 32GiB sectors
```

### Compile Lotus
Finalize the install by inputting `sudo make install` in the terminal.
You can run `lotus --version` to ensure that this process completed successfully.

:::tip

Specific CPU architectures may require additional configuration. Consult the [Lotus Filecoin documentation](https://lotus.filecoin.io/lotus/install/linux/#build-and-install-lotus) for additional details if you encounter any errors.

:::

## Start your RPC Server 🖥️

### Configure your RPC node
1. Download & Import a Snapshot:
```bash
aria2c -x5 https://snapshots.mainnet.filops.net/minimal/latest.zst
# Replace the <snapshot-filename> based on the snapshot you downloaded.
lotus daemon --import-snapshot <snapshot-filename> --halt-after-import

```



2. Edit the configuration file `./.lotus/config.toml` to run RPC.
You can do this by finding `EnableEthRPC` and ensuring it's set to `true`:

```bash
# EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
# This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above.
#
# type: bool
# env var: LOTUS_FEVM_ENABLEETHRPC
EnableEthRPC = true

```
### Launch

Run the following command:

```bash
nohup lotus daemon > ~/lotus.log 2>&1 &
```

Log messages can be found at `~/lotus.log` - it will take a moment for your node to get the latest blocks!
After that, you should be ready to serve RPC!


## Apply to our Provider Incubation Program 📋

In our current state of Testnet, there is an additional stage to pass through before you can become a provider on the Lava Network. Please fill out the [application form](https://lavanet.typeform.com/to/ORi3A13v?utm_source=becoming-a-lava-provider-for-filecoin&utm_medium=docs&utm_campaign=filecoin-pre-grant) for our Provider Incubation Program. Feel free to drop a line in our [Discord](https://discord.gg/UxujNZbW) once you’ve completed this step!

## Setup your Provider on Lava Network 🌋

Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the [provider setup documentation](https://docs.lavanet.xyz/provider-setup?utm_source=running-a-filecoin-rpc-node&utm_medium=docs&utm_campaign=filecoin-pre-grant) available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node.
135 changes: 135 additions & 0 deletions docs/chains/cosmoshub-chain/cosmoshub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
slug: /filecoin
title: Filecoin x Lava
---

import RoadmapItem from '@site/src/components/RoadmapItem'

![Filecoin Logo](/img/chains/filecoin_logo.svg)

[<RoadmapItem icon="⛏️" title="Get RPC" description="Get access to Lava's Web3 APIs and start building on the network with ease"/>](/filecoin-dev)

[<RoadmapItem icon="🚀" title="Run an RPC Node" description="Become a part of Lava's network by running your own RPC node and accessing Web3 APIs seamlessly"/>](/filecoin-node)

<hr />
<br />

<center>

## ⚙️ Supported APIs ⚙️

</center>

### Specification 📑

https://raw.githubusercontent.com/lavanet/lava/main/cookbook/specs/spec_add_fvm.json


### Protocols 🔗

| Platform | jsonrpc/http | jsonrpc/wss
| --------- | -------- | ------------- |
| Gateway | ✅ | ✅
| SDK ||


### Methods 🛠️
<details>
<summary> List </summary>

- Filecoin.ChainGetBlock
- Filecoin.ChainGetBlockMessages
- Filecoin.ChainGetGenesis
- Filecoin.ChainGetMessage
- Filecoin.ChainGetNode
- Filecoin.ChainGetParentMessages
- Filecoin.ChainGetParentReceipts
- Filecoin.ChainGetPath
- Filecoin.ChainGetTipSet
- Filecoin.ChainGetTipSetAfterHeight
- Filecoin.ChainGetTipSetByHeight
- Filecoin.ChainHasObj
- Filecoin.ChainHead
- Filecoin.ChainNotify
- Filecoin.ChainReadObj
- Filecoin.ClientQueryAsk
- Filecoin.GasEstimateFeeCap
- Filecoin.GasEstimateGasLimit
- Filecoin.GasEstimateGasPremium
- Filecoin.MpoolGetNonce
- Filecoin.MpoolPending
- Filecoin.MpoolPush
- Filecoin.StateAccountKey
- Filecoin.StateAllMinerFaults
- Filecoin.StateCall
- Filecoin.StateChangedActors
- Filecoin.StateCompute
- Filecoin.StateDealProviderCollateralBounds
- Filecoin.StateDecodeParams
- Filecoin.StateGetActor
- Filecoin.StateGetReceipt
- Filecoin.StateListActors
- Filecoin.StateListMessages
- Filecoin.StateListMiners
- Filecoin.StateLookupID
- Filecoin.StateMarketBalance
- Filecoin.StateMarketDeals
- Filecoin.StateMarketParticipants
- Filecoin.StateMarketStorageDeal
- Filecoin.StateMinerActiveSectors
- Filecoin.StateMinerAvailableBalance
- Filecoin.StateMinerDeadlines
- Filecoin.StateMinerFaults
- Filecoin.StateMinerInfo
- Filecoin.StateMinerInitialPledgeCollateral
- Filecoin.StateMinerPartitions
- Filecoin.StateMinerPower
- Filecoin.StateMinerPreCommitDepositForPower
- Filecoin.StateMinerProvingDeadline
- Filecoin.StateMinerRecoveries
- Filecoin.StateMinerSectorAllocated
- Filecoin.StateMinerSectorCount
- Filecoin.StateMinerSectors
- Filecoin.StateNetworkName
- Filecoin.StateNetworkVersion
- Filecoin.StateReadState
- Filecoin.StateReplay
- Filecoin.StateSearchMsg
- Filecoin.StateSearchMsgLimited
- Filecoin.StateSectorExpiration
- Filecoin.StateSectorGetInfo
- Filecoin.StateSectorPartition
- Filecoin.StateSectorPreCommitInfo
- Filecoin.StateVMCirculatingSupplyInternal
- Filecoin.StateVerifiedClientStatus
- Filecoin.StateVerifiedRegistryRootKey
- Filecoin.StateVerifierStatus
- Filecoin.SyncState
- Filecoin.WalletBalance
- Filecoin.WalletValidateAddress
- Filecoin.WalletVerify
- Filecoin.EthAccounts
- Filecoin.EthBlockNumber
- Filecoin.EthCall
- Filecoin.EthChainId
- Filecoin.EthEstimateGas
- Filecoin.EthFeeHistory
- Filecoin.EthGasPrice
- Filecoin.EthGetBalance
- Filecoin.EthGetBlockByHash
- Filecoin.EthGetBlockByNumber
- Filecoin.EthGetBlockTransactionCountByHash
- Filecoin.EthGetBlockTransactionCountByNumber
- Filecoin.EthGetCode
- Filecoin.EthGetFilterChanges
- Filecoin.EthGetFilterLogs
- Filecoin.EthGetLogs
- Filecoin.EthGetMessageCidByTransactionHash
- Filecoin.EthGetStorageAt
- Filecoin.EthGetTransactionByHash
- Filecoin.EthGetTransactionCount
- Filecoin.EthGetTransactionHashByCid
- Filecoin.EthGetTransactionReceipt
- Filecoin.EthMaxPriorityFeePerGas

</details>