NEM Primer and NCC API Documentation

Background


  • Built 100% from scratch (not a fork of any existing project)
  • Built with test-driven development
  • Uses innovative Proof-of-Importance algorithm: first reputation based blockchain algorithm
  • Improves different features of POW and POS coins, being more efficient and environmentally friendly
  • Nodes need not be expensive machines and run independent of the wallet
  • One minute average block times
  • First crypto with delegated harvesting
  • First with localized spam protection
  • First with Eigentrust++ peer reputation management for Nodes
  • First editable m-of-n multisig with blockchain based alerts
  • Offers encrypted, unencrypted and hex messaging
  • Small memory footprint, easy to install, and portable client and server
  • Zero currency inflation (fixed supply, all 9 billion coins released at launch)
  • Has mobile wallet for both iOS and Android (coming soon)

  • The NEM Open Source development Github can be found here.

    Utility of the NEM Platform


    NEM is a platform solution. NEM can be used for:

    • Time stamping of events
    • Messaging, encrypted or not
    • Unique to NEM only, wallet agnostic, multi-signatory on-chain signing. Use case extension example – A specially written small footprint software in a thumb drive that can be used to sign transactions – PnP and does not require any booting or chain synchronisation. For starters, visit XEMsign.
    • Sign-on for “password-less” applications, using NEM key ID (NEMKID) to authenticate a random challenge statement. Highly secure method of authentication. Can be used with a password for 2-FA.
    • Mosaic Transaction (A Mosaic is a special kind of asset unique in NEM. An asset is also known as a colored coin, token, point, derivative, title, or share, and is application context based. A Mosaic however, is not a colored coin, as a Mosaic is created as a separate token rather than “coloring” a coin):
      • Assets are mutable, mutable with limit, or fixed in quantity
      • Each Mosaic type is uniquely named using namespace methodology
      • Assets can be made to expire after a defined time frame (using block times which are typically accurate, from seconds to tens of seconds)
      • An asset can be made to bag more assets – a derivative of a derivative of a derivative – endless permutations.
      • Assets can be made to peg to an asset, example price of a share.
      • Asset can be backed by a real world asset, e.g., gold.
      • Assets can be issued and transacted between issuer and user only and not between users, e.g., title to a land, or user identification.

    • Future Business Rules (also known as smart contracts) implementation shall allow for:

      • Decentralised Applications
      • Centralised Applications
      • Escrow solutions that use external events or blockchain events, enabling betting or derivatives to be implemented

    Understanding the Architecture




    The NEM solution has two main components. One is the NEM Infrastructure server (NIS). The other is the NEM Core Client (NCC - also synonymously known as NEM Community Client). Both these two are run as separate processes. They can be run from the same machine or in separate machines as shown in the above diagrams.

    This architecture called a tiered architecture, is similar to the browser/webserver (or client/server) relationship.

    The architecture gives rise to a very power solution architecture. With the NIS being able to run remotely on the “cloud”, one does not need to synchronise one’s local NCC at all, like what many cryptocoin technology is doing. The NIS is synchronised in the cloud and it does not take a lot of computing power. Bitcoin does that by using the Simplified Payment Verification (SPV) client server architecture. However, their version is very much an unproven patch on, and a workaround.

    NCC


    The NCC packs many powerful features. On its own, the NCC is a thin client wallet while at the same time, is a webserver. It is a fast boot, browser based client that is independent of the NIS blockchain server. It gets connected to a server seamlessly (default need no configuration but this can be changed to suit) and one can transact immediately without having to wait. Separately, the NCC is also a webserver and allows a person who can program in any language to communicate with the NEM ecosystem via the JSON RESTful service that comes with the NCC. Inside the NCC, sits the NEM Core solution (reference document here) which can also be used to talk directly with the NIS. However, this is more complicated and needs the user to understand how to format messages and transactions to be sent out. With the NCC and the JSON RESTful service this is made simpler. Any programmer who is well versed in programming can do a lot with the NCC. These include:

    1. Applications requiring configuring and signing multi-signature approvals
    2. Initiating transactions
    3. Sending messages
    4. Sending Mosaics
    5. Initiate/start/stop harvesting (mining)
    6. Create new accounts
    7. Manage accounts

    The NCC, via the NEM core, is basically a window and gateway to NEM’s blockchain technology. The NCC, thus, allows simple to sophisticated applications to be programmed without ever needing to know how the NEM blockchain works, and in whatever language the programmer chooses that is JSON RESTful compliant.

    Centralised smart contracts can therefore be easily achievable, without much payload to the blockchain. Although it can be contentious, smart contracts are better run and managed by central entities. Information on the NCC can be found here.

    NIS


    While the NCC acts as both a gateway and wallet to the NEM ecosystem, the NIS is basically a node in the peer to peer network. It verifies transactions, put them onto the blockchain (i.e., when it successfully harvests (mining in other crypto), maintains a database, synchronises the database with the rest of the network, manages Sybil attacks, and maintains its trustworthiness through the use of the Eigentrust ++ algorithm.

    In addition to the above functions, the NIS is a window into the blockchain of NEM. It has its own set of JSON RESTful services that allows any application to query the state of the blockchain activities. These include, among others, account balance, Proof of Importance of an account, block height, transaction records, etc.

    With NIS working hand in hand with the NCC, together, they form the core and solution platform of the NEM ecosystem.

    The NIS is trustless, meaning, the NCC does not need to trust this NIS to be secured. Hence an NCC can simply connect to any NIS that is running. A NIS is a full node and the NCC can delegate any NIS to harvest for it without worrying if the NIS is malicious, and will steal its coins.

    The solution is very simple, straightforward and easy to work on. It is holistic and the design picks itself up from the many mistakes made in previous releases of many cryptocoin solutions in the market. It is in fact full blown realisation of the blockchain technology.

    One of the more important feature of the NIS is the blockchain timing. The block time is designed to work at 60s. It is fairly consistent and has very little variances. Hence, transactions are predictable and reliable. At 2 transactions per second, the platform is rather fast compared to many of its peers, although it is hoped that one day it can scale to hundreds, if not thousands of transactions per second. The very basis of its design does allow it to be open and therefore making it possible for integration into higher performing nodes for higher transaction volumes. More information about the JSON RESTful APIs can be found here.

    Use Case Examples


    Time Stamping


    Time stamping is a simple message system that allows someone to send something into the blockchain and time stamp a transaction. For example, one can send a time stamped event to a specific account with a message to say something like:

    “Event Reference number: 4747959585”

    Subsequently, in the administrative portion of the work between parties in the real world, a document may have a reference number that references the above message. To make it a more legible service, one can write a program to read the message referenced and the time stamp.

    Messaging


    Transactions whether with any enclosed tokens or not, can include a message. The message can carry a maximum of 160 characters and can be optionally encrypted (reduced by a payload of 48 characters i.e., 112 characters maximum). It is especially useful for sending messages to be included in a transaction.

    Multisig


    One of the more important features of NEM is its unique multisig capability. It is unique because, unlike most other solutions out there, the multisig is not stored locally in a central wallet waiting for all to sign before it is broadcast. Instead the multisig is signed and posted onto the NIS. From the NIS, it is then propagated to all the other NIS, where, it is held for a defined period of up to 24 hours to be signed by the rest of the signatories.

    This gives rise to a distributed multisig solution that lives on the blockchain. When all required signatories have been signed, it is automatically broadcast to the blockchain as a valid transaction.

    Based on the above solution, multisig becomes an embedded feature more so than a third party solution that is commonly deployed with most blockchain technology. It allows a programmer that wishes to automate multisig function to specifically program and call an API through the NCC to sign or initiate a transaction. This makes the multisig solution a very simple implementation.

    There are more features that can be done with multisig. These are:

    • M of N feature, a minimum of M signatures to sign from a pool of N (maximum 32) authorised signatories
    • Adding and deleting signatories
    • Time to live transactions, i.e., given up to 24 hours for all signatories to sign a transaction

    Multisig is especially useful for use cases like automated escrow or event activated services. Other types of usage may include centralised smart contract solutions. The multisig feature itself can be used to activate a series of other contracts or events.

    NEM Key ID


    The public/private key solution of NEM is an easy to implement solution. It is based on python bindings to a C implementation of the Ed25519 public-key signature system solution.

    With this library, one can quickly (2ms) create signing+verifying keypairs, derive a verifying key from a signing key, sign messages, and verify the signatures. The keys and signatures are very short, making them easy to handle and incorporate into other protocols. All known attacks take at least 2^128 operations, providing the same security level as AES-128, NIST P-256, and RSA-3072.

    More information on the Ed25519 public-key signature system solution can be found on our github.

    By making use of NEMKID, logging on to a service does not require the server of this service to store passwords in the database. Alternatively, it can use the NEMKID to further verify the person if the system has a password requirement. NEMKID essentially produces a challenge alphanumeric word for the user to sign. If the signature is correct, then the user is verified as the rightful user.

    NEMKID can be used for two factor authentication and can be developed separately and independent of NEM.

    Auto Token Distribution


    Applications that require automatic token distribution using multisig can easily be incorporated without much work and a few API calls. This could include in-game wallet token awards or a simple faucet solution such as the live one used by NEM here.

    Mosaics


    Mosaic is a very important backbone of the NEM platform. Mosaic adds depth and breath into NEM. Given this Mosaic, we are now able to do a lot more, and which actually opens up a plethora of things that otherwise cannot be done in most blockchain platforms. Coupled with NEM’s multisig, it is in a class of its own. It will officially put us as a true platform, and no more a mere cryptocoin.

    Basic things you need to know are Namespace and Mosaic. The easiest way to appreciate it is the folder and file analogy in our PC. Imagine that a folder has to be unique in our root directory. Namespace addresses this unique feature. Each namespace is unique. If one creates a namespace, that namespace will appear unique in the NEM ecosystem. For example, if one were to create a namespace called, Foo, that namespace will be unique only for the account that created it. Namespace and domain name are the same in this document and shall be used interchangeably.

    Next up, is the Mosaic itself. Mosaic is like a file in the PC directory system, and like a file in a directory, a Mosaic can have the same name but in different namespaces/sub-domains. In NEM, Namespaces can have up to 3 levels.

    Examples:

    Namespace: Jetstar
    Subdomain Level 1:moon
    Subdomain Level 2:mars

    Mosaics:
    Rock
    Stone
    Gem

    Accordingly, the fully qualified names of the above Mosaics are:

  • “Jetstar*rock, Jetstar*stone, Jetstar*gem” (First level Mosaics)
  • “Jetstar.moon*rock, Jetstar.moon*stone, Jetstar.moon*gem” (Second level Mosaics)
  • “Jetstar.moon.mars* rock, Jetstar.moon.mars* stone, Jetstar.moon.mars*gem” (Third level Mosaics)

    Note that the root Namespace is the leader, i.e., it works in the opposite to the normal domain naming convention.

    Each of the above mosaics is made unique by the namespace’s fully qualified name. Also, the Mosaic is preceded by an “*” to differentiate it from the namespace.

    In summary, everything under the top level domain belongs to the account that created it. In the above examples, the top level domain name is Jetstar.
  • Significance of Namespace and Mosaic


    Namespace gives rise to a unique naming convention. Mosaic gives rise to the creation of assets. Some call it a colored coin while others may call it a token. We call it Mosaic, because we are not merely coloring a coin per se but we are creating a new coin. It will also finally evolve into more than just a mere “colored coin”. It is an asset class that will take on many types of properties when it is full blown (hence we call it a Mosaic as it evolves to form the “big picture” when you start tiling them) .

    Our initial rollout for Mosaic has the following properties:
    • description
      • free-text description of the Mosaic up to some size limit, changeable by the owner
    • divisibility
      • adding this makes a quantity divisible, up to 4 decimal precision. A divisibility of 2 means 2 decimal places
    • information
      • arbitrary byte array that can be in the property, with a size limit; this is the same as “messages” in NEM already, with no changes
    • mutable quantity
      • This property allows the quantity to be mutable or not
    • name (required)
      • name of the mosaic, up to some size limit; must be unique under the domain name
    • domain name or namespace (required)
      • globally unique fully qualified domain name that is registered and owned by the Mosaic creator; this is just like a TLD in Internet domain name registry
    • quantity
      • The amount of mosaic in circulation. If immutable, it is fixed, otherwise it is dynamic, i.e., more can be created or destroyed
    • transferability
      • If no, it means it can only be transferred between user and creator. Otherwise, it is freely transferable

    Mosaic Use Cases


    Every Mosaic is unique. The creation of namespace gives the creator an infinite number of unique Mosaics that can be created. So what is so good about each Mosaic? Each Mosaic allows the creation of a token for anything imaginable. Some examples are:

    • Keeping track of in-game Points, allowing them to be traded or sold easily. A wallet can easily be built into the Game. Even as NIS can be embedded into the Game software so that the user can actually harvest while playing the game.
    • Loyalty points, such as air miles and purchases online/offline. Again, the wallet can be customised and built into the solution of the program.
    • Issue of securities – each Mosaic for example, is tagged to 1 share. This is especially good for crowdfunding platforms and issuance of shares using Mosaic.
    • Issue of Mosaic backed by assets (derivatives), including Bitcoins – bitcoins are exchanged for specially defined Mosaics so that transaction of Bitcoins can be much faster, fungible, free from tedious node synchronisation – Coinbase model – with wallet now belonging to the end user and not with the central depository.
    • Issuance of titles or licenses – fishing license, driver’s license, land title, etc.
    • Betting– issued as either dollar denominated chips (i.e. an asset backed security) for online betting.
    • Vouchers and Coupons – used as claimable coupons and vouchers for material goods and services, or food.
    • Proof of identity – membership, sign on proof, and access.
    • Wholesale altcoin/token porting – porting the entire altcoin or token created from a pre-blockchain project.
    • Voting – using Mosaic as a proof of voting eligibility

    Extensibility of Mosaics


    The NEM platform as aforementioned, allows a sophisticated, turing complete or not software program developed in any language, to interact with it via JSON RESTful APIs.

    There are a couple of methods to do so. Either it uses the NCC/NIS APIs or integrate directly with the NEM Core solution to interact with the blockchain. For beginners, it is probably better and faster to use the NCC as a webserver, and separately, the NIS, to interact with the blockchain.

    The ability to integrate with the NEM platform easily with the above methods, open up a whole new dimension on the use of blockchain. It allows any project to be developed easily in a short period of time. Some examples are:

  • Coinbase/Bitpay type of solution
  • A centralized API service solution
  • Trade Settlement and Pre-borrowed Assured Token solution
  • 2 Factor Authentication Solution

  • Coinbase/Bitpay type of solution


    Coinbase core security is a very expensive solution. NEM has it on the blockchain. This takes away the high costs involved in developing and maintaining the security for a set up like Coinbase. Value store is now embedded in the wallet, away from the operator. In other words, the Coinbase solution reduces itself to just a merchant and exchange solution, more so than a host for keeping wallets for others if we use NEM. Coinbase was developed as a business out of the shortcoming of Bitcoin in that it is hard to use a solution like Bitcoin for everyday use. Coinbase made it easy. NEM has bridged that and it is not hard and time consuming to fire up and use NEM.

    One of the core offerings of Coinbase is to keep a user’s wallet in Coinbase just so that the user has a recourse, i.e., passing the responsibility to Coinbase to manage their wallets as some of these users are afraid to lose their wallets due to hardware failure or theft. Additionally, with the wallet kept in a central location, it also allows the user to email or send crypto to friends easily.

    NEM offers an on-chain solution to the above problem by way of letting an operator like Coinbase to host the wallet with the operator and having a multisig solution entrusted to the operator (like an escrow) and signed off by the user. This is part of the NEM platform offering. This ease of implementation makes a project like Coinbase seems such a simple offering, and easy, too.

    A centralized API service solution


    There are a number of companies that have developed a whole set of APIs just so that it allows any developer to develop any solution on the Blockchain. Every company that offers this service will need to develop their own set of APIs and offer the same with little differentiation. The amount of money spent on doing this could be substantial.

    Centralized APIs take away the cryptic nature of the Bitcoin blockchain and put in a whole set of SDK and APIs to make it simple for people to integrate a blockchain into their solution. But, NEM takes away the need for anyone to build any APIs!!

    Unlike centralize APIs, NEM is open for all to use and comes with its own blockchain solution. So, essentially NEM is an open source version of these centralized APIs, and with the blockchain thrown in. NEM makes an improved version of a blockchain easy to use in the first instance. It basically make scentralized APIs initiatives redundant. Most importantly, NEM’s decentralized API makes it fail proof, i.e., no single point of failure and takes away the “middleware” of the centralized APIs. It gives them direct access to the blockchain.

    So, yes, you can start your blockchain project now!

    Trade Settlement and Pre-borrowed Assured Token solution


    A recent project was launched to do trade settlement and pre-borrowed assured token solution. It basically is a project for settlement and managing pre-borrowed assured tokens using blockchain. NEM is an enabler that can easily be adapted with its full set of APIs.

    2 Factor Authentication Solution


    There exists a few projects that use Private and Public keys for authentication. NEMID is a ready library for that and can be easily adapted to make it as a business.

    Conclusion


    The above is not an exhaustive list of projects that NEM can do. The underlying message is that NEM is a platform that can be easily adapted into any project that makes use of a blockchain. It has all the APIs and tools needed for anyone who is gamed enough to use blockchain as the backbone, including NEM's inbuilt multisig solutions. NEM’s APIs are true blockchain APIs that are universal for all to use without restriction, and have no single point of faillure.

    The following is a detailed outline of our NCC APIs that can be used for anyone who wishes to work on the NEM platform. These APIs are always being updated and more APIs shall be added on later as we introduce more features, e.g., the Mosaic.

    NCC API Overview


    The web-context is defined as

    /ncc/api
    For instance the full URI would be
    /ncc/api/client/info

    Amount values are all in the smallest possible XEM fraction. The smallest XEM fraction is 6 decimal places. In other words, 1,000,000 means 1.000000 XEM.

    Rest calls must have the content type set:

    Content-Type: application/json

    You can use API calls easily in PHP with php2nem or in nodeJS with nodejs2nem. You can also use any language that is Json RESTful compliant.

    Retrieving NCC information


    Get status of NCC server

    /status

    Currently it is only 'running' (3)

    • Request Method: GET
    • Request: -
    • Response: NemRequestResult
    • Dependent from NIS: No

    NemRequestResult:

    {
        "code": 3,            # 0 - UNKNOWN
                              # 1 - STOPPED
                              # 2 - STARTING
                              # 3 - RUNNING
                              # 4 - BOOTING
                              # 5 - BOOTED
                              # 6 - SYNCHRONIZED
        "type": 4,            # A NemRequestResult can have several meanings.
                              # The type indicates the meaning.
                              # type 4 - TYPE_STATUS, the code and the message fields
                              # have to be interpreted as status.
        "message": "status"
    }

    Get information about the NCC server

    /info/ncc
    • Request Method: GET
    • Request: -
    • Response: NisInfoViewModel
    • Dependent from NIS: No

    NisInfoViewModel:

    {
        "metaData": {
            "currentTime": 1179142,               # time in milli seconds
            "application": "NEM",                 # name of application
            "startTime": 1177027,                 # time in milli seconds, when application was started
            "version": "0.2.0-DEVELOPER BUILD",   # version of application
            "signer": null                        # name of the signer of the code
        },
        "remoteServer": null,                     # not used
        "language": "DE"                          # language for UI
    }

    Get information about the NIS server

    /info/nis
    • Request Method: GET
    • Request: -
    • Response: NisInfoViewModel
    • Dependent from NIS: Yes

    NisInfoViewModel:

    {
        "metaData": {
            "currentTime": 1179142,               # time in milli seconds
            "application": "NEM",                 # name of application
            "startTime": 1177027,                 # time in milli seconds, when application was started
            "version": "0.2.0-DEVELOPER BUILD",   # version of application
            "signer": null                        # name of the signer of the code
        },
        "remoteServer": null,                     # not used
        "language": "DE"                          # language for UI
    }

    Check availability of NIS server

    /info/nis/check
    • Request Method: GET
    • Request: -
    • Response:
    • ** 0 - NIS server is not running ** 1 - NIS server is running (but may not be booted)
    • Dependent from NIS: yes

    Configuration


    Get the current configuration

    /configuration/get
    • Request Method: GET
    • Request: -
    • Response: ConfigurationViewModel
    • Dependent from NIS: No

    ConfigurationViewModel:

    {
        "remoteServer": {
            "protocol":"http",          # "http" or "https"
            "host":"79.220.34.156",         # ip address or "localhost" to use a local NIS
            "port":7890             # port to use
        },
        "nisBootInfo": {
            "nodeName": "Alice",            # (arbitrary) name of the node
            "bootNis": 0,               # 1=auto-boot, 0=do not auto-boot
            "account": "TALICEMYYJFPJ4FWCMMNFCCOTFV635SBL2QWP73K"   # account to tie the node to
                                        # or "" to use the wallet's primary account
        },
        "language": "DE"                # 2 letter abbreviation of the language to use
    }

    Updates the current configuration with the given values

    /configuration/update
    • Request Method: POST
    • Request: ConfigurationViewModel
    • Response: -
    • Dependent from NIS: No

    ConfigurationViewModel:

    {
        "remoteServer": {
            "protocol":"http",          # "http" or "https"
            "host":"79.220.34.156",         # ip address or "localhost" to use a local NIS
            "port":7890             # port to use
        },
        "nisBootInfo": {
            "nodeName": "Alice",            # (arbitrary) name of the node
            "bootNis": 0,               # 1=auto-boot, 0=do not auto-boot
            "account": "TALICEMYYJFPJ4FWCMMNFCCOTFV635SBL2QWP73K"   # account to tie the node to
                                        # or "" to use the wallet's primary account
        },
        "language": "DE"                # 2 letter abbreviation of the language to use
    }

    Address Book


    Creates a new, empty address book

    The address book is stored encrypted in the configured address book directory. The name of the address book file is the encoded (URL encoded) version of the address book name. The provided password is used to encrypt the address book.

    /addressbook/create
    • Request Method: POST
    • Request: AddressBookNamePasswordPair
    • Response: AddressBookViewModel
    • Dependent from NIS: No

    AddressBookNamePasswordPair:

    {
        "addressBook": "myAddressBook",
        "password": "mySecretPassword"
    }

    AddressBookViewModel:

    {
        "addressBook": "myAddressBook",
        "accountLabels" : [{
            "address": "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
            "publicLabel": "Alice",
            "privateLabel": "sister"
        },
        {
            "address": "TBOBBSXX7BESJXDWGLP5Z7FM5HSTKUH5WIMPW562",
            "publicLabel": "Bob",
            "privateLabel": "brother"
        }]
    }

    Open an address book

    The address book is defined by the address book name. The address book has to be located in the address book storage location. The password must match the password of the given address book.

    /addressbook/open
    • Request Method: POST
    • Request: AddressBookNamePasswordPair
    • Response: AddressBookViewModel
    • Dependent from NIS: No

    AddressBookNamePasswordPair:

    {
        "addressBook": "myAddressBook",
        "password": "mySecretPassword"
    }

    AddressBookViewModel:

    {
        "addressBook": "myAddressBook",
        "accountLabels" : [{
            "address": "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
            "publicLabel": "Alice",
            "privateLabel": "sister"
        },
        {
            "address": "TBOBBSXX7BESJXDWGLP5Z7FM5HSTKUH5WIMPW562",
            "publicLabel": "Bob",
            "privateLabel": "brother"
        }]
    }

    Returns information about an address book that is already open

    /addressbook/info
    • Request Method: POST
    • Request: AddressBookNamePasswordPair
    • Response: AddressBookViewModel
    • Dependent from NIS: No

    AddressBookNamePasswordPair:

    {
        "addressBook": "myAddressBook",
        "password": "mySecretPassword"
    }

    AddressBookViewModel:

    {
        "addressBook": "myAddressBook",
        "accountLabels" : [{
            "address": "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
            "publicLabel": "Alice",
            "privateLabel": "sister"
        },
        {
            "address": "TBOBBSXX7BESJXDWGLP5Z7FM5HSTKUH5WIMPW562",
            "publicLabel": "Bob",
            "privateLabel": "brother"
        }]
    }

    Closes an address book

    Closes an address book by removing it from the list of opened address books

    /addressbook/close
    • Request Method: POST
    • Request: AddressBookName
    • Response: -
    • Dependent from NIS: No

    AddressBookName:

    {
        "addressBook": "myAddressBook"
    }

    Changes the password of an address book

    /addressbook/password/change
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: -
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    Changes the name of an address book

    /addressbook/name/change
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: -
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    Removes an existing account label from an address book

    /addressbook/accountlabel/remove
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: AddressBookViewModel
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    AddressBookViewModel:

    {
        "addressBook": "myAddressBook",
        "accountLabels" : [{
            "address": "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
            "publicLabel": "Alice",
            "privateLabel": "sister"
        },
        {
            "address": "TBOBBSXX7BESJXDWGLP5Z7FM5HSTKUH5WIMPW562",
            "publicLabel": "Bob",
            "privateLabel": "brother"
        }]
    }

    Adds an account label to an address book

    /addressbook/accountlabel/add
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: AccountLabel
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    AccountLabel:

    {
        "address" : "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
        "publicLabel": "Alice",
        "privateLabel": "sister"
    }

    Changes an existing account label in an address book

    /addressbook/accountlabel/change
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: AccountLabel
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    AccountLabel:

    {
        "address" : "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
        "publicLabel": "Alice",
        "privateLabel": "sister"
    }

    Gets an existing account label from an address book

    The address parameter in the AddressBookNamePasswordBag must be supplied

    /addressbook/accountlabel/find
    • Request Method: POST
    • Request: AddressBookNamePasswordBag
    • Response: AccountLabel
    • Dependent from NIS: No

    AddressBookNamePasswordBag:

    {
        "addressBook": "myAddresses",
        "password": "mySecretPassword",
        "newName": "newNameForAddressBook",                 # optional, required for address book name change
        "newPassword": "newAndVerySecretPassword",              # optional, required for password change
        "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",  # optional, required for account label related requests
        "publicLabel": "Alice",                             # optional, required for account label related requests
        "privateLabel": "sister"                            # optional, required for account label related requests
     }
    

    AccountLabel:

    {
        "address" : "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS",
        "publicLabel": "Alice",
        "privateLabel": "sister"
    }

    Wallet


    Gets all wallets that are located at the configured storage location for wallets

    /wallet/list
    • Request Method: GET
    • Request: -
    • Response: ListOfWalletDescriptorViewModel
    • Dependent from NIS: No

    ListOfWalletDescriptorViewModel:

    {
        "wallets": [{
            "wallet": "Test",
            "location": "C:\\Users\\Thies1965\\git\\NemCommunityClient\\nem-client-api\\Test.wlt"
        },
        {
            "wallet": "Thies1965",
            "location": "C:\\Users\\Thies1965\\git\\NemCommunityClient\\nem-client-api\\Thies1965.wlt"
        }]
    }

    Creates a new wallet with one account in it

    The wallet is stored encrypted in the configured wallet directory. The name of the wallet file is the encoded (URL encoded) version of the wallet name. The provided password is used to encrypt the wallet.

    /wallet/create
    • Request Method: POST
    • Request: WalletNamePasswordPair
    • Response: WalletViewModel
    • Dependent from NIS: No

    WalletNamePasswordPair:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet, can contain ÄÖÜäöüß"
    }

    WalletViewModel:

    {
        "otherAccounts": [],
        "lastRefresh": 1408796675000,
        "name": "Test",
        "primaryAccount": {
            "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "balance": 0,
            "importance": 0.0,
            "label": null,
            "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
            "harvestedBlocks": 0,
            "status": "LOCKED",
            "remoteStatus": "INACTIVE"
        }
    }

    Open a wallet

    The wallet is defined by the wallet name. The wallet has to be located in the wallet storage location. The password must match the password of the given wallet. For opening a wallet at a different location the function importWallet has to be used.

    /wallet/open
    • Request Method: POST
    • Request: WalletNamePasswordPair
    • Response: WalletViewModel
    • Dependent from NIS: No

    WalletNamePasswordPair:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet, can contain ÄÖÜäöüß"
    }

    WalletViewModel:

    {
        "otherAccounts": [],
        "lastRefresh": 1408796675000,
        "name": "Test",
        "primaryAccount": {
            "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "balance": 0,
            "importance": 0.0,
            "label": null,
            "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
            "harvestedBlocks": 0,
            "status": "LOCKED",
            "remoteStatus": "INACTIVE"
        }
    }

    Returns information about a wallet that is already open

    /wallet/info
    • Request Method: POST
    • Request: WalletName
    • Response: WalletViewModel
    • Dependent from NIS: No

    WalletName:

    {
        "wallet": "PrivateWallet"
    }

    WalletViewModel:

    {
        "otherAccounts": [],
        "lastRefresh": 1408796675000,
        "name": "Test",
        "primaryAccount": {
            "address": "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "balance": 0,
            "importance": 0.0,
            "label": null,
            "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
            "harvestedBlocks": 0,
            "status": "LOCKED",
            "remoteStatus": "INACTIVE"
        }
    }

    Closes a wallet by removing it from the list of opened wallets

    /wallet/close
    • Request Method: POST
    • Request: WalletName
    • Response: -
    • Dependent from NIS: No

    WalletName:

    {
        "wallet": "PrivateWallet"
    }

    Changes the password of a wallet

    /wallet/password/change
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: -
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "newPassword": "NEW very secret Password",   # optional, required for password change
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389",  # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"    # optional, required for remove account, label change
    }
    

    Changes the name of a wallet

    /wallet/name/change
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: -
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "newName": "P-Wallet"         ,   # optional, required for wallet name change
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389", # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"  # optional, required for remove account, label change
    }
    

    Add a new account to the wallet

    /wallet/account/new
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: AccountViewModel
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389",  # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"  # optional, required for remove account, label change
    }
    

    AccountViewModel:

    {
        "address": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "balance": 0,
        "importance": 0.0,
        "label": "private Label",
        "publicKey": null,
        "harvestedBlocks": 0,
        "status": "LOCKED"
    }
    

    Set an existing account to be the primary account

    /wallet/account/primary
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: AccountViewModel
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389",  # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"  # optional, required for remove account, label change
    }
    

    AccountViewModel:

    {
        "address": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "balance": 0,
        "importance": 0.0,
        "label": "private Label",
        "publicKey": null,
        "harvestedBlocks": 0,
        "status": "LOCKED"
    }
    

    Removes an existing account from a wallet.

    /wallet/account/remove
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: AccountViewModel
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389",  # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"  # optional, required for remove account, label change
    }
    

    AccountViewModel:

    {
        "address": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "balance": 0,
        "importance": 0.0,
        "label": "private Label",
        "publicKey": null,
        "harvestedBlocks": 0,
        "status": "LOCKED"
    }
    

    Updates the label of an existing account

    /wallet/account/label
    • Request Method: POST
    • Request: WalletNamePasswordBag
    • Response: AccountViewModel
    • Dependent from NIS: No

    WalletNamePasswordBag:

    {
        "wallet": "PrivateWallet",
        "password": "Very Secret Password To The Wallet",
        "accountKey": "23ec43284fe99e0bef912682a4a3b963e17b658dc0e4b9c596436bb331613389",  # optional
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"  # optional, required for remove account, label change
    }
    

    AccountViewModel:

    {
        "address": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "balance": 0,
        "importance": 0.0,
        "label": "private Label",
        "publicKey": null,
        "harvestedBlocks": 0,
        "status": "LOCKED"
    }
    

    Sends a new transaction (i.e., sending XEM, messages, assets).

    /wallet/account/transaction/send
    • Request Method: POST
    • Request: TransferSendRequest
    • Response: -
    • Dependent from NIS: Yes

    TransferSendRequest:

    {
    	"wallet": "PrivateWallet",
    	"type": _type, 	#50 for multisig or 257 for normal transfer
    	"multisigAccount": "multisigAccount", 	#optional multisig only
    	"account": "AccountAddress",
    	"recipient": "ReceipientAddress",
    	"amount": _amount,
    	"hexMessage": 0,	#1 if Hex message
    	"encrypt": 0, 	#1 for encrypted
    	"message": "My first message",	 #optional, cost fees
    	"hoursDue": 2,
    	"password": "Very Secret Password To The Wallet",
    	"fee": 2000000,	 #min fee
    	"multisigFee": 0
    }

    Sign and propagate a multisignature transfer

    /wallet/account/signature/send
    • Request Method: POST
    • Request: MultisigSignatureRequest
    • Response: -
    • Dependent from NIS: Yes

    MultisigSignatureRequest:

    {
    	"wallet": "PrivateWallet",
    	"password": "Very Secret Password To The Wallet",
    	"account": "cosignatoryAccount",
    	"multisigAddress": "multisigAddress",
    	"innerHash": {
    	"data": dataHash 	#inner transaction hash (You can get it from unconfirmed transactions)
    	},
    	"hoursDue": 2,
    	"fee": 2000000
    }

    Validates a new transaction (i.e., sending XEM, messages, assets)

    and provides information on fee and encryption possibility.

    /wallet/account/transaction/validate
    • Request Method: POST
    • Request: PartialTransferInformationRequest
    • Response: PartialTransferInformationViewModel
    • Dependent from NIS: Yes

    PartialTransferInformationRequest:

    {
        "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "amount":  10000.0,
        "message": "My first message",
        "encrypt": 1,
    }

    PartialTransferInformationViewModel:

    {
        "fee": 1.0,               # reflects the minimum fee that is required
                                  # to send the transaction
        "encryptionSupported" : 1 # indicates whether an encrypted message can be sent
                                  # to the recipient (if provided)
                                  # 0 - encryption is not supported
                                  # 1 - encryption is supported
    }
    

    Unlock the account on the connected NIS server (start harvesting)

    /wallet/account/unlock
    • Request Method: POST
    • Request: AccountWalletRequest
    • Response: -
    • Dependent from NIS: Yes

    AccountWalletRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet"
    }

    Lock the account on the connected NIS server (stop harvesting)

    /wallet/account/lock
    • Request Method: POST
    • Request: AccountWalletRequest
    • Response: -
    • Dependent from NIS: Yes

    AccountWalletRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet"
    }

    Announces activation of delegated harvesting account to the network (FEE:1)

    /wallet/account/remote/activate
    • Request Method: POST
    • Request: TransferImportanceRequest
    • Response: -
    • Dependent from NIS: Yes

    TransferImportanceRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet",
        "password": "Very Secret Password To The Wallet",
        "hoursDue": "6" // (max: 24)
    }
    

    Announces deactivation of delegated harvesting account to the network (FEE:1)

    /wallet/account/remote/deactivate
    • Request Method: POST
    • Request: TransferImportanceRequest
    • Response: -
    • Dependent from NIS: Yes

    TransferImportanceRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet",
        "password": "Very Secret Password To The Wallet",
        "hoursDue": "6" // (max: 24)
    }
    

    Checks if account is unlocked on remote server

    /wallet/account/remote/status
    • Request Method: POST
    • Request: AccountWalletRequest
    • Response: AccountStatusViewModel
    • Dependent from NIS: Yes

    AccountWalletRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet"
    }
    

    AccountStatusViewModel:

    {
        "status" : "UNLOCKED" 	#or LOCKED
    }
    

    Unlock the account on a remote NIS server (start delegated harvesting)

    /wallet/account/remote/unlock
    • Request Method: POST
    • Request: AccountWalletPasswordRequest
    • Response: -
    • Dependent from NIS: Yes

    AccountWalletPasswordRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet",
        "password" : "Very Secret Password To The Wallet"
    }
    

    Lock the account on a remote NIS server (stop delegated harvesting)

    /wallet/account/remote/lock
    • Request Method: POST
    • Request: AccountWalletPasswordRequest
    • Response: -
    • Dependent from NIS: Yes

    AccountWalletPasswordRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "wallet" : "Test-Wallet",
        "password" : "Very Secret Password To The Wallet"
    }
    

    Account

    Gets information about a specified account

    Looks-up an account which is known by its address id.

    /account/find
    • Request Method: POST
    • Request: AccountIdRequest
    • Response: AccountViewModel
    • Dependent from NIS: Yes

    AccountIdRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"
    }

    AccountViewModel:

    {
        "address": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "balance": 0,
        "importance": 0.0,
        "label": "private Label",
        "publicKey": null,
        "harvestedBlocks": 0,
        "status": "LOCKED"
    }

    Gets information about a specified account and unconfirmed transactions.

    /account/transactions/unconfirmed
    • Request Method: POST
    • Request: AccountHashRequest
    • Response: AccountTransactionsPair
    • Dependent from NIS: Yes

    AccountHashRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "hash": "37ccf321509d58a0d5f7fd48ff4350786abcddddf72d4b5baeae6d3c7f506150"
    }

    AccountTransactionsPair:

    {
        "address": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
        "balance": 50170416240761,
        "importance": 0.012124950571331367,
        "label": null,
        "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
        "transactions": [{                                                                  # collection of [TransferViewModel](viewModel.md#transferviewmodel)
            "id": "19283746535271819",
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
            "sender" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "timeStamp" : 1234211,
            "fee": 1.0,
            "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
            "amount":  10000.0,
            "message": "My first message",
            "encrypt": 1,
            "confirmed" : 1,
            "confirmations" : 1440,
            "blockHeight" : 80765,
            "direction": 0
        },
        {
            "timeStamp": 1408403524000,
            "amount": 15000000000,
            "encrypted": 0,
            "sender": "TDUDEHNJR324TIYOYON5T4Z6ZZSCAAAAFDSG56DC",
            "fee": 1000000000,
            "recipient": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
            "id": 2206077648187190476,
            "message": "Easy money\n\nParana",
            "confirmations": 6564,
            "confirmed": 1,
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
        "blockHeight" : 80765,
            "direction": 1
        }],
        "harvestedBlocks": 97,
        "status": "UNLOCKED"
        "remoteStatus": "ACTIVATING"
    }

    possible remoteStatus values:

    • REMOTE - shouldn't normally occur, both buttons should be disabled
    • INACTIVE - "activate" button should be enabled, "start delegated harvesting" - disabled
    • ACTIVATING - "activate" button should be disabled, "start delegated harvesting" - enabled
    • ACTIVE - "Deactivate" button should be enabled, "start delegated harvesting" - enabled
    • DEACTIVATING - "Deactivate" button should be disabled, "start delegated harvesting" - disabled

    Gets information about a specified account and confirmed transactions.

    /account/transactions/confirmed
    • Request Method: POST
    • Request: AccountTransactionIdRequest
    • Response: AccountTransactionsPair
    • Dependent from NIS: Yes

    AccountTransactionIdRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "id": 12345		#optional
    }

    AccountTransactionsPair:

    {
        "address": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
        "balance": 50170416240761,
        "importance": 0.012124950571331367,
        "label": null,
        "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
        "transactions": [{                                                                  # collection of [TransferViewModel](viewModel.md#transferviewmodel)
            "id": "19283746535271819",
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
            "sender" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "timeStamp" : 1234211,
            "fee": 1.0,
            "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
            "amount":  10000.0,
            "message": "My first message",
            "encrypt": 1,
            "confirmed" : 1,
            "confirmations" : 1440,
            "blockHeight" : 80765,
            "direction": 0
        },
        {
            "timeStamp": 1408403524000,
            "amount": 15000000000,
            "encrypted": 0,
            "sender": "TDUDEHNJR324TIYOYON5T4Z6ZZSCAAAAFDSG56DC",
            "fee": 1000000000,
            "recipient": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
            "id": 2206077648187190476,
            "message": "Easy money\n\nParana",
            "confirmations": 6564,
            "confirmed": 1,
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
        "blockHeight" : 80765,
            "direction": 1
        }],
        "harvestedBlocks": 97,
        "status": "UNLOCKED"
        "remoteStatus": "ACTIVATING"
    }

    possible remoteStatus values:

    • REMOTE - shouldn't normally occur, both buttons should be disabled
    • INACTIVE - "activate" button should be enabled, "start delegated harvesting" - disabled
    • ACTIVATING - "activate" button should be disabled, "start delegated harvesting" - enabled
    • ACTIVE - "Deactivate" button should be enabled, "start delegated harvesting" - enabled
    • DEACTIVATING - "Deactivate" button should be disabled, "start delegated harvesting" - disabled

    Gets information about a specified account and incoming transactions.

    /account/transactions/incoming
    • Request Method: POST
    • Request: AccountTransactionIdRequest
    • Response: AccountTransactionsPair
    • Dependent from NIS: Yes

    AccountTransactionIdRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "id": 12345		#optional
    }

    AccountTransactionsPair:

    {
        "address": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
        "balance": 50170416240761,
        "importance": 0.012124950571331367,
        "label": null,
        "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
        "transactions": [{                                                                  # collection of [TransferViewModel](viewModel.md#transferviewmodel)
            "id": "19283746535271819",
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
            "sender" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "timeStamp" : 1234211,
            "fee": 1.0,
            "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
            "amount":  10000.0,
            "message": "My first message",
            "encrypt": 1,
            "confirmed" : 1,
            "confirmations" : 1440,
            "blockHeight" : 80765,
            "direction": 0
        },
        {
            "timeStamp": 1408403524000,
            "amount": 15000000000,
            "encrypted": 0,
            "sender": "TDUDEHNJR324TIYOYON5T4Z6ZZSCAAAAFDSG56DC",
            "fee": 1000000000,
            "recipient": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
            "id": 2206077648187190476,
            "message": "Easy money\n\nParana",
            "confirmations": 6564,
            "confirmed": 1,
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
        "blockHeight" : 80765,
            "direction": 1
        }],
        "harvestedBlocks": 97,
        "status": "UNLOCKED"
        "remoteStatus": "ACTIVATING"
    }

    possible remoteStatus values:

    • REMOTE - shouldn't normally occur, both buttons should be disabled
    • INACTIVE - "activate" button should be enabled, "start delegated harvesting" - disabled
    • ACTIVATING - "activate" button should be disabled, "start delegated harvesting" - enabled
    • ACTIVE - "Deactivate" button should be enabled, "start delegated harvesting" - enabled
    • DEACTIVATING - "Deactivate" button should be disabled, "start delegated harvesting" - disabled

    Gets information about a specified account and outgoing transactions.

    /account/transactions/outgoing
    • Request Method: POST
    • Request: AccountTransactionIdRequest
    • Response: AccountTransactionsPair
    • Dependent from NIS: Yes

    AccountTransactionIdRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "id": 12345		#optional
    }

    AccountTransactionsPair:

    {
        "address": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
        "balance": 50170416240761,
        "importance": 0.012124950571331367,
        "label": null,
        "publicKey": "03c55bd250e56c292ed4c898b0883676313283251d21b6a9099bb989db99d736d2",
        "transactions": [{                                                                  # collection of [TransferViewModel](viewModel.md#transferviewmodel)
            "id": "19283746535271819",
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
            "sender" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
            "timeStamp" : 1234211,
            "fee": 1.0,
            "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
            "amount":  10000.0,
            "message": "My first message",
            "encrypt": 1,
            "confirmed" : 1,
            "confirmations" : 1440,
            "blockHeight" : 80765,
            "direction": 0
        },
        {
            "timeStamp": 1408403524000,
            "amount": 15000000000,
            "encrypted": 0,
            "sender": "TDUDEHNJR324TIYOYON5T4Z6ZZSCAAAAFDSG56DC",
            "fee": 1000000000,
            "recipient": "TATHIESMY6QO6XKPCBZFEVVVFVL2UT3ESDHAVGL7",
            "id": 2206077648187190476,
            "message": "Easy money\n\nParana",
            "confirmations": 6564,
            "confirmed": 1,
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
        "blockHeight" : 80765,
            "direction": 1
        }],
        "harvestedBlocks": 97,
        "status": "UNLOCKED"
        "remoteStatus": "ACTIVATING"
    }

    possible remoteStatus values:

    • REMOTE - shouldn't normally occur, both buttons should be disabled
    • INACTIVE - "activate" button should be enabled, "start delegated harvesting" - disabled
    • ACTIVATING - "activate" button should be disabled, "start delegated harvesting" - enabled
    • ACTIVE - "Deactivate" button should be enabled, "start delegated harvesting" - enabled
    • DEACTIVATING - "Deactivate" button should be disabled, "start delegated harvesting" - disabled

    Gets information about a specified account and incoming and outgoing transactions.

    /account/transactions/all
    • Request Method: POST
    • Request: AccountTransactionIdRequest
    • Response: TransferViewModel
    • Dependent from NIS: Yes

    AccountTransactionIdRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "id": 12345  	#optional
    }
    

    TransferViewModel:

    {
        "id": "19283746535271819",
        "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd", #
        "sender" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "timeStamp" : 1234211,
        "fee": 1.0,
        "recipient": "TBYDNCLNEGESF5EWRFWFJU7RNCPWOOQH5LMRSQ5A",
        "amount":  10000.0,
        "message": "My first message",                                              # optional, only if message available
        "encrypt": 1,                                                               # optional, 1 - encrypted
                                                                                    # 0 - clear text
        "confirmed" : 1,
        "confirmations" : 1440,
        "blockHeight" : 80765,
        "direction": 0                                                              # 1 - incoming,
                                                                                    # 2 - outgoing,
                                                                                    # 3 - self
    }
    

    Retrieves a list of infos on harvested blocks for an account.

    /account/harvests
    • Request Method: POST
    • Request: AccountHashRequest
    • Response: HarvestInfoViewModelList
    • Dependent from NIS: Yes

    AccountHashRequest:

    {
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2",
        "hash": "37ccf321509d58a0d5f7fd48ff4350786abcddddf72d4b5baeae6d3c7f506150" 	#optional
    }
    

    HarvestInfoViewModelList:

    {
        "data": [{
            "id": "http",
            "hash": "1e9d8feec7206ccc3df254bde2a98372b61eef56ac5d907479bc8cc78aa8d1bd",
            "message": "",
            "timeStamp": 1408700457000,
            "fee": 10.0,
            "height" : 17801
        }]
    }

    Node


    Boot the local node

    /node/boot
    • Request Method: POST
    • Request: BootNodeRequest
    • Response: -
    • Dependent from NIS: Yes

    BootNodeRequest:

    {
        "nodeName": "Arthur",
        "wallet": "PrivateWallet",
        "account" : "TCN33UYH7OREBBFPA4D7GAE6TALNAZJOF6ZPDVA2"
    }

    Check the status of a local node

    /node/status
    • Request Method: GET
    • Request: -
    • Response: NemRequestResult
    • Dependent from NIS: Yes

    NemRequestResult:

    {
        "code": 3,            # 0 - UNKNOWN
                              # 1 - STOPPED
                              # 2 - STARTING
                              # 3 - RUNNING
                              # 4 - BOOTING
                              # 5 - BOOTED
                              # 6 - SYNCHRONIZED
        "type": 4,            # A NemRequestResult can have serveral meanings.
                              # The type indicates the meaning.
                              # type 4 - TYPE_STATUS, the code and the message fields
                              # have to be interpreted as status.
        "message": "status"
    }

    Network


    Requests a view model for the peers to which the specified peers are connected.

    /network
    • Request Method: POST
    • Request: NodeEndpointList
    • Response: GraphViewModel
    • Dependent from NIS: Yes

    NodeEndpointList:

    {
        "data": [{
            "protocol": "http",
            "host": "bob.nem.ninja",
            "port": 7890
        },
        {
            "protocol": "http",
            "host": "alice.nem.ninja",
            "port": 7890
        }]
    }

    GraphViewModel:

    {
        "meta": {
            "meta": [{
                "endpoint": {
                    "protocol": "http",
                    "port": 7890,
                    "host": "85.94.111.196"
                },
                "address": "TCJQPPB7ESZJWHILWBFG5TJRWXWJD6MZUGO6XA7S",
                "active": 1,
                "version": "0.4.3-BETA",
                "platform": "Oracle Corporation (1.8.0_11) on Windows 8.1"
            },
            {
                "endpoint": {
                    "protocol": "http",
                    "port": 7890,
                    "host": "199.217.112.135"
                },
                "address": "TCAGZZKJXE43NNWBMB23ODTANMALICE4XDOEAWXB",
                "active": 1,
                "version": "0.4.3-BETA",
                "platform": "?"
            }]
        },
        "graph": {
            "nodes": [{
                "id": "TCJQPPB7ESZJWHILWBFG5TJRWXWJD6MZUGO6XA7S",
                "label": "pole"
            },
            {
                "id": "TCAGZZKJXE43NNWBMB23ODTANMALICE4XDOEAWXB",
                "label": "Hi, I am Alice4"
            }],
            "edges": [{
                "id": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L -> TB6TEQCWJUSANWAAFRGKTQKMOGOB6G2ZH7OMKOGO",
                "source": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L",
                "target": "TB6TEQCWJUSANWAAFRGKTQKMOGOB6G2ZH7OMKOGO"
            },
            {
                "id": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L -> TCBMYGMLALICE2FITJVBJDEC2SNSPLYDMDM4WL5W",
                "source": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L",
                "target": "TCBMYGMLALICE2FITJVBJDEC2SNSPLYDMDM4WL5W"
            }]
        }
    }

    Requests a view model for the peers to which the local NIS is connected.

    /network/local
    • Request Method: GET
    • Request: -
    • Response: GraphViewModel
    • Dependent from NIS: Yes

    GraphViewModel:

    {
        "meta": {
            "meta": [{
                "endpoint": {
                    "protocol": "http",
                    "port": 7890,
                    "host": "85.94.111.196"
                },
                "address": "TCJQPPB7ESZJWHILWBFG5TJRWXWJD6MZUGO6XA7S",
                "active": 1,
                "version": "0.4.3-BETA",
                "platform": "Oracle Corporation (1.8.0_11) on Windows 8.1"
            },
            {
                "endpoint": {
                    "protocol": "http",
                    "port": 7890,
                    "host": "199.217.112.135"
                },
                "address": "TCAGZZKJXE43NNWBMB23ODTANMALICE4XDOEAWXB",
                "active": 1,
                "version": "0.4.3-BETA",
                "platform": "?"
            }]
        },
        "graph": {
            "nodes": [{
                "id": "TCJQPPB7ESZJWHILWBFG5TJRWXWJD6MZUGO6XA7S",
                "label": "pole"
            },
            {
                "id": "TCAGZZKJXE43NNWBMB23ODTANMALICE4XDOEAWXB",
                "label": "Hi, I am Alice4"
            }],
            "edges": [{
                "id": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L -> TB6TEQCWJUSANWAAFRGKTQKMOGOB6G2ZH7OMKOGO",
                "source": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L",
                "target": "TB6TEQCWJUSANWAAFRGKTQKMOGOB6G2ZH7OMKOGO"
            },
            {
                "id": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L -> TCBMYGMLALICE2FITJVBJDEC2SNSPLYDMDM4WL5W",
                "source": "TBGIMREUQQ5ZQX6C3IGLBSVPMROHCMPEIHY4GV2L",
                "target": "TCBMYGMLALICE2FITJVBJDEC2SNSPLYDMDM4WL5W"
            }]
        }
    }

    Shutdown

    Stops the NCC server

    After that NCC GUI does not respond to any clicks.

    /shutdown
    • Request Method: GET
    • Request: -
    • Response: -
    • Dependent from NIS: No