Skip to content

Commit 9fa4903

Browse files
Merge pull request #7 from onix-labs/feature-v2
feature-v2
2 parents 4160ba8 + 8ff3714 commit 9fa4903

File tree

129 files changed

+2433
-3608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2433
-3608
lines changed

HEADER

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
/**
2-
* Copyright 2020 Matthew Layton
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
1+
Copyright 2020-2021 ONIXLabs
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buildscript {
1414
junit_version = '5.3.1'
1515

1616
onixlabs_group = 'io.onixlabs'
17-
onixlabs_corda_core_release_version = '1.2.0'
17+
onixlabs_corda_core_release_version = '2.0.0'
1818

1919
cordapp_platform_version = 8
2020
cordapp_contract_name = 'ONIXLabs Corda Identity Framework Contract'
@@ -26,8 +26,8 @@ buildscript {
2626
cordapp_signing_enabled = true
2727
cordapp_signing_alias = 'cordapp-signer'
2828
cordapp_signing_storetype = 'PKCS12'
29-
cordapp_signing_keystore = getProperty('jar.sign.keystore')
30-
cordapp_signing_password = getProperty('jar.sign.password')
29+
cordapp_signing_keystore = findProperty('onixlabs.production.jarsign.keystore') ?: getProperty('onixlabs.development.jarsign.keystore')
30+
cordapp_signing_password = findProperty('onixlabs.production.jarsign.password') ?: getProperty('onixlabs.development.jarsign.password')
3131
}
3232

3333
repositories {
@@ -45,7 +45,7 @@ buildscript {
4545
}
4646

4747
group 'io.onixlabs'
48-
version '2.0.0-rc2'
48+
version '2.0.0'
4949

5050
subprojects {
5151
repositories {

doc/contract/.gitkeep

Whitespace-only changes.

doc/integration/ClaimCommandService.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

doc/workflow/.gitkeep

Whitespace-only changes.

gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name=onixlabs-corda-identity-framework
22
group=io.onixlabs
33
version=0.1
4+
45
kotlin.incremental=false
5-
kotlin.code.style=official
6+
kotlin.code.style=official
7+
8+
onixlabs.development.jarsign.keystore=../lib/onixlabs.development.pkcs12
9+
onixlabs.development.jarsign.password=5891f47942424d2acbe108691fdb5ba258712fca7e4762be4327241ebf3dbfa3

lib/onixlabs.development.jks

2.18 KB
Binary file not shown.

lib/onixlabs.development.pkcs12

2.54 KB
Binary file not shown.

onixlabs-corda-identity-framework-contract/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies {
2828

2929
// CorDapp Dependencies
3030
cordapp "$onixlabs_group:onixlabs-corda-core-contract:$onixlabs_corda_core_release_version"
31+
cordapp "$onixlabs_group:onixlabs-corda-core-workflow:$onixlabs_corda_core_release_version"
3132

3233
// Test Dependencies
3334
testRuntimeOnly "$junit_group:junit-jupiter-engine:$junit_version"

onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/AbstractClaim.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/**
2-
* Copyright 2020 Matthew Layton
1+
/*
2+
* Copyright 2020-2021 ONIXLabs
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/AttachmentClaim.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/**
2-
* Copyright 2020 Matthew Layton
1+
/*
2+
* Copyright 2020-2021 ONIXLabs
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/Attestation.kt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/**
2-
* Copyright 2020 Matthew Layton
1+
/*
2+
* Copyright 2020-2021 ONIXLabs
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -55,8 +55,8 @@ open class Attestation<T : ContractState>(
5555

5656
init {
5757
check(metadata.size <= 10) { "The number of metadata entries cannot exceed 10." }
58-
check(metadata.keys.all { it.length <= 256 }) { "The maximum key length for a metadata entry is 256." }
59-
check(metadata.values.all { it.length <= 1024 }) { "The maximum value length for a metadata entry is 1024." }
58+
check(metadata.keys.all { it.length <= 256 }) { "The maximum length for a metadata key is 256." }
59+
check(metadata.values.all { it.length <= 1024 }) { "The maximum length for a metadata value is 1024." }
6060
}
6161

6262
override val hash: SecureHash
@@ -95,13 +95,14 @@ open class Attestation<T : ContractState>(
9595
externalId = linearId.externalId,
9696
attestor = attestor,
9797
pointerStateRef = pointer.stateRef.toString(),
98-
pointerStateClass = pointer.stateClass.canonicalName,
99-
pointerStateLinearId = pointer.stateLinearId?.id,
98+
pointerStateType = pointer.stateType.canonicalName,
99+
pointerStateLinearId = pointer.getLinearId()?.id,
100+
pointerStateExternalId = pointer.getLinearId()?.externalId,
100101
pointerHash = pointer.hash.toString(),
101102
status = status,
102103
previousStateRef = previousStateRef?.toString(),
103104
hash = hash.toString(),
104-
attestationClass = javaClass.canonicalName
105+
attestationType = javaClass.canonicalName
105106
)
106107
else -> throw IllegalArgumentException("Unrecognised schema: $schema.")
107108
}
@@ -123,6 +124,7 @@ open class Attestation<T : ContractState>(
123124
*/
124125
override fun equals(other: Any?): Boolean {
125126
return this === other || (other is Attestation<*>
127+
&& other.javaClass == javaClass
126128
&& other.attestor == attestor
127129
&& other.attestees == attestees
128130
&& other.pointer == pointer
@@ -156,10 +158,11 @@ open class Attestation<T : ContractState>(
156158
* @param other The attestation to compare with the current attestation.
157159
* @return Returns true if the immutable properties have not changed; otherwise, false.
158160
*/
161+
@Suppress("UNCHECKED_CAST")
159162
internal fun internalImmutableEquals(other: Attestation<*>): Boolean {
160163
return attestor == other.attestor
161164
&& linearId == other.linearId
162-
&& pointer.immutableEquals(other.pointer)
165+
&& pointer.immutableEquals((other as Attestation<T>).pointer)
163166
&& immutableEquals(other)
164167
}
165168

onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/AttestationContract.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/**
2-
* Copyright 2020 Matthew Layton
1+
/*
2+
* Copyright 2020-2021 ONIXLabs
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

0 commit comments

Comments
 (0)