Skip to content

Commit 7f4f144

Browse files
vasco-santosrvagg
authored andcommitted
chore: fil audit for fil signing tools
1 parent e309752 commit 7f4f144

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# [Zondax/filecoin-signing-tools](https://github.com/Zondax/filecoin-signing-tools)
2+
3+
> Exploration report by @vasco-santos
4+
5+
The filecoin signing library used across several filecoin ecosystem libraries, such as:
6+
- `filecoin.js`
7+
- `ceramicnetwork/cli`
8+
- A CLI that allows you to interact with the Ceramic protocol.
9+
- `@nodefactory/filsnap`
10+
- Metamask snap (plugin) to enable Metamask users interaction with filecoin dapps.
11+
- `@glif/local-managed-provider`
12+
13+
## Maturity
14+
15+
Currently in `v.0.15.0`, this library is widely used, has been actively maintained over the last months and is the go to library for signing related operations in the ecosystem. It offers all the needed cryptographic primitives to interact with a Lotus node.
16+
17+
## Project
18+
19+
### Libraries
20+
21+
1. Rust Native Library
22+
- Secp256k1
23+
- BLS
24+
- Filecoin transactions (CBOR <> JSON serialization)
25+
- Multisig (in progress)
26+
2. WASM Library (Browser and Node.js)
27+
- Secp256k1
28+
- BLS
29+
- Filecoin transactions (CBOR <> JSON serialization)
30+
- Multisig (in progress)
31+
3. JSON RPC Server
32+
- Exposes most of the functions available in the signing library
33+
34+
### Cryptographic primitives
35+
36+
1. `generateMnemonic`
37+
2. `keyDerive`
38+
3. `keyDeriveFromSeed`
39+
4. `keyRecover`
40+
5. `transactionSerialize`
41+
6. `transactionSerializeRaw`
42+
7. `transactionParse`
43+
8. `transactionSign`
44+
9. `transactionSignLotus`
45+
10. `transactionSignRaw`
46+
11. `verifySignature`
47+
12. `addressAsBytes`
48+
13. `bytesToAddress`
49+
50+
All available via Rust, Wasm (browser and Node.js) and JSON RPC Server.
51+
52+
## Key Findings
53+
54+
- Per [https://github.com/Zondax/filecoin-signing-tools/issues/373](https://github.com/Zondax/filecoin-signing-tools/issues/373), [Zondax/filecoin-signing-tools#358](https://github.com/Zondax/filecoin-signing-tools/issues/358), [Zondax/filecoin-signing-tools#356](https://github.com/Zondax/filecoin-signing-tools/issues/356) and [Zondax/filecoin-signing-tools#352](https://github.com/Zondax/filecoin-signing-tools/issues/352), there are a few issues with bundlers and browsers.
55+
- Per [Zondax/filecoin-signing-tools#368](https://github.com/Zondax/filecoin-signing-tools/issues/368) and [Zondax/filecoin-signing-tools#343](https://github.com/Zondax/filecoin-signing-tools/issues/343), there are several issues with WASM. The browser WASM example uses the pure JS implementation and an issue tracking how wasm is being loaded in the browser. Could not find any project leveraging the WASM library. Is it working?
56+
57+
## Overall Recommendations
58+
59+
- The [documentation site](https://zondax.ch/updating-documentation) as the main source for docs should be available. It has been on maintenance, which makes it difficult to understand what methods are supported unless we check the code/tests and this should be handled.
60+
- Clarify WASM library status per above findings
61+
- Friction onboarding
62+
- Several examples are provided, but some are not easy to run and do not have instructions. It would be extremely valuable for the community to have instructions for running this examples together with some educational content regarding what are the use cases for each and what happens under the hood.
63+
64+
## Potential Action Items for w3dt
65+
66+
- Run the WASM code in the browser and compare the bundle size with the pure JS implementation

0 commit comments

Comments
 (0)