yaqmar. Back to Yaqmar

THE LANGUAGE GUIDE · VERSION 1

A small language.
A precise definition.

YaqmarScript describes a token on the Yaqmar chain: its name, symbol, supply, precision, and receiving address. This page covers everything the current language supports.

Version 1 is a declarative data language. It has no executable commands, functions, or general-purpose programming features. The examples below are for reading; nothing on this page runs or submits them.

01 / START HERE

Your first declaration

Start with token, put the token name in double quotes, then place the four required fields inside braces.

token "Lunar Garden" {
  symbol "LUNA";
  supply 1000000;
  decimals 8;
  owner "yq10000000000000000000000000000000000000000";
}

This describes 1,000,000 whole LUNA tokens, with up to eight decimal places. The owner address receives the initial supply when a token request is approved.

Illustrative address only. Every example uses the syntactically valid address yq10000000000000000000000000000000000000000. It is a placeholder, not a verified receiving account. Use an address you control in an actual declaration.

02 / THE COMPLETE FIELD REFERENCE

Five values. No hidden defaults.

The name follows token. The other four fields must each appear exactly once inside the braces. None is optional.

All values supported by YaqmarScript v1
ValueHow to write itExact rules
Nametoken "Lunar Garden"A double-quoted string containing 1–80 Unicode code points after escape decoding. No leading or trailing whitespace. Control characters, formatting characters, and unpaired surrogate characters are rejected. Internal ordinary spaces and visible Unicode letters, punctuation, and emoji are allowed.
symbolsymbol "LUNA";A double-quoted string of 2–10 characters: uppercase ASCII letters A–Z and digits 0–9. The first character must be a letter. Lowercase letters, spaces, underscores, and one-letter symbols are rejected.
supplysupply 1000000;An unquoted whole-token integer from 1 through 1000000000000000000 (1018), inclusive. No leading zeroes, sign, separators, decimal point, or exponent.
decimalsdecimals 8;An unquoted integer from 0 through 18, inclusive. 0 is valid; 00 and 08 are not. This sets the number of fractional decimal places, not extra whole tokens.
ownerowner "yq1…";A double-quoted Yaqmar address: the exact lowercase prefix yq1, followed by exactly 40 lowercase hexadecimal characters (0–9, a–f). Total length: 43 ASCII characters. The ellipsis shown here is explanatory and is not accepted in a declaration.

Validation checks an address’s format. It does not prove that someone controls its key. A token’s owner identifies the recipient of its initial supply; this field does not define minting, freezing, or other executable privileges.

03 / EXACT AMOUNTS

Supply and decimals work together

supply is always a number of whole tokens. The ledger stores integer base units:

base units = supply × 10decimals

  • supply 100; with decimals 0; means 100 indivisible tokens and 100 base units.
  • supply 100; with decimals 2; means 100 whole tokens and 10,000 base units. The smallest unit is 0.01 token.
  • supply 1000000; with decimals 8; means 1,000,000 whole tokens and 100,000,000,000,000 base units.

The language parses supply as an exact integer string. It does not use floating-point rounding for supply. Write all its digits: 1000000, not 1e6 or 1,000,000. Decimals can reach 18; the maximum base-unit supply is 1036 when both limits are used.

04 / STRUCTURE

Order is flexible. Punctuation is exact.

  • One source document contains exactly one declaration.
  • The keyword must be lowercase token. Field names must be lowercase symbol, supply, decimals, and owner. Keywords and fields are case-sensitive.
  • The name must immediately follow the token keyword as a quoted value, with whitespace or comments allowed between them.
  • The four fields may appear in any order, but each is required exactly once. Unknown or duplicate fields are rejected.
  • Every field ends with a semicolon ;, including the last field before }.
  • Use braces { }. Do not insert colons, equals signs, or commas between a field and its value.
  • Do not put a semicolon after the closing }. After it, only whitespace or comments are allowed.

The standard formatted representation orders the fields as symbol, supply, decimals, then owner. Reordering fields does not change their values.

05 / QUOTED TEXT

Double quotes, with JSON escapes

Name, symbol, and owner values use straight double quotes ". Single quotes and backticks are not string delimiters. Quoted text follows JSON string syntax:

Recognized escapes and their decoded meanings
EscapeMeaningUse in token fields
\"Double quoteAllowed in a name. Not allowed by the symbol or address character rules.
\\BackslashAllowed in a name. Not allowed in a symbol or address.
\/Forward slashAllowed in a name. A plain / inside a string also works.
\uXXXXOne UTF-16 code unit written as four hexadecimal digitsThe decoded character must satisfy its field’s rules. A valid surrogate pair, such as \uD83C\uDF19, represents 🌙 and is allowed in a name. An unpaired surrogate is rejected.
\b, \f, \n, \r, \tBackspace, form feed, newline, carriage return, tabThese are recognized JSON escapes, but their decoded control characters are rejected in every current field.

Do not put an unescaped control character, such as a literal newline or tab, inside a quoted string. Escapes such as \x41, \u{41}, \v, and \' are not JSON escapes and are rejected.

