-
- All Implemented Interfaces:
-
cash.z.ecc.android.sdk.internal.Backend
public final class FakeRustBackend implements Backend
-
-
Field Summary
Fields Modifier and Type Field Description private final FiledataDbFileprivate final IntegernetworkIdprivate final List<JniBlockMeta>metadata
-
Constructor Summary
Constructors Constructor Description FakeRustBackend(Integer networkId, List<JniBlockMeta> metadata)
-
Method Summary
-
-
Constructor Detail
-
FakeRustBackend
FakeRustBackend(Integer networkId, List<JniBlockMeta> metadata)
-
-
Method Detail
-
getDataDbFile
File getDataDbFile()
-
getNetworkId
Integer getNetworkId()
-
getMetadata
final List<JniBlockMeta> getMetadata()
-
writeBlockMetadata
Unit writeBlockMetadata(List<JniBlockMeta> blockMetadata)
-
rewindToHeight
JniRewindResult rewindToHeight(Long height)
-
putSubtreeRoots
Unit putSubtreeRoots(Long saplingStartIndex, List<JniSubtreeRoot> saplingRoots, Long orchardStartIndex, List<JniSubtreeRoot> orchardRoots)
-
updateChainTip
Unit updateChainTip(Long height)
-
getFullyScannedHeight
Long getFullyScannedHeight()
Returns the height to which the wallet has been fully scanned.
This is the height for which the wallet has fully trial-decrypted this and all preceding blocks above the wallet's birthday height.
-
getMaxScannedHeight
Long getMaxScannedHeight()
Returns the maximum height that the wallet has scanned.
If the wallet is fully synced, this will be equivalent to
getFullyScannedHeight; otherwise the maximal scanned height is likely to be greater than the fully scanned height due to the fact that out-of-order scanning can leave gaps.
-
getWalletSummary
JniWalletSummary getWalletSummary()
-
suggestScanRanges
List<JniScanRange> suggestScanRanges()
-
getLatestCacheHeight
Long getLatestCacheHeight()
-
getTotalTransparentBalance
Long getTotalTransparentBalance(String address)
-
setTransactionStatus
Unit setTransactionStatus(ByteArray txId, Long status)
-
findBlockMetadata
JniBlockMeta findBlockMetadata(Long height)
-
rewindBlockMetadataToHeight
Unit rewindBlockMetadataToHeight(Long height)
-
initBlockMetaDb
Integer initBlockMetaDb()
-
proposeTransferFromUri
ProposalUnsafe proposeTransferFromUri(ByteArray accountUuid, String uri)
-
proposeTransfer
ProposalUnsafe proposeTransfer(ByteArray accountUuid, String to, Long value, ByteArray memo)
-
proposeShielding
ProposalUnsafe proposeShielding(ByteArray accountUuid, Long shieldingThreshold, ByteArray memo, String transparentReceiver)
-
createProposedTransactions
List<ByteArray> createProposedTransactions(ProposalUnsafe proposal, ByteArray unifiedSpendingKey)
-
createPcztFromProposal
ByteArray createPcztFromProposal(ByteArray accountUuid, ProposalUnsafe proposal)
Creates a partially-created (unsigned without proofs) transaction from the given proposal.
Do not call this multiple times in parallel, or you will generate PCZT instances that, if finalized, would double-spend the same notes.
-
redactPcztForSigner
ByteArray redactPcztForSigner(ByteArray pczt)
Redacts information from the given PCZT that is unnecessary for the Signer role.
-
pcztRequiresSaplingProofs
Boolean pcztRequiresSaplingProofs(ByteArray pczt)
Checks whether the caller needs to have downloaded the Sapling parameters.
-
addProofsToPczt
ByteArray addProofsToPczt(ByteArray pczt)
Adds proofs to the given PCZT.
-
extractAndStoreTxFromPczt
ByteArray extractAndStoreTxFromPczt(ByteArray pcztWithProofs, ByteArray pcztWithSignatures)
Takes a PCZT that has been separately proven and signed, finalizes it, and stores it in the wallet.
-
decryptAndStoreTransaction
ByteArray decryptAndStoreTransaction(ByteArray tx, Long minedHeight)
-
initDataDb
Integer initDataDb(ByteArray seed)
Sets up the internal structure of the data database.
If
seedisnull, database migrations will be attempted without it.
-
getAccounts
List<JniAccount> getAccounts()
-
getAccountForUfvk
JniAccount getAccountForUfvk(String ufvk)
-
createAccount
JniAccountUsk createAccount(String accountName, String keySource, ByteArray seed, ByteArray treeState, Long recoverUntil)
-
importAccountUfvk
JniAccount importAccountUfvk(String accountName, String keySource, String ufvk, ByteArray treeState, Long recoverUntil, Integer purpose, ByteArray seedFingerprint, Long zip32AccountIndex)
-
isSeedRelevantToAnyDerivedAccounts
Boolean isSeedRelevantToAnyDerivedAccounts(ByteArray seed)
-
isValidSaplingAddr
Boolean isValidSaplingAddr(String addr)
-
isValidTransparentAddr
Boolean isValidTransparentAddr(String addr)
-
isValidUnifiedAddr
Boolean isValidUnifiedAddr(String addr)
-
isValidTexAddr
Boolean isValidTexAddr(String addr)
-
getCurrentAddress
String getCurrentAddress(ByteArray accountUuid)
-
getSingleUseTransparentAddress
JniSingleUseTransparentAddress getSingleUseTransparentAddress(ByteArray accountUuid)
-
getNextAvailableAddress
String getNextAvailableAddress(ByteArray accountUuid, Integer receiverFlags)
-
getTransparentReceiver
String getTransparentReceiver(String ua)
-
getSaplingReceiver
String getSaplingReceiver(String ua)
-
listTransparentReceivers
List<String> listTransparentReceivers(ByteArray accountUuid)
-
getBranchIdForHeight
Long getBranchIdForHeight(Long height)
-
getMemoAsUtf8
String getMemoAsUtf8(ByteArray txId, Integer protocol, Integer outputIndex)
-
scanBlocks
<ERROR CLASS> scanBlocks(Long fromHeight, ByteArray fromState, Long limit)
-
transactionDataRequests
List<JniTransactionDataRequest> transactionDataRequests()
-
fixWitnesses
Unit fixWitnesses()
This function calls
check_witnessesandqueue_rescansfrom the underlying librustzcash internally. This method is intended for repairing wallets that broke due to bugs inshardtree.check_witnesses: It attempts to construct a witness for each note belonging to the wallet that is believed by the wallet to currently be spendable, and returns a vector of the ranges that must be rescanned in order to correct missing witness data.queue_rescans: Updates the scan queue by inserting scan ranges for the given range of block heights, with the specified scanning priority.
-
-
-
-