Obsolete Altchain Integration Service
Written as Java Library, also exposed as a service.
Source code: https://github.com/VeriBlock/alt-integration
- Altchain Reference Implementation
- Altchain PoP Miner (APM)
- Altchain Explorer
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
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
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
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).