1
    const { Api, JsonRpc } = require('eosjs');
    const fetch = require('node-fetch'); 
    const rpc = new JsonRpc('https://api.jungle.alohaeos.com:443', { fetch });

    let validAccounts =await rpc.history_get_key_accounts(pubkey)
    console.log(validAccounts)

I'm getting output as: { account_names: [] } But the account does exist for the public key.

Are there any api endpoints of jungle bloks to get the accountname from public key?

0

Well, you'll need to work with a node that has the history API plugin enabled, try using this: https://api-kylin.eoslaomao.com.

Note: The history API plugin is deprecated, so do take into consideration this API might stop working.

| improve this answer | |
0

'https://lightapi.eosgeneva.io/api/key/' this history API plugin for jungle testnet is working.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.