Class ConfidentialLedgerBaseClient


  • public final class ConfidentialLedgerBaseClient
    extends Object
    Initializes a new instance of the ConfidentialLedgerBaseClient type.
    • Method Detail

      • getConstitution

        public DynamicRequest getConstitution()
        The constitution is a script that assesses and applies proposals from consortium members.

        Response Body Schema

        
         {
             digest: String
             script: String
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getConsortiumMembers

        public DynamicRequest getConsortiumMembers()
        Consortium members can manage the Confidential Ledger.

        Response Body Schema

        
         {
             members: [
                 {
                     certificate: String
                     id: String
                 }
             ]
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getEnclaveQuotes

        public DynamicRequest getEnclaveQuotes()
        A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.

        Response Body Schema

        
         {
             currentNodeId: String
             enclaveQuotes: {
                 String: {
                     nodeId: String
                     mrenclave: String
                     quoteVersion: String
                     raw: String
                 }
             }
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getLedgerEntries

        public DynamicRequest getLedgerEntries()
        A sub-ledger id may optionally be specified. Only entries in the specified (or default) sub-ledger will be returned.

        Optional Query Parameters

        Optional Query Parameters
        NameTypeDescription
        subLedgerIdStringThe sub-ledger id.
        fromTransactionIdStringSpecify the first transaction ID in a range.
        toTransactionIdStringSpecify the last transaction ID in a range.

        Response Body Schema

        
         {
             state: String(Loading/Ready)
             nextLink: String
             entries: [
                 {
                     contents: String
                     subLedgerId: String
                     transactionId: String
                 }
             ]
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • postLedgerEntry

        public DynamicRequest postLedgerEntry()
        A sub-ledger id may optionally be specified.

        Optional Query Parameters

        Optional Query Parameters
        NameTypeDescription
        subLedgerIdStringThe sub-ledger id.

        Request Body Schema

        
         {
             contents: String
             subLedgerId: String
             transactionId: String
         }
         

        Response Body Schema

        
         {
             subLedgerId: String
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getLedgerEntry

        public DynamicRequest getLedgerEntry​(String transactionId)
        To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing.

        Optional Query Parameters

        Optional Query Parameters
        NameTypeDescription
        subLedgerIdStringThe sub-ledger id.

        Response Body Schema

        
         {
             state: String(Loading/Ready)
             entry: {
                 contents: String
                 subLedgerId: String
                 transactionId: String
             }
         }
         
        Parameters:
        transactionId - Identifies a write transaction.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getReceipt

        public DynamicRequest getReceipt​(String transactionId)
        Gets a receipt certifying ledger contents at a particular transaction id.

        Response Body Schema

        
         {
             receipt: {
                 leaf: String
                 nodeId: String
                 proof: [
                     {
                         left: String
                         right: String
                     }
                 ]
                 root: String
                 signature: String
             }
             state: String(Loading/Ready)
             transactionId: String
         }
         
        Parameters:
        transactionId - Identifies a write transaction.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getTransactionStatus

        public DynamicRequest getTransactionStatus​(String transactionId)
        Gets the status of an entry identified by a transaction id.

        Response Body Schema

        
         {
             state: String(Committed/Pending)
             transactionId: String
         }
         
        Parameters:
        transactionId - Identifies a write transaction.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getCurrentLedgerEntry

        public DynamicRequest getCurrentLedgerEntry()
        A sub-ledger id may optionally be specified.

        Optional Query Parameters

        Optional Query Parameters
        NameTypeDescription
        subLedgerIdStringThe sub-ledger id.

        Response Body Schema

        
         {
             contents: String
             subLedgerId: String
             transactionId: String
         }
         
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • deleteUser

        public DynamicRequest deleteUser​(String userId)
        Deletes a user from the Confidential Ledger.
        Parameters:
        userId - The user id, either an AAD object ID or certificate fingerprint.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getUser

        public DynamicRequest getUser​(String userId)
        Gets a user.

        Response Body Schema

        
         {
             assignedRole: String(Administrator/Contributor/Reader)
             userId: String
         }
         
        Parameters:
        userId - The user id, either an AAD object ID or certificate fingerprint.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • createOrUpdateUser

        public DynamicRequest createOrUpdateUser​(String userId)
        A JSON merge patch is applied for existing users.

        Request Body Schema

        
         {
             assignedRole: String(Administrator/Contributor/Reader)
             userId: String
         }
         

        Response Body Schema

        
         (recursive schema, see above)
         
        Parameters:
        userId - The user id, either an AAD object ID or certificate fingerprint.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • getLedgerEntriesNext

        public DynamicRequest getLedgerEntriesNext​(String nextLink)
        Get the next page of items.

        Response Body Schema

        
         {
             state: String(Loading/Ready)
             nextLink: String
             entries: [
                 {
                     contents: String
                     subLedgerId: String
                     transactionId: String
                 }
             ]
         }
         
        Parameters:
        nextLink - The nextLink parameter.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.
      • invoke

        public DynamicRequest invoke()
        Create an empty DynamicRequest with the serializer and pipeline initialized for this client.
        Returns:
        a DynamicRequest where customizations can be made before sent to the service.