@zerodev/wallet-react 0.0.1-alpha.13 → 0.0.1-alpha.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerodev/wallet-react",
3
- "version": "0.0.1-alpha.13",
3
+ "version": "0.0.1-alpha.14",
4
4
  "description": "React hooks for ZeroDev Wallet SDK",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/_cjs/index.js",
@@ -30,7 +30,7 @@
30
30
  "wagmi": "^3.0.0",
31
31
  "zustand": "^5.0.3",
32
32
  "ox": "^0.3.0",
33
- "@zerodev/wallet-core": "0.0.1-alpha.12"
33
+ "@zerodev/wallet-core": "0.0.1-alpha.13"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "^19",
package/src/actions.ts CHANGED
@@ -208,6 +208,7 @@ export async function sendOTP(
208
208
  parameters: {
209
209
  email: string
210
210
  emailCustomization?: { magicLinkTemplate?: string }
211
+ otpCodeCustomization?: { length: 6 | 7 | 8 | 9; alphanumeric: boolean }
211
212
  connector?: Connector
212
213
  },
213
214
  ): Promise<{ otpId: string }> {
@@ -227,6 +228,9 @@ export async function sendOTP(
227
228
  ...(parameters.emailCustomization && {
228
229
  emailCustomization: parameters.emailCustomization,
229
230
  }),
231
+ ...(parameters.otpCodeCustomization && {
232
+ otpCodeCustomization: parameters.otpCodeCustomization,
233
+ }),
230
234
  })
231
235
 
232
236
  return {
@@ -238,6 +242,7 @@ export declare namespace sendOTP {
238
242
  type Parameters = {
239
243
  email: string
240
244
  emailCustomization?: { magicLinkTemplate?: string }
245
+ otpCodeCustomization?: { length: 6 | 7 | 8 | 9; alphanumeric: boolean }
241
246
  connector?: Connector
242
247
  }
243
248
  type ReturnType = { otpId: string }
@@ -497,6 +502,7 @@ export async function sendMagicLink(
497
502
  parameters: {
498
503
  email: string
499
504
  redirectURL: string
505
+ otpCodeCustomization?: { length: 6 | 7 | 8 | 9; alphanumeric: boolean }
500
506
  connector?: Connector
501
507
  },
502
508
  ): Promise<{ otpId: string }> {
@@ -513,6 +519,9 @@ export async function sendMagicLink(
513
519
  mode: 'send',
514
520
  email: parameters.email,
515
521
  redirectURL: parameters.redirectURL,
522
+ ...(parameters.otpCodeCustomization && {
523
+ otpCodeCustomization: parameters.otpCodeCustomization,
524
+ }),
516
525
  })
517
526
 
518
527
  return {
@@ -524,6 +533,7 @@ export declare namespace sendMagicLink {
524
533
  type Parameters = {
525
534
  email: string
526
535
  redirectURL: string
536
+ otpCodeCustomization?: { length: 6 | 7 | 8 | 9; alphanumeric: boolean }
527
537
  connector?: Connector
528
538
  }
529
539
  type ReturnType = { otpId: string }