Stacks.js: getNameInfo method is undefined

Created on 24 Dec 2018  路  4Comments  路  Source: blockstack/stacks.js

I'm unable to find and use the getNameInfo method for some reason.

import blockstack from 'npm:blockstack';
let name = 'markmhendrickson.id';

blockstack.getNameInfo(name).then((info) => {
  console.log('info', info);
});

This results in the error Uncaught TypeError: _npmBlockstack.default.getNameInfo is not a function and when I console log the entire blockstack module (loaded with ember-browserify) for inspection, I don't see it in the list of properties alphabetically:

screen shot 2018-12-24 at 11 20 29

bug

All 4 comments

You need to use blockstack.config.network.getNameInfo See also
https://github.com/blockstack/blockstack.js/issues/555#issuecomment-441011884

Much thanks. I see the other issue is intended to update documentation related to this method, but does it make much sense that this method (and others) are under a config path? I would expect blockstack.network.getNameInfo if it's intended to be organized with other "network" methods. But "config" is confusing to me.

Ooh, yeah, we have a feature request for this:

https://github.com/blockstack/blockstack.js/issues/449

Closing this in favor of #449

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muneebm picture muneebm  路  5Comments

chris-asl picture chris-asl  路  8Comments

larrysalibra picture larrysalibra  路  8Comments

zone117x picture zone117x  路  6Comments

yknl picture yknl  路  7Comments