Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package daml
    Definition Classes
    com
  • package ledger
    Definition Classes
    daml
  • package participant
    Definition Classes
    ledger
  • package state
    Definition Classes
    participant
  • package v1

    Interfaces to read from and write to an (abstract) participant state.

    Interfaces to read from and write to an (abstract) participant state.

    A Daml ledger participant is code that allows to actively participate in the evolution of a shared Daml ledger. Each such participant maintains a particular view onto the state of the Daml ledger. We call this view the participant state.

    Actual implementations of a Daml ledger participant will likely maintain more state than what is exposed through the interfaces in this package, which is why we talk about an abstract participant state. It abstracts over the different implementations of Daml ledger participants.

    The interfaces are optimized for easy implementation. The v1.WriteService interface contains the methods for changing the participant state (and potentially the state of the Daml ledger), which all ledger participants must support. These methods are for example exposed via the Daml Ledger API. Actual ledger participant implementations likely support more implementation-specific methods. They are however not exposed via the Daml Ledger API. The v1.ReadService interface contains the one method v1.ReadService.stateUpdates to read the state of a ledger participant. It represents the participant state as a stream of v1.Updates to an initial participant state. The typical consumer of this method is a class that subscribes to this stream of v1.Updates and reconstructs (a view of) the actual participant state. See the comments on v1.Update and v1.ReadService.stateUpdates for details about the kind of updates and the guarantees given to consumers of the stream of v1.Updates.

    We provide a reference implementation of a participant state in com.daml.ledger.on.memory.InMemoryLedgerReaderWriter. There we model an in-memory ledger, which has by construction a single participant, which hosts all parties. See its comments for details on how that is done, and how its implementation can be used as a blueprint for implementing your own participant state.

    We do expect the interfaces provided in com.daml.ledger.participant.state to evolve, which is why we provide them all in the com.daml.ledger.participant.state.v1 package. Where possible we will evolve them in a backwards compatible fashion, so that a simple recompile suffices to upgrade to a new version. Where that is not possible, we plan to introduce new version of this API in a separate package and maintain it side-by-side with the existing version if possible. There can therefore potentially be multiple versions of participant state APIs at the same time. We plan to deprecate and drop old versions on separate and appropriate timelines.

    Definition Classes
    state
  • DivulgedContract
  • PruningResult
  • ReadService
  • RejectionReason
  • RejectionReasonV0
  • SubmissionResult
  • SubmitterInfo
  • TransactionMeta
  • Update
  • Version
  • WriteConfigService
  • WritePackagesService
  • WriteParticipantPruningService
  • WritePartyService
  • WriteService
t

com.daml.ledger.participant.state.v1

WritePackagesService

trait WritePackagesService extends AnyRef

An interface for uploading packages via a participant.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WritePackagesService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def uploadPackages(submissionId: SubmissionId, archives: List[Archive], sourceDescription: Option[String])(implicit telemetryContext: TelemetryContext): CompletionStage[SubmissionResult]

    Upload a collection of Daml-LF packages to the ledger.

    Upload a collection of Daml-LF packages to the ledger.

    This method must be thread-safe, not throw, and not block on IO. It is though allowed to perform significant computation.

    Successful archives upload will result in a Update.PublicPackageUpload message. See the comments on ReadService.stateUpdates and Update for further details.

    Note: we accept Archives rather than parsed packages, because we want to be able to get the byte size of each individual ArchivePayload, which is information that the read / index service need to provide. Moreover this information should be consistent with the payload that the com.daml.ledger.api.v1.package_service.GetPackageResponse contains. If we were to consume packages we'd have to re-encode them to provide the size, and the size might potentially be different from the original size, which would be quite confusing.

    submissionId

    Submitter chosen submission identifier.

    archives

    Daml-LF archives to be uploaded to the ledger.

    sourceDescription

    Description provided by the backing participant describing where it got the package from, e.g., when, where, or by whom the packages were uploaded.

    telemetryContext

    An implicit context for tracing.

    returns

    an async result of a SubmissionResult

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped