No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit f6c19cc Jun 2, 2018
Permalink
Failed to load latest commit information.
.swagger-codegen 1.0.0 Apr 7, 2018
docs 1.2 Jun 1, 2018
src 1.2 Jun 1, 2018
test 1.2 Jun 1, 2018
.DS_Store 1.1.1 Apr 20, 2018
.swagger-codegen-ignore 1.0.0 Apr 7, 2018
.travis.yml 1.0.0 Apr 7, 2018
README.md 1.2 Jun 1, 2018
git_push.sh 1.0.0 Apr 7, 2018
mocha.opts 1.0.0 Apr 7, 2018
package.json 1.2 Jun 1, 2018

README.md

neblio_rest_api_suite

NeblioRestApiSuite - JavaScript client for neblio_rest_api_suite APIs for Interacting with NTP1 Tokens & The Neblio Blockchain This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.2.0
  • Package version: 1.2.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install neblio_rest_api_suite --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your neblio_rest_api_suite from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('neblio_rest_api_suite') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/neblio_rest_api_suite then install it via:

    npm install YOUR_USERNAME/neblio_rest_api_suite --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var NeblioRestApiSuite = require('neblio_rest_api_suite');

var api = new NeblioRestApiSuite.InsightApi()

var address = "address_example"; // {String} Address


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAddress(address, callback);

Documentation for API Endpoints

All URIs are relative to https://ntp1node.nebl.io

