I have a problem implementing this with nodeJs 8.11
// Include the library
var nem = require("../../build/index.js").default;
// Create an NIS endpoint object
var endpoint = nem.model.objects.create("endpoint")(nem.model.nodes.defaultTestnet, nem.model.nodes.defaultPort);
// Create a common object holding key
var common = nem.model.objects.create("common")("", "Private key");
// Get a MosaicDefinitionCreationTransaction object
var tx = nem.model.objects.get("mosaicDefinitionTransaction");
// Define the mosaic
tx.mosaicName = "myMosaic";
tx.namespaceParent = {
"fqn": "nano.example"
};
tx.mosaicDescription = "My mosaic";
// Set properties (see https://nemproject.github.io/#mosaicProperties)
This file has been truncated. show original
when I’m going to implement the example with my private id, it gives me an error, do you know if this method to create collections from the backend works?