Get Started with ScalarDL HashStore
ScalarDL HashStore is a high-level abstraction on top of a low-level ledger abstraction. It is specially designed for digital evidence preservation and offers two functionalities: object authenticity management and collection authenticity management. By using HashStore, you can manage hash values of objects and a collection of objects in an immutable manner without writing a contract, enabling you to develop authenticity management applications quickly and easily.
This getting started tutorial explains how to configure ScalarDL HashStore on your preferred database and manage objects and collections in a tamper-evident manner.
What is ScalarDL HashStore?​
HashStore provides two functionalities: object authenticity management and collection authenticity management. The object authenticity management enables you to manage the authenticity of any kind of your objects, like files, audit logs, and even directories in your file or object storage. The collection authenticity management enables you to manage which objects exist in a collection. For example, you can create a collection of objects that need to be validated in an auditing process.
For how HashStore achieves these functionalities, see the examples in Manage object authenticity and Manage collection authenticity below.
Prerequisites​
- One of the following Java Development Kits (JDKs):
- Oracle JDK: 8, 11, 17, or 21 (LTS versions)
- OpenJDK distribution (Eclipse Temurin, Amazon Corretto, or Microsoft Build of OpenJDK): 8, 11, 17, or 21 (LTS versions)
- Docker 20.10 or later with Docker Compose v2.20.0 or later
Since ScalarDL is built with JDK 8, contracts must be a JDK 8–compatible binary. If you use a version other than JDK 8, you must configure your build tool to build the JDK 8–compatible binary. There are several ways to specify binary compatibility, including using the --release 8 option for javac or setting Gradle or Maven configurations to use the JDK 8 toolchain. The following shows the configuration for Gradle:
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
For more details about the Gradle and Maven configurations, see Toolchains for JVM projects for Gradle and Guide to Using Toolchains for Maven.
Clone the ScalarDL samples repository​
Open Terminal, then clone the ScalarDL samples repository by running the following command:
git clone https://github.com/scalar-labs/scalardl-samples
Then, go to the directory that contains the sample configuration by running the following command:
cd scalardl-samples
Start up ScalarDL with your preferred database​
Select your database, and follow the instructions to deploy ScalarDL Ledger with it. For a list of databases that ScalarDL supports, see Databases.
- MySQL
- PostgreSQL
- Oracle Database
- SQL Server
- DynamoDB
- Cosmos DB for NoSQL
- Cassandra
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
mysql/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
mysql/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
mysql/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run MySQL locally by running the following command:
docker compose -f mysql/docker-compose-ledger.yml up -d mysql -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f mysql/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f mysql/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
postgres/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
postgres/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
postgres/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run PostgreSQL locally by running the following command:
docker compose -f postgres/docker-compose-ledger.yml up -d postgres -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f postgres/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f postgres/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
oracle/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
oracle/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
oracle/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run Oracle Database locally by running the following command:
docker compose -f oracle/docker-compose-ledger.yml up -d oracle -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f oracle/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f oracle/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
sqlserver/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
sqlserver/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
sqlserver/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run SQL Server locally by running the following command:
docker compose -f sqlserver/docker-compose-ledger.yml up -d sqlserver -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f sqlserver/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f sqlserver/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
dynamodb/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
dynamodb/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
dynamodb/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run DynamoDB locally by running the following command:
docker compose -f dynamodb/docker-compose-ledger.yml up -d dynamodb -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f dynamodb/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f dynamodb/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the Docker image for the Enterprise edition in the
cosmosdb/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
cosmosdb/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
cosmosdb/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Configure Cosmos DB for NoSQL.
To use Azure Cosmos DB for NoSQL, you must have an Azure account. If you don't have an Azure account, visit Create an Azure Cosmos DB account.
After setting up Cosmos DB for NoSQL, modify the following items in
cosmodb/ledger.propertiesbased on your configuration of Cosmos DB for NoSQL.scalar.db.contact_points=<COSMOS_DB_FOR_NOSQL_URI>
scalar.db.password=<COSMOS_DB_FOR_NOSQL_KEY> -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f cosmosdb/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger by running the following command:
docker compose -f cosmosdb/docker-compose-ledger.yml up -d
Set up your license (Enterprise edition only)
If you're using the ScalarDL Enterprise edition, set up your license as follows. If you're using the Community edition, skip to the next section to start up ScalarDL.
See here to set up your license
-
Enable the container image for the Enterprise edition in the
cassandra/docker-compose-ledger.ymlfile as follows:-
Before changing the image (default configuration):
services:
scalardl-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
# image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION} -
After changing the image:
services:
scalardl-ledger:
# image: ghcr.io/scalar-labs/scalardl-ledger:${SCALARDL_VERSION}
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
-
-
Set your license key for ScalarDL Ledger. In the
cassandra/ledger.propertiesfile, replace<SET_YOUR_LICENSE_KEY>with your license key. For example:##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) #####
scalar.dl.licensing.license_key={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY (ENTERPRISE EDITION ONLY) ##### -
To check the license, update the
cassandra/docker-compose-ledger.ymlfile as follows. If you're using a trial license, skip this step.-
Before changing the certificate file path (default configuration):
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
- ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem -
After changing the certificate file path:
services:
scalardl-ledger:
volumes:
- ./ledger.properties:/scalar/ledger/ledger.properties.tmpl
- ../fixture/ledger-key.pem:/scalar/ledger-key.pem
# - ../fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
- ../fixture/commercial-license-cert.pem:/scalar/license-cert.pem
-
Start up ScalarDL
You can start ScalarDL Ledger by following the steps below:
-
Run Cassandra locally by running the following command:
docker compose -f cassandra/docker-compose-ledger.yml up -d cassandra -
Load the database schema for ScalarDL Ledger by running the following command:
docker compose -f cassandra/docker-compose-ledger.yml up -d scalardl-ledger-schema-loader -
Run ScalarDL Ledger and its dependent components by running the following command:
docker compose -f cassandra/docker-compose-ledger.yml up -d
Download the Client SDK​
Next, you'll use the ScalarDL HashStore client tools. Specify a version that is the same as the deployed ScalarDL version and is used for downloading the tools by running the following command:
VERSION=$(grep SCALARDL_VERSION .env | awk -F= '{print $2}')
Then, download the tools by running the following command:
curl -OL https://github.com/scalar-labs/scalardl/releases/download/v$VERSION/scalardl-hashstore-java-client-sdk-$VERSION.zip
unzip scalardl-hashstore-java-client-sdk-$VERSION.zip
mv scalardl-hashstore-java-client-sdk-$VERSION hashstore
Configure the client properties​
Before interacting with ScalarDL HashStore, you need to configure the client. To create a configuration file with the minimum required properties for the client, run the following command:
cat << 'EOF' > client.properties
# A host name for ScalarDL Ledger.
scalar.dl.client.server.host=localhost
# An ID for the certificate holder. This must be configured for each private key and must be unique in the system.
scalar.dl.client.cert_holder_id=foo
# A path to the certificate file.
scalar.dl.client.cert_path=./fixture/client.pem
# A path to the private key file.
scalar.dl.client.private_key_path=./fixture/client-key.pem
EOF
You can use localhost for the ScalarDL Ledger host name in this tutorial. For the private key and certificate, you can use the ones provided in the fixture directory of the scalardl-samples repository (client-key.pem and client.pem, respectively). For the certificate holder, any unique ID can be specified.
Do not use the sample private key and certificate in production environments. For details about getting your own certificate, see How to Get a Certificate.
Bootstrap​
Next, you can bootstrap HashStore by running the following command:
hashstore/bin/scalardl-hashstore bootstrap --properties client.properties
The bootstrap command internally registers identity information (a certificate or secret) and predefined contracts necessary to use HashStore.