All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.p8e.grpc.client.ChaincodeClient.kt Maven / Gradle / Ivy

Go to download

A collection of services and libraries that iteract and run Provenance Java based contracts.

The newest version!
package io.p8e.grpc.client

import io.grpc.ManagedChannel
import io.p8e.proto.ChaincodeGrpc
import io.p8e.proto.Domain.SpecRequest
import java.util.concurrent.TimeUnit

class ChaincodeClient(
    channel: ManagedChannel,
    interceptor: ChallengeResponseInterceptor,
    private val deadlineMs: Long
) {
    private val client = ChaincodeGrpc.newBlockingStub(channel)
        .withInterceptors(interceptor)

    fun addSpec(
        specRequest: SpecRequest
    ) {
        client.withDeadlineAfter(deadlineMs, TimeUnit.MILLISECONDS)
            .addSpec(specRequest)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy