Skip to content

Latest commit

 

History

History
426 lines (265 loc) · 13.6 KB

InsightApi.md

File metadata and controls

426 lines (265 loc) · 13.6 KB

\InsightApi

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

Method HTTP request Description
GetAddress Get /ins/addr/{address} Returns address object
GetAddressBalance Get /ins/addr/{address}/balance Returns address balance in sats
GetAddressTotalReceived Get /ins/addr/{address}/totalReceived Returns total received by address in sats
GetAddressTotalSent Get /ins/addr/{address}/totalSent Returns total sent by address in sats
GetAddressUnconfirmedBalance Get /ins/addr/{address}/unconfirmedBalance Returns address unconfirmed balance in sats
GetAddressUtxos Get /ins/addr/{address}/utxo Returns all UTXOs at a given address
GetBlock Get /ins/block/{blockhash} Returns information regarding a Neblio block
GetBlockIndex Get /ins/block-index/{blockindex} Returns block hash of block
GetRawTx Get /ins/rawtx/{txid} Returns raw transaction hex
GetStatus Get /ins/status Utility API for calling several blockchain node functions
GetSync Get /ins/sync Get node sync status
GetTx Get /ins/tx/{txid} Returns transaction object
GetTxs Get /ins/txs Get transactions by block or address
SendTx Post /ins/tx/send Broadcasts a signed raw transaction to the network (not NTP1 specific)

GetAddress

GetAddressResponse GetAddress(ctx, address) Returns address object

Returns NEBL address object containing information on a specific address

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

GetAddressResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAddressBalance

float32 GetAddressBalance(ctx, address) Returns address balance in sats

Returns NEBL address balance in satoshis

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

float32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAddressTotalReceived

float32 GetAddressTotalReceived(ctx, address) Returns total received by address in sats

Returns total NEBL received by address in satoshis

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

float32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAddressTotalSent

float32 GetAddressTotalSent(ctx, address) Returns total sent by address in sats

Returns total NEBL sent by address in satoshis

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

float32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAddressUnconfirmedBalance

float32 GetAddressUnconfirmedBalance(ctx, address) Returns address unconfirmed balance in sats

Returns NEBL address unconfirmed balance in satoshis

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

float32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAddressUtxos

[]map[string]interface{} GetAddressUtxos(ctx, address) Returns all UTXOs at a given address

Returns information on each Unspent Transaction Output contained at an address

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
address string Address

Return type

[]map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBlock

GetBlockResponse GetBlock(ctx, blockhash) Returns information regarding a Neblio block

Returns blockchain data for a given block based upon the block hash

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
blockhash string Block Hash

Return type

GetBlockResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetBlockIndex

GetBlockIndexResponse GetBlockIndex(ctx, blockindex) Returns block hash of block

Returns the block hash of a block at a given block index

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
blockindex float32 Block Index

Return type

GetBlockIndexResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRawTx

GetRawTxResponse GetRawTx(ctx, txid) Returns raw transaction hex

Returns raw transaction hex representing a NEBL transaction

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
txid string Transaction ID

Return type

GetRawTxResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetStatus

map[string]interface{} GetStatus(ctx, optional) Utility API for calling several blockchain node functions

Utility API for calling several blockchain node functions - getInfo, getDifficulty, getBestBlockHash, getLastBlockHash

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetStatusOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetStatusOpts struct

Name Type Description Notes
q optional.String Function to call, getInfo, getDifficulty, getBestBlockHash, or getLastBlockHash

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSync

GetSyncResponse GetSync(ctx, ) Get node sync status

Returns information on the node's sync progress

Required Parameters

This endpoint does not need any parameter.

Return type

GetSyncResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTx

GetTxResponse GetTx(ctx, txid) Returns transaction object

Returns NEBL transaction object representing a NEBL transaction

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
txid string Transaction ID

Return type

GetTxResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTxs

GetTxsResponse GetTxs(ctx, optional) Get transactions by block or address

Returns all transactions by block or address

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetTxsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetTxsOpts struct

Name Type Description Notes
address optional.String Address
block optional.String Block Hash
pageNum optional.Float32 Page number to display

Return type

GetTxsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendTx

BroadcastTxResponse SendTx(ctx, sendTxRequest) Broadcasts a signed raw transaction to the network (not NTP1 specific)

Broadcasts a signed raw transaction to the network. If successful returns the txid of the broadcast trasnaction.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
sendTxRequest SendTxRequest Object representing a transaction to broadcast

Return type

BroadcastTxResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]