com.daml.ledger.api.testtool.infrastructure.participant
ParticipantTestContext
Companion object ParticipantTestContext
trait ParticipantTestContext extends UserManagementTestContext
- Alphabetic
- By Inheritance
- ParticipantTestContext
- UserManagementTestContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def activeContracts(parties: Option[Seq[Party]], activeAtOffsetO: Option[Long] = None, verbose: Boolean = true): Future[Vector[CreatedEvent]]
- abstract def activeContracts(request: GetActiveContractsRequest): Future[Vector[CreatedEvent]]
- abstract def activeContractsByTemplateId(templateIds: Seq[Identifier], parties: Option[Seq[Party]], activeAtOffsetO: Option[Long] = None, verbose: Boolean = true): Future[Vector[CreatedEvent]]
- abstract def activeContractsRequest(parties: Option[Seq[Party]], activeAtOffset: Long, templateIds: Seq[Identifier] = Seq.empty, interfaceFilters: Seq[(Identifier, IncludeInterfaceView)] = Seq.empty, verbose: Boolean = true): GetActiveContractsRequest
- abstract def adminEndpoint: ChannelEndpoint
- abstract def allocateExternalParties(partiesCount: Int, minSynchronizers: Int): Future[Vector[ExternalParty]]
- abstract def allocateExternalParty(request: AllocateExternalPartyRequest, minSynchronizers: Option[Int] = None): Future[Party]
- abstract def allocateExternalPartyFromHint(partyIdHint: Option[String] = None, minSynchronizers: Int = 1): Future[ExternalParty]
- abstract def allocateExternalPartyRequest(keyPair: KeyPair, partyIdHint: Option[String] = None, synchronizer: String = ""): Future[AllocateExternalPartyRequest]
- abstract def allocateParties(n: Int, minSynchronizers: Int): Future[Vector[Party]]
- abstract def allocateParty(req: AllocatePartyRequest, connectedSynchronizers: Int): Future[(AllocatePartyResponse, Seq[String])]
- abstract def allocateParty(partyIdHint: Option[String] = None, localMetadata: Option[ObjectMeta] = None, identityProviderId: Option[String] = None, minSynchronizers: Option[Int] = None, userId: String = ""): Future[Party]
Non managed version of party allocation.
Non managed version of party allocation. Use exclusively when testing the party management service.
- abstract def allocateParty(): Future[Party]
Managed version of party allocation, should be used anywhere a party has to be allocated unless the party management service itself is under test
- abstract def checkHealth(): Future[HealthCheckResponse]
- abstract def completionStreamRequest(from: Long = referenceOffset)(parties: Party*): CompletionStreamRequest
- abstract def completions(within: NonNegativeFiniteDuration, request: CompletionStreamRequest): Future[Vector[CompletionResponse]]
- abstract def connectedSynchronizers(): Future[Seq[String]]
- abstract def create[TCid <: ContractId[T], T <: Template](actAs: List[Party], readAs: List[Party], template: T)(implicit companion: ContractCompanion[_, TCid, T]): Future[TCid]
- abstract def create[TCid <: ContractId[T], T <: Template](party: Party, template: T)(implicit companion: ContractCompanion[_, TCid, T]): Future[TCid]
- abstract def createAndGetUpdateId[TCid <: ContractId[T], T <: Template](party: Party, template: T)(implicit companion: ContractCompanion[_, TCid, T]): Future[(String, TCid)]
- abstract def currentEnd(): Future[Long]
Gets the absolute offset of the ledger end at a point in time.
- abstract def delayMechanism: DelayMechanism
- abstract val endpointId: String
- abstract def eventFormat(verbose: Boolean, parties: Option[Seq[Party]], templateIds: Seq[Identifier] = Seq.empty, interfaceFilters: Seq[(Identifier, IncludeInterfaceView)] = Seq.empty): EventFormat
Create an EventFormat with a set of Party objects.
Create an EventFormat with a set of Party objects.
You should use this only when you need to tweak the request of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, otherwise use the shortcut override that allows you to directly pass a set of Party
- abstract def executeSubmission(executeSubmissionRequest: ExecuteSubmissionRequest): Future[ExecuteSubmissionResponse]
- abstract def executeSubmissionAndWait(executeSubmissionAndWaitRequest: ExecuteSubmissionAndWaitRequest): Future[ExecuteSubmissionAndWaitResponse]
- abstract def executeSubmissionAndWaitForTransaction(executeSubmissionAndWaitForTransactionRequest: ExecuteSubmissionAndWaitForTransactionRequest): Future[ExecuteSubmissionAndWaitForTransactionResponse]
- abstract def executeSubmissionAndWaitForTransactionRequest(party: ExternalParty, preparedTx: PrepareSubmissionResponse, transactionFormat: Option[TransactionFormat]): ExecuteSubmissionAndWaitForTransactionRequest
- abstract def executeSubmissionAndWaitRequest(party: ExternalParty, preparedTx: PrepareSubmissionResponse): ExecuteSubmissionAndWaitRequest
- abstract def executeSubmissionRequest(party: ExternalParty, preparedTx: PrepareSubmissionResponse): ExecuteSubmissionRequest
- abstract def exercise[T](actAs: List[Party], readAs: List[Party], exercise: Update[T]): Future[Transaction]
- abstract def exercise[T](party: Party, exercise: Update[T], transactionShape: TransactionShape = LedgerEffects, verbose: Boolean = true): Future[Transaction]
- abstract def exerciseAndGetContract[TCid <: ContractId[T], T](party: Party, exercise: Update[Exercised[TCid]])(implicit companion: ContractCompanion[_, TCid, T]): Future[TCid]
- abstract def exerciseAndGetContractNoDisclose[TCid <: ContractId[_]](party: Party, exercise: Update[Exercised[Unit]])(implicit companion: ContractCompanion[_, TCid, _]): Future[TCid]
- abstract def exerciseByKey(party: Party, template: Identifier, key: Value, choice: String, argument: Value): Future[Transaction]
- abstract def features: Features
- abstract def filters(templateIds: Seq[Identifier] = Seq.empty, interfaceFilters: Seq[(Identifier, IncludeInterfaceView)] = Seq.empty): Filters
- abstract def findCompletion(parties: Party*)(p: (Completion) => Boolean): Future[Option[Completion]]
- abstract def findCompletion(request: CompletionStreamRequest)(p: (Completion) => Boolean): Future[Option[Completion]]
- abstract def findCompletionAtOffset(offset: Long, p: (Completion) => Boolean)(parties: Party*): Future[Option[Completion]]
- abstract def firstCompletions(parties: Party*): Future[Vector[Completion]]
- abstract def firstCompletions(request: CompletionStreamRequest): Future[Vector[Completion]]
- abstract def generateExternalPartyTopology(req: GenerateExternalPartyTopologyRequest): Future[GenerateExternalPartyTopologyResponse]
- abstract def generateExternalPartyTopologyRequest(namespacePublicKey: Array[Byte], partyIdHint: Option[String] = None): Future[GenerateExternalPartyTopologyResponse]
- abstract def getConnectedSynchronizers(party: Option[Party], participantId: Option[String], identityProviderId: Option[String] = None): Future[Set[String]]
- abstract def getEventsByContractId(request: GetEventsByContractIdRequest): Future[GetEventsByContractIdResponse]
- abstract def getPackage(packageId: String): Future[GetPackageResponse]
- abstract def getPackageStatus(packageId: String): Future[PackageStatus]
- abstract def getParticipantId(): Future[String]
- abstract def getParties(parties: Seq[Party]): Future[Seq[PartyDetails]]
- abstract def getParties(req: GetPartiesRequest): Future[GetPartiesResponse]
- abstract def getPreferredPackageVersion(parties: Seq[Party], packageName: String, vettingValidAt: Option[Instant] = None, synchronizerIdO: Option[String] = None): Future[GetPreferredPackageVersionResponse]
- abstract def getPreferredPackages(vettingRequirements: Map[String, Seq[Party]], vettingValidAt: Option[Instant] = None, synchronizerIdO: Option[String] = None): Future[GetPreferredPackagesResponse]
- abstract def getTransactionsRequest(transactionFormat: TransactionFormat, begin: Long = referenceOffset): Future[GetUpdatesRequest]
- abstract def getTransactionsRequestWithEnd(transactionFormat: TransactionFormat, begin: Long = referenceOffset, end: Option[Long]): GetUpdatesRequest
- abstract def getUpdatesRequestWithEnd(transactionFormatO: Option[TransactionFormat] = None, reassignmentsFormatO: Option[EventFormat] = None, topologyFilterO: Option[Seq[Party]] = None, begin: Long = referenceOffset, end: Option[Long] = None): GetUpdatesRequest
- abstract def latestPrunedOffsets(): Future[(Long, Long)]
- abstract def ledgerEndpoint: Either[JsonApiEndpoint, ChannelEndpoint]
- abstract def listKnownPackages(): Future[Seq[PackageDetails]]
- abstract def listKnownParties(): Future[ListKnownPartiesResponse]
- abstract def listKnownParties(req: ListKnownPartiesRequest): Future[ListKnownPartiesResponse]
- abstract def listKnownPartiesExpanded(): Future[Set[Party]]
- abstract def listPackages(): Future[Seq[String]]
- abstract def listVettedPackages(request: ListVettedPackagesRequest): Future[ListVettedPackagesResponse]
- abstract def maxOffsetCheckpointEmissionDelay: NonNegativeFiniteDuration
- abstract def nextIdentityProviderId: () => String
- abstract def nextKeyId: () => String
- abstract def nextPartyId: () => String
- abstract def nextUserId: () => String
- abstract def offsetBeyondLedgerEnd(): Future[Long]
Returns an absolute offset (positive integer) that is beyond the current ledger end.
Returns an absolute offset (positive integer) that is beyond the current ledger end.
Note: the offset might not be valid for the underlying ledger. This method can therefore only be used for offsets that are only interpreted by the ledger API server and not sent to the ledger.
- abstract def offsets(n: Int, request: CompletionStreamRequest): Future[Vector[Long]]
- abstract def prepareSubmission(prepareSubmissionRequest: PrepareSubmissionRequest): Future[PrepareSubmissionResponse]
- abstract def prepareSubmissionRequest(party: Party, commands: List[Command], estimateTrafficCost: Option[CostEstimationHints] = None): PrepareSubmissionRequest
- abstract def prune(pruneUpTo: Long, attempts: Int = 10): Future[PruneResponse]
- abstract def pruneCantonSafe(pruneUpTo: Long, party: Party, dummyCommand: (Party) => List[Command])(implicit ec: ExecutionContext): Future[Unit]
We are retrying a command submission + pruning to get a safe-to-prune offset for Canton.
We are retrying a command submission + pruning to get a safe-to-prune offset for Canton. That's because in Canton pruning will fail unless ACS commitments have been exchanged between participants. To this end, repeatedly submitting commands is prompting Canton to exchange ACS commitments and allows the pruning call to eventually succeed.
- abstract def referenceOffset: Long
- abstract def setTime(currentTime: Instant, newTime: Instant): Future[Unit]
- abstract def submit(request: SubmitRequest): Future[Unit]
- abstract def submitAndWait(request: SubmitAndWaitRequest): Future[SubmitAndWaitResponse]
- abstract def submitAndWaitForTransaction(request: SubmitAndWaitForTransactionRequest): Future[SubmitAndWaitForTransactionResponse]
- abstract def submitAndWaitForTransactionRequest(party: Party, commands: List[Command], transactionShape: TransactionShape, filterParties: Option[Seq[Party]] = None, templateIds: Seq[Identifier] = Seq.empty, verbose: Boolean = true): SubmitAndWaitForTransactionRequest
- abstract def submitAndWaitForTransactionRequest(party: Party, commands: List[Command]): SubmitAndWaitForTransactionRequest
- abstract def submitAndWaitForTransactionRequest(actAs: List[Party], readAs: List[Party], commands: List[Command], transactionShape: TransactionShape): SubmitAndWaitForTransactionRequest
- abstract def submitAndWaitRequest(party: Party, commands: List[Command]): SubmitAndWaitRequest
- abstract def submitAndWaitRequest(actAs: List[Party], readAs: List[Party], commands: List[Command]): SubmitAndWaitRequest
- abstract def submitRequest(party: Party, commands: List[Command] = JList.of()): SubmitRequest
- abstract def submitRequest(actAs: List[Party], readAs: List[Party], commands: List[Command]): SubmitRequest
- abstract def submitRequestAndTolerateGrpcError[T](errorCode: ErrorCode, submitAndWaitGeneric: (ParticipantTestContext) => Future[T]): Future[T]
- abstract def time(): Future[Instant]
- abstract def topologyTransactionById(updateId: String, parties: Seq[Party]): Future[TopologyTransaction]
Managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):* for topology transactions, use this unless you need to tweak the request (i.e.
Managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):* for topology transactions, use this unless you need to tweak the request (i.e. to test low-level details). If the parties list is empty then no filtering is applied to the topology transactions.
- abstract def topologyTransactionByOffset(offset: Long, parties: Seq[Party]): Future[TopologyTransaction]
Managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):* for topology transactions, use this unless you need to tweak the request (i.e.
Managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):* for topology transactions, use this unless you need to tweak the request (i.e. to test low-level details). If the parties list is empty then no filtering is applied to the topology transactions.
- abstract def transactionById(updateId: String, parties: Seq[Party], transactionShape: TransactionShape = AcsDelta, templateIds: Seq[Identifier] = Seq.empty): Future[Transaction]
Managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):* for transactions, use this unless you need to tweak the request (i.e.
Managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):* for transactions, use this unless you need to tweak the request (i.e. to test low-level details)
- abstract def transactionByOffset(offset: Long, parties: Seq[Party], transactionShape: TransactionShape, templateIds: Seq[Identifier] = Seq.empty): Future[Transaction]
Managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):* for transactions, use this unless you need to tweak the request (i.e.
Managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):* for transactions, use this unless you need to tweak the request (i.e. to test low-level details)
- abstract def transactionFormat(parties: Option[Seq[Party]], templateIds: Seq[Identifier] = Seq.empty, interfaceFilters: Seq[(Identifier, IncludeInterfaceView)] = Seq.empty, transactionShape: TransactionShape = AcsDelta, verbose: Boolean = false): TransactionFormat
Create a TransactionFormat with a set of Party objects.
Create a TransactionFormat with a set of Party objects.
You should use this only when you need to tweak the request of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, otherwise use the shortcut override that allows you to directly pass a set of Party
- abstract def transactionTreeById(updateId: String, parties: Party*): Future[Transaction]
Managed version of transactionTrees, use this unless you need to tweak the request (i.e.
Managed version of transactionTrees, use this unless you need to tweak the request (i.e. to test low-level details)
- abstract def transactionTreeByOffset(offset: Long, parties: Party*): Future[Transaction]
Managed version of transactionTreeByOffset
- abstract def transactions(take: Int, transactionShape: TransactionShape, parties: Party*): Future[Vector[Transaction]]
- abstract def transactions(take: Int, request: GetUpdatesRequest): Future[Vector[Transaction]]
Non-managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this only if you need to tweak the request (i.e.
Non-managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this only if you need to tweak the request (i.e. to test low-level details)
- abstract def transactions(transactionShape: TransactionShape, parties: Party*): Future[Vector[Transaction]]
Managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this unless you need to tweak the request (i.e.
Managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this unless you need to tweak the request (i.e. to test low-level details)
- abstract def transactions(request: GetUpdatesRequest): Future[Vector[Transaction]]
Non-managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this only if you need to tweak the request (i.e.
Non-managed version of transactions(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdatesRequest):*, use this only if you need to tweak the request (i.e. to test low-level details)
- abstract def transactionsByTemplateId(templateId: Identifier, parties: Option[Seq[Party]]): Future[Vector[Transaction]]
- abstract def updateById(request: GetUpdateByIdRequest): Future[GetUpdateResponse]
Non-managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):*, use this only if you need to tweak the request (i.e.
Non-managed version of updateById(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByIdRequest):*, use this only if you need to tweak the request (i.e. to test low-level details)
- abstract def updateByOffset(request: GetUpdateByOffsetRequest): Future[GetUpdateResponse]
Non-managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):*, use this only if you need to tweak the request (i.e.
Non-managed version of updateByOffset(request:com\.daml\.ledger\.api\.v2\.update_service\.GetUpdateByOffsetRequest):*, use this only if you need to tweak the request (i.e. to test low-level details)
- abstract def updatePartyDetails(req: UpdatePartyDetailsRequest): Future[UpdatePartyDetailsResponse]
- abstract def updatePartyIdentityProviderId(request: UpdatePartyIdentityProviderIdRequest): Future[UpdatePartyIdentityProviderIdResponse]
- abstract def updateVettedPackages(request: UpdateVettedPackagesRequest): Future[UpdateVettedPackagesResponse]
- abstract def updates(within: NonNegativeFiniteDuration, request: GetUpdatesRequest): Future[Vector[Update]]
- abstract def updates(take: Int, request: GetUpdatesRequest, resultFilter: (GetUpdatesResponse) => Boolean): Future[Vector[Update]]
- abstract def updates(take: Int, request: GetUpdatesRequest): Future[Vector[Update]]
- abstract def uploadDarFile(request: UploadDarFileRequest): Future[Unit]
- abstract def uploadDarRequest(bytes: ByteString, synchronizerId: String): UploadDarFileRequest
- abstract val userId: String
- abstract def validateDarFile(request: ValidateDarFileRequest): Future[Unit]
- abstract def waitForPartiesOnOtherParticipants(otherParticipants: Iterable[ParticipantTestContext], expectedParties: Set[Party], connectedSynchronizers: Int): Future[Unit]
- returns
a future that completes when all the participants can list all the expected parties
- abstract def watchHealth(): Future[Seq[HealthCheckResponse]]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def activeContractsIds(request: GetActiveContractsRequest): Future[Vector[ContractId[Any]]]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val begin: Long
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createIdentityProviderConfig(request: CreateIdentityProviderConfigRequest): Future[CreateIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def createIdentityProviderConfig(identityProviderId: String = UUID.randomUUID().toString, isDeactivated: Boolean = false, issuer: String = UUID.randomUUID().toString, jwksUrl: String = "http://daml.com/jwks.json"): Future[CreateIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def createUser(createUserRequest: CreateUserRequest): Future[CreateUserResponse]
Creates a new user.
Creates a new user.
Additionally keeps track of the created users so that they can be cleaned up automatically when the test case ends.
- Definition Classes
- UserManagementTestContext
- def deleteCreateIdentityProviders(): Future[Unit]
- Definition Classes
- UserManagementTestContext
- def deleteCreatedUsers(): Future[Unit]
Intended to be called by the infrastructure code after a test case's execution has ended.
Intended to be called by the infrastructure code after a test case's execution has ended.
- Definition Classes
- UserManagementTestContext
- def deleteIdentityProviderConfig(request: DeleteIdentityProviderConfigRequest): Future[DeleteIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def deleteUser(request: DeleteUserRequest): Future[DeleteUserResponse]
Deletes a user.
Deletes a user.
Additionally keeps track of the created users so that they can be cleaned up automatically when the test case ends.
- Definition Classes
- UserManagementTestContext
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getIdentityProviderConfig(request: GetIdentityProviderConfigRequest): Future[GetIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listIdentityProviderConfig(): Future[ListIdentityProviderConfigsResponse]
- Definition Classes
- UserManagementTestContext
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def participantAuthorizationTransaction(partyIdSubstring: String, begin: Option[Long] = None, end: Option[Long] = None): Future[TopologyTransaction]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def updateIdentityProviderConfig(request: UpdateIdentityProviderConfigRequest): Future[UpdateIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def updateIdentityProviderConfig(identityProviderId: String = UUID.randomUUID().toString, isDeactivated: Boolean = false, issuer: String = UUID.randomUUID().toString, jwksUrl: String = "http://daml.com/jwks.json", updateMask: Option[FieldMask] = None): Future[UpdateIdentityProviderConfigResponse]
- Definition Classes
- UserManagementTestContext
- def uploadDarFileAndVetOnConnectedSynchronizers(bytes: ByteString): Future[Unit]
- def userManagement: UserManagementService
- Definition Classes
- UserManagementTestContext
- def validateDarFile(bytes: ByteString): Future[Unit]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()