{"id":31959600,"url":"https://github.com/stateset/stateset-corda","last_synced_at":"2026-07-21T13:33:10.321Z","repository":{"id":132093567,"uuid":"243621996","full_name":"stateset/stateset-corda","owner":"stateset","description":"Stateset Distributed B2B Sales and Finance Automation Network","archived":false,"fork":false,"pushed_at":"2020-06-19T04:41:06.000Z","size":7241,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-07-21T13:33:07.487Z","etag":null,"topics":["b2b","blockchain","business-network","corda","distributed-database","stateset","stateset-network"],"latest_commit_sha":null,"homepage":"https://stateset.io","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stateset.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-27T21:37:23.000Z","updated_at":"2023-08-09T22:31:08.000Z","dependencies_parsed_at":"2023-05-29T22:30:17.744Z","dependency_job_id":null,"html_url":"https://github.com/stateset/stateset-corda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stateset/stateset-corda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stateset%2Fstateset-corda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stateset%2Fstateset-corda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stateset%2Fstateset-corda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stateset%2Fstateset-corda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stateset","download_url":"https://codeload.github.com/stateset/stateset-corda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stateset%2Fstateset-corda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35726551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-21T02:00:06.728Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b2b","blockchain","business-network","corda","distributed-database","stateset","stateset-network"],"created_at":"2025-10-14T15:47:35.697Z","updated_at":"2026-07-21T13:33:10.314Z","avatar_url":"https://github.com/stateset.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stateset\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nStateset is a distributed sales and finance automation network. In order to use the Stateset Platform interface go to https://app.stateset.io/signup\n\nThe Stateset Network Swagger API can be found at https://stateset.network:8080/swagger-ui.html#/\n\n```\n    _____       _____                 _____\n    _________  /______ __  /___________________  /_\n    __  ___/  __/  __ `/  __/  _ \\_  ___/  _ \\  __/\n    _(__  )/ /_ / /_/ // /_ /  __/(__  )/  __/ /_\n    /____/ \\__/ \\__,_/ \\__/ \\___//____/ \\___/\\__/\n\n\n\t   8 Node Network Graph | 28 Edges | 1 Notary\n-------------------------------------------------------------------\n          ^      ^     ^      ^     ^      ^\n\t /--------\\   /--------\\   /--------\\                                   \n\t|\t   | |\t        | |          |                  \n\t|  PartyB  | |  PartyC  | |  PartyD  | \n\t|          | |\t   \t| |          |                   \n \t \\--------/   \\--------/   \\--------/\n  ^      ^       v     ^      ^     v       ^      ^ \n /--------\\\t      /--------\\\t   /--------\\\n|\t   |\t     |\t        |\t  |\t     |\n|  PartyA  |\t     | Notaries |\t  |  PartyE  | \n|\t   |\t     |\t        |\t  |\t     | \n \\--------/\t      \\--------/           \\--------/\n  v       ^      ^     ^      ^     ^      ^       v\n\t /--------\\   /--------\\   /--------\\                                   \n\t|\t   | |\t        | |          |                            \n\t|  PartyH  | |  PartyG  | |  PartyF  | \n\t|          | |\t        | |          |                             \n \t \\--------/   \\--------/   \\--------/\n          v      v     v      v     v      v\n--------------------------------------------------------------------\n\n                ^  +-------------------------------+  ^\n                |  |                               |  |\n                |  |  State-machine = Application  |  |\n                |  |                               |  |   Stateset\n                |  |            ^      +           |  |\n                |  +----------- | ABCI | ----------+  v\n                |  |            +      v           |  ^\n                |  |                               |  |\nStateset        |  |           Consensus           |  |\nNotaries        |  |                               |  |\nClusters        |  +-------------------------------+  |   Tendermint Core\n                |  |                               |  |\n                |  |           Networking          |  |\n                |  |                               |  |\n                v  +-------------------------------+  v\n\n\n```\n\n\n### Stateset Network Setup\n\n\n1) Install the Stateset Network locally via Git:\n\n```bash\n\ngit clone https://github.com/stateset/stateset\n\n```\n\n2) Deploy the Nodes\n\n\n```bash\n\ncd stateset \u0026\u0026 gradlew.bat deployNodes (Windows) OR ./gradlew deployNodes (Linux)\n\n```\n\n3) Run the Nodes\n\n```bash\n\ncd workflows\ncd build \ncd nodes\nrunnodes.bat (Windows) OR ./runnodes (Linux)\n\n```\n4) Run the Spring Boot Server\n\n```bash\n\ncd ..\ncd ..\ncd server\n../gradlew.bat bootRun -x test (Windows) OR ../gradlew bootRun -x test\n\n```\nThe Stateset Network API Swagger will be running at `http://localhost:8080/swagger-ui.html#/`\n\nTo change the name of your `organisation` or any other parameters, edit the `node.conf` file and repeat the above steps.\n\n### Joining the Network\n\nAdd the following to the `node.conf` file:\n\n`compatibilityZoneUrl=\"https://stateset.network:8080\"`\n\nThis is the current network map and doorman server URL\n\n1) Remove Existing Network Parameters and Certificates\n\n```bash\n\ncd build\ncd nodes\ncd PartyA\nrm -rf persistence.mv.db nodeInfo-* network-parameters certificates additional-node-infos\n\n```\n\n2) Download the Network Truststore\n\n```bash\n\ncurl -o /var/tmp/network-truststore.jks https://stateset.network:8080//network-map/truststore\n\n```\n\n3) Initial Node Registration\n\n```bash\n\njava -jar corda.jar --initial-registration --network-root-truststore /var/tmp/network-truststore.jks --network-root-truststore-password trustpass\n\n```\n4) Start the Node\n\n```bash\n\njava -jar corda.jar\n\n```\n\nTo teardown all of the nodes and server:\n\n```bash\n\ntaskkill /f /im java.exe\n\n```\n\n#### Node Configuration\n\nConfiguration \n\n- Corda version: Corda 4\n- Vault SQL Database: PostgreSQL\n- Cloud Service Provider: GCP\n- JVM or Kubernetes\n\n\n#### Database Configuration\n\nThe node configuration on deploy is setup to leverage Postgres using the Cloud SQL Instance\n\n```bash\n\n   node {\n        name \"O=StateSet,L=San Mateo,C=US\"\n        p2pPort 10011\n        rpcSettings {\n            address(\"localhost:10030\")\n            adminAddress(\"localhost:10070\")\n        }\n        cordapps = []\n        rpcUsers = [[ user: \"user1\", \"password\": \"test\", \"permissions\": [\"ALL\"]]]\n        extraConfig = [\n                'dataSourceProperties' : [\n                        'dataSourceClassName' : 'org.postgresql.ds.PGSimpleDataSource',\n                        'dataSource.url' : 'jdbc:postgresql://\u003cDATABASE_NAME\u003e?cloudSqlInstance=\u003cINSTANCE\u003e\u0026socketFactory=com.google.cloud.sql.postgres.SocketFactory\u0026user=\u003cUSER\u003e\u0026password=\u003cPASSWORD\u003e\u0026currentSchema=stateset',\n                        'dataSource.password' : 'password',\n                        'dataSource.user' : 'user'\n                ],\n                'database': [\n                        'transactionIsolationLevel' : 'READ_COMMITTED'\n                ],\n                'jarDirs': '[/stateset-network/drivers]'\n        ]\n        webPort 8080\n        // extraConfig = ['h2Settings.address' : 'localhost:12347']\n        webserverJar = \"${rootProject.projectDir}/server/build/libs/server-${project.version}.jar\"\n    }\n```\n\nIn order to use the GraphQL engine on the Stateset Network; the schema, user and password will need to be created on Postgres:\n\n```bash\n\nCREATE USER \"my_user\" WITH LOGIN PASSWORD 'my_password';\nCREATE SCHEMA \"my_schema\";\nGRANT USAGE, CREATE ON SCHEMA \"my_schema\" TO \"my_user\";\nGRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON ALL tables IN SCHEMA \"my_schema\" TO \"my_user\";\nALTER DEFAULT privileges IN SCHEMA \"my_schema\" GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON tables TO \"my_user\";\nGRANT USAGE, SELECT ON ALL sequences IN SCHEMA \"my_schema\" TO \"my_user\";\nALTER DEFAULT privileges IN SCHEMA \"my_schema\" GRANT USAGE, SELECT ON sequences TO \"my_user\";\nALTER ROLE \"my_user\" SET search_path = \"my_schema\";\n\n```\n\n### Network States\n\nCustomer States are transferred between stakeholders on the network.\n\n#### Accounts\n\nThe first state to be deployed on the network is the `Account`. Version 0.1 of the `Account` State has the following structure:\n\n```jsx\n\n// *********\n// * Account State *\n// *********\n\ndata class Account(val accountId: String,\n                   val accountName: String,\n                   val accountType: TypeOfBusiness,\n                   val industry: String,\n                   val phone: String,\n                   val yearStarted: Int,\n                   val annualRevenue: Double,\n                   val businessAddress: String,\n                   val businessCity: String,\n                   val businessState: String,\n                   val businessZipCode: String,\n                   val controller: Party,\n                   val processor: Party ) : ContractState, QueryableState {\n\n\n```\n\nThe Account has the following business `flows` that can be called:\n\n- `CreateAccount` - Create an Account between your organization and a known counterparty on the DSOA\n- `TransferAccount` - Transfer the Account between your organization and a counterparty on the DSOA\n- `ShareAccount` - Share the Account Data with a counterparty\n- `EraseAccount` - Erase the Account Data\n\n#### Contacts\n\nThe second state to be deployed on the network is the `Contact`. Version 0.1 of the `Contact` State has the following structure:\n\n```jsx\n\n// *********\n// * Contact State *\n// *********\n\ndata class Contact(val contactId: String,\n                   val firstName: String,\n                   val lastName: String,\n                   val email: String,\n                   val phone: String,\n                   val controller: Party,\n                   val processor: Party,\n                   override val linearId: UniqueIdentifier = UniqueIdentifier())\n\n\n```\n\n\nThe Contact has the following business `flows` that can be called:\n\n- `CreateContact` - Create a Contact between your organization and a known counterparty on the DSOA\n- `TransferContact` - Transfer the Contact between your organization and a counterparty on the DSOA\n- `ShareContact` - Share the Contact Data with a counterparty\n- `EraseContact` - Erase the Contact Data\n\n#### Leads\n\nThe third state to be deployed on the network is the `Lead`. Version 0.1 of the `Lead` State has the following structure:\n\n```jsx\n\n// *********\n// * Lead State *\n// *********\n\ndata class Lead(val leadId: String,\n                val firstName: String,\n                val lastName: String,\n                val company: String,\n                val title: String,\n                val email: String,\n                val phone: String,\n                val country: String,\n                val controller: Party,\n                val processor: Party,\n                override val linearId: UniqueIdentifier = UniqueIdentifier())\n\n\n```\n\n\nThe Lead has the following business `flows` that can be called:\n\n- `CreateLead` - Create a Lead between your organization and a known counterparty on the DSOA\n- `TransferLead` - Transfer the Lead between your organization and a counterparty on the DSOA\n- `ShareLead` - Share the Lead Data with a counterparty\n- `EraseLead` - Erase the Lead Data\n- `ConvertLead` - Convert a Lead State into an Account State and Contact State\n\n\nWe created the `Carmen Dashboard` to provide the ability for organizations to create `Accounts`, `Contacts`, and `Leads` with counterparties on the network.\n\n\n#### Cases\n\n\n```jsx\n\n// *********\n// * Case State *\n// *********\n\ndata class Case(val caseId: String,\n                val description: String,\n                val caseNumber: String,\n                val caseStatus: CaseStatus,\n                val casePriority: CasePriority,\n                val submitter: Party,\n                val resolver: Party,\n                override val linearId: UniqueIdentifier = UniqueIdentifier()) \n\n\n```\n\nThe Case has the following business `flows` that can be called:\n\n- `CreateCase` - Create a Case between your organization and a known counterparty on the DSOA\n- `StartCase` - Start on an unstarted Case\n- `CloseCase` - Close the Case with a counterparty\n- `EscalateCase` - Escalate the Case\n\n\n#### Proposals\n\n\n```jsx\n\n// *****************\n// * Proposal State *\n// *****************\n\n@BelongsToContract(ProposalContract::class)\ndata class Proposal(val proposalNumber: String,\n                    val proposalName: String,\n                    val proposalHash: String,\n                    val proposalStatus: ProposalStatus,\n                    val proposalType: ProposalType,\n                    val totalProposalValue: Int,\n                    val party: Party,\n                    val counterparty: Party,\n                    val proposalStartDate: String,\n                    val proposalEndDate: String,\n                    val active: Boolean?,\n                    val createdAt: String?,\n                    val lastUpdated: String?,\n                    override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {\n\n```\n\nThe Proposal has the following business `flows` that can be called:\n\n- `CreateProposal` - Create a Proposal between your organization and a known counterparty on Stateset\n- `AcceptProposal` - Accepts the Proposal\n- `RejectProposal` - Rejects the Proposal\n\n\n\n#### Agreements\n\n\n```jsx\n\n// *****************\n// * Agreement State *\n// *****************\n\n@BelongsToContract(AgreementContract::class)\ndata class Agreement(val agreementNumber: String,\n                     val agreementName: String,\n                     val agreementHash: String,\n                     val agreementStatus: AgreementStatus,\n                     val agreementType: AgreementType,\n                     val totalAgreementValue: Int,\n                     val party: Party,\n                     val counterparty: Party,\n                     val agreementStartDate: String,\n                     val agreementEndDate: String,\n                     val active: Boolean?,\n                     val createdAt: String?,\n                     val lastUpdated: String?,\n                     override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {\n\n\n```\n\nThe Agreement has the following business `flows` that can be called:\n\n- `CreateAgreement` - Create an Agreement between your organization and a known counterparty on Stateset\n- `ActivateAgreement` - Activate the Agreement between your organization and a counterparty on Stateset\n- `TerminateAgreement` - Terminate an existing or active agreement\n- `RenewAgreement` - Renew an existing agreement that is or is about to expire\n- `ExpireAgreement` - Expire a currently active agreement between you and a counterparty\n\nThe `Agreement Status` and `Agreement Type` enums are listed as follows:\n\n```jsx\n\n\n@CordaSerializable\nenum class AgreementStatus {\n    REQUEST, APPROVAL_REQUIRED, APPROVED, IN_REVIEW, ACTIVATED, INEFFECT, REJECTED, RENEWED, TERMINATED, AMENDED, SUPERSEDED, EXPIRED\n}\n\n@CordaSerializable\nenum class AgreementType {\n    NDA, MSA, SLA, SOW\n}\n\n```\n\n#### Loans\n\n```jsx\n\n\n// *****************\n// * Loan State *\n// *****************\n\n@BelongsToContract(LoanContract::class)\ndata class Loan(val loanNumber: String,\n                val loanName: String,\n                val loanReason: String,\n                val loanStatus: LoanStatus,\n                val loanType: LoanType,\n                val amountDue: Int,\n                val amountPaid: Int,\n                val amountRemaining: Int,\n                val subtotal: Int,\n                val total: Int,\n                val party: Party,\n                val counterparty: Party,\n                val dueDate: String,\n                val periodStartDate: String,\n                val periodEndDate: String,\n                val paid: Boolean?,\n                val active: Boolean?,\n                val createdAt: String?,\n                val lastUpdated: String?,\n                override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {\n\n\n```\n\nThe Loan has the following business `flows` that can be called:\n\n- `CreateLoan` - Create a Loan between your organization and a known counterparty on Stateset\n- `PayLoan` - Pay off a Loan\n\n\n#### Invoices\n\n```jsx\n\n\n// *****************\n// * Invoice State *\n// *****************\n\n@BelongsToContract(InvoiceContract::class)\ndata class Invoice(val invoiceNumber: String,\n                   val invoiceName: String,\n                   val billingReason: String,\n                   val amountDue: Int,\n                   val amountPaid: Int,\n                   val amountRemaining: Int,\n                   val subtotal: Int,\n                   val total: Int,\n                   val party: Party,\n                   val counterparty: Party,\n                   val dueDate: String,\n                   val periodStartDate: String,\n                   val periodEndDate: String,\n                   val paid: Boolean?,\n                   val active: Boolean?,\n                   val createdAt: String?,\n                   val lastUpdated: String?,\n                   override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {\n\n\n```\n\nThe Invoice has the following business `flows` that can be called:\n\n- `CreateInvoice` - Create a Invoice between your organization and a known counterparty\n- `PayInvoice` - Pay an Invoice\n- `FactorInvoice` - Factor an Invoice\n\n\n#### Purchase Orders\n\n```jsx\n\n// ************************\n// * Purchase Order State *\n// ************************\n\n@BelongsToContract(PurchaseOrderContract::class)\ndata class PurchaseOrder(val purchaseOrderNumber: String,\n                         val purchaseOrderName: String,\n                         val purchaseOrderHash: String,\n                         val purchaseOrderStatus: PurchaseOrderStatus,\n                         val description: String,\n                         val purchaseDate: String,\n                         val deliveryDate: String,\n                         val subtotal: Int,\n                         val total: Int,\n                         val purchaser: Party,\n                         val vendor: Party,\n                         val createdAt: String?,\n                         val lastUpdated: String?,\n                         override val linearId: UniqueIdentifier = UniqueIdentifier()) : ContractState, LinearState, QueryableState {\n\n```\n\nThe Purchase Order has the following business `flows` that can be called:\n\n- `CreatePurchaseOrder` - Create a PO between a purchaser and a vendor on Stateset\n- `CompletePurchaseOrder` - Completes the PO\n- `CancelPurchaseOrder` - Cancels the PO\n\n\nTesting\n-------\n\nTesting and code review needs to be implemented on the Stateset Network.\n\n### Automated Testing\n\nDevelopers are strongly encouraged to write for new code, and to\nsubmit new unit tests for old code. Unit tests can be compiled and run.\n\n### Manual Quality Assurance (QA) Testing\n\nChanges should be tested by somebody other than the developer who wrote the\ncode. This is especially important for large or high-risk changes. It is useful\nto add a test plan to the pull request description if testing the changes is\nnot straightforward.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstateset%2Fstateset-corda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstateset%2Fstateset-corda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstateset%2Fstateset-corda/lists"}