This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Host { | |
public static void main(String[] args) throws EnclaveLoadException, IOException { | |
// Check whether the platform supports hardware enclaves. | |
try { | |
EnclaveHost.checkPlatformSupportsEnclaves(true); | |
System.out.println("This platform supports enclaves in simulation, debug and release mode."); | |
} catch (Exception e) { | |
System.out.println("Platform Support Check Failed" + e.getMessage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class TransferLandTitleFlow implements Flow<SignedTransactionDigest> { | |
// Constructor | |
@CordaInject | |
private PersistenceService persistenceService; | |
// Inject other services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class IssueLandTitleFlow implements Flow<SignedTransactionDigest>{ | |
@JsonConstructor | |
public IssueLandTitleFlow(RpcStartFlowRequestParameters params) { | |
this.params = params; | |
} | |
@CordaInject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class IssueLandTitleFlow implements Flow<SignedTransactionDigest>{ | |
// Inject Services Here | |
@Override | |
@Suspendable | |
public SignedTransactionDigest call() { | |
// Flow code logic here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatedBy(IssueLandTitleFlow.class) | |
public class IssueLandTitleFlowResponder implements Flow<SignedTransaction> { | |
@CordaInject | |
private FlowEngine flowEngine; | |
private FlowSession counterpartySession; | |
public IssueLandTitleFlowResponder(FlowSession counterpartySession) { | |
this.counterpartySession = counterpartySession; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class IssueLandTitleFlow implements Flow<Void>{ | |
// FlowIdentity, IdentityService and NotaryLookupService Injected Here | |
@CordaInject | |
private TransactionBuilderFactory transactionBuilderFactory; | |
@CordaInject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class IssueLandTitleFlow implements Flow<Void>{ | |
@CordaInject | |
private NotaryLookupService notaryLookupService; | |
@CordaInject | |
private FlowIdentity flowIdentity; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
@StartableByRPC | |
public class IssueLandTitleFlow implements Flow<Void>{ | |
@Override | |
@Suspendable | |
public Void call() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LandTitleContract implements Contract { | |
// This is used to identify our contract when building a transaction. | |
public static final String ID = "net.corda.c5.sample.landregistry.LandContract"; | |
// A transaction is valid if the verify() function of the contract of all the transaction's input and output states | |
// does not throw an exception. | |
@Override | |
public void verify(@NotNull LedgerTransaction tx) { | |
// Implement your contract validation logic here. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BelongsToContract(LandTitleContract.class) | |
public class LandTitleState implements ContractState, JsonRepresentable { | |
/* This is the unique identifier of the property */ | |
private String plotNumber; | |
private String dimensions; | |
private String area; | |
private Party owner; | |
private Party issuer; |
NewerOlder