1

I want to get an object and its variables of a NXT asset. What is the function to retrieve an object of an nxt asset?

1

You can get most of the nxt objects using NRS.sendRequest(""

The following code gets the asset object of whats in question.

NRS.sendRequest("getAsset", {"asset": asset}, function(response) { //do stuff with response}, false)

NRS.sendRequest("getAsset", {   
  "asset": <*Your Asset ID here*>
}, function(response) {         
  if (response && response.asset) {
    console.log(response);        
  }, false                          
});                             

You would get the following response from chrome's console log like this:

http://prntscr.com/7zm5fh

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.