Port of notary query API from ENT (#6837)

This commit is contained in:
Ramzi El-Yafi 2020-12-18 09:59:12 +00:00 committed by GitHub
parent 47baba3650
commit ec92801904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 1 deletions

View File

@ -9,4 +9,4 @@ package net.corda.common.logging
* (originally added to source control for ease of use)
*/
internal const val CURRENT_MAJOR_RELEASE = "4.8-SNAPSHOT"
internal const val CURRENT_MAJOR_RELEASE = "4.8-SNAPSHOT"

View File

@ -1162,6 +1162,7 @@
<ID>MatchingDeclarationName:NamedCache.kt$net.corda.core.internal.NamedCache.kt</ID>
<ID>MatchingDeclarationName:NetParams.kt$net.corda.netparams.NetParams.kt</ID>
<ID>MatchingDeclarationName:NetworkParametersServiceInternal.kt$net.corda.core.internal.NetworkParametersServiceInternal.kt</ID>
<ID>MatchingDeclarationName:NotaryQueries.kt$net.corda.nodeapi.notary.NotaryQueries.kt</ID>
<ID>MatchingDeclarationName:OGSwapPricingCcpExample.kt$net.corda.vega.analytics.example.OGSwapPricingCcpExample.kt</ID>
<ID>MatchingDeclarationName:OGSwapPricingExample.kt$net.corda.vega.analytics.example.OGSwapPricingExample.kt</ID>
<ID>MatchingDeclarationName:PlatformSecureRandom.kt$net.corda.core.crypto.internal.PlatformSecureRandom.kt</ID>

View File

@ -0,0 +1,30 @@
package net.corda.nodeapi.notary
import net.corda.core.contracts.StateRef
import net.corda.core.internal.notary.NotaryService
import net.corda.core.serialization.CordaSerializable
import java.time.Instant
/**
* Implementations of queries supported by notary services
*/
class SpentStateQuery {
@CordaSerializable
data class Request(val stateRef: StateRef,
val maxResults: Int,
val successOnly: Boolean,
val startTime: Instant?,
val endTime: Instant?,
val lastTxId: String?) : NotaryService.Query.Request
@CordaSerializable
data class Result(val spendEvents: List<SpendEventDetails>,
val moreResults: Boolean): NotaryService.Query.Result
@CordaSerializable
data class SpendEventDetails(val requestTimestamp: Instant,
val transactionId: String,
val result: String,
val requestingPartyName: String?,
val workerNodeX500Name: String?)
}