Service Provider API

Producer

getChainState

Gets the current state of a given sidechain

Gets the current state of a given sidechain e.g. has chain started, is in configuration phase, is in candidature phase, is secret sharing phase, etc


/api/Producer/GetChainState

Usage and SDK Samples

curl -X GET "//api/Producer/GetChainState?chainName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getChainState(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getChainState");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getChainState(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getChainState");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the sidechain (optional)

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

// Gets the current state of a given sidechain
[apiInstance getChainStateWith:chainName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example // {{String}} Name of the sidechain
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getChainState(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Name of the sidechain (optional) 

            try
            {
                // Gets the current state of a given sidechain
                apiInstance.getChainState(chainName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.getChainState: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Name of the sidechain

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

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Name of the sidechain

eval { 
    $api_instance->getChainState(chainName => $chainName);
};
if ($@) {
    warn "Exception when calling ProducerApi->getChainState: $@\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.ProducerApi()
chainName = chainName_example # String | Name of the sidechain (optional)

try: 
    # Gets the current state of a given sidechain
    api_instance.get_chain_state(chainName=chainName)
except ApiException as e:
    print("Exception when calling ProducerApi->getChainState: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the sidechain

Responses

Status: 200 - Contract state retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving contract state


getContractInfo

Gets the contract information of a sidechain that is started and configured

Retrieves relevant information about a sidechain, e.g. payment per block, mininum producer stake to participate, required number of producers, max block size in bytes, etc


/api/Producer/GetContractInfo

Usage and SDK Samples

curl -X GET "//api/Producer/GetContractInfo?chainName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getContractInfo(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getContractInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getContractInfo(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getContractInfo");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the sidechain (optional)

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

// Gets the contract information of a sidechain that is started and configured
[apiInstance getContractInfoWith:chainName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example // {{String}} Name of the sidechain
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getContractInfo(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Name of the sidechain (optional) 

            try
            {
                // Gets the contract information of a sidechain that is started and configured
                apiInstance.getContractInfo(chainName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.getContractInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Name of the sidechain

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

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Name of the sidechain

eval { 
    $api_instance->getContractInfo(chainName => $chainName);
};
if ($@) {
    warn "Exception when calling ProducerApi->getContractInfo: $@\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.ProducerApi()
chainName = chainName_example # String | Name of the sidechain (optional)

try: 
    # Gets the contract information of a sidechain that is started and configured
    api_instance.get_contract_info(chainName=chainName)
except ApiException as e:
    print("Exception when calling ProducerApi->getContractInfo: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the sidechain

Responses

Status: 200 - Contract information retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving the contract information


getProducerCandidature

Gets information about the participation state of the producer on a sidechain

Confirms if the producer has applied successfully to produce a given sidechain


/api/Producer/GetProducerCandidature

Usage and SDK Samples

curl -X GET "//api/Producer/GetProducerCandidature?chainName=&forceDelete="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        Boolean forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
        try {
            apiInstance.getProducerCandidature(chainName, forceDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getProducerCandidature");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        Boolean forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
        try {
            apiInstance.getProducerCandidature(chainName, forceDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getProducerCandidature");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the sidechain (optional)
Boolean *forceDelete = true; // This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional) (default to false)

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

// Gets information about the participation state of the producer on a sidechain
[apiInstance getProducerCandidatureWith:chainName
    forceDelete:forceDelete
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example, // {{String}} Name of the sidechain
  'forceDelete': true // {{Boolean}} This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getProducerCandidature(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Name of the sidechain (optional) 
            var forceDelete = true;  // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional)  (default to false)

            try
            {
                // Gets information about the participation state of the producer on a sidechain
                apiInstance.getProducerCandidature(chainName, forceDelete);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.getProducerCandidature: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Name of the sidechain
$forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

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

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Name of the sidechain
my $forceDelete = true; # Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

eval { 
    $api_instance->getProducerCandidature(chainName => $chainName, forceDelete => $forceDelete);
};
if ($@) {
    warn "Exception when calling ProducerApi->getProducerCandidature: $@\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.ProducerApi()
chainName = chainName_example # String | Name of the sidechain (optional)
forceDelete = true # Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional) (default to false)

try: 
    # Gets information about the participation state of the producer on a sidechain
    api_instance.get_producer_candidature(chainName=chainName, forceDelete=forceDelete)
except ApiException as e:
    print("Exception when calling ProducerApi->getProducerCandidature: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the sidechain
forceDelete
Boolean
This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

Responses

Status: 200 - Information retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving the information


getTotalCandidatesInChain

Gets the current number of candidates for a given sidechain

Gets the current number of candidates that have applied to produce a given sidechain


/api/Producer/GetTotalCandidatesInChain

Usage and SDK Samples

curl -X GET "//api/Producer/GetTotalCandidatesInChain?chainName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getTotalCandidatesInChain(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getTotalCandidatesInChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getTotalCandidatesInChain(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getTotalCandidatesInChain");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the sidechain (optional)

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

// Gets the current number of candidates for a given sidechain
[apiInstance getTotalCandidatesInChainWith:chainName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example // {{String}} Name of the sidechain
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getTotalCandidatesInChain(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Name of the sidechain (optional) 

            try
            {
                // Gets the current number of candidates for a given sidechain
                apiInstance.getTotalCandidatesInChain(chainName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.getTotalCandidatesInChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Name of the sidechain

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

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Name of the sidechain

eval { 
    $api_instance->getTotalCandidatesInChain(chainName => $chainName);
};
if ($@) {
    warn "Exception when calling ProducerApi->getTotalCandidatesInChain: $@\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.ProducerApi()
chainName = chainName_example # String | Name of the sidechain (optional)

try: 
    # Gets the current number of candidates for a given sidechain
    api_instance.get_total_candidates_in_chain(chainName=chainName)
except ApiException as e:
    print("Exception when calling ProducerApi->getTotalCandidatesInChain: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the sidechain

Responses

Status: 200 - Total producers retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving total candidates information.


getTotalProducersNeeded

Gets the total producers requested for a given sidechain

Gets the number of sidechain producers requested for a given sidechain


/api/Producer/GetTotalProducersNeeded

Usage and SDK Samples

curl -X GET "//api/Producer/GetTotalProducersNeeded?chainName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getTotalProducersNeeded(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getTotalProducersNeeded");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Name of the sidechain
        try {
            apiInstance.getTotalProducersNeeded(chainName);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#getTotalProducersNeeded");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Name of the sidechain (optional)

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

// Gets the total producers requested for a given sidechain
[apiInstance getTotalProducersNeededWith:chainName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example // {{String}} Name of the sidechain
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getTotalProducersNeeded(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Name of the sidechain (optional) 

            try
            {
                // Gets the total producers requested for a given sidechain
                apiInstance.getTotalProducersNeeded(chainName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.getTotalProducersNeeded: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Name of the sidechain

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

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Name of the sidechain

eval { 
    $api_instance->getTotalProducersNeeded(chainName => $chainName);
};
if ($@) {
    warn "Exception when calling ProducerApi->getTotalProducersNeeded: $@\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.ProducerApi()
chainName = chainName_example # String | Name of the sidechain (optional)

try: 
    # Gets the total producers requested for a given sidechain
    api_instance.get_total_producers_needed(chainName=chainName)
except ApiException as e:
    print("Exception when calling ProducerApi->getTotalProducersNeeded: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Name of the sidechain

Responses

Status: 200 - Producers needed retrieved with success

Status: 400 - Invalid parameters

Status: 500 - Error retrieving the number of producers requested


sendCandidatureToChain

Sends a transaction to BlockBase Operations Contract that contains the producer application information for producing the sidechain

The producer uses this service to apply to producing a specific sidechain. With this service, they send information about how much time in seconds they are willing to work on that sidechain


/api/Producer/SendCandidatureToChain

Usage and SDK Samples

curl -X POST "//api/Producer/SendCandidatureToChain?chainName=&workTime=&producerType=&forceDelete="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProducerApi;

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

public class ProducerApiExample {

    public static void main(String[] args) {
        
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Account name of the sidechain
        Integer workTime = 56; // Integer | How much time in seconds the producer will produce the sidechain
        Integer producerType = 56; // Integer | The type of producer the node is going to be for this sidechain
        Boolean forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
        try {
            apiInstance.sendCandidatureToChain(chainName, workTime, producerType, forceDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#sendCandidatureToChain");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProducerApi;

public class ProducerApiExample {

    public static void main(String[] args) {
        ProducerApi apiInstance = new ProducerApi();
        String chainName = chainName_example; // String | Account name of the sidechain
        Integer workTime = 56; // Integer | How much time in seconds the producer will produce the sidechain
        Integer producerType = 56; // Integer | The type of producer the node is going to be for this sidechain
        Boolean forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
        try {
            apiInstance.sendCandidatureToChain(chainName, workTime, producerType, forceDelete);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProducerApi#sendCandidatureToChain");
            e.printStackTrace();
        }
    }
}
String *chainName = chainName_example; // Account name of the sidechain (optional)
Integer *workTime = 56; // How much time in seconds the producer will produce the sidechain (optional)
Integer *producerType = 56; // The type of producer the node is going to be for this sidechain (optional)
Boolean *forceDelete = true; // This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional) (default to false)

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

// Sends a transaction to BlockBase Operations Contract that contains the producer application information for producing the sidechain
[apiInstance sendCandidatureToChainWith:chainName
    workTime:workTime
    producerType:producerType
    forceDelete:forceDelete
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ServiceProviderApi = require('service_provider_api');

var api = new ServiceProviderApi.ProducerApi()
var opts = { 
  'chainName': chainName_example, // {{String}} Account name of the sidechain
  'workTime': 56, // {{Integer}} How much time in seconds the producer will produce the sidechain
  'producerType': 56, // {{Integer}} The type of producer the node is going to be for this sidechain
  'forceDelete': true // {{Boolean}} This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.sendCandidatureToChain(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProducerApi();
            var chainName = chainName_example;  // String | Account name of the sidechain (optional) 
            var workTime = 56;  // Integer | How much time in seconds the producer will produce the sidechain (optional) 
            var producerType = 56;  // Integer | The type of producer the node is going to be for this sidechain (optional) 
            var forceDelete = true;  // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional)  (default to false)

            try
            {
                // Sends a transaction to BlockBase Operations Contract that contains the producer application information for producing the sidechain
                apiInstance.sendCandidatureToChain(chainName, workTime, producerType, forceDelete);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProducerApi.sendCandidatureToChain: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProducerApi();
$chainName = chainName_example; // String | Account name of the sidechain
$workTime = 56; // Integer | How much time in seconds the producer will produce the sidechain
$producerType = 56; // Integer | The type of producer the node is going to be for this sidechain
$forceDelete = true; // Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

try {
    $api_instance->sendCandidatureToChain($chainName, $workTime, $producerType, $forceDelete);
} catch (Exception $e) {
    echo 'Exception when calling ProducerApi->sendCandidatureToChain: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProducerApi;

my $api_instance = WWW::SwaggerClient::ProducerApi->new();
my $chainName = chainName_example; # String | Account name of the sidechain
my $workTime = 56; # Integer | How much time in seconds the producer will produce the sidechain
my $producerType = 56; # Integer | The type of producer the node is going to be for this sidechain
my $forceDelete = true; # Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

eval { 
    $api_instance->sendCandidatureToChain(chainName => $chainName, workTime => $workTime, producerType => $producerType, forceDelete => $forceDelete);
};
if ($@) {
    warn "Exception when calling ProducerApi->sendCandidatureToChain: $@\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.ProducerApi()
chainName = chainName_example # String | Account name of the sidechain (optional)
workTime = 56 # Integer | How much time in seconds the producer will produce the sidechain (optional)
producerType = 56 # Integer | The type of producer the node is going to be for this sidechain (optional)
forceDelete = true # Boolean | This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases (optional) (default to false)

try: 
    # Sends a transaction to BlockBase Operations Contract that contains the producer application information for producing the sidechain
    api_instance.send_candidature_to_chain(chainName=chainName, workTime=workTime, producerType=producerType, forceDelete=forceDelete)
except ApiException as e:
    print("Exception when calling ProducerApi->sendCandidatureToChain: %s\n" % e)

Parameters

Query parameters
Name Description
chainName
String
Account name of the sidechain
workTime
Integer (int32)
How much time in seconds the producer will produce the sidechain
producerType
Integer (int32)
The type of producer the node is going to be for this sidechain
forceDelete
Boolean
This parameter is here only to simplify testing purposes. It makes it more easy to restart the whole system and delete previous existing databases

Responses

Status: 200 - Candidature sent with success

Status: 400 - Invalid parameters

Status: 500 - Error sending candidature