@smart-pay-chain/otp 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -14
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @smart-pay-chain/otp
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://www.typescriptlang.org/)
|
|
3
|
+
<div align="center">
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@smart-pay-chain/otp)
|
|
6
|
+
[](https://www.npmjs.com/package/@smart-pay-chain/otp)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](https://github.com/Smart-Pay-Chain/otp)
|
|
11
|
+
[](https://github.com/Smart-Pay-Chain/otp)
|
|
12
|
+
|
|
13
|
+
**Official TypeScript/JavaScript SDK for Smart Pay Chain OTP Verification Service**
|
|
14
|
+
|
|
15
|
+
[Website](https://smartpaychain.com) • [Documentation](https://docs.smartpaychain.com) • [NPM Package](https://www.npmjs.com/package/@smart-pay-chain/otp) • [GitHub](https://github.com/Smart-Pay-Chain/otp)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
Send and verify one-time passwords via SMS, WhatsApp, and Voice with ease.
|
|
8
22
|
|
|
9
23
|
## What's New in v2.0
|
|
10
24
|
|
|
@@ -32,19 +46,19 @@ Official TypeScript/JavaScript SDK for the Smart Pay Chain OTP Verification Serv
|
|
|
32
46
|
## Installation
|
|
33
47
|
|
|
34
48
|
```bash
|
|
35
|
-
npm install @
|
|
49
|
+
npm install @smart-pay-chain/otp
|
|
36
50
|
```
|
|
37
51
|
|
|
38
52
|
or
|
|
39
53
|
|
|
40
54
|
```bash
|
|
41
|
-
yarn add @
|
|
55
|
+
yarn add @smart-pay-chain/otp
|
|
42
56
|
```
|
|
43
57
|
|
|
44
58
|
## Quick Start
|
|
45
59
|
|
|
46
60
|
```typescript
|
|
47
|
-
import { OtpClient, OtpChannel } from '@
|
|
61
|
+
import { OtpClient, OtpChannel } from '@smart-pay-chain/otp';
|
|
48
62
|
|
|
49
63
|
// Initialize the client
|
|
50
64
|
const client = new OtpClient({
|
|
@@ -110,7 +124,7 @@ if (testMode) {
|
|
|
110
124
|
}
|
|
111
125
|
|
|
112
126
|
// Use test phone numbers
|
|
113
|
-
import { TEST_PHONE_NUMBERS, TEST_OTP_CODE } from '@
|
|
127
|
+
import { TEST_PHONE_NUMBERS, TEST_OTP_CODE } from '@smart-pay-chain/otp';
|
|
114
128
|
|
|
115
129
|
const result = await client.sendOtp({
|
|
116
130
|
phoneNumber: TEST_PHONE_NUMBERS.SUCCESS, // +15005550006
|
|
@@ -283,7 +297,7 @@ import {
|
|
|
283
297
|
RateLimitError,
|
|
284
298
|
OtpExpiredError,
|
|
285
299
|
InvalidOtpError,
|
|
286
|
-
} from '@
|
|
300
|
+
} from '@smart-pay-chain/otp';
|
|
287
301
|
|
|
288
302
|
try {
|
|
289
303
|
const result = await client.verifyOtp({ ... });
|
|
@@ -559,9 +573,13 @@ npm test -- --coverage
|
|
|
559
573
|
|
|
560
574
|
## Support
|
|
561
575
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
- **
|
|
576
|
+
Need help? We're here for you!
|
|
577
|
+
|
|
578
|
+
- 🌐 **Website**: [smartpaychain.com](https://smartpaychain.com)
|
|
579
|
+
- 📚 **Documentation**: [docs.smartpaychain.com](https://docs.smartpaychain.com)
|
|
580
|
+
- 🐛 **Issues**: [GitHub Issues](https://github.com/Smart-Pay-Chain/otp/issues)
|
|
581
|
+
- 📧 **Email**: [support@smartpaychain.com](mailto:support@smartpaychain.com)
|
|
582
|
+
- 💬 **Community**: [Join our Discord](https://smartpaychain.com/discord)
|
|
565
583
|
|
|
566
584
|
## Contributing
|
|
567
585
|
|
|
@@ -577,5 +595,28 @@ See [CHANGELOG.md](./CHANGELOG.md) for version history.
|
|
|
577
595
|
|
|
578
596
|
---
|
|
579
597
|
|
|
580
|
-
|
|
598
|
+
<div align="center">
|
|
599
|
+
|
|
600
|
+
### 🏢 About Smart Pay Chain
|
|
601
|
+
|
|
602
|
+
**Smart Pay Chain** is a leading provider of blockchain-based payment solutions and verification services.
|
|
603
|
+
|
|
604
|
+
🌐 [smartpaychain.com](https://smartpaychain.com) | 📧 [contact@smartpaychain.com](mailto:contact@smartpaychain.com)
|
|
605
|
+
|
|
606
|
+
**Products & Services**
|
|
607
|
+
- 🔐 OTP Verification Service (SMS, WhatsApp, Voice)
|
|
608
|
+
- 💳 Payment Processing Solutions
|
|
609
|
+
- ⛓️ Blockchain Integration Services
|
|
610
|
+
- 🔒 Secure Authentication Systems
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
Made with ❤️ by Smart Pay Chain
|
|
615
|
+
|
|
616
|
+
[](https://twitter.com/smartpaychain)
|
|
617
|
+
[](https://github.com/Smart-Pay-Chain/otp)
|
|
618
|
+
|
|
619
|
+
© 2025 Smart Pay Chain. All rights reserved.
|
|
620
|
+
|
|
621
|
+
</div>
|
|
581
622
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-pay-chain/otp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Official TypeScript SDK for Smart Pay Chain OTP Verification Service - Now with test mode, mobile examples, and enhanced error handling",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|