├── .gitignore ├── .travis.yml ├── LICENSE ├── Pipfile ├── Pipfile.lock ├── README.md ├── api ├── build.gradle └── src │ ├── main │ └── kotlin │ │ └── org │ │ └── web3j │ │ └── corda │ │ ├── api │ │ ├── AuthenticationFilter.kt │ │ ├── CorDapp.kt │ │ ├── CorDappResource.kt │ │ ├── CordaApi.kt │ │ ├── Flow.kt │ │ ├── FlowResource.kt │ │ ├── NetworkResource.kt │ │ ├── NodeResource.kt │ │ ├── NotaryResource.kt │ │ ├── ProgressTracker.kt │ │ ├── StartableFlow.kt │ │ ├── StepsResource.kt │ │ ├── VaultQueryResource.kt │ │ └── VaultResource.kt │ │ └── networkmap │ │ ├── AdminResource.kt │ │ ├── CertManResource.kt │ │ ├── CertificateResource.kt │ │ ├── LoginRequest.kt │ │ ├── NetworkMapApi.kt │ │ ├── NetworkMapResource.kt │ │ ├── NetworkMapType.kt │ │ ├── NetworkParametersResource.kt │ │ ├── NodeInfoResource.kt │ │ ├── NotariesResource.kt │ │ └── NotaryType.kt │ └── test │ ├── kotlin │ └── org │ │ └── web3j │ │ └── corda │ │ └── api │ │ ├── CordaApiTest.kt │ │ ├── NetworkSelfTest.kt │ │ └── WireMockInterface.kt │ └── resources │ └── mappings │ └── CordaApiTest.json ├── build.gradle ├── codegen ├── build.gradle └── src │ ├── main │ ├── kotlin │ │ └── org │ │ │ └── web3j │ │ │ └── corda │ │ │ └── codegen │ │ │ ├── CorDappClientCodegen.kt │ │ │ ├── CorDappClientGenerator.kt │ │ │ ├── CorDappGenerator.kt │ │ │ ├── CordaGenerator.kt │ │ │ └── CordaGeneratorUtils.kt │ └── resources │ │ └── cordapp │ │ ├── client │ │ ├── cordapp_client.mustache │ │ ├── cordapp_client_gradle.mustache │ │ ├── cordapp_client_new_test.mustache │ │ ├── cordapp_client_test.mustache │ │ ├── data_class.mustache │ │ ├── data_class_opt_var.mustache │ │ ├── data_class_req_var.mustache │ │ ├── enum_class.mustache │ │ └── model.mustache │ │ ├── contracts │ │ ├── contract.mustache │ │ ├── contract_test.mustache │ │ ├── gradle_build.mustache │ │ └── state.mustache │ │ ├── cordapp_gradle.mustache │ │ ├── cordapp_gradle_properties.mustache │ │ └── workflows │ │ ├── flow.mustache │ │ ├── flow_contract_test.mustache │ │ ├── flow_test.mustache │ │ ├── gradle_build.mustache │ │ └── node_driver.mustache │ └── test │ ├── kotlin │ └── org │ │ └── web3j │ │ └── corda │ │ └── codegen │ │ ├── CorDappClientGeneratorTest.kt │ │ ├── CorDappGeneratorTest.kt │ │ └── CordaGeneratorUtilsTest.kt │ └── resources │ └── empty-flow.json ├── common ├── build.gradle └── src │ ├── main │ ├── kotlin │ │ └── org │ │ │ └── web3j │ │ │ ├── braid │ │ │ └── services │ │ │ │ ├── SimpleNodeInfo.kt │ │ │ │ └── vault │ │ │ │ └── VaultQuery.kt │ │ │ └── corda │ │ │ ├── model │ │ │ ├── Amount.kt │ │ │ ├── AmountCurrency.kt │ │ │ ├── InvocationError.kt │ │ │ ├── confidential │ │ │ │ ├── CertificateOwnershipAssertion.kt │ │ │ │ └── SwapIdentitiesFlow_IdentityWithSignature.kt │ │ │ ├── core │ │ │ │ ├── context │ │ │ │ │ ├── Actor.kt │ │ │ │ │ ├── Actor_Id.kt │ │ │ │ │ ├── AuthServiceId.kt │ │ │ │ │ ├── InvocationContext.kt │ │ │ │ │ ├── InvocationOrigin_Peer.kt │ │ │ │ │ ├── InvocationOrigin_RPC.kt │ │ │ │ │ ├── InvocationOrigin_Scheduled.kt │ │ │ │ │ ├── InvocationOrigin_Service.kt │ │ │ │ │ ├── Trace.kt │ │ │ │ │ ├── Trace_InvocationId.kt │ │ │ │ │ └── Trace_SessionId.kt │ │ │ │ ├── contracts │ │ │ │ │ ├── AmountTransfer.kt │ │ │ │ │ ├── Command_Object.kt │ │ │ │ │ ├── ContractState.kt │ │ │ │ │ ├── Issued.kt │ │ │ │ │ ├── Issued_issuer.kt │ │ │ │ │ ├── LinearPointer.kt │ │ │ │ │ ├── PartyAndReference.kt │ │ │ │ │ ├── PrivacySalt.kt │ │ │ │ │ ├── ScheduledStateRef.kt │ │ │ │ │ ├── StateAndRef.kt │ │ │ │ │ ├── StateAndRef_Object.kt │ │ │ │ │ ├── StateAndRef_net_corda_core_contracts_ContractState.kt │ │ │ │ │ ├── StatePointer.kt │ │ │ │ │ ├── StateRef.kt │ │ │ │ │ ├── StaticPointer.kt │ │ │ │ │ ├── TimeWindow.kt │ │ │ │ │ ├── TransactionState.kt │ │ │ │ │ ├── TransactionState_Object.kt │ │ │ │ │ ├── TransactionState_net_corda_core_contracts_ContractState.kt │ │ │ │ │ ├── TransactionVerificationException_InvalidAttachmentException.kt │ │ │ │ │ ├── TransactionVerificationException_PackageOwnershipException.kt │ │ │ │ │ └── UniqueIdentifier.kt │ │ │ │ ├── crypto │ │ │ │ │ ├── DigitalSignature.kt │ │ │ │ │ ├── DigitalSignature_WithKey.kt │ │ │ │ │ ├── PartialMerkleTree.kt │ │ │ │ │ ├── SignatureMetadata.kt │ │ │ │ │ ├── SignedData_net_corda_core_flows_NotaryError.kt │ │ │ │ │ └── TransactionSignature.kt │ │ │ │ ├── flows │ │ │ │ │ ├── AbstractStateReplacementFlow_Proposal.kt │ │ │ │ │ ├── FlowInfo.kt │ │ │ │ │ ├── IllegalFlowLogicException.kt │ │ │ │ │ ├── NotarisationPayload.kt │ │ │ │ │ ├── NotarisationRequest.kt │ │ │ │ │ ├── NotarisationRequestSignature.kt │ │ │ │ │ ├── NotarisationResponse.kt │ │ │ │ │ ├── NotaryError_Conflict.kt │ │ │ │ │ ├── NotaryError_General.kt │ │ │ │ │ ├── NotaryError_RequestSignatureInvalid.kt │ │ │ │ │ ├── NotaryError_TimeWindowInvalid.kt │ │ │ │ │ ├── NotaryError_TransactionInvalid.kt │ │ │ │ │ ├── StateConsumptionDetails.kt │ │ │ │ │ └── WaitTimeUpdate.kt │ │ │ │ ├── identity │ │ │ │ │ ├── AbstractParty.kt │ │ │ │ │ ├── AnonymousParty.kt │ │ │ │ │ ├── Party.kt │ │ │ │ │ └── PartyAndCertificate.kt │ │ │ │ ├── node │ │ │ │ │ ├── NodeInfo.kt │ │ │ │ │ └── services │ │ │ │ │ │ ├── NetworkMapCache_MapChange.kt │ │ │ │ │ │ ├── NetworkMapCache_MapChange_Added.kt │ │ │ │ │ │ ├── NetworkMapCache_MapChange_Modified.kt │ │ │ │ │ │ ├── NetworkMapCache_MapChange_Removed.kt │ │ │ │ │ │ ├── Vault.kt │ │ │ │ │ │ ├── Vault_ConstraintInfo.kt │ │ │ │ │ │ ├── Vault_Page.kt │ │ │ │ │ │ ├── Vault_Page_net_corda_core_contracts_ContractState.kt │ │ │ │ │ │ ├── Vault_StateMetadata.kt │ │ │ │ │ │ ├── Vault_Update.kt │ │ │ │ │ │ └── vault │ │ │ │ │ │ ├── AttachmentQueryCriteria_AndComposition.kt │ │ │ │ │ │ ├── AttachmentQueryCriteria_AttachmentsQueryCriteria.kt │ │ │ │ │ │ ├── AttachmentQueryCriteria_OrComposition.kt │ │ │ │ │ │ ├── AttachmentSort.kt │ │ │ │ │ │ ├── AttachmentSort_AttachmentSortColumn.kt │ │ │ │ │ │ ├── Column.kt │ │ │ │ │ │ ├── ColumnPredicate_AggregateFunction.kt │ │ │ │ │ │ ├── ColumnPredicate_Between.kt │ │ │ │ │ │ ├── ColumnPredicate_BinaryComparison.kt │ │ │ │ │ │ ├── ColumnPredicate_CollectionExpression.kt │ │ │ │ │ │ ├── ColumnPredicate_EqualityComparison.kt │ │ │ │ │ │ ├── ColumnPredicate_Likeness.kt │ │ │ │ │ │ ├── ColumnPredicate_NullExpression.kt │ │ │ │ │ │ ├── Column_Object_Object.kt │ │ │ │ │ │ ├── CriteriaExpression_AggregateFunctionExpression.kt │ │ │ │ │ │ ├── CriteriaExpression_BinaryLogical.kt │ │ │ │ │ │ ├── CriteriaExpression_ColumnPredicateExpression.kt │ │ │ │ │ │ ├── CriteriaExpression_Not.kt │ │ │ │ │ │ ├── PageSpecification.kt │ │ │ │ │ │ ├── QueryCriteria_AndComposition.kt │ │ │ │ │ │ ├── QueryCriteria_CommonQueryCriteria.kt │ │ │ │ │ │ ├── QueryCriteria_FungibleAssetQueryCriteria.kt │ │ │ │ │ │ ├── QueryCriteria_FungibleStateQueryCriteria.kt │ │ │ │ │ │ ├── QueryCriteria_LinearStateQueryCriteria.kt │ │ │ │ │ │ ├── QueryCriteria_OrComposition.kt │ │ │ │ │ │ ├── QueryCriteria_SoftLockingCondition.kt │ │ │ │ │ │ ├── QueryCriteria_TimeCondition.kt │ │ │ │ │ │ ├── QueryCriteria_VaultCustomQueryCriteria.kt │ │ │ │ │ │ ├── QueryCriteria_VaultQueryCriteria.kt │ │ │ │ │ │ ├── Sort.kt │ │ │ │ │ │ ├── SortAttribute_Custom.kt │ │ │ │ │ │ ├── SortAttribute_Standard.kt │ │ │ │ │ │ └── Sort_SortColumn.kt │ │ │ │ ├── schemas │ │ │ │ │ ├── CommonSchemaV1_FungibleState.kt │ │ │ │ │ ├── CommonSchemaV1_LinearState.kt │ │ │ │ │ ├── MappedSchema.kt │ │ │ │ │ ├── PersistentState.kt │ │ │ │ │ └── PersistentStateRef.kt │ │ │ │ ├── serialization │ │ │ │ │ ├── SerializedBytes_net_corda_core_flows_NotaryError.kt │ │ │ │ │ ├── SerializedBytes_net_corda_core_identity_PartyAndCertificate.kt │ │ │ │ │ └── SerializedBytes_net_corda_core_transactions_CoreTransaction.kt │ │ │ │ ├── transactions │ │ │ │ │ ├── BaseTransaction.kt │ │ │ │ │ ├── ComponentGroup.kt │ │ │ │ │ ├── ContractUpgradeFilteredTransaction_FilteredComponent.kt │ │ │ │ │ ├── CoreTransaction.kt │ │ │ │ │ ├── SignedTransaction.kt │ │ │ │ │ ├── TraversableTransaction.kt │ │ │ │ │ └── WireTransaction.kt │ │ │ │ └── utilities │ │ │ │ │ ├── ByteSequence.kt │ │ │ │ │ ├── Id.kt │ │ │ │ │ ├── NetworkHostAndPort.kt │ │ │ │ │ └── OpaqueBytes.kt │ │ │ ├── node │ │ │ │ └── services │ │ │ │ │ ├── persistence │ │ │ │ │ └── NodeAttachmentService_HashMismatchException.kt │ │ │ │ │ ├── transactions │ │ │ │ │ └── PersistentUniquenessProvider_Request.kt │ │ │ │ │ └── vault │ │ │ │ │ ├── VaultSchemaV1.kt │ │ │ │ │ ├── VaultSchemaV1_VaultFungibleStates.kt │ │ │ │ │ ├── VaultSchemaV1_VaultLinearStates.kt │ │ │ │ │ └── VaultSchemaV1_VaultStates.kt │ │ │ └── notary │ │ │ │ └── experimental │ │ │ │ └── bftsmart │ │ │ │ ├── BFTSmart_ClusterResponse_Error.kt │ │ │ │ ├── BFTSmart_ClusterResponse_Signatures.kt │ │ │ │ ├── BFTSmart_CommitRequest.kt │ │ │ │ ├── BFTSmart_ReplicaResponse_Error.kt │ │ │ │ └── BFTSmart_ReplicaResponse_Signature.kt │ │ │ └── util │ │ │ ├── CordaUtils.kt │ │ │ ├── KCompiler.kt │ │ │ ├── KCompilerClassLoader.kt │ │ │ └── OpenApiVersion.kt │ └── resources │ │ ├── corda-api.json │ │ ├── logback.xml │ │ ├── logging.properties │ │ └── network-map.json │ └── test │ ├── kotlin │ └── org │ │ └── web3j │ │ └── corda │ │ └── util │ │ ├── CordaUtilsTest.kt │ │ └── OpenApiVersionTest.kt │ └── resources │ └── logback-test.xml ├── console ├── build.gradle └── src │ ├── integration-test │ ├── java │ │ └── org │ │ │ └── web3j │ │ │ └── corda │ │ │ └── examples │ │ │ └── obligation │ │ │ └── ObligationJavaTest.java │ ├── kotlin │ │ └── org │ │ │ └── web3j │ │ │ └── corda │ │ │ └── examples │ │ │ ├── IntegrationTestUtils.kt │ │ │ ├── finance │ │ │ └── CordaFinanceKotlinTest.kt │ │ │ ├── obligation │ │ │ └── ObligationKotlinTest.kt │ │ │ └── yo │ │ │ └── YoKotlinTest.kt │ └── resources │ │ └── logback-test.xml │ ├── main │ ├── kotlin │ │ └── org │ │ │ └── web3j │ │ │ └── corda │ │ │ └── console │ │ │ ├── BaseCommand.kt │ │ │ ├── CordaCommand.kt │ │ │ ├── CordaCommandMain.kt │ │ │ ├── CordaResource.kt │ │ │ ├── GenerateCommand.kt │ │ │ └── NewCommand.kt │ └── resources │ │ ├── README.md │ │ ├── gradle-wrapper.jar │ │ ├── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── settings.gradle │ │ └── swagger.json │ └── test │ ├── kotlin │ └── org │ │ └── web3j │ │ └── corda │ │ └── console │ │ ├── GenerateCommandTest.kt │ │ └── NewCommandTest.kt │ └── resources │ └── cordapps │ ├── corda-confidential-identities-4.1.jar │ ├── corda-finance-contracts-4.1.jar │ ├── corda-finance-workflows-4.1.jar │ ├── obligation-0.1.jar │ └── yo-0.1.jar ├── core ├── build.gradle └── src │ ├── integration-test │ └── kotlin │ │ └── org │ │ └── web3j │ │ └── corda │ │ ├── api │ │ └── CordaIntegrationTest.kt │ │ └── networkmap │ │ └── NetworkMapIntegrationTest.kt │ └── main │ └── kotlin │ └── org │ └── web3j │ └── corda │ ├── dapps │ └── LifeCycle.kt │ └── protocol │ ├── ClientBuilder.kt │ ├── ClientErrorHandler.kt │ ├── Corda.kt │ ├── CordaException.kt │ ├── CordaService.kt │ └── NetworkMap.kt ├── docs ├── CNAME ├── client.md ├── command_line_tools.md ├── connecting_to_node.md ├── css │ ├── extra.css │ └── github.css ├── dependencies.md ├── examples.md ├── generating.md ├── img │ ├── favicon.ico │ ├── web3j-corda-logo.png │ └── web3j-corda.png ├── index.md ├── js │ ├── highlight.pack.js │ └── index.js ├── network.md ├── quickstart.md ├── support.md ├── tests.md └── usage.md ├── gradle.properties ├── gradle ├── bintray │ └── build.gradle ├── jacoco │ └── build.gradle ├── java │ └── build.gradle ├── javadoc │ └── build.gradle ├── publish │ └── build.gradle ├── repositories.gradle ├── repositories │ └── build.gradle ├── spotless.license ├── spotless │ ├── build.gradle │ ├── formatter.properties │ └── java.license ├── versions.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── mkdocs.yml ├── scripts ├── common.bash ├── github-release.sh ├── installer.sh ├── integration-tests.sh └── win_installer.ps1 ├── settings.gradle ├── test ├── build.gradle └── src │ └── main │ ├── kotlin │ └── org │ │ └── web3j │ │ └── corda │ │ ├── assertion │ │ └── Reflect.kt │ │ ├── network │ │ ├── ContainerCoordinates.kt │ │ ├── ContainerLifecycle.kt │ │ ├── CordaNetwork.kt │ │ ├── CordaNetworkDsl.kt │ │ ├── CordaNetworkMap.kt │ │ ├── CordaNode.kt │ │ ├── CordaNodes.kt │ │ ├── CordaNotaryNode.kt │ │ ├── CordaPartyNode.kt │ │ ├── CordaRpcSettings.kt │ │ └── CordaRpcUsers.kt │ │ └── testcontainers │ │ └── KGenericContainer.kt │ └── resources │ └── node_conf.mustache ├── versions.properties └── web3j.asc.enc /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Java template 3 | *.class 4 | 5 | # Mobile Tools for Java (J2ME) 6 | .mtj.tmp/ 7 | 8 | # Package Files # 9 | *.jar 10 | *.war 11 | *.ear 12 | 13 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 14 | hs_err_pid* 15 | ### Gradle template 16 | .gradle 17 | /build 18 | /out 19 | */build/ 20 | */out/ 21 | 22 | # Ignore Gradle GUI config 23 | gradle-app.setting 24 | 25 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 26 | !gradle-wrapper.jar 27 | 28 | # Cache of project 29 | .gradletasknamecache 30 | 31 | # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 32 | # gradle/wrapper/gradle-wrapper.properties 33 | 34 | .idea 35 | *.iml 36 | *.ipr 37 | *.iws 38 | 39 | geth.sh 40 | 41 | # Sphinx generated docs 42 | docs/build 43 | 44 | # OS X 45 | .DS_Store 46 | 47 | logs 48 | site 49 | 50 | web3j.asc 51 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | name = "pypi" 3 | url = "https://pypi.org/simple" 4 | verify_ssl = true 5 | 6 | [dev-packages] 7 | 8 | [packages] 9 | mkdocs-material = "*" 10 | mkdocs = "*" 11 | pymdown-extensions = "*" 12 | 13 | [requires] 14 | python_version = "3.7" 15 | -------------------------------------------------------------------------------- /api/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Web3j Corda RPC and Network Map APIs for the Corda blockchain platform.' 2 | 3 | dependencies { 4 | api project(":web3j-corda-common") 5 | api group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api', version: versions.jaxrs 6 | 7 | testImplementation "com.github.tomakehurst:wiremock-jre8:${versions.wiremock}" 8 | testImplementation "com.fasterxml.jackson.module:jackson-module-kotlin:${versions.jackson}" 9 | } 10 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/AuthenticationFilter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.client.ClientRequestContext 16 | import javax.ws.rs.client.ClientRequestFilter 17 | import javax.ws.rs.core.HttpHeaders 18 | 19 | class AuthenticationFilter private constructor(private val token: String) : ClientRequestFilter { 20 | 21 | override fun filter(requestContext: ClientRequestContext) { 22 | requestContext.headers.putSingle(HttpHeaders.AUTHORIZATION, "Bearer $token") 23 | } 24 | 25 | companion object { 26 | fun token(token: String) = AuthenticationFilter(token) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/CorDapp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Path 16 | 17 | interface CorDapp { 18 | 19 | @get:Path("flows") 20 | val flows: FlowResource 21 | } 22 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/CorDappResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.Path 17 | import javax.ws.rs.PathParam 18 | 19 | interface CorDappResource { 20 | 21 | @GET 22 | fun findAll(): List 23 | 24 | @Path("{corDappId}") 25 | fun findById( 26 | @PathParam("corDappId") 27 | corDappId: String 28 | ): CorDapp 29 | } 30 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/CordaApi.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Consumes 16 | import javax.ws.rs.Path 17 | import javax.ws.rs.Produces 18 | import javax.ws.rs.core.MediaType 19 | 20 | @Path("api/rest") 21 | @Produces(MediaType.APPLICATION_JSON) 22 | @Consumes(MediaType.APPLICATION_JSON) 23 | interface CordaApi { 24 | 25 | /** 26 | * Retrieves all nodes if neither query parameter is supplied. 27 | * Otherwise returns a list of one node matching the supplied query parameter. 28 | */ 29 | @get:Path("network") 30 | val network: NetworkResource 31 | 32 | @get:Path("vault") 33 | val vault: VaultResource 34 | 35 | @get:Path("cordapps") 36 | val corDapps: CorDappResource 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/Flow.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Path 16 | 17 | /** 18 | * General CorDapp flow logic resources, eg. progress tracker etc. 19 | */ 20 | interface Flow { 21 | 22 | @get:Path("progress-tracker") 23 | val progressTracker: ProgressTracker 24 | } 25 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/FlowResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.Path 17 | import javax.ws.rs.PathParam 18 | 19 | interface FlowResource { 20 | 21 | /** 22 | * Retrieves a list of callable flows. Example response: 23 | * `["net.corda.core.flows.ContractUpgradeFlow$Authorise"]` 24 | */ 25 | @GET 26 | fun findAll(): List 27 | 28 | @Path("{flowId}") 29 | fun findById( 30 | @PathParam("flowId") 31 | flowId: String 32 | ): StartableFlow 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/NetworkResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Path 16 | 17 | interface NetworkResource { 18 | 19 | @get:Path("nodes") 20 | val nodes: NodeResource 21 | 22 | @get:Path("notaries") 23 | val notaries: NotaryResource 24 | } 25 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/NotaryResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.QueryParam 17 | import org.web3j.corda.model.core.identity.Party 18 | 19 | interface NotaryResource { 20 | 21 | /** 22 | * Retrieves all notaries. 23 | */ 24 | @GET 25 | fun findAll(): List 26 | 27 | /** 28 | * Retrieves by the supplied X500 name, e.g. `O=PartyB, L=New York, C=US`. 29 | * 30 | * @param x500Name the X500 name for the node. 31 | */ 32 | @GET 33 | fun findByX500Name( 34 | @QueryParam("x500-name") 35 | x500Name: String 36 | ): List 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/ProgressTracker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Path 16 | 17 | interface ProgressTracker { 18 | 19 | @get:Path("steps") 20 | val steps: StepsResource 21 | 22 | interface Step { 23 | val label: String 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/StartableFlow.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Consumes 16 | import javax.ws.rs.POST 17 | import javax.ws.rs.Produces 18 | import javax.ws.rs.core.MediaType.APPLICATION_JSON 19 | 20 | interface StartableFlow : Flow { 21 | 22 | @POST 23 | @Produces(APPLICATION_JSON) 24 | @Consumes(APPLICATION_JSON) 25 | fun start(parameters: Any): Any 26 | 27 | @POST 28 | @Produces(APPLICATION_JSON) 29 | fun start(): Any 30 | } 31 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/StepsResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.Path 17 | 18 | interface StepsResource { 19 | 20 | @GET 21 | fun findAll(): List 22 | 23 | @get:GET 24 | @get:Path("current") 25 | val current: ProgressTracker.Step 26 | 27 | @get:GET 28 | @get:Path("next") 29 | val next: ProgressTracker.Step 30 | } 31 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/VaultQueryResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import org.web3j.corda.model.core.node.services.Vault_Page_net_corda_core_contracts_ContractState 16 | import javax.ws.rs.GET 17 | import javax.ws.rs.QueryParam 18 | 19 | interface VaultQueryResource { 20 | 21 | @GET 22 | fun contractStateType( 23 | @QueryParam("contract-state-type") 24 | contractStateType: String 25 | ): Vault_Page_net_corda_core_contracts_ContractState 26 | } 27 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/api/VaultResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.api 14 | 15 | import javax.ws.rs.Path 16 | import org.web3j.braid.services.vault.VaultQuery 17 | import org.web3j.corda.model.core.node.services.Vault_Page_net_corda_core_contracts_ContractState 18 | 19 | interface VaultResource { 20 | 21 | @get:Path("vaultQuery") 22 | val queryBy: VaultQueryResource 23 | 24 | @Path("vaultQueryBy") 25 | fun query( 26 | query: VaultQuery 27 | ): Vault_Page_net_corda_core_contracts_ContractState 28 | } 29 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/AdminResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | import javax.ws.rs.Consumes 16 | import javax.ws.rs.GET 17 | import javax.ws.rs.POST 18 | import javax.ws.rs.Path 19 | import javax.ws.rs.Produces 20 | import javax.ws.rs.core.MediaType 21 | 22 | interface AdminResource { 23 | 24 | /** 25 | * Obtains a valid token. 26 | */ 27 | @POST 28 | @Path("login") 29 | @Produces(MediaType.TEXT_PLAIN) 30 | @Consumes(MediaType.APPLICATION_JSON) 31 | fun login(request: LoginRequest): String 32 | 33 | @get:Path("notaries") 34 | val notaries: NotariesResource 35 | 36 | @GET 37 | @Path("network-map") 38 | @Produces(MediaType.APPLICATION_JSON) 39 | fun networkMap(): NetworkMapType 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/CertManResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | import javax.ws.rs.POST 16 | import javax.ws.rs.Produces 17 | import javax.ws.rs.core.MediaType 18 | 19 | interface CertManResource { 20 | 21 | @POST 22 | @Produces(MediaType.TEXT_PLAIN) 23 | fun generate(): String 24 | } 25 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/LoginRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | data class LoginRequest( 16 | val user: String, 17 | val password: String 18 | ) 19 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/NetworkMapApi.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | import javax.ws.rs.Path 16 | 17 | /** 18 | * Network Map Service client (partial implementation). 19 | * 20 | * **Please note:** The protected parts of this API require JWT authentication. 21 | * 22 | * @see [AdminResource.login] 23 | */ 24 | interface NetworkMapApi { 25 | 26 | @get:Path("network-map") 27 | val networkMap: NetworkMapResource 28 | 29 | @get:Path("certificate") 30 | val certificate: CertificateResource 31 | 32 | @get:Path("certman/api") 33 | val certMan: CertManResource 34 | 35 | @get:Path("admin/api") 36 | val admin: AdminResource 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/NetworkMapType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | data class NetworkMapType( 16 | val nodeInfoHashes: List, 17 | val networkParameterHash: String, 18 | val parameters: Any? 19 | ) 20 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/NetworkParametersResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.Path 17 | import javax.ws.rs.PathParam 18 | import javax.ws.rs.Produces 19 | import javax.ws.rs.core.MediaType 20 | 21 | interface NetworkParametersResource { 22 | 23 | /** 24 | * Retrieve the signed network parameters. 25 | * The entire object is signed with the network map certificate which is also attached. 26 | */ 27 | @GET 28 | @Path("{hash}") 29 | @Produces(MediaType.APPLICATION_OCTET_STREAM) 30 | fun findById(@PathParam("hash") hash: String): ByteArray 31 | } 32 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/NodeInfoResource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | import javax.ws.rs.GET 16 | import javax.ws.rs.Path 17 | import javax.ws.rs.PathParam 18 | import javax.ws.rs.Produces 19 | import javax.ws.rs.core.MediaType 20 | 21 | interface NodeInfoResource { 22 | 23 | /** 24 | * Retrieve a signed NodeInfo as specified in the network map object. 25 | */ 26 | @GET 27 | @Path("{hash}") 28 | @Produces(MediaType.APPLICATION_OCTET_STREAM) 29 | fun findById(@PathParam("hash") hash: String): ByteArray 30 | } 31 | -------------------------------------------------------------------------------- /api/src/main/kotlin/org/web3j/corda/networkmap/NotaryType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | enum class NotaryType(val value: String) { 16 | 17 | VALIDATING("validating"), 18 | NON_VALIDATING("nonValidating"); 19 | 20 | override fun toString(): String { 21 | return value 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /api/src/test/resources/mappings/CordaApiTest.json: -------------------------------------------------------------------------------- 1 | { 2 | "request": { 3 | "method": "GET", 4 | "url": "/api/rest/network", 5 | "headers": { 6 | "Content-Type": { 7 | "equalTo": "application/json", 8 | "caseInsensitive": true 9 | } 10 | } 11 | }, 12 | "response": { 13 | "status": 200, 14 | "headers": { 15 | "Content-Type": "application/json" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /codegen/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Web3j code generation for the Corda blockchain platform.' 2 | 3 | dependencies { 4 | api project(':web3j-corda-common') 5 | api "jakarta.ws.rs:jakarta.ws.rs-api:${versions.jaxRs}" 6 | 7 | api("org.openapitools:openapi-generator:${versions.openApiGenerator}") { 8 | exclude group: 'com.github.jknack' 9 | exclude group: 'javax.activation' 10 | exclude group: 'javax.validation' 11 | exclude group: 'javax.xml.bind' 12 | } 13 | 14 | implementation("io.swagger:swagger-core:${versions.swagger}") { force = true } 15 | implementation("io.swagger:swagger-annotations:${versions.swagger}") { force = true } 16 | implementation "io.github.classgraph:classgraph:${versions.classgraph}" 17 | 18 | testImplementation project(':web3j-corda-test') 19 | testImplementation project(':web3j-corda-core') 20 | } 21 | -------------------------------------------------------------------------------- /codegen/src/main/kotlin/org/web3j/corda/codegen/CordaGenerator.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.codegen 14 | 15 | import java.io.File 16 | 17 | interface CordaGenerator { 18 | 19 | fun generate(): List 20 | } 21 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/cordapp_client_gradle.mustache: -------------------------------------------------------------------------------- 1 | dependencies { 2 | // web3j-corda dependency 3 | implementation (group: 'org.web3j.corda', name: 'web3j-corda-core', version: web3j_corda_version) { 4 | exclude group: 'com.fasterxml.jackson.core' 5 | } 6 | 7 | testImplementation ("org.web3j.corda:web3j-corda-test:${web3j_corda_version}") { 8 | exclude group: 'com.fasterxml.jackson.core' 9 | } 10 | 11 | testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiter_version}" 12 | testImplementation ("org.testcontainers:testcontainers:${testcontainers_version}") { 13 | exclude group: 'org.slf4j' 14 | } 15 | testImplementation ("io.swagger.core.v3:swagger-core:${swagger3_versions}") { 16 | exclude group: 'org.slf4j' 17 | } 18 | testImplementation "com.samskivert:jmustache:${jmustache_version}" 19 | testImplementation ("org.gradle:gradle-tooling-api:${gradle_tooling_version}") { 20 | exclude group: 'org.slf4j' 21 | } 22 | 23 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiter_version}" 24 | testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${jupiter_version}" 25 | } 26 | 27 | test { 28 | useJUnitPlatform() 29 | } 30 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/cordapp_client_new_test.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.workflows.api 2 | 3 | import org.junit.jupiter.api.Assertions.assertEquals 4 | 5 | import generated.{{packageName}}.flows.InitiatorPayload 6 | import javax.annotation.Generated 7 | import org.junit.jupiter.api.Test 8 | import org.web3j.corda.network.network 9 | import org.web3j.corda.network.nodes 10 | import org.web3j.corda.network.party 11 | import java.io.File 12 | import {{packageName}}.workflows.api.Workflows 13 | 14 | @Generated( 15 | value = ["{{generator}}"], 16 | date = "{{currentDate}}" 17 | ) 18 | class WorkFlowTest { 19 | 20 | var network = network { 21 | directory = File(System.getProperty("user.dir")).parentFile 22 | nodes { 23 | party { 24 | name = "O=PartyA, L=London, C=GB" 25 | } 26 | } 27 | } 28 | 29 | val text = "template" 30 | var payload = InitiatorPayload(text) 31 | 32 | @Test 33 | fun `start the Initiator flow`() { 34 | 35 | Workflows.load(network.parties[0].corda.service).flows.initiator.start(payload).apply { 36 | assertEquals("Hello from flow with $text", this) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/data_class.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | {{#vars}} 4 | * @param {{name}} {{{description}}} 5 | {{/vars}} 6 | */ 7 | @Generated( 8 | value = ["{{generator}}"], 9 | date = "{{currentDate}}" 10 | ) 11 | data class {{name}} ( 12 | {{#requiredVars}} 13 | {{>data_class_req_var}}{{^-last}}, 14 | {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, 15 | {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}}, 16 | {{/-last}}{{/optionalVars}} 17 | ) { 18 | {{#hasEnums}}{{#vars}}{{#isEnum}}enum class {{&nameInCamelCase}} { 19 | {{#allowableValues}}{{#enumVars}}{{#unquote}}{{{value}}}{{/unquote}}{{^-last}},{{/-last}} 20 | {{/enumVars}}{{/allowableValues}} 21 | }{{/isEnum}}{{/vars}}{{/hasEnums}} 22 | } 23 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/data_class_opt_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{classname}}.{{&nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/data_class_req_var.mustache: -------------------------------------------------------------------------------- 1 | {{#description}} 2 | /* {{{description}}} */ 3 | {{/description}} 4 | val {{{name}}}: {{#isEnum}}{{classname}}.{{&nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/enum_class.mustache: -------------------------------------------------------------------------------- 1 | /** 2 | * {{{description}}} 3 | * Values: {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} 4 | */ 5 | @Generated( 6 | value = ["{{generator}}"], 7 | date = "{{currentDate}}" 8 | ) 9 | enum class {{classname}} { 10 | {{#allowableValues}}{{#enumVars}}{{#unquote}}{{{value}}}{{/unquote}}{{^-last}},{{/-last}} 11 | {{/enumVars}}{{/allowableValues}} 12 | } 13 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/client/model.mustache: -------------------------------------------------------------------------------- 1 | package {{modelPackage}} 2 | 3 | {{#imports}}import {{import}} 4 | {{/imports}} 5 | 6 | import javax.annotation.Generated 7 | 8 | {{#models}} 9 | {{#model}} 10 | {{#isEnum}}{{>enum_class}}{{/isEnum}}{{^isEnum}}{{#isAlias}}typealias {{name}} = {{dataType}}{{/isAlias}}{{^isAlias}}{{>data_class}}{{/isAlias}}{{/isEnum}} 11 | {{/model}} 12 | {{/models}} 13 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/contracts/contract.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.contracts 2 | 3 | import net.corda.core.contracts.CommandData 4 | import net.corda.core.contracts.Contract 5 | import net.corda.core.transactions.LedgerTransaction 6 | 7 | // ************ 8 | // * Contract * 9 | // ************ 10 | class {{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}}Contract : Contract { 11 | companion object { 12 | // Used to identify our contract when building a transaction. 13 | const val ID = "{{packageName}}.contracts.{{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}}Contract" 14 | } 15 | 16 | // A transaction is valid if the verify() function of the contract of all the transaction's input and output states 17 | // does not throw an exception. 18 | override fun verify(tx: LedgerTransaction) { 19 | // Verification logic goes here. 20 | } 21 | 22 | // Used to indicate the transaction's intent. 23 | interface Commands : CommandData { 24 | class Action : Commands 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/contracts/contract_test.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.contracts 2 | 3 | import net.corda.testing.node.MockServices 4 | import org.junit.Test 5 | 6 | class ContractTests { 7 | private val ledgerServices = MockServices() 8 | 9 | @Test 10 | fun `dummy test`() { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/contracts/gradle_build.mustache: -------------------------------------------------------------------------------- 1 | apply plugin: 'net.corda.plugins.cordapp' 2 | 3 | cordapp { 4 | targetPlatformVersion corda_platform_version 5 | minimumPlatformVersion corda_platform_version 6 | contract { 7 | name "{{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}} CorDapp" 8 | vendor "Web3 Labs" 9 | licence "Apache License, Version 2.0" 10 | versionId 1 11 | } 12 | } 13 | 14 | dependencies { 15 | compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" 16 | 17 | // Corda dependencies. 18 | cordaCompile("$corda_release_group:corda-core:$corda_release_version") { 19 | exclude group: 'com.google.errorprone' 20 | exclude group: 'com.fasterxml.jackson.core' 21 | exclude group: 'com.fasterxml.jackson.dataformat' 22 | exclude group: 'com.fasterxml.jackson.module' 23 | exclude group: 'org.glassfish.jersey.core' 24 | exclude group: 'org.yaml' 25 | } 26 | 27 | testCompile ("$corda_release_group:corda-node-driver:$corda_release_version") { 28 | exclude group: 'com.google.errorprone' 29 | exclude group: 'com.fasterxml.jackson.core' 30 | exclude group: 'com.fasterxml.jackson.dataformat' 31 | exclude group: 'com.fasterxml.jackson.module' 32 | exclude group: 'org.glassfish.jersey.core' 33 | exclude group: 'org.yaml' 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/contracts/state.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.states 2 | 3 | import {{packageName}}.contracts.{{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}}Contract 4 | import net.corda.core.contracts.BelongsToContract 5 | import net.corda.core.contracts.ContractState 6 | import net.corda.core.identity.AbstractParty 7 | 8 | // ********* 9 | // * State * 10 | // ********* 11 | @BelongsToContract({{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}}Contract::class) 12 | data class {{#titlecase}}{{#camelcase}}{{corDappName}}{{/camelcase}}{{/titlecase}}State(val data: String, override val participants: List 13 | = listOf()) : ContractState 14 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/cordapp_gradle_properties.mustache: -------------------------------------------------------------------------------- 1 | name={{corDappName}} 2 | group={{packageName}} 3 | version=0.1-SNAPSHOT 4 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/workflows/flow.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}}.flows 2 | 3 | import co.paralleluniverse.fibers.Suspendable 4 | import net.corda.core.flows.* 5 | import net.corda.core.utilities.ProgressTracker 6 | 7 | // ********* 8 | // * Flows * 9 | // ********* 10 | @InitiatingFlow 11 | @StartableByRPC 12 | class Initiator(private val input: String) : FlowLogic() { 13 | override val progressTracker = ProgressTracker() 14 | 15 | @Suspendable 16 | override fun call(): String { 17 | return "Hello from flow with $input" 18 | } 19 | } 20 | 21 | @InitiatedBy(Initiator::class) 22 | class Responder(val counterpartySession: FlowSession) : FlowLogic() { 23 | @Suspendable 24 | override fun call() { 25 | // Responder flow logic goes here. 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/workflows/flow_contract_test.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}} 2 | 3 | import net.corda.testing.node.MockServices 4 | import org.junit.Test 5 | 6 | class ContractTests { 7 | private val ledgerServices = MockServices() 8 | 9 | @Test 10 | fun `dummy test`() { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/workflows/flow_test.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}} 2 | 3 | import {{packageName}}.flows.Responder 4 | import net.corda.testing.node.MockNetwork 5 | import net.corda.testing.node.MockNetworkParameters 6 | import net.corda.testing.node.TestCordapp 7 | import org.junit.After 8 | import org.junit.Before 9 | import org.junit.Test 10 | 11 | class FlowTests { 12 | private val network = MockNetwork(MockNetworkParameters(cordappsForAllNodes = listOf( 13 | TestCordapp.findCordapp("{{packageName}}.contracts"), 14 | TestCordapp.findCordapp("{{packageName}}.flows") 15 | ))) 16 | 17 | private val a = network.createNode() 18 | private val b = network.createNode() 19 | 20 | init { 21 | listOf(a, b).forEach { 22 | it.registerInitiatedFlow(Responder::class.java) 23 | } 24 | } 25 | 26 | @Before 27 | fun setup() = network.runNetwork() 28 | 29 | @After 30 | fun tearDown() = network.stopNodes() 31 | 32 | @Test 33 | fun `dummy test`() { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /codegen/src/main/resources/cordapp/workflows/node_driver.mustache: -------------------------------------------------------------------------------- 1 | package {{packageName}} 2 | 3 | import net.corda.core.identity.CordaX500Name 4 | import net.corda.core.utilities.getOrThrow 5 | import net.corda.testing.driver.DriverParameters 6 | import net.corda.testing.driver.driver 7 | import net.corda.testing.node.User 8 | 9 | /** 10 | * Allows you to run your nodes through an IDE (as opposed to using deployNodes). Do not use in a production 11 | * environment. 12 | */ 13 | fun main(args: Array) { 14 | val rpcUsers = listOf(User("user1", "test", permissions = setOf("ALL"))) 15 | 16 | driver(DriverParameters(startNodesInProcess = true, waitForAllNodesToFinish = true)) { 17 | startNode(providedName = CordaX500Name("PartyA", "London", "GB"), rpcUsers = rpcUsers).getOrThrow() 18 | startNode(providedName = CordaX500Name("PartyB", "New York", "US"), rpcUsers = rpcUsers).getOrThrow() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /common/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Web3j common libraries for the Corda blockchain platform.' 2 | 3 | dependencies { 4 | implementation group: 'javax.activation', name: 'javax.activation-api', version: versions.activationApi 5 | implementation group: 'javax.xml.bind', name: 'jaxb-api', version: versions.jaxbApi 6 | 7 | implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jackson 8 | implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: versions.jackson 9 | } 10 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/braid/services/SimpleNodeInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.braid.services 14 | 15 | data class SimpleNodeInfo( 16 | val addresses: List, 17 | val legalIdentities: List 18 | ) 19 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/braid/services/vault/VaultQuery.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.braid.services.vault 14 | 15 | import org.web3j.corda.model.core.node.services.vault.PageSpecification 16 | import org.web3j.corda.model.core.node.services.vault.Sort 17 | 18 | data class VaultQuery( 19 | /** 20 | * Java class name 21 | */ 22 | val contractStateType: String, 23 | val criteria: Any? = null, 24 | val paging: PageSpecification? = null, 25 | val sorting: Sort? = null 26 | ) 27 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/Amount.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param quantity total amount in minor units 20 | * @param displayTokenSize 21 | * @param token 22 | * @param tokenType 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-12-05T15:01:02.723Z" 27 | ) 28 | data class Amount( 29 | /* total amount in minor units */ 30 | val quantity: kotlin.Int, 31 | val displayTokenSize: java.math.BigDecimal, 32 | val token: kotlin.String, 33 | val tokenType: kotlin.String? = null 34 | ) 35 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/AmountCurrency.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model 14 | 15 | import java.math.BigDecimal 16 | 17 | data class AmountCurrency( 18 | /** 19 | * total amount in minor units 20 | */ 21 | val quantity: Int, 22 | val displayTokenSize: BigDecimal, 23 | val token: String 24 | ) 25 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/InvocationError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model 14 | 15 | data class InvocationError( 16 | /** 17 | * The error message. 18 | * */ 19 | val message: String, 20 | /** 21 | * The type of error. 22 | **/ 23 | val type: String 24 | ) 25 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/confidential/CertificateOwnershipAssertion.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.confidential 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param x500Name CordaX500Name encoded Party 20 | * @param publicKey Base 58 Encoded Public Key 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.606Z" 25 | ) 26 | data class CertificateOwnershipAssertion( 27 | /* CordaX500Name encoded Party */ 28 | val x500Name: String, 29 | /* Base 58 Encoded Public Key */ 30 | val publicKey: String 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/confidential/SwapIdentitiesFlow_IdentityWithSignature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.confidential 14 | 15 | data class SwapIdentitiesFlow_IdentityWithSignature( 16 | /* Hex encoded Byte Array */ 17 | val identity: String, 18 | /* Hex encoded Byte Array */ 19 | val signature: String 20 | ) 21 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/Actor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | data class Actor( 16 | /* CordaX500Name encoded Party */ 17 | val owningLegalIdentity: String, 18 | val id: Actor_Id? = null, 19 | val serviceId: AuthServiceId? = null 20 | ) 21 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/Actor_Id.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | data class Actor_Id( 16 | val value: String 17 | ) 18 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/AuthServiceId.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param value 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.606Z" 24 | ) 25 | data class AuthServiceId( 26 | val value: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/InvocationOrigin_Peer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | data class InvocationOrigin_Peer( 16 | /* CordaX500Name encoded Party */ 17 | val party: String 18 | ) 19 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/InvocationOrigin_RPC.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param actor 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.606Z" 24 | ) 25 | data class InvocationOrigin_RPC( 26 | val actor: org.web3j.corda.model.core.context.Actor? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/InvocationOrigin_Scheduled.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | data class InvocationOrigin_Scheduled( 16 | val scheduledState: org.web3j.corda.model.core.contracts.ScheduledStateRef? = null 17 | ) 18 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/InvocationOrigin_Service.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param serviceClassName 20 | * @param owningLegalIdentity CordaX500Name encoded Party 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.606Z" 25 | ) 26 | data class InvocationOrigin_Service( 27 | val serviceClassName: String, 28 | /* CordaX500Name encoded Party */ 29 | val owningLegalIdentity: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/Trace.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param invocationId 20 | * @param sessionId 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.606Z" 25 | ) 26 | data class Trace( 27 | val invocationId: org.web3j.corda.model.core.context.Trace_InvocationId? = null, 28 | val sessionId: org.web3j.corda.model.core.context.Trace_SessionId? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/Trace_InvocationId.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param value 20 | * @param timestamp JSR310 encoded time representation of Instant 21 | * @param entityType 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:12:09.607Z" 26 | ) 27 | data class Trace_InvocationId( 28 | val value: String, 29 | /* JSR310 encoded time representation of Instant */ 30 | val timestamp: String, 31 | val entityType: String? = null 32 | ) 33 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/context/Trace_SessionId.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.context 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param value 20 | * @param timestamp JSR310 encoded time representation of Instant 21 | * @param entityType 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:12:09.607Z" 26 | ) 27 | data class Trace_SessionId( 28 | val value: String, 29 | /* JSR310 encoded time representation of Instant */ 30 | val timestamp: String, 31 | val entityType: String? = null 32 | ) 33 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/AmountTransfer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param quantityDelta 20 | * @param destination 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class AmountTransfer( 27 | val quantityDelta: Long, 28 | val destination: Any 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/Command_Object.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param value 20 | * @param signers 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-10-15T13:26:15.478Z" 25 | ) 26 | data class Command_Object( 27 | val value: Any, 28 | val signers: List 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/ContractState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param participants 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.607Z" 24 | ) 25 | data class ContractState( 26 | val participants: List? 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/Issued.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param issuer 20 | * @param product 21 | * @param productType 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:38:07.643372Z" 26 | ) 27 | data class Issued( 28 | val issuer: Issued_issuer, 29 | val product: Any, 30 | val productType: String 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/Issued_issuer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | import org.web3j.corda.model.core.identity.AbstractParty 17 | 18 | /** 19 | * 20 | * @param party 21 | * @param reference 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:38:07.643372Z" 26 | ) 27 | data class Issued_issuer( 28 | val party: AbstractParty, 29 | val reference: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/LinearPointer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param pointer 20 | * @param type Java class name 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class LinearPointer( 27 | /* Java class name */ 28 | val type: String, 29 | val pointer: org.web3j.corda.model.core.contracts.UniqueIdentifier? = null 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/PartyAndReference.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param party 20 | * @param reference Hex encoded Byte Array 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class PartyAndReference( 27 | val party: org.web3j.corda.model.core.identity.AbstractParty, 28 | /* Hex encoded Byte Array */ 29 | val reference: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/PrivacySalt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.478Z" 24 | ) 25 | data class PrivacySalt( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/ScheduledStateRef.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param ref 20 | * @param scheduledAt JSR310 encoded time representation of Instant 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class ScheduledStateRef( 27 | /* JSR310 encoded time representation of Instant */ 28 | val scheduledAt: String, 29 | val ref: org.web3j.corda.model.core.contracts.StateRef? = null 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StateAndRef.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param state 20 | * @param ref 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class StateAndRef( 27 | val state: org.web3j.corda.model.core.contracts.TransactionState_net_corda_core_contracts_ContractState? = null, 28 | val ref: org.web3j.corda.model.core.contracts.StateRef? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StateAndRef_Object.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param state 20 | * @param ref 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class StateAndRef_Object( 27 | val state: org.web3j.corda.model.core.contracts.TransactionState_Object? = null, 28 | val ref: org.web3j.corda.model.core.contracts.StateRef? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StateAndRef_net_corda_core_contracts_ContractState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param state 20 | * @param ref 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class StateAndRef_net_corda_core_contracts_ContractState( 27 | val state: org.web3j.corda.model.core.contracts.TransactionState_net_corda_core_contracts_ContractState? = null, 28 | val ref: org.web3j.corda.model.core.contracts.StateRef? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StatePointer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param type Java class name 20 | * @param pointer 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-10-15T13:26:15.478Z" 25 | ) 26 | data class StatePointer( 27 | /* Java class name */ 28 | val type: String, 29 | val pointer: Any 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StateRef.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param txhash Base 58 Encoded Secure Hash 20 | * @param index 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class StateRef( 27 | /* Base 58 Encoded Secure Hash */ 28 | val txhash: String, 29 | val index: Int 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/StaticPointer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param pointer 20 | * @param type Java class name 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class StaticPointer( 27 | /* Java class name */ 28 | val type: String, 29 | val pointer: org.web3j.corda.model.core.contracts.StateRef? = null 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/TransactionState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `data` 20 | * @param contract 21 | * @param notary 22 | * @param encumbrance 23 | * @param constraint 24 | */ 25 | @Generated( 26 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 27 | date = "2019-09-25T12:12:09.607Z" 28 | ) 29 | data class TransactionState( 30 | val contract: String, 31 | val `data`: org.web3j.corda.model.core.contracts.ContractState? = null, 32 | val notary: org.web3j.corda.model.core.identity.Party? = null, 33 | val encumbrance: Int? = null, 34 | val constraint: Any? = null 35 | ) 36 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/TransactionState_Object.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `data` 20 | * @param contract 21 | * @param notary 22 | * @param encumbrance 23 | * @param constraint 24 | */ 25 | @Generated( 26 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 27 | date = "2019-09-25T12:12:09.607Z" 28 | ) 29 | data class TransactionState_Object( 30 | val `data`: Any, 31 | val contract: String, 32 | val notary: org.web3j.corda.model.core.identity.Party? = null, 33 | val encumbrance: Int? = null, 34 | val constraint: Any? = null 35 | ) 36 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/contracts/UniqueIdentifier.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.contracts 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param externalId 20 | * @param id 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class UniqueIdentifier( 27 | val id: java.util.UUID, 28 | val externalId: String? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/DigitalSignature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.478Z" 24 | ) 25 | data class DigitalSignature( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/DigitalSignature_WithKey.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param by Base 58 Encoded Public Key 20 | * @param bytes 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-10-15T13:26:15.478Z" 25 | ) 26 | data class DigitalSignature_WithKey( 27 | /* Base 58 Encoded Public Key */ 28 | val by: String, 29 | val bytes: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/PartialMerkleTree.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param root 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.478Z" 24 | ) 25 | data class PartialMerkleTree( 26 | val root: Any? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/SignatureMetadata.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param platformVersion 20 | * @param schemeNumberID 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-10-15T13:26:15.483Z" 25 | ) 26 | data class SignatureMetadata( 27 | val platformVersion: Int, 28 | val schemeNumberID: Int 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/SignedData_net_corda_core_flows_NotaryError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param raw Hex encoded Byte Array 20 | * @param sig Hex encoded Byte Array 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.607Z" 25 | ) 26 | data class SignedData_net_corda_core_flows_NotaryError( 27 | /* Hex encoded Byte Array */ 28 | val raw: String, 29 | /* Hex encoded Byte Array */ 30 | val sig: String 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/crypto/TransactionSignature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.crypto 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | * @param by Base 58 Encoded Public Key 21 | * @param signatureMetadata 22 | * @param partialMerkleTree 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-10-15T13:26:15.483Z" 27 | ) 28 | data class TransactionSignature( 29 | val bytes: String, 30 | /* Base 58 Encoded Public Key */ 31 | val by: String, 32 | val signatureMetadata: org.web3j.corda.model.core.crypto.SignatureMetadata? = null, 33 | val partialMerkleTree: org.web3j.corda.model.core.crypto.PartialMerkleTree? = null 34 | ) 35 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/AbstractStateReplacementFlow_Proposal.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param stateRef 20 | * @param modification 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class AbstractStateReplacementFlow_Proposal( 27 | val modification: Any, 28 | val stateRef: org.web3j.corda.model.core.contracts.StateRef? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/FlowInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param flowVersion 20 | * @param appName 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class FlowInfo( 27 | val flowVersion: Int, 28 | val appName: String 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/IllegalFlowLogicException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param type 20 | * @param msg 21 | * @param cause 22 | * @param stackTrace 23 | * @param message 24 | * @param localizedMessage 25 | * @param suppressed 26 | */ 27 | @Generated( 28 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 29 | date = "2019-09-25T12:12:09.608Z" 30 | ) 31 | data class IllegalFlowLogicException( 32 | val type: String, 33 | val msg: String? = null, 34 | val cause: Any? = null, 35 | val stackTrace: List? = null, 36 | val message: String? = null, 37 | val localizedMessage: String? = null, 38 | val suppressed: List? = null 39 | ) 40 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotarisationPayload.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param transaction 20 | * @param requestSignature 21 | * @param coreTransaction 22 | * @param signedTransaction 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-09-25T12:12:09.608Z" 27 | ) 28 | data class NotarisationPayload( 29 | val transaction: Any, 30 | val requestSignature: org.web3j.corda.model.core.flows.NotarisationRequestSignature? = null, 31 | val coreTransaction: org.web3j.corda.model.core.transactions.CoreTransaction? = null, 32 | val signedTransaction: org.web3j.corda.model.core.transactions.SignedTransaction? = null 33 | ) 34 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotarisationRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param statesToConsume 20 | * @param transactionId Base 58 Encoded Secure Hash 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class NotarisationRequest( 27 | val statesToConsume: List, 28 | /* Base 58 Encoded Secure Hash */ 29 | val transactionId: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotarisationRequestSignature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param digitalSignature Hex encoded Byte Array 20 | * @param platformVersion 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class NotarisationRequestSignature( 27 | /* Hex encoded Byte Array */ 28 | val digitalSignature: String, 29 | val platformVersion: Int 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotarisationResponse.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param signatures 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NotarisationResponse( 26 | val signatures: List 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotaryError_Conflict.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param txId Base 58 Encoded Secure Hash 20 | * @param consumedStates 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class NotaryError_Conflict( 27 | /* Base 58 Encoded Secure Hash */ 28 | val txId: String, 29 | val consumedStates: Map 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotaryError_General.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param cause 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NotaryError_General( 26 | val cause: Any 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotaryError_RequestSignatureInvalid.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param cause 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NotaryError_RequestSignatureInvalid( 26 | val cause: Any 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotaryError_TimeWindowInvalid.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param currentTime JSR310 encoded time representation of Instant 20 | * @param txTimeWindow 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class NotaryError_TimeWindowInvalid( 27 | /* JSR310 encoded time representation of Instant */ 28 | val currentTime: String, 29 | val txTimeWindow: org.web3j.corda.model.core.contracts.TimeWindow? = null 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/NotaryError_TransactionInvalid.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param cause 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NotaryError_TransactionInvalid( 26 | val cause: Any 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/StateConsumptionDetails.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param hashOfTransactionId Base 58 Encoded Secure Hash 20 | * @param type 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class StateConsumptionDetails( 27 | /* Base 58 Encoded Secure Hash */ 28 | val hashOfTransactionId: String, 29 | val type: org.web3j.corda.model.core.flows.StateConsumptionDetails.Type 30 | ) { 31 | enum class Type { 32 | INPUT_STATE, 33 | REFERENCE_INPUT_STATE 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/flows/WaitTimeUpdate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.flows 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param waitTime JSR310 encoded time representation of Duration 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class WaitTimeUpdate( 26 | /* JSR310 encoded time representation of Duration */ 27 | val waitTime: String 28 | ) 29 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/identity/AbstractParty.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.identity 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param owningKey Base 58 Encoded Public Key 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class AbstractParty( 26 | /* Base 58 Encoded Public Key */ 27 | val owningKey: String 28 | ) 29 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/identity/AnonymousParty.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.identity 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param owningKey Base 58 Encoded Public Key 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class AnonymousParty( 26 | /* Base 58 Encoded Public Key */ 27 | val owningKey: String 28 | ) 29 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/identity/Party.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.identity 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param name CordaX500Name encoded Party 20 | * @param owningKey Base 58 Encoded Public Key 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class Party( 27 | /* CordaX500Name encoded Party */ 28 | val name: String, 29 | /* Base 58 Encoded Public Key */ 30 | val owningKey: String 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/NodeInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param addresses 20 | * @param legalIdentitiesAndCerts 21 | * @param platformVersion 22 | * @param serial 23 | * @param legalIdentities 24 | */ 25 | @Generated( 26 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 27 | date = "2019-09-25T12:12:09.608Z" 28 | ) 29 | data class NodeInfo( 30 | val addresses: List, 31 | val legalIdentitiesAndCerts: List, 32 | val platformVersion: Int, 33 | val serial: Long, 34 | val legalIdentities: List 35 | ) 36 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/NetworkMapCache_MapChange.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param node 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.483Z" 24 | ) 25 | data class NetworkMapCache_MapChange( 26 | val node: org.web3j.corda.model.core.node.NodeInfo? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/NetworkMapCache_MapChange_Added.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param node 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NetworkMapCache_MapChange_Added( 26 | val node: org.web3j.corda.model.core.node.NodeInfo? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/NetworkMapCache_MapChange_Modified.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param node 20 | * @param previousNode 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.608Z" 25 | ) 26 | data class NetworkMapCache_MapChange_Modified( 27 | val node: org.web3j.corda.model.core.node.NodeInfo? = null, 28 | val previousNode: org.web3j.corda.model.core.node.NodeInfo? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/NetworkMapCache_MapChange_Removed.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param node 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.608Z" 24 | ) 25 | data class NetworkMapCache_MapChange_Removed( 26 | val node: org.web3j.corda.model.core.node.NodeInfo? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/Vault.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param states 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class Vault( 26 | val states: Any 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/Vault_ConstraintInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param constraint 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class Vault_ConstraintInfo( 26 | val constraint: Any? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/AttachmentQueryCriteria_AndComposition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param a 20 | * @param b 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class AttachmentQueryCriteria_AndComposition( 27 | val a: Any? = null, 28 | val b: Any? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/AttachmentQueryCriteria_OrComposition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param a 20 | * @param b 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class AttachmentQueryCriteria_OrComposition( 27 | val a: Any? = null, 28 | val b: Any? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/AttachmentSort.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param columns 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class AttachmentSort( 26 | val columns: List 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/Column.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param name 20 | * @param declaringClass Java class name 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class Column( 27 | val name: String, 28 | /* Java class name */ 29 | val declaringClass: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_AggregateFunction.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param type 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class ColumnPredicate_AggregateFunction( 26 | val type: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_AggregateFunction.Type 27 | ) { 28 | enum class Type { 29 | COUNT, 30 | AVG, 31 | MIN, 32 | MAX, 33 | SUM 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_Between.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param rightToLiteral 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class ColumnPredicate_Between( 26 | val rightToLiteral: Any 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_BinaryComparison.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `operator` 20 | * @param rightLiteral 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class ColumnPredicate_BinaryComparison( 27 | val `operator`: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_BinaryComparison.`Operator`, 28 | val rightLiteral: Any 29 | ) { 30 | enum class `Operator` { 31 | LESS_THAN, 32 | LESS_THAN_OR_EQUAL, 33 | GREATER_THAN, 34 | GREATER_THAN_OR_EQUAL 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_CollectionExpression.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `operator` 20 | * @param rightLiteral 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class ColumnPredicate_CollectionExpression( 27 | val `operator`: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_CollectionExpression.`Operator`, 28 | val rightLiteral: List 29 | ) { 30 | enum class `Operator` { 31 | IN, 32 | NOT_IN, 33 | IN_IGNORE_CASE, 34 | NOT_IN_IGNORE_CASE 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_EqualityComparison.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `operator` 20 | * @param rightLiteral 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class ColumnPredicate_EqualityComparison( 27 | val `operator`: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_EqualityComparison.`Operator`, 28 | val rightLiteral: Any 29 | ) { 30 | enum class `Operator` { 31 | EQUAL, 32 | NOT_EQUAL, 33 | EQUAL_IGNORE_CASE, 34 | NOT_EQUAL_IGNORE_CASE 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_Likeness.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `operator` 20 | * @param rightLiteral 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class ColumnPredicate_Likeness( 27 | val `operator`: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_Likeness.`Operator`, 28 | val rightLiteral: String 29 | ) { 30 | enum class `Operator` { 31 | LIKE, 32 | NOT_LIKE, 33 | LIKE_IGNORE_CASE, 34 | NOT_LIKE_IGNORE_CASE 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/ColumnPredicate_NullExpression.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param `operator` 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class ColumnPredicate_NullExpression( 26 | val `operator`: org.web3j.corda.model.core.node.services.vault.ColumnPredicate_NullExpression.`Operator` 27 | ) { 28 | enum class `Operator` { 29 | IS_NULL, 30 | NOT_NULL 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/Column_Object_Object.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param name 20 | * @param declaringClass Java class name 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class Column_Object_Object( 27 | val name: String, 28 | /* Java class name */ 29 | val declaringClass: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/CriteriaExpression_BinaryLogical.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param left 20 | * @param right 21 | * @param `operator` 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:12:09.609Z" 26 | ) 27 | data class CriteriaExpression_BinaryLogical( 28 | val `operator`: org.web3j.corda.model.core.node.services.vault.CriteriaExpression_BinaryLogical.`Operator`, 29 | val left: Any? = null, 30 | val right: Any? = null 31 | ) { 32 | enum class `Operator` { 33 | AND, 34 | OR 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/CriteriaExpression_ColumnPredicateExpression.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param column 20 | * @param predicate 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class CriteriaExpression_ColumnPredicateExpression( 27 | val column: org.web3j.corda.model.core.node.services.vault.Column_Object_Object? = null, 28 | val predicate: Any? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/CriteriaExpression_Not.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param expression 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.609Z" 24 | ) 25 | data class CriteriaExpression_Not( 26 | val expression: Any? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/PageSpecification.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param pageNumber 20 | * @param pageSize 21 | * @param default 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:12:09.609Z" 26 | ) 27 | data class PageSpecification( 28 | val pageNumber: Int, 29 | val pageSize: Int, 30 | val default: Boolean 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/QueryCriteria_AndComposition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param a 20 | * @param b 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.609Z" 25 | ) 26 | data class QueryCriteria_AndComposition( 27 | val a: Any? = null, 28 | val b: Any? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/QueryCriteria_OrComposition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param a 20 | * @param b 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class QueryCriteria_OrComposition( 27 | val a: Any? = null, 28 | val b: Any? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/QueryCriteria_SoftLockingCondition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param type 20 | * @param lockIds 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class QueryCriteria_SoftLockingCondition( 27 | val type: org.web3j.corda.model.core.node.services.vault.QueryCriteria_SoftLockingCondition.Type, 28 | val lockIds: List 29 | ) { 30 | enum class Type { 31 | UNLOCKED_ONLY, 32 | LOCKED_ONLY, 33 | SPECIFIED, 34 | UNLOCKED_AND_SPECIFIED 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/QueryCriteria_TimeCondition.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param type 20 | * @param predicate 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class QueryCriteria_TimeCondition( 27 | val type: org.web3j.corda.model.core.node.services.vault.QueryCriteria_TimeCondition.Type, 28 | val predicate: Any? = null 29 | ) { 30 | enum class Type { 31 | RECORDED, 32 | CONSUMED 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/Sort.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param columns 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.61Z" 24 | ) 25 | data class Sort( 26 | val columns: List 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/SortAttribute_Custom.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param entityStateClass Java class name 20 | * @param entityStateColumnName 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class SortAttribute_Custom( 27 | /* Java class name */ 28 | val entityStateClass: String, 29 | val entityStateColumnName: String 30 | ) 31 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/SortAttribute_Standard.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param attribute 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.61Z" 24 | ) 25 | data class SortAttribute_Standard( 26 | val attribute: Any? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/node/services/vault/Sort_SortColumn.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param sortAttribute 20 | * @param direction 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class Sort_SortColumn( 27 | val direction: org.web3j.corda.model.core.node.services.vault.Sort_SortColumn.Direction, 28 | val sortAttribute: Any? = null 29 | ) { 30 | enum class Direction { 31 | ASC, 32 | DESC 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/schemas/CommonSchemaV1_LinearState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.schemas 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param participants 20 | * @param externalId 21 | * @param uuid 22 | * @param stateRef 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-09-25T12:12:09.61Z" 27 | ) 28 | data class CommonSchemaV1_LinearState( 29 | val uuid: java.util.UUID, 30 | val participants: List? = null, 31 | val externalId: String? = null, 32 | val stateRef: org.web3j.corda.model.core.schemas.PersistentStateRef? = null 33 | ) 34 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/schemas/MappedSchema.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.schemas 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param schemaFamily Java class name 20 | * @param version 21 | * @param mappedTypes 22 | * @param name 23 | * @param migrationResource 24 | */ 25 | @Generated( 26 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 27 | date = "2019-10-15T13:26:15.483Z" 28 | ) 29 | data class MappedSchema( 30 | val version: Int, 31 | val mappedTypes: Any, 32 | val name: String, 33 | /* Java class name */ 34 | val schemaFamily: String? = null, 35 | val migrationResource: String? = null 36 | ) 37 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/schemas/PersistentState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.schemas 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param stateRef 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.483Z" 24 | ) 25 | data class PersistentState( 26 | val stateRef: org.web3j.corda.model.core.schemas.PersistentStateRef? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/schemas/PersistentStateRef.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.schemas 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param txId 20 | * @param index 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class PersistentStateRef( 27 | val txId: String, 28 | val index: Int 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/serialization/SerializedBytes_net_corda_core_flows_NotaryError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.serialization 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.484Z" 24 | ) 25 | data class SerializedBytes_net_corda_core_flows_NotaryError( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/serialization/SerializedBytes_net_corda_core_identity_PartyAndCertificate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.serialization 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.484Z" 24 | ) 25 | data class SerializedBytes_net_corda_core_identity_PartyAndCertificate( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/serialization/SerializedBytes_net_corda_core_transactions_CoreTransaction.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.serialization 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.484Z" 24 | ) 25 | data class SerializedBytes_net_corda_core_transactions_CoreTransaction( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/transactions/ComponentGroup.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.transactions 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param groupIndex 20 | * @param components 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class ComponentGroup( 27 | val groupIndex: Int, 28 | val components: List 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/transactions/ContractUpgradeFilteredTransaction_FilteredComponent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.transactions 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param component Hex encoded Byte Array 20 | * @param nonce Base 58 Encoded Secure Hash 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class ContractUpgradeFilteredTransaction_FilteredComponent( 27 | /* Hex encoded Byte Array */ 28 | val component: String, 29 | /* Base 58 Encoded Secure Hash */ 30 | val nonce: String 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/utilities/ByteSequence.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.utilities 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | * @param offset 21 | * @param size 22 | * @param bytes 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-10-15T13:26:15.484Z" 27 | ) 28 | data class ByteSequence( 29 | val offset: Int, 30 | val size: Int, 31 | val bytes: String 32 | ) 33 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/utilities/Id.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.utilities 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param value 20 | * @param entityType 21 | * @param timestamp JSR310 encoded time representation of Instant 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-10-15T13:26:15.484Z" 26 | ) 27 | data class Id( 28 | val value: Any, 29 | /* JSR310 encoded time representation of Instant */ 30 | val timestamp: String, 31 | val entityType: String? = null 32 | ) 33 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/utilities/NetworkHostAndPort.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.utilities 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param host 20 | * @param port 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.61Z" 25 | ) 26 | data class NetworkHostAndPort( 27 | val host: String, 28 | val port: Int 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/core/utilities/OpaqueBytes.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.core.utilities 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param bytes 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-10-15T13:26:15.484Z" 24 | ) 25 | data class OpaqueBytes( 26 | val bytes: String 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/node/services/vault/VaultSchemaV1.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param name 20 | * @param migrationResource 21 | * @param version 22 | * @param mappedTypes 23 | */ 24 | @Generated( 25 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 26 | date = "2019-09-25T12:12:09.611Z" 27 | ) 28 | data class VaultSchemaV1( 29 | val name: String, 30 | val migrationResource: String, 31 | val version: Int, 32 | val mappedTypes: Any 33 | ) 34 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/node/services/vault/VaultSchemaV1_VaultLinearStates.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.node.services.vault 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param externalId 20 | * @param uuid 21 | * @param stateRef 22 | */ 23 | @Generated( 24 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 25 | date = "2019-09-25T12:12:09.611Z" 26 | ) 27 | data class VaultSchemaV1_VaultLinearStates( 28 | val uuid: java.util.UUID, 29 | val externalId: String? = null, 30 | val stateRef: org.web3j.corda.model.core.schemas.PersistentStateRef? = null 31 | ) 32 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/notary/experimental/bftsmart/BFTSmart_ClusterResponse_Error.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.notary.experimental.bftsmart 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param errors 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.611Z" 24 | ) 25 | data class BFTSmart_ClusterResponse_Error( 26 | val errors: List 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/notary/experimental/bftsmart/BFTSmart_ClusterResponse_Signatures.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.notary.experimental.bftsmart 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param txSignatures 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.612Z" 24 | ) 25 | data class BFTSmart_ClusterResponse_Signatures( 26 | val txSignatures: List 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/notary/experimental/bftsmart/BFTSmart_CommitRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.notary.experimental.bftsmart 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param payload 20 | * @param callerIdentity 21 | */ 22 | @Generated( 23 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 24 | date = "2019-09-25T12:12:09.612Z" 25 | ) 26 | data class BFTSmart_CommitRequest( 27 | val payload: org.web3j.corda.model.core.flows.NotarisationPayload? = null, 28 | val callerIdentity: org.web3j.corda.model.core.identity.Party? = null 29 | ) 30 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/notary/experimental/bftsmart/BFTSmart_ReplicaResponse_Error.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.notary.experimental.bftsmart 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param error 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.612Z" 24 | ) 25 | data class BFTSmart_ReplicaResponse_Error( 26 | val error: org.web3j.corda.model.core.crypto.SignedData_net_corda_core_flows_NotaryError? = null 27 | ) 28 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/model/notary/experimental/bftsmart/BFTSmart_ReplicaResponse_Signature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.model.notary.experimental.bftsmart 14 | 15 | import javax.annotation.Generated 16 | 17 | /** 18 | * 19 | * @param txSignature Hex encoded Byte Array 20 | */ 21 | @Generated( 22 | value = ["org.web3j.corda.codegen.CorDappClientGenerator"], 23 | date = "2019-09-25T12:12:09.612Z" 24 | ) 25 | data class BFTSmart_ReplicaResponse_Signature( 26 | /* Hex encoded Byte Array */ 27 | val txSignature: String 28 | ) 29 | -------------------------------------------------------------------------------- /common/src/main/kotlin/org/web3j/corda/util/OpenApiVersion.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.util 14 | 15 | enum class OpenApiVersion(val version: String) { 16 | 17 | v2_0("2.0"), 18 | v3_0("3.0"), 19 | v3_0_1("3.0.1"); 20 | 21 | override fun toString() = version 22 | 23 | fun toInt() = version.split(".").first().toInt() 24 | 25 | companion object { 26 | 27 | @JvmStatic 28 | fun fromVersion(version: String): OpenApiVersion { 29 | return values().find { it.version == version } 30 | ?: throw IllegalArgumentException("No enum constant for version $version") 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /common/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /common/src/main/resources/logging.properties: -------------------------------------------------------------------------------- 1 | # Register SLF4JBridgeHandler as handler for the j.u.l. root logger 2 | handlers=org.slf4j.bridge.SLF4JBridgeHandler 3 | -------------------------------------------------------------------------------- /common/src/test/kotlin/org/web3j/corda/util/CordaUtilsTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.util 14 | 15 | import assertk.assertThat 16 | import assertk.assertions.isEqualTo 17 | import javax.security.auth.x500.X500Principal 18 | import org.junit.jupiter.api.Test 19 | 20 | class CordaUtilsTest { 21 | 22 | @Test 23 | fun `X500 canonical name`() { 24 | val name = X500Principal("O=Notary, L=New York, C=US") 25 | assertThat(name.canonicalName).isEqualTo("notary-new-york-us") 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /common/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /console/src/integration-test/kotlin/org/web3j/corda/examples/IntegrationTestUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | @file:JvmName("IntegrationTestUtils") 14 | 15 | package org.web3j.corda.examples 16 | 17 | import java.io.File 18 | import org.web3j.corda.network.network 19 | import org.web3j.corda.network.nodes 20 | import org.web3j.corda.network.notary 21 | import org.web3j.corda.network.party 22 | 23 | val network = network { 24 | directory = File(javaClass.classLoader.getResource("cordapps")!!.file) 25 | nodes { 26 | notary { 27 | name = "O=Notary, L=London, C=GB" 28 | } 29 | party { 30 | name = "O=PartyA, L=London, C=GB" 31 | } 32 | party { 33 | name = "O=PartyB, L=New York, C=US" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /console/src/integration-test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /console/src/main/kotlin/org/web3j/corda/console/BaseCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.console 14 | 15 | import java.io.File 16 | import picocli.CommandLine.Option 17 | 18 | abstract class BaseCommand : Runnable { 19 | 20 | @Option( 21 | names = ["-p", "--package-name"], 22 | description = ["Package name for generated classes"], 23 | required = true 24 | ) 25 | lateinit var packageName: String 26 | 27 | @Option( 28 | names = ["-o", "--output-dir"], 29 | description = ["Output directory for generated files"], 30 | required = true 31 | ) 32 | lateinit var outputDir: File 33 | } 34 | -------------------------------------------------------------------------------- /console/src/main/resources/README.md: -------------------------------------------------------------------------------- 1 | A sample CorDapp with web3j-corda wrappers -------------------------------------------------------------------------------- /console/src/main/resources/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/main/resources/gradle-wrapper.jar -------------------------------------------------------------------------------- /console/src/main/resources/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 18 21:50:03 BST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip 7 | -------------------------------------------------------------------------------- /console/src/main/resources/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'workflows' 2 | include 'contracts' 3 | include 'clients' -------------------------------------------------------------------------------- /console/src/test/resources/cordapps/corda-confidential-identities-4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/test/resources/cordapps/corda-confidential-identities-4.1.jar -------------------------------------------------------------------------------- /console/src/test/resources/cordapps/corda-finance-contracts-4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/test/resources/cordapps/corda-finance-contracts-4.1.jar -------------------------------------------------------------------------------- /console/src/test/resources/cordapps/corda-finance-workflows-4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/test/resources/cordapps/corda-finance-workflows-4.1.jar -------------------------------------------------------------------------------- /console/src/test/resources/cordapps/obligation-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/test/resources/cordapps/obligation-0.1.jar -------------------------------------------------------------------------------- /console/src/test/resources/cordapps/yo-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/console/src/test/resources/cordapps/yo-0.1.jar -------------------------------------------------------------------------------- /core/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Web3j core libraries for the Corda blockchain platform.' 2 | 3 | dependencies { 4 | api project(':web3j-corda-api') 5 | 6 | implementation group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: versions.jersey 7 | implementation group: 'org.glassfish.jersey.core', name: 'jersey-client', version: versions.jersey 8 | implementation group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: versions.jersey 9 | implementation group: 'org.glassfish.jersey.ext', name: 'jersey-proxy-client', version: versions.jersey 10 | 11 | testImplementation project(path: ':web3j-corda-test') 12 | } 13 | -------------------------------------------------------------------------------- /core/src/integration-test/kotlin/org/web3j/corda/networkmap/NetworkMapIntegrationTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.networkmap 14 | 15 | class NetworkMapIntegrationTest { 16 | // TODO 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/kotlin/org/web3j/corda/dapps/LifeCycle.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.dapps 14 | 15 | import org.web3j.corda.api.CorDapp 16 | import org.web3j.corda.protocol.CordaService 17 | 18 | interface LifeCycle { 19 | 20 | /** 21 | * Loads a CorDapp of type [T] from a node. 22 | */ 23 | fun load(service: CordaService): T 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/kotlin/org/web3j/corda/protocol/Corda.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.protocol 14 | 15 | import org.web3j.corda.api.CordaApi 16 | 17 | /** 18 | * Entry class for the Corda API. 19 | */ 20 | class Corda private constructor( 21 | val api: CordaApi, 22 | val service: CordaService 23 | ) { 24 | companion object { 25 | 26 | /** 27 | * Build a new Corda instance with the specified service. 28 | */ 29 | @JvmStatic 30 | fun build(service: CordaService): Corda { 31 | return ClientBuilder.build( 32 | CordaApi::class.java, service, CordaException.Companion::of 33 | ).let { 34 | Corda(it, service) 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /core/src/main/kotlin/org/web3j/corda/protocol/NetworkMap.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.protocol 14 | 15 | import org.web3j.corda.networkmap.NetworkMapApi 16 | 17 | class NetworkMap private constructor( 18 | val api: NetworkMapApi, 19 | val service: CordaService 20 | ) { 21 | companion object { 22 | @JvmStatic 23 | fun build(service: CordaService): NetworkMap { 24 | return NetworkMap(ClientBuilder.build(NetworkMapApi::class.java, service), service) 25 | } 26 | 27 | @JvmStatic 28 | fun build(service: CordaService, token: String): NetworkMap { 29 | return NetworkMap(ClientBuilder.build(NetworkMapApi::class.java, service, token), service) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | corda.web3j.io 2 | -------------------------------------------------------------------------------- /docs/command_line_tools.md: -------------------------------------------------------------------------------- 1 | Command line utility 2 | ==================== 3 | 4 | The web3j-corda CLI makes it easy to: 5 | 6 | * Generate a template CorDapp project and the respective client wrappers 7 | * Generate client wrappers for existing CorDapps 8 | 9 | You can install the web3j-corda CLI by running the following command in your terminal: 10 | 11 | ```shell 12 | curl -L https://getcorda.web3j.io | bash 13 | ``` 14 | 15 | ### Create a template CorDapp project 16 | 17 | To generate a template CorDapp project with the client wrappers: 18 | 19 | ```shell 20 | web3j-corda new --name= --output-dir= --package-name= 21 | ``` 22 | ### Create CorDapp client wrappers 23 | 24 | To generate a web3j-corda client wrappers to existing CorDapps: 25 | 26 | ```shell 27 | web3j-corda generate (--url= | --cordapps-dir=) --output-dir= --package-name= 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/connecting_to_node.md: -------------------------------------------------------------------------------- 1 | Connect to a Corda Node 2 | ======================= 3 | 4 | Initialise a connection, and create our Corda client service: 5 | 6 | ```kotlin 7 | val service = CordaService("http://localhost:9000/") // URL exposed by Corda OpenAPI connector 8 | val corda = Corda.build(service) 9 | ``` 10 | 11 | To print all the nodes connected to the current node: 12 | 13 | ```kotlin 14 | val nodes = corda.api.network.nodes.findAll() 15 | ``` 16 | 17 | To query the list of all running CorDapps: 18 | 19 | ```kotlin 20 | val corDapps = corda.api.corDapps.findAll() 21 | ``` 22 | 23 | To start a flow there are two options depending on whether you want to use a generated CorDapp wrapper or just the Corda API directly: 24 | 25 | ### Using the Web3j CorDapp wrapper 26 | 27 | Please refer on how to use client wrappers in a [type-safe way](usage.md) 28 | 29 | ### Using Corda API 30 | 31 | Due to the lack of type-safety, this is not recommended as it can lead to runtime exceptions: 32 | 33 | ```kotlin 34 | // Initialise the parameters of the flow 35 | val params = InitiatorParameters("$1", "O=PartyA, L=London, C=GB", false) 36 | 37 | val issue = corda.api 38 | .corDapps.findById("obligation") 39 | .flows.findById("issue-obligation") 40 | 41 | // Type-conversions with potential runtime exception! 42 | var signedTx = issue.start(params).convert() 43 | ``` 44 | -------------------------------------------------------------------------------- /docs/css/extra.css: -------------------------------------------------------------------------------- 1 | .task-list-item { 2 | list-style-type: none; 3 | } 4 | 5 | .task-list-item input { 6 | margin: 0 4px 0.25em -20px; 7 | vertical-align: middle; 8 | } -------------------------------------------------------------------------------- /docs/dependencies.md: -------------------------------------------------------------------------------- 1 | Dependencies 2 | ============ 3 | 4 | To resolve all web3j-corda relevant dependencies, add the following to your project build file: 5 | 6 | ### Maven 7 | 8 | ```xml 9 | 10 | org.web3j.corda 11 | web3j-corda-core 12 | 0.2.8 13 | 14 | ``` 15 | 16 | ### Gradle 17 | 18 | ```groovy 19 | dependencies { 20 | implementation 'org.web3j.corda:web3j-corda-core:0.2.8' 21 | } 22 | ``` 23 | 24 | To use the Web3j Corda test module, you'all also need to include it in your project build file: 25 | 26 | ### Maven 27 | 28 | ```xml 29 | 30 | org.web3j.corda 31 | web3j-corda-test 32 | 0.2.8 33 | 34 | ``` 35 | 36 | ### Gradle 37 | 38 | ```groovy 39 | dependencies { 40 | testImplementation "org.web3j.corda:web3j-corda-test:0.2.8" 41 | } 42 | ``` -------------------------------------------------------------------------------- /docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/docs/img/favicon.ico -------------------------------------------------------------------------------- /docs/img/web3j-corda-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/docs/img/web3j-corda-logo.png -------------------------------------------------------------------------------- /docs/img/web3j-corda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/docs/img/web3j-corda.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | Web3j integration for Corda 2 | =========================== 3 | 4 | ## Introduction 5 | 6 | web3j-corda is a lightweight client library for working with CorDapps and interacting with different nodes on Corda network. 7 | 8 | ![web3j-corda Network](img/web3j-corda.png) 9 | 10 | ## Features 11 | - [x] Connect to a Corda node 12 | - [x] Query the available CorDapps in the node 13 | - [x] Generate CorDapp wrappers to interact with the deployed CorDapps 14 | - [x] Generate integration tests using a fully Dockerized Corda network to test CorDapps against 15 | - [x] Generate sample project with a CorDapp contract, workflow and client modules 16 | 17 | ## Modules 18 | 19 | To provide greater flexibility for developers wishing to work with web3j-corda, the project is made up of a number of modules. 20 | 21 | In dependency order, they are as follows: 22 | 23 | * **api**: Corda and Network Map client API interfaces. 24 | * **core**: Corda and Network Map clients implementation. 25 | * **codegen**: CorDapp client code generation libraries. 26 | * **console**: Command-line tools for creating and publishing CorDapps. 27 | * **test**: Testing tools to run CorDapps in a Corda network. 28 | * **common**: Common libraries for all modules. 29 | -------------------------------------------------------------------------------- /docs/js/index.js: -------------------------------------------------------------------------------- 1 | hljs.initHighlightingOnLoad(); 2 | -------------------------------------------------------------------------------- /docs/network.md: -------------------------------------------------------------------------------- 1 | Network queries 2 | =============== 3 | 4 | Once connected to a node, there are a number of network queries that can be run 5 | via web3j-corda. 6 | 7 | To initialise the connection to the node, refer to the section on [Connecting to a Corda Node](connecting_to_node.md). 8 | 9 | - To query all the nodes connected to the current node: 10 | 11 | ```kotlin 12 | corda.api.network.nodes.findAll() 13 | ``` 14 | 15 | - To query nodes with given X500 name: 16 | 17 | ```kotlin 18 | corda.api.network.nodes.findByX500Name("O=PartyB,L=New York,C=US")[0] 19 | ``` 20 | 21 | - To query nodes with given host and port: 22 | 23 | ```kotlin 24 | corda.api.network.nodes.findByHostAndPort("party-new-york-us:8080")[0] 25 | ``` 26 | 27 | - To query all connected notaries: 28 | 29 | ```kotlin 30 | corda.api.network.notaries.findAll() 31 | ``` -------------------------------------------------------------------------------- /docs/quickstart.md: -------------------------------------------------------------------------------- 1 | Quick start 2 | =========== 3 | 4 | web3j-corda CLI 5 | --------------- 6 | 7 | To install the latest vversion of the web3j-corda CLI on Mac OS or Linux, type the following in your terminal: 8 | 9 | ```shell 10 | curl -L https://getcorda.web3j.io | bash 11 | ``` 12 | 13 | Then to create a new project, simply run: 14 | 15 | ```shell 16 | web3j-corda new -o -n -p 17 | ``` 18 | 19 | Or, to generate client wrappers for an existing CorDapp, run: 20 | 21 | ```shell 22 | web3j-corda generate -d -o -p 23 | ``` 24 | 25 | Then to build your project run: 26 | 27 | ```shell 28 | ./gradle build 29 | ``` 30 | 31 | For more information on using the web3j-corda CLI, head to the [Examples section](examples.md). 32 | 33 | The generated Corda project demonstrate a number of core features of `web3j-corda`, including: 34 | 35 | * Generate CorDapp client wrappers for deployed CorDapps. 36 | * Interact with a CorDapp listing its nodes and starting flows. 37 | * Generate integration tests using a Dockerized Corda network to verify the CorDapp. 38 | -------------------------------------------------------------------------------- /docs/support.md: -------------------------------------------------------------------------------- 1 | Support 2 | ======= 3 | 4 | [Web3 Labs](https://www.web3labs.com) maintain web3j-corda. If you'd like to get in touch, please [email us](mailto:hi@web3labs.com?subject=web3j-corda). 5 | 6 | -------------------------------------------------------------------------------- /docs/usage.md: -------------------------------------------------------------------------------- 1 | Testing with client wrappers 2 | ============================ 3 | 4 | To test your CordApps using the generated client wrappers, you can create a test network using the 5 | Web3j Corda [network DSL](tests.md). 6 | 7 | Before that, make sure you have the required [test dependencies](dependencies.md) to your project. 8 | 9 | ```kotlin 10 | // Initialise the test network 11 | val myNetwork = network { 12 | directory = File("") 13 | nodes { 14 | notary { 15 | name = "O=Notary, L=London, C=GB" 16 | } 17 | party { 18 | name = "O=PartyA, L=London, C=GB" 19 | } 20 | party { 21 | name = "O=PartyB, L=New York, C=US" 22 | } 23 | } 24 | } 25 | ``` 26 | 27 | By using the wrappers generated by the `web3j-corda` command, one can interact with a CorDapp in a type-safe way: 28 | 29 | ```kotlin 30 | // Initialise the parameters of the flow 31 | val params = YoFlowPayload(partyB) 32 | 33 | // Start the flow with typed parameters and response 34 | val output = Yo.load(myNetwork.parties[0].corda.service).flows.yoFlow.start(params) 35 | ``` 36 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | group=org.web3j.corda 2 | version=0.3.0-SNAPSHOT 3 | kotlin.code.style=official 4 | -------------------------------------------------------------------------------- /gradle/bintray/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.jfrog.bintray' 2 | 3 | bintray { 4 | user = System.getenv('BINTRAY_USER') 5 | key = System.getenv('BINTRAY_KEY') 6 | def slug = rootProject.name 7 | if (project.hasProperty('rootProjectOverride')) { 8 | slug = project.rootProjectOverride 9 | } 10 | publications = ['maven'] 11 | publish = true 12 | override = true 13 | pkg { 14 | repo = 'maven' 15 | name = slug 16 | userOrg = 'web3j' 17 | licenses = ['Apache-2.0'] 18 | publicDownloadNumbers = true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /gradle/jacoco/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'jacoco' 2 | 3 | task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) { 4 | dependsOn = subprojects.test 5 | getSourceDirectories().from(subprojects.sourceSets.main.allSource.srcDirs) 6 | getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs) 7 | getClassDirectories().from(subprojects.sourceSets.main.output) 8 | getExecutionData().from(subprojects.jacocoTestReport.executionData) 9 | reports { xml.enabled = true } 10 | 11 | doFirst { 12 | getExecutionData().from(executionData.findAll { it.exists() }) 13 | } 14 | 15 | afterEvaluate { 16 | getClassDirectories().from(files(classDirectories.files.collect { 17 | fileTree(dir: it, 18 | exclude: [ 19 | 'org/web3j/abi/datatypes/generated/**', 20 | 'org/web3j/tuples/generated/**', 21 | 'org/web3j/ens/contracts/generated/**', 22 | 'org/gradle/**' 23 | ]) 24 | })) 25 | } 26 | } 27 | 28 | jacoco { 29 | toolVersion = "0.8.4" 30 | } 31 | 32 | -------------------------------------------------------------------------------- /gradle/java/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | sourceCompatibility = 1.8 4 | targetCompatibility = 1.8 5 | 6 | compileJava { 7 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" 8 | } 9 | 10 | compileTestJava { 11 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" 12 | } 13 | -------------------------------------------------------------------------------- /gradle/javadoc/build.gradle: -------------------------------------------------------------------------------- 1 | javadoc { options.encoding = 'UTF-8' } 2 | -------------------------------------------------------------------------------- /gradle/repositories.gradle: -------------------------------------------------------------------------------- 1 | repositories { 2 | maven { url 'https://repo.gradle.org/gradle/libs-releases' } 3 | maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' } 4 | maven { url 'http://ci-artifactory.corda.r3cev.com/artifactory/corda-dependencies' } 5 | maven { url 'https://dl.bintray.com/r3/corda/' } 6 | maven { 7 | url 'https://gitlab.com/api/v4/projects/5172644/packages/maven' 8 | mavenContent { 9 | snapshotsOnly() 10 | } 11 | } 12 | maven { 13 | url 'https://oss.sonatype.org/content/repositories/snapshots' 14 | mavenContent { 15 | snapshotsOnly() 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /gradle/repositories/build.gradle: -------------------------------------------------------------------------------- 1 | repositories { 2 | mavenCentral() 3 | jcenter() 4 | maven { url 'https://oss.sonatype.org/content/repositories/releases/' } 5 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 6 | } 7 | -------------------------------------------------------------------------------- /gradle/spotless.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright $YEAR Web3 Labs LTD. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ -------------------------------------------------------------------------------- /gradle/spotless/java.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright $YEAR Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /gradle/versions.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | loadPropsFromFile = { String path -> 3 | def props = new Properties() 4 | def propsFile = file(path) 5 | if (propsFile.exists()) { 6 | propsFile.withReader { reader -> 7 | props.load(reader) 8 | } 9 | } 10 | props 11 | } 12 | versions = loadPropsFromFile("../versions.properties") 13 | } 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 18 21:50:03 BST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: "Web3j Corda" 2 | site_description: "Documentation portal for the web3j Corda Blockchain Library" 3 | site_author: "Web3 Labs" 4 | site_url: "https://corda.web3j.io/" 5 | 6 | repo_name: "web3j/corda" 7 | repo_url: "https://github.com/web3j/corda" 8 | 9 | copyright: "Copyright © 2017-2019 Web3 Labs Ltd" 10 | 11 | nav: 12 | - Quickstart : quickstart.md 13 | - Getting started : dependencies.md 14 | - Connect to Corda node : connecting_to_node.md 15 | - Network queries : network.md 16 | - CorDapp client wrappers : client.md 17 | - Generating client wrappers : generating.md 18 | - Testing with client wrappers : usage.md 19 | - Test network reference : tests.md 20 | - Command Line Tools: command_line_tools.md 21 | - Examples: examples.md 22 | - Support: support.md 23 | 24 | # Configuration 25 | theme: 26 | name: "material" 27 | logo: "img/web3j-corda-logo.png" 28 | language: "en" 29 | feature: 30 | tabs: true 31 | palette: 32 | primary: "white" 33 | accent: "deep-orange" 34 | 35 | markdown_extensions: 36 | - pymdownx.tasklist 37 | 38 | extra_css: 39 | - "css/extra.css" 40 | - "css/github.css" 41 | 42 | extra_javascript: 43 | - 'js/highlight.pack.js' 44 | - 'js/index.js' 45 | -------------------------------------------------------------------------------- /scripts/common.bash: -------------------------------------------------------------------------------- 1 | set -eo pipefail 2 | 3 | [[ "$TRACE" ]] && set -x 4 | 5 | configure_github_user() { 6 | git config --global user.email "git@antonydenyer.co.uk" 7 | git config --global user.name "Antony Denyer" 8 | } 9 | 10 | github_clone() { 11 | git clone https://antonydenyer:${GITHUB_PERSONAL_ACCESS_TOKEN}@github.com/web3j/$1.git 12 | cd $1 13 | } 14 | 15 | ensure_version() { 16 | if [[ -z "$VERSION" ]]; then 17 | VERSION="${TRAVIS_BRANCH//release\/}" 18 | fi 19 | 20 | if [[ "$VERSION" = "" ]]; then 21 | echo "ERROR: Missing VERSION specify it using an env variable" 22 | exit 1 23 | fi 24 | } 25 | 26 | ensure_product() { 27 | if [[ -z "$PRODUCT" ]]; then 28 | PRODUCT="${TRAVIS_REPO_SLUG//web3j\/}" 29 | fi 30 | 31 | if [[ "$PRODUCT" = "" ]]; then 32 | echo "ERROR: Missing PRODUCT specify it using an env variable" 33 | exit 1 34 | fi 35 | } 36 | -------------------------------------------------------------------------------- /scripts/integration-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOCKER_HOST=unix:///var/run/docker.sock DOCKER_TLS_VERIFY= docker run -t --rm \ 4 | -v "$HOME/.gradle":/root/.gradle/ \ 5 | -v /var/run/docker.sock:/var/run/docker.sock \ 6 | -v "$(pwd)":"$(pwd)" \ 7 | -w "$(pwd)" \ 8 | openjdk:8-jdk-alpine \ 9 | ./gradlew --no-daemon --stacktrace spotlessCheck check integrationTest jacocoTestReport -Pversion="${TRAVIS_BRANCH#'release/'}" 10 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'web3j-corda' 2 | 3 | include 'common' 4 | findProject(':common')?.name = 'web3j-corda-common' 5 | 6 | include 'core' 7 | findProject(':core')?.name = 'web3j-corda-core' 8 | 9 | include 'api' 10 | findProject(':api')?.name = 'web3j-corda-api' 11 | 12 | include 'codegen' 13 | findProject(':codegen')?.name = 'web3j-corda-codegen' 14 | 15 | include 'console' 16 | findProject(':console')?.name = 'web3j-corda-console' 17 | 18 | include 'test' 19 | findProject(':test')?.name = 'web3j-corda-test' 20 | -------------------------------------------------------------------------------- /test/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Web3j test libraries for the Corda blockchain platform.' 2 | 3 | dependencies { 4 | api project(':web3j-corda-core') 5 | api "com.willowtreeapps.assertk:assertk-jvm:${versions.assertk}" 6 | api 'org.jetbrains.kotlin:kotlin-compiler-embeddable' 7 | api group: 'io.bluebank.braid', name: 'braid-corda', version: versions.braid, changing: true 8 | 9 | api(group: 'net.corda', name: 'corda-node', version: versions.corda) { 10 | exclude group: 'org.jetbrains.kotlin' 11 | exclude group: 'org.apache.logging.log4j' 12 | } 13 | 14 | implementation "org.gradle:gradle-tooling-api:${versions.gradle}" 15 | implementation "com.samskivert:jmustache:${versions.jmustache}" 16 | implementation "org.testcontainers:testcontainers:${versions.testcontainers}" 17 | implementation "org.testcontainers:junit-jupiter:${versions.testcontainers}" 18 | } 19 | -------------------------------------------------------------------------------- /test/src/main/kotlin/org/web3j/corda/network/ContainerCoordinates.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.network 14 | 15 | /** 16 | * A Docker container image specification. 17 | */ 18 | open class ContainerCoordinates( 19 | open val organisation: String, 20 | open val image: String, 21 | open val tag: String 22 | ) { 23 | override fun toString() = "$organisation/$image:$tag" 24 | } 25 | -------------------------------------------------------------------------------- /test/src/main/kotlin/org/web3j/corda/network/ContainerLifecycle.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.network 14 | 15 | interface ContainerLifecycle { 16 | /** 17 | * Start this container. 18 | */ 19 | fun start() 20 | 21 | /** 22 | * Stop this container. 23 | */ 24 | fun stop() 25 | } 26 | -------------------------------------------------------------------------------- /test/src/main/kotlin/org/web3j/corda/network/CordaRpcUsers.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.network 14 | 15 | @CordaDslMarker 16 | class CordaRpcUsers internal constructor() { 17 | /** 18 | * Corda RPC user name. 19 | */ 20 | var user: String = "user1" 21 | 22 | /** 23 | * Corda RPC user password. 24 | */ 25 | var password: String = "test" 26 | 27 | /** 28 | * Corda RPC user permissions. 29 | */ 30 | var permissions: Array = arrayOf("ALL") 31 | } 32 | -------------------------------------------------------------------------------- /test/src/main/kotlin/org/web3j/corda/testcontainers/KGenericContainer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Web3 Labs Ltd. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 5 | * the License. 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 distributed under the License is distributed on 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 11 | * specific language governing permissions and limitations under the License. 12 | */ 13 | package org.web3j.corda.testcontainers 14 | 15 | import org.testcontainers.containers.GenericContainer 16 | 17 | class KGenericContainer(imageName: String) : GenericContainer(imageName) { 18 | 19 | val ports: Map by lazy { 20 | exposedPorts.map { it to getMappedPort(it) }.toMap() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/src/main/resources/node_conf.mustache: -------------------------------------------------------------------------------- 1 | devMode=true 2 | myLegalName="{{&name}}" 3 | {{#isNotary}} 4 | notary { 5 | validating={{isValidating}} 6 | } 7 | {{/isNotary}} 8 | p2pAddress="{{&p2pAddress}}" 9 | rpcSettings { 10 | address="0.0.0.0:{{rpcPort}}" 11 | adminAddress="0.0.0.0:{{adminPort}}" 12 | } 13 | security { 14 | authService { 15 | dataSource { 16 | type=INMEMORY 17 | users=[{ 18 | user={{user}} 19 | password={{password}} 20 | permissions=[{{permissions}}] 21 | }] 22 | } 23 | } 24 | } 25 | compatibilityZoneURL="{{compatibilityZoneURL}}" 26 | devModeOptions.allowCompatibilityZone=true 27 | -------------------------------------------------------------------------------- /versions.properties: -------------------------------------------------------------------------------- 1 | activationApi=1.2.0 2 | annotationApi=1.3.2 3 | annotations=17.0.0 4 | asm=7.1 5 | assertk=0.14 6 | braid=4.1.2-RC13 7 | byteBuddy=1.9.10 8 | classgraph=4.8.53 9 | commonsIo=2.6 10 | commonsCodec=1.13 11 | corda=4.3 12 | eddsa=0.3.0 13 | errorProneAnnotations=2.2.0 14 | gradle=5.6.4 15 | guava=28.1-jre 16 | jackson=2.9.7 17 | jacoco=0.8.4 18 | javaparser=3.14.1 19 | jaxbApi=2.3.1 20 | jaxRs=2.1.5 21 | jaxrs=2.1.5 22 | jersey=2.29 23 | jmustache=1.14 24 | junit4=4.12 25 | junit5=5.5.2 26 | kLogging=1.6.10 27 | kotlin=1.3.61 28 | ktlint=0.34.2 29 | logback=1.2.3 30 | mockk=1.9.3 31 | openApiGenerator=4.0.3 32 | openApiParser=2.0.3 33 | picocli=4.0.3 34 | slf4j=1.7.28 35 | swagger=1.5.23 36 | swagger3=2.0.9 37 | testcontainers=1.12.3 38 | validationApi=2.0.1.Final 39 | wiremock=2.24.1 40 | -------------------------------------------------------------------------------- /web3j.asc.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/web3j/web3j-corda/f491b7a21bb8c89d96bf38320c4068ce6351b69d/web3j.asc.enc --------------------------------------------------------------------------------