Class CommitmentTree

    • Method Detail

      • freeCommitmentTree

        public void freeCommitmentTree()
      • addScCr

        public boolean addScCr​(byte[] scId,
                               long amount,
                               byte[] pubKey,
                               byte[] txHash,
                               int outIdx,
                               int withdrawalEpochLength,
                               byte mcBtrRequestDataLength,
                               CustomFieldElementsConfig[] customFieldElementsConfigs,
                               CustomBitvectorElementsConfig[] customBitvectorElementsConfigs,
                               long btrFee,
                               long ftMinAmount,
                               byte[] customCreationData,
                               Optional<byte[]> constantOpt,
                               byte[] certVerificationKey,
                               Optional<byte[]> cswVerificationKeyOpt)
      • addFwt

        public boolean addFwt​(byte[] scId,
                              long amount,
                              byte[] pubKey,
                              byte[] mcReturnAddress,
                              byte[] txHash,
                              int outIdx)
      • addBtr

        public boolean addBtr​(byte[] scId,
                              long scFee,
                              byte[] mcDestinationAddress,
                              byte[][] scRequestData,
                              byte[] txHash,
                              int outIdx)
      • addCert

        public boolean addCert​(byte[] scId,
                               int epochNumber,
                               long quality,
                               BackwardTransfer[] btList,
                               Optional<byte[][]> customFieldsOpt,
                               byte[] endCumulativeScTxCommitmentTreeRoot,
                               long btrFee,
                               long ftMinAmount)
      • nativeAddCertLeaf

        public boolean nativeAddCertLeaf​(byte[] scId,
                                         byte[] leaf)
      • addCertLeaf

        public boolean addCertLeaf​(byte[] scId,
                                   byte[] leaf)
      • addCsw

        public boolean addCsw​(byte[] scId,
                              long amount,
                              byte[] nullifier,
                              byte[] mcPubKeyHash)
      • verifyScAbsence

        public static boolean verifyScAbsence​(byte[] scId,
                                              ScAbsenceProof absenceProof,
                                              FieldElement commitment)
      • getScCommitmentMerklePath

        public Optional<MerklePath> getScCommitmentMerklePath​(byte[] scId)
      • getFwtMerklePath

        public Optional<MerklePath> getFwtMerklePath​(byte[] scId,
                                                     int leafIndex)
      • getBtrMerklePath

        public Optional<MerklePath> getBtrMerklePath​(byte[] scId,
                                                     int leafIndex)
      • getCertMerklePath

        public Optional<MerklePath> getCertMerklePath​(byte[] scId,
                                                      int leafIndex)