Get the ownership, divisibility, duration, and flags for a given mosaic identifier.
Complete creating a mosaic guide.
// replace with mosaic id
const mosaicIdHex = '71415AC19C818709';
const mosaicId = new MosaicId(mosaicIdHex);
// replace with node endpoint
const nodeUrl = 'NODE_URL';
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 = 'NODE_URL';
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(
"NODE_URL")) {
// 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