
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@accordproject/concerto-codegen
Advanced tools
Model converters and codegen for Concerto format model files.
npm install @accordproject/concerto-codegen --save
This API allows you to generate models of varying sizes (up to 100 MiB) which can be used to test the performance of your Concerto-handling code.
You can generate a model up to a specified number of declarations and properties using:
const benchmarkModelGenerator = new BenchmarkModelGenerator();
const generated = benchmarkModelGenerator.generateConcertoModels({
nDeclarations: 5, // Number of declarations in the model
nProperties: 5, // Number of properties per declaration
});
You can generate a model up to a specified size in bytes, however you would need to specify how that model should grow.
If you'd like to grow it by number of declarations, you will need to specify the number of properties that you wish the model to have (defaults to 1
):
const benchmarkModelGenerator = new BenchmarkModelGenerator();
const generated = benchmarkModelGenerator.generateConcertoModels({
generateUpToSize: 10000, // Target upper limit of growth in bytes
growBy: 'declarations', // Element type by which the model should grow
nProperties: 5, // Number of properties per declaration
});
If you'd like to grow it by number of properties, you will need to specify the number of declarations that you wish the model to have (defaults to 1
):
const benchmarkModelGenerator = new BenchmarkModelGenerator();
const generated = benchmarkModelGenerator.generateConcertoModels({
generateUpToSize: 10000, // Target upper limit of growth in bytes
growBy: 'properties', // Element type by which the model should grow
nProperties: 5, // Number of declarations in the model
});
The expected response will include an array of generated models
(currently containing only a single model) and a metadata
object with information about the generated model e.g:
{
models: [
{
'$class': 'concerto.metamodel@1.0.0.Model',
decorators: [],
namespace: 'generated.model@1.0.0',
imports: [],
declarations: [
...
]
}
],
metadata: {
requestedModelSizeInBytes: 10000,
humanReadableRequestedModelSize: '9.77 KiB',
generatedModelSizeInBytes: 9952,
humanReadableGeneratedModelSize: '9.72 KiB',
declarationsN: 5,
propertiesNInSmallestDeclaration: 15,
propertiesNInLargestDeclaration: 16
}
}
As you can see from the above example model, the generator will try its best to reach the upper generateUpToSize
requested size, but may fall short by a few bytes.
Accord Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.
FAQs
Code Generation for the Concerto Modeling Language
The npm package @accordproject/concerto-codegen receives a total of 525 weekly downloads. As such, @accordproject/concerto-codegen popularity was classified as not popular.
We found that @accordproject/concerto-codegen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.