Skip to content

Commit

Permalink
Merge branch 'main' into maven-link
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov authored Aug 20, 2024
2 parents a85c280 + 1674dba commit 9d07fc9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
46 changes: 46 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Breaking Changes Documentation

This document summarizes the breaking changes introduced in various releases of the repository. Each section corresponds to a specific release version, allowing users to review changes over time.

## v2.0.0

### Overview

This release introduces significant changes that may affect your project. Please review the breaking changes below before upgrading to the latest version of the SDK.

### Breaking Changes

#### 1. Introduction of the AccessApiCallResponse class

- Introduced a Success/Error wrapper for the responses from the `AccessApiImpl` and `AsyncAccessApiImpl` classes
- A detailed error message indicating a reason for the failed Access API call is now included in `Error.message`
- Previously a `null` return was used to indicate a failed call or lack of response; this has now been replaced with `AccessApiCallResponse.Error` in all instances

```shell
sealed class AccessApiCallResponse<out T> {
data class Success<out T>(val data: T) : AccessApiCallResponse<T>()
data class Error(val message: String, val throwable: Throwable? = null) : AccessApiCallResponse<Nothing>()
}
```

#### 2. Refactoring of the ECDSA signing implementation in `Crypto.kt` and `models.kt`

- The `Signer` class no longer implements `Hasher` as `Signer` is not being used to hash any data
- Similarly, `SignerImpl` no longer accepts a Hasher input. The `HashAlgorithm` input is sufficient to derive the hasher implementation.
- `PrivateKey` serialization is now padded to the order size. Deserializing a private key string also requires the input to be padded.
- Fields for the `PrivateKey` and `PublicKey` classes have been updated. `PrivateKey`: `algo` (type `SignatureAlgorithm`) and `publicKey` (type `PublicKey`) have been added, `ecCoupleComponentSize` has been removed. `PublicKey`: `algo` (type `SignatureAlgorithm`) has been added. We anticipate that the `KeyPair` class will be deprecated in upcoming versions as its functionality is now obsolete; it has been left in this release of the SDK to minimize breaking change impact for now.

#### 3. Deprecation of 384-bit signing

- Support for SHA2_384 and SHA3_384 has now been deprecated in the ECDSA signing implementation.

#### 4. Refactoring of the hashing implementation in `Crypto.kt` and `models.kt`

- The `id` field has been removed from the `HashAlgorithm` class; it is now automatically inferred based on the algorithm.

#### 5. Cadence 1.0 support as part of Crescendo migration

- This repository has been upgraded to use Cadence 1.0 and run tests using the latest release of the Flow emulator and Flow CLI. Please ensure you have the Cadence 1.0 CLI installed on your machine (available on your system with the `flow-c1` command) before running tests and examples locally.
___

*Please ensure your projects are compatible with these changes before upgrading to the latest version.*
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
[![Maven Central](https://img.shields.io/maven-central/v/org.onflow/flow-jvm-sdk)](https://search.maven.org/search?q=g:org.onflow%20AND%20a:flow-jvm-sdk)
[![Sonatype OSS](https://img.shields.io/nexus/s/org.onflow/flow-jvm-sdk?label=snapshot&server=https%3A%2F%2Fs01.oss.sonatype.org%2F)](https://s01.oss.sonatype.org/content/repositories/snapshots/org/onflow/flow-jvm-sdk/)

The Flow JVM SDK is a library for JVM languages (e.g. Java, Kotlin, Scala, Groovy, etc) that provides
utilities to interact with the Flow blockchain.
The Flow JVM SDK is a library for JVM languages (e.g. Java, Kotlin, Scala, Groovy) that provides utilities to interact with the Flow blockchain.

For a summary of the breaking changes introduced in the lastest release, please refer to [BREAKING_CHANGES.md](https://github.com/onflow/flow-jvm-sdk/blob/main/BREAKING_CHANGES.md).

At the moment, this SDK includes the following features:
- [x] Communication with the [Flow Access API](https://docs.onflow.org/access-api) over gRPC
Expand All @@ -29,9 +30,9 @@ Similar to the Java Example module, this module provides sample implementations

## Contribute to this SDK

This project is in the very early phase; all contributions are welcomed.
We welcome all community contributions and will gladly review improvements and other proposals as PRs.

Read the [contributing guide](https://github.com/the-nft-company/flow-jvm-sdk/blob/main/CONTRIBUTING.md) to get started.
Read the [contributing guide](https://github.com/onflow/flow-jvm-sdk/blob/main/CONTRIBUTING.md) to get started.

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Configuration variables
val defaultGroupId = "org.onflow"
val defaultVersion = "1.0.1"
val defaultVersion = "2.0.0"

fun getProp(name: String, defaultValue: String? = null): String? {
return project.findProperty("flow.$name")?.toString()?.trim()?.ifBlank { null }
Expand Down

0 comments on commit 9d07fc9

Please sign in to comment.