diff --git a/changelog.md b/CHANGELOG.md similarity index 80% rename from changelog.md rename to CHANGELOG.md index 64d30a7b..72cc00d8 100644 --- a/changelog.md +++ b/CHANGELOG.md @@ -1,81 +1,13 @@ +# 0.17.0-alpha.3 +- [#602] Improve error logging for InitializerError and RustWeldingError + # 0.17.0-alpha.2 - [#579] Fix database lock - [#592] Fix various tests and deleted some that are not useful anymore - [#581] getTransparentBalanceForAccount error not handled + # 0.17.0-alpha.1 -## Changes to Demo APP -The demo application now uses the SDKSynchronizer to create addresses and -shield funds. -`DerivationToolViewController` was removed. See `DerivationTool` unit tests -for sample code. -`GetAddressViewController` now derives transparent and sapling addresses -from Unified Address -`SendViewController` uses Unified Spending Key and type-safe `Memo` - -## Changes To SDK -### `CompactBlockProcessor` -`public func getUnifiedAddress(accountIndex: Int) -> UnifiedAddress?` -`public func getSaplingAddress(accountIndex: Int) -> SaplingAddress?` derived from UA -`public func getTransparentAddress(accountIndex: Int) -> TransparentAddress?` -is derived from UA -`public func getTransparentBalance(accountIndex: Int) throws -> WalletBalance` now -fetches from account exclusively -`func refreshUTXOs(tAddress: TransparentAddress, startHeight: BlockHeight) async throws -> RefreshedUTXOs` -uses `TransparentAddress` - -### Initializer -Migration of DataDB and CacheDB are delegated to `librustzcash` - -removed `public func getAddress(index account: Int = 0) -> String` - - -### Wallet Types -`UnifiedSpendingKey` to represent Unified Spending Keys. This is a binary -encoded not meant to be stored or backed up. This only serves the purpuse -of letting clients use the least priviledge keys at all times for every -operation. - -### Synchronizer -`sendToAddress` and `shieldFunds` now take a `UnifiedSpendingKey` instead -of the respective spending and transparent private keys. -`refreshUTXOs` uses `TransparentAddress` - -### KeyDeriving protocol -Addresses should be obtained from the `Synchronizer` by using the `get_address` functions -Transparent and Sapling receivers should be obtained by extracting the receivers of a UA -````Swift -public extension UnifiedAddress { - /// Extracts the sapling receiver from this UA if available - /// - Returns: an `Optional` - func saplingReceiver() -> SaplingAddress? { - try? DerivationTool.saplingReceiver(from: self) - } - - /// Extracts the transparent receiver from this UA if available - /// - Returns: an `Optional` - func transparentReceiver() -> TransparentAddress? { - try? DerivationTool.transparentReceiver(from: self) - } -```` - -**Removed** -`func deriveUnifiedFullViewingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [UnifiedFullViewingKey]` -`func deriveViewingKey(spendingKey: SaplingExtendedSpendingKey) throws -> SaplingExtendedFullViewingKey` -`func deriveSpendingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [SaplingExtendedSpendingKey]` -`func deriveUnifiedAddress(from ufvk: UnifiedFullViewingKey) throws -> UnifiedAddress` -`func deriveTransparentAddress(seed: [UInt8], account: Int, index: Int) throws -> TransparentAddress` -`func deriveTransparentAccountPrivateKey(seed: [UInt8], account: Int) throws -> TransparentAccountPrivKey` -`func deriveTransparentAddressFromAccountPrivateKey(_ xprv: TransparentAccountPrivKey, index: Int) throws -> TransparentAddress` - -**Added** -`static func saplingReceiver(from unifiedAddress: UnifiedAddress) throws -> SaplingAddress?` -`static func transparentReceiver(from unifiedAddress: UnifiedAddress) throws -> TransparentAddress?` -`static func receiverTypecodesFromUnifiedAddress(_ address: UnifiedAddress) throws -> [UnifiedAddress.ReceiverTypecodes]` -`func deriveUnifiedSpendingKey(seed: [UInt8], accountIndex: Int) throws -> UnifiedSpendingKey` -`public func deriveUnifiedFullViewingKey(from spendingKey: UnifiedSpendingKey) throws -> UnifiedFullViewingKey` - - - +See MIGRATING.md # 0.16.10-beta - [#532] [0.16.x-beta] Download does not stop correctly diff --git a/MIGRATING.md b/MIGRATING.md new file mode 100644 index 00000000..25b03e0f --- /dev/null +++ b/MIGRATING.md @@ -0,0 +1,74 @@ +# Migrating from 0.16.x-beta to 0.17.0-alpha.x + +## Changes to Demo APP +The demo application now uses the SDKSynchronizer to create addresses and +shield funds. +`DerivationToolViewController` was removed. See `DerivationTool` unit tests +for sample code. +`GetAddressViewController` now derives transparent and sapling addresses +from Unified Address +`SendViewController` uses Unified Spending Key and type-safe `Memo` + +## Changes To SDK +### `CompactBlockProcessor` +`public func getUnifiedAddress(accountIndex: Int) -> UnifiedAddress?` +`public func getSaplingAddress(accountIndex: Int) -> SaplingAddress?` derived from UA +`public func getTransparentAddress(accountIndex: Int) -> TransparentAddress?` +is derived from UA +`public func getTransparentBalance(accountIndex: Int) throws -> WalletBalance` now +fetches from account exclusively +`func refreshUTXOs(tAddress: TransparentAddress, startHeight: BlockHeight) async throws -> RefreshedUTXOs` +uses `TransparentAddress` + +### Initializer +Migration of DataDB and CacheDB are delegated to `librustzcash` + +removed `public func getAddress(index account: Int = 0) -> String` + + +### Wallet Types +`UnifiedSpendingKey` to represent Unified Spending Keys. This is a binary +encoded not meant to be stored or backed up. This only serves the purpuse +of letting clients use the least priviledge keys at all times for every +operation. + +### Synchronizer +`sendToAddress` and `shieldFunds` now take a `UnifiedSpendingKey` instead +of the respective spending and transparent private keys. +`refreshUTXOs` uses `TransparentAddress` + +### KeyDeriving protocol +Addresses should be obtained from the `Synchronizer` by using the `get_address` functions +Transparent and Sapling receivers should be obtained by extracting the receivers of a UA +````Swift +public extension UnifiedAddress { + /// Extracts the sapling receiver from this UA if available + /// - Returns: an `Optional` + func saplingReceiver() -> SaplingAddress? { + try? DerivationTool.saplingReceiver(from: self) + } + + /// Extracts the transparent receiver from this UA if available + /// - Returns: an `Optional` + func transparentReceiver() -> TransparentAddress? { + try? DerivationTool.transparentReceiver(from: self) + } +```` + +**Removed** +`func deriveUnifiedFullViewingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [UnifiedFullViewingKey]` +`func deriveViewingKey(spendingKey: SaplingExtendedSpendingKey) throws -> SaplingExtendedFullViewingKey` +`func deriveSpendingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [SaplingExtendedSpendingKey]` +`func deriveUnifiedAddress(from ufvk: UnifiedFullViewingKey) throws -> UnifiedAddress` +`func deriveTransparentAddress(seed: [UInt8], account: Int, index: Int) throws -> TransparentAddress` +`func deriveTransparentAccountPrivateKey(seed: [UInt8], account: Int) throws -> TransparentAccountPrivKey` +`func deriveTransparentAddressFromAccountPrivateKey(_ xprv: TransparentAccountPrivKey, index: Int) throws -> TransparentAddress` + +**Added** +`static func saplingReceiver(from unifiedAddress: UnifiedAddress) throws -> SaplingAddress?` +`static func transparentReceiver(from unifiedAddress: UnifiedAddress) throws -> TransparentAddress?` +`static func receiverTypecodesFromUnifiedAddress(_ address: UnifiedAddress) throws -> [UnifiedAddress.ReceiverTypecodes]` +`func deriveUnifiedSpendingKey(seed: [UInt8], accountIndex: Int) throws -> UnifiedSpendingKey` +`public func deriveUnifiedFullViewingKey(from spendingKey: UnifiedSpendingKey) throws -> UnifiedFullViewingKey` + +