Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions src/rpc/methods/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl AuthNew {

impl RpcMethod<2> for AuthNew {
const NAME: &'static str = "Filecoin.AuthNew";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.AuthNew` RPC method.");
const N_REQUIRED_PARAMS: usize = 1;
// Note: Lotus does not support the optional `expiration_secs` parameter
const PARAM_NAMES: [&'static str; 2] = ["permissions", "expirationSecs"];
Expand Down Expand Up @@ -57,6 +58,7 @@ impl RpcMethod<2> for AuthNew {
pub enum AuthVerify {}
impl RpcMethod<1> for AuthVerify {
const NAME: &'static str = "Filecoin.AuthVerify";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.AuthVerify` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["headerRaw"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down
2 changes: 2 additions & 0 deletions src/rpc/methods/beacon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use enumflags2::{BitFlags, make_bitflags};
pub enum BeaconGetEntry {}
impl RpcMethod<1> for BeaconGetEntry {
const NAME: &'static str = "Filecoin.BeaconGetEntry";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Filecoin.BeaconGetEntry` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["first"];
const API_PATHS: BitFlags<ApiPaths> = make_bitflags!(ApiPaths::V0); // Not supported in V1
const PERMISSION: Permission = Permission::Read;
Expand Down
31 changes: 31 additions & 0 deletions src/rpc/methods/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ impl RpcMethod<1> for ChainGetParentReceipts {
pub enum ChainGetMessagesInTipset {}
impl RpcMethod<1> for ChainGetMessagesInTipset {
const NAME: &'static str = "Filecoin.ChainGetMessagesInTipset";
const DESCRIPTION: Option<&'static str> = Some(
"ChainGetMessagesInTipset returns message stores in current tipset
",
);
const PARAM_NAMES: [&'static str; 1] = ["tipsetKey"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand All @@ -248,6 +252,7 @@ impl RpcMethod<1> for ChainGetMessagesInTipset {
pub enum ChainPruneSnapshot {}
impl RpcMethod<1> for ChainPruneSnapshot {
const NAME: &'static str = "Forest.SnapshotGC";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Forest.SnapshotGC` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["blocking"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Admin;
Expand All @@ -273,6 +278,7 @@ impl RpcMethod<1> for ChainPruneSnapshot {
pub enum ForestChainExport {}
impl RpcMethod<1> for ForestChainExport {
const NAME: &'static str = "Forest.ChainExport";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Forest.ChainExport` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["params"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all_with_v2();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -412,6 +418,8 @@ impl RpcMethod<1> for ForestChainExport {
pub enum ForestChainExportStatus {}
impl RpcMethod<0> for ForestChainExportStatus {
const NAME: &'static str = "Forest.ChainExportStatus";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Forest.ChainExportStatus` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all_with_v2();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -456,6 +464,8 @@ impl RpcMethod<0> for ForestChainExportStatus {
pub enum ForestChainExportCancel {}
impl RpcMethod<0> for ForestChainExportCancel {
const NAME: &'static str = "Forest.ChainExportCancel";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Forest.ChainExportCancel` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all_with_v2();
const PERMISSION: Permission = Permission::Read;
Expand All @@ -480,6 +490,8 @@ impl RpcMethod<0> for ForestChainExportCancel {
pub enum ForestChainExportDiff {}
impl RpcMethod<1> for ForestChainExportDiff {
const NAME: &'static str = "Forest.ChainExportDiff";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Forest.ChainExportDiff` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["params"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all_with_v2();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -539,6 +551,7 @@ impl RpcMethod<1> for ForestChainExportDiff {
pub enum ChainExport {}
impl RpcMethod<1> for ChainExport {
const NAME: &'static str = "Filecoin.ChainExport";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.ChainExport` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["params"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -630,6 +643,12 @@ impl RpcMethod<1> for ChainHasObj {
pub enum ChainStatObj {}
impl RpcMethod<2> for ChainStatObj {
const NAME: &'static str = "Filecoin.ChainStatObj";
const DESCRIPTION: Option<&'static str> = Some(
"ChainStatObj returns statistics about the graph referenced by 'obj'.
If 'base' is also specified, then the returned stat will be a diff
between the two objects.
",
);
const PARAM_NAMES: [&'static str; 2] = ["objCid", "baseCid"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -859,6 +878,10 @@ impl RpcMethod<2> for ChainGetTipSetAfterHeight {
pub enum ChainGetGenesis {}
impl RpcMethod<0> for ChainGetGenesis {
const NAME: &'static str = "Filecoin.ChainGetGenesis";
const DESCRIPTION: Option<&'static str> = Some(
"ChainGetGenesis returns the genesis tipset.
",
);
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -1227,6 +1250,10 @@ impl RpcMethod<0> for ChainGetTipSetFinalityStatus {
pub enum ChainSetHead {}
impl RpcMethod<1> for ChainSetHead {
const NAME: &'static str = "Filecoin.ChainSetHead";
const DESCRIPTION: Option<&'static str> = Some(
"ChainSetHead forcefully sets current chain head. Use with caution.
",
);
const PARAM_NAMES: [&'static str; 1] = ["tsk"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Admin;
Expand Down Expand Up @@ -1260,6 +1287,8 @@ impl RpcMethod<1> for ChainSetHead {
pub enum ChainGetMinBaseFee {}
impl RpcMethod<1> for ChainGetMinBaseFee {
const NAME: &'static str = "Forest.ChainGetMinBaseFee";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Forest.ChainGetMinBaseFee` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["lookback"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down Expand Up @@ -1314,6 +1343,8 @@ impl RpcMethod<1> for ChainTipSetWeight {
pub enum ChainGetTipsetByParentState {}
impl RpcMethod<1> for ChainGetTipsetByParentState {
const NAME: &'static str = "Forest.ChainGetTipsetByParentState";
const DESCRIPTION: Option<&'static str> =
Some("Calls the `Forest.ChainGetTipsetByParentState` RPC method.");
const PARAM_NAMES: [&'static str; 1] = ["parentState"];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/methods/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static SESSION_UUID: LazyLock<Uuid> = LazyLock::new(crate::utils::rand::new_uuid
pub enum Session {}
impl RpcMethod<0> for Session {
const NAME: &'static str = "Filecoin.Session";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.Session` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand All @@ -31,6 +32,7 @@ impl RpcMethod<0> for Session {
pub enum Version {}
impl RpcMethod<0> for Version {
const NAME: &'static str = "Filecoin.Version";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.Version` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand All @@ -57,6 +59,7 @@ impl RpcMethod<0> for Version {
pub enum Shutdown {}
impl RpcMethod<0> for Shutdown {
const NAME: &'static str = "Filecoin.Shutdown";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.Shutdown` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Admin;
Expand All @@ -77,6 +80,7 @@ impl RpcMethod<0> for Shutdown {
pub enum StartTime {}
impl RpcMethod<0> for StartTime {
const NAME: &'static str = "Filecoin.StartTime";
const DESCRIPTION: Option<&'static str> = Some("Calls the `Filecoin.StartTime` RPC method.");
const PARAM_NAMES: [&'static str; 0] = [];
const API_PATHS: BitFlags<ApiPaths> = ApiPaths::all();
const PERMISSION: Permission = Permission::Read;
Expand Down
Loading