IL2 Assets Simulator

### What is IL2 Assets Simulator **IL2 Assets Simulator** or **il2-assets-sim** is a small, easy to deploy simulator of the whole **IL2 Assets** ecosystem. > It is designed to be the ideal tool for learning, research, development and prototyping of new applications based on **IL2 Assets**.
### Features - Simulates all operations rules and restrictions; - Exposes exact the same API of the actual IL2 Assets; - Easy to deploy and redeploy whenever necessary - Comes as as stand alone all-in-one program for Windows and Linux; - Can be easily replaced by the real **IL2 Assets** at any time;
### Limitations - No real integration with the real IL2 Network; - No security and immutability provided by IL2; - No clustering support; - No support for heavy loads;

Before you start

  • To fully understand this presentation, you need to have:
    • Basic knownledge about RESTful WebServices;
    • Basic knownledge about Windows or Linux operation;
    • Basic knowledge about the IL2 Assets application, see Introduction to IL2 Assets for further information;

How to get the simulator

Download the current version of the simulator from:

il2-assets-sim-0.1.1-20230102.zip

It has 18,610,109 bytes and its sha256sum is:

b60310621cc4fde5c7f417348f77adc1
8673b8e9cf021455bac06cef8ae686de

### Installation 1. Create a directory where the simulator will be located (e.g.: `c:\app\il2-assets-sim`); 2. Decompress the installation file; 3. Go to the subdirectory platform/arch (e.g: windows/amd64); 4. Copy the all files from this directory into the installation directory;
### Initialization 1. Open a terminal/command prompt inside the installation directory; 2. Run the command `il2-assets-sim config` to generate the initial configuration file; 3. Run the command `il2-assets-sim init` to initialize the system; 4. Run the command `il2-assets-sim apikey -f -k admin` to create the first admin APIKey; For more details about each step, press the **down key**.

The configuration file

Create the initial configuration file with:


il2-assets-sim config

It will generate a default config.json file with the required parameters to run the application. Edit it before the initialization if you need to change the binding address or the location of the database files and logs.

The initialization

Initialize the application with:


il2-assets-sim init

It will output the ID of the definition node and the id of the definition chain.


Initializing the application...Done!
Asset definition node: d0Mn2KeaDTsos6KZE8YQ17DLP2P1s0-rxXBQR7G4PqM
Asset definition chain: h0bd_32ZfsVg1tLOtO_rxkk4Q261fvHAiBmvP8-AW-Y

On the real IL2 Assets those IDs defines all assets compatible with this assets ecosystem.

Initial admin APIKey

Create a new admin APIKey with:


il2-assets-sim apikey -f -k admin

It will output the key value required to authenticate:


The key for admin is hVxp60sKIx1N4LocEf1FplpuAnSwVPNjo73iTjdBHX0

The value of the key will never be displayed again so keep it safe. Running the same command again will generate a new key value that replaces the old one.

Command line help

You can get the on-line help with the option -h:


il2-assets-sim -h

For more information about a command, use <command> -h:


il2-assets-sim apikey -h

Starting the service

Start the service by running:


il2-assets-sim run

The server will be available, by default at:

http://localhost:8080/

IL2 Assets Simulator API Screen

### Stopping the server - To stop the service once it is running, just send a termination signal to it by: - Press Ctrl+C on the terminal it is running; - Executing: `kill <PID>` (linux); - Executing: `taskkill /pid <PID>` (windows); - Using a task manager application;

Using the API

If you need more information about the API, go to the following presentation:

IL2 Assets API Basics

IL2 Assets Simulator

https://interlockledger.network/