To follow on the recent announcement of FrenchXCore’s FX Auto-Compounder, you’ll find hereafter some instructions on what is required to run it and how to run it.
First, you’re gonna need to have a computer or VPS with Java (at least 17) installed. You’ll find the latest OpenJDK here for download.
Once Java is setup, you’re gonna need to download the FX AutoCompounder JAR with dependencies from our github. It is available here.
Scenario #1 - Windows user - JAR downloaded in D:\Autocompound
Run the following commands (to be adapted to your own folder):
`d:'
cd d:\Autocompound
java -jar FxAutoCompounder-1.1.0-SNAPSHOT-jar-with-dependencies.jar enc
This will allow you to encrypt your seedphrase with a password of your own.
When required to enter a password (Enter root password [then press ENTER]:), setup a strong password (and note it somewhere safe) and press [ENTER]
When required to enter a password (Enter root password again [then press ENTER]:), re-type your password and press [ENTER]
When required to enter the value to encrypt (Enter value to encrypt [then press ENTER]:), copy and paste your seedphrase (all lowercase, words separated with a space), then press [ENTER]
Copy in a text file the value after Encrypted value is :
This is an version of your seedphrase encrypted using AES256 algorithm and your password.
If you want to AutoCompound for multiple accounts (different seedphrases), repeat steps 3-7 with the other seedphrases.
From there, you will be able to run the FX AutoCompounder without having to type your seedphrase anymore. To know all options, just run java -jar FxAutoCompounder-1.1.0-SNAPSHOT-jar-with-dependencies.jar ac
If you want to simply autocompound for a single delegator, just run java -jar FXAutoCompounder.jar ac -d *YOUR-FX-DELEGATOR-ADDRESS* -s *YOUR-ENCRYPTED-SEEDPHRASE*
Scenario #2 - Linux user - JAR downloaded in /home/ubuntu/
Same as above, but replace steps 1-2 with :
In ordre to finalize my DApp autocompounder using f(x)Wallet and WalletConnect, I would need a description of the f(x)Wallet WC interface messages, such as functionx_sign, onSignMessage, etc.
Could someone provide me that please ?
I’m assuming it’s probable available since MarginX recompiled a special f(x)Wallet version on top of it.
As I feared, f(x)wallet v2 removed the ‘functionx_sign’ interface (com.pundix.core.enums.MsgType) which I intended to use to provide an auto-compounder Dapp on our website.
I thought announcing how I did it on the forum would give FunctionX team notice that I intended to use it.
Nevertheless, I found some interesting features in f(x)Wallet v2’s code, but really would appreciate team’s guidance or documentation.
In f(x)Wallet v2, com.pundix.functionx.SignType have plenty of options, especially FUNCTIONX_WC_SIGN_V1 and FUNCTIONX_WC_SIGN_DIRECT_V1.
If possible, I’d like to avoid spending another week to reverse engineer f(x)Wallet v2’s code to find how to sign a transaction again.
Would it be possible to publish some documentation about how to use those com.pundix.functionx.SignType enums (an API) ?
For the future, I would really appreciate if the team was announcing beforehand that they were working on such an effort, because I spent my whole summer working on it as well
Unfortunately, current documentation is too “light” to try and code something neat.
Would it be possible to have a detailed documentation on how to use these 3 F(x)Wallet method calls thru WalletConnect and MetaMask ?
functionx_wc_accounts_v1
functionx_wc_sign_direct_tx_v1
functionx_wc_sign_tx_v1
And maybe later those ones:
cosmostation_wc_accounts_v1
cosmostation_wc_sign_tx_v1
onSendTransaction
eth_sign
eth_signTransaction
eth_signTypedData
eth_signTypedData_v3
eth_signTypedData_v4
keplr_get_key_wallet_connect_v1
keplr_sign_amino_wallet_connect_v1
personal_sign
onSignMessage
wallet_switchEthereumChain
tron_js_sign
eth_sendRawTransaction
Also, how can I grab the f(x)Wallet selected account public key ? functionx_wc_accounts_v1 returns the algo and key bytes.
However, it is not specified how to grab the ethsecp256k1 and secp256k1 public key. And I need this in order to simulate a transaction to get approx. gas fee before requestion to sign the transaction.
Unfortunately we are not able to provide much detailed documentation. But our team has provided an example for you to take a look at.
The three method calls provided by fxWallet are based on the WalletConnect protocol. By understanding the connection method of WalletConnect, you’ll be able to interact with fxWallet through the three methods.
After connecting through WalletConnect, fxCore transactions can be sent through the methods provided by fxWallet, example (without WalletConnect part):
Still trying to work my auto-compounder dApp using f(x)wallet and WalletConnect.
However, some details are annoying me.
In order to process authz transactions (unavoidable for autocompounding), I cannot sign them using amino legacy, thus I need to use the functionx_wc_sign_direct_tx_v1 protocol.
However, it looks like there is a bug in f(x) wallet Android app. It looks like “WcSignModel” Java class is using the key type tendermint/PubKeySecp256k1 for case 4, whereas it seems to me it should be using ethermint/PubKeyEthSecp256k1.