Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
org.web3j.corda:web3j-corda-console
Advanced tools
Web3j command-line tools for the Corda blockchain platform.
web3j-corda is a lightweight client library for working with CorDapps and interacting with different nodes on Corda networks.
There is a web3j-corda binary that allows you to easily:
You can install web3j-corda by running the following command in your terminal:
curl -L https://getcorda.web3j.io | bash
To generate a template CorDapp project with the client wrappers:
web3j-corda new --name=<corDappName> --output-dir=<output-dir> --package-name=<packageName>
To generate a web3j-corda client wrappers to existing CorDapps:
web3j-corda generate (--url=<openApiUrl> | --cordapps-dir=<corDapps-dir>) --output-dir=<output-dir> --package-name=<packageName>
For further instructions, head to the Examples section in the docs.
Add the relevant dependency to your project:
<dependency>
<groupId>org.web3j.corda</groupId>
<artifactId>web3j-corda-core</artifactId>
<version>0.2.8</version>
</dependency>
dependencies {
implementation 'org.web3j.corda:web3j-corda-core:0.2.8'
}
Initialise a connection, and create our Corda client service:
val service = CordaService("http://localhost:9000/") // URL exposed by Corda OpenAPI connector
val corda = Corda.build(service)
Obtain all the nodes connected to the current node:
val nodes = corda.api.network.nodes.findAll()
To query the list of all running CorDapps:
val corDapps = corda.api.corDapps.findAll()
To start a flow there are two option depending on whether you want to use a generated CorDapp wrapper or just the Corda API directly:
This way works but is not type-safe, so can lead to runtime exceptions:
// Initialise the parameters of the flow
val params = InitiatorParameters("$1", "O=PartyA, L=London, C=GB", false)
val issue = corda.api
.corDapps.findById("obligation-cordapp")
.flows.findById("issue-obligation")
// Type-conversions with potential runtime exception!
var signedTx = issue.start(parameters).convert<SignedTransaction>()
By using a wrapper generated by the web3j-corda
Command-Line Tool,
you can interact with your CorDapp in a type-safe way:
// Initialise the parameters of the flow
val params = InitiatorParameters("$1", "O=PartyA, L=London, C=GB", false)
// Start the flow with typed parameters and response
val signedTx = Obligation.load(corda.service).flows.issue.start(parameters)
The project documentation portal is available here.
To build and serve the docs locally, you will need to have Pipenv installed. Then simply run:
pipenv install
pipenv run mkdocs serve
Web3 Labs maintain web3j-corda. If you'd like to get in touch, please email us.
FAQs
Web3j command-line tools for the Corda blockchain platform.
We found that org.web3j.corda:web3j-corda-console demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.