NodeChain EN
  • NodeChain
  • Learn
    • About NodeChain
    • Infrastructure
      • Connector
        • Wrapper APIs
      • Nodes
      • Startup script
    • License
    • Ecosystem
      • Supported APIs
      • Integrations
      • Acknowledgments
  • Develop
    • Quick start
      • Initial setup
      • Using command-line script
        • Commands
    • How-to
      • Run tests locally
      • Lint automatically with hooks
      • Integrate a new Blockchain/API
      • Connect to a public node
    • Wrapper API definition file
    • Contributing
  • Reference
    • API Reference
      • Admin
      • General Endpoints
      • REST Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • JSON-RPC Wrapper API
        • Bitcoin Cash
        • Bitcoin
        • Ethereum
          • ERC-20
      • Real-Time Wrapper API
        • Bitcoin
        • Ethereum
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Admin

Admin endpints to handle the supported Wrapper APIs

PreviousAPI ReferenceNextGeneral Endpoints

Last updated 3 years ago

Register a new Wrapper API

Updating a Wrapper API

Get information of some Wrapper API

Unregister a Wrapper API

  • Register a new Wrapper API
  • POSTThis method allows you to enable an API for a currency in the specified network. A currency can be supported in multiple networks
  • Updating a Wrapper API
  • POSTThis method allows you to update the configuration properties that a currency API is using for a specific network.
  • Get information of some Wrapper API
  • POSTThis method allows you to get the configuration properties that a currency API is using for a specific network.
  • Unregister a Wrapper API
  • POSTThis method allows you to disable an API for a currency in the specified network.

This method allows you to enable an API for a currency in the specified network. A currency can be supported in multiple networks

post

This method allows you to enable an API for a currency in the specified network. A currency can be supported in multiple networks. Configuration properties required (config parameter) to enable the currency API in a specific network are different for each API. Default values are used if custom config is not used.

Body
coinstringRequired

Currency for which you want to enable an API in the connector.

Example: btc
networkstringRequired

Network on which you want to enable the specified currency.

Example: testnet
configone ofRequired
or
or
or
Responses
200
Successful response
application/json
post
POST /addcoin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 344

{
  "coin": "btc",
  "network": "testnet",
  "config": {
    "bitcoincoreRpcEndpoint": "http://swapper:swapper@bitcoincore-regtest:8332",
    "electrumRpcEndpoint": "http://swapper:swapper@electrum-regtest:30000",
    "bitcoincoreZmqEndpoint": "tcp://bitcoincore-regtest:28332",
    "bitcoinAddressCallbackHost": "http://connector:80",
    "electrsEndpoint": "electrs-regtest:60001:t"
  }
}
200

Successful response

{
  "success": true,
  "message": "testnet network added for currency btc"
}

This method allows you to update the configuration properties that a currency API is using for a specific network.

post

This method allows you to update the configuration properties that a currency API is using for a specific network. Configuration properties required (config parameter) to update the currency API in a specific network are different for each API.

Body
coinstringRequired

Currency for which you want to update the configuration parameters

Example: btc
networkstringRequired

Network on which you want to enable the specified currency

Example: testnet
configone ofRequired
or
or
or
Responses
200
Successful response
application/json
post
POST /updatecoin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 344

{
  "coin": "btc",
  "network": "testnet",
  "config": {
    "bitcoincoreRpcEndpoint": "http://swapper:swapper@bitcoincore-regtest:8332",
    "electrumRpcEndpoint": "http://swapper:swapper@electrum-regtest:30000",
    "bitcoincoreZmqEndpoint": "tcp://bitcoincore-regtest:28332",
    "bitcoinAddressCallbackHost": "http://connector:80",
    "electrsEndpoint": "electrs-regtest:60001:t"
  }
}
200

Successful response

{
  "success": true,
  "message": "Configuration for testnet network for currency btc updated successfully"
}

This method allows you to get the configuration properties that a currency API is using for a specific network.

post

This method allows you to get the configuration properties that a currency API is using for a specific network. Configuration properties (config parameter) returned are different for each API.

Body
coinstringRequired

Currency from which the configuration parameters are to be returned.

Example: btc
networkstringRequired

Network of the currency from which the configuration parameters are to be returned.

Example: testnet
Responses
200
Successful response
application/json
post
POST /getcoin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "coin": "btc",
  "network": "testnet"
}
200

Successful response

{
  "success": true,
  "message": "Configuration for testnet network for currency btc retrieved successfully",
  "config": {
    "bitcoincoreRpcEndpoint": "http://swapper:swapper@bitcoincore-regtest:8332",
    "electrumRpcEndpoint": "http://swapper:swapper@electrum-regtest:30000",
    "bitcoincoreZmqEndpoint": "tcp://bitcoincore-regtest:28332",
    "bitcoinAddressCallbackHost": "http://connector:80",
    "electrsEndpoint": "electrs-regtest:60001:t"
  }
}

This method allows you to disable an API for a currency in the specified network.

post

This method allows you to disable an API for a currency in the specified network.

Body
coinstringRequired

Currency for which you want to disable an API in the connector

Example: btc
networkstringRequired

Network on which you want to disable the specified currency

Example: testnet
Responses
200
Successful response
application/json
post
POST /removecoin HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "coin": "btc",
  "network": "testnet"
}
200

Successful response

{
  "success": true,
  "message": "testnet network removed for currency btc"
}