-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore(gateway): add new methods #12727
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"github.com/ipfs/go-cid" | ||
|
||
"github.com/filecoin-project/go-address" | ||
"github.com/filecoin-project/go-bitfield" | ||
"github.com/filecoin-project/go-jsonrpc" | ||
"github.com/filecoin-project/go-state-types/abi" | ||
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" | ||
|
@@ -34,6 +35,12 @@ import ( | |
// * Generate openrpc blobs | ||
|
||
type Gateway interface { | ||
ChainGetNode(ctx context.Context, p string) (*IpldObject, error) | ||
StateMinerPartitions(ctx context.Context, m address.Address, dlIdx uint64, tsk types.TipSetKey) ([]Partition, error) | ||
StateMinerSectors(context.Context, address.Address, *bitfield.BitField, types.TipSetKey) ([]*miner.SectorOnChainInfo, error) | ||
StateMinerFaults(context.Context, address.Address, types.TipSetKey) (bitfield.BitField, error) | ||
StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) | ||
StateMarketParticipants(context.Context, types.TipSetKey) (map[string]MarketBalance, error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one isn't small - mainnet currently gives a map with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all these methods were added by requests of different users |
||
MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error) | ||
ChainGetBlock(context.Context, cid.Cid) (*types.BlockHeader, error) | ||
MinerGetBaseInfo(context.Context, address.Address, abi.ChainEpoch, types.TipSetKey) (*MiningBaseInfo, error) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this one @dumikau ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I can't see this one making it to the v2 API that's under development now without a really good use-case, are people asking for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this method was added by request of a user from Neti-Soft