Get the ownership, divisibility, duration, and flags for a given mosaic identifier.
// replace with mosaic id
const mosaicIdHex = '71415AC19C818709';
const mosaicId = new MosaicId(mosaicIdHex);
// replace with node endpoint
const nodeUrl = 'http://api-01.us-east-1.096x.symboldev.network:3000';
const repositoryFactory = new RepositoryFactoryHttp(nodeUrl);
const mosaicHttp = repositoryFactory.createMosaicRepository();
mosaicHttp
.getMosaic(mosaicId)
.subscribe((mosaicInfo) => console.log(mosaicInfo), (err) => console.error(err));
// replace with mosaic id
const mosaicIdHex = '71415AC19C818709';
const mosaicId = new symbol_sdk_1.MosaicId(mosaicIdHex);
// 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 mosaicHttp = repositoryFactory.createMosaicRepository();
mosaicHttp
.getMosaic(mosaicId)
.subscribe((mosaicInfo) => console.log(mosaicInfo), (err) => console.error(err));
try (final RepositoryFactory repositoryFactory = new RepositoryFactoryVertxImpl(
"http://api-01.us-east-1.096x.symboldev.network:3000")) {
// replace with mosaic id
final String mosaicIdHex = "71415AC19C818709";
final MosaicId mosaicId = new MosaicId(mosaicIdHex);
final MosaicRepository mosaicRepository = repositoryFactory
.createMosaicRepository();
final MosaicInfo mosaicInfo = mosaicRepository.getMosaic(mosaicId)
.toFuture()
.get();
final JsonHelper helper = new JsonHelperJackson2();
System.out.println(helper.prettyPrint(mosaicInfo));
}
symbol-cli mosaic info --mosaic-id 71415AC19C818709
Did you find what you were looking for? Give us your feedback.