-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from Luxoft/develop
Develop
- Loading branch information
Showing
52 changed files
with
1,910 additions
and
1,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
...tlin/com/luxoft/blockchainlab/corda/hyperledger/indy/data/schema/ClaimDefinitionSchema.kt
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...rc/main/kotlin/com/luxoft/blockchainlab/corda/hyperledger/indy/data/schema/ClaimSchema.kt
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...com/luxoft/blockchainlab/corda/hyperledger/indy/data/schema/CredentialDefinitionSchema.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.luxoft.blockchainlab.corda.hyperledger.indy.data.schema | ||
|
||
import com.luxoft.blockchainlab.corda.hyperledger.indy.data.state.IndyCredentialDefinition | ||
import com.luxoft.blockchainlab.hyperledger.indy.IndyUser | ||
import net.corda.core.schemas.MappedSchema | ||
import net.corda.core.schemas.PersistentState | ||
import javax.persistence.Column | ||
import javax.persistence.Entity | ||
|
||
|
||
object CredentialDefinitionSchema | ||
|
||
object CredentialDefinitionSchemaV1 : MappedSchema( | ||
version = 1, | ||
schemaFamily = CredentialDefinitionSchema.javaClass, | ||
mappedTypes = listOf(PersistentCredentialDefinition::class.java) | ||
) { | ||
@Entity | ||
data class PersistentCredentialDefinition( | ||
@Column(name = "id") val credentialDefId: String = "", | ||
val schemaId: String = "", | ||
val revRegId: String = "", | ||
val currentCredNumber: Int = 0 | ||
|
||
) : PersistentState() { | ||
constructor(credentialDef: IndyCredentialDefinition) : this( | ||
credentialDef.credentialDefinitionId.toString(), | ||
credentialDef.schemaId.toString(), | ||
credentialDef.credentialDefinitionId.getRevocationRegistryDefinitionId(IndyUser.REVOCATION_TAG).toString(), | ||
credentialDef.currentCredNumber | ||
) | ||
} | ||
} |
21 changes: 11 additions & 10 deletions
21
...dger/indy/data/schema/ClaimProofSchema.kt → ...indy/data/schema/CredentialProofSchema.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
package com.luxoft.blockchainlab.corda.hyperledger.indy.data.schema | ||
|
||
import com.luxoft.blockchainlab.corda.hyperledger.indy.data.state.IndyClaimProof | ||
import com.luxoft.blockchainlab.corda.hyperledger.indy.data.state.IndyCredentialProof | ||
import net.corda.core.schemas.MappedSchema | ||
import net.corda.core.schemas.PersistentState | ||
import javax.persistence.Column | ||
import javax.persistence.Entity | ||
import javax.persistence.Table | ||
|
||
|
||
object ClaimProofSchema | ||
object CredentialProofSchema | ||
|
||
object ClaimProofSchemaV1 : MappedSchema( | ||
version = 1, | ||
schemaFamily = ClaimProofSchema.javaClass, | ||
mappedTypes = listOf(PersistentProof::class.java)) { | ||
object CredentialProofSchemaV1 : MappedSchema( | ||
version = 1, | ||
schemaFamily = CredentialProofSchema.javaClass, | ||
mappedTypes = listOf(PersistentProof::class.java) | ||
) { | ||
|
||
@Entity | ||
@Table(name = "proofs") | ||
class PersistentProof( | ||
@Column(name = "id") | ||
val id: String | ||
@Column(name = "id") | ||
val id: String | ||
) : PersistentState() { | ||
constructor(indyProof: IndyClaimProof): this(indyProof.id) | ||
constructor(): this("") | ||
constructor(indyProof: IndyCredentialProof) : this(indyProof.id) | ||
constructor() : this("") | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...in/kotlin/com/luxoft/blockchainlab/corda/hyperledger/indy/data/schema/CredentialSchema.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.luxoft.blockchainlab.corda.hyperledger.indy.data.schema | ||
|
||
import com.luxoft.blockchainlab.corda.hyperledger.indy.data.state.IndyCredential | ||
import net.corda.core.schemas.MappedSchema | ||
import net.corda.core.schemas.PersistentState | ||
import javax.persistence.Column | ||
import javax.persistence.Entity | ||
import javax.persistence.Table | ||
|
||
object CredentialSchema | ||
|
||
object CredentialSchemaV1 : MappedSchema( | ||
version = 1, | ||
schemaFamily = CredentialSchema.javaClass, | ||
mappedTypes = listOf(PersistentCredential::class.java) | ||
) { | ||
|
||
@Entity | ||
@Table(name = "credentials") | ||
class PersistentCredential( | ||
@Column(name = "id") | ||
var id: String, | ||
@Column(name = "issuerDid") | ||
var issuerDid: String | ||
|
||
) : PersistentState() { | ||
constructor(indyCredential: IndyCredential) : this(indyCredential.id, indyCredential.issuerDid) | ||
constructor() : this("", "") | ||
} | ||
} |
Oops, something went wrong.