AI ์์ด์ ํธ๋ ๋งค์ผ ์ฐ๋ฆฌ ๋์ ๊ฒฐ์ ์ ๋ด๋ฆฝ๋๋ค. ํ์ง๋ง ๋ค์ ์ง์ง ์ฌ๋์ด ์๋์ง ์๋ฌด๋ ๋ชจ๋ฆ ๋๋ค.
Soulprint โ Zero-Knowledge Proof๋ก ํด๊ฒฐ. 100% ๋ก์ปฌ, MIT, ๋ฌด๋ฃ.
๐ฐ๐ท ์ฃผ๋ฏผ๋ฑ๋ก๋ฒํธ๊ฐ Soulprint์ ์์ง ์์ต๋๋ค. 30๋ถ์ด๋ฉด PR์ ๋ณด๋ผ ์ ์์ด์.
์ฃผ๋ฏผ๋ฑ๋ก๋ฒํธ ํ์
13์๋ฆฌ: YYMMDD(6) + ์ฑ๋ณ/์ธ๊ธฐ(1) + ์ง์ญ์ฝ๋(4) + ์ฒดํฌ(1) + ์ถ๊ฐ(1). ์ฒดํฌ: ๊ฐ์คํฉ mod-10.
const KR: CountryVerifier = {
countryCode: "KR", countryName: "South Korea",
documentTypes: ["resident_registration"],
parse(ocrText: string): DocumentResult {
const rrn = ocrText.match(/(\d{6}-?\d{7})/)?.[1]?.replace("-","") ?? "";
return { valid: !!rrn, doc_number: rrn, country: "KR" };
},
validate(docNumber: string): NumberValidation {
if(!/^\d{13}$/.test(docNumber)) return {valid:false};
const w=[2,3,4,5,6,7,8,9,2,3,4,5];
const sum=w.reduce((s,v,i)=>s+v*Number(docNumber[i]),0);
return { valid: (11-(sum%11))%10 === Number(docNumber[12]) };
},
};
export default KR;
๐ป GitHub ยท ํ๋์ PR. ํ๋์ ๋๋ผ.
Top comments (0)