docs/BlocksApi.md

BlocksApi

All URIs are relative to http://localhost

Method | HTTP request | Description ------------- | ------------- | ------------- GetBlock | GET /{currency}/blocks/{height} | Get a block by its height ListBlockTxs | GET /{currency}/blocks/{height}/txs | Get block transactions

GetBlock

Block GetBlock(currency, height)

Get a block by its height

Example

library(graphsense)

var.currency <- 'btc' # character | The cryptocurrency code (e.g., btc)
var.height <- 1 # integer | The block height

#Get a block by its height
api.instance <- BlocksApi$new()
api.instance$apiClient$basePath <- 'http://localhost';
# Configure API key authorization: api_key
api.instance$apiClient$apiKeys['Authorization'] <- 'WRITE_YOUR_API_KEY_HERE';
result <- api.instance$GetBlock(var.currency, var.height)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- currency | character| The cryptocurrency code (e.g., btc) | height | integer| The block height |

Return type

Block

Authorization

api_key

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | OK | - |

ListBlockTxs

array[Tx] ListBlockTxs(currency, height)

Get block transactions

Example

library(graphsense)

var.currency <- 'btc' # character | The cryptocurrency code (e.g., btc)
var.height <- 1 # integer | The block height

#Get block transactions
api.instance <- BlocksApi$new()
api.instance$apiClient$basePath <- 'http://localhost';
# Configure API key authorization: api_key
api.instance$apiClient$apiKeys['Authorization'] <- 'WRITE_YOUR_API_KEY_HERE';
result <- api.instance$ListBlockTxs(var.currency, var.height)
dput(result)

Parameters

Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- currency | character| The cryptocurrency code (e.g., btc) | height | integer| The block height |

Return type

array[Tx]

Authorization

api_key

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | OK | - |



graphsense/rgraphsense documentation built on Sept. 2, 2022, 1:45 p.m.