Skip to content

Commit 3dc0ce9

Browse files
Merge branch 'main' into release
2 parents 96fb95c + f545494 commit 3dc0ce9

File tree

6 files changed

+94
-6
lines changed

6 files changed

+94
-6
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ buildscript {
4141
}
4242

4343
group 'io.onixlabs'
44-
version '2.1.1'
44+
version '2.1.2'
4545

4646
subprojects {
4747
repositories {

docs/CHANGELOG-2.1.1.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onix-labs.github.io/master/content/logo/master_full_md.png)
2+
3+
# Change Log - Version 2.1.1
4+
5+
This document serves as the change log for the ONIXLabs Corda Core API.
6+
7+
## Release Notes
8+
9+
This release contains a bug fix in the workflow API to allow additional signing steps to remain suspendible when called from the `collectSignatures` function.
10+
11+
---
12+
13+
### collectSignatures _Extension Function_
14+
15+
**Module:** onixlabs-corda-core-modulename
16+
17+
**Package:** io.onixlabs.corda.core.packagename
18+
19+
Collects all remaining required signatures from the specified counter-parties.
20+
21+
```kotlin
22+
@Suspendable
23+
inline fun FlowLogic<*>.collectSignatures(
24+
transaction: SignedTransaction,
25+
sessions: Iterable<FlowSession>,
26+
additionalSigningAction: ((SignedTransaction) -> SignedTransaction) = { it }
27+
): SignedTransaction
28+
```
29+
30+
#### Remarks
31+
32+
In version 2.1.0, adding additional signing requirements caused an exception where the transaction context was missing. This is typical when a function is not marked `@Suspendable`. Since `additionalSigningAction` is a functional parameter it cannot be marked suspendable, therefore the solution is to inline the outer `collectSignatures` function signature.
33+
34+
---
35+

docs/CHANGELOG-2.1.2.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onix-labs.github.io/master/content/logo/master_full_md.png)
2+
3+
# Change Log - Version 2.1.2
4+
5+
This document serves as the change log for the ONIXLabs Corda Core API.
6+
7+
## Release Notes
8+
9+
This release contains a bug fix in the contract API to allow `contractStateType` to be overridden in resolvable classes, where the generic type parameter of the derived resolvable is `T`.
10+
11+
---
12+
13+
### AbstractPluralResolvable _Class_
14+
15+
**Module:** onixlabs-corda-core-contract
16+
17+
**Package:** io.onixlabs.corda.core.contract
18+
19+
Represents the base class for implementing plural (one-to-many) contract state resolvers.
20+
21+
```kotlin
22+
abstract class AbstractPluralResolvable<T> : PluralResolvable<T> where T : ContractState
23+
```
24+
25+
#### Remarks
26+
27+
In version 2.0.0, the `contractStateType` of this class was final and automatically resolved the class of the generic parameter type in a derived class, however this breaks if the generic parameter type in the derived class is also generic.
28+
29+
In this version the property is declared using the `open` modifier, allowing derived classes to specify the `contractStateType` manually.
30+
31+
---
32+
33+
### AbstractSingularResolvable _Class_
34+
35+
**Module:** onixlabs-corda-core-contract
36+
37+
**Package:** io.onixlabs.corda.core.contract
38+
39+
Represents the base class for implementing singular (one-to-one) contract state resolvers.
40+
41+
```kotlin
42+
abstract class AbstractSingularResolvable<T> : SingularResolvable<T> where T : ContractState
43+
```
44+
45+
#### Remarks
46+
47+
In version 2.0.0, the `contractStateType` of this class was final and automatically resolved the class of the generic parameter type in a derived class, however this breaks if the generic parameter type in the derived class is also generic.
48+
49+
In this version the property is declared using the `open` modifier, allowing derived classes to specify the `contractStateType` manually.
50+
51+
---
52+
53+
###

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name=onixlabs-corda-core
22
group=io.onixlabs
3-
version=2.1.1
3+
version=2.1.2
44

55
kotlin.incremental=false
66
kotlin.code.style=official

onixlabs-corda-core-contract/src/main/kotlin/io/onixlabs/corda/core/contract/AbstractPluralResolvable.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ import net.corda.core.transactions.LedgerTransaction
2929
* Represents the base class for implementing plural (one-to-many) contract state resolvers.
3030
*
3131
* @param T The underlying [ContractState] type.
32+
* @property criteria The vault query criteria which will be used to resolve contract states.
3233
* @property contractStateType The contract state class to resolve.
3334
*/
3435
abstract class AbstractPluralResolvable<T> : PluralResolvable<T> where T : ContractState {
3536

36-
@Suppress
37-
protected val contractStateType: Class<T> = javaClass.getArgumentType(0).toTypedClass()
3837
protected abstract val criteria: QueryCriteria
38+
protected open val contractStateType: Class<T> get() = javaClass.getArgumentType(0).toTypedClass()
3939

4040
/**
4141
* Resolves a [ContractState] using a [CordaRPCOps] instance.

onixlabs-corda-core-contract/src/main/kotlin/io/onixlabs/corda/core/contract/AbstractSingularResolvable.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ import net.corda.core.transactions.LedgerTransaction
2929
* Represents the base class for implementing singular (one-to-one) contract state resolvers.
3030
*
3131
* @param T The underlying [ContractState] type.
32+
* @property criteria The vault query criteria which will be used to resolve contract states.
3233
* @property contractStateType The contract state class to resolve.
3334
*/
3435
abstract class AbstractSingularResolvable<T> : SingularResolvable<T> where T : ContractState {
3536

36-
@Suppress
37-
protected val contractStateType: Class<T> = javaClass.getArgumentType(0).toTypedClass()
3837
protected abstract val criteria: QueryCriteria
38+
protected open val contractStateType: Class<T> get() = javaClass.getArgumentType(0).toTypedClass()
3939

4040
/**
4141
* Resolves a [ContractState] using a [CordaRPCOps] instance.

0 commit comments

Comments
 (0)