Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis committed Aug 2, 2019
2 parents 20b6c3a + ed95a64 commit e085d75
Show file tree
Hide file tree
Showing 194 changed files with 2,203 additions and 30,719 deletions.
44 changes: 31 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ allprojects {
In your application `build.gradle` file, add:

```groovy
def uport_sdk_version = "v0.4.2"
def uport_sdk_version = "v0.5.0"
dependencies {
//...
// core SDK
Expand All @@ -62,7 +62,8 @@ override fun onCreate() {

### defaultAccount

This preview version of the SDK has the concept of `defaultAccount` as a nullable field in the `Uport` object.
This preview version of the SDK has the concept of `defaultAccount` as a nullable field in the
`Uport` object.
If there is no default account when a new one is created, it becomes the default.

```kotlin
Expand Down Expand Up @@ -94,18 +95,20 @@ if (Uport.defaultAccount == null) {
}
```

In case the app gets killed during the account creation process, the `createAccount` method will try to resume the process where it left off.
It can be instructed to start from scratch, but that may cost additional fuel.
In case the app gets killed during the account creation process, the `createAccount` method will
try to resume the process where it left off. It can be instructed to start from scratch, but that
may cost additional fuel.

### Account management

`Account` objects have a `handle` field that can be used to refer to them in the future.
The handle right now is an ethereum address but it should be treated as an opaque string, as it will change in a future release.
You should not send funds to that address.
The handle right now is an ethereum address but it should be treated as an opaque string,
as it will change in a future release. You should not send funds to that address.

### Key management

The `signer` library is used to create and manage keys for uport accounts. Read full details in [key management documentation](./docs/overview/key_management.md)
The `signer` library is used to create and manage keys for uport accounts.
Read full details in [key management documentation](./docs/overview/key_management.md)

### Ethereum interaction

Expand Down Expand Up @@ -143,7 +146,7 @@ val receipt = Networks.rinkeby.awaitConfirmation(txHash)

### off-chain interaction

Off-chain interaction is essentially signing and verifying JWTs using uport-specific JWT algorithms.
Off-chain interaction is essentially signing and verifying JWTs using specific JWT algorithms.
Verification of such tokens implies resolving a
[Decentralized Identity (DID) document](https://github.com/uport-project/specs/blob/develop/pki/diddocument.md)
that will contain the keys or address that should match a JWT signature.
Expand Down Expand Up @@ -194,7 +197,7 @@ val jwt : String = JWTTools().create(payload, issuer, signer)

```kotlin
//compute an encryption publicKey starting from a private key (can be an ethereum private key)
val publicKey = Crypto.getEncryptionPublicKey(privateKeyBytes).
val publicKey = Crypto.getEncryptionPublicKey(privateKeyBytes)

//encrypt a message with an intended recipient
val encryptedBundle = Crypto.encrypt("hello world", recipientPublicKeyBase64)
Expand All @@ -209,19 +212,34 @@ val decryptedMessage = Crypto.decrypt(receivedBundle, recipientSecretKey)

## Dependencies

This library uses [kethereum](https://github.com/walleth/kethereum) for a lot of ethereum related work.
* These libraries use [KEthereum](https://github.com/komputing/KEthereum) for a lot of the ethereum related work.
* The smart-contract binding code is generated using [bivrost-kotlin](https://github.com/gnosis/bivrost-kotlin)
* The off-chain/JWT interactions rely on [kotlin-did-jwt](https://github.com/uport-project/kotlin-did-jwt)
* Protected Key management is done by [uport-android-signer](https://github.com/uport-project/uport-android-signer)

The smart-contract binding code is generated using [bivrost-kotlin](https://github.com/gnosis/bivrost-kotlin)

Currently there is a transient dependency on [spongycastle](https://rtyley.github.io/spongycastle/)
but that may be removed when pure kotlin implementations of the required cryptographic primitives become available.
but that may be removed when pure kotlin implementations of the required cryptographic
primitives become available.


## Contributing
Want to contribute to uport-android-sdk? Cool, please read our [contribution guidelines](./docs/guides/CONTRIBUTING.md) to get an understanding of the process we use for making changes to this repo.
Want to contribute to uport-android-sdk? Cool, please read our
[contribution guidelines](./docs/guides/CONTRIBUTING.md) to get an understanding of the process
we use for making changes to this repo.


## Changelog
* 0.5.0
* [breaking][bugfix] align JWT signature to spec (#93)
* [breaking][support] externalized did-jwt and signer modules (#97)
* [breaking][feature]`Account` is now an interface and the default implementation used is `HDAccount` (#89)
* [feature] easier configuration of JsonRPC endpoints (#91)
* [feature] add `verifyDisclosure()` method (#96)
* [feature] add `authenticateDisclosureResponse()` (#98)
* [feature] add W3C methods to create Verifiable Credential and Presentation (#100)
* [support] reduce UI test flakyness (#92)

* 0.4.2
* updated infura JsonRPC endpoint URLs.
To avoid sudden disconnect you are strongly encouraged to use your own project on
Expand Down
56 changes: 39 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
buildscript {

ext {
kotlin_version = '1.3.41'
kotlin_serialization_version = '0.11.0'
coroutines_version = "1.2.1"

kotlin_version = '1.3.21'
kotlin_serialization_version = '0.10.0'
coroutines_version = "1.1.1"

android_tools_version = '3.3.1'
android_tools_version = '3.4.2'

build_tools_version = "28.0.3"

Expand All @@ -18,6 +17,7 @@ buildscript {

support_lib_version = "28.0.0"
play_services_version = "15.0.0"
firebase_iid_version = "17.1.2"

test_runner_version = "1.0.2"
test_rules_version = test_runner_version
Expand All @@ -27,20 +27,22 @@ buildscript {
mockito_version = "2.23.0"
mockito_kotlin_version = "2.0.0"
robolectric_version = "4.1"
mockk_version = "1.9"
assertk_version = "0.12"
mockk_version = "1.9.2"
assertk_version = "0.14"
detekt_version = "1.0.0-RC14"

moshi_version = "1.8.0"
okhttp_version = "3.10.0"
okhttp_version = "3.14.1"

bivrost_version = "1c0efeb7f3"//"v0.7.0"
kmnid_version = "0.2.1"
kethereum_version = "0.63"
khex_version = "0.5"
bivrost_version = "v0.7.1"
kmnid_version = "0.3.2"
kethereum_version = "0.75.1"
tweetnacl_k_version = "0.0.1"
did_jwt_version = "0.3.1"
kotlin_common_version = "0.1.1"
uport_signer_version = "0.3.0"

uport_sdk_version = "v0.4.2"
uport_sdk_version = "v0.5.0"
}

repositories {
Expand Down Expand Up @@ -95,14 +97,15 @@ allprojects {
jcenter()
maven { url 'https://jitpack.io' }
maven { url "https://kotlin.bintray.com/kotlinx" }
mavenLocal()
// mavenLocal()
}

//address warnings about multiple kotlin runtimes in classpath
configurations.all {

resolutionStrategy.dependencySubstitution {
substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre7") because "warning about multiple runtimes in the classpath" with module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre8") because "warning about multiple runtimes in the classpath" with module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre7") because "warning about multiple runtimes in the classpath" with module("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
substitute module("org.jetbrains.kotlin:kotlin-stdlib-jre8") because "warning about multiple runtimes in the classpath" with module("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")

}
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
Expand All @@ -114,6 +117,9 @@ allprojects {
details.useVersion kotlin_version
}
}

//XXX: this is needed until https://github.com/komputing/KEthereum/issues/65 is fixed
exclude group: "com.github.walleth"
}
}

Expand All @@ -122,7 +128,23 @@ subprojects { subproject ->
afterEvaluate {

if (subproject.plugins.hasPlugin("com.android.application") || subproject.plugins.hasPlugin("com.android.library")) {
subproject.android.packagingOptions.exclude("META-INF/main.kotlin_module")
subproject.android {
packagingOptions {
exclude "META-INF/main.kotlin_module"
exclude "META-INF/atomicfu.kotlin_module"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}

subproject.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
}
Expand Down
20 changes: 0 additions & 20 deletions core/build.gradle

This file was deleted.

21 changes: 0 additions & 21 deletions core/src/main/java/me/uport/sdk/core/CoroutineExtensions.kt

This file was deleted.

75 changes: 0 additions & 75 deletions core/src/main/java/me/uport/sdk/core/Extensions.kt

This file was deleted.

Loading

0 comments on commit e085d75

Please sign in to comment.