glifio / modules

All Glif npm modules
19 stars 16 forks source link

First stab at f4 address implementation #242

Closed Schwartz10 closed 2 years ago

Schwartz10 commented 2 years ago

Yo @navFooh can we quickly unblock the community with minimal support of the f4 address class? I tried to take a first stab at it, and I feel like it's close, but I'm not sure what to do with the checksum, and the base32 encoded subaddress does not match the go implementation.

The only thing we need to unblock the community is - given an eth address, produce the associated f4 address

Links below:

go-address implementation This is how they translate an eth URL ^^ into its f410 address in the ETH JSON RPC https://github.com/filecoin-project/lotus/blob/raulk/lisbon/api/eth_types.go#L293-L300

We just need to get the encode function right..