Skip to content

Instantly share code, notes, and snippets.

@dgarcia360
Created April 13, 2020 11:04
Show Gist options
  • Save dgarcia360/ce290070203832606d5c38d6c803729f to your computer and use it in GitHub Desktop.
Save dgarcia360/ce290070203832606d5c38d6c803729f to your computer and use it in GitHub Desktop.
[Bug] The same alias cannot be used for more than one asset.
import {MosaicId, NamespaceHttp} from "symbol-sdk";
const util = require('util');
const url = 'http://api-01.us-west-1.symboldev.network:3000';
const namespaceHttp = new NamespaceHttp(url);
const mosaicIds = [
new MosaicId('2DFD0AF0ED436D59'),
new MosaicId('2EED9EA233EC037F'),
new MosaicId('7D4542F3474D7D71')];
namespaceHttp
.getMosaicsNames(mosaicIds)
.subscribe(x => {
console.log(util.inspect(x, false, null, true))
});
/*
[[
MosaicNames {
mosaicId: MosaicId { id: Id { lower: 3980619097, higher: 771558128 } },
names: [
NamespaceName {
namespaceId: NamespaceId {
fullName: 'aa',
id: Id { lower: 279250019, higher: 3852319689 }
},
name: 'aa',
parentId: undefined
}
]
},
MosaicNames {
mosaicId: MosaicId { id: Id { lower: 871105407, higher: 787324578 } },
names: [
NamespaceName {
namespaceId: NamespaceId {
fullName: 'aa',
id: Id { lower: 279250019, higher: 3852319689 }
},
name: 'aa',
parentId: undefined
}
]
},
MosaicNames {
mosaicId: MosaicId { id: Id { lower: 1196260721, higher: 2101691123 } },
names: [
NamespaceName {
namespaceId: NamespaceId {
fullName: 'aa',
id: Id { lower: 279250019, higher: 3852319689 }
},
name: 'aa',
parentId: undefined
}
]
}
]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment