dfuse-eosio
dfuse-eosio copied to clipboard
Accessing local networks through existing tools
I'm trying to utilize Anchor Wallet by Greymass and running into issues where it won't recognize accounts on my local dfuse chain. See this conversation I had with Aaron briefly. @maoueh noted that he also ran into issues with Anchor where it was emplacing the PUB_K1
prefix.
Josh Kauffman | dfuse.io, [May 14, 2020 at 4:27:36 PM]:
Hey guys.
Trying to get anchor to function with a local network
I'm feeding it the chainID, localhost, checking the testnet checkbox.
Going to import a private key, and it can't find the account (have tried with multiple keys that exist on the chain)
One of the other guys on my team are doing the same steps as I am on their machine, and it's finding the account. Have triple checked the steps with him, and we've done all the same steps.
This is a dfuseeos chain if that makes a diffference (both mine and his were)
i think i see what the issue is stemming from @jestagram .
I am passing the priv key associated to the standard EOS6MR... dev key
But in the payload being sent by Anchor, it's showing: public_key: "PUB_K1_6BtgCcdChWGARLHHfBquwMx2pwUhrnBeaaB7QPuoBGFHQYYL2L"
I think I see where the problem might be, that flag is only getting set if a auth_invalid_token_error ends up being returned, in which it retries with a API key or prompts for the key. If you had the key, it's probably not setting that flag appropriately.
We'll have to better somehow detect when it's a dfuse endpoint and set the flags in a different way.
You have any thoughts on additional ways to detect if an endpoint is a dfuse endpoint?
Further, I was able to get things working well with Scatter, and with bloks.io. We should explore how to improve the connection to these and other tools, and I'll add some small docs to give devs some easy tools to use so they aren't stuck with just eosc/cleos when interacting. Could help with devs who want to give demos to their clients.
EOSxxxxxx and PUB_K1_xxxxxx is just different encoding for the same key, AFAIK.
Yes it's the same thing. But I think our API (our /v1/history/get_key_accounts
) currently does not accept them interchangeably
Jesta from Anchor told us that they choose to normalized EOS
prefix to PUB_K1
because of some incompatibilities, because some chain decided on changing the prefix.
I think that is a good decision. Everyone should switch to PUB_K1...