Blockchain Proof

All

createChain


/blockchain/proof/0.1.0/existence

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        CreateChainRequest request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings
        try {
            CreateChainResponse result = apiInstance.createChain(request);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#createChain");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        CreateChainRequest request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings
        try {
            CreateChainResponse result = apiInstance.createChain(request);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#createChain");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


CreateChainRequest *request = ; // Create a new Proof of Existence chain using the provided entity settings

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

// Create a new entity chain
[apiInstance createChainWith:request
              completionHandler: ^(CreateChainResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var request = ; // {CreateChainRequest} Create a new Proof of Existence chain using the provided entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createChain(request, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class createChainExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var request = new CreateChainRequest(); // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings

            try
            {
                // Create a new entity chain
                CreateChainResponse result = apiInstance.createChain(request);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.createChain: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings

try {
    $result = $api_instance->createChain($request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->createChain: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Body parameters
Name Description
request *

Responses

Status: 200 - Chain already exists

Status: 202 - Registration request received

Status: 400 - Invalid registration request


registerContent


/blockchain/proof/0.1.0/existence/{chainId}/register/content

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/register/content"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        ContentRequest existence = ; // ContentRequest | Register content using the current entity settings
        try {
            RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#registerContent");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        ContentRequest existence = ; // ContentRequest | Register content using the current entity settings
        try {
            RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#registerContent");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be registered
ContentRequest *existence = ; // Register content using the current entity settings

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

// Register content
[apiInstance registerContentWith:chainId
    existence:existence
              completionHandler: ^(RegisterContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var chainId = chainId_example; // {String} The chain where the content will be registered

var existence = ; // {ContentRequest} Register content using the current entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerContent(chainId, existence, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class registerContentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var chainId = chainId_example;  // String | The chain where the content will be registered
            var existence = new ContentRequest(); // ContentRequest | Register content using the current entity settings

            try
            {
                // Register content
                RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.registerContent: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$chainId = chainId_example; // String | The chain where the content will be registered
$existence = ; // ContentRequest | Register content using the current entity settings

try {
    $result = $api_instance->registerContent($chainId, $existence);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->registerContent: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*
Body parameters
Name Description
existence *

Responses

Status: 200 - Content already registereds

Status: 202 - Registration request received

Status: 400 - Invalid registration request


registerStream

Register content by supplying a file or some other binary data. Hashing will be done on the server side


/blockchain/proof/0.1.0/existence/{chainId}/register/stream

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/register/stream"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#registerStream");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#registerStream");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be registered
file *stream = /path/to/file.txt; // The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

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

// Register content using a bytestream/file
[apiInstance registerStreamWith:chainId
    stream:stream
              completionHandler: ^(RegisterContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var chainId = chainId_example; // {String} The chain where the content will be registered

var stream = /path/to/file.txt; // {file} The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerStream(chainId, stream, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class registerStreamExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var chainId = chainId_example;  // String | The chain where the content will be registered
            var stream = new file(); // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

            try
            {
                // Register content using a bytestream/file
                RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.registerStream: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$chainId = chainId_example; // String | The chain where the content will be registered
$stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

try {
    $result = $api_instance->registerStream($chainId, $stream);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->registerStream: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - Content already registered

Status: 202 - Registration request received

Status: 400 - Invalid registration request


settings


/blockchain/proof/0.1.0/existence/{chainId}/settings

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/settings"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | This is the chain where the content is registered/verified
        try {
            SettingsResponse result = apiInstance.settings(chainId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#settings");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | This is the chain where the content is registered/verified
        try {
            SettingsResponse result = apiInstance.settings(chainId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#settings");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // This is the chain where the content is registered/verified

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

// Get the settings for registration/verification
[apiInstance settingsWith:chainId
              completionHandler: ^(SettingsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var chainId = chainId_example; // {String} This is the chain where the content is registered/verified


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.settings(chainId, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class settingsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var chainId = chainId_example;  // String | This is the chain where the content is registered/verified

            try
            {
                // Get the settings for registration/verification
                SettingsResponse result = apiInstance.settings(chainId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.settings: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$chainId = chainId_example; // String | This is the chain where the content is registered/verified

try {
    $result = $api_instance->settings($chainId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->settings: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - The settings for the proof chain

Status: 400 - Invalid request

Status: 404 - Settings not found


verifyContent


/blockchain/proof/0.1.0/existence/{chainId}/verify/content

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/verify/content"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content was registered
        ContentRequest existence = ; // ContentRequest | Verify content using the current entity settings
        try {
            VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#verifyContent");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content was registered
        ContentRequest existence = ; // ContentRequest | Verify content using the current entity settings
        try {
            VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#verifyContent");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content was registered
ContentRequest *existence = ; // Verify content using the current entity settings

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

// Verify content
[apiInstance verifyContentWith:chainId
    existence:existence
              completionHandler: ^(VerifyContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var chainId = chainId_example; // {String} The chain where the content was registered

var existence = ; // {ContentRequest} Verify content using the current entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.verifyContent(chainId, existence, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class verifyContentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var chainId = chainId_example;  // String | The chain where the content was registered
            var existence = new ContentRequest(); // ContentRequest | Verify content using the current entity settings

            try
            {
                // Verify content
                VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.verifyContent: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$chainId = chainId_example; // String | The chain where the content was registered
$existence = ; // ContentRequest | Verify content using the current entity settings

try {
    $result = $api_instance->verifyContent($chainId, $existence);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->verifyContent: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*
Body parameters
Name Description
existence *

Responses

Status: 200 - Content exists or not

Status: 400 - Invalid verification request


verifyStream

Verify content by supplying a file or some other binary data. Hashing will be done on the server side


/blockchain/proof/0.1.0/existence/{chainId}/verify/stream

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/verify/stream"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.AllApi;

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

public class AllApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be verified
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#verifyStream");
            e.printStackTrace();
        }
    }
}

                                                  

import api.AllApi;

public class AllApiExample {

    public static void main(String[] args) {
        AllApi apiInstance = new AllApi();
        String chainId = chainId_example; // String | The chain where the content will be verified
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AllApi#verifyStream");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be verified
file *stream = /path/to/file.txt; // The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

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

// Verify content using a bytestream/file
[apiInstance verifyStreamWith:chainId
    stream:stream
              completionHandler: ^(VerifyContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .AllApi()

var chainId = chainId_example; // {String} The chain where the content will be verified

var stream = /path/to/file.txt; // {file} The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.verifyStream(chainId, stream, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class verifyStreamExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new AllApi();
            var chainId = chainId_example;  // String | The chain where the content will be verified
            var stream = new file(); // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

            try
            {
                // Verify content using a bytestream/file
                VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AllApi.verifyStream: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\AllApi();
$chainId = chainId_example; // String | The chain where the content will be verified
$stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

try {
    $result = $api_instance->verifyStream($chainId, $stream);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllApi->verifyStream: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - Content exists

Status: 400 - Invalid verification request

Status: 404 - Content does not exist


Chain

createChain


/blockchain/proof/0.1.0/existence

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.ChainApi;

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

public class ChainApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        ChainApi apiInstance = new ChainApi();
        CreateChainRequest request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings
        try {
            CreateChainResponse result = apiInstance.createChain(request);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#createChain");
            e.printStackTrace();
        }
    }
}

                                                  

import api.ChainApi;

public class ChainApiExample {

    public static void main(String[] args) {
        ChainApi apiInstance = new ChainApi();
        CreateChainRequest request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings
        try {
            CreateChainResponse result = apiInstance.createChain(request);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChainApi#createChain");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


CreateChainRequest *request = ; // Create a new Proof of Existence chain using the provided entity settings

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

// Create a new entity chain
[apiInstance createChainWith:request
              completionHandler: ^(CreateChainResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .ChainApi()

var request = ; // {CreateChainRequest} Create a new Proof of Existence chain using the provided entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createChain(request, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class createChainExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ChainApi();
            var request = new CreateChainRequest(); // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings

            try
            {
                // Create a new entity chain
                CreateChainResponse result = apiInstance.createChain(request);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChainApi.createChain: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\ChainApi();
$request = ; // CreateChainRequest | Create a new Proof of Existence chain using the provided entity settings

try {
    $result = $api_instance->createChain($request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChainApi->createChain: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Body parameters
Name Description
request *

Responses

Status: 200 - Chain already exists

Status: 202 - Registration request received

Status: 400 - Invalid registration request


ProofOfExistence

registerContent


/blockchain/proof/0.1.0/existence/{chainId}/register/content

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/register/content"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.ProofOfExistenceApi;

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

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        ContentRequest existence = ; // ContentRequest | Register content using the current entity settings
        try {
            RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#registerContent");
            e.printStackTrace();
        }
    }
}

                                                  

import api.ProofOfExistenceApi;

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        ContentRequest existence = ; // ContentRequest | Register content using the current entity settings
        try {
            RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#registerContent");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be registered
ContentRequest *existence = ; // Register content using the current entity settings

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

// Register content
[apiInstance registerContentWith:chainId
    existence:existence
              completionHandler: ^(RegisterContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .ProofOfExistenceApi()

var chainId = chainId_example; // {String} The chain where the content will be registered

var existence = ; // {ContentRequest} Register content using the current entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerContent(chainId, existence, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class registerContentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProofOfExistenceApi();
            var chainId = chainId_example;  // String | The chain where the content will be registered
            var existence = new ContentRequest(); // ContentRequest | Register content using the current entity settings

            try
            {
                // Register content
                RegisterContentResponse result = apiInstance.registerContent(chainId, existence);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProofOfExistenceApi.registerContent: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\ProofOfExistenceApi();
$chainId = chainId_example; // String | The chain where the content will be registered
$existence = ; // ContentRequest | Register content using the current entity settings

try {
    $result = $api_instance->registerContent($chainId, $existence);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProofOfExistenceApi->registerContent: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*
Body parameters
Name Description
existence *

Responses

Status: 200 - Content already registereds

Status: 202 - Registration request received

Status: 400 - Invalid registration request


registerStream

Register content by supplying a file or some other binary data. Hashing will be done on the server side


/blockchain/proof/0.1.0/existence/{chainId}/register/stream

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/register/stream"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.ProofOfExistenceApi;

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

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#registerStream");
            e.printStackTrace();
        }
    }
}

                                                  

import api.ProofOfExistenceApi;

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be registered
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#registerStream");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be registered
file *stream = /path/to/file.txt; // The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

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

// Register content using a bytestream/file
[apiInstance registerStreamWith:chainId
    stream:stream
              completionHandler: ^(RegisterContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .ProofOfExistenceApi()

var chainId = chainId_example; // {String} The chain where the content will be registered

var stream = /path/to/file.txt; // {file} The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerStream(chainId, stream, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class registerStreamExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProofOfExistenceApi();
            var chainId = chainId_example;  // String | The chain where the content will be registered
            var stream = new file(); // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

            try
            {
                // Register content using a bytestream/file
                RegisterContentResponse result = apiInstance.registerStream(chainId, stream);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProofOfExistenceApi.registerStream: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\ProofOfExistenceApi();
$chainId = chainId_example; // String | The chain where the content will be registered
$stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

try {
    $result = $api_instance->registerStream($chainId, $stream);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProofOfExistenceApi->registerStream: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - Content already registered

Status: 202 - Registration request received

Status: 400 - Invalid registration request


verifyContent


/blockchain/proof/0.1.0/existence/{chainId}/verify/content

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/verify/content"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.ProofOfExistenceApi;

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

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content was registered
        ContentRequest existence = ; // ContentRequest | Verify content using the current entity settings
        try {
            VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#verifyContent");
            e.printStackTrace();
        }
    }
}

                                                  

import api.ProofOfExistenceApi;

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content was registered
        ContentRequest existence = ; // ContentRequest | Verify content using the current entity settings
        try {
            VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#verifyContent");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content was registered
ContentRequest *existence = ; // Verify content using the current entity settings

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

// Verify content
[apiInstance verifyContentWith:chainId
    existence:existence
              completionHandler: ^(VerifyContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .ProofOfExistenceApi()

var chainId = chainId_example; // {String} The chain where the content was registered

var existence = ; // {ContentRequest} Verify content using the current entity settings


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.verifyContent(chainId, existence, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class verifyContentExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProofOfExistenceApi();
            var chainId = chainId_example;  // String | The chain where the content was registered
            var existence = new ContentRequest(); // ContentRequest | Verify content using the current entity settings

            try
            {
                // Verify content
                VerifyContentResponse result = apiInstance.verifyContent(chainId, existence);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProofOfExistenceApi.verifyContent: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\ProofOfExistenceApi();
$chainId = chainId_example; // String | The chain where the content was registered
$existence = ; // ContentRequest | Verify content using the current entity settings

try {
    $result = $api_instance->verifyContent($chainId, $existence);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProofOfExistenceApi->verifyContent: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*
Body parameters
Name Description
existence *

Responses

Status: 200 - Content exists or not

Status: 400 - Invalid verification request


verifyStream

Verify content by supplying a file or some other binary data. Hashing will be done on the server side


/blockchain/proof/0.1.0/existence/{chainId}/verify/stream

Usage and SDK Samples


curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/verify/stream"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.ProofOfExistenceApi;

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

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be verified
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#verifyStream");
            e.printStackTrace();
        }
    }
}

                                                  

import api.ProofOfExistenceApi;

public class ProofOfExistenceApiExample {

    public static void main(String[] args) {
        ProofOfExistenceApi apiInstance = new ProofOfExistenceApi();
        String chainId = chainId_example; // String | The chain where the content will be verified
        file stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored
        try {
            VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProofOfExistenceApi#verifyStream");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // The chain where the content will be verified
file *stream = /path/to/file.txt; // The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

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

// Verify content using a bytestream/file
[apiInstance verifyStreamWith:chainId
    stream:stream
              completionHandler: ^(VerifyContentResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .ProofOfExistenceApi()

var chainId = chainId_example; // {String} The chain where the content will be verified

var stream = /path/to/file.txt; // {file} The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.verifyStream(chainId, stream, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class verifyStreamExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ProofOfExistenceApi();
            var chainId = chainId_example;  // String | The chain where the content will be verified
            var stream = new file(); // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

            try
            {
                // Verify content using a bytestream/file
                VerifyContentResponse result = apiInstance.verifyStream(chainId, stream);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProofOfExistenceApi.verifyStream: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\ProofOfExistenceApi();
$chainId = chainId_example; // String | The chain where the content will be verified
$stream = /path/to/file.txt; // file | The binary data (not hashed). Hashing will be done on the server side. The binary data will not be stored

try {
    $result = $api_instance->verifyStream($chainId, $stream);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProofOfExistenceApi->verifyStream: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - Content exists

Status: 400 - Invalid verification request

Status: 404 - Content does not exist


Settings

settings


/blockchain/proof/0.1.0/existence/{chainId}/settings

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//blockchain/proof/0.1.0/existence/{chainId}/settings"



import com.sphereon.sdk.blockchain.proof.*;
import com.sphereon.sdk.blockchain.proof.auth.*;
import com.sphereon.sdk.blockchain.proof.model.*;
import api.SettingsApi;

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

public class SettingsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        SettingsApi apiInstance = new SettingsApi();
        String chainId = chainId_example; // String | This is the chain where the content is registered/verified
        try {
            SettingsResponse result = apiInstance.settings(chainId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SettingsApi#settings");
            e.printStackTrace();
        }
    }
}

                                                  

import api.SettingsApi;

public class SettingsApiExample {

    public static void main(String[] args) {
        SettingsApi apiInstance = new SettingsApi();
        String chainId = chainId_example; // String | This is the chain where the content is registered/verified
        try {
            SettingsResponse result = apiInstance.settings(chainId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SettingsApi#settings");
            e.printStackTrace();
        }
    }
}

                                                  

Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


String *chainId = chainId_example; // This is the chain where the content is registered/verified

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

// Get the settings for registration/verification
[apiInstance settingsWith:chainId
              completionHandler: ^(SettingsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');
var defaultClient = .ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new .SettingsApi()

var chainId = chainId_example; // {String} This is the chain where the content is registered/verified


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.settings(chainId, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using model;

namespace Example
{
    public class settingsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new SettingsApi();
            var chainId = chainId_example;  // String | This is the chain where the content is registered/verified

            try
            {
                // Get the settings for registration/verification
                SettingsResponse result = apiInstance.settings(chainId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SettingsApi.settings: " + e.Message );
            }
        }
    }
}

                                                    

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new com.sphereon.sdk.blockchain.proof\Api\SettingsApi();
$chainId = chainId_example; // String | This is the chain where the content is registered/verified

try {
    $result = $api_instance->settings($chainId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SettingsApi->settings: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Path parameters
Name Description
chainId*

Responses

Status: 200 - The settings for the proof chain

Status: 400 - Invalid request

Status: 404 - Settings not found


Generated 2016-11-16T13:16:23.649+01:00