PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/luhndemo/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / luhndemo
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/x/daily/luhndemo/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • luhndemo.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗
# Luhn Checksum

The mod-10 check behind card numbers and IMEIs, demoing the [`p/moul/x/daily/luhn`](/p/moul/x/daily/luhn/v0) library.

Append a number to the path to check it — spaces and hyphens are ignored.

## Samples

| number | valid? | note |
|---|---|---|
| `79927398713` | ✅ valid | the textbook example |
| `79927398710` | ❌ invalid | same number, wrong check digit |
| `4539148803436467` | ✅ valid | a test card number |
| `4539148803436647` | ❌ invalid | same card, two digits swapped |

> Luhn is a **typo check, not a security check**: it catches every single-digit error and nearly every swap of adjacent digits, but anyone can compute a valid number. Never authorize anything with it.

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.