{
  "assertion": {
    "text": "The exact supplied sole prize recipient is a valid Bitcoin mainnet witness address under BIP350.",
    "recipient_exactly_as_supplied": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
    "scope": "Independent recipient validation for the destination item of the public-checks batch."
  },
  "status": "verified",
  "expected": {
    "network": "Bitcoin mainnet",
    "human_readable_prefix": "bc",
    "witness_version_range_inclusive": [
      0,
      16
    ],
    "program_length_range_bytes_inclusive": [
      2,
      40
    ],
    "checksum_rule": "BIP350: witness version 0 uses Bech32; versions 1 through 16 use Bech32m.",
    "bech32m_polymod_residue_hex": "0x2bc830a3",
    "bech32_polymod_residue_hex": "0x00000001",
    "encoding_constraints": "Printable ASCII, at most 90 characters, no mixed case, valid alphabet and separator; discard at most four zero padding bits when converting the program from 5-bit groups to bytes.",
    "recipient_must_not_be_substituted": true,
    "evidence_urls": [
      "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0350.mediawiki",
      "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0173.mediawiki"
    ]
  },
  "observed": {
    "input": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
    "valid": true,
    "network": "Bitcoin mainnet",
    "human_readable_prefix": "bc",
    "character_count": 62,
    "letter_case": "lowercase",
    "checksum_variant": "Bech32m",
    "checksum_characters": "wxu0cx",
    "checksum_five_bit_values": [
      14,
      6,
      28,
      15,
      24,
      6
    ],
    "checksum_packed_30_bits_hex": "0x1c6e3f06",
    "polymod_residue_hex": "0x2bc830a3",
    "polymod_residue_decimal": 734539939,
    "residue_definition": "Unmodified polymod over HRP expansion followed by all data symbols, including the six checksum symbols; initial state 1.",
    "residue_xor_bech32m_constant_hex": "0x00000000",
    "witness_version": 1,
    "witness_version_character": "p",
    "decoded_program_length_bytes": 32,
    "decoded_program_hex": "46bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f",
    "canonical_reencoding": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
    "canonical_reencoding_equals_supplied_input": true,
    "scriptPubKey_hex": "512046bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f",
    "scriptPubKey_length_bytes": 34,
    "script_assembly": "OP_1 PUSH32 46bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f",
    "script_construction": "Witness version 1 maps to opcode 0x51; the direct push of 32 bytes is 0x20; append the decoded program.",
    "intermediate_values": {
      "bech32_alphabet_in_value_order": "qpzry9x8gf2tvdw0s3jn54khce6mua7l",
      "hrp_ascii_decimal": [
        98,
        99
      ],
      "hrp_expanded_values": [
        3,
        3,
        0,
        2,
        3
      ],
      "separator": "1",
      "separator_zero_based_index": 2,
      "data_characters_including_checksum": "pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
      "data_five_bit_values_including_checksum": [
        1,
        8,
        26,
        31,
        28,
        6,
        27,
        5,
        16,
        21,
        0,
        0,
        26,
        20,
        31,
        8,
        25,
        21,
        31,
        26,
        28,
        29,
        31,
        30,
        6,
        14,
        13,
        14,
        20,
        12,
        7,
        20,
        25,
        23,
        26,
        30,
        20,
        24,
        27,
        3,
        31,
        20,
        14,
        25,
        15,
        23,
        11,
        17,
        12,
        1,
        9,
        23,
        16,
        14,
        6,
        28,
        15,
        24,
        6
      ],
      "data_symbol_count_including_checksum": 59,
      "program_symbol_count_excluding_version_and_checksum": 52,
      "program_bits_before_removing_padding": 260,
      "discarded_padding_bits": "0000",
      "decoded_program_bits": 256,
      "polymod_generator_hex": [
        "0x3b6a57b2",
        "0x26508e6d",
        "0x1ea119fa",
        "0x3d4233dd",
        "0x2a1462b3"
      ]
    },
    "disagreements": [],
    "mismatch_explanation": "No mismatch between the BIP350 calculation, reference Python decoder and bitcoinjs/bech32. The legacy Bech32-only decoder rejects the exact address with the error preserved below; that rejection is expected because version 1 requires Bech32m.",
    "legacy_bech32_only_error_exact": "Invalid checksum for bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx"
  },
  "method": {
    "execution": "Executed locally with Python 3 and Node.js; downloaded public source without modification. No external validation service or paid service used.",
    "specification_calculation": {
      "source_urls": [
        "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0350.mediawiki",
        "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0173.mediawiki"
      ],
      "procedure": [
        "Preserve the input exactly; check ASCII, length, case, separator and alphabet. Split into HRP bc and data at the last 1.",
        "Map each data character to its alphabet index. Expand bc to [3,3,0,2,3] and run the published polymod recurrence with initial state 1 over expansion plus all 59 data values.",
        "Require residue 0x2bc830a3 for the decoded version 1. Independently recompute the six checksum symbols by appending six zero values to HRP expansion plus non-checksum data, applying polymod, then XORing 0x2bc830a3.",
        "Remove the first data symbol (version) and final six (checksum). Concatenate the remaining 52 five-bit values most significant bit first. Remove the four trailing zero bits; group the remaining 256 bits into 32 bytes.",
        "Verify version and program-length restrictions; re-encode in lowercase and require exact equality to the supplied input. Construct scriptPubKey as 0x51 || 0x20 || program."
      ]
    },
    "public_implementations": [
      {
        "name": "sipa/bech32 Python reference implementation linked by BIP350",
        "commit": "7a7d7ab158db7078a333384e0e918c90dbc42917",
        "source_url": "https://raw.githubusercontent.com/sipa/bech32/7a7d7ab158db7078a333384e0e918c90dbc42917/ref/python/segwit_addr.py",
        "source_sha256": "2884ce04a36c8374c4249177cd90e91e545ac73b5c9260307bbeb74ae2e9de0f",
        "calls": [
          "bech32_decode(address)",
          "decode('bc', address)",
          "encode('bc', version, program)"
        ],
        "observed": {
          "encoding": "BECH32M",
          "version": 1,
          "program_hex": "46bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f",
          "canonical": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
          "valid_vectors_passed": 8,
          "invalid_vectors_rejected": 15
        },
        "reproduction": "Save the pinned source as segwit_addr.py. In Python: import segwit_addr as s; a = 'bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx'; h,d,e = s.bech32_decode(a); v,p = s.decode('bc',a); print(h,e.name,v,len(p),bytes(p).hex(),s.encode('bc',v,p)); print(hex(s.bech32_polymod(s.bech32_hrp_expand(h)+[s.CHARSET.index(c) for c in a[a.rfind('1')+1:]])))"
      },
      {
        "name": "bitcoinjs/bech32 JavaScript implementation",
        "version": "2.0.0",
        "commit": "7593fda5a9c40ff10ef9abebc22e246cd6744849",
        "source_url": "https://raw.githubusercontent.com/bitcoinjs/bech32/7593fda5a9c40ff10ef9abebc22e246cd6744849/dist/index.js",
        "source_sha256": "7e389c4495ce1fc3a0024485d1554494a959735c68caf8e677951275b15ea3cc",
        "calls": [
          "bech32m.decode(address)",
          "bech32m.fromWords(decoded.words.slice(1))",
          "bech32m.toWords(program)",
          "bech32m.encode(prefix, words)",
          "bech32.decode(address)"
        ],
        "observed": {
          "prefix": "bc",
          "variant": "bech32m",
          "version": 1,
          "words": [
            1,
            8,
            26,
            31,
            28,
            6,
            27,
            5,
            16,
            21,
            0,
            0,
            26,
            20,
            31,
            8,
            25,
            21,
            31,
            26,
            28,
            29,
            31,
            30,
            6,
            14,
            13,
            14,
            20,
            12,
            7,
            20,
            25,
            23,
            26,
            30,
            20,
            24,
            27,
            3,
            31,
            20,
            14,
            25,
            15,
            23,
            11,
            17,
            12,
            1,
            9,
            23,
            16
          ],
          "program_length": 32,
          "program_hex": "46bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f",
          "canonical": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx",
          "scriptPubKey": "512046bfc36cb0a801aa7d19aff5ceffc6735d461e99bebd4c6c7fa3b2fbae2c0a6f"
        },
        "reproduction": "Save the pinned source as bech32.js. In Node.js: const {bech32m:m}=require('./bech32.js'); const a='bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cx'; const d=m.decode(a); const p=Buffer.from(m.fromWords(d.words.slice(1))); console.log(d.prefix,d.words[0],p.length,p.toString('hex'),m.encode(d.prefix,[d.words[0],...m.toWords(p)])); console.log(Buffer.concat([Buffer.from([0x50+d.words[0],p.length]),p]).toString('hex'));",
        "adapter_note": "This library validates generic Bech32/Bech32m and bit conversion. A local witness-address adapter separately enforces bc/tb network, version 0..16, 2..40-byte programs, v0 length 20/32 and the witness-version/checksum-variant relationship. The target was explicitly required to have prefix bc."
      }
    ],
    "checks": {
      "bip350_native_witness_test_vector_source": "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0350.mediawiki",
      "python_reference": {
        "valid_vectors_with_matching_scriptPubKey": 8,
        "invalid_vectors_rejected": 15
      },
      "bitcoinjs_with_witness_adapter": {
        "valid_vectors_with_matching_scriptPubKey": 8,
        "invalid_vectors_rejected": 15
      },
      "test_vector_scope": "All 23 BIP350 native witness-address vectors, including versions 0, 1, 2 and 16; this is not a claim to have run every generic Bech32m vector.",
      "mutated_target": "bc1pg6luxm9s4qq65lge4l6ual7xwdw5v85eh675cmrl5we0ht3vpfhswxu0cq",
      "mutation": "For this negative control only, replace the last character x with q; never substitute this control for the supplied recipient.",
      "mutated_target_rejected_by_both": true,
      "independent_decoded_program_agreement": true,
      "independent_reencoding_agreement": true,
      "independent_scriptPubKey_agreement": true
    }
  },
  "evidence_urls": [
    "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0350.mediawiki",
    "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0173.mediawiki",
    "https://raw.githubusercontent.com/sipa/bech32/7a7d7ab158db7078a333384e0e918c90dbc42917/ref/python/segwit_addr.py",
    "https://raw.githubusercontent.com/bitcoinjs/bech32/7593fda5a9c40ff10ef9abebc22e246cd6744849/dist/index.js"
  ],
  "evidence_files": {
    "bip350.mediawiki": {
      "url": "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0350.mediawiki",
      "sha256": "63634b06aa8bae88b31929674736e74964c4598684269ac2b0b140c43a7a0dec"
    },
    "bip173.mediawiki": {
      "url": "https://raw.githubusercontent.com/bitcoin/bips/0d99ffd39fdaf75209c43b1f8ec3fbbc23f10814/bip-0173.mediawiki",
      "sha256": "b19eab06b264bbd15ad7f7d640fa34de8f4a8809fba8a6ecc3e165545b27a543"
    },
    "segwit_addr.py": {
      "url": "https://raw.githubusercontent.com/sipa/bech32/7a7d7ab158db7078a333384e0e918c90dbc42917/ref/python/segwit_addr.py",
      "sha256": "2884ce04a36c8374c4249177cd90e91e545ac73b5c9260307bbeb74ae2e9de0f"
    },
    "bech32.js": {
      "url": "https://raw.githubusercontent.com/bitcoinjs/bech32/7593fda5a9c40ff10ef9abebc22e246cd6744849/dist/index.js",
      "sha256": "7e389c4495ce1fc3a0024485d1554494a959735c68caf8e677951275b15ea3cc"
    }
  },
  "limitations": [
    "This verifies only the exact public recipient string and its decoding. It does not prove that the requester controls a spending key or can spend a payment to it.",
    "No chain state, balance, UTXOs, challenge public key, private-key interval, recovered private key or prize payment was checked in this bounded destination item. This result is not completion of the larger Puzzle #140 objective.",
    "No key recovery, signing or broadcasting was performed. No private data was needed.",
    "The implementation checks and vector results are local reproducible observations, not independent certification. The two public libraries execute separately, but implement the same published algorithm."
  ]
}
