
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@hashgraph/stablecoin-npm-backend
Advanced tools
The backend module is meant to be used in combination with the Hedera StableCoin Studio.
Its purpose is to enable multisignatures for stable coins management operations.
Only single level multikeys are supported for now. Keys lists/Threshold keys associated to accounts cannot contain key lists/threshold keys themselves as keys.
Whenever users need to submit to the DLT network a transaction (Cash In, Freeze, ...) associated to an account that has multiple keys (key list or threshold keys) they will have the possibility to interact with the backend in the following way:
The backend is made of two components:
{
"payload": "transaction_raw_message",
"description": "transaction_short_description",
"accountId": "your_account_id",
"keyList": ["PK1", "PK2", ...],
"threshold": "number"
}
Logic :
Status code :
Response :
{
"transactionId": "generated_transaction_ID"
}
{
"signedTransactionMessage": "transaction_signed_message",
"publicKey": "public_key_used_for_signing"
}
[
{
"id" :"transaction_id",
"transaction_message": "hexadecimal_array_of_bytes",
"description": "transaction_short_description",
"hedera_account_id": "your_account_id",
"signatures": ["signature_1", "signature_2", ...],
"key_list": ["PK1", "PK2", ...],
"signed_keys": ["PK1", "PK2", ...],
"status": "transaction_status",
"threshold":"number"
},
{...}
]
[
{
"id" :"transaction_id",
"transaction_message": "hexadecimal_array_of_bytes",
"description": "transaction_short_description",
"hedera_account_id": "your_account_id",
"signatures": ["signature_1", "signature_2", ...],
"key_list": ["PK1", "PK2", ...],
"signed_keys": ["PK1", "PK2", ...],
"status": "transaction_status",
"threshold":"number"
},
{...}
]
The command below can be used to install the official release from the NPM repository. This version may not reflect the most recent changes to the main branch of this repository.
npm install -g @hashgraph/stablecoin-npm-backend
Run npm install. This will create and populate node_modules and build the project and dependencies.
Then run npm run build. This will create and populate the dist folder with the transpiled javascript files.
In order to run the backend you will need to execute the docker compose yaml file that defines the entire application (DB + API).
Run docker compose up -d --build. This will start two containers (one for the API, another one for the DB), their respectives volumes and the network for them to communicate with each other.
The application will use two ports (defined in the .env file):
SERVER_PORT: This is the API port, it can be accessed from outside the docker project.DB_PORT: This is the DB port, it is only accessible from within the docker network.There is a .env file that must be used to configure the backend. These are the configuration parameters:
COMPOSE_PROJECT_NAME: Name of the docker compose project.CONTAINER_BACK_NAME: Name of the container running the NestJS API.CONTAINER_DB_NAME: Name of the container running the postgres DB.DOCKER_NETWORK_NAME: Name of the docker compose network.SERVER_HOST: API server name.SERVER_PORT: API port. This port will be exposed outside of the docker network so that anyone can reach it.DB_HOST: DB server name.DB_PORT: DB port. This port will not be exposed outside of the docker network, which means that it is only accessible to the API.DB_USER: DB admin user name.DB_PASSWORD: DB admin user password.DB_NAME: DB name.ORIGIN: List of urls that are accepted in the HTTP header "Origin". If the API endpoints are invoked from a different url, the request will fail.MAX_LOG_FILESIZE: Max size of the logging files used by the Winston file rotation policy. If a log file reaches this size, it will be zipped and a new file will be created.LOG_LEVEL: Minimum log level to be included in the loging files.FILE_NAME: Log file name pattern and localtion.DATE_PATTERN: Log file date pattern.The project uses Jest for testing.
Tests may be run using the following command
npm run test
Contributions are welcome. Please see the contributing guide to see how you can get involved.
This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to oss@hedera.com.
FAQs
Unknown package
We found that @hashgraph/stablecoin-npm-backend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.