Skip to content
BountiesProductsAgentsLedgerDocs
Bounties
barcode / barcode-qr-decodeOpenRuns on Liberas

QR Code decoding

Decodes a QR Code Model 2 symbol (ISO/IEC 18004:2015) written as barcode-qr-matrix writes one (rows top to bottom, '1' dark, '0' light, no quiet zone) to its data, bytes (base64 in JSON). rows must be size strings of size modules, only 0 and 1, size = 4 · v + 17 for a version v of 1–40; else an error. Every reading choice is fixed. The version is v; finders, separators, timing, alignment, the dark module and version information are not read. Format: of the 32 format words (level and mask, BCH-coded, XOR 0x5412) the one nearest (Hamming) to either copy is taken; nearest over 3, or two words equally near, is an error. Data modules are read in the standard's placement order and unmasked, remainder bits dropped, the codewords de-interleaved into the version's blocks. Each block is corrected to the codeword within t errors of it, t = ⌊(e − p) / 2⌋ for its e check codewords and misdecode protection p (3 at 1-L; 2 at 1-M, 2-L; 1 at 1-Q, 1-H, 3-L; else 0); Reed–Solomon over GF(256), 0x11D, generator roots α^0 … α^(e − 1); no codeword within t is an error. The data codewords are then read as segments until a 0000 mode or fewer than 4 bits remain: numeric 0001 (3, 2, 1 digits in 10, 7, 4 bits → ASCII; a value too large is an error), alphanumeric 0010 (pairs 45a + b in 11 bits, a last one in 6 → ASCII of 0–9 A–Z space $ % * + - . / :; too large is an error), byte 0100 (the bytes), kanji 1000 (13-bit x → w = ⌊x / 192⌋ · 256 + x mod 192, plus 0x8140 if w < 0x1F00 else 0xC140, its two bytes high first), ECI 0111 (designator of 1, 2 or 3 bytes by prefix 0, 10, 110 skipped, 111 an error; bytes not converted). Counts for versions 1–9, 10–26, 27–40: numeric 10/12/14, alphanumeric 9/11/13, byte 8/16/16, kanji 8/10/12 bits. Another mode (structured append, FNC1, reserved) or a segment past the end is an error. The output is the segments' bytes in order.

From your terminal

terminal
npm i -g https://liberas.dev/cli/liberas.tgz
export LIBERAS_URL=https://liberas.dev
liberas init barcode-qr-decode --lang rust
cd barcode-qr-decode && liberas build && liberas submit

Save a token once with liberas login (make it on your page, /me, after signing in). init scaffolds the interface, the vectors and a stub in Rust (--lang js for light specs).

Interface (WIT)11 lines›
barcode-qr-decode.wit
package root:component;

