62 lines
2.9 KiB
Markdown
62 lines
2.9 KiB
Markdown
# INDIGO DEMO command line tool
|
|
|
|
This demo shows how to connect to the private Universa network, check the contract ID for network approval,
|
|
load binary contract file, show some of its information and check its network status.
|
|
|
|
## Some details
|
|
|
|
File [indigo_demo_2025.json](src/main/resources/topologies/indigo_demo_2025.json)
|
|
contains actual private network configuration.
|
|
|
|
[Main.kt](src/main/kotlin/Main.kt) is a simple CLI tool that does it all.
|
|
|
|
Source [Uni.kt](src/main/kotlin/Uni.kt) contains a simple connection pool for universa
|
|
clients to run in parallel with coroutines.
|
|
|
|
## Contract IDs and Files
|
|
|
|
When using INDIGO demo, see [History](https://indigo.8-rays.dev/operations). In the
|
|
operations history you can see contracts binary and in text form (some key fields for the demo).
|
|
|
|
You can also copy the contract ID (click on it in the `contract` line) or download its binary.
|
|
|
|
Both can be used with this tool to show and check network status.
|
|
|
|
## Important note on contract approval states
|
|
|
|
Contracts, taken from the INDIGO, are not necessarily approved. For example, when you transfer funds, or pay invoices, some of the coin contracts will be modified, so old versions, presented in the logs, will not be approved anymore. This is quite normal and is a core feature of the Universa network.
|
|
|
|
## Usage sample
|
|
|
|
If you have binary distribution built with gradle task `./gradlew installDist`, you can
|
|
run it from a console. Alternatively, you can download, unpack and run the same the prebuilt demo: [indigo_demo_sample.zip](prebuilt_demo/indigo_demo_sample.zip).
|
|
|
|
```
|
|
build/install/indigo_demo_sample/bin/indigo_demo_sample -c test_contracts/indigo_2025-04-14T20-22-45.962Z.unicon
|
|
|
|
INDIGO sample console tool
|
|
|
|
Connecting to Universa network...
|
|
Connected. Here is the list of nodes:
|
|
http://31.41.155.11:8080 or https://31.41.155.11: J4ePqUDVy9Tj2n5pV9UCMxR1qhxS7eHMbUNzRXA6SEcwRF6kSNf5j1mDV9gbVnrk41Lwy2FY
|
|
http://37.9.5.102:8080 or https://37.9.5.102: JCi984dnqdgGq3YkYgLqbQKciMRqVhaE5hLSBi8vcfsNKw2KTR63ATCSfokBZ46wLT13PYag
|
|
http://37.9.4.133:8080 or https://37.9.4.133: J2ryG4uxnZxDUUoE8fz1ioPsdWcbwMkUMcZju6ZTpSTFJjF11Kd1Wn23DRrREbgxRNjq13BK
|
|
http://37.9.4.137:8080 or https://37.9.4.137: JfcHBZ4Wicj4t9YuTZDsKXsGGWstTgpftt7fnrWiro2hchNy2F9sHLT4x6RWDs8Hrh5EZyAq
|
|
|
|
Loaded contract: A0tD/Zc3QZ/hxfAESHb4C+Mzsd6VWRqVh4SMouplq7WfH9qUaaDZwgFS4DdVglhu4ks2raGPWYcgfsPfkxyg4i3sm9wiDIiR/VnwQ8v6GqeVVED6TOp8kSERpJFyCYRK
|
|
Definition ----------------------------------------------
|
|
Created : 2025-04-05T02:24:48+03:00[Europe/Moscow]
|
|
Expires : 2030-04-05T02:24:48+03:00[Europe/Moscow]
|
|
Ext.type : null
|
|
Definition: {short_currency=TINDIGO, name=IndigoTest, description=Indigo test token, currency=TINDIGO}
|
|
State ---------------------------------------------------
|
|
Revision : 1
|
|
Branch : null/0
|
|
State data : {amount=5.0E+2}
|
|
Transactional -------------------------------------------
|
|
data: {}
|
|
|
|
Checking contract Id: A0tD/Zc3…: Rejected
|
|
```
|
|
|
|
See above for the actual contracts. |