Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Welcome to NEM Nano Snippets
This repository contains several snippets that are common while developing apps for NEM's Nanowallet.
Feel free to add or improve any.
Check if user has proper access
Check if address owns a mosaic
ownsMosaic(address, namespace, mosaic)
Get all transactions from an address that have a message that contains a string
getTransactionMessagesWithString(address, str, start)
Get last message from an addresses transactions that contains a string
getLastMessagesWithString(address, str, start)
Check if an account can be owned (MultiSig of any combination N-M, N<=M, M<32)
Create a HD account from a seed string. createBrainWallet(seed) This is very useful to create Pointer Accounts and Indexes that receive transaction messages to store information on the blockchain.
Send a transaction that adds every account in ownerAccounts as a cosignatory of subjectAccount
Send a minimal transaction that contains a message to a receiver (for now, max. 160 chars)
sendMessage(receiver, message, common)
Send a transaction that contains a mosaic. Extra XEM and/or a message can be added as well on the same transaction.
sendMosaic(recipient, namespaceId, mosaics, amount, common, options)
Basic send function that is used by all the above. This function broadcasts entity to the network from the account in common. This is not a standalone function.
This function verifies the account contained on the transferData object and fills it with it's missing pieces. This is not a standalone function but used by some of the above.