1.2.0 • Published 6 years ago

neblio_rest_api_suite v1.2.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
6 years ago

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

ClassMethodHTTP requestDescription
NeblioRestApiSuite.InsightApigetAddressGET /ins/addr/{address}Returns address object
NeblioRestApiSuite.InsightApigetAddressBalanceGET /ins/addr/{address}/balanceReturns address balance in sats
NeblioRestApiSuite.InsightApigetAddressTotalReceivedGET /ins/addr/{address}/totalReceivedReturns total received by address in sats
NeblioRestApiSuite.InsightApigetAddressTotalSentGET /ins/addr/{address}/totalSentReturns total sent by address in sats
NeblioRestApiSuite.InsightApigetAddressUnconfirmedBalanceGET /ins/addr/{address}/unconfirmedBalanceReturns address unconfirmed balance in sats
NeblioRestApiSuite.InsightApigetAddressUtxosGET /ins/addr/{address}/utxoReturns all UTXOs at a given address
NeblioRestApiSuite.InsightApigetBlockGET /ins/block/{blockhash}Returns information regarding a Neblio block
NeblioRestApiSuite.InsightApigetBlockIndexGET /ins/block-index/{blockindex}Returns block hash of block
NeblioRestApiSuite.InsightApigetRawTxGET /ins/rawtx/{txid}Returns raw transaction hex
NeblioRestApiSuite.InsightApigetStatusGET /ins/statusUtility API for calling several blockchain node functions
NeblioRestApiSuite.InsightApigetSyncGET /ins/syncGet node sync status
NeblioRestApiSuite.InsightApigetTxGET /ins/tx/{txid}Returns transaction object
NeblioRestApiSuite.InsightApigetTxsGET /ins/txsGet transactions by block or address
NeblioRestApiSuite.InsightApisendTxPOST /ins/tx/sendBroadcasts a signed raw transaction to the network (not NTP1 specific)
NeblioRestApiSuite.NTP1ApibroadcastTxPOST /ntp1/broadcastBroadcasts a signed raw transaction to the network
NeblioRestApiSuite.NTP1ApiburnTokenPOST /ntp1/burntokenBuilds a transaction that burns an NTP1 Token
NeblioRestApiSuite.NTP1ApigetAddressInfoGET /ntp1/addressinfo/{address}Information On a Neblio Address
NeblioRestApiSuite.NTP1ApigetTokenHoldersGET /ntp1/stakeholders/{tokenid}Get Addresses Holding a Token
NeblioRestApiSuite.NTP1ApigetTokenIdGET /ntp1/tokenid/{tokensymbol}Returns the tokenId representing a token
NeblioRestApiSuite.NTP1ApigetTokenMetadataOfIssuanceGET /ntp1/tokenmetadata/{tokenid}Get Issuance Metadata of Token
NeblioRestApiSuite.NTP1ApigetTokenMetadataOfUtxoGET /ntp1/tokenmetadata/{tokenid}/{utxo}Get UTXO Metadata of Token
NeblioRestApiSuite.NTP1ApigetTransactionInfoGET /ntp1/transactioninfo/{txid}Information On an NTP1 Transaction
NeblioRestApiSuite.NTP1ApiissueTokenPOST /ntp1/issueBuilds a transaction that issues a new NTP1 Token
NeblioRestApiSuite.NTP1ApisendTokenPOST /ntp1/sendtokenBuilds a transaction that sends an NTP1 Token
NeblioRestApiSuite.TestnetFaucetApitestnetGetFaucetGET /testnet/faucetWithdraws testnet NEBL to the specified address
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressGET /testnet/ins/addr/{address}Returns address object
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressBalanceGET /testnet/ins/addr/{address}/balanceReturns address balance in sats
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressTotalReceivedGET /testnet/ins/addr/{address}/totalReceivedReturns total received by address in sats
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressTotalSentGET /testnet/ins/addr/{address}/totalSentReturns total sent by address in sats
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressUnconfirmedBalanceGET /testnet/ins/addr/{address}/unconfirmedBalanceReturns address unconfirmed balance in sats
NeblioRestApiSuite.TestnetInsightApitestnetGetAddressUtxosGET /testnet/ins/addr/{address}/utxoReturns all UTXOs at a given address
NeblioRestApiSuite.TestnetInsightApitestnetGetBlockGET /testnet/ins/block/{blockhash}Returns information regarding a Neblio block
NeblioRestApiSuite.TestnetInsightApitestnetGetBlockIndexGET /testnet/ins/block-index/{blockindex}Returns block hash of block
NeblioRestApiSuite.TestnetInsightApitestnetGetRawTxGET /testnet/ins/rawtx/{txid}Returns raw transaction hex
NeblioRestApiSuite.TestnetInsightApitestnetGetStatusGET /testnet/ins/statusUtility API for calling several blockchain node functions
NeblioRestApiSuite.TestnetInsightApitestnetGetSyncGET /testnet/ins/syncGet node sync status
NeblioRestApiSuite.TestnetInsightApitestnetGetTxGET /testnet/ins/tx/{txid}Returns transaction object
NeblioRestApiSuite.TestnetInsightApitestnetGetTxsGET /testnet/ins/txsGet transactions by block or address
NeblioRestApiSuite.TestnetInsightApitestnetSendTxPOST /testnet/ins/tx/sendBroadcasts a signed raw transaction to the network (not NTP1 specific)
NeblioRestApiSuite.TestnetNTP1ApitestnetBroadcastTxPOST /testnet/ntp1/broadcastBroadcasts a signed raw transaction to the network
NeblioRestApiSuite.TestnetNTP1ApitestnetBurnTokenPOST /testnet/ntp1/burntokenBuilds a transaction that burns an NTP1 Token
NeblioRestApiSuite.TestnetNTP1ApitestnetGetAddressInfoGET /testnet/ntp1/addressinfo/{address}Information On a Neblio Address
NeblioRestApiSuite.TestnetNTP1ApitestnetGetTokenHoldersGET /testnet/ntp1/stakeholders/{tokenid}Get Addresses Holding a Token
NeblioRestApiSuite.TestnetNTP1ApitestnetGetTokenIdGET /testnet/ntp1/tokenid/{tokensymbol}Returns the tokenId representing a token
NeblioRestApiSuite.TestnetNTP1ApitestnetGetTokenMetadataOfIssuanceGET /testnet/ntp1/tokenmetadata/{tokenid}Get Issuance Metadata of Token
NeblioRestApiSuite.TestnetNTP1ApitestnetGetTokenMetadataOfUtxoGET /testnet/ntp1/tokenmetadata/{tokenid}/{utxo}Get UTXO Metadata of Token
NeblioRestApiSuite.TestnetNTP1ApitestnetGetTransactionInfoGET /testnet/ntp1/transactioninfo/{txid}Information On an NTP1 Transaction
NeblioRestApiSuite.TestnetNTP1ApitestnetIssueTokenPOST /testnet/ntp1/issueBuilds a transaction that issues a new NTP1 Token
NeblioRestApiSuite.TestnetNTP1ApitestnetSendTokenPOST /testnet/ntp1/sendtokenBuilds a transaction that sends an NTP1 Token

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.