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.
@alien-worlds/alienworlds-api-common
Advanced tools
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these componen
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these components in your code.
Name | Type | Layer | Description |
---|---|---|---|
Asset | Entity | domain | |
AssetRepository | Repository abstraction | domain | |
AssetMongoSource | Data source | data | mongodb data source used in the repository |
AssetMapper | Mapper | data | converts dto to entity and vice versa |
AssetSmartContractData | Entity | domain | |
AssetSmartContractRepository | Repository abstraction | domain | |
AssetSmartContractRepositoryImpl | Repository implementation | data | |
bindAssetRepository | IOC config | bind helper - requires MongoSource instance | |
bindAssetSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
Name | Type | Layer | Description |
---|---|---|---|
AtomicTransfer | Entity | domain | |
AtomicTransferRepository | Repository abstraction | domain | |
AtomicTransferMongoSource | Data source | data | mongodb data source used in the repository |
AtomicTransferMapper | Mapper | data | converts dto to entity and vice versa |
bindAtomicTransferRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
Mine | Entity | domain | |
MineRepository | Repository abstraction | domain | |
MineMongoSource | Data source | data | mongodb data source used in the repository |
MineMapper | Mapper | data | converts dto to entity and vice versa |
bindMineRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
Nft | Entity | domain | |
NftRepository | Repository abstraction | domain | |
NftMongoSource | Data source | data | mongodb data source used in the repository |
NftMapper | Mapper | data | converts dto to entity and vice versa |
bindNftRepository | IOC config | bind helper - requires MongoSource instance |
Name | Type | Layer | Description |
---|---|---|---|
SchemaSmartContractData | Entity | domain | |
SchemaSmartContractRepository | Repository abstraction | domain | |
SchemaSmartContractRepositoryImpl | Repository implementation | data | |
bindSchemaSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
Name | Type | Layer | Description |
---|---|---|---|
TemplateSmartContractData | Entity | domain | |
TemplateSmartContractRepository | Repository abstraction | domain | |
TemplateSmartContractRepositoryImpl | Repository implementation | data | |
bindTemplateSmartContractRepository | IOC config | bind helper - requires EosRpcSource instance and code string |
To use these components in your code, add this package as a dependency using your Node package manager
yarn add @alien-worlds/alienworlds-api-common
You can inject the code with the binding functions or by yourself. In the ioc.config
file in your project, add the component of interest to you, remembering to initialize all the source needs in advance, e.g. MongoDB or JsonRpc Api
// with binding functions
import { bindStateRepository } from '@alien-worlds/alienworlds-api-common';
// ...
await client.connect();
const db = client.db(dbName);
const mongoSource = new MongoSource(db);
bindStateRepository(container, mongoSource);
// or without
import {
StateRepositoryImpl,
StateRepository,
StateMongoSource,
StateMapper,
} from '@alien-worlds/alienworlds-api-common';
// ...
await client.connect();
const db = client.db(dbName);
const mongoSource = new MongoSource(db);
const stateRepositoryImpl = new StateRepositoryImpl(
new StateMongoSource(mongoSource),
new StateMapper()
);
container
.bind<StateRepository>(StateRepository.Token)
.toConstantValue(stateRepositoryImpl);
If you want to release a new version of this package, just run deploy.sh
from the main project folder.
# patches version by default
sh scripts/deploy.sh
# Optionally, you can specify the version or what kind of update is (major|minor|patch)
# e.g.
sh scripts/deploy.sh 1.2.3
# or
sh scripts/deploy.sh major
This script will:
package.json
fileBefore running the script, be sure that you have a clean situation and the latest changes from the repository so that there are no conflicts
FAQs
Components used in both the Alien Worlds API and history tools. Package contains repositories, services and entities for various mongodb collections and smart contract tables rows. The binding functions are used to simplify the injection of these componen
We found that @alien-worlds/alienworlds-api-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.