Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

feat: add Filecoin.ChainNotify method and Filecoin support websockets and subscriptions #712

Closed

Conversation

mikeseese
Copy link
Contributor

@mikeseese mikeseese commented Jan 12, 2021

This PR is part of #694 (although most Lotus applications want to use WebSockets)

This supports the Chain Explorer feature in the https://github.com/filecoin-shipyard/filecoin-network-inspector example

image


This PR also resolves #692:

image.png

@mikeseese mikeseese marked this pull request as ready for review January 14, 2021 18:30
package.json Outdated Show resolved Hide resolved
src/packages/core/src/options/server-options.ts Outdated Show resolved Hide resolved
src/packages/core/src/options/server-options.ts Outdated Show resolved Hide resolved
src/packages/core/src/options/server-options.ts Outdated Show resolved Hide resolved
// We have to use type any instead of ReturnType<typeof connector.parse>
// on `payload` because Typescript isn't smart enough to understand the
// ambiguity doesn't actually exist
let payload: any;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

Is the ambiguity caused by just having multiple chains? Or is it specific to the Filecoin API implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ambiguity caused by having multiple chains, not specific to Filecoin. It's likely that typescript is smart enough with some more convoluted types lol, but I didn't take the appropriate time to learn how to do the complex types yall have set up, because the current types do not support it. I personally don't think it's worth the time for this small functionality

package.json Outdated Show resolved Hide resolved
@mikeseese mikeseese force-pushed the feat/add-filecoin-to-dynamic-cli branch from 8801d55 to fabba07 Compare January 16, 2021 01:18
@mikeseese mikeseese force-pushed the feat/filecoin-chainnotify branch 2 times, most recently from b8ec20f to ffcef74 Compare January 16, 2021 01:29
@mikeseese mikeseese force-pushed the feat/add-filecoin-to-dynamic-cli branch from db1c5e8 to 482c72a Compare January 19, 2021 03:43
@mikeseese mikeseese force-pushed the feat/add-filecoin-to-dynamic-cli branch from acec01f to 50aa0aa Compare January 19, 2021 22:16
@mikeseese
Copy link
Contributor Author

We're postponing these reviews until later

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants