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 ($@) {
warn "Exception when calling ChainApi->configureChain: $@\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
Name | Description |
---|---|
body |