Admin
Admin endpints to handle the supported Wrapper APIs
Register a new Wrapper API
This method allows you to enable an API for a currency in the specified network. A currency can be supported in multiple networks
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.
Currency for which you want to enable an API in the connector.
btc
Network on which you want to enable the specified currency.
testnet
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"
}
}
Successful response
{
"success": true,
"message": "testnet network added for currency btc"
}
Updating a Wrapper API
This method allows you to update the configuration properties that a currency API is using for a specific network.
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.
Currency for which you want to update the configuration parameters
btc
Network on which you want to enable the specified currency
testnet
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"
}
}
Successful response
{
"success": true,
"message": "Configuration for testnet network for currency btc updated successfully"
}
Get information of some Wrapper API
This method allows you to get the configuration properties that a currency API is using for a specific network.
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.
Currency from which the configuration parameters are to be returned.
btc
Network of the currency from which the configuration parameters are to be returned.
testnet
POST /getcoin HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"coin": "btc",
"network": "testnet"
}
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"
}
}
Unregister a Wrapper API
This method allows you to disable an API for a currency in the specified network.
Currency for which you want to disable an API in the connector
btc
Network on which you want to disable the specified currency
testnet
POST /removecoin HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"coin": "btc",
"network": "testnet"
}
Successful response
{
"success": true,
"message": "testnet network removed for currency btc"
}
Last updated