Skip to content
No description, website, or topics provided.
C# Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src/Neblio.API
.gitignore
.travis.yml
Neblio.API.sln
README.md
build.sh
mono_nunit_test.sh

README.md

Neblio.API - the C# library for the Neblio REST API Suite

APIs for Interacting with NTP1 Tokens & The Neblio Blockchain

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.3.0
  • SDK version: 1.2.1
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Neblio.API.Api;
using Neblio.API.Client;
using Neblio.API.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Neblio.API.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using Neblio.API.Api;
using Neblio.API.Client;
using Neblio.API.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            var apiInstance = new InsightApi();
            var address = address_example;  // string | Address

            try
            {
                // Returns address object
                GetAddressResponse result = apiInstance.GetAddress(address);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InsightApi.GetAddress: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
InsightApi GetAddress GET /ins/addr/{address} Returns address object
InsightApi GetAddressBalance GET /ins/addr/{address}/balance Returns address balance in sats
InsightApi GetAddressTotalReceived GET /ins/addr/{address}/totalReceived Returns total received by address in sats
InsightApi GetAddressTotalSent GET /ins/addr/{address}/totalSent Returns total sent by address in sats
InsightApi GetAddressUnconfirmedBalance GET /ins/addr/{address}/unconfirmedBalance Returns address unconfirmed balance in sats
InsightApi GetAddressUtxos GET /ins/addr/{address}/utxo Returns all UTXOs at a given address
InsightApi GetBlock GET /ins/block/{blockhash} Returns information regarding a Neblio block
InsightApi GetBlockIndex GET /ins/block-index/{blockindex} Returns block hash of block
InsightApi GetRawTx GET /ins/rawtx/{txid} Returns raw transaction hex
InsightApi GetStatus GET /ins/status Utility API for calling several blockchain node functions
InsightApi GetSync GET /ins/sync Get node sync status
InsightApi GetTx GET /ins/tx/{txid} Returns transaction object
InsightApi GetTxs GET /ins/txs Get transactions by block or address
InsightApi SendTx POST /ins/tx/send Broadcasts a signed raw transaction to the network (not NTP1 specific)
JSONRPCApi JsonRpc POST / Send a JSON-RPC call to a localhost neblio-Qt or nebliod node
NTP1Api BroadcastTx POST /ntp1/broadcast Broadcasts a signed raw transaction to the network
NTP1Api BurnToken POST /ntp1/burntoken Builds a transaction that burns an NTP1 Token
NTP1Api GetAddressInfo GET /ntp1/addressinfo/{address} Information On a Neblio Address
NTP1Api GetTokenHolders GET /ntp1/stakeholders/{tokenid} Get Addresses Holding a Token
NTP1Api GetTokenId GET /ntp1/tokenid/{tokensymbol} Returns the tokenId representing a token
NTP1Api GetTokenMetadata GET /ntp1/tokenmetadata/{tokenid} Get Metadata of Token
NTP1Api GetTokenMetadataOfUtxo GET /ntp1/tokenmetadata/{tokenid}/{utxo} Get UTXO Metadata of Token
NTP1Api GetTransactionInfo GET /ntp1/transactioninfo/{txid} Information On an NTP1 Transaction
NTP1Api IssueToken POST /ntp1/issue Builds a transaction that issues a new NTP1 Token
NTP1Api SendToken POST /ntp1/sendtoken Builds a transaction that sends an NTP1 Token
TestnetFaucetApi TestnetGetFaucet GET /testnet/faucet Withdraws testnet NEBL to the specified address
TestnetInsightApi TestnetGetAddress GET /testnet/ins/addr/{address} Returns address object
TestnetInsightApi TestnetGetAddressBalance GET /testnet/ins/addr/{address}/balance Returns address balance in sats
TestnetInsightApi TestnetGetAddressTotalReceived GET /testnet/ins/addr/{address}/totalReceived Returns total received by address in sats
TestnetInsightApi TestnetGetAddressTotalSent GET /testnet/ins/addr/{address}/totalSent Returns total sent by address in sats
TestnetInsightApi TestnetGetAddressUnconfirmedBalance GET /testnet/ins/addr/{address}/unconfirmedBalance Returns address unconfirmed balance in sats
TestnetInsightApi TestnetGetAddressUtxos GET /testnet/ins/addr/{address}/utxo Returns all UTXOs at a given address
TestnetInsightApi TestnetGetBlock GET /testnet/ins/block/{blockhash} Returns information regarding a Neblio block
TestnetInsightApi TestnetGetBlockIndex GET /testnet/ins/block-index/{blockindex} Returns block hash of block
TestnetInsightApi TestnetGetRawTx GET /testnet/ins/rawtx/{txid} Returns raw transaction hex
TestnetInsightApi TestnetGetStatus GET /testnet/ins/status Utility API for calling several blockchain node functions
TestnetInsightApi TestnetGetSync GET /testnet/ins/sync Get node sync status
TestnetInsightApi TestnetGetTx GET /testnet/ins/tx/{txid} Returns transaction object
TestnetInsightApi TestnetGetTxs GET /testnet/ins/txs Get transactions by block or address
TestnetInsightApi TestnetSendTx POST /testnet/ins/tx/send Broadcasts a signed raw transaction to the network (not NTP1 specific)
TestnetNTP1Api TestnetBroadcastTx POST /testnet/ntp1/broadcast Broadcasts a signed raw transaction to the network
TestnetNTP1Api TestnetBurnToken POST /testnet/ntp1/burntoken Builds a transaction that burns an NTP1 Token
TestnetNTP1Api TestnetGetAddressInfo GET /testnet/ntp1/addressinfo/{address} Information On a Neblio Address
TestnetNTP1Api TestnetGetTokenHolders GET /testnet/ntp1/stakeholders/{tokenid} Get Addresses Holding a Token
TestnetNTP1Api TestnetGetTokenId GET /testnet/ntp1/tokenid/{tokensymbol} Returns the tokenId representing a token
TestnetNTP1Api TestnetGetTokenMetadata GET /testnet/ntp1/tokenmetadata/{tokenid} Get Metadata of Token
TestnetNTP1Api TestnetGetTokenMetadataOfUtxo GET /testnet/ntp1/tokenmetadata/{tokenid}/{utxo} Get UTXO Metadata of Token
TestnetNTP1Api TestnetGetTransactionInfo GET /testnet/ntp1/transactioninfo/{txid} Information On an NTP1 Transaction
TestnetNTP1Api TestnetIssueToken POST /testnet/ntp1/issue Builds a transaction that issues a new NTP1 Token
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
You can’t perform that action at this time.