Getting the namespace information

Get the ownership and duration for a given namespace identifier.

Prerequisites

Let’s get into some code

Call getNamespace function, passing the namespace identifier you want to check as a parameter.

const namespaceHttp = new NamespaceHttp('http://localhost:3000');
const namespaceId = new NamespaceId('foo');

namespaceHttp
    .getNamespace(namespaceId)
    .subscribe(namespaceInfo => console.log(namespaceInfo), err => console.error(err));
const namespaceHttp = new NamespaceHttp('http://localhost:3000');
const namespaceId = new NamespaceId('foo');

namespaceHttp
    .getNamespace(namespaceId)
    .subscribe(namespaceInfo => console.log(namespaceInfo), err => console.error(err));
nem2-cli namespace info --name foo