### Helm Install Command Example Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/getting-started.html This is a placeholder for the Helm install command used to deploy the Bank in a Box application. The actual command would include specific release names and values. ```bash helm install ``` -------------------------------- ### Setup Corda Directory via PowerShell Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/node/deploy/deploying-a-node.html Initializes the Corda installation directory and copies the required JAR file. ```PowerShell mkdir C:\Corda copy PATH_TO_CORDA_JAR/corda-4.11.jar C:\Corda\corda.jar ``` -------------------------------- ### Start Get Transactions Flow Example in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/payments/payments-agent.html An example of how to initiate the GetTransactions flow. It demonstrates the usage of the startFlow function with the GetTransactions constructor and necessary parameters. ```kotlin startFlow(::GetTransactions, accountId, criteria) ``` -------------------------------- ### Solana Notary Configuration Example Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/node/setup/corda-configuration-fields.html An example configuration for a Solana notary, outlining essential parameters like RPC and WebSocket URLs, and the path to the notary's keypair file. This setup is required when using Solana for notarization. ```hocon solana { rpcUrl="https://api.mainnet-beta.solana.com" websocketUrl="wss://api.mainnet-beta.solana.com" notaryKeypairFile="path/to/notary/keypair.json" } ``` -------------------------------- ### Example: Create New Customer Account Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Demonstrates how to create a new customer account by importing supporting documentation and then initiating the CreateCustomerFlow. ```kotlin val supportingDocumentationPath = File("/path/to/supportDocumentation.zip") val attachment = serviceHub.attachments.importAttachment( supportingDocumentationPath.inputStream(), ourIdentity.toString(), supportingDocumentationPath.name) val attachments = listOf(Pair(attachment, "Supporting documentation")) val customerId = subFlow( CreateCustomerFlow( customerName = "AN Other", contactNumber = "5551234", emailAddress = "another@r3.com", postCode = "ZIP 1234", attachments = attachments)) ``` -------------------------------- ### Start Update Customer Details Flow Example in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/payments/payments-agent.html An example demonstrating how to start the UpdateCustomerDetails flow. It shows the correct invocation of the startFlow function with the UpdateCustomerDetails constructor and its parameters. ```kotlin startFlow( ::UpdateCustomerDetails, customerId, details, deleted ) ``` -------------------------------- ### Start Get PSP Customers Flow in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/payments-agent.html Example of starting the `GetPSPCustomers` flow. It requires the flow class and a `CustomerDetailsCriteria` object for searching. ```kotlin startFlow(::GetPSPCustomers, criteria) ``` -------------------------------- ### Start Example Flow on Corda Node Source: https://docs.r3.com/en/platform/corda/4.14/community/network-builder.html Initiates an example flow on a Corda node, passing specific parameters such as an IOU value and the counterparty's identity. This demonstrates how to programmatically interact with node functionalities. ```shell flow start net.corda.samples.example.flows.ExampleFlow$Initiator iouValue: 20, otherParty: "PartyB" ``` -------------------------------- ### Example: Set Account to Active Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Demonstrates how to set an account's status to ACTIVE using the SetAccountStatusFlow. ```kotlin subFlow(SetAccountStatusFlow(accountId, AccountStatus.ACTIVE)) ``` -------------------------------- ### Start Network Map Service Source: https://docs.r3.com/en/platform/corda/1.7/cenm/quick-start.html Starts the Network Map Service using its configuration file. This makes the network management web services and shell server available. ```bash java -jar networkmap.jar --config-file network-map.conf ``` -------------------------------- ### Example: Create New Current Account Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Shows how to create a new current account for a customer using the CreateCurrentAccountFlow, specifying currency and daily limits. ```kotlin val signedTx = subFlow( CreateCurrentAccount( customerId = customerId, tokenType = Currency.getInstance("EUR"), withdrawalDailyLimit = 500, transferDailyLimit = 1000)) val accountId = signedTx.tx.outputsOfType().single().accountId ``` -------------------------------- ### Helm Version Information Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/getting-started.html This example shows the output of a Helm version command, indicating the version and build information. It's used to verify compatibility requirements. ```go version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"dirty", GoVersion:"go1.15.2"} ``` -------------------------------- ### Initialize CloudHSM Management Utility Source: https://docs.r3.com/en/platform/corda/1.7/cenm/aws-deployment-hsm-aws-console.html Starts the CloudHSM management utility to verify connectivity to the HSM server. This command requires the configuration file path generated during setup. ```bash /opt/cloudhsm/bin/cloudhsm_mgmt_util /opt/cloudhsm/etc/cloudhsm_mgmt_util.cfg ``` -------------------------------- ### Build and Run Client RPC Tutorial Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/get-started/tutorials/supplementary-tutorials/tutorial-clientrpc-api.html Commands to build the example distribution and run the client RPC tutorial with the 'Print' argument. This is used to initiate transaction generation. ```bash # Build the example ./gradlew docs/source/example-code:installDist # Start it ./docs/source/example-code/build/install/docs/source/example-code/bin/client-rpc-tutorial Print ``` -------------------------------- ### Start Get Currencies on Agent Flow in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/payments-agent.html Example of starting the `GetCurrenciesOnAgent` flow. This is achieved by calling `startFlow` with the flow class. ```kotlin startFlow(::GetCurrenciesOnAgent) ``` -------------------------------- ### Create Customer Account with Attachments Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Demonstrates how to import supporting documentation as an attachment and initiate a customer creation flow. ```kotlin val supportingDocumentationPath = File("/path/to/supportDocumentation.zip") val attachment = serviceHub.attachments.importAttachment( supportingDocumentationPath.inputStream(), ourIdentity.toString(), supportingDocumentationPath.name) val attachments = listOf(Pair(attachment, "Supporting documentation")) val customerId = subFlow( CreateCustomerFlow( customerName = "AN Other", contactNumber = "5551234", emailAddress = "another@r3.com", postCode = "ZIP 1234", attachments = attachments)) ``` -------------------------------- ### Start Get Payment Account Flow in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/payments-agent.html Example of how to start the `GetPaymentAccount` flow. This involves calling `startFlow` with the flow class and the `paymentAccountId`. ```kotlin startFlow(::GetPaymentAccount, paymentAccountId) ``` -------------------------------- ### Start Get Account Balance Flow in Kotlin Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/payments-agent.html Example of how to start the `GetAccountBalance` flow. It requires the flow class and the `accountId` for which the balance is to be retrieved. ```kotlin startFlow( ::GetAccountBalance, accountId ) ``` -------------------------------- ### Run Sample Client Web Server and GUI Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/send-payments.html These commands start the sample client's web server and graphical user interface. The web server exposes client-side functionalities, and the GUI allows users to interact with these functionalities. Access details for the client GUI are also provided. ```bash ./gradlew runSampleClientWebserver ``` ```bash ./gradlew runSampleClientGUI ``` -------------------------------- ### Initialize Database Schema with 'run-migration-scripts' (Java) Source: https://docs.r3.com/en/platform/corda/4.14/community/deploying-a-node.html Starts the Corda node with the 'run-migration-scripts' command, specifying both core and application schemas for initialization. This is used for database schema setup. ```java java -jar corda.jar run-migration-scripts --core-schemas --app-schemas ``` -------------------------------- ### Initialize Module with setupModule Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.client.jackson.internal/-corda-module/index.html The setupModule function is used to initialize a module within the application context. It accepts a context object as a parameter to configure the module's environment. ```kotlin fun setupModule(context: Context) { // Module initialization logic here } ``` -------------------------------- ### POST /login Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Logs the user into a CENM session by setting the active context and authenticating with credentials. ```APIDOC ## POST /login ### Description Logs into a CENM session using the CLI. Setting the context ensures the session remains active for the specified server. ### Method POST ### Endpoint `./cenm.sh context login ` ### Parameters #### Path Parameters - **server** (string) - Required - URL for the targeted CENM API Gateway. #### Query Parameters - **-a, --alias** (string) - Optional - Sets an alias for this session. - **-p, --password** (string) - Optional - Password for authentication. If omitted, the CLI prompts for input. - **-s, --set-active-context** (boolean) - Optional - Sets the active context to the configured URL. - **-u, --username** (string) - Required - Username for authentication. ### Request Example `./cenm.sh context login http://localhost:8081 -u jenny-editor -p password` ### Response #### Success Response (200) - **status** (string) - Session successfully established and context set. ``` -------------------------------- ### POST /api/webserver/start Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/index-files/index-19.html Starts a web server instance for a specific Corda node. ```APIDOC ## POST /api/webserver/start ### Description Starts a web server for a given node handle, allowing for HTTP-based interaction with the node. ### Method POST ### Endpoint /api/webserver/start ### Parameters #### Request Body - **nodeHandle** (NodeHandle) - Required - The handle of the node to attach the web server to. - **maxHeapSize** (String) - Optional - Maximum heap size for the web server process. ### Request Example { "nodeHandle": "node-001", "maxHeapSize": "512m" } ### Response #### Success Response (200) - **webServerAddress** (String) - The address where the web server is listening. #### Response Example { "status": "running", "address": "localhost:8080" } ``` -------------------------------- ### Get Identity Manager Configuration Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Retrieves the current configuration of the Identity Manager. You can specify the output type and request a zone token instead of the full configuration. ```APIDOC ## GET /identity-manager/config/get ### Description Retrieves the current configuration of the Identity Manager. You can specify the output type and request a zone token instead of the full configuration. ### Method GET ### Endpoint `/identity-manager/config/get` ### Parameters #### Query Parameters - **--zone-token** (boolean) - Optional - Indicates that the zone token should be printed instead of the config, when using the ‘pretty’ output type. - **-c, --use-context** (string) - Optional - Sets the context of the command that overrides the current context set. - **-o, --output-type** (string) - Optional - Specifies output format. Valid values are: json, pretty. Default value is `pretty` ### Request Example ```bash cenm identity-manager config get --zone-token -c=mycontext -o=json ``` ### Response #### Success Response (200) - **configuration** (object) - The current Identity Manager configuration object. - **zoneToken** (string) - The zone token if requested. #### Response Example ```json { "configuration": { "someSetting": "someValue" } } ``` ``` -------------------------------- ### Deploy PostgreSQL using Helm Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/getting-started.html Commands to add the Bitnami Helm repository and install a PostgreSQL instance within a Kubernetes cluster. ```bash $ helm repo add bitnami https://charts.bitnami.com/bitnami helm install bank-in-a-box-database bitnami/postgresql ``` -------------------------------- ### Get Pending Identity Manager CRLs Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Retrieves the list of pending certificate revocation requests (CRLs) for the Identity Manager Service. You can specify the context and output format. ```APIDOC ## GET /identity-manager/crl/pending ### Description Retrieves the list of pending certificate revocation requests (CRLs) for the Identity Manager Service. You can specify the context and output format. ### Method GET ### Endpoint `/identity-manager/crl/pending` ### Parameters #### Query Parameters - **-c, --use-context** (string) - Optional - Sets the context of the command - overrides the current context set. - **-o, --output-type** (string) - Optional - Specifies output format. Valid values are: json, pretty. Default value is `pretty`. ### Request Example ```bash cenm identity-manager crl pending -c=mycontext -o=json ``` ### Response #### Success Response (200) - **crls** (array) - A list of pending certificate revocation requests. #### Response Example ```json { "crls": [ { "id": "crl-def", "status": "pending" } ] } ``` ``` -------------------------------- ### Accept New Network Parameters Example (Shell) Source: https://docs.r3.com/en/platform/corda/1.7/cenm/network-map-overview.html Demonstrates how to accept new network parameters using the Corda shell command. It requires the `parametersHash` obtained from the network parameters update information. ```shell run acceptNewNetworkParameters parametersHash: "ba19fc1b9e9c1c7cbea712efda5f78b53ae4e5d123c89d02c9da44ec50e9c17d" ``` -------------------------------- ### Get Approved Identity Manager CRLs Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Retrieves the list of approved certificate revocation requests (CRLs) for the Identity Manager Service. You can specify the context and output format. ```APIDOC ## GET /identity-manager/crl/approved ### Description Retrieves the list of approved certificate revocation requests (CRLs) for the Identity Manager Service. You can specify the context and output format. ### Method GET ### Endpoint `/identity-manager/crl/approved` ### Parameters #### Query Parameters - **-c, --use-context** (string) - Optional - Sets the context of the command - overrides the current context set. - **-o, --output-type** (string) - Optional - Specifies output format. Valid values are: json, pretty. Default value is `pretty`. ### Request Example ```bash cenm identity-manager crl approved -c=mycontext -o=json ``` ### Response #### Success Response (200) - **crls** (array) - A list of approved certificate revocation requests. #### Response Example ```json { "crls": [ { "id": "crl-abc", "status": "approved" } ] } ``` ``` -------------------------------- ### Mock Network Setup Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.core.messaging/-flow-handle-with-client-id/index.html This snippet demonstrates how to create and configure a mock network for testing Corda applications. It allows for defining notary configurations and network parameters. ```kotlin import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetworkParameters import net.corda.testing.node.NotarySpec val mockNetwork = MockNetwork(MockNetworkParameters(notarySpecs = listOf(NotarySpec()))) ``` -------------------------------- ### Get Pending Identity Manager CSRs Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Retrieves the list of pending certificate signing requests (CSRs) for the Identity Manager Service. You can specify the context and output format. ```APIDOC ## GET /identity-manager/csr/pending ### Description Retrieves the list of pending certificate signing requests (CSRs) for the Identity Manager Service. You can specify the context and output format. ### Method GET ### Endpoint `/identity-manager/csr/pending` ### Parameters #### Query Parameters - **-c, --use-context** (string) - Optional - Sets the context of the command - overrides the current context set. - **-o, --output-type** (string) - Optional - Specifies output format. Valid values are: json, pretty. Default value is `pretty`. ### Request Example ```bash cenm identity-manager csr pending -c=mycontext -o=json ``` ### Response #### Success Response (200) - **csrs** (array) - A list of pending certificate signing requests. #### Response Example ```json { "csrs": [ { "id": "csr-456", "status": "pending" } ] } ``` ``` -------------------------------- ### Get Approved Identity Manager CSRs Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Retrieves the list of approved certificate signing requests (CSRs) for the Identity Manager Service. You can specify the context and output format. ```APIDOC ## GET /identity-manager/csr/approved ### Description Retrieves the list of approved certificate signing requests (CSRs) for the Identity Manager Service. You can specify the context and output format. ### Method GET ### Endpoint `/identity-manager/csr/approved` ### Parameters #### Query Parameters - **-c, --use-context** (string) - Optional - Sets the context of the command - overrides the current context set. - **-o, --output-type** (string) - Optional - Specifies output format. Valid values are: json, pretty. Default value is `pretty`. ### Request Example ```bash cenm identity-manager csr approved -c=mycontext -o=json ``` ### Response #### Success Response (200) - **csrs** (array) - A list of approved certificate signing requests. #### Response Example ```json { "csrs": [ { "id": "csr-123", "status": "approved" } ] } ``` ``` -------------------------------- ### Start Nodes with Driver (Kotlin) Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/index-files/index-4.html The `driver` function allows for the programmatic startup of Corda nodes, facilitating testing and development environments. It accepts `DriverParameters` for configuration and a lambda function to define the node setup. ```kotlin net.corda.testing.driver.DriverKt.driver(net.corda.testing.driver.DriverParameters,kotlin.jvm.functions.Function1) ``` -------------------------------- ### Get Recurring Payments for Customer (cURL) Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/api-guide.html Example of how to retrieve recurring payments for a customer using cURL. This request requires an Authorization header and specifies pagination and sorting parameters. ```bash curl --location --request GET 'http://localhost:7777/recurring-payments/customer/50480ad7-b70a-4579-931e-0d8730e366e9?startPage=1&pageSize=10&sortField=amount&sortOrder=ASC&searchTerm=&dateFrom=2020-12-07T08:12:54.289Z&dateTo=2021-12-07T11:12:54.289Z' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsiVVNFUl9DTElFTlRfUkVTT1VSQ0UiLCJVU0VSX0FETUlOX1JFU09VUkNFIl0sInVzZXJfbmFtZSI6ImFkbWluIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl0sImN1c3RvbWVySWQiOm51bGwsImV4cCI6MTYwNzM1OTA0OSwiYXV0aG9yaXRpZXMiOlsiQURNSU4iXSwianRpIjoiNTFhODY0ODQtMWE2MC00ZGIzLWIwMGMtZDA1ZjNmNWY4ZDZkIiwiY2xpZW50X2lkIjoiYmFua19pbl9hX2JveF9hcHAifQ.NtnTN2ojjlRMwCK66B0TnOSXKmy2C98T-C-NJQLL842d86Qt2P4QZl5qgYaZV1U69V-pqY29k9q_ovwWHHWmhm4UP30BAQ_TLg-FOJv4jRpxEaiOTfU7WAJ4gut_BxkoRAyRXVcpuufUndyaTKeLq_AgCBcxfWQsE2xZQlGYONzmSQlecKK0NqD0I3PC9C8EsEpiXCHyIWcQv_yPwJOVy9ha-AoaBiguU_GzYDT9PpuTGZuHFc3xa82xtbNwvRjYzTA8Q3XDtu_l7wpMzlpvpfqB9KYhRxjlbqONgi94fnvt8TN5fI8PhD_bBlvDhsWSsFaTfjjoI6WviAgiD71Ztg' ``` -------------------------------- ### startInVmRpcClient Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/internal/RPCDriverKt.html Starts an RPC client within a virtual machine. ```APIDOC ## POST /startInVmRpcClient ### Description Starts an RPC client within a virtual machine. ### Method POST ### Endpoint /startInVmRpcClient ### Parameters #### Query Parameters - **username** (String) - Required - The username for authentication. - **password** (String) - Required - The password for authentication. #### Request Body - **configuration** (CordaRPCClientConfiguration) - Required - The client configuration. ``` -------------------------------- ### Start Notary Node Source: https://docs.r3.com/en/platform/corda/1.7/cenm/quick-start.html Starts the Corda notary node. Once the Network Map service is running and configured, the notary node can be started to participate in the network. ```bash java -jar corda.jar ``` -------------------------------- ### MockKeyManagementService start Method (Java) Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/internal/MockKeyManagementService.html Starts the key management service, initializing it with a collection of keys and their associated aliases. Note: This method signature indicates potential error handling or an unresolvable type. ```java Unit start(Iterable<> initialKeysAndAliases) ``` -------------------------------- ### Setting up Solana Accounts in Tests (Java) Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/notary/solana-notary.html Shows how to use SolanaTestValidator's account and token management helpers for common test setup tasks in Java. It airdrops SOL for fees and creates token mints and accounts. ```java @BeforeEach public void setupSolana(SolanaTestValidator validator) { FileSigner buyerWallet = FileSigner.random(custodiedKeysDir); validator.accounts().airdropSol(buyerWallet.publicKey(), 10); PublicKey stablecoinMint = validator.tokens().createToken(mintAuthority, 6); PublicKey buyerTokenAccount = validator.tokens().createAssociatedTokenAccount( mintAuthority, stablecoinMint, buyerWallet.publicKey() ); validator.tokens().mintTo(buyerTokenAccount, stablecoinMint, mintAuthority, 1_000_000); } ``` -------------------------------- ### Get Start Nodes In Process Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/internal/DriverDSLImpl.html Determines if nodes should be started within the same JVM process as the driver. Starting nodes in-process can improve performance for testing but may affect isolation. ```java final Boolean getStartNodesInProcess() ``` -------------------------------- ### Create Recurring Payment Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Sets up a recurring payment schedule with a defined amount, start time, period, and iteration count. ```kotlin val amount = Amount(10000, Currency.getInstance("EUR")) // 100 euro subFlow(CreateRecurringPaymentFlow(accountFrom, accountTo, amount, Instant.now(), Duration.ofSeconds(10), 5)) ``` -------------------------------- ### Node Configuration Example (node.conf) Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/node/deploy/hot-cold-deployment.html This is a comprehensive example of a node.conf file for R3 nodes, including network settings, security credentials, and the mutual exclusion configuration. It specifies P2P and RPC addresses, legal identity, keystore/truststore passwords, RPC user credentials, and database connection properties. The mutual exclusion section is crucial for high availability. ```java p2pAddress : "${LOAD_BALANCER_ADDRESS}:${P2P_PORT}" rpcSettings { address : "${NODE_MACHINE_ADDRESS}:${RPC_PORT}" adminAddress : "${NODE_MACHINE_ADDRESS}:${RPC_ADMIN_PORT}" } myLegalName : "O=Corda HA, L=London, C=GB" keyStorePassword : "password" trustStorePassword : "password" rpcUsers=[ { user=corda password=corda_is_awesome permissions=[ ALL ] } ] dataSourceProperties = { dataSourceClassName = "com.microsoft.sqlserver.jdbc.SQLServerDataSource" dataSource.url = "${DB_JDBC_URL}" dataSource.user = ${DB_USER} dataSource.password = "${DB_PASSWORD}" } enterpriseConfiguration = { mutualExclusionConfiguration = { on = true updateInterval = 20000 waitInterval = 40000 } } ``` -------------------------------- ### Configure Network Map Service Source: https://docs.r3.com/en/platform/corda/1.7/cenm/quick-start.html Provides a sample configuration file for the Network Map Service. It specifies network address, database connection details (H2 in this example), SSH port for shell access, and local signing configurations for network map and parameter updates. ```hocon address = "localhost:20000" database { driverClassName = org.h2.Driver url = "jdbc:h2:file:./network-map-persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT=0" user = "example-db-user" password = "example-db-password" } shell { sshdPort = 20002 user = "testuser" password = "password" } localSigner { keyStore { file = corda-network-map-keys.jks password = "password" } keyAlias = "cordanetworkmap" signInterval = 10000 } pollingInterval = 10000 checkRevocation = false ``` -------------------------------- ### Start Corda Flows via Shell Source: https://docs.r3.com/en/platform/corda/4.14/community/shell.html Demonstrates the syntax for initiating a flow from the Corda shell using the 'flow start' command. It includes passing constructor arguments as key-value pairs and handling cases where parameters are missing. ```bash flow start CashIssueFlow amount: $1000, issuerBankPartyRef: 1234, notary: "O=Controller, L=London, C=GB" $>>>flow start CashIssueFlow No matching constructor found: - [amount: Amount, issuerBankPartyRef: OpaqueBytes, notary: Party]: missing parameter amount ``` -------------------------------- ### Example: Approve Overdraft Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Illustrates how to approve an overdraft for an account with a specified amount, noting that amounts are in the base unit of the currency. ```kotlin val amount = Amount(10000, Currency.getInstance("EUR")) // 100 euro subFlow(ApproveOverdraftFlow(accountId, amount)) ``` -------------------------------- ### GET /finishedFlowsWithClientIds Source: https://docs.r3.com/en/platform/corda/4.14/community/flow-start-with-client-id.html Retrieves a mapping of client IDs to flow completion statuses for all flows started with a client ID that have finished. ```APIDOC ## GET /finishedFlowsWithClientIds ### Description Returns a map of client IDs to their respective flow completion status (true for COMPLETED, false for FAILED) for all flows started with a client ID that have finished at the time of the request. ### Method GET ### Endpoint cordaRpcOps.finishedFlowsWithClientIds() ### Response #### Success Response (200) - **Map** - A mapping where the key is the clientId and the value indicates if the flow completed successfully. #### Response Example { "client-id-123": true, "client-id-456": false } ``` -------------------------------- ### Grant All Flow Start Permissions Source: https://docs.r3.com/en/platform/corda/4.14/community/clientrpc.html Example configuration for granting all flow start permissions to an RPC user. This includes 'InvokeRpc.startFlow' and 'InvokeRpc.startTrackedFlowDynamic'. ```hocon rpcUsers=[ { username=exampleUser password=examplePass permissions=[ "InvokeRpc.nodeInfo", "InvokeRpc.registeredFlows", "InvokeRpc.partiesFromName", "InvokeRpc.wellKnownPartyFromX500Name", "InvokeRpc.startFlow", "InvokeRpc.startTrackedFlowDynamic" ] }, ... ] ``` -------------------------------- ### Mock Network and Node Setup Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.core.internal/unchecked-cast.html Utilities for creating and configuring mock Corda networks and nodes for testing purposes. Includes options for cluster specifications, messaging services, and notary configurations. ```kotlin net.corda.testing.node.ClusterSpec Raft createMockCordaService() DatabaseSnapshot InMemoryMessagingNetwork Companion DistributedServiceHandle LatencyCalculator MessageTransfer Companion MockMessagingService Companion PeerHandle ServicePeerAllocationStrategy Random RoundRobin ledger() makeTestIdentityService() MockNetFlowTimeOut MockNetNotaryConfig MockNetwork MockNetworkNotarySpec MockNetworkParameters MockNodeConfigOverrides MockNodeParameters MockServices Companion NotarySpec StartedMockNode Companion testActor() TestClock testContext() TestCordapp Companion transaction() UnstartedMockNode Companion User ``` -------------------------------- ### Run Sample Agent Web Server and GUI Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/apps/payments/send-payments.html These commands launch the sample agent's web server and graphical user interface. The web server typically serves API endpoints, while the GUI provides a user-friendly interface for interacting with the system. Credentials are provided for accessing the GUI. ```bash ./gradlew runSampleAgentWebserver ``` ```bash ./gradlew runSampleAgentGUI ``` -------------------------------- ### GET /diagnostics Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/index-files/index-7.html Retrieves diagnostic information about the node, including versioning and installed CorDapps. ```APIDOC ## GET /diagnostics ### Description Provides diagnostic level information about the node, including the current version of the node and the CorDapps currently installed on the node. ### Method GET ### Endpoint /diagnostics ### Response #### Success Response (200) - **version** (string) - The current version of the node. - **cordapps** (array) - A list of currently installed CorDapps. #### Response Example { "version": "4.x", "cordapps": ["finance-cordapp", "tokens-cordapp"] } ``` -------------------------------- ### GET /GetRecurringPaymentsByIdFlow Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Retrieves the RecurringPaymentState for a given LinearId. ```APIDOC ## GET /GetRecurringPaymentsByIdFlow ### Description Retrieves the `RecurringPaymentState` for a given `LinearId`. ### Method GET ### Endpoint /GetRecurringPaymentsByIdFlow ### Parameters #### Query Parameters - **linearId** (UUID) - Required - The unique identifier for the recurring payment. ### Response #### Success Response (200) - **accountFrom** (string) - Source account identifier - **accountTo** (string) - Destination account identifier - **amount** (number) - Payment amount - **dateStart** (string) - Start date of the payment - **period** (string) - Frequency of payment - **iterationNum** (integer) - Current iteration count ``` -------------------------------- ### startRandomRpcClient Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/internal/RPCDriverKt.html Starts an RPC client connected to a random host and port. ```APIDOC ## POST /startRandomRpcClient ### Description Starts an RPC client connected to a random host and port. ### Method POST ### Endpoint /startRandomRpcClient ### Parameters #### Query Parameters - **hostAndPort** (NetworkHostAndPort) - Required - The host and port to connect to. - **username** (String) - Required - The username for authentication. - **password** (String) - Required - The password for authentication. ### Response #### Success Response (200) - **Process** (CordaFuture) - A future representing the started process. ``` -------------------------------- ### Define Time Window from Start and Duration (Kotlin, Java) Source: https://docs.r3.com/en/platform/corda/4.14/community/api-transactions.html Defines a time window using a start Instant and a duration, for example, 30 seconds. ```kotlin val ourTimeWindow3: TimeWindow = TimeWindow.fromStartAndDuration(serviceHub.clock.instant(), 30.seconds) ``` ```java TimeWindow ourTimeWindow3 = TimeWindow.fromStartAndDuration(getServiceHub().getClock().instant(), Duration.ofSeconds(30)); ``` -------------------------------- ### Database Initialization Error Log Examples Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/node-database-migration-logging.html A collection of log entry examples demonstrating how different error codes (2-9) are formatted when a DatabaseInitialisation failure occurs. These logs include metadata such as IDs, status, and descriptive error messages to assist in debugging. ```text DatabaseInitialisation(id="bMmdUxxZ";status="error";error_code="2";message="Could not find the database driver class. Please add it to the 'drivers' folder.") DatabaseInitialisation(id="jcaavDAO";status="error";error_code="3";message="Could not create the DataSource: Property invalid_property does not exist on target class org.postgresql.ds.PGSimpleDataSource") DatabaseInitialisation(id="r52KsERT";status="error";error_code="4";message="Could not connect to the database. Please check your JDBC connection URL, or the connectivity to the database.") DatabaseInitialisation(id="nCTRAxNg";status="error";error_code="5";message="Missing migration script migration/my-schema.changelog-master.[xml/sql/yml/json] required by mapped schema com.mycompany.mycordapp.MySchema v1.") DatabaseInitialisation(id="EojbAXaT";status="error";error_code="6";message="Error parsing master.changelog.json") DatabaseInitialisation(id="Klvw19Cp";status="error";error_code="7";message="Could not create the DataSource: Migration failed... Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near \"choose\"") DatabaseInitialisation(id="Xlrw5seg";status="error";error_code="8";message="Migration failed... Reason: liquibase.exception.DatabaseException: ERROR: type \"biginteger\" does not exist") DatabaseInitialisation(id="9HBhcBgl";status="error";error_code="9";message="Migration failed... Reason: liquibase.exception.DatabaseException: ERROR: relation \"messages\" already exists") ``` -------------------------------- ### Install CENM CLI using Docker Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html This snippet shows the Docker command to pull the CENM CLI Docker image. Ensure Docker is installed on your system before running this command. The image version specified is '1.5.4-zulu-openjdk8u242'. ```bash docker pull corda/enterprise-cenm-cli:1.5.4-zulu-openjdk8u242 ``` -------------------------------- ### Start a Mock Corda Network Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.core.internal.concurrent/done-future.html Initializes and starts a mock network for testing Corda flows and components. It allows configuration of network parameters, notary specifications, and node setups. ```kotlin import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetworkParameters import net.corda.testing.node.NotarySpec // Define network parameters val networkParameters = MockNetworkParameters(notarySpecs = listOf(NotarySpec("O=Test Notary, L=London, C=GB"))) // Create and start the mock network val mockNetwork = MockNetwork(networkParameters) // Nodes can now be created and interacted with on this network ``` -------------------------------- ### Build and Run Corda RPC Client Source: https://docs.r3.com/en/platform/corda/4.14/community/get-started/tutorials/supplementary-tutorials/tutorial-clientrpc-api.html Shell commands to compile the example code using Gradle and execute the RPC client application. ```bash # Build the example ./gradlew docs/source/example-code:installDist # Start it ./docs/source/example-code/build/install/docs/source/example-code/bin/client-rpc-tutorial Print ``` -------------------------------- ### Create Test Database and Mock Services (Java) Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/MockServices.Companion.html Sets up a database and mock services for unit testing. This method requires a list of cordapp packages, an identity service, an initial identity, network parameters, and additional keys. ```java final <, MockServices>  ,net.corda.core.node.NetworkParameters,java.security.KeyPair)>makeTestDatabaseAndMockServices(List cordappPackages, IdentityService identityService,  initialIdentity, NetworkParameters networkParameters, KeyPair moreKeys)  ``` -------------------------------- ### GET /node/diagnostic Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.core.messaging/-corda-r-p-c-ops/node-diagnostic-info.html Retrieves comprehensive diagnostic information about the node, including version details and installed CorDapps. ```APIDOC ## GET /node/diagnostic ### Description Returns the Node's NodeDiagnosticInfo, which includes the current version of the node and a list of all installed CorDapps. ### Method GET ### Endpoint /node/diagnostic ### Parameters None ### Request Example GET /node/diagnostic ### Response #### Success Response (200) - **version** (string) - The version of the node. - **cordapps** (array) - A list of installed CorDapp objects. #### Response Example { "version": "4.8", "cordapps": [ { "name": "finance-cordapp", "version": "1.0" } ] } ``` -------------------------------- ### Initialize PostgreSQL Database and User Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/getting-started.html SQL commands to create a new database, define a user with a password, and grant the necessary privileges for service connectivity. ```sql CREATE DATABASE ; CREATE USER WITH PASSWORD ''; GRANT ALL PRIVILEGES ON DATABASE to ; ``` -------------------------------- ### Configuration Management Source: https://docs.r3.com/en/platform/corda/1.7/cenm/cenm-cli-tool.html Endpoint for configuring the Signing Service. ```APIDOC ## POST cenm signer config set ### Description Configures the Signing Service using a provided configuration file. ### Method CLI Command ### Endpoint cenm signer config set ### Parameters #### Query Parameters - **-f, --config-file** (string) - Required - Path to the configuration file. - **-c, --use-context** (string) - Optional - Overrides the current context. - **--zone-token** (flag) - Optional - Prints zone token instead of config. ### Request Example cenm signer config set -f=/path/to/config.conf ``` -------------------------------- ### POST /reporter/start Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/internal/performance/ReporterKt.html Initializes the metrics reporter using the provided shutdown manager and metric registry instances. ```APIDOC ## POST /reporter/start ### Description Initializes and starts the metrics reporter service. This method binds the lifecycle of the reporter to the provided ShutdownManager. ### Method POST ### Endpoint /reporter/start ### Parameters #### Request Body - **shutdownManager** (Object) - Required - The manager responsible for handling application shutdown hooks. - **metricRegistry** (Object) - Required - The registry instance containing application metrics to be reported. ### Request Example { "shutdownManager": "instance_ref", "metricRegistry": "instance_ref" } ### Response #### Success Response (200) - **status** (string) - Indicates the reporter has started successfully. #### Response Example { "status": "success" } ``` -------------------------------- ### Get Offset (Kotlin) Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/core/utilities/ByteSequence.html Returns the starting position of the byte sequence within the byte array. ```kotlin final Integer getOffset() ``` -------------------------------- ### CordaModule Class Reference Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/client/jackson/internal/CordaModule.html Overview of the CordaModule class and its primary setup method. ```APIDOC ## CordaModule ### Description The CordaModule class is a final class used for module configuration within the Corda framework. ### Constructor `CordaModule()` ### Methods #### setupModule - **Signature**: `Unit setupModule(context)` - **Description**: Configures the module using the provided context. - **Parameters**: - **context** (unknown) - Required - The configuration context object. ``` -------------------------------- ### GET /GetTransactionsPaginatedFlow Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Retrieves all transactions for a given customer in a specified time frame. ```APIDOC ## GET /GetTransactionsPaginatedFlow ### Description Retrieves all transactions for a given `customerId` in a specified time frame. ### Method GET ### Endpoint /GetTransactionsPaginatedFlow ### Parameters #### Query Parameters - **customerId** (string) - Required - The ID of the customer. - **queryParams** (object) - Required - Pagination parameters. - **dateFrom** (string) - Required - Filters transactions after this date. - **dateTo** (string) - Required - Filters transactions before this date. ``` -------------------------------- ### GET /GetRecurringPaymentsForAccountPaginatedFlow Source: https://docs.r3.com/en/platform/corda/4.14/community/apps/bankinabox/back-end-guide.html Retrieves a paginated list of recurring payments for a specific account. ```APIDOC ## GET /GetRecurringPaymentsForAccountPaginatedFlow ### Description Retrieves recurring payments in a paginated list for a specific account. ### Method GET ### Endpoint /GetRecurringPaymentsForAccountPaginatedFlow ### Parameters #### Query Parameters - **accountId** (string) - Required - The ID of the account. - **repositoryQueryParams** (object) - Required - Holds searchTerm, pagination, and sorting data. - **dateFrom** (string) - Optional - Filters transactions after this date. - **dateTo** (string) - Optional - Filters transactions before this date. ``` -------------------------------- ### Mock Network Setup Source: https://docs.r3.com/en/api-ref/corda/4.14/community/kotlin/docs/net.corda.core.contracts/require-that.html Functions for creating and configuring mock Corda networks. This includes defining network parameters, notary configurations, and node specifications for isolated testing. ```kotlin import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetworkParameters import net.corda.testing.node.NotarySpec val mockNetwork = MockNetwork(MockNetworkParameters(notarySpecs = listOf(NotarySpec("O=Test Notary, L=London, C=GB")))) val node = mockNetwork.createNode() // Further network and node interactions ``` -------------------------------- ### Initialize Database Schema with 'initial-registration' (Java) Source: https://docs.r3.com/en/platform/corda/4.14/community/deploying-a-node.html Starts the Corda node with the 'initial-registration' command to initialize the database schema. This is an alternative to automatic schema management. ```java java -jar corda.jar initial-registration ``` -------------------------------- ### GET /flow/{holdingidentityshorthash}/{clientrequestid}/result - Get Flow Result Source: https://docs.r3.com/en/platform/corda/5.2/developing-applications/cordapp-template/utxo-ledger-example-cordapp/running-the-chat-cordapp.html Retrieves the status and result of a previously initiated flow. Requires the holding identity short hash of the node and the client request ID used when starting the flow. ```APIDOC ## GET /flow/{holdingidentityshorthash}/{clientrequestid}/result ### Description Polls for the status and result of a flow that has already been started. You need to provide the `holdingidentityshorthash` of the node and the `clientRequestId` that was used when initiating the flow. ### Method GET ### Endpoint `/api/v5_2/flow/{holdingidentityshorthash}/{clientrequestid}/result` ### Parameters #### Path Parameters - **holdingidentityshorthash** (string) - Required - The short hash identifier of the virtual node where the flow was run. - **clientrequestid** (string) - Required - The unique identifier of the request for the flow you want to check. #### Query Parameters None #### Request Body None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **holdingIdentityShortHash** (string) - The short hash of the node. - **clientRequestId** (string) - The unique identifier for the request. - **flowId** (string | null) - The ID of the flow. - **flowStatus** (string) - The status of the flow (e.g., "RUNNING", "COMPLETED"). - **flowResult** (any | null) - The result of the flow if it has completed successfully. - **flowError** (object | null) - Details of any error that occurred during flow execution. - **timestamp** (string) - The timestamp of the response. #### Response Example ```json { "holdingIdentityShortHash": "253501665E9D", "clientRequestId": "create-1", "flowId": "a1109c50-b455-48e0-adf2-f1811e420bb6", "flowStatus": "COMPLETED", "flowResult": "SHA-256D:AA9C38E9EE5EA62595AD68F19DD2BA360CC665D8086045E7FFB4E7FCD3CDC24E", "flowError": null, "timestamp": "2023-03-20T17:28:49.213Z" } ``` ``` -------------------------------- ### Get Start JMX HTTP Server Method Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/driver/JmxPolicy.html Retrieves the status of the Jolokia JMX agent. This method indicates whether spawned nodes will start with an agent to enable remote JMX monitoring via HTTP/JSON. ```java final Boolean getStartJmxHttpServer() ``` Indicates whether the spawned nodes should start with a Jolokia JMX agent to enable remote JMX monitoring using HTTP/JSON. ``` -------------------------------- ### Setting up Solana Accounts in Tests (Kotlin) Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/notary/solana-notary.html Shows how to use SolanaTestValidator's account and token management helpers for common test setup tasks in Kotlin. It airdrops SOL for fees and creates token mints and accounts. ```kotlin @BeforeEach fun setupSolana(validator: SolanaTestValidator) { val buyerWallet = FileSigner.random(custodiedKeysDir) validator.accounts().airdropSol(buyerWallet.publicKey(), 10) val stablecoinMint = validator.tokens().createToken(mintAuthority, decimals = 6) val buyerTokenAccount = validator.tokens().createAssociatedTokenAccount( mintAuthority, stablecoinMint, buyerWallet.publicKey() ) validator.tokens().mintTo(buyerTokenAccount, stablecoinMint, mintAuthority, amount = 1_000_000) } ``` -------------------------------- ### Database Initialization Error Examples Source: https://docs.r3.com/en/platform/corda/4.14/enterprise/node-database-migration-logging.html Examples of DatabaseInitialisation error logs indicating migration failures, incompatible schema versions, and JPA entity mismatches. ```text DatabaseInitialisation(id="9HBhcBgl";status="error";error_code="9";message="Migration failed for change set...") DatabaseInitialisation(id="oT6igoGJ";status="error";error_code="10";message="Incompatible database schema version detected...") DatabaseInitialisation(id="e6KAmx6O";status="error";error_code="11";message="Incompatible database schema version detected. Reason: Schema-validation: missing column [dummy] in table [`AliceCorp`.messages]") ``` -------------------------------- ### JmxPolicy Constructor with Start and PortAllocation Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/driver/JmxPolicy.html Creates a JmxPolicy instance, allowing explicit control over whether the JMX HTTP server starts and the PortAllocation strategy to be used. This provides granular control over JMX monitoring setup. ```java JmxPolicy(Boolean startJmxHttpServer, PortAllocation jmxHttpServerPortAllocation) ``` ``` -------------------------------- ### UnstartedMockNode.start() Method Source: https://docs.r3.com/en/api-ref/corda/4.14/community/javadoc/net/corda/testing/node/UnstartedMockNode.html Initiates the startup process for the mock node, transitioning it to a started state. ```java final StartedMockNode start() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.