Skip to content

Instantly share code, notes, and snippets.

@daiki44
Created September 8, 2018 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daiki44/f75a494b4ce75c4a11bc733af8fd4c90 to your computer and use it in GitHub Desktop.
Save daiki44/f75a494b4ce75c4a11bc733af8fd4c90 to your computer and use it in GitHub Desktop.
【NEM】NEM-sdk を使って特定アドレスへ XEM を送金する ref: https://daiki-sekiguchi.com/2018/09/07/nem-sdk-transactions-send/
// XEM mosaicを付与する
// 1000000で1XEMとなります
const xemMozaic = nem.model.objects.create('mosaicAttachment')('nem', 'xem', sendAmount * 1000000);
transferTransaction.mosaics.push(xemMozaic);
// 送りたいXEM以外のmosaicを付与する
const yourMosaic = nem.model.objects.create('mosaicAttachment')(yourMosaicNamespace, yourMosaicName, 10000);
transferTransaction.mosaics.push(yourMosaic);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment