Skip to content

Commit

Permalink
Release/v4.0.0 (#120)
Browse files Browse the repository at this point in the history
* Updating changelog and javadoc for 4.0.0

* Updating version number for 4.0.0

* Update date

* Removing space at start of file
  • Loading branch information
dolanbernard authored Jan 6, 2023
1 parent 1f98c41 commit ed21cdc
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
30 changes: 27 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.0] - 2023-01-06

### Added
- Added `Rng` with two default implementations
- Added ability to provide `Rng` for calls to `MobileCoinClient.prepareTransaction`
- Added `SignedContingentInput`s which can be used on block version >= 3 networks to quantities of two different tokens
- Added `DestinationWithPaymentRequestMemo` and `DestinationWithPaymentRequestMemoData`
- Added `DestinationWithPaymentIntentMemo` and `DestinationWithPaymentIntentMemo`
- Added `SenderWithPaymentIntentMemo` and `SenderWithPaymentIntentMemoData`
- Added `OwnedTxOut.getSubaddressIndex`
- Added methods to get unvalidated `MemoData` of `SenderMemo`, `SenderWithPaymentRequestMemo`, and `SenderWithPaymentIntentMemo`

### Changed
- Updated bindings to version 2.0.0
- Updated okhttp to version 3.11.0

### Fixes
- Fixed insecure transport protocol using TLS
- Fixed connection reset errors in HTTP clients

### Upgrading

No code changes are *required* to upgrade from 1.2.2.4 to 4.0.0

## [1.2.2.4] - 2022-08-24

### Changed

- Balance checking algorithm performance improvements
- Balance checking algorithm performance improvements

### Fixes

- Query size calculation in `DefaultFogQueryScalingStrategy`
- Query size calculation in `DefaultFogQueryScalingStrategy`

### Upgrading

Expand Down Expand Up @@ -152,7 +176,7 @@ can be used to satisfy this requirement and is reverse compatible with network v

## [1.0.1-pre4] - 2020-01-04
### Added
- Estimate total fee in AccountSnapshot
- Estimate total fee in AccountSnapshot
- SLIP-10 AccountKey derivation
- New `AccountKey` constructors: `fromBip39Entropy` and `fromMnemonicPhrase`
- Build on Apple Silicon
Expand Down
2 changes: 1 addition & 1 deletion android-sdk/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'maven-publish'

version '4.0.0-pre1'
version '4.0.0'
group 'com.mobilecoin'

Properties properties = new Properties()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Amount getTransferableAmount(@NonNull TokenId tokenId) throws NetworkException,

/**
* Creates a {@link SignedContingentInput} to swap the two provided {@link Amount}s.
* Most of the time, the recipient of the contingent amountToReceive will be the user building the
* {@link SignedContingentInput}. In such cases, {@link MobileCoinTransactionClient#createSignedContingentInput(Amount, Amount)}
* can be used. This method is provided for cases where the user providing the reward would like the
* amountToReceive to be sent to a different wallet.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param amountToSend the {@link Amount} that is provided by the client calling this method contingent on the amountToReceive being provided
* @param amountToReceive the {@link Amount} that will be sent from the fulfilling party to the provided {@link PublicAddress}
Expand Down Expand Up @@ -76,6 +82,8 @@ SignedContingentInput createSignedContingentInput(
/**
* Creates a {@link SignedContingentInput} to swap the two provided {@link Amount}s.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param amountToSend the {@link Amount} that is provided by the client calling this method contingent on the amountToReceive being provided
* @param amountToReceive the {@link Amount} that will be sent from the fulfilling party to this {@link MobileCoinTransactionClient}
* @return a {@link SignedContingentInput} to swap the two provided {@link Amount}s
Expand Down Expand Up @@ -110,6 +118,8 @@ SignedContingentInput createSignedContingentInput(
* attempting to cancel the {@link SignedContingentInput} is not the user who created it, or if
* there is a network issue.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param presignedInput the {@link SignedContingentInput} to cancel
* @param fee the {@link Transaction} fee that must be paid to process the cancelation {@link Transaction}
* @return the result of the cancelation {@link Transaction}
Expand Down Expand Up @@ -141,6 +151,8 @@ SignedContingentInput.CancelationResult cancelSignedContingentInput(
* Upon completing the {@link Transaction}, the {@link SignedContingentInput} required {@link Amount} will be paid
* by this {@link MobileCoinTransactionClient} (see {@link SignedContingentInput#getRequiredAmount()}).
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param presignedInput the {@link SignedContingentInput} to fulfill with the {@link Transaction}
* @param fee the {@link Transaction} fee paid from the reward amount of this {@link SignedContingentInput}
* @return the {@link Transaction} to submit in order to fulfill this {@link SignedContingentInput}
Expand Down Expand Up @@ -180,6 +192,8 @@ Transaction prepareTransaction(
* Upon completing the {@link Transaction}, the {@link SignedContingentInput} required {@link Amount} will be paid
* by this {@link MobileCoinTransactionClient} (see {@link SignedContingentInput#getRequiredAmount()}).
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param presignedInput the {@link SignedContingentInput} to fulfill with the {@link Transaction}
* @param fee the {@link Transaction} fee paid from the reward amount of this {@link SignedContingentInput}
* @param rng the {@link Rng} to use for building the {@link Transaction}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* This is accomplished by spending the input that was previously signed by sending it back to the user that signed it.
* In order for the transaction to be accepted, a transaction fee will be required.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @see <a href="https://github.com/mobilecoinfoundation/mcips/blob/main/text/0031-transactions-with-contingent-inputs.md">Signed Contingent Inputs</a>
* @see MobileCoinTransactionClient#createSignedContingentInput(Amount, Amount)
* @see MobileCoinTransactionClient#createSignedContingentInput(Amount, Amount, PublicAddress)
Expand Down Expand Up @@ -69,6 +71,8 @@ Amount getChangeAmount() {
* and fulfills this {@link SignedContingentInput}. This {@link Amount} (minus any {@link Transaction} fees)
* can be kept by the fulfilling party and is provided by the builder of this {@link SignedContingentInput}.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @return the {@link Amount} rewarded to the fulfilling party of this {@link SignedContingentInput}
* @see SignedContingentInput#getRequiredAmount()
* @see SignedContingentInput
Expand All @@ -94,6 +98,8 @@ public Amount getRewardAmount() {
* If not {@link PublicAddress} is specified, the {@link Amount} is sent back to the user who built
* this {@link SignedContingentInput}.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @return the {@link Amount} that must be provided in order to fulfill this {@link SignedContingentInput}
* @see SignedContingentInput#getRewardAmount()
* @see SignedContingentInput
Expand All @@ -116,6 +122,9 @@ public Amount getRequiredAmount() {
* Serializes this {@link SignedContingentInput} to a byte array. The resultant byte array can be transmitted
* or shared with another client. A client receiving a serialized {@link SignedContingentInput} can recover the
* object using {@link SignedContingentInput#fromByteArray(byte[])}.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @return a byte array containing all of the data in this {@link SignedContingentInput}
* @throws SerializationException if an {@link Exception} is encountered during serialization
* @see SignedContingentInput
Expand All @@ -137,6 +146,8 @@ public byte[] toByteArray() throws SerializationException {
* array cannot be deserialized as a {@link SignedContingentInput}, a {@link SerializationException}
* will be thrown.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @param serializedBytes a byte array representing a serialized {@link SignedContingentInput}
* @return a {@link SignedContingentInput} that is strictly equal to the one originally serialized
* @throws SerializationException if the byte array does not represent a serialized {@link SignedContingentInput}
Expand All @@ -155,6 +166,8 @@ public static SignedContingentInput fromByteArray(@NonNull final byte[] serializ
* Conversely, an invalid {@link SignedContingentInput} will not be able to be spent. This could be
* due to the data becoming corrupted or being built using an incompatible client.
*
* This functionality is only supported on networks with block version 3 or higher
*
* @return true if this {@link SignedContingentInput} is valid, false otherwise
* @see MobileCoinTransactionClient#prepareTransaction(SignedContingentInput, Amount)
* @see MobileCoinTransactionClient#prepareTransaction(SignedContingentInput, Amount, Rng rng)
Expand Down

0 comments on commit ed21cdc

Please sign in to comment.