mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Port of notary query API from ENT (#6837)
This commit is contained in:
parent
47baba3650
commit
ec92801904
@ -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>
|
||||
|
@ -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?)
|
||||
}
|
Loading…
Reference in New Issue
Block a user