How to convert different Filecoin addresses programmatically? #650
Unanswered
longfeiWan9
asked this question in
Q&A
Replies: 2 comments
-
Anyone reading this should also read glifio/modules#318. There isn't a 1:1 mapping between |
Beta Was this translation helpful? Give feedback.
0 replies
-
A new JSON-RPC API
You can learn how to use this API here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Filecoin address types:
There are a couple of libraries you can use for the address conversion.
Conversion
f410 <-> 0x
we are going to use glif/filecoin-address library. So you need to install it into your project first.
npm install @glif/filecoin-address
Then you can write code to convert your eth address to Filecoin f410 address.
we can also use glif/filecoin-address library.
f0 -> 0x
All Filecoin addresses (f1, f2, f3) will have a unique ID address assigned to it, and this ID address will be finalized after 900 epochs. ID address can be converted to 0x address which could be used to send FIL to your other Filecoin wallet using Ethereum-compatible tools.
f1/f2/f3 <-> f410 or 0x
You cannot.
Beta Was this translation helpful? Give feedback.
All reactions