Get the ownership and duration for a given namespace identifier.
// replace with namespace name
const namespaceId = new NamespaceId('foo');
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryFactory = new RepositoryFactoryHttp(nodeUrl);
const namespaceHttp = repositoryFactory.createNamespaceRepository();
namespaceHttp
.getNamespace(namespaceId)
.subscribe((namespaceInfo) => console.log(namespaceInfo), (err) => console.error(err));
// replace with namespace name
const namespaceId = new symbol_sdk_1.NamespaceId('foo');
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryFactory = new symbol_sdk_1.RepositoryFactoryHttp(nodeUrl);
const namespaceHttp = repositoryFactory.createNamespaceRepository();
namespaceHttp
.getNamespace(namespaceId)
.subscribe((namespaceInfo) => console.log(namespaceInfo), (err) => console.error(err));
try (final RepositoryFactory repositoryFactory = new RepositoryFactoryVertxImpl(
"http://api-01.us-east-1.096x.symboldev.network:3000")) {
// replace with namespace name
final NamespaceId namespaceId = NamespaceId.createFromName("foo");
final NamespaceRepository namespaceRepository = repositoryFactory
.createNamespaceRepository();
final NamespaceInfo namespaceInfo = namespaceRepository.getNamespace(namespaceId)
.toFuture()
.get();
final JsonHelper helper = new JsonHelperJackson2();
System.out.println(helper.prettyPrint(namespaceInfo));
}
}
symbol-cli namespace info --namespace-name foo
Did you find what you were looking for? Give us your feedback.