All URIs are relative to /
Method | HTTP request | Description |
---|---|---|
addresses | GET /api/v3/account/addresses | Get node's HOPR and native addresses. |
balances | GET /api/v3/account/balances | Get node's and associated Safe's HOPR and native balances as the allowance for HOPR |
withdraw | POST /api/v3/account/withdraw | Withdraw funds from this node to the ethereum wallet address. |
AccountAddressesResponse addresses()
Get node's HOPR and native addresses.
Get node's HOPR and native addresses. HOPR address is represented by the P2P PeerId and can be used by other node owner to interact with this node.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.AccountApi(hoprd_sdk.ApiClient(configuration))
try:
# Get node's HOPR and native addresses.
api_response = api_instance.addresses()
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->addresses: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountBalancesResponse balances()
Get node's and associated Safe's HOPR and native balances as the allowance for HOPR
Get node's and associated Safe's HOPR and native balances as the allowance for HOPR tokens to be drawn by HoprChannels from Safe. HOPR tokens from the Safe balance are used to fund the payment channels between this node and other nodes on the network. NATIVE balance of the Node is used to pay for the gas fees for the blockchain.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.AccountApi(hoprd_sdk.ApiClient(configuration))
try:
# Get node's and associated Safe's HOPR and native balances as the allowance for HOPR
api_response = api_instance.balances()
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->balances: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountBalancesResponse withdraw(body)
Withdraw funds from this node to the ethereum wallet address.
Withdraw funds from this node to the ethereum wallet address. Both NATIVE or HOPR can be withdrawn using this method.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.AccountApi(hoprd_sdk.ApiClient(configuration))
body = hoprd_sdk.WithdrawBodyRequest() # WithdrawBodyRequest |
try:
# Withdraw funds from this node to the ethereum wallet address.
api_response = api_instance.withdraw(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->withdraw: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | WithdrawBodyRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]