Obsolete Altchain Integration Service

From Veriblock Wiki
Jump to: navigation, search

This page refers to an earlier external service. It Became obsolete with the embedded C++ Library.

See: VAIF, Altchain_Integration_Service_API


Written as Java Library, also exposed as a service.

Source code: https://github.com/VeriBlock/alt-integration

Used by

  • Altchain Reference Implementation
  • Altchain PoP Miner (APM)
  • Altchain Explorer
  • SPV

Design notes

Can be used as Java library for Java based projects. Can be used as a service from other languages. Library keeps the VeriBlock and Bitcoin SPV blocks in the SQLite database. Service classes are generated from the Protobuf scheme. Service communication channel is generated from the same Protobuf scheme using the GRPC plugin. Service is exposed on the TCP socket as a GRPC service. Clients should reuse the Protobuf scheme to autogenerate structures and communication classes. Java clients can use Service wrappers (see: https://github.com/VeriBlock/alt-integration/tree/master/alt-integration-adapter-java) to simplify calling the Service.

Starting the Service

  • Windows
  • Linux

Configuring the Service

Default configuration is in the $SERVICE$/conf/webservice-default.properties. Do not modify this file. Create $SERVICE$/conf/webservice.properties aside and put new config here. Use default properties as a reference. Restart Service to apply new config.

Generating code from the Protobuf

See: https://github.com/VeriBlock/alt-integration-proto

Connecting to the Service


ManagedChannel channel = NettyChannelBuilder.forAddress(apiHost, apiPort).usePlaintext().build();
VeriBlockSecurityProtoClient client = new VeriBlockSecurityProtoClient(channel);

See the sample client: https://github.com/VeriBlock/alt-integration/tree/master/alt-integration-grpc-client

VeriBlockSecurityProtoClient is a wrapper for the Integration Service Security API (Altchain_Integration_Service_API#Security_API). It is available in the Java adapters collection: https://github.com/VeriBlock/alt-integration/tree/master/alt-integration-adapter-java


VeriBlockServiceClient client = new VeriBlockServiceClient(grpc::CreateChannel("localhost:19012", grpc::InsecureChannelCredentials()));

VeriBlockServiceClient is a wrapper for the Integration Service Security API (Altchain_Integration_Service_API#Security_API).

Altchain Reference Implementation

See: Altchain_Reference


See: NodeCore-SPV


Full API is described as Protobuf scheme in the integration.proto file (see: https://github.com/VeriBlock/alt-integration-proto/blob/master/proto/integration.proto).

See: Altchain_Integration_Service_API