Service Requester API

configureChain

Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain

The requester uses this service to configure the requirements for the sidechain and for producers participation


/api/Chain/ConfigureChain

Usage and SDK Samples

curl -X POST "//api/Chain/ConfigureChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        ContractInformationTable body = ; // ContractInformationTable | The sidechain configuration
        try {
            apiInstance.configureChain(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#configureChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        ContractInformationTable body = ; // ContractInformationTable | The sidechain configuration
        try {
            apiInstance.configureChain(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#configureChain");
            e.printStackTrace();
        }
    }
}
ContractInformationTable *body = ; // The sidechain configuration (optional)

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
[apiInstance configureChainWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.configureChain(, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class configureChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();
            var body = new ContractInformationTable(); // ContractInformationTable | The sidechain configuration (optional) 

            try
            {
                // Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
                apiInstance.configureChain(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.configureChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();
$body = ; // ContractInformationTable | The sidechain configuration

try {
    $api_instance->configureChain($body);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->configureChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();
my $body = WWW::SwaggerClient::Object::ContractInformationTable->new(); # ContractInformationTable | The sidechain configuration

eval { 
    $api_instance->configureChain(body => $body);
};
if ([email protected]) {
    warn "Exception when calling ChainApi->configureChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()
body =  # ContractInformationTable | The sidechain configuration (optional)

try: 
    # Sends a transaction to BlockBase Operations Contract with the configuration requested for the sidechain
    api_instance.configure_chain(body=body)
except ApiException as e:
    print("Exception when calling ChainApi->configureChain: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Chain configured with success

Status: 400 - Configuration parameters invalid

Status: 500 - Error configurating the chain


endChain

Sends a transaction to the BlockBase Operations Contract to terminate the sidechain

The requester uses this service to terminate a given sidechain


/api/Chain/EndChain

Usage and SDK Samples

curl -X POST "//api/Chain/EndChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChain");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
[apiInstance endChainWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.endChain(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class endChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
                apiInstance.endChain();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.endChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->endChain();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->endChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->endChain();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->endChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Sends a transaction to the BlockBase Operations Contract to terminate the sidechain
    api_instance.end_chain()
except ApiException as e:
    print("Exception when calling ChainApi->endChain: %s\n" % e)

Parameters

Responses

Status: 200 - Chain terminated with success

Status: 500 - Error terminating the chain


endChainMaintainance

Terminates the sidechain maintenance

The requester uses this service to end the maintenance of the sidechain


/api/Chain/EndChainMaintainance

Usage and SDK Samples

curl -X POST "//api/Chain/EndChainMaintainance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChainMaintainance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChainMaintainance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.endChainMaintainance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#endChainMaintainance");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Terminates the sidechain maintenance
[apiInstance endChainMaintainanceWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.endChainMaintainance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class endChainMaintainanceExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Terminates the sidechain maintenance
                apiInstance.endChainMaintainance();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.endChainMaintainance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->endChainMaintainance();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->endChainMaintainance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->endChainMaintainance();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->endChainMaintainance: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Terminates the sidechain maintenance
    api_instance.end_chain_maintainance()
except ApiException as e:
    print("Exception when calling ChainApi->endChainMaintainance: %s\n" % e)

Parameters

Responses

Status: 200 - Chain maintenance terminated with success

Status: 500 - Error terminating the chain maintainance


startChain

Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration

The requester uses this service to request a new sidechain for storing his databases


/api/Chain/StartChain

Usage and SDK Samples

curl -X POST "//api/Chain/StartChain"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChain();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChain");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
[apiInstance startChainWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.startChain(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class startChainExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
                apiInstance.startChain();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.startChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->startChain();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->startChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->startChain();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->startChain: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Sends a transaction to BlockBase Operations Contract to request a sidechain for configuration
    api_instance.start_chain()
except ApiException as e:
    print("Exception when calling ChainApi->startChain: %s\n" % e)

Parameters

Responses

Status: 200 - Chain started with success

Status: 500 - Error starting chain


startChainMaintainance

Starts the maintenance of the sidechain

The requester uses this service to start the maintenance of the sidechain


/api/Chain/StartChainMaintainance

Usage and SDK Samples

curl -X POST "//api/Chain/StartChainMaintainance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChainApi;

import java.io.File;
import java.util.*;

public class ChainApiExample {

    public static void main(String[] args) {
        
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChainMaintainance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChainMaintainance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        try {
            apiInstance.startChainMaintainance();
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#startChainMaintainance");
            e.printStackTrace();
        }
    }
}

ChainApi *apiInstance = [[ChainApi alloc] init];

// Starts the maintenance of the sidechain
[apiInstance startChainMaintainanceWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceRequesterApi = require('service_requester_api');

var api = new ServiceRequesterApi.ChainApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.startChainMaintainance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class startChainMaintainanceExample
    {
        public void main()
        {

            var apiInstance = new ChainApi();

            try
            {
                // Starts the maintenance of the sidechain
                apiInstance.startChainMaintainance();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.startChainMaintainance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChainApi();

try {
    $api_instance->startChainMaintainance();
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->startChainMaintainance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ChainApi;

my $api_instance = WWW::SwaggerClient::ChainApi->new();

eval { 
    $api_instance->startChainMaintainance();
};
if ([email protected]) {
    warn "Exception when calling ChainApi->startChainMaintainance: [email protected]\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ChainApi()

try: 
    # Starts the maintenance of the sidechain
    api_instance.start_chain_maintainance()
except ApiException as e:
    print("Exception when calling ChainApi->startChainMaintainance: %s\n" % e)

Parameters

Responses

Status: 200 - Chain maintenance started with success

Status: 500 - Error starting the maintenance of the chain