Last active
February 5, 2018 07:29
-
-
Save kengos/3b0620636fc6775b07f3e4b1288b5c3b to your computer and use it in GitHub Desktop.
NEM NIS OpenApi YAML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: "3.0.0" | |
| info: | |
| title: NEM NIS API Documentation | |
| version: "1.22" | |
| contact: {} | |
| servers: | |
| - url: 'http://104.128.226.60:7890' | |
| description: Testnet server | |
| - url: 'http://alice6.nem.ninja:7890' | |
| description: Mainnet server | |
| - url: 'http://127.0.0.1:7890' | |
| description: Local server | |
| paths: | |
| /heartbeat: | |
| get: | |
| summary: Determines if NIS is up and responsive. | |
| tags: | |
| - NIS status | |
| externalDocs: | |
| url: 'https://nemproject.github.io/#heart-beat-request' | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: return a NemRequestHeartbeatResult object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NemRequestHeartbeatResult" | |
| default: | |
| description: | | |
| If there is no response to this request, NIS is either not running | |
| or is in a state where it can't serve requests. | |
| /status: | |
| get: | |
| summary: Determines the status of NIS. | |
| tags: | |
| - NIS status | |
| externalDocs: | |
| url: https://nemproject.github.io/#status-request | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: return a NemRequestStatusResult object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NemRequestStatusResult" | |
| /account/generate: | |
| get: | |
| summary: Generating new account data | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#generating-new-account-data | |
| description: | | |
| Generates a KeyPairViewModel. | |
| **local only** | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: return a KeyPairViewModel object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/KeyPairViewModel" | |
| /account/get: | |
| get: | |
| summary: Requesting the account data | |
| tags: | |
| - Account | |
| description: Gets an AccountMetaDataPair for an account. | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-the-account-data | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| responses: | |
| 200: | |
| description: return a AccountMetaDataPair object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AccountMetaDataPair" | |
| /account/get/from-public-key: | |
| get: | |
| summary: Requesting the account data from a public key | |
| tags: | |
| - Account | |
| description: Gets an AccountMetaDataPair for an account. | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-the-account-data | |
| parameters: | |
| - name: publicKey | |
| in: query | |
| required: true | |
| description: The public key of the account as hex string. | |
| example: f9bd190dd0c364261f5c8a74870cc7f7374e631352293c62ecc437657e5de2cd | |
| responses: | |
| 200: | |
| content: | |
| description: return a AccountMetaDataPair object | |
| application/json: | |
| schema: | |
| "$ref": "#/components/schemas/AccountMetaDataPair" | |
| /account/get/forwarded: | |
| get: | |
| summary: Requesting the original account data for a delegate account | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-the-original-account-data-for-a-delegate-account | |
| description: | | |
| Given a delegate (formerly known as remote) account's address, | |
| gets the AccountMetaDataPair for the account for which the given account is the delegate account. | |
| If the given account address is not a delegate account for any account, | |
| the request returns the AccountMetaDataPair for the given address. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the delegate account. | |
| example: NC2ZQKEFQIL3JZEOB2OZPWXWPOR6LKYHIROCR7PK | |
| responses: | |
| 200: | |
| description: return a AccountMetaDataPair object | |
| content: | |
| application/json: | |
| schema: | |
| "$ref": "#/components/schemas/AccountMetaDataPair" | |
| /account/get/forwarded/from-public-key: | |
| get: | |
| summary: Requesting the original account data for a delegate account from a public key | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-the-original-account-data-for-a-delegate-account | |
| description: | | |
| Given a delegate (formerly known as remote) account's address, | |
| gets the AccountMetaDataPair for the account for which the given account is the delegate account. | |
| If the given account address is not a delegate account for any account, | |
| the request returns the AccountMetaDataPair for the given address. | |
| parameters: | |
| - name: publicKey | |
| in: query | |
| required: true | |
| description: The public key of the account as hex string. | |
| example: bdd8dd702acb3d88daf188be8d6d9c54b3a29a32561a068b25d2261b2b2b7f02 | |
| responses: | |
| 200: | |
| description: return a AccountMetaDataPair object | |
| content: | |
| application/json: | |
| schema: | |
| "$ref": "#/components/schemas/AccountMetaDataPair" | |
| /account/status: | |
| get: | |
| summary: Requesting the account status | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-the-account-status | |
| description: Gets the AccountMetaData from an account. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| responses: | |
| 200: | |
| description: return a AccountMetaDataPair object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AccountMetaDataPair" | |
| /account/transfers/incoming: | |
| get: | |
| tags: | |
| - Account | |
| summary: Get incoming transactions | |
| externalDocs: | |
| url: 'https://nemproject.github.io/#requesting-transaction-data-for-an-account' | |
| description: | | |
| A transaction is said to be incoming with respect to an account | |
| if the account is the recipient of the transaction. | |
| In the same way outgoing transaction are the transactions where the account is the sender of the transaction. | |
| Unconfirmed transactions are those transactions that have not yet been included in a block. | |
| Unconfirmed transactions are not guaranteed to be included in any block. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| - name: hash | |
| in: query | |
| required: false | |
| description: The 256 bit sha3 hash of the transaction up to which transactions are returned. | |
| example: 949583a20ebdfdcb58277eb42fef3e66e9e6bbfc47304d8741a82c68f7c53a2 | |
| - name: id | |
| in: query | |
| required: false | |
| description: The transaction id up to which transactions are returned. | |
| example: 71245 | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| # 3.1.5: outgoing | |
| /account/transfers/outgoing: | |
| get: | |
| summary: Get outgoing transactions | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: 'https://nemproject.github.io/#requesting-transaction-data-for-an-account' | |
| description: | | |
| Gets an array of transaction meta data pairs where the recipient has the address given as parameter to the request. | |
| A maximum of 25 transaction meta data pairs is returned. | |
| For details about sorting and discussion of the second parameter see Incoming transactions. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| - name: hash | |
| in: query | |
| required: false | |
| description: The 256 bit sha3 hash of the transaction up to which transactions are returned. | |
| example: 949583a20ebdfdcb58277eb42fef3e66e9e6bbfc47304d8741a82c68f7c53a2 | |
| - name: id | |
| in: query | |
| required: false | |
| description: The transaction id up to which transactions are returned. | |
| example: 71245 | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| /account/transfers/all: | |
| get: | |
| summary: Get all transactions | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: 'https://nemproject.github.io/#requesting-transaction-data-for-an-account' | |
| description: | | |
| Gets an array of transaction meta data pairs for which an account is the sender or receiver. | |
| A maximum of 25 transaction meta data pairs is returned. | |
| For details about sorting and discussion of the second parameter see Incoming transactions. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| - name: hash | |
| in: query | |
| required: false | |
| description: The 256 bit sha3 hash of the transaction up to which transactions are returned. | |
| example: 949583a20ebdfdcb58277eb42fef3e66e9e6bbfc47304d8741a82c68f7c53a2 | |
| - name: id | |
| in: query | |
| required: false | |
| description: The transaction id up to which transactions are returned. | |
| example: 71245 | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| /account/transfers/unconfirmedTransactions: | |
| get: | |
| summary: Get unconfirmed transactions | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: 'https://nemproject.github.io/#requesting-transaction-data-for-an-account' | |
| description: | | |
| Gets the array of transactions for which an account is the sender or receiver and which have not yet been included in a block. | |
| The returned structure is UnconfirmedTransactionMetaDataPair see Appendix A: UnconfirmedTransactionMetaDataPair | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| - name: hash | |
| in: query | |
| required: false | |
| description: The 256 bit sha3 hash of the transaction up to which transactions are returned. | |
| example: 949583a20ebdfdcb58277eb42fef3e66e9e6bbfc47304d8741a82c68f7c53a2 | |
| - name: id | |
| in: query | |
| required: false | |
| description: The transaction id up to which transactions are returned. | |
| example: 71245 | |
| responses: | |
| 200: | |
| description: return an array of UnconfirmedTransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/UnconfirmedTransactionMetaDataPair" | |
| # FIXME | |
| /local/account/transfers/incoming: | |
| post: | |
| summary: Get incoming transactions with decoded messages **local only** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#transaction-data-with-decoded-messages | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AccountPrivateKeyTransactionsPage" | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| /local/account/transfers/outgoing: | |
| post: | |
| summary: Get outgoing transactions with decoded messages **local only** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#transaction-data-with-decoded-messages | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AccountPrivateKeyTransactionsPage" | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| /local/account/transfers/all: | |
| post: | |
| summary: Get all transactions with decoded messages **local only** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#transaction-data-with-decoded-messages | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AccountPrivateKeyTransactionsPage" | |
| responses: | |
| 200: | |
| description: return an array of TransactionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| maxItems: 25 | |
| items: | |
| $ref: "#/components/schemas/TransactionMetaDataPair" | |
| /account/harvests: | |
| get: | |
| summary: Requesting harvest info data for an account | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-harvest-info-data-for-an-account | |
| description: Gets an array of harvest info objects for an account. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| - name: hash | |
| in: query | |
| required: false | |
| description: (optional) The 256 bit sha3 hash of the block up to which harvested blocks are returned. | |
| example: 949583a20ebdfdcb58277eb42fef3e66e9e6bbfc47304d8741a82c68f7c53a2 | |
| responses: | |
| 200: | |
| description: return an array of HarvestInfo objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/HarvestInfo" | |
| /account/importances: | |
| get: | |
| summary: Retrieving account importances for accounts | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-account-importances-for-accounts | |
| description: Gets an array of account importance view model objects. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: return an array of AccountImportanceViewModel objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/AccountImportanceViewModel" | |
| /account/namespace/page: | |
| get: | |
| summary: Retrieving namespaces that an account owns | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-namespaces-that-an-account-owns | |
| description: | | |
| Gets an array of namespace objects for a given account address. | |
| The parent parameter is optional. | |
| If supplied, only sub-namespaces of the parent namespace are returned. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TD3RXTHBLK6J3UD2BH2PXSOFLPWZOTR34WCG4HXH | |
| - name: parent | |
| in: query | |
| required: false | |
| description: (optional) parent namespace id. | |
| example: makoto.metal | |
| - name: id | |
| in: query | |
| required: false | |
| description: (optional) namespace database id up to which namespaces are returned. | |
| example: 71245 | |
| - name: pageSize | |
| in: query | |
| required: false | |
| description: (optional) number of namespaces to be returned. | |
| example: 25 | |
| responses: | |
| 200: | |
| description: return an array of Namespace objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/Namespace" | |
| /account/mosaic/definition/page: | |
| get: | |
| summary: Retrieving mosaic definitions that an account has created | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-mosaic-definitions-that-an-account-has-created | |
| description: | | |
| Gets an array of mosaic definition objects for a given account address. | |
| The parent parameter is optional. | |
| If supplied, only mosaic definitions for the given parent namespace are returned. | |
| The id parameter is optional and allows retrieving mosaic definitions in batches of 25 mosaic definitions. | |
| For more information how to use the id see Incoming transactions. | |
| parameters: | |
| - name: address | |
| in: query | |
| description: The address of the account. | |
| example: TD3RXTHBLK6J3UD2BH2PXSOFLPWZOTR34WCG4HXH | |
| - name: parent | |
| in: query | |
| description: (optional) parent namespace id. | |
| example: makoto.metal.coins | |
| - name: id | |
| in: query | |
| description: (optional) mosaic definition database id up to which mosaic definitions are returned. | |
| responses: | |
| 200: | |
| description: return an array of MosaicDefinition objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/MosaicDefinition" | |
| /account/mosaic/owned: | |
| get: | |
| summary: Retrieving mosaics that an account owns | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-mosaics-that-an-account-owns | |
| description: Gets an array of mosaic objects for a given account address. | |
| parameters: | |
| - name: address | |
| in: query | |
| required: true | |
| description: The address of the account. | |
| example: TD3RXTHBLK6J3UD2BH2PXSOFLPWZOTR34WCG4HXH | |
| responses: | |
| 200: | |
| description: return an array of Mosaic objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/Mosaic" | |
| # FIXME | |
| /account/unlock: | |
| post: | |
| summary: Unlocking the account (enables harvesting) **Request cannot be performed in a browser.** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#locking-and-unlocking-accounts | |
| description: Unlocks an account (starts harvesting). | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/PrivateKey" | |
| # FIXME | |
| /account/lock: | |
| post: | |
| summary: Locking the account (stops harvesting) **Request cannot be performed in a browser.** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#locking-and-unlocking-accounts | |
| description: Locks an account (stops harvesting). | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/PrivateKey" | |
| # FIXME | |
| /account/unlocked/info: | |
| post: | |
| summary: Retrieving the unlock info **Request cannot be performed in a browser.** | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#locking-and-unlocking-accounts | |
| description: | | |
| Each node can allow users to harvest with their delegated key on that node. | |
| The NIS configuration has entries for configuring the maximum number of allowed harvesters and optionally allow harvesting only for certain account addresses. | |
| The unlock info gives information about the maximum number of allowed harvesters and how many harvesters are already using the node. | |
| responses: | |
| 200: | |
| description: return num-unlocked count and max-unlocked count | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| num-unlocked: | |
| type: integer | |
| example: 2 | |
| max-unlocked: | |
| type: integer | |
| example: 3 | |
| # 3.2 Retrieving historical account data | |
| /account/historical/get: | |
| get: | |
| summary: Retrieving historical account data | |
| tags: | |
| - Account | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-historical-account-data | |
| description: | | |
| The configuration for NIS offers the possibility for a node to expose additional features that other nodes don't want to offer. | |
| One of those features is the supply of historical account data like balance and importance information. | |
| To turn on this feature for your NIS, you need to add HISTORICAL_ACCOUNT_DATA to the list of optional features in the file config.properties. | |
| parameters: | |
| - name: address | |
| in: query | |
| description: The address of the account. | |
| example: NALICELGU3IVY4DPJKHYLSSVYFFWYS5QPLYEZDJJ | |
| - name: startHeight | |
| in: query | |
| description: The block height from which on the data should be supplied. | |
| example: 17592 | |
| - name: endHeight | |
| in: query | |
| description: | | |
| The block height up to which the data should be supplied. | |
| The end height must be greater than or equal to the start height. | |
| example: 17592 | |
| - name: increment | |
| in: query | |
| description: | | |
| The value by which the height is incremented between each data point. | |
| The value must be greater than 0. NIS can supply up to 1000 data points with one request. | |
| Requesting more than 1000 data points results in an error. | |
| example: 1 | |
| responses: | |
| 200: | |
| description: return an array of AccountHistoricalDataViewModel objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| $ref: "#/components/schemas/AccountHistoricalDataViewModel" | |
| # 4.1.1 Block chain height | |
| /chain/height: | |
| get: | |
| summary: Get block chain height | |
| tags: | |
| - Block chain | |
| externalDocs: | |
| url: https://nemproject.github.io/#block-chain-height | |
| description: Gets the current height of the block chain. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: the current height of the block chain | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BlockHeight" | |
| # 4.1.2 Block chain score | |
| /chain/score: | |
| get: | |
| summary: Get block chain score | |
| tags: | |
| - Block chain | |
| externalDocs: | |
| url: https://nemproject.github.io/#block-chain-score | |
| description: | | |
| Gets the current score of the block chain. | |
| The higher the score, the better the chain. | |
| During synchronization, nodes try to get the best block chain in the network. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: the current score of the block chain | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BlockChainScore" | |
| # 4.1.3 | |
| /chain/last-block: | |
| get: | |
| summary: Get last block of the block chain score | |
| tags: | |
| - Block chain | |
| externalDocs: | |
| url: https://nemproject.github.io/#last-block-of-the-block-chain-score | |
| description: Gets the current last block of the chain. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: the current last Block object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Block" | |
| # 4.2 | |
| ## 4.2.1 | |
| /block/at/public: | |
| post: | |
| summary: Getting a block with a given height | |
| tags: | |
| - Block chain | |
| externalDocs: | |
| url: https://nemproject.github.io/#getting-a-block-with-a-given-height | |
| description: Gets a block from the chain that has the given height. | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BlockHeight" | |
| responses: | |
| 200: | |
| description: the current last Block object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Block" | |
| ## 4.2.2 | |
| /local/chain/blocks-after: | |
| post: | |
| summary: Getting part of a chain | |
| tags: | |
| - Block chain | |
| externalDocs: | |
| url: https://nemproject.github.io/#getting-part-of-a-chain | |
| description: | | |
| Gets up to 10 blocks after given block height from the chain. | |
| If the database contains less than 10 block after the given height, then less blocks are returned. | |
| The returned data is an array of ExplorerBlockViewModel JSON objects. | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BlockHeight" | |
| responses: | |
| 200: | |
| description: the current last Block object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Block" | |
| # 5 | |
| ## 5.1 | |
| ### 5.1.1 | |
| /node/info: | |
| get: | |
| summary: Get basic node information | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#basic-node-information | |
| description: Gets basic information about a node. Using IP 127.0.0.1 gets information about the local node. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: basic node information | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Node" | |
| ### 5.1.2 | |
| /node/extended-info: | |
| get: | |
| summary: Get extended node information | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#extended-node-information | |
| description: Gets extended information about a node. Using IP 127.0.0.1 gets extended information about the local node. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: NisNodeInfo object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NisNodeInfo" | |
| ## 5.2 | |
| ### 5.2.1 | |
| /node/peer-list/all: | |
| get: | |
| summary: Get complete neighborhood | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#complete-neighborhood | |
| description: Gets an array of all known nodes in the neighborhood. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: NodeCollection object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NodeCollection" | |
| ### 5.2.2 | |
| /node/peer-list/reachable: | |
| get: | |
| summary: Get reachable neighborhood | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#reachable-neighborhood | |
| description: Gets an array of all nodes with status 'active' in the neighborhood. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: an array of Node objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| ### 5.2.3 | |
| /node/peer-list/active: | |
| get: | |
| summary: Get active neighborhood | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#active-neighborhood | |
| description: Gets an array of active nodes in the neighborhood that are selected for broadcasts. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: an array of Node objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| ### 5.2.4 | |
| /node/peer-list/max-chain-height: | |
| get: | |
| summary: Get maximum chain height in the active neighborhood | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#maximum-chain-height-in-the-active-neighborhood | |
| description: | | |
| Requests the chain height from every node in the active node list (described in Active neighborhood) | |
| and returns the maximum height seen. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: BlockHeight object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BlockHeight" | |
| ## 5.3 | |
| /node/experiences: | |
| get: | |
| summary: Requesting node experiences | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#requesting-node-experiences | |
| description: | | |
| Gets an array of node experiences from another node. | |
| Each node saves its experiences with other nodes in an internal map. | |
| Sharing experiences helps nodes to select honest nodes for communication. | |
| parameters: [] | |
| responses: | |
| 200: | |
| description: ExtendedNodeExperiencePair object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/ExtendedNodeExperiencePair" | |
| ## 5.4 | |
| /node/boot: | |
| post: | |
| summary: Booting the local node **local only** | |
| tags: | |
| - Node | |
| externalDocs: | |
| url: https://nemproject.github.io/#booting-the-local-node | |
| description: | | |
| Boots the local node and thus assign an account (the identity) to the local node. | |
| parameters: [] | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/BootNodeRequest" | |
| # 6 | |
| ## 6.1 | |
| ### 6.1.1 | |
| /namespace/root/page: | |
| get: | |
| summary: Retrieving root namespaces | |
| tags: | |
| - Namespace | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-root-namespaces | |
| description: | | |
| Gets the root namespaces. | |
| The requests supports paging, i.e. retrieving the root namespaces in batches of a specified size. | |
| The request returns an array of NamespaceMetaDataPair objects. | |
| parameters: | |
| - name: id | |
| in: query | |
| description: | | |
| The topmost namespace database id up to which root namespaces are returned. | |
| The parameter is optional. If not supplied the most recent rented root namespaces are returned. | |
| example: 26754 | |
| - name: pageSize | |
| in: query | |
| type: integer | |
| minimum: 5 | |
| maximum: 100 | |
| description: | | |
| The number of namespace objects to be returned for each request. | |
| The parameter is optional. | |
| The default value is 25, the minimum value is 5 and hte maximum value is 100. | |
| responses: | |
| 200: | |
| description: an array of NamespaceMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/NamespaceMetaDataPair" | |
| # 6.1.2 | |
| /namespace: | |
| get: | |
| summary: Retrieving root namespaces | |
| tags: | |
| - Namespace | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-root-namespaces | |
| description: | | |
| Gets the namespace with given id. | |
| parameters: | |
| - name: namespace | |
| in: query | |
| description: The namespace id. | |
| type: string | |
| example: makoto.metal.coins | |
| responses: | |
| 200: | |
| content: | |
| description: Namespace object | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Namespace" | |
| ### 6.2.1 | |
| /namespace/mosaic/definition/page: | |
| get: | |
| summary: Retrieving mosaic definitions | |
| tags: | |
| - Mosaics | |
| externalDocs: | |
| url: https://nemproject.github.io/#retrieving-root-namespaces | |
| description: | | |
| Gets the mosaic definitions for a given namespace. | |
| The request supports paging. | |
| The request return an array of MosaicDefinitionMetaDataPair objects. | |
| parameters: | |
| - name: namespace | |
| in: query | |
| description: The namespace id. | |
| type: string | |
| example: makoto.metal.coins | |
| - name: id | |
| in: query | |
| description: | | |
| The topmost mosaic definition database id up to which root mosaic definitions are returned. | |
| The parameter is optional. | |
| If not supplied the most recent mosaic definitiona are returned. | |
| - name: pageSize | |
| in: query | |
| type: integer | |
| minimum: 5 | |
| maximum: 100 | |
| description: | | |
| The number of namespace objects to be returned for each request. | |
| The parameter is optional. | |
| The default value is 25, the minimum value is 5 and hte maximum value is 100. | |
| responses: | |
| 200: | |
| description: an array of MosaicDefinitionMetaDataPair objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/MosaicDefinitionMetaDataPair" | |
| # 7 | |
| ## 7.1 | |
| ### 7.1.1 | |
| /transaction/prepare-announce: | |
| post: | |
| summary: Initiating a transaction | |
| tags: | |
| - Transaction | |
| externalDocs: | |
| url: https://nemproject.github.io/#initiating-a-transaction | |
| description: | | |
| Creates and broadcasts a transaction. | |
| Since this request involves the private key of an account, it should only be sent to a **local** NIS. | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/RequestPrepareAnnounce" | |
| responses: | |
| 200: | |
| description: NemAnnounceResult object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NemAnnounceResult" | |
| ### 7.9.2 | |
| /transaction/announce: | |
| post: | |
| summary: Sending the data to NIS | |
| tags: | |
| - Transaction | |
| externalDocs: | |
| url: https://nemproject.github.io/#sending-the-data-to-NIS | |
| description: | | |
| Creates and broadcasts a transaction. | |
| **The private key is not involved.** | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/RequestAnnounce" | |
| responses: | |
| 200: | |
| description: NemAnnounceResult object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/NemAnnounceResult" | |
| default: | |
| description: return an ErrorObject | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/ErrorObject" | |
| # 8 | |
| ## 8.1 | |
| /debug/time-synchronization: | |
| get: | |
| summary: Monitoring the network time | |
| tags: | |
| - Monitoring | |
| externalDocs: | |
| url: https://nemproject.github.io/#sending-the-data-to-NIS | |
| description: | | |
| Gets an array of time synchronization results as described in Appendix A: TimeSynchronizationResult . | |
| You can monitor the change in network time with this information. | |
| responses: | |
| 200: | |
| description: TimeSynchronizationResult object | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/TimeSynchronizationResult" | |
| ## 8.2 | |
| /debug/connections/incoming: | |
| get: | |
| summary: Monitoring incoming calls | |
| tags: | |
| - Monitoring | |
| externalDocs: | |
| url: https://nemproject.github.io/#monitoring-incoming-and-outgoing-calls | |
| description: | | |
| Gets an audit collection of incoming calls as described in Appendix A: AuditCollection . | |
| You can monitor the outstanding and recent incoming requests with this information. | |
| responses: | |
| 200: | |
| description: AuditCollection object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AuditCollection" | |
| /debug/connections/outgoing: | |
| get: | |
| summary: Monitoring outgoing calls | |
| tags: | |
| - Monitoring | |
| externalDocs: | |
| url: https://nemproject.github.io/#monitoring-incoming-and-outgoing-calls | |
| description: | | |
| Gets an audit collection of outgoing calls as described in Appendix A: AuditCollection . | |
| You can monitor the outstanding and recent outgoing requests with this information. | |
| responses: | |
| 200: | |
| description: AuditCollection object | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/AuditCollection" | |
| ## 8.3 | |
| /debug/connections/timers: | |
| get: | |
| summary: Monitoring timers | |
| tags: | |
| - Monitoring | |
| externalDocs: | |
| url: https://nemproject.github.io/#monitoring-timers | |
| description: | | |
| Gets an array of task monitor structures as described in Appendix A: NemAsyncTimerVisitor . | |
| You can monitor the statistics for periodic tasks with this information. | |
| responses: | |
| 200: | |
| description: NemAsyncTimerVisitor objects | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| properties: | |
| data: | |
| type: array | |
| items: | |
| $ref: "#/components/schemas/NemAsyncTimerVisitor" | |
| components: | |
| schemas: | |
| # 9.1 | |
| AccountHistoricalDataViewModel: | |
| type: object | |
| description: > | |
| Nodes can support a feature for retrieving historical data of accounts. | |
| If a node supports this feature, it will return an array of AccountHistoricalDataViewModel objects. | |
| properties: | |
| height: | |
| type: integer | |
| description: The height for which the data is valid. | |
| example: 8976 | |
| address: | |
| type: string | |
| description: The address of the account. | |
| example: NALICELGU3IVY4DPJKHYLSSVYFFWYS5QPLYEZDJJ | |
| balance: | |
| type: integer | |
| description: The balance of the account. | |
| example: 509676000000 | |
| vestedBalance: | |
| type: integer | |
| description: The vested part of the balance. | |
| example: 100999147150 | |
| unvestedBalance: | |
| type: integer | |
| description: The unvested part of the balance. | |
| example: 408676852850 | |
| importance: | |
| type: number | |
| description: The importance of the account. | |
| example: 0.00008857563463531297 | |
| pageRank: | |
| type: number | |
| description: The page rank part of the importance. | |
| example: 0.0007605047835049349 | |
| # 9.2 | |
| AccountImportanceViewModel: | |
| type: object | |
| description: > | |
| Each account is assigned an importance in the NEM network. | |
| The ability of an account to generate new blocks is proportional to its importance. | |
| The importance is a number between 0 and 1. | |
| required: | |
| - address | |
| properties: | |
| address: | |
| type: string | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| importance: | |
| type: object | |
| description: Substructure that describes the importance of the account. | |
| required: | |
| - isSet | |
| properties: | |
| isSet: | |
| type: integer | |
| enum: | |
| - 1 | |
| - 0 | |
| example: 1 | |
| description: > | |
| Indicates if the fields "score", "ev" and "height" are available.isSet can have the values 0 or 1. | |
| In case isSet is 0 the fields are not available. | |
| score: | |
| type: number | |
| example: 0.0011561555164258449 | |
| description: The importance of the account. The importance ranges between 0 and 1. | |
| ev: | |
| type: number | |
| example: 0.004367936531009263 | |
| description: The page rank portion of the importance. The page rank ranges between 0 and 1. | |
| height: | |
| type: integer | |
| example: 38413 | |
| description: The height at which the importance calculation was performed. | |
| # 9.3 | |
| AccountInfo: | |
| type: object | |
| properties: | |
| address: | |
| type: string | |
| description: The address of the account. | |
| example: TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS | |
| balance: | |
| type: integer | |
| description: The balance of the account in micro NEM. | |
| example: 124446551689680 | |
| vestedBalance: | |
| type: integer | |
| description: The vested part of the balance of the account in micro NEM. | |
| example: 1041345514976241 | |
| importance: | |
| type: number | |
| description: The importance of the account. | |
| example: 0.010263666447108395 | |
| publicKey: | |
| type: string | |
| description: The public key of the account. | |
| example: a11a1a6c17a24252e674d151713cdf51991ad101751e4af02a20c61b59f1fe1a | |
| label: | |
| type: string | |
| description: The label of the account (not used, always null). | |
| example: null | |
| harvestedBlocks: | |
| type: integer | |
| description: The number blocks that the account already harvested. | |
| multisigInfo: | |
| type: string | |
| description: TODO | |
| # 9.4 | |
| AccountMetaData: | |
| properties: | |
| status: | |
| type: string | |
| enum: | |
| - UNKNOWN | |
| - LOCKED | |
| - UNLOCKED | |
| description: > | |
| The harvesting status of a queried account. | |
| The harvesting status can be one of the following values: | |
| * `UNKNOWN` - The harvesting status of the account is not known. | |
| * `LOCKED` - The account is not harvesting. | |
| * `UNLOCKED` - The account is harvesting. | |
| example: LOCKED | |
| remoteStatus: | |
| type: string | |
| enum: | |
| - REMOTE | |
| - ACTIVATING | |
| - ACTIVE | |
| - DEACTIVATING | |
| - INACTIVE | |
| description: > | |
| The status of remote harvesting of a queried account. | |
| The remote harvesting status can be one of the following values: | |
| * `REMOTE` - The account is a remote account and therefore remoteStatus is not applicable for it. | |
| * `ACTIVATING` - The account has activated remote harvesting but it is not yet active. | |
| * `ACTIVE` - The account has activated remote harvesting and remote harvesting is active. | |
| * `DEACTIVATING` - The account has deactivated remote harvesting but remote harvesting is still active. | |
| * `INACTIVE` - The account has inactive remote harvesting, or it has deactivated remote harvesting and deactivation is operational. | |
| cosignatoryOf: | |
| type: Array | |
| description: > | |
| JSON array of AccountInfo structures. The account is cosignatory for each of the accounts in the array. | |
| items: | |
| $ref: "#/components/schemas/AccountInfo" | |
| example: [] | |
| cosignatories: | |
| type: Array | |
| description: > | |
| JSON array of AccountInfo structures. The array holds all accounts that are a cosignatory for this account. | |
| items: | |
| $ref: "#/components/schemas/AccountInfo" | |
| example: [] | |
| # 9.5 | |
| AccountMetaDataPair: | |
| type: object | |
| required: | |
| - account | |
| - meta | |
| properties: | |
| account: | |
| $ref: "#/components/schemas/AccountInfo" | |
| meta: | |
| $ref: "#/components/schemas/AccountMetaData" | |
| # 9.6 | |
| AccountPrivateKeyTransactionsPage: | |
| type: object | |
| description: > | |
| The account private key transactions page contains data that NIS needs to retrieve a set of transactions from the database. | |
| The data includes the private key of the account for which transactions are retrieved. | |
| Use requests that use this structure only when NIS is running locally. | |
| The fields "hash" and "id" are optional. | |
| required: | |
| - value | |
| properties: | |
| value: | |
| type: string | |
| example: 68e4f79f886927de698df4f857de2aada41ccca6617e56bb0d61623b35b08cc0 | |
| description: The private key as hexadecimal string. | |
| hash: | |
| type: string | |
| example: 44e4968e5aa35fe182d4def5958e23cf941c4bf809364afb4431ebbf6a18c039 | |
| description: The optional hash value. | |
| id: | |
| type: string | |
| example: 12345 | |
| description: The optional transaction id. | |
| # 9.7 | |
| ApplicationMetaData: | |
| type: object | |
| description: The application meta data object supplies additional information about the application running on a node. | |
| properties: | |
| currentTime: | |
| type: integer | |
| example: 9189086 | |
| description: > | |
| The current network time, i.e. the number of seconds that have elapsed since the creation of the nemesis block. | |
| application: | |
| type: string | |
| example: NEM Infrastructure Server | |
| description: The name of the application running on the node. | |
| startTime: | |
| type: integer | |
| example: 9060202 | |
| description: The network time when the application was started. | |
| version: | |
| type: string | |
| example: 0.4.30-BETA | |
| description: The application version. | |
| signer: | |
| type: string | |
| example: 9189086 | |
| description: CN=NEM Community,OU=Development Team,O=NEM,L=Internet,ST=web,C=WD | |
| # 9.8 | |
| AuditCollection: | |
| type: object | |
| description: | | |
| An audit collection consists of two arrays, containing information about incoming requests from other nodes. | |
| The first array contains information about outstanding (i.e. not yet processed requests) | |
| and the second array contains information about the most recent requests. | |
| The audit collection is for debug purposes. | |
| properties: | |
| outstanding: | |
| type: array | |
| items: | |
| type: object | |
| required: | |
| - path | |
| - start-time | |
| - host | |
| - elapsed-time | |
| - id | |
| properties: | |
| path: | |
| type: string | |
| description: The relative URL path. | |
| example: /chain/score | |
| start-time: | |
| type: integer | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| example: 9020618 | |
| host: | |
| type: string | |
| description: The host which initiated the request. | |
| example: 86.124.91.183 | |
| elapsed-time: | |
| type: integer | |
| description: The time in seconds that has elapsed since the request was received. | |
| example: 5 | |
| id: | |
| type: integer | |
| description: The unique id of the request. | |
| example: 797725 | |
| most-recent: | |
| type: array | |
| items: | |
| type: object | |
| required: | |
| - path | |
| - start-time | |
| - host | |
| - elapsed-time | |
| - id | |
| properties: | |
| path: | |
| type: string | |
| description: The relative URL path. | |
| example: /push/transaction | |
| start-time: | |
| type: integer | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| example: 9020621 | |
| host: | |
| type: string | |
| description: The host which initiated the request. | |
| example: hachi.nem.ninja | |
| elapsed-time: | |
| type: integer | |
| description: The time in seconds that has elapsed since the request was received. | |
| example: 2 | |
| id: | |
| type: integer | |
| description: The unique id of the request. | |
| example: 797750 | |
| # 9.9 | |
| Block: | |
| type: object | |
| description: | | |
| A block is the structure that contains the transaction information. | |
| A block can contain up to 120 transactions. | |
| Blocks are generated and signed by accounts and are the instrument by which information is spread in the network. | |
| properties: | |
| timeStamp: | |
| type: integer | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| example: 9022656 | |
| signature: | |
| type: | |
| description: | | |
| The signature of the block. | |
| The signature was generated by the signer and can be used to validate that the block data was not modified by a node. | |
| example: | |
| prevBlockHash: | |
| type: object | |
| properties: | |
| data: | |
| type: string | |
| description: The sha3-256 hash of the last block as hex-string. | |
| example: 0a3d6bea020bb1a503364c37d57392342f368389bb23b05799c54d536d94749b | |
| type: | |
| type: integer | |
| enum: | |
| - -1 | |
| - 1 | |
| description: | | |
| The block type. There are currently two block types used: | |
| * `-1` - Only the nemesis block has this type. | |
| * `1` - Regular block type. | |
| example: 1 | |
| transactions: | |
| type: array | |
| description: The array of transaction structures. | |
| items: | |
| $ref: '#/components/schemas/Transaction' | |
| example: [] | |
| version: | |
| type: integer | |
| description: | | |
| The block version. The following versions are supported. | |
| * 0x68 << 24 + 1 (1744830465 as 4 byte integer): the main network version | |
| * 0x60 << 24 + 1 (1610612737 as 4 byte integer): the mijin network version | |
| * 0x98 << 24 + 1 (-1744830463 as 4 byte integer): the test network version | |
| example: 1744830465 | |
| signer: | |
| type: string | |
| description: The public key of the harvester of the block as hexadecimal number. | |
| example: The public key of the harvester of the block as hexadecimal number. | |
| height: | |
| type: integer | |
| description: The height of the block. Each block has a unique height. Subsequent blocks differ in height by 1. | |
| example: 39324 | |
| # 9.10 | |
| BlockChainScore: | |
| type: object | |
| description: The block chain score is a measure how good the block chain is. The higher the score, the better the block chain is. | |
| required: | |
| - score | |
| properties: | |
| score: | |
| type: string | |
| description: The score is an integer greater or equal to zero. It is submitted in hexadecimal format. | |
| example: 17a3077c927d9a7e | |
| # 9.11 | |
| BlockHeight: | |
| type: object | |
| description: > | |
| The block height describes the position of the block within the block chain. | |
| The first block of the chain has height one. | |
| Each subsequent block has a height which is one higher than the previous block. | |
| required: | |
| - height | |
| properties: | |
| height: | |
| type: integer | |
| description: The height is an integer greater than zero. | |
| example: 2649 | |
| # 9.12 | |
| BootNodeRequest: | |
| type: object | |
| description: | | |
| The BootNodeRequest JSNON object is used to transfer the relevant data for booting a local node to NIS. | |
| With the boot data NIS can create the local node object and connect to the network. | |
| required: | |
| - metaData | |
| - endpoint | |
| - identity | |
| properties: | |
| metaData: | |
| type: object | |
| description: Denotes the beginning of the metaData substructure. | |
| properties: | |
| application: | |
| type: string | |
| description: The application name. | |
| example: NIS | |
| endpoint: | |
| type: object | |
| description: Denotes the beginning of the endpoint substructure. | |
| properties: | |
| protocol: | |
| type: string | |
| description: The protocol to use (only HTTP supported as for now). | |
| example: http | |
| port: | |
| type: integer | |
| description: The port to use. | |
| example: 7890 | |
| host: | |
| type: string | |
| description: The IP address to use. | |
| example: localhost | |
| identity: | |
| type: object | |
| description: Denotes the fof the identity substructure. | |
| properties: | |
| private-key: | |
| type: string | |
| description: The private key used for creating the identity. | |
| example: a6cbd01d04edecfaef51df9486c111abb6299c764a00206eb1d01f4587491b3f | |
| name: | |
| type: string | |
| description: The name of the node (can be anything). | |
| example: Alice | |
| # 9.13 | |
| CommunicationTimeStamps: | |
| type: object | |
| description: > | |
| Communication timestamps contain information about the network time of a remote NIS. | |
| NEM uses a time synchronization mechanism to synchronize time across the network. | |
| Each node maintains a network time which is the time of the computer clock plus an offset | |
| which compensates for the deviation from the computer clocks of other nodes. | |
| required: | |
| - sendTimeStamp | |
| - receiveTimeStamp | |
| properties: | |
| sendTimeStamp: | |
| type: integer | |
| description: The network time at the moment the reply was sent. | |
| example: 9145477789 | |
| receiveTimeStamp: | |
| type: integer | |
| description: The network time at the moment the request was received. | |
| example: 9145477789 | |
| # 9.14 | |
| ExplorerBlockViewModel: | |
| type: object | |
| description: > | |
| The following structure is used by the NEM block chain explorer for convenience reason. | |
| The data is similar but not identical to that of a Block. | |
| required: | |
| - data | |
| properties: | |
| data: | |
| type: object | |
| required: | |
| - txes | |
| - block | |
| - hash | |
| - difficulty | |
| properties: | |
| txes: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/ExplorerTransferViewModel' | |
| block: | |
| $ref: '#/components/schemas/Block' | |
| hash: | |
| type: string | |
| description: The hash of the block as hexadecimal string. | |
| example: a6f62c62eedf4fafe6991e5cf31eae440963577c919f4eae86b4db8f8e572dce | |
| difficulty: | |
| type: integer | |
| description: The block difficulty. | |
| example: 23456345897 | |
| # 9.15 | |
| ExplorerTransferViewModel: | |
| type: object | |
| description: > | |
| The following structure is used by the NEM block chain explorer for convenience reason. | |
| The data is similar but not identical to that of a Transaction structure. | |
| required: | |
| - tx | |
| - hash | |
| - innerHash | |
| properties: | |
| tx: | |
| $ref: '#/components/schemas/Transaction' | |
| hash: | |
| type: string | |
| description: The hash of the transaction. | |
| example: 5cba4614e52af19417fb53c4bdf442a57b9f558aee17ece530a5220da55cf47d | |
| innerHash: | |
| type: string | |
| description: The hash of the inner transaction. This entry is only available for multisig transactions | |
| example: ae3b107f1216e1ccf12b6f3c3c555bc1d95311747338ce66f539ea2c18c0aa57 | |
| # 9.16 | |
| ExtendedNodeExperiencePair: | |
| type: object | |
| description: >- | |
| When exchanging data with other nodes the result of the communication is divided into three different outcomes: success, neutral and failure. | |
| In the cases of success and failure the result is saved to be able to judge the quality of a node. | |
| This has influence on the probability that a certain node is selected as partner. | |
| required: | |
| - node | |
| - syncs | |
| - experience | |
| properties: | |
| node: | |
| $ref: '#/components/schemas/Node' | |
| syncs: | |
| type: integer | |
| description: The number of synchronization attempts the node had with the remote node. | |
| example: 822 | |
| experience: | |
| type: object | |
| required: | |
| - s | |
| - f | |
| properties: | |
| s: | |
| type: integer | |
| description: The number of successful communications with the remote node. | |
| example: 357 | |
| f: | |
| type: integer | |
| description: The number of failed communications with the remote node. | |
| example: 0 | |
| # 9.17 | |
| HarvestInfo: | |
| type: object | |
| description: > | |
| A HarvestInfo object contains information about a block that an account harvested. | |
| properties: | |
| timeStamp: | |
| type: integer | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| example: 8963798 | |
| id: | |
| type: integer | |
| description: The database id for the harvested block. | |
| example: 254378 | |
| difficulty: | |
| type: integer | |
| description: > | |
| The block difficulty. The initial difficulty was set to 100000000000000. | |
| The block difficulty is always between one tenth and ten times the initial difficulty. | |
| example: 46534789865332 | |
| totalFee: | |
| type: integer | |
| description: The total fee collected by harvesting the block. | |
| example: 2041299054 | |
| height: | |
| type: integer | |
| description: The height of the harvested block. | |
| example: 38453 | |
| # 9.18 | |
| KeyPairViewModel: | |
| type: object | |
| description: | | |
| A KeyPairViewModel object contains information about a new account. | |
| Information includes the private key, the public key and the address | |
| required: | |
| - privateKey | |
| - publicKey | |
| - address | |
| properties: | |
| privateKey: | |
| type: string | |
| description: The private key of the account as hexadeciaml string. | |
| example: 0962c6505d02123c40e858ff8ef21e2b7b5466be12c4770e3bf557aae828390f | |
| publicKey: | |
| type: string | |
| description: The public key of the account as hexadeciaml string. | |
| example: c2e19751291d01140e62ece9ee3923120766c6302e1099b04014fe1009bc89d3 | |
| address: | |
| type: string | |
| description: The address of the account. | |
| example: c2e19751291d01140e62ece9ee3923120766c6302e1099b04014fe1009bc89d3 | |
| # 9.19 | |
| Transaction: | |
| oneOf: | |
| - $ref: '#/components/schemas/ImportanceTransferTransaction' | |
| - $ref: '#/components/schemas/MosaicDefinitionCreationTransaction' | |
| - $ref: '#/components/schemas/MosaicSupplyChangeTransaction' | |
| - $ref: '#/components/schemas/MultisigAggregateModificationTransaction' | |
| - $ref: '#/components/schemas/MultisigSignatureTransaction' | |
| - $ref: '#/components/schemas/MultisigTransaction' | |
| - $ref: '#/components/schemas/ProvisionNamespaceTransaction' | |
| - $ref: '#/components/schemas/TransferTransaction' | |
| # 9.19 -1 | |
| TransactionBase: | |
| type: object | |
| properties: | |
| timeStamp: | |
| type: integer | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| example: 9111526 | |
| signature: | |
| type: string | |
| description: The transaction signature (missing if part of a multisig transaction). | |
| example: 651a19ccd09c1e0f8b25f6a0aac5825b0a20f158ca4e0d78f2abd904a3966b6e3599a47b9ff199a3a6e1152231116fa4639fec684a56909c22cbf6db66613901 | |
| fee: | |
| type: integer | |
| description: > | |
| The fee for the transaction. The higher the fee, the higher the priority of the transaction. | |
| Transactions with high priority get included in a block before transactions with lower priority. | |
| example: 150000 | |
| type: | |
| type: integer | |
| description: The transaction type. | |
| example: 2049 | |
| deadline: | |
| type: integer | |
| description: > | |
| The deadline of the transaction. | |
| The deadline is given as the number of seconds elapsed since the creation of the nemesis block. | |
| If a transaction does not get included in a block before the deadline is reached, it is deleted. | |
| example: 9154726 | |
| version: | |
| type: integer | |
| description: The version of the structure. | |
| example: 1744830465 | |
| signer: | |
| type: string | |
| description: The public key of the account that created the transaction. | |
| example: a1aaca6c17a24252e674d155713cdf55996ad00175be4af02a20c67b59f9fe8a | |
| # 9.19.1 | |
| ImportanceTransferTransaction: | |
| description: | | |
| NIS has the ability to transfer the importance of one account to another account for harvesting. | |
| The account receiving the importance is called the remote account. | |
| Importance transfer transactions are part of the secure harvesting feature of NEM. | |
| Once an importance transaction has been included in a block it needs 6 hours to become active. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| mode: | |
| type: integer | |
| enum: | |
| - 1 | |
| - 2 | |
| description: > | |
| The mode. Possible values are: | |
| * `1` - Activate remote harvesting. | |
| * `2` - Deactivate remote harvesting. | |
| example: 1 | |
| remoteAccount: | |
| type: string | |
| description: The public key of the receiving account as hexadecimal string. | |
| example: cc6c9485d15b992501e57fe3799487e99de272f79c5442de94eeb998b45e0144 | |
| # 9.19.2 | |
| MosaicDefinitionCreationTransaction: | |
| description: | | |
| Before a mosaic can be created or transferred, a corresponding definition of the mosaic has to be created and published to the network. | |
| This is done via a mosaic definition creation transaction. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| creationFee: | |
| type: integer | |
| description: The fee for the creation of the mosaic. | |
| example: 10000000 | |
| creationFeeSink: | |
| type: string | |
| description: The public key of the account to which the creation fee is tranferred. | |
| example: 53e140b5947f104cabc2d6fe8baedbc30ef9a0609c717d9613de593ec2a266d3 | |
| mosaicDefinition: | |
| $ref: '#/components/schemas/MosaicDefinition' | |
| # 9.19.3 | |
| MosaicSupplyChangeTransaction: | |
| description: | | |
| Before a mosaic can be created or transferred, a corresponding definition of the mosaic has to be created and published to the network. | |
| This is done via a mosaic definition creation transaction. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| supplyType: | |
| type: integer | |
| description: > | |
| The supply type. Supported supply types are: | |
| * `1` - Increase in supply. | |
| * `2` - Decrease in supply. | |
| example: 1 | |
| delta: | |
| type: integer | |
| description: The supply change in units for the mosaic. | |
| example: 123 | |
| mosaicId: | |
| $ref: '#/components/schemas/MosaicId' | |
| # 9.19.4 | |
| MultisigAggregateModificationTransaction: | |
| description: > | |
| Multisig aggregate modification transactions are part of the NEM's multisig account system. | |
| A multisig aggregate modification transaction holds an array of multisig cosignatory modifications and a single multisig minimum cosignatories modification inside the transaction. | |
| A multisig aggregate modification transaction can be wrapped by a multisig transaction. | |
| Aggregate modification transactions that use the minCosignatories field need to have version | |
| * 0x68000002 (decimal 1744830466) for mainnet | |
| * 0x98000002 (decimal -1744830462) for testnet | |
| * 0x60000002 (decimal 1610612738) for mijin network | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| modifications: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/MultisigCosignatoryModification' | |
| description: The JSON array of multisig modifications. | |
| example: 1 | |
| minCosignatories: | |
| type: object | |
| description: JSON object that holds the minimum cosignatories modification. | |
| properties: | |
| relativeChange: | |
| type: integer | |
| description: Value indicating the relative change of the minimum cosignatories. | |
| example: 2 | |
| # 9.19.5 | |
| MultisigCosignatoryModification: | |
| type: object | |
| description: > | |
| Multisig cosignatory modifications are part of the NEM's multisig account system. | |
| With a multisig cosignatory modification a cosignatory is added to or deleted from a multisig account. | |
| Multisig cosignatory modifications are part of a multisig aggregate modification transactions, see details there. | |
| properties: | |
| modificationType: | |
| type: integer | |
| enum: | |
| - 1 | |
| - 2 | |
| description: > | |
| The type of modification. Possible values are: | |
| * `1` - Add a new cosignatory. | |
| * `2` - Delete an existing cosignatory. | |
| example: 1 | |
| cosignatoryAccount: | |
| type: string | |
| description: The public key of the cosignatory account as hexadecimal string | |
| example: 213150649f51d6e9113316cbec5bf752ef7968c1e823a28f19821e91daf848be | |
| # 9.19.6 | |
| MultisigSignatureTransaction: | |
| description: | | |
| Multisig signature transactions are part of the NEM's multisig account system. | |
| Multisig signature transactions are included in the corresponding multisig transaction and | |
| are the way a cosignatory of a multisig account can sign a multisig transaction for that account. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| otherHash: | |
| type: object | |
| description: The hash of the inner transaction of the corresponding multisig transaction. | |
| properties: | |
| data: | |
| type: string | |
| example: 44e4968e5aa35fe182d4def5958e23cf941c4bf809364afb4431ebbf6a18c039 | |
| otherAccount: | |
| type: string | |
| description: The address of the corresponding multisig account. | |
| example: TDGIMREMR5NSRFUOMPI5OOHLDATCABNPC5ID2SVA | |
| # 9.19.7 | |
| MultisigTransaction: | |
| description: | | |
| Multisig transaction are the only way to make transaction from a multisig account to another account. | |
| A multisig transaction carries another transaction inside (often referred to as "inner" transaction). | |
| The inner transaction can be a transfer, an importance transfer or an aggregate modification transaction. | |
| A multisig transaction also has multisig signature transactions from the cosignatories of the multisig account inside. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| otherTrans: | |
| $ref: '#/components/schemas/Transaction' | |
| signatures: | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/MultisigSignatureTransaction' | |
| # 9.19.8 | |
| ProvisionNamespaceTransaction: | |
| description: > | |
| Accounts can rent a namespace for one year and after a year renew the contract. | |
| This is done via a ProvisionNamespaceTransaction. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| rentalFeeSink: | |
| type: string | |
| description: The public key of the account to which the rental fee is transferred. | |
| example: 3e82e1c1e4a75adaa3cba8c101c3cd31d9817a2eb966eb3b511fb2ed45b8e262 | |
| rentalFee: | |
| type: integer | |
| description: The fee for renting the namespace. | |
| example: 10000000 | |
| newPart: | |
| type: string | |
| description: The new part which is concatenated to the parent with a '.' as separator. | |
| example: voucher | |
| parent: | |
| type: string | |
| description: The parent namespace. This can be null if the transaction rents a root namespace. | |
| example: alice | |
| # 9.19.9 | |
| TransferTransaction: | |
| description: | | |
| Transfer transactions contain data about transfers of XEM or mosaics to another account. | |
| There are two version of transfer transactions, version 1 and version 2. | |
| Version 1 transfer transaction are only capable of transferring XEM and a message | |
| while version 2 transfer transactions additionally can transfer a set of mosaics. | |
| allOf: | |
| - $ref: '#/components/schemas/TransactionBase' | |
| - type: object | |
| properties: | |
| amount: | |
| type: integer | |
| description: The amount of micro NEM that is transferred from sender to recipient. | |
| example: 123000000 | |
| recipient: | |
| type: string | |
| description: The address of the recipient. | |
| example: TBEH27FNRS43FNH3PXE4XN3H7HXA37H77APSZW46 | |
| message: | |
| type: object | |
| description: > | |
| Optionally a transaction can contain a message. | |
| In this case the transaction contains a message substructure. | |
| If not the field is null. | |
| propertis: | |
| payload: | |
| type: string | |
| description: > | |
| Optional field in case the transaction contains a message. | |
| The payload is the actual (possibly encrypted) message data. | |
| example: 74657374207472616e73616374696f6e | |
| type: | |
| type: integer | |
| description: > | |
| Optional field in case the transaction contains a message. | |
| The field holds the message type information. Possible message types are: | |
| * `1` - The message is not encrypted. | |
| * `2` - The message is encrypted. | |
| example: 1 | |
| mosaics: | |
| type: array | |
| description: > | |
| The array of Mosaic objects. | |
| items: | |
| $ref: '#/components/schemas/Mosaic' | |
| # 9.20 | |
| Mosaic: | |
| type: object | |
| description: > | |
| A mosaic describes an instance of a mosaic definition. Mosaics can be transferred by means of a transfer transaction. | |
| properties: | |
| mosaicId: | |
| $ref: "#/components/schemas/MosaicId" | |
| quantity: | |
| type: integer | |
| description: > | |
| The mosaic quantity. | |
| The quantity is always given in smallest units for the mosaic, | |
| i.e. if it has a divisibility of 3 the quantity is given in millis. | |
| example: 123000 | |
| # 9.21 | |
| MosaicDefinition: | |
| type: object | |
| description: > | |
| A mosaic definition describes an asset class. | |
| Some fields are mandatory while others are optional. | |
| The properties of a mosaic definition always have a default value and only need to be supplied if they differ from the default value. | |
| properties: | |
| creator: | |
| type: string | |
| description: The public key of the mosaic definition creator. | |
| example: 10cfe522fe23c015b8ab24ef6a0c32c5de78eb55b2152ed07b6a092121187100 | |
| id: | |
| $ref: "#/components/schemas/MosaicId" | |
| description: | |
| type: string | |
| description: The mosaic description. The description may have a length of up to 512 characters and cannot be empty. | |
| example: A healthy drink with lots of vitamins | |
| properties: | |
| $ref: "#/components/schemas/MosaicProperties" | |
| levy: | |
| $ref: "#/components/schemas/MosaicLevy" | |
| # 9.22 | |
| MosaicDefinitionMetaDataPair: | |
| type: object | |
| description: | | |
| A mosaic definition consists of a database id and a mosaic definition object. | |
| The id is needed for requests that support paging. | |
| properties: | |
| meta: | |
| type: object | |
| description: The label for the meta data object. | |
| properties: | |
| id: | |
| type: integer | |
| description: The id for the mosaic definition object. | |
| example: 3541 | |
| mosaic: | |
| $ref: "#/components/schemas/Mosaic" | |
| # 9.23 | |
| MosaicProperties: | |
| type: object | |
| description: |- | |
| Each mosaic definition comes with a set of properties. | |
| Each property has a default value which will be applied in case it was not specified. | |
| Future release may add additional properties to the set of available properties. | |
| The available properties and their default values are: | |
| * `divisibility` | |
| defines the smallest sub-unit that a mosaic can be divided into. | |
| A divisibility of 0 means that only entire units can be transferred while a divisibility of 3 means the mosaic can be transferred in milli-units. | |
| * `initialSupply` | |
| defines how many units of the mosaic are initially created. | |
| These mosaics are credited to the creator of the mosaic. | |
| The initial supply has an upper limit of 9,000,000,000 units. | |
| * `supplyMutable` | |
| determines whether or not the supply can be changed by the creator at a later point using a MosaicSupplyChangeTransaction. | |
| Possible values are "true" and "false", | |
| the former meaning the supply can be changed and the latter that the supply is fixed for all times. | |
| * `transferable` | |
| determines whether or not the a mosaic can be transferred to a user other than the creator. | |
| In certain scenarios it is not wanted that user are able to trade the mosaic | |
| (for example when the mosaic represents bonus points which the company does not want to be tranferable to other users). | |
| Possible values are "true" and "false", the former meaning the mosaic can be arbitrarily transferred among users and the latter meaning the mosaic can only be transferred to and from the creator. | |
| required: | |
| - name | |
| - value | |
| properties: | |
| name: | |
| type: string | |
| description: The name of the mosaic property. | |
| enum: | |
| - divisibility | |
| - initialSupply | |
| - supplyMutable | |
| - transferable | |
| value: | |
| type: string | |
| description: The value of the mosaic property. | |
| # 9.24 | |
| MosaicLevy: | |
| type: object | |
| description: > | |
| A mosaic definition can optionally specify a levy for transferring those mosaics. | |
| This might be needed by legal entities needing to collect some taxes for transfers. | |
| properties: | |
| type: | |
| type: integer | |
| enum: | |
| - 1 | |
| - 2 | |
| description: > | |
| The levy type. The following types are supported: | |
| * `1` - The levy is an absolute fee. | |
| The field 'fee' states how many sub-units of the specified mosaic will be transferred to the recipient. | |
| * `2` - The levy is calculated from the transferred amount. | |
| The field 'fee' states how many percentiles of the transferred quantity will transferred to the recipient. | |
| example: 1 | |
| recipient: | |
| type: string | |
| description: The recipient of the levy. | |
| example: TD3RXTHBLK6J3UD2BH2PXSOFLPWZOTR34WCG4HXH | |
| mosaicId: | |
| $ref: "#/components/schemas/MosaicId" | |
| fee: | |
| type: integer | |
| description: The mosaic in which the levy is paid. | |
| example: 1000 | |
| # 9.25 | |
| MosaicId: | |
| type: object | |
| description: > | |
| A mosaic id uniquely identifies an underlying mosaic definition. | |
| properties: | |
| namespaceId: | |
| type: string | |
| description: The corresponding namespace id. See the description of the structure Namespace. for details. | |
| example: alice.drinks | |
| name: | |
| type: string | |
| description: The name of the mosaic definition. | |
| example: orange juice | |
| # 9.26 | |
| Namespace: | |
| type: object | |
| description: | | |
| A namespace is the NEM version of a domain. | |
| You can rent a namespace for the duration of a year by paying a fee. | |
| The naming of the parts of a namespace has certain restrictions, see the corresponding chapter on namespaces. | |
| properties: | |
| fqn: | |
| type: string | |
| description: The fully qualified name of the namespace, also named namespace id. | |
| example: makoto.metal.coins | |
| owner: | |
| type: string | |
| description: The owner address of the namespace. | |
| example: TD3RXTHBLK6J3UD2BH2PXSOFLPWZOTR34WCG4HXH | |
| height: | |
| type: integer | |
| description: The height at which the ownership begins. | |
| example: 13465 | |
| # 9.27 | |
| NamespaceMetaDataPair: | |
| type: object | |
| description: | | |
| A namespace consists of a namespace object and a database id. the id is needed for requests that support paging. | |
| required: | |
| - meta | |
| - namespace | |
| properties: | |
| meta: | |
| type: object | |
| description: The label for the meta data object. | |
| properties: | |
| id: | |
| type: integer | |
| description: The database id for the namespace object. | |
| example: 26264 | |
| namespace: | |
| $ref: "#/components/schemas/Namespace" | |
| # 9.28 | |
| NemAnnounceResult: | |
| type: object | |
| description: | | |
| The NemAnnounceResult extends the NemRequestResult by supplying the additional fields 'transactionHash' | |
| and in case of a multisig transaction 'innerTransactionHash'. | |
| allOf: | |
| - $ref: '#/components/schemas/NemRequestResult' | |
| - type: object | |
| required: | |
| - transactionHash | |
| properties: | |
| transactionHash: | |
| type: object | |
| description: The JSON hash object of the transaction. | |
| required: | |
| - data | |
| properties: | |
| data: | |
| type: string | |
| example: c1786437336da077cd572a27710c40c378610e8d33880bcb7bdb0a42e3d35586 | |
| innerTransactionHash: | |
| type: object | |
| description: | | |
| The JSON hash object of the inner transaction or null if the transaction is not a multisig transaction. | |
| required: | |
| - data | |
| properties: | |
| data: | |
| type: string | |
| example: 44e4968e5aa35fe182d4def5958e23cf941c4bf809364afb4431ebbf6a18c039 | |
| # 9.29 | |
| NemAsyncTimerVisitor: | |
| type: object | |
| description: | | |
| NIS uses timers to schedule periodic tasks. | |
| Those tasks are monitored and their result is memorized. | |
| The NemAsyncTimeVisitor structure holds the information. | |
| required: | |
| - last-delay-time | |
| - executions | |
| - failures | |
| - successes | |
| - last-operation-start-time | |
| - is-executing | |
| - name | |
| - average-operation-time | |
| - last-operation-time | |
| properties: | |
| last-delay-time: | |
| type: integer | |
| example: 3000 | |
| description: The number of milliseconds since the last execution of the timer. | |
| executions: | |
| type: integer | |
| example: 1024 | |
| description: The number of times the task was executed. | |
| failures: | |
| type: integer | |
| example: 0 | |
| description: The number times the task failed. | |
| successes: | |
| type: integer | |
| example: 1024 | |
| description: The number times the task was successful. | |
| last-operation-start-time: | |
| type: integer | |
| example: 9317695 | |
| description: The time at which the task started last time. | |
| is-executing: | |
| type: integer | |
| example: 0 | |
| description: True if the task is executing, false otherwise. | |
| name: | |
| type: string | |
| example: FORAGING | |
| description: The name of the task. | |
| average-operation-time: | |
| type: integer | |
| example: 0 | |
| description: The number of seconds the task needed on average. | |
| last-operation-time: | |
| type: integer | |
| example: 0 | |
| description: The number of seconds the task needed the last time. | |
| # 9.30 | |
| NemRequestResult: | |
| type: object | |
| description: | | |
| Some requests such as announcing a new transaction return detailed information about the outcome of the request. | |
| In those cases the result of the request is returned in a special JSON object called NemRequestResult. | |
| The structure is typically used for requests that perform validation or return a status. | |
| required: | |
| - type | |
| - code | |
| - message | |
| properties: | |
| type: | |
| type: integer | |
| example: 4 | |
| description: | | |
| The type is dependent on the request which was answered. | |
| The interpretation of the code field depends on the type. Currently the following types are supported: | |
| * `1` - The result is a validation result. | |
| * `2` - The result is a heart beat result. | |
| * `4` - The result indicates a status. | |
| code: | |
| type: integer | |
| example: 6 | |
| description: | | |
| The meaning of the code is dependent on the type. | |
| For type 1 (validation result) only 0 and 1 mean there was no failure. | |
| For a complete list of validation results see Appendix B: NIS Errors The following codes are the most frequent ones occurring: | |
| * `0` - Neutral result. | |
| A typical example would be that a node validates an incoming transaction and realizes that it already knows about the transaction. | |
| In this case it is neither a success (meaning the node has a new transaction) nor a failure (because the transaction itself is valid). | |
| * `1` - Success result. | |
| A typical example would be that a node validates a new valid transaction. | |
| * `2` - Unknown failure. | |
| The validation failed for unknown reasons. | |
| * `3` - The entity that was validated has already past its deadline. | |
| * `4` - The entity used a deadline which lies too far in the future. | |
| * `5` - There was an account involved which had an insufficient balance to perform the operation. | |
| * `6` - The message supplied with the transaction is too large. | |
| * `7` - The hash of the entity which got validated is already in the database. | |
| * `8` - The signature of the entity could not be validated. | |
| * `9` - The entity used a timestamp that lies too far in the past. | |
| * `10` - The entity used a timestamp that lies in the future which is not acceptable. | |
| * `11` - The entity is unusable. | |
| * `12` - The score of the remote block chain is inferior (although a superior score was promised). | |
| * `13` - The remote block chain failed validation. | |
| * `14` - There was a conflicting importance transfer detected. | |
| * `15` - There were too many transaction in the supplied block. | |
| * `16` - The block contains a transaction that was signed by the harvester. | |
| * `17` - A previous importance transaction conflicts with a new transaction. | |
| * `18` - An importance transfer activation was attempted while previous one is active. | |
| * `19` - An importance transfer deactivation was attempted but is not active. | |
| For type 2 the following codes are supported: | |
| * `1` - Successful heart beat detected. | |
| For type 3 the following codes are supported: | |
| * `0` - Unknown status. | |
| * `1` - NIS is stopped. | |
| * `2` - NIS is starting. | |
| * `3` - NIS is running. | |
| * `4` - NIS is booting the local node (implies NIS is running). | |
| * `5` - The local node is booted (implies NIS is running). | |
| * `6` - The local node is synchronized (implies NIS is running and the local node is booted). | |
| * `7` - There is no remote node available (implies NIS is running and the local node is booted). | |
| * `8` - NIS is currently loading the block chain. | |
| message: | |
| type: string | |
| example: ok | |
| # 9.30 - 1 | |
| NemRequestHeartbeatResult: | |
| type: object | |
| description: | | |
| The NemAnnounceResult extends the NemRequestResult by supplying the additional fields 'transactionHash' | |
| and in case of a multisig transaction 'innerTransactionHash'. | |
| allOf: | |
| - $ref: '#/components/schemas/NemRequestResult' | |
| - properties: | |
| type: | |
| type: integer | |
| enum: | |
| - 2 | |
| example: 2 | |
| description: | | |
| `2` - The result is a heart beat result. | |
| code: | |
| type: integer | |
| enum: | |
| - 1 | |
| example: 1 | |
| description: | | |
| * `1` - Successful heart beat detected. | |
| message: | |
| example: ok | |
| # 9.30 - 2 | |
| NemRequestStatusResult: | |
| type: object | |
| description: | | |
| The NemRequestStatusResult extends the NemRequestResult | |
| allOf: | |
| - $ref: '#/components/schemas/NemRequestResult' | |
| - properties: | |
| code: | |
| type: interger | |
| format: int32 | |
| enum: | |
| - 0 | |
| - 1 | |
| - 2 | |
| - 3 | |
| - 4 | |
| - 5 | |
| - 6 | |
| - 7 | |
| - 8 | |
| example: 6 | |
| description: | | |
| * `0` - Unknown status. | |
| * `1` - NIS is stopped. | |
| * `2` - NIS is starting. | |
| * `3` - NIS is running. | |
| * `4` - NIS is booting the local node (implies NIS is running). | |
| * `5` - The local node is booted (implies NIS is running). | |
| * `6` - The local node is synchronized (implies NIS is running and the local node is booted). | |
| * `7` - NIS local node does not see any remote NIS node (implies running and booted). | |
| * `8` - NIS is currently loading the block chain from the database. In this state NIS cannot serve any requests. | |
| type: | |
| type: integer | |
| format: int32 | |
| example: 4 | |
| message: | |
| type: string | |
| example: status | |
| # 9.31 | |
| NisNodeInfo: | |
| type: object | |
| description: > | |
| The NisNodeInfo object provides detailed information about a node. | |
| required: | |
| - node | |
| - nisInfo | |
| properties: | |
| node: | |
| $ref: "#/components/schemas/Node" | |
| nisInfo: | |
| $ref: "#/components/schemas/ApplicationMetaData" | |
| # 9.32 | |
| Node: | |
| type: object | |
| description: > | |
| Nodes are the entities that perform communication in the network like sending and receiving data. | |
| A node has an identity which is tied to an account through which the node can identify itself to the network. | |
| The communication is done through the endpoint of the node. Additionally a node provides meta data information. | |
| properties: | |
| metaData: | |
| type: object | |
| description: Denotes the beginning of the meta data substructure. | |
| properties: | |
| features: | |
| type: integer | |
| description: The number of features the nodes has. | |
| example: 1 | |
| networkId: | |
| type: integer | |
| description: > | |
| The network id. The following network ids are supported: | |
| * `104 (hex 0x68)` - The main network id. | |
| * `96 (hex 0x60)` - The mijin network id. | |
| * `152 (hex 0x98)` - The test network id. (FIXME) | |
| example: -104 | |
| application: | |
| type: string | |
| description: The name of the application that is running the node. | |
| example: NIS | |
| version: | |
| type: string | |
| description: The version of the application. | |
| example: 0.4.30-BETA | |
| platform: | |
| type: string | |
| description: The underlying platform (OS, java version). | |
| example: Oracle Corporation (1.8.0_05) on Windows 8.1 | |
| endpoint: | |
| type: object | |
| descriptoin: Denotes the beginning of the endpoint substructure. | |
| properties: | |
| protocol: | |
| type: string | |
| enum: | |
| - http | |
| - https | |
| description: The protocol used for the communication (HTTP or HTTPS). | |
| example: http | |
| port: | |
| type: integer | |
| description: The port used for the communication. | |
| example: 7890 | |
| host: | |
| type: string | |
| description: The IP address of the endpoint. | |
| example: 85.25.36.97 | |
| identity: | |
| type: object | |
| description: Denotes the beginning of the identity substructure. | |
| properties: | |
| name: | |
| type: string | |
| description: The name of the node. | |
| example: Hi, I am Alice2 | |
| public-key: | |
| type: string | |
| description: The public key used to identify the node. | |
| example: 3302e7703ee9f364c25bbfebb9c12ac91fa9dcd69e09a5d4f3830d71505a2350 | |
| # 9.33 | |
| NodeCollection: | |
| type: object | |
| description: > | |
| A NodeCollection object holds arrays of nodes with different statuses. The following statuses are supported: | |
| properties: | |
| inactive: | |
| type: array | |
| description: Denotes the beginning of the array of inactive nodes. | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| example: [] | |
| active: | |
| type: array | |
| description: Denotes the beginning of the array of active nodes. | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| example: [] | |
| busy: | |
| type: array | |
| description: Denotes the beginning of the array of busy nodes. | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| example: [] | |
| failure: | |
| type: array | |
| description: Denotes the beginning of the array of failure nodes. | |
| items: | |
| $ref: "#/components/schemas/Node" | |
| example: [] | |
| # 9.34 | |
| PrivateKey: | |
| type: object | |
| description: > | |
| A private key is a key to an account. | |
| Anyone having the private key to an account can initiate any account related action. | |
| **Therefore a private key must be kept secret at all costs.** | |
| properties: | |
| value: | |
| type: string | |
| description: The 256 bit value of the private key as hexadecimal string. | |
| example: 68e4f79f886927de698df4f857de2aada41ccca6617e56bb0d61623b35b08cc0 | |
| # 9.35 | |
| RequestAnnounce: | |
| type: object | |
| description: | | |
| A RequestAnnounce object is used to transfer the transaction data and the signature to NIS in order to initiate and broadcast a transaction. | |
| properties: | |
| data: | |
| type: string | |
| description: | | |
| The transaction data as string. | |
| The string is created by first creating the corresponding byte array (see chapter 6.7) | |
| and then converting the byte array to a hexadecimal string. | |
| example: 010100000100000000000000200000002b76078fa709bbe6752222b215abc7ec0152ffe831fb4f9aed3e7749a425900a00093d0000000000000000002800000054444e46555946584f5353334e4e4c4f35465a5348535a49354c33374b4e5149454850554d584c54c0d45407000000000b00000001000000030000000c3215 | |
| signature: | |
| type: string | |
| description: The signature for the transaction as hexadecimal string. | |
| example: db2473513c7f0ce9f8de6345f0fbe773dc687eb571123d08eab4d98f96849eaeb63fa8756fb6c59d9b9d0e551537c1cdad4a564747ff9291db4a88b65c97c10d | |
| # 9.36 | |
| RequestPrepareAnnounce: | |
| type: object | |
| description: | | |
| A RequestPrepareAnnounce object is used to transfer transaction data and a private key to NIS in order to initiate and broadcast a transaction. | |
| required: | |
| - transaction | |
| - privateKey | |
| properties: | |
| transaction: | |
| $ref: "#/components/schemas/Transaction" | |
| privateKey: | |
| type: string | |
| description: The private key which NIS will use to sign the transaction. | |
| example: 68e4f79f886927de698df4f857de2aada41ccca6617e56bb0d61623b35b08cc0 | |
| # 9.37 | |
| TimeSynchronizationResult: | |
| type: object | |
| description: | | |
| A time synchronization result is the outcome of the network time synchronization of a node with other remote nodes. | |
| To agree upon a common time nodes need to synchronize time every hour. | |
| properties: | |
| dateTime: | |
| type: string | |
| pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$' | |
| example: '2014-11-19 19:23:04' | |
| description: The date and time when the synchronization was performed. | |
| currentTimeOffset: | |
| type: integer | |
| example: 1747 | |
| description: The current offset to the local computer clock in milliseconds. | |
| change: | |
| type: integer | |
| example: 36 | |
| description: The change in milliseconds compared to the last synchronization. | |
| # 9.38 | |
| TransactionMetaData: | |
| type: object | |
| required: | |
| - height | |
| - id | |
| - hash | |
| properties: | |
| height: | |
| type: integer | |
| description: The height of the block in which the transaction was included. | |
| example: 40706 | |
| id: | |
| type: integer | |
| description: The id of the transaction. | |
| hash: | |
| type: object | |
| properties: | |
| data: | |
| type: string | |
| description: The transaction hash. | |
| # 9.39 | |
| TransactionMetaDataPair: | |
| type: object | |
| required: | |
| - meta | |
| - transaction | |
| properties: | |
| meta: | |
| $ref: "#/components/schemas/TransactionMetaData" | |
| transaction: | |
| $ref: "#/components/schemas/Transaction" | |
| # 9.40 | |
| UnconfirmedTransactionMetaData: | |
| type: object | |
| description: | | |
| The unconfirmed transaction meta data contains the hash of the inner transaction in case the transaction is a multisig transaction. | |
| This data is need to initiate a multisig signature transaction. | |
| required: | |
| - data | |
| properties: | |
| data: | |
| type: string | |
| example: d7c9e33421e43bf4a5d6e21304c8096c599142755d581bd6e9037f41545a5873 | |
| description: The hash of the inner transaction or null if the transaction is not a multisig transaction. | |
| # 9.41 | |
| UnconfirmedTransactionMetaDataPair: | |
| type: object | |
| description: | | |
| Transactions meta data object contains additional information about the transaction. | |
| required: | |
| - meta | |
| - transaction | |
| properties: | |
| meta: | |
| $ref: "#/components/schemas/UnconfirmedTransactionMetaData" | |
| transaction: | |
| $ref: "#/components/schemas/Transaction" | |
| # 9.42 | |
| ErrorObject: | |
| type: object | |
| description: | | |
| If NIS encounters an error due to either invalid requests or internal problems, it returns a JSON error object. | |
| The interpretation of the error object is dependant on the context. | |
| [See Appendix B: NIS Errors](https://nemproject.github.io/#appendix-B:-NIS-errors) for detailed information about possible errors. | |
| required: | |
| - timeStamp | |
| - error | |
| - message | |
| - status | |
| properties: | |
| timeStamp: | |
| type: integer | |
| example: 9108808 | |
| description: The number of seconds elapsed since the creation of the nemesis block. | |
| error: | |
| type: string | |
| example: Bad Request | |
| description: The general description of the error. | |
| message: | |
| type: string | |
| example: The detailed error message. | |
| description: address must be valid | |
| status: | |
| type: integer | |
| example: 400 | |
| description: The HTTP status. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment