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?

2 Answers 2

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.

3
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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