{"_id":"@berrysdk/berry-otp","_rev":"8-d95a406dd2fc821584292a23f3f69601","name":"@berrysdk/berry-otp","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.1":{"name":"@berrysdk/berry-otp","version":"0.1.1","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.1","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"592c0f8cd920807aef76a7537ba285b77c64e921","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.1.tgz","fileCount":18,"integrity":"sha512-L47I1IcHkz1nyi+319th8i6x3rE83tqtK6nxHTASKzv5V0COQvnJeGnXeaIg/XhZnXX+v2pCa8RS2BOXkKPSPA==","signatures":[{"sig":"MEUCIQDzbcYl5GUElQ77VqW6t0dndje2kJfGKuUlaqq64Yp/oQIgTfLM/5RYav5BtOT0B76BKGuGEen02L1qh2bo2z1l4y0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57637},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ef1a3ae2ea8cc7ab53fa7bf8b00838c8987c4294","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.1_1778670159861_0.1858990220050336","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@berrysdk/berry-otp","version":"0.1.2","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.2","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"136f99f80b67f2caae724863c0b4edc22259404d","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.2.tgz","fileCount":18,"integrity":"sha512-k9nIUEf4fngyOqeFt8yrg2sjtBclTPqBBEd/OHmo+3TQB8QzKlzOhZjy4UxDeycXWA6cdjdFwQfdPGaiHpBzMg==","signatures":[{"sig":"MEYCIQCI/AGKvZSVuNj9AAEZlYgB7jpQUAWb1eW2CH22K9rKcgIhANSP43lRxTRYENWQmJWaiyKi3RuVWNucxM/8MgWCQ666","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57635},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ef1a3ae2ea8cc7ab53fa7bf8b00838c8987c4294","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.2_1778681628304_0.46052889573001443","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@berrysdk/berry-otp","version":"0.1.3","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.3","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"f7bfb953715c4c27444524fcade17c2da4fc62dc","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.3.tgz","fileCount":18,"integrity":"sha512-0Yd1LYAxP4ZWK4irAPpLvSyWZxleuLCC8zjBGYWNWKsljQVzZ0CAHVbaebz0af1sWd3GCGmxeAkL1mQDyXkNZQ==","signatures":[{"sig":"MEYCIQDHn379C5rhKOZORRp9Ls2cKfCf8gn9PtsiqW4R/YhBQAIhALHmv5+ssthHkObsLn29WF+iCLFocLKvRs0PhvSfxdpr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57635},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ef1a3ae2ea8cc7ab53fa7bf8b00838c8987c4294","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.3_1778683450406_0.7093343909104088","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@berrysdk/berry-otp","version":"0.1.4","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.4","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"aaae28c2769e0e2a8e0faa4153f27fe015f32c45","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.4.tgz","fileCount":18,"integrity":"sha512-rQF9NQ7eH4pxz5ONsci/DMM5+0dNkhdVtJjNZSW4x57KZLjHktjUdkfZTg9zt5Qt8DPJ60BC+ydrqqP4+GkuzA==","signatures":[{"sig":"MEUCIQDD3koQTo7cHlxR4PBQSVi3SgiuBF6c5C8MCXiPkpa6+wIgHFcgnYAb3Z7b9xOt6ONdCMrqUq427g5w8tudoZIQg1Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57695},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"56120ac6e1c7749fdf4b8315e58c454feae0b8b5","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.4_1778687110892_0.9910257621040197","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@berrysdk/berry-otp","version":"0.1.5","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.5","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"0691663bb3a5606fece58b06c3fb31d171c3c83b","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.5.tgz","fileCount":18,"integrity":"sha512-hFXC9qu25ZCpg+nSG1jPYMs2UxwkDBDzI7c2Xulemlvj8HaX900N3hRxsgT/Vh8Ve09ySVzOFZpzY2BurBCZWA==","signatures":[{"sig":"MEUCIBwHKKpX37nGeRollxBQNCITQydCKuhexcqQwz6gmkYVAiEAolXJHxzlYSScEgHWMSEGqiT9o4FzXLvdd16hcua35pM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57695},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"ce2b83ebc48e38766fbdcc6dcfc6243d58b1b64e","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.5_1778688203432_0.3423776596933896","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@berrysdk/berry-otp","version":"0.1.7","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.7","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"7703a79519b4da6a64fed04f97bad2c28450573d","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.7.tgz","fileCount":18,"integrity":"sha512-mG8Uz/H3FvNPbUMUb+Z3i4m9q1J9ScJ3FG66x68sTmVedj7d36PX20FKO/75JZmBW50y1ZQm96CTY+lJjF3+UA==","signatures":[{"sig":"MEQCIEd9YgJ2ujwPMNFqb9d973oAk1Xs2mqA2q43rNQ/vh/LAiBRVP8T375ycY2ZbQ94U891AlIyVSqgn+vuwLR111ShvQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57791},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"1e4b4f2637d8a6ed77d98adddc56a06eba900090","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","dependencies":{"@berrysdk/core":"0.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.7_1778689773988_0.46210926705206945","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@berrysdk/berry-otp","version":"0.1.8","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","_id":"@berrysdk/berry-otp@0.1.8","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"dist":{"shasum":"681d4c5b8e67c36173fb01dfb26a0a2d30fd780a","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.8.tgz","fileCount":18,"integrity":"sha512-mRGQylwVhNZqZI8HcP/XFLBP7B0YFCIUgf9qMM2Qy+lerwW8VvTpsU9shdyTgR6MnNAbK1jziAnyaXHCZPseMg==","signatures":[{"sig":"MEUCIGPq/Ct5md7PBYKf2wmNX2HGWPpgdJz/nLSBw3poMigYAiEAlEFvLugbDYlbJWDeyRJHdVNjeekmHdcFVZOoFJcxQ6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57574},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"75fb6f9e2e291519cd43655d51a681bbc2c0f559","_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"_npmVersion":"10.8.2","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","directories":{},"_nodeVersion":"20.19.5","dependencies":{"@berrysdk/core":"0.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/berry-otp_0.1.8_1778690480117_0.7561695828373343","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@berrysdk/berry-otp","version":"0.1.9","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"@berrysdk/core":"0.1.9"},"_id":"@berrysdk/berry-otp@0.1.9","gitHead":"d7c234ecc9fa8d31b673b36c0287afbb4ee4e923","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-CTWoig3Q93jDFe5fAcjVTBwwHWSnQy8CjhtWtAYCR8rXX3qISaU2vlmPqhM6wish9OJfbswU79dEFWfodER2TA==","shasum":"aefa912a5de3d69130a8559c287ffdd73125c1b5","tarball":"https://registry.npmjs.org/@berrysdk/berry-otp/-/berry-otp-0.1.9.tgz","fileCount":18,"unpackedSize":57572,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDD47uBGdqJv3YSRwq3SjPs6RblzS4ZcwQlK9b8PnSu5gIgJaFK8QshppoS+yNG7JhntB8yrAlxAY0DoeojZ9zyeWg="}]},"_npmUser":{"name":"berrysdk","email":"berrysdk@gmail.com"},"directories":{},"maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/berry-otp_0.1.9_1778701081614_0.13866472477898428"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-13T11:02:39.800Z","modified":"2026-05-13T19:38:01.883Z","0.1.1":"2026-05-13T11:02:40.005Z","0.1.2":"2026-05-13T14:13:48.464Z","0.1.3":"2026-05-13T14:44:10.558Z","0.1.4":"2026-05-13T15:45:11.041Z","0.1.5":"2026-05-13T16:03:23.586Z","0.1.7":"2026-05-13T16:29:34.159Z","0.1.8":"2026-05-13T16:41:20.286Z","0.1.9":"2026-05-13T19:38:01.775Z"},"author":{"name":"Lipe Devv and Berry Protocol"},"license":"Apache-2.0","description":"Official OTP flows for Berry SDK on top of WhatsApp native-flow and fallback buttons.","maintainers":[{"name":"berrysdk","email":"berrysdk@gmail.com"}],"readme":"# @berrysdk/berry-otp\n\nOfficial OTP flows for Berry SDK using WhatsApp Web transport, native-flow interactive buttons, and fallback legacy mode.\n\n## Important notes\n\n- This package does **not** use the official WhatsApp Business API.\n- It relies on WhatsApp Web behavior observed in real tests.\n- `copy-code` was validated in real tests on WhatsApp Web `2.3000.x`.\n- WhatsApp can change protocol behavior at any time.\n- `stable` mode exists as a fallback.\n- `editOnExpire` requires `client.editMessage(...)` support in the SDK.\n- Once `verify()` succeeds, the OTP becomes `used`, so it will not expire and edit afterward.\n\n## Modes\n\n- `stable`\n- `copy-code`\n- `experimental-copy-code`\n\nRecommended default:\n\n- `copy-code`\n\n## Example\n\n```ts\nimport { BerryClient } from \"@berrysdk/core\";\nimport { BerryOTP } from \"@berrysdk/berry-otp\";\n\nconst client = new BerryClient({\n  sessionId: \"otp-session\",\n});\n\nawait client.connectWithQr();\n\nconst otp = BerryOTP.createLoginFlow(client, {\n  issuer: \"BerryProtocol\",\n  ttlMs: 2 * 60 * 1000,\n  mode: \"copy-code\",\n});\n\nconst sent = await otp.sendLoginCode(\"5511999999999@s.whatsapp.net\", {\n  userId: \"user-001\",\n  metadata: { source: \"example\" },\n});\n\nconsole.log(sent);\n```\n","readmeFilename":"README.md"}