The field rules apply after decoding. For example, symbol "\u004CUNA"; means LUNA and is valid; symbol "\u006CUNA"; starts with lowercase l and is invalid. Escapes cannot bypass length, case, address, or control-character restrictions.

Visible Unicode can be written directly in a name. Its 80-character limit counts Unicode code points, so a combined visual character can count as more than one. The parser preserves decoded text; it does not normalize spelling or Unicode.

06 / READABILITY

Whitespace and line comments

Spaces, tabs, and line breaks are ignored outside strings. Indentation is for readability; it is not syntax. Whitespace recognized by JavaScript’s \s rule is accepted between tokens.

// starts a comment outside a quoted string. The comment continues until a line-feed newline (LF) or the end of the document. Standard LF and CRLF line endings work. A carriage return by itself does not end a comment. Block comments such as /* … */ and # comments are not supported.

A comment can appear before the declaration, between tokens, after a field, or after the closing brace. Inside quotes, // is ordinary text. Keep a separator between words and numbers that would otherwise merge: supply 100; is valid, while supply100; is not.

// Fields can be written in any order.
token "Community / Garden" {
  owner "yq10000000000000000000000000000000000000000";
  decimals 0; // Whole tokens only.
  supply 250;
  symbol "CG25";
} // A final comment is allowed.

07 / READ-ONLY EXAMPLES

The same small language, different definitions

A name with Unicode and quoted text

token "Lune \"قمر\" / \uD83C\uDF19" {
  symbol "MOON";
  supply 1000;
  decimals 2;
  owner "yq10000000000000000000000000000000000000000";
}

The decoded name is Lune "قمر" / 🌙. It is text, not executable code.

The maximum supply and precision

token "Precision Example" {
  symbol "PRECISION";
  supply 1000000000000000000;
  decimals 18;
  owner "yq10000000000000000000000000000000000000000";
}

This is 1018 whole tokens stored as 1036 base units. The large number is an exact integer, not an estimate.

A compact declaration

token "One Token" { symbol "ONE"; supply 1; decimals 0; owner "yq10000000000000000000000000000000000000000"; }

Line breaks are optional. The required quotes, braces, field separators, and semicolons remain.

08 / LIMITS AND COMMON ERRORS

What the parser rejects

  • Empty input or more than 8,192 UTF-8 bytes. The whole source counts, including spaces and comments. Unicode characters may use several bytes. Whitespace-only and comment-only input also fail because a declaration is required.
  • Missing, repeated, or additional fields. There are exactly four fields inside the braces; no description, fee, permissions, or extra name field.
  • Noncanonical numbers. 01, +1, -1, 1.0, 1e3, 1_000, 1,000, 0x10, and quoted numbers are rejected. Use ASCII digits only.
  • Out-of-range values. Supply cannot be zero or exceed 1018; decimals cannot exceed 18. Numeric tokens cannot exceed 19 digits.
  • A missing field semicolon or an extra final semicolon. Put ; after each field, never after the closing brace.
  • Code or another declaration after the first. Only trailing whitespace and line comments are allowed.
  • Invalid quoted text or addresses. Strings must decode as JSON and meet their field’s character and length rules.

The tokenizer also rejects source exceeding 32 lexical tokens, excluding whitespace and comments. An ordinary complete declaration uses 16 tokens: each keyword, quoted value, number, brace, or semicolon is one token. This defensive bound does not reduce the supported four-field syntax.

Common messages include “Each token field must appear exactly once”, “Use canonical whole numbers without leading zeroes”, and “Only one token declaration is allowed.” An invalid definition creates no token.

09 / GRAMMAR

The whole structure at a glance

This compact grammar describes structure. The field rules and limits above also apply. The four field definitions inside braces are a permutation: each appears exactly once in any order.

declaration = "token" json-string "{" fields "}" end-of-input
fields      = each of symbol-field, supply-field,
              decimals-field, owner-field, in any order
symbol-field   = "symbol"   json-string ";"
supply-field   = "supply"   integer     ";"
decimals-field = "decimals" integer     ";"
owner-field    = "owner"    json-string ";"
integer     = "0" | nonzero-ascii-digit { ascii-digit }
json-string = a double-quoted JSON string
trivia      = whitespace | "//" text-through-LF-or-end

Trivia can separate tokens and can appear at the beginning or end. The end-of-input marker is descriptive; do not write it in your source. The grammar is not itself a token declaration.

10 / VERSION 1 BOUNDARY

A definition, not a running program

The current language has one job: describe a token. It does not support variables, assignments, arithmetic expressions, conditionals, loops, functions, imports, modules, network calls, JavaScript execution, or user-written smart-contract logic.

A declaration does not execute a transfer, mint additional tokens, burn tokens, freeze balances, change permissions, or automatically deploy anything. A separately approved token request creates the token and assigns its initial supply. Reading or copying this guide performs no request.

Yaqmar is an experimental network with one validator. This reference describes the implemented YaqmarScript v1, not future language features.

Back to the top