Skip to main content
European CommissionEBSI European Blockchain

Variables

Commands for managing variables and viewing stored data.

set <var> <value>

Command to set a variable. Use it to load different JWTs in the CLI. You can also store the results when calling the different APIs.

Parameters:

  • var: Variable name
  • value: Value to store

Examples:

# Store a JWT token
set token1 eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...

# Store a random ID
r: compute randomID

# Store the keys and DID of the current user
set myUser user

# Store user data
set userData {"name": "John Doe", "email": "john@example.com"}

# Store API response
apiResponse: tir get /issuers

Common Use Cases:

  • Token Management: Store access tokens for different APIs
  • Data Persistence: Save intermediate results between commands
  • Configuration: Store user preferences and settings
  • API Responses: Cache API responses for later use

view <id>

Command to view the data stored in the internal variables.

Parameters:

  • id: ID of the variable

Examples:

# View current JWT token
view token

# View current user information
view user

# View latest transaction information
view transactionInfo

# View specific user properties
view user.did
view user.keys.ES256.publicKeyJwk

Available Variables:

  • token: Current JWT token used in API headers
  • user: Current user information and keys
  • transactionInfo: Information about the most recent transaction
  • domain: Current domain
  • didUrl: Current DID registry API URL
  • timestampUrl: Current timestamp API URL
  • tntUrl: Current track and trace API URL
  • tirUrl: Current trusted issuers registry API URL
  • tprUrl: Current trusted policies registry API URL
  • tsrUrl: Current trusted schemas registry API URL
  • Custom variables: Any variables you've created with set command