Hello
Here is my code
Please suggest what else to add -
Thank you
I’m not sure what library are you using but it should be possible to log entire entity before signing (I guess transaction object). Also, please provide node where are you sending.
Hello
After running the chain of NEM coin when the chain url is hit with the makeTX() method , I dnt get the full transaction object . I get -
Please help me how will I get the full transaction Object.
Thank you
As it was already told (Failure_wrong_network) you are sending wrong network version.
Hello
While running the chain I have used .nis library , are you asking about that one ? please tell .
Transaction entity I am sending through code is -
var transactionobject = {
‘isMultisig’: false,
‘recipient’: req.body.toAddress, // Dashes optional, all parsed later.
‘amount’: req.body.amount, // Amount of XEM to send.
‘message’: ‘Hello receiver!’, // Message to send.
‘due’: 60 ,// Not sure what this does but the default is probably fine.
‘version’: 1744830466,
“signer”: “my-publickey-is-here”
}
Please help and let me know if I am missing anything.
Thank you
Please show entire code because currently I don’s see how san object is defined. As I understand you are using this library -> https://www.npmjs.com/package/nem-api?
If you are using javascript I suggest use:
Hello
san is the variable which stores the ip and port of the server where Nem node chain runs.
Here is the image -
Thank you
Information from library you are using: https://github.com/nikhiljha/nem-api
So as I have written above, I suggest you to use nem-sdk.
Hello @CryptoBeliever when I install nem-sdk npm I get mainnet url in the console for node - defaultMainnet: ‘http://hugealice3.nem.ninja’ ,the page shows " This page isn’t working" always .
Please help me to get api methods of nemCoin in nodejs.
Because it’s not page but http API exposed by node. URL is correct and API works over 7890 port (for example http://hugealice3.nem.ninja:7890/chain/height).
API doc: https://nemproject.github.io/
nem-sdk examples: https://github.com/QuantumMechanics/NEM-sdk/tree/master/examples
Hello
I have tried by installing nem-sdk but it would be nice if you could show me an example of transfer with “https://nemproject.github.io/” link .
I have already shown you the transaction api which I made , please help and let me know where I have to use nem-sdk module.
Thank you
I’m not javascript developer.
Did you checked examples provided with nem-sdk https://github.com/QuantumMechanics/NEM-sdk/tree/master/examples ?
Hello
When I use nem-sdk for transfer for mainnet then I find in parameters to_address(receipient’s address) but I don’t find place to give sender’s address from where the amount will get deducted
Because you need use private key to sign transaction and not his address.
send function
Hello @CryptoBeliever
Thanks a lot for helping me .
I have one more issue - that what is the amount cut as a transaction fee in nem transactions. Does the fee charge depends on the money being transferred?
Thank you
Yes. Fee calculation functions can be found here
Hello @CryptoBeliever
Right now whatever transactions I am doing , 0.1 fee is being deducted from the sender’s account
Hello
var common = nem.model.objects.create(“common”)("", req.body.privateKey);
var endpoint = nem.model.objects.create(“endpoint”)(“http://00.00.00.00”, 7890);
var transferTransaction = nem.model.objects.create(“transferTransaction”)
(req.body.to_address, req.body.amount, “Hello”);
var transactionEntity = nem.model.transactions.prepare(“transferTransaction”)
(common, transferTransaction, nem.model.network.data.mainnet.id)
nem.model.transactions.send(common, transactionEntity, endpoint)
I have used nem-sdk , and the fee always cut is 0.1
It depends what you including to transaction. What message and what mosaic amounts.
If short (up to 16 signs) message like “Hello” then additional 0.05 XEM is added to fee.
Without message it would be 0.05XEM