world root {
  export liberas:barcode/qr-decode@0.1.0;
}
package liberas:barcode@0.1.0 {
  interface qr-decode {
    decode: func(rows: list<string>) -> result<list<u8>, string>;
  }
}
Test vectors26›
barcode-qr-decode.cases.json
[
  {
    "args": {
      "rows": [
        "111111100101101111111",
        "100000100111101000001",
        "101110101000001011101",
        "101110101100001011101",
        "101110101011101011101",
        "100000101000101000001",
        "111111101010101111111",
        "000000001001100000000",
        "101111100100101111100",
        "000101011010100101100",
        "001000110101010011111",
        "000010000100000111100",
        "000111111001010010000",
        "000000001011111001100",
        "111111100110101100000",
        "100000101011111000101",
        "101110101000100101100",
        "101110101100100100000",
        "101110101011010010100",
        "100000100000000110110",
        "111111101111010010100"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101100001111111",
        "100000101001001000001",
        "101110101001101011101",
        "101110101000001011101",
        "101110101010001011101",
        "100000100010001000001",
        "111111101010101111111",
        "000000001000000000000",
        "011010110000101011111",
        "010000001111000010001",
        "001101110110001011000",
        "011011010011010101110",
        "100010101011101110101",
        "000000001101001000101",
        "111111101010000101100",
        "100000100101101101000",
        "101110101010001111111",
        "101110100101010100010",
        "101110101001011101001",
        "100000101011110001011",
        "111111100001011100001"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100101101111111",
        "100000100111001000001",
        "101110101101101011101",
        "101110100101001011101",
        "101110100010101011101",
        "100000100000101000001",
        "111111101010101111111",
        "000000001101100000000",
        "111011111111011000100",
        "011110010100001000100",
        "101101111110100010001",
        "000101010010001000100",
        "000000101100101010101",
        "000000001011010101010",
        "111111101011011101110",
        "100000101101110111011",
        "101110101001011101110",
        "101110100110001000110",
        "101110101110100010001",
        "100000101000001000110",
        "111111101110101010101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "1111111011101001101111111",
        "1000001010101110101000001",
        "1011101001111111001011101",
        "1011101011110000001011101",
        "1011101011011110101011101",
        "1000001011010100001000001",
        "1111111010101010101111111",
        "0000000000001000000000000",
        "0001001001101010000111011",
        "0101000000000110000101100",
        "1100101010011010011011010",
        "0011000111001010110010001",
        "1100111101000100101011110",
        "0001100100100001011001000",
        "1011001001111111111011110",
        "0100100010000010110100110",
        "1110001111010001111110001",
        "0000000011111110100010100",
        "1111111000111010101010011",
        "1000001000001101100011011",
        "1011101001111000111110010",
        "1011101011011000010101100",
        "1011101000000010001111101",
        "1000001000011111011111111",
        "1111111001010001000000111"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "1111111001010111011011011110001111111",
        "1000001010100100110110001111001000001",
        "1011101001001111000011000011101011101",
        "1011101000110110000010011001001011101",
        "1011101000110011111100010101101011101",
        "1000001011001011001111111110101000001",
        "1111111010101010101010101010101111111",
        "0000000011100101010011000011100000000",
        "0000111101101000000001000110001100010",
        "1000100111011010001000110100111111100",
        "1010001110101000010100111110101101011",
        "0101010000100101011010010000001000011",
        "1011001110010110100110101101001110000",
        "0011110101000010010111110110110111100",
        "1001101101101000111010011000110001100",
        "0110100101001110000010001000011001010",
        "0011011100100011111101101011011000110",
        "1010110001000011110101111001000010101",
        "1101001100111010111110010111001100110",
        "1110010101000010100110010100111100100",
        "1000111011010110110100010100010000101",
        "0000100100001000010110100011001110111",
        "0111101000000100101011000111001001110",
        "0101000110010010000001101101011001100",
        "0011101110011011111100111100110110001",
        "1000100010000010100110000110001000000",
        "0000011110110101000001000011000010101",
        "0010110000100111010110101001111111101",
        "1101001111010110111100111110111111010",
        "0000000010101001011001000111100011001",
        "1111111010110101001011100111101011000",
        "1000001010100010000010001101100011110",
        "1011101010100110011001110100111110100",
        "1011101000000000000101101111001110001",
        "1011101000110100000011111001110001010",
        "1000001001101001001111010010010000100",
        "1111111000010000110000100111011110101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101010101100110011001111111",
        "100000100001111101110111001000001",
        "101110101111101000100010001011101",
        "101110100010101110111011101011101",
        "101110100110011111111111101011101",
        "100000101111100010001000101000001",
        "111111101010101010101010101111111",
        "000000000101001000100010000000000",
        "101000110100011101110111100100101",
        "000101000010101000100010000100000",
        "111110111111111101110111100111100",
        "000011001111101000100010001000001",
        "111010101111011111111111100010000",
        "110000010011001011101110100000000",
        "000101100101110010001000100010101",
        "001011001111111111011101101000011",
        "111101101101110011001100111110111",
        "001010001001111011001100101111010",
        "110000101100001010001001111001111",
        "101100011010010111011100110101010",
        "111000101110111001000101011110111",
        "001100011100000000000000010111100",
        "110001101100110101110111011101010",
        "001101000111011000100010000111111",
        "110010111110101101110111111111111",
        "000000001011110000100010100011000",
        "111111101111111101110111101011100",
        "100000100100011000100010100010001",
        "101110100110000111111111111110000",
        "101110100101111011101110000100000",
        "101110101011011010001001101100110",
        "100000100101000111011100011000011",
        "111111101011110011001100010010101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "11111110011101110010001111111",
        "10000010000110010100001000001",
        "10111010011100101000101011101",
        "10111010101100110100001011101",
        "10111010101011110001101011101",
        "10000010011001101110101000001",
        "11111110101010101010101111111",
        "00000000010011000011000000000",
        "11000111011010110100100011000",
        "11001100001000100011010110110",
        "00101111110110000000110110000",
        "10000001101100111001101111000",
        "10001111111001101010101100001",
        "00100100111011100111001110011",
        "11000110011001111100010001100",
        "00011000101011100001011010101",
        "11010111011010110100100001100",
        "10000000001000011011111110111",
        "11101010001011111011011011001",
        "10100100011100101010111000000",
        "10000011101100010100111110111",
        "00000000111011010010100011000",
        "11111110100001111011101011100",
        "10000010100011011001100010010",
        "10111010011111001001111111011",
        "10111010011000011000000001101",
        "10111010000110011111011111110",
        "10000010110100011010010011101",
        "11111110100100010101011100100"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "11111110011101110010001111111",
        "10000010000110010100001000001",
        "10111010011100101000101011101",
        "10111010101100110100001011101",
        "10111010101011110001101011101",
        "10000010011001101110101000001",
        "11111110101010101010101111111",
        "00000000010011000011000000000",
        "11000111011010110100100011000",
        "11001100001000100011010110110",
        "00101111110110000000110110000",
        "10000001101100111001101111000",
        "10001111111001101010001100001",
        "10100100101010100110101110011",
        "00000110000000011101110001100",
        "11011000110010000000111010101",
        "00010111000011011101100001100",
        "11000000000000100011111110111",
        "11101010001011100011011011001",
        "10100100011100110010111000000",
        "10000011101100000100111110111",
        "00000000111011010010100011000",
        "11111110100001111011101011100",
        "10000010100011011001100010010",
        "10111010011111001001111111011",
        "10111010011000011000000000010",
        "10111010000110011111011110001",
        "10000010110100011010010010010",
        "11111110100100010101011101011"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101000101111111",
        "100000100010101000001",
        "101110100001101011101",
        "101110100010101011101",
        "101110100101101011101",
        "100000100110001000001",
        "111111101010101111111",
        "000000001000000000000",
        "110110100011001000001",
        "101011011011110011100",
        "000100100011100101011",
        "001010001000111101000",
        "111000101011111110100",
        "000000001010111110111",
        "111111100001000010000",
        "100000100110001111110",
        "101110101110011101011",
        "101110101010100000100",
        "101110100101101010111",
        "100000101101111011111",
        "111111101110101111000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101110101111111",
        "100000100100101000001",
        "101110100111101011101",
        "101110100100101011101",
        "101110100101101011101",
        "100000100110001000001",
        "111111101010101111111",
        "000000001000000000000",
        "110110100011001000001",
        "101011011011110011100",
        "000100100011100101011",
        "001010001000111101000",
        "111000101011111110100",
        "000000001010111110111",
        "111111100001000010000",
        "100000100110001111110",
        "101110101110011101011",
        "101110101010100000100",
        "101110100101101010111",
        "100000101101111011111",
        "111111101110101111000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100111011011100001010101011001101101000011001111111",
        "100000100011101111010011101110000111110100011001001000001",
        "101110100001011100101011100001011011000111100011001011101",
        "101110101010001011110101111000000100001101001101001011101",
        "101110100110100111111000001111100011000001100001001011101",
        "100000101011100001100110111000100100100001100010001000001",
        "111111101010101010101010101010101010101010101010101111111",
        "000000001011001101001001111000101111011001111111100000000",
        "011000100100001100110101001111101101110001111100001101000",
        "010011011000110000000100110101101101011010110111101000100",
        "100110101010000110011111100110000101111000011101100001011",
        "100101000000000101111011010110110111011110111110001110111",
        "110110101111111111111110101110101111111010111001001111011",
        "010100011010010001001001100100011011011000110011001100010",
        "111001100100100001110111011111000011100111011110010110100",
        "100101010100100000010000011011101000010001001000010110110",
        "111110111100001111011010100000100110101010101010101110101",
        "110100010001011000001101111100111001110001111000111100001",
        "010001110000100000111111000010001111101000111000101110110",
        "111100000110100001000000010011101110011001110110000110010",
        "011101111001101011111010110100100100010111010111000110010",
        "101001010111011100111101111110111110110111110010100100011",
        "011101100110010100001010011110001110010001011001011110100",
        "001110001010010110001000010110111111111101101010101110011",
        "010010110010101011101111001111001100111111010011110100010",
        "101110010011101001000011010000001110001101101010001110001",
        "011011111000001000100111111111101111101111010100111111100",
        "100010001001010101101001101000100000011100100101100011101",
        "111110101110101000110110101010101110100111011011101010000",
        "001110001010110010010110011000101100000100111110100010001",
        "000011111111111110111100011111100000011111011010111110000",
        "100111001100111001000001001111000110011010010000101000101",
        "101010100010111111010110010010010101111010100000000000000",
        "011110001100110100010010110000111111110010110000101111100",
        "110100111111111010111001110100010110011000101111000110010",
        "101100000100111011000010011110100001000100001001001000111",
        "010101101010010111000110001101010001001010010011000101100",
        "001111001100010000010101111011101100000101010000001100011",
        "010110110011000101010010010101110110001011010001000000110",
        "010110011001111101010001001001101100000110001001001000011",
        "010101101111101001011000000111100100001001100011011010011",
        "011101001010011101001011010000111100100001101000011011111",
        "010111110000000101100101001010001010001000000001001011100",
        "010101011001001100110001100010011010011010001001001000100",
        "011000100011010101110000001111000100010110000010111100011",
        "011110001011101001100011000100010000111010101010100010101",
        "101001110010101111000010111100000100011100000010000100101",
        "111110000101101101101111010001000111000101111001011010111",
        "000000101100011100110110011111100100100010011001111111011",
        "000000001101000000111011001000101111010010110101100011110",
        "111111100000101110100010101010100110111011111101101011010",
        "100000100000101101001111011000100001110000000000100011110",
        "101110100111111111100110001111100010010010110111111111011",
        "101110100100000110001010111000001000010110011110000001101",
        "101110101111010101110010000011100010001110000001000111000",
        "100000101101110011110110000010010000101110011001101111110",
        "111111100000010010011101000110111011110110110000000111000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100001101111100100100001101100101111111",
        "100000100101011010111100111001011101001000001",
        "101110101001110010110010101010010001001011101",
        "101110101100101111000001001011111101101011101",
        "101110100011101001011111110011000011101011101",
        "100000100101111010001000110101001100001000001",
        "111111101010101010101010101010101010101111111",
        "000000001000100000001000110100111111000000000",
        "101101110111000000001111111010110000001001011",
        "000000010001001111111010111001010001001001001",
        "101000110111110011001010101001001001110011100",
        "101110010000100011001100110110010101101111101",
        "101110101001100010101101010101111111101100100",
        "110100011110100100010000001101000111010101011",
        "100110110111011101100110000011001011010011010",
        "100000011101101100000101111100011100100100110",
        "011001100000011000111101000111000101011110001",
        "110111001001111110010010001000001011010001110",
        "011110100010000010100001000011111001010010011",
        "101110011001100110010001101100111110110100100",
        "001011111010111010011111100010110000111110001",
        "111110001100000011111000100001010010100010110",
        "000110101100001000111010111001001000101011101",
        "101010001010111100101000110010010011100011000",
        "110111111101111101011111110011111110111111000",
        "101111010010111101001100101011000000100001011",
        "011000100010001100111101000101001111101111010",
        "010001001000011011100110111101010100100100101",
        "110100110111110010100110000111101101110100000",
        "101101001011110000110010001001100010000111110",
        "100000101101100110101101100010100000100000011",
        "111100011000000001001101001101111111110010100",
        "000101100001001000110011000010110001010010001",
        "001110011111010001001000100000110011010010110",
        "000010111011001101111111011000111000001010001",
        "011110011010101011001001101010010010000100000",
        "100110100011101010011111101011111000111111100",
        "000000001011100101111000110011000000100010101",
        "111111101011101110011010110101001110101011001",
        "100000101100000110101000111101010001100010101",
        "101110100010110011101111100001101101111111010",
        "101110101001101111100100101101100011001111110",
        "101110101110100000000101000000100110101100000",
        "100000100010111000101110001101001110010100111",
        "111111101010011111101000000011001000010010010"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100001101111100100100001101100101111111",
        "100000100101011010111100111001011101001000001",
        "101110101001110010110010101010010001001011101",
        "101110100100101111000001001011111101101011101",
        "101110100011101001011111110011000011101011101",
        "100000100101111010001000110101001100001000001",
        "111111101010101010101010101010101010101111111",
        "000000001000100000001000110100111111000000000",
        "101101110111000000001111111010110000001000100",
        "000000010001001111111010111001010001001001001",
        "101000110111110011001010101001001001110011100",
        "101110010000100011001100110110010101101111101",
        "101110101001100010101101010101111111101100100",
        "110100011110100100010000001101000111010101011",
        "100110110111011101100110000011001011010011010",
        "100000011101101100000101111100011100100100110",
        "011001100000011000111101000111000101011110001",
        "110111001001111110010010001000001011010001110",
        "011110100010000010100001000011111001010010011",
        "101110011001100110010001101100111110110100100",
        "001011111010111010011111100010110000111110001",
        "111110001100000011111000100001010010100010110",
        "000110101100001000111010111001001000101011101",
        "101010001010111100101000110010010011100011000",
        "110111111101111101011111110011111110111111000",
        "101111010010111101001100101011000000100001011",
        "011000100010001100111101000101001111101111010",
        "010001001000011011100110111101010100100100101",
        "110100110111110010100110000111101101110100000",
        "101101001011110000110010001001100010000111110",
        "100000101101100110101101100010100000100000011",
        "111100011000000001001101001101111111110010100",
        "000101100001001000110011000010110001010010001",
        "001110011111010001001000100000110011010010110",
        "000010111011001101111111011000111000001010001",
        "011110011010101011001001101010010010000100000",
        "100110100011101010011111101011111000111111100",
        "000000001011100101111000110011000000100010101",
        "111111101011101110011010110101001110101011001",
        "100000101100000110101000111101010001100010101",
        "101110100010110011101111100001101101111111010",
        "101110101001101111100100101101100011001111110",
        "101110101110100000000101000000100110101100000",
        "100000100010111000101110001101001110010100111",
        "111111101010011111101000000011001000010010010"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "011111101001101111100100100001101100101111110",
        "100000101101011010111100111001011101001000001",
        "101110100001110010110010101010010001001011101",
        "101010101100101111000001001011111101101011101",
        "101110100011101001011111110011000011101011101",
        "100000100101111010001000110101001110001000001",
        "111111101010101010101010101010101010101111111",
        "000000001000100000001000110100111111000000000",
        "101101110111000000001111111010110000001001011",
        "000000010001001111111010111001010001001001001",
        "101000110111110011001010101001001001110011100",
        "101110010000100011001100110110010101101111101",
        "101110101001100010101101010101111111101100100",
        "110100011110100100010000001101000111010101011",
        "100110110111011101100110000011001011010011010",
        "100000011101101100000101111100011100100100110",
        "011001100000011000111101000111000101011110001",
        "110111001001111110010010001000001011010001110",
        "011110100010000010100001000011111001010010011",
        "101110011001100110010001101100111110110100100",
        "001011111010111010011111100010110000111110001",
        "111110001100000011111000100001010010100010110",
        "000110101100001000111010111001001000101011101",
        "101010001010111100101000110010010011100011000",
        "110111111101111101011111110011111110111111000",
        "101111010010111101001100101011000000100001011",
        "011000100010001100111101000101001111101111010",
        "010001001000011011100110111101010100100100101",
        "110100110111110010100110000111101101110100000",
        "101101001011110000110010001001100010000111110",
        "100000101101100110101101100010100000100000011",
        "111100011000000001001101001101111111110010100",
        "000101100001001000110011000010110001010010001",
        "001110011111010001001000100000110011010010110",
        "100010111011001101111111011000111000001010001",
        "011110011010101011001001101010010010000100000",
        "100110100011101010011111101011111000111111100",
        "000000001011100101111000110011000000100010101",
        "111111101011101110011010110101001110101011001",
        "100000101100000110101000111101010001100010101",
        "101110100010110011101111100001101101111111010",
        "101110101001101111100100101101100011001111110",
        "101110101110100000000101000000100110101100000",
        "100000100010111000101110001101001110010100111",
        "011111101010011111101000000011001000010010010"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "11111110100100101011000111100101110010011001011010111111001111000100010001000000010000000100001110010011101010111001101111111",
        "10000010111110101001110010110110010100001101000101100001000010010100111010010100111110001101100011010011101111100010001000001",
        "10111010111001001001101010001011111111111010000100000100001101011011011101011001011011100010101100001110110110000101001011101",
        "10111010001100111000110001001001011010010100110101000101110000111011110000111101101111010100010001101100001001000000001011101",
        "10111010110101110010011000101000111110010111001100001101011011111010101001110000100111001111111000010101010100001011001011101",
        "10000010011110100101101011001101100011111010001101111000110010001110010110001001001111111000110011101001010111111011001000001",
        "11111110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101111111",
        "00000000000101001000000000111101100011111000001011100011100110001110001100111001110101001000100011000011111011100101000000000",
        "10011111111100011000111011001011111110011000111011001011111011111101100000110100000000011111111111001010000101001011110010111",
        "11110101101001101111010100110001110101110100001111101110111011101001010100010100100100010001011010011110101101101111010001001",
        "00010010000011110100100011010010011111101000011110110111110010110001101011000001101011011001110110101110110110110111001000111",
        "00100100001100000100111111111110000111101111010011010011111111010110000110001100001110010110011001111011110001010010101001111",
        "11100011011001100111100011111101110011001001101010010001011110010110100011101100111011111000100100010001000000010000110111111",
        "01110001000000111101001101110101100000111010010001011000110101011111111010100011110011011001101100111000001011011001101111010",
        "01110110001011111100111000011000110110000111001100101101011000101010100011011011011011010111000110000100000100101100010001010",
        "00001000101100011111001011110100011000101001010110101010011100101111000101110011011101110101001011011010101110101011111010110",
        "11100010001001110101010010000111100111100101001001000111010010100000011101011110001101010000010010111111110101000110101101101",
        "11010000111101000011110111010101110010010000111100101010111111001101011000110001100001010101111111010010011000101011001110011",
        "00111010110010100101101011011010010101100001001000011111111011111001001010000010100000110010111111100111111000011111001010010",
        "11101101101001100111010101010010001000000010111111111110110010111011000011101111100000111101110100110110010111111111100110111",
        "11011011111101010001000101111001110000101101010100110101010010110010101111001100011101101100000000110011100000110100101101100",
        "10000000001001110100000101011100101000110011001000010000111100010110001011111000111100101000100100010111000100010001110011010",
        "10111111111110001011010111110101111010101010110001000001101101000110011110111100110000000010101011000111101001000001011110011",
        "00001001100000110001101010110001111111011101100010001110110000001011011001011011111010101001101110001010001010001110010100101",
        "10001010110000100110011111101111001011101100011001001110010011101001100100010101000111111011000011101110111100101111011111001",
        "10111100101000111000011111111001111110000101000000100110010010100001111101001110001110011000001010100111110100000111000101010",
        "11010111100110001001001011111110110110111100001100111010000111011100000110101100000000110110000011001011011010111011001100011",
        "11100001001000110000011010111010100010001011100011010110010011110010100010101000101011010010101101101111011101010111001101011",
        "10111110011000101010101011110101011001100100101100011001010110111111111010101011110011000111101101000010001101111001100011010",
        "11100001001101011000100001111001101011011000000101010101101001010011010111010010011101101010000000101001100001110100110000011",
        "11111011101111001100011000111100010111000010011110001000111101101111111111101111111011101101100010001000100110001000010000111",
        "01100000011101011110000110011100110000110010011000000011100100100110001100111100010100000110000011100101100100000010011101110",
        "01101111101100011110111000001010111110001000111111001010010111111100001000100101100110111111101111001110011000001010111110011",
        "01111000101001111101010110110000100011001100101011101110110010001000000100001001000100001000110011101100111101001110100011011",
        "00111010110011101000100111110011101010110011000000110111110110101001000011010001101011001010101000110000110111010110101010010",
        "11001000100100011010111111011111100011001111000110010010001110001111110110000110001100011000110001010001111001110011100011111",
        "10111111110001110011100011011101111110101101100100010000101011111110111011111110111101111111101010010011000101110000111111111",
        "00001100110000111111001000010101010010110101001001111001101011110111010010101111110010111101011101011100001100011000000111100",
        "10010010010011111000111101011000000111100111011010001100001010011010111011000011011011000010100100101100100110001100111100000",
        "10100100011100011001001000010100100001111010010000101010111000101111011101110111011111101101110000101100001010101010111100100",
        "01000111010001110011010001000110011111100011010011100111110011101001101101000000010001011010100100100010110011000111010001101",
        "11010100110101010011110011110101000101101010001111101010011001100100100000100101111010101101010111001111111110101011111011111",
        "00110010100010111011101000111011111001111100001001011111110000000000000010000000111000011111100101111100011111000111100011011",
        "00101001111001110111010010110011101100100110101010111110001010010010000011111011110101101011111110111010110101110111001010010",
        "00010010100101011111000110011011001000001111100001010101100001111010011110101010011111001000101100110100000001100101000111011",
        "01000101110001110100000001011001111101111010100000010001001011011110011010000110111001110010011110010100100101100000001010101",
        "10111111110110010011010000010110001000001110110111001001101111010110110111001110110000101001001011000000001011001000110011101",
        "01001100101000111101101110110011000001011010010100101110000101110011111000010011111001001011001110001010001111001110111110000",
        "01001010001000111100011010101110010100101011111010001110110011001111000100001001000010010001111111101101011010111111111010100",
        "01111001010000111100000000111000001100000011100011001111100100011110001101001000001001000100110100100100110010100111010010010",
        "00011010000110000101001101011010011101011001101101010011011100001011000110101100001100111001011111011010011011010011000111111",
        "00100000101100110000001011011111100101101111000010010111010010100111001010101010110100100000111101110111011100010110000011011",
        "11111011000011111100110011110111100101100010101100000000001100110110010011000111101010100001001111011010001100110000101010110",
        "01100001010011110000101101111101011001011110100101010101100110101011111110101010000101010000101110110100100000011100001110001",
        "11111110100011000010001111011111100001000011011110110000100101000111111110101111101111100100001110001011100010101001011110100",
        "00101101000110111100100111011110101110110101011000001011100101001110010100000110011100100100110001100001000010001010110101101",
        "01101110100010011000011010001110010010001010011111010010011101000101100000101101100000110011001111001010111111101010111000000",
        "00110000011001001101101001110101100011001010001011101110111101101001000100001001000100001011110111101111011011000111011101011",
        "01110111111010001000000000110010110100110000100000100110110111110011101011100001100111010010111100110100110110010110101010010",
        "00000100001111010100101001101001000011001100000111011011111011111000001111101110010000000110000001010001011001111010100111111",
        "10111111101010110101110100111010111110101110100100000001000011111000111010001110101101101111111000010001100100010001111111111",
        "00001000111100011101101100011101100010110001001001010000001010001001110011000111111100101000101101011010101101011001100011100",
        "11011010100001100111100011100110101011100010011010111100000010101111011010011011010011001010100000101101100110111101101010000",
        "01101000101001110101001110010010100011111000010000101010101110001101011101010111001101111000110100101101001010101010100010100",
        "00001111101010010101001111100010111111100111010010110001110011111000001100011000010101001111101000100111010010101000111111101",
        "00010001111000101001111101001110111001101010001111010100011101000101100000010101100000111011100001001011111111001101110011111",
        "00110010110100000000100001110101101101111110101001111001111011101010100000001001100010011001011101111111011111110001011111011",
        "01100000100110011001110100010011111100100111001010111010010110110101100011100011110011110000011100111110010100111010000010010",
        "10010111101111110000100000000101110110001010100000111101100011011000011000001011000111011100000100110100111000100100001101011",
        "01001101010010010101111101010001100011111110100000001001000110011000111110101110100011101010100100010001011100010000101000101",
        "10111110001001101011000110000010100110001001110111001001101111011110110100110111010110101111101011000000010011011001100001101",
        "01011101001010110000110010110000011101011000110100010110001100000111111001010011111001000010001110001111111110010110010010000",
        "01110111100000011100010110101101001010101110011011100000111010101011000100010001110100000110011010001110011011100001110110100",
        "01101100010011100101101000100001011100000111100010110101110011001110001000011000110101010110110011000110010010111100011110010",
        "00010110010110100101000101011111001001011001101101000101011100000110000110001101101110111101111110111011011011010001111011111",
        "00001001101100010001111101011100111101101101100011110001011001010110101001101010000010111001011010110111011101110111001011011",
        "11111010000001111100011101110000000011111010101101001000001100000111110000000111100010110001001011011000001101001001100000110",
        "01101001110110110001010001110111010111001000010100111001100111100110011000101010101111010110000110110101110000110000001100001",
        "11110111000101000011110111010101101111001000110010001000100010000101111011011110110111100110000010001001110010001100101000100",
        "00110000100101111100110111011101110000111010001011100001100011011000010111011110111100101111100011100010010011100111111111101",
        "01000011000111011001100010001001101110001110100011001010011010101001100010010101100000100011111110101011100111001101010010000",
        "00100101011001001100111001111100010101100011010101101010111100100101000111110001010100010111011011001111010011101101010111011",
        "01011011111100001001100000101010101101101010011110100100110000101001101111000001101011011001010110010110111110100100010110010",
        "00101101001111110101110001101000011000110111000001001111111001010100001111101110001110010101011001010011111001001011110111111",
        "10000011001101010100011100110011011010101011100010001101000011111010111011101110011011111000100100010001000100001110110001111",
        "00100100111011111101101100001110110010100101111011000100001100111101110000100111110010101011001100011000011101000001111000000",
        "11000011100001100110011011110101001010000100010000101100000100110011011111011011011011001011000111100100010110101100011101100",
        "01001001101101110100000110010010101000001011000000101010101100010101011001110111011101101111001011101010111010101010110111000",
        "00001111101101010101011111111010111111101011011000100011110011111000001001011001001100111111110011000111100010100000111110101",
        "00001000111010001001011101010011100011010111110001001000011110001101100000110101000001011000111111110010001111001100100011110",
        "00001010110101000000010001111011101010111011001101111111111110101000100010001000100011101010111111000111111001111110101011010",
        "01011000100100011000111100001000100011000010101010111110010010001011100001100011000010101000110100111110000100111010100010010",
        "10001111101000110001110000011111111111111111010010110011100111111010011101001100111111011111100000001101100100110001111111010",
        "01110001010111110100111101010100100111011100111110010001000111001110111101101001011011100011100101101001010000010111000010100",
        "10111011101101001011010110010010110000000001100001000011101000101110110010110001110110111011101011111001100001000011001011000",
        "01000000001000110001011010100111101101011111101000001100001010000011111101010110111001010001001110000110001100001010001111100",
        "01011111000101011101001110010001101000011010000001101000111100100001011000010000000100110101111011110110110111101011010111000",
        "01111101110111000101100001001101100111011010011010100111110111100000010101011000001100011101110011110111101010100011110100001",
        "00111111110101100100110101111111001011011111101001011000111100000100011110101100000110111011011011101011010001011001000000111",
        "00010001101110010001110101000001111011100011101001110001111111000010111010101010001011001010011101111111011111110000010101010",
        "00010110000000111100001101011011100101001010101101011100101100001111110010100011010011110011101100001000000011011001111010010",
        "10110101110111110100000000100000001010011000001000110110100011111010011111001001111111111111100001100101111010110001111111111",
        "11110011000010110110001111011011110001110000100100001001000001111111111011111001111110000010000010001000100010001000000010000",
        "00001101100010000101011110001010010001111010000011100101100101110110010010111100010100001100100010100011101011100101111010011",
        "01101011101000111001001010110101011100100110101101001010011010011101101110110111100000011001111110011010011001001001110011101",
        "10000100100100000001101000000100101110110011011011101111011000101001010010010101000101010101011011001110111001101100111100101",
        "10010011111000111111011000010010101110000010011110110110010111101001101011000000101011001111010110110110110110110110101101111",
        "01110100000011011001010101111101011110000111001101010011111111100110010110001001101111110111011000110011110001010000110001101",
        "01001111101001111101000110000010100101000011110110010000100101000110101011101011011010111011000101111001000100010000111011100",
        "11001000001010010000001010110101100110000101111011011001101110010111111010100100010010011010001101010000000101011000001010000",
        "11110011010110001010101100010111001101010100000100101100000101011011000011011101011011000110100110000100001010101100101110001",
        "01010101000011011100010001111011001001010011001000101010001100111111010101110101011100110101101011010010110000101011101010111",
        "10001010000101001010100011101000111001000011000110100110001111110000000101011100001100110100010011000111110000100111101110110",
        "10100101100000110011001101010000011011111111110011001011000100001101110000110111100000110001011111000010011111001011011000110",
        "01001110110001100100010110011011101111010011011111111111100110100000000010001010100010100111111111000111111001111110110101101",
        "10101100101110100010111000110000111011011010100100111110100010001011011011100011100010111010110100011110010100111110000100101",
        "10000010001101010111100011000110111111001111001001010100100011111011110111001010011110111111100000101101100111010101111110000",
        "00000000101011001011000110111100100010011100100101110000000110001111111011101100111011101000100100000001000001110001100010110",
        "11111110110011101001000000111010101010111001100110100000101010101110011110101100110000011010101011001001101000100001101011000",
        "10000010111111110010110111111110100011110111100001001110001110001011001001011011111011011000101110010110001001001111100010100",
        "10111010111100001011101011100001111110001010000101101111100011111000001100001001000001011111111011101000111011101110111111000",
        "10111010110101001000100100111101000001110010011100100111101101011001000101010000001101100111110010101001110000100111001100000",
        "10111010011101011000110011111110101100011111111011011010101110101101100110110100000100101010011011011101011101011011011011111",
        "10000010010111110101110000011000101111010011111101110111110010101010111010101110101010001110111101110011011101110110110001011",
        "11111110110000101010001111101010111101101010110101011000001010100110110010111101110111100111110101011000001010011001100100010"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101100101111111",
        "100000100100101000001",
        "101110101010101011101",
        "101110101001001011101",
        "101110101110001011101",
        "100000100000001000001",
        "111111101010101111111",
        "000000000110000000000",
        "111100101010010011101",
        "011101010000100100100",
        "010110101100111111111",
        "000001010110110000000",
        "100100111101010010100",
        "000000001000010100101",
        "111111100100011010100",
        "100000100101111001001",
        "101110100011001001001",
        "101110101000010010010",
        "101110101011010011100",
        "100000101111101011001",
        "111111101101100101000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100010101111111",
        "100000100000101000001",
        "101110101010001011101",
        "101110100000101011101",
        "101110100101101011101",
        "100000100111001000001",
        "111111101010101111111",
        "000000001010000000000",
        "111011111010111000100",
        "011000011111010101010",
        "010111101001011100111",
        "111011011101110111010",
        "100101100101011101101",
        "000000001110001000010",
        "111111101010100011001",
        "100000101000001001110",
        "101110101100101010101",
        "101110100001010101010",
        "101110101011011100101",
        "100000101111110111001",
        "111111101101011100101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100010101111111",
        "100000100000101000001",
        "101110101010001011101",
        "101110100000101011101",
        "101110100101101011101",
        "100000100111001000001",
        "111111101010101111111",
        "000000001010000000000",
        "111011111010111000100",
        "011000011011010101010",
        "100000100011011100100",
        "110011011101110111001",
        "001100100101011100111",
        "000000001010001000100",
        "111111101000100010001",
        "100000101010001000110",
        "101110101010101010101",
        "101110100111010101010",
        "101110101011011101111",
        "100000101011110111000",
        "111111101001011101111"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100010101111111",
        "100000100000101000001",
        "101110101010001011101",
        "101110100000101011101",
        "101110100101101011101",
        "100000100111001000001",
        "111111101010101111111",
        "000000001010000000000",
        "111011111010111000100",
        "110010010011010101010",
        "001110110101011100100",
        "001110001111110111011",
        "100100111001011100110",
        "000000001000001000101",
        "111111101100100010010",
        "100000101000001000110",
        "101110101100101010101",
        "101110100001010101010",
        "101110101111011101101",
        "100000101111110111000",
        "111111101011011101101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100101101111111",
        "100000100111001000001",
        "101110101101101011101",
        "101110100101001011101",
        "101110100010101011101",
        "100000100000101000001",
        "111111101010101111111",
        "000000001101100000000",
        "111011111111011000100",
        "001010011100001000110",
        "001100110110100010001",
        "101001010110001000111",
        "111100101000101010110",
        "000000001111010101001",
        "111111101011011101110",
        "100000101011110111010",
        "101110101001011101101",
        "101110100110001000110",
        "101110101000100010001",
        "100000101100001000111",
        "111111101110101010101"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100010101111111",
        "100000100000101000001",
        "101110101010001011101",
        "101110100000101011101",
        "101110100101101011101",
        "100000100111001000001",
        "111111101010101111111",
        "000000001010000000000",
        "111011111010111000100",
        "111000011001010101010",
        "011011101101011101110",
        "011110011111110111011",
        "100000100111011101110",
        "000000001110001000110",
        "111111101100100010001",
        "100000101000001000101",
        "101110101010101010110",
        "101110100111010101001",
        "101110101101011101110",
        "100000101101110111010",
        "111111101001011101111"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111100010101111111",
        "100000100000101000001",
        "101110101010001011101",
        "101110100000101011101",
        "101110100101101011101",
        "100000100111001000001",
        "111111101010101111111",
        "000000001010000000000",
        "111011111010111000100",
        "110010000111010101010",
        "000000111111011100101",
        "101001001001110111011",
        "000000110101011100110",
        "000000001000001000101",
        "111111101110100010011",
        "100000101010001000110",
        "101110101100101010101",
        "101110100001010101010",
        "101110101011011101101",
        "100000101101110111001",
        "111111101111011101111"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "100000100010101000001",
        "101110100001101011101",
        "101110100010101011101",
        "101110100101101011101",
        "100000100110001000001",
        "111111101010101111111",
        "000000001000000000000",
        "110110100011001000001",
        "101011011011110010000",
        "000100100011100100111",
        "001010001000111100100",
        "111000101011111111000",
        "000000001010111110111",
        "111111100001000010000",
        "100000100110001111110",
        "101110101110011101011",
        "101110101010111000100",
        "101110100101110010111",
        "100000101101100011111",
        "111111101110110111000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101000101111111",
        "100000100010101000001",
        "101110100001101011101",
        "101110100010101011101",
        "101110100101101011101",
        "100000100110001000001",
        "111111101010101111111",
        "000000001000000000000",
        "110110100011001000001",
        "101011011011110010000",
        "000100100011100100111",
        "001010001000111100100",
        "111000101011111111000",
        "000000001010111110111",
        "111111100001000010000",
        "100000100110001111110",
        "101110101110011101011",
        "101110101010111000100",
        "101110100101110010111",
        "100000101101100011111",
        "11111101110110111000"
      ]
    }
  },
  {
    "args": {
      "rows": [
        "111111101000101111111",
        "100000100010101000001",
        "101110100001101011101",
        "101110100010101011101",
        "101110100101101011101",
        "100000100110001000001",
        "111111101010101111111",
        "000000001000000000000",
        "110110100011001000001",
        "101011011011110010000",
        "000100100011100100111",
        "001010001000111100100",
        "111000101011111111000",
        "000000001010111110111",
        "111111100001000010000",
        "100000100110001111110",
        "101110101110011101011",
        "101110101010111000100",
        "101110100101110010111",
        "100000101101100011111",
        "111111121110110111000"
      ]
    }
  },
  {
    "args": {
      "rows": []
    }
  }
]
Verification6›
  • Outputs must match the private reference implementation bit for bit.
  • Cases are the spec's 26 vectors plus ones generated from the interface's types: edge values and random ones seeded by your component's hash.
  • Components may import nothing but specs: no files, no network, no clock.
  • Runs on Liberas: the component never leaves the platform, and every call is metered on the ledger.
  • A remote call may execute up to 70,000,000 instructions.
  • Unbuilt, the bounty rises 10% of its shares every 7 days, up to +100%.