Skip to content

NeblioTeam/neblio-api-lib-js

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

neblioapi

Neblioapi - JavaScript client for neblioapi APIs for Interacting with NTP1 Tokens & The Neblio Blockchain This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.3.0
  • Package version: 1.2.1
  • Build package: org.openapitools.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 neblioapi --save

git

If the library is hosted at a git repository, e.g. https://github.com/NeblioTeam/neblio-api-lib-js then install it via:

    npm install NeblioTeam/neblio-api-lib-js --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):

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 Neblioapi = require('neblioapi');


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

Documentation for Models

Documentation for Authorization

rpcAuth

  • Type: HTTP basic authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published