Class Method HTTP request Description
NeblioRestApiSuite.InsightApi getAddress GET /ins/addr/{address} Returns address object
NeblioRestApiSuite.InsightApi getAddressBalance GET /ins/addr/{address}/balance Returns address balance in sats
NeblioRestApiSuite.InsightApi getAddressTotalReceived GET /ins/addr/{address}/totalReceived Returns total received by address in sats
NeblioRestApiSuite.InsightApi getAddressTotalSent GET /ins/addr/{address}/totalSent Returns total sent by address in sats
NeblioRestApiSuite.InsightApi getAddressUnconfirmedBalance GET /ins/addr/{address}/unconfirmedBalance Returns address unconfirmed balance in sats
NeblioRestApiSuite.InsightApi getAddressUtxos GET /ins/addr/{address}/utxo Returns all UTXOs at a given address
NeblioRestApiSuite.InsightApi getBlock GET /ins/block/{blockhash} Returns information regarding a Neblio block
NeblioRestApiSuite.InsightApi getBlockIndex GET /ins/block-index/{blockindex} Returns block hash of block
NeblioRestApiSuite.InsightApi getRawTx GET /ins/rawtx/{txid} Returns raw transaction hex
NeblioRestApiSuite.InsightApi getStatus GET /ins/status Utility API for calling several blockchain node functions
NeblioRestApiSuite.InsightApi getSync GET /ins/sync Get node sync status
NeblioRestApiSuite.InsightApi getTx GET /ins/tx/{txid} Returns transaction object
NeblioRestApiSuite.InsightApi getTxs GET /ins/txs Get transactions by block or address
NeblioRestApiSuite.InsightApi sendTx POST /ins/tx/send Broadcasts a signed raw transaction to the network (not NTP1 specific)
NeblioRestApiSuite.NTP1Api broadcastTx POST /ntp1/broadcast Broadcasts a signed raw transaction to the network
NeblioRestApiSuite.NTP1Api burnToken POST /ntp1/burntoken Builds a transaction that burns an NTP1 Token
NeblioRestApiSuite.NTP1Api getAddressInfo GET /ntp1/addressinfo/{address} Information On a Neblio Address
NeblioRestApiSuite.NTP1Api getTokenHolders GET /ntp1/stakeholders/{tokenid} Get Addresses Holding a Token
NeblioRestApiSuite.NTP1Api getTokenId GET /ntp1/tokenid/{tokensymbol} Returns the tokenId representing a token
NeblioRestApiSuite.NTP1Api getTokenMetadataOfIssuance GET /ntp1/tokenmetadata/{tokenid} Get Issuance Metadata of Token
NeblioRestApiSuite.NTP1Api getTokenMetadataOfUtxo GET /ntp1/tokenmetadata/{tokenid}/{utxo} Get UTXO Metadata of Token
NeblioRestApiSuite.NTP1Api getTransactionInfo GET /ntp1/transactioninfo/{txid} Information On an NTP1 Transaction
NeblioRestApiSuite.NTP1Api issueToken POST /ntp1/issue Builds a transaction that issues a new NTP1 Token
NeblioRestApiSuite.NTP1Api sendToken POST /ntp1/sendtoken Builds a transaction that sends an NTP1 Token
NeblioRestApiSuite.TestnetFaucetApi testnetGetFaucet GET /testnet/faucet Withdraws testnet NEBL to the specified address
NeblioRestApiSuite.TestnetInsightApi testnetGetAddress GET /testnet/ins/addr/{address} Returns address object
NeblioRestApiSuite.TestnetInsightApi testnetGetAddressBalance GET /testnet/ins/addr/{address}/balance Returns address balance in sats
NeblioRestApiSuite.TestnetInsightApi testnetGetAddressTotalReceived GET /testnet/ins/addr/{address}/totalReceived Returns total received by address in sats
NeblioRestApiSuite.TestnetInsightApi testnetGetAddressTotalSent GET /testnet/ins/addr/{address}/totalSent Returns total sent by address in sats
NeblioRestApiSuite.TestnetInsightApi testnetGetAddressUnconfirmedBalance GET /testnet/ins/addr/{address}/unconfirmedBalance Returns address unconfirmed balance in sats
NeblioRestApiSuite.TestnetInsightApi testnetGetAddressUtxos GET /testnet/ins/addr/{address}/utxo Returns all UTXOs at a given address
NeblioRestApiSuite.TestnetInsightApi testnetGetBlock GET /testnet/ins/block/{blockhash} Returns information regarding a Neblio block
NeblioRestApiSuite.TestnetInsightApi testnetGetBlockIndex GET /testnet/ins/block-index/{blockindex} Returns block hash of block
NeblioRestApiSuite.TestnetInsightApi testnetGetRawTx GET /testnet/ins/rawtx/{txid} Returns raw transaction hex
NeblioRestApiSuite.TestnetInsightApi testnetGetStatus GET /testnet/ins/status Utility API for calling several blockchain node functions
NeblioRestApiSuite.TestnetInsightApi testnetGetSync GET /testnet/ins/sync Get node sync status
NeblioRestApiSuite.TestnetInsightApi testnetGetTx GET /testnet/ins/tx/{txid} Returns transaction object
NeblioRestApiSuite.TestnetInsightApi testnetGetTxs GET /testnet/ins/txs Get transactions by block or address
NeblioRestApiSuite.TestnetInsightApi testnetSendTx POST /testnet/ins/tx/send Broadcasts a signed raw transaction to the network (not NTP1 specific)
NeblioRestApiSuite.TestnetNTP1Api testnetBroadcastTx POST /testnet/ntp1/broadcast Broadcasts a signed raw transaction to the network
NeblioRestApiSuite.TestnetNTP1Api testnetBurnToken POST /testnet/ntp1/burntoken Builds a transaction that burns an NTP1 Token
NeblioRestApiSuite.TestnetNTP1Api testnetGetAddressInfo GET /testnet/ntp1/addressinfo/{address} Information On a Neblio Address
NeblioRestApiSuite.TestnetNTP1Api testnetGetTokenHolders GET /testnet/ntp1/stakeholders/{tokenid} Get Addresses Holding a Token
NeblioRestApiSuite.TestnetNTP1Api testnetGetTokenId GET /testnet/ntp1/tokenid/{tokensymbol} Returns the tokenId representing a token
NeblioRestApiSuite.TestnetNTP1Api testnetGetTokenMetadataOfIssuance GET /testnet/ntp1/tokenmetadata/{tokenid} Get Issuance Metadata of Token
NeblioRestApiSuite.TestnetNTP1Api testnetGetTokenMetadataOfUtxo GET /testnet/ntp1/tokenmetadata/{tokenid}/{utxo} Get UTXO Metadata of Token
NeblioRestApiSuite.TestnetNTP1Api testnetGetTransactionInfo GET /testnet/ntp1/transactioninfo/{txid} Information On an NTP1 Transaction
NeblioRestApiSuite.TestnetNTP1Api testnetIssueToken POST /testnet/ntp1/issue Builds a transaction that issues a new NTP1 Token
NeblioRestApiSuite.TestnetNTP1Api testnetSendToken POST /testnet/ntp1/sendtoken Builds a transaction that sends an NTP1 Token

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.