ChainSafe / forest-explorer

Forest Filecoin Explorer and Network Inspector
https://forest-explorer.chainsafe.dev/
Apache License 2.0
0 stars 0 forks source link

Copy enough code from Forest to sign a message #9

Open lemmih opened 1 month ago

lemmih commented 1 month ago

Implementing a Filecoin faucet requires signing messages. Forest has the code for signing messages but is not available as an independent crate.

We need:

Both SignatureType::Bls and SignatureType::Secp256k1 have to be supported.

Test by importing a key and signing a test message. The output should be identical to forest-wallet sign -m [MSG].

LesnyRumcajs commented 1 month ago

Does the code need to be copied? Could we re-use instead by adding forest-filecoin into the dependencies? This might require some visibility changes in the forest-filecoin crate, but otherwise should be feasible.

lemmih commented 1 month ago

I'm fairly sure forest-filecoin doesn't compile to WASM. But splitting off smaller crates is certainly a future goal.