@worldcoin/minikit-js 1.9.4 → 1.9.6

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/build/index.d.cts CHANGED
@@ -40,6 +40,7 @@ declare enum SendTransactionErrorCodes {
40
40
  TransactionFailed = "transaction_failed",
41
41
  GenericError = "generic_error",
42
42
  DisallowedOperation = "disallowed_operation",
43
+ ValidationError = "validation_error",
43
44
  InvalidContract = "invalid_contract",
44
45
  MaliciousOperation = "malicious_operation",
45
46
  DailyTxLimitReached = "daily_tx_limit_reached",
@@ -139,9 +140,17 @@ declare const ShareFilesErrorMessage: {
139
140
  generic_error: string;
140
141
  invalid_file_name: string;
141
142
  };
143
+ declare enum MicrophoneErrorCodes {
144
+ MiniAppPermissionNotEnabled = "mini_app_permission_not_enabled",
145
+ WorldAppPermissionNotEnabled = "world_app_permission_not_enabled"
146
+ }
147
+ declare const MicrophoneErrorMessage: {
148
+ mini_app_permission_not_enabled: string;
149
+ world_app_permission_not_enabled: string;
150
+ };
142
151
 
143
152
  declare enum Tokens {
144
- USDCE = "USDCE",
153
+ USDC = "USDCE",
145
154
  WLD = "WLD"
146
155
  }
147
156
  declare const TokenDecimals: {
@@ -181,7 +190,8 @@ declare enum Command {
181
190
  ShareContacts = "share-contacts",
182
191
  RequestPermission = "request-permission",
183
192
  GetPermissions = "get-permissions",
184
- SendHapticFeedback = "send-haptic-feedback"
193
+ SendHapticFeedback = "send-haptic-feedback",
194
+ Share = "share"
185
195
  }
186
196
  type WebViewBasePayload = {
187
197
  command: Command;
@@ -254,7 +264,8 @@ type ShareContactsInput = {
254
264
  type ShareContactsPayload = ShareContactsInput;
255
265
  declare enum Permission {
256
266
  Notifications = "notifications",
257
- Contacts = "contacts"
267
+ Contacts = "contacts",
268
+ Microphone = "microphone"
258
269
  }
259
270
  type RequestPermissionInput = {
260
271
  permission: Permission;
@@ -273,15 +284,22 @@ type SendHapticFeedbackInput = {
273
284
  style: 'light' | 'medium' | 'heavy';
274
285
  };
275
286
  type SendHapticFeedbackPayload = SendHapticFeedbackInput;
276
- type ShareFile = {
277
- url: string;
278
- saved_file_name_with_extension: string;
287
+ type ShareInput = {
288
+ files?: File[];
289
+ title?: string;
290
+ text?: string;
291
+ url?: string;
292
+ };
293
+ type SharePayload = {
294
+ files?: Array<{
295
+ name: string;
296
+ type: string;
297
+ data: string;
298
+ }>;
299
+ title?: string;
300
+ text?: string;
301
+ url?: string;
279
302
  };
280
- type ShareFilesInput = {
281
- files: ShareFile[];
282
- mime_type: string;
283
- };
284
- type ShareFilesPayload = ShareFilesInput;
285
303
  type CommandReturnPayloadMap = {
286
304
  [Command.Verify]: VerifyCommandPayload;
287
305
  [Command.Pay]: PayCommandPayload;
@@ -293,9 +311,40 @@ type CommandReturnPayloadMap = {
293
311
  [Command.RequestPermission]: RequestPermissionPayload;
294
312
  [Command.GetPermissions]: GetPermissionsPayload;
295
313
  [Command.SendHapticFeedback]: SendHapticFeedbackPayload;
314
+ [Command.Share]: SharePayload;
296
315
  };
297
316
  type CommandReturnPayload<T extends Command> = T extends keyof CommandReturnPayloadMap ? CommandReturnPayloadMap[T] : never;
298
317
 
318
+ type User = {
319
+ walletAddress?: string;
320
+ username?: string;
321
+ profilePictureUrl?: string;
322
+ permissions?: {
323
+ notifications: boolean;
324
+ contacts: boolean;
325
+ };
326
+ optedIntoOptionalAnalytics?: boolean;
327
+ /** @deprecated Moved to DeviceProperties */
328
+ worldAppVersion?: number;
329
+ /** @deprecated Moved to DeviceProperties */
330
+ deviceOS?: string;
331
+ };
332
+ type DeviceProperties = {
333
+ safeAreaInsets?: {
334
+ top: number;
335
+ right: number;
336
+ bottom: number;
337
+ left: number;
338
+ };
339
+ deviceOS?: string;
340
+ worldAppVersion?: number;
341
+ };
342
+ type UserNameService = {
343
+ walletAddress: string;
344
+ username?: string;
345
+ profilePictureUrl?: string;
346
+ };
347
+
299
348
  declare enum ResponseEvent {
300
349
  MiniAppVerifyAction = "miniapp-verify-action",
301
350
  MiniAppPayment = "miniapp-payment",
@@ -307,7 +356,8 @@ declare enum ResponseEvent {
307
356
  MiniAppRequestPermission = "miniapp-request-permission",
308
357
  MiniAppGetPermissions = "miniapp-get-permissions",
309
358
  MiniAppSendHapticFeedback = "miniapp-send-haptic-feedback",
310
- MiniAppShareFiles = "miniapp-share-files"
359
+ MiniAppShare = "miniapp-share",
360
+ MiniAppMicrophone = "miniapp-microphone"
311
361
  }
312
362
  type MiniAppVerifyActionSuccessPayload = {
313
363
  status: 'success';
@@ -455,18 +505,29 @@ type MiniAppSendHapticFeedbackErrorPayload = {
455
505
  version: number;
456
506
  };
457
507
  type MiniAppSendHapticFeedbackPayload = MiniAppSendHapticFeedbackSuccessPayload | MiniAppSendHapticFeedbackErrorPayload;
458
- type MiniAppShareFilesSuccessPayload = {
508
+ type MiniAppShareSuccessPayload = {
459
509
  status: 'success';
460
510
  shared_files_count: number;
461
511
  version: number;
462
512
  timestamp: string;
463
513
  };
464
- type MiniAppShareFilesErrorPayload = {
514
+ type MiniAppShareErrorPayload = {
465
515
  status: 'error';
466
516
  error_code: ShareFilesErrorCodes;
467
517
  version: number;
468
518
  };
469
- type MiniAppShareFilesPayload = MiniAppShareFilesSuccessPayload | MiniAppShareFilesErrorPayload;
519
+ type MiniAppSharePayload = MiniAppShareSuccessPayload | MiniAppShareErrorPayload;
520
+ type MiniAppMicrophoneSuccessPayload = {
521
+ status: 'success';
522
+ version: number;
523
+ timestamp: string;
524
+ };
525
+ type MiniAppMicrophoneErrorPayload = {
526
+ status: 'error';
527
+ error_code: MicrophoneErrorCodes;
528
+ version: number;
529
+ };
530
+ type MiniAppMicrophonePayload = MiniAppMicrophoneSuccessPayload | MiniAppMicrophoneErrorPayload;
470
531
  type EventPayloadMap = {
471
532
  [ResponseEvent.MiniAppVerifyAction]: MiniAppVerifyActionPayload;
472
533
  [ResponseEvent.MiniAppPayment]: MiniAppPaymentPayload;
@@ -478,37 +539,22 @@ type EventPayloadMap = {
478
539
  [ResponseEvent.MiniAppRequestPermission]: MiniAppRequestPermissionPayload;
479
540
  [ResponseEvent.MiniAppGetPermissions]: MiniAppGetPermissionsPayload;
480
541
  [ResponseEvent.MiniAppSendHapticFeedback]: MiniAppSendHapticFeedbackPayload;
481
- [ResponseEvent.MiniAppShareFiles]: MiniAppShareFilesPayload;
542
+ [ResponseEvent.MiniAppShare]: MiniAppSharePayload;
543
+ [ResponseEvent.MiniAppMicrophone]: MiniAppMicrophonePayload;
482
544
  };
483
545
  type EventPayload<T extends ResponseEvent = ResponseEvent> = T extends keyof EventPayloadMap ? EventPayloadMap[T] : never;
484
546
  type EventHandler<E extends ResponseEvent = ResponseEvent> = <T extends EventPayload<E>>(data: T) => void;
485
547
 
486
- type User = {
487
- walletAddress?: string;
488
- username?: string;
489
- profilePictureUrl?: string;
490
- permissions?: {
491
- notifications: boolean;
492
- contacts: boolean;
493
- };
494
- optedIntoOptionalAnalytics?: boolean;
495
- worldAppVersion?: number;
496
- deviceOS?: string;
497
- };
498
- type UserNameService = {
499
- walletAddress: string;
500
- username?: string;
501
- profilePictureUrl?: string;
502
- };
503
-
504
548
  declare class MiniKit {
505
549
  private static readonly MINIKIT_VERSION;
550
+ private static readonly MINIKIT_MINOR_VERSION;
506
551
  private static readonly miniKitCommandVersion;
507
552
  private static isCommandAvailable;
508
553
  private static listeners;
509
554
  static appId: string | null;
510
555
  static user: User;
511
556
  private static isReady;
557
+ static deviceProperties: DeviceProperties;
512
558
  private static sendInit;
513
559
  static subscribe<E extends ResponseEvent>(event: E, handler: EventHandler<E>): void;
514
560
  static unsubscribe(event: ResponseEvent): void;
@@ -531,6 +577,7 @@ declare class MiniKit {
531
577
  requestPermission: (payload: RequestPermissionInput) => RequestPermissionPayload | null;
532
578
  getPermissions: () => GetPermissionsPayload | null;
533
579
  sendHapticFeedback: (payload: SendHapticFeedbackInput) => SendHapticFeedbackPayload | null;
580
+ share: (payload: ShareInput) => ShareInput | null;
534
581
  };
535
582
  /**
536
583
  * This object contains async versions of all the commands.
@@ -553,6 +600,7 @@ declare class MiniKit {
553
600
  requestPermission: (payload: RequestPermissionInput) => AsyncHandlerReturn<RequestPermissionPayload | null, MiniAppRequestPermissionPayload>;
554
601
  getPermissions: () => AsyncHandlerReturn<GetPermissionsPayload | null, MiniAppGetPermissionsPayload>;
555
602
  sendHapticFeedback: (payload: SendHapticFeedbackInput) => AsyncHandlerReturn<SendHapticFeedbackPayload | null, MiniAppSendHapticFeedbackPayload>;
603
+ share: (payload: ShareInput) => AsyncHandlerReturn<ShareInput | null, MiniAppSharePayload>;
556
604
  };
557
605
  }
558
606
 
@@ -581,4 +629,4 @@ declare const verifySiweMessage: (payload: MiniAppWalletAuthSuccessPayload, nonc
581
629
 
582
630
  declare const getIsUserVerified: (walletAddress: string, rpcUrl?: string) => Promise<boolean>;
583
631
 
584
- export { type AsyncHandlerReturn, Command, type CommandReturnPayload, type Contact, type EventHandler, type EventPayload, GetPermissionsErrorCodes, GetPermissionsErrorMessage, type GetPermissionsInput, type GetPermissionsPayload, type MiniAppGetPermissionsErrorPayload, type MiniAppGetPermissionsPayload, type MiniAppGetPermissionsSuccessPayload, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessPayload, type MiniAppRequestPermissionErrorPayload, type MiniAppRequestPermissionPayload, type MiniAppRequestPermissionSuccessPayload, type MiniAppSendHapticFeedbackErrorPayload, type MiniAppSendHapticFeedbackPayload, type MiniAppSendHapticFeedbackSuccessPayload, type MiniAppSendTransactionErrorPayload, type MiniAppSendTransactionPayload, type MiniAppSendTransactionSuccessPayload, type MiniAppShareContactsErrorPayload, type MiniAppShareContactsPayload, type MiniAppShareContactsSuccessPayload, type MiniAppShareFilesErrorPayload, type MiniAppShareFilesPayload, type MiniAppShareFilesSuccessPayload, type MiniAppSignMessageErrorPayload, type MiniAppSignMessagePayload, type MiniAppSignMessageSuccessPayload, type MiniAppSignTypedDataErrorPayload, type MiniAppSignTypedDataPayload, type MiniAppSignTypedDataSuccessPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCodes, MiniKitInstallErrorMessage, type MiniKitInstallReturnType, Network, type PayCommandInput, type PayCommandPayload, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, Permission, type PermissionSettings, RequestPermissionErrorCodes, RequestPermissionErrorMessage, type RequestPermissionInput, type RequestPermissionPayload, ResponseEvent, SendHapticFeedbackErrorCodes, SendHapticFeedbackErrorMessage, type SendHapticFeedbackInput, type SendHapticFeedbackPayload, SendTransactionErrorCodes, SendTransactionErrorMessage, type SendTransactionInput, type SendTransactionPayload, ShareContactsErrorCodes, ShareContactsErrorMessage, type ShareContactsInput, type ShareContactsPayload, ShareFilesErrorCodes, ShareFilesErrorMessage, type ShareFilesInput, type ShareFilesPayload, SignMessageErrorCodes, SignMessageErrorMessage, type SignMessageInput, type SignMessagePayload, SignTypedDataErrorCodes, SignTypedDataErrorMessage, type SignTypedDataInput, type SignTypedDataPayload, type SiweMessage, TokenDecimals, Tokens, type TokensPayload, type User, type UserNameService, VerificationErrorMessage, type VerifyCommandInput, type VerifyCommandPayload, WalletAuthErrorCodes, WalletAuthErrorMessage, type WalletAuthInput, type WalletAuthPayload, type WebViewBasePayload, getIsUserVerified, parseSiweMessage, tokenToDecimals, verifySiweMessage };
632
+ export { type AsyncHandlerReturn, Command, type CommandReturnPayload, type Contact, type DeviceProperties, type EventHandler, type EventPayload, GetPermissionsErrorCodes, GetPermissionsErrorMessage, type GetPermissionsInput, type GetPermissionsPayload, MicrophoneErrorCodes, MicrophoneErrorMessage, type MiniAppGetPermissionsErrorPayload, type MiniAppGetPermissionsPayload, type MiniAppGetPermissionsSuccessPayload, type MiniAppMicrophoneErrorPayload, type MiniAppMicrophonePayload, type MiniAppMicrophoneSuccessPayload, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessPayload, type MiniAppRequestPermissionErrorPayload, type MiniAppRequestPermissionPayload, type MiniAppRequestPermissionSuccessPayload, type MiniAppSendHapticFeedbackErrorPayload, type MiniAppSendHapticFeedbackPayload, type MiniAppSendHapticFeedbackSuccessPayload, type MiniAppSendTransactionErrorPayload, type MiniAppSendTransactionPayload, type MiniAppSendTransactionSuccessPayload, type MiniAppShareContactsErrorPayload, type MiniAppShareContactsPayload, type MiniAppShareContactsSuccessPayload, type MiniAppShareErrorPayload, type MiniAppSharePayload, type MiniAppShareSuccessPayload, type MiniAppSignMessageErrorPayload, type MiniAppSignMessagePayload, type MiniAppSignMessageSuccessPayload, type MiniAppSignTypedDataErrorPayload, type MiniAppSignTypedDataPayload, type MiniAppSignTypedDataSuccessPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCodes, MiniKitInstallErrorMessage, type MiniKitInstallReturnType, Network, type PayCommandInput, type PayCommandPayload, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, Permission, type PermissionSettings, RequestPermissionErrorCodes, RequestPermissionErrorMessage, type RequestPermissionInput, type RequestPermissionPayload, ResponseEvent, SendHapticFeedbackErrorCodes, SendHapticFeedbackErrorMessage, type SendHapticFeedbackInput, type SendHapticFeedbackPayload, SendTransactionErrorCodes, SendTransactionErrorMessage, type SendTransactionInput, type SendTransactionPayload, ShareContactsErrorCodes, ShareContactsErrorMessage, type ShareContactsInput, type ShareContactsPayload, ShareFilesErrorCodes, ShareFilesErrorMessage, type ShareInput, type SharePayload, SignMessageErrorCodes, SignMessageErrorMessage, type SignMessageInput, type SignMessagePayload, SignTypedDataErrorCodes, SignTypedDataErrorMessage, type SignTypedDataInput, type SignTypedDataPayload, type SiweMessage, TokenDecimals, Tokens, type TokensPayload, type User, type UserNameService, VerificationErrorMessage, type VerifyCommandInput, type VerifyCommandPayload, WalletAuthErrorCodes, WalletAuthErrorMessage, type WalletAuthInput, type WalletAuthPayload, type WebViewBasePayload, getIsUserVerified, parseSiweMessage, tokenToDecimals, verifySiweMessage };
package/build/index.d.ts CHANGED
@@ -40,6 +40,7 @@ declare enum SendTransactionErrorCodes {
40
40
  TransactionFailed = "transaction_failed",
41
41
  GenericError = "generic_error",
42
42
  DisallowedOperation = "disallowed_operation",
43
+ ValidationError = "validation_error",
43
44
  InvalidContract = "invalid_contract",
44
45
  MaliciousOperation = "malicious_operation",
45
46
  DailyTxLimitReached = "daily_tx_limit_reached",
@@ -139,9 +140,17 @@ declare const ShareFilesErrorMessage: {
139
140
  generic_error: string;
140
141
  invalid_file_name: string;
141
142
  };
143
+ declare enum MicrophoneErrorCodes {
144
+ MiniAppPermissionNotEnabled = "mini_app_permission_not_enabled",
145
+ WorldAppPermissionNotEnabled = "world_app_permission_not_enabled"
146
+ }
147
+ declare const MicrophoneErrorMessage: {
148
+ mini_app_permission_not_enabled: string;
149
+ world_app_permission_not_enabled: string;
150
+ };
142
151
 
143
152
  declare enum Tokens {
144
- USDCE = "USDCE",
153
+ USDC = "USDCE",
145
154
  WLD = "WLD"
146
155
  }
147
156
  declare const TokenDecimals: {
@@ -181,7 +190,8 @@ declare enum Command {
181
190
  ShareContacts = "share-contacts",
182
191
  RequestPermission = "request-permission",
183
192
  GetPermissions = "get-permissions",
184
- SendHapticFeedback = "send-haptic-feedback"
193
+ SendHapticFeedback = "send-haptic-feedback",
194
+ Share = "share"
185
195
  }
186
196
  type WebViewBasePayload = {
187
197
  command: Command;
@@ -254,7 +264,8 @@ type ShareContactsInput = {
254
264
  type ShareContactsPayload = ShareContactsInput;
255
265
  declare enum Permission {
256
266
  Notifications = "notifications",
257
- Contacts = "contacts"
267
+ Contacts = "contacts",
268
+ Microphone = "microphone"
258
269
  }
259
270
  type RequestPermissionInput = {
260
271
  permission: Permission;
@@ -273,15 +284,22 @@ type SendHapticFeedbackInput = {
273
284
  style: 'light' | 'medium' | 'heavy';
274
285
  };
275
286
  type SendHapticFeedbackPayload = SendHapticFeedbackInput;
276
- type ShareFile = {
277
- url: string;
278
- saved_file_name_with_extension: string;
287
+ type ShareInput = {
288
+ files?: File[];
289
+ title?: string;
290
+ text?: string;
291
+ url?: string;
292
+ };
293
+ type SharePayload = {
294
+ files?: Array<{
295
+ name: string;
296
+ type: string;
297
+ data: string;
298
+ }>;
299
+ title?: string;
300
+ text?: string;
301
+ url?: string;
279
302
  };
280
- type ShareFilesInput = {
281
- files: ShareFile[];
282
- mime_type: string;
283
- };
284
- type ShareFilesPayload = ShareFilesInput;
285
303
  type CommandReturnPayloadMap = {
286
304
  [Command.Verify]: VerifyCommandPayload;
287
305
  [Command.Pay]: PayCommandPayload;
@@ -293,9 +311,40 @@ type CommandReturnPayloadMap = {
293
311
  [Command.RequestPermission]: RequestPermissionPayload;
294
312
  [Command.GetPermissions]: GetPermissionsPayload;
295
313
  [Command.SendHapticFeedback]: SendHapticFeedbackPayload;
314
+ [Command.Share]: SharePayload;
296
315
  };
297
316
  type CommandReturnPayload<T extends Command> = T extends keyof CommandReturnPayloadMap ? CommandReturnPayloadMap[T] : never;
298
317
 
318
+ type User = {
319
+ walletAddress?: string;
320
+ username?: string;
321
+ profilePictureUrl?: string;
322
+ permissions?: {
323
+ notifications: boolean;
324
+ contacts: boolean;
325
+ };
326
+ optedIntoOptionalAnalytics?: boolean;
327
+ /** @deprecated Moved to DeviceProperties */
328
+ worldAppVersion?: number;
329
+ /** @deprecated Moved to DeviceProperties */
330
+ deviceOS?: string;
331
+ };
332
+ type DeviceProperties = {
333
+ safeAreaInsets?: {
334
+ top: number;
335
+ right: number;
336
+ bottom: number;
337
+ left: number;
338
+ };
339
+ deviceOS?: string;
340
+ worldAppVersion?: number;
341
+ };
342
+ type UserNameService = {
343
+ walletAddress: string;
344
+ username?: string;
345
+ profilePictureUrl?: string;
346
+ };
347
+
299
348
  declare enum ResponseEvent {
300
349
  MiniAppVerifyAction = "miniapp-verify-action",
301
350
  MiniAppPayment = "miniapp-payment",
@@ -307,7 +356,8 @@ declare enum ResponseEvent {
307
356
  MiniAppRequestPermission = "miniapp-request-permission",
308
357
  MiniAppGetPermissions = "miniapp-get-permissions",
309
358
  MiniAppSendHapticFeedback = "miniapp-send-haptic-feedback",
310
- MiniAppShareFiles = "miniapp-share-files"
359
+ MiniAppShare = "miniapp-share",
360
+ MiniAppMicrophone = "miniapp-microphone"
311
361
  }
312
362
  type MiniAppVerifyActionSuccessPayload = {
313
363
  status: 'success';
@@ -455,18 +505,29 @@ type MiniAppSendHapticFeedbackErrorPayload = {
455
505
  version: number;
456
506
  };
457
507
  type MiniAppSendHapticFeedbackPayload = MiniAppSendHapticFeedbackSuccessPayload | MiniAppSendHapticFeedbackErrorPayload;
458
- type MiniAppShareFilesSuccessPayload = {
508
+ type MiniAppShareSuccessPayload = {
459
509
  status: 'success';
460
510
  shared_files_count: number;
461
511
  version: number;
462
512
  timestamp: string;
463
513
  };
464
- type MiniAppShareFilesErrorPayload = {
514
+ type MiniAppShareErrorPayload = {
465
515
  status: 'error';
466
516
  error_code: ShareFilesErrorCodes;
467
517
  version: number;
468
518
  };
469
- type MiniAppShareFilesPayload = MiniAppShareFilesSuccessPayload | MiniAppShareFilesErrorPayload;
519
+ type MiniAppSharePayload = MiniAppShareSuccessPayload | MiniAppShareErrorPayload;
520
+ type MiniAppMicrophoneSuccessPayload = {
521
+ status: 'success';
522
+ version: number;
523
+ timestamp: string;
524
+ };
525
+ type MiniAppMicrophoneErrorPayload = {
526
+ status: 'error';
527
+ error_code: MicrophoneErrorCodes;
528
+ version: number;
529
+ };
530
+ type MiniAppMicrophonePayload = MiniAppMicrophoneSuccessPayload | MiniAppMicrophoneErrorPayload;
470
531
  type EventPayloadMap = {
471
532
  [ResponseEvent.MiniAppVerifyAction]: MiniAppVerifyActionPayload;
472
533
  [ResponseEvent.MiniAppPayment]: MiniAppPaymentPayload;
@@ -478,37 +539,22 @@ type EventPayloadMap = {
478
539
  [ResponseEvent.MiniAppRequestPermission]: MiniAppRequestPermissionPayload;
479
540
  [ResponseEvent.MiniAppGetPermissions]: MiniAppGetPermissionsPayload;
480
541
  [ResponseEvent.MiniAppSendHapticFeedback]: MiniAppSendHapticFeedbackPayload;
481
- [ResponseEvent.MiniAppShareFiles]: MiniAppShareFilesPayload;
542
+ [ResponseEvent.MiniAppShare]: MiniAppSharePayload;
543
+ [ResponseEvent.MiniAppMicrophone]: MiniAppMicrophonePayload;
482
544
  };
483
545
  type EventPayload<T extends ResponseEvent = ResponseEvent> = T extends keyof EventPayloadMap ? EventPayloadMap[T] : never;
484
546
  type EventHandler<E extends ResponseEvent = ResponseEvent> = <T extends EventPayload<E>>(data: T) => void;
485
547
 
486
- type User = {
487
- walletAddress?: string;
488
- username?: string;
489
- profilePictureUrl?: string;
490
- permissions?: {
491
- notifications: boolean;
492
- contacts: boolean;
493
- };
494
- optedIntoOptionalAnalytics?: boolean;
495
- worldAppVersion?: number;
496
- deviceOS?: string;
497
- };
498
- type UserNameService = {
499
- walletAddress: string;
500
- username?: string;
501
- profilePictureUrl?: string;
502
- };
503
-
504
548
  declare class MiniKit {
505
549
  private static readonly MINIKIT_VERSION;
550
+ private static readonly MINIKIT_MINOR_VERSION;
506
551
  private static readonly miniKitCommandVersion;
507
552
  private static isCommandAvailable;
508
553
  private static listeners;
509
554
  static appId: string | null;
510
555
  static user: User;
511
556
  private static isReady;
557
+ static deviceProperties: DeviceProperties;
512
558
  private static sendInit;
513
559
  static subscribe<E extends ResponseEvent>(event: E, handler: EventHandler<E>): void;
514
560
  static unsubscribe(event: ResponseEvent): void;
@@ -531,6 +577,7 @@ declare class MiniKit {
531
577
  requestPermission: (payload: RequestPermissionInput) => RequestPermissionPayload | null;
532
578
  getPermissions: () => GetPermissionsPayload | null;
533
579
  sendHapticFeedback: (payload: SendHapticFeedbackInput) => SendHapticFeedbackPayload | null;
580
+ share: (payload: ShareInput) => ShareInput | null;
534
581
  };
535
582
  /**
536
583
  * This object contains async versions of all the commands.
@@ -553,6 +600,7 @@ declare class MiniKit {
553
600
  requestPermission: (payload: RequestPermissionInput) => AsyncHandlerReturn<RequestPermissionPayload | null, MiniAppRequestPermissionPayload>;
554
601
  getPermissions: () => AsyncHandlerReturn<GetPermissionsPayload | null, MiniAppGetPermissionsPayload>;
555
602
  sendHapticFeedback: (payload: SendHapticFeedbackInput) => AsyncHandlerReturn<SendHapticFeedbackPayload | null, MiniAppSendHapticFeedbackPayload>;
603
+ share: (payload: ShareInput) => AsyncHandlerReturn<ShareInput | null, MiniAppSharePayload>;
556
604
  };
557
605
  }
558
606
 
@@ -581,4 +629,4 @@ declare const verifySiweMessage: (payload: MiniAppWalletAuthSuccessPayload, nonc
581
629
 
582
630
  declare const getIsUserVerified: (walletAddress: string, rpcUrl?: string) => Promise<boolean>;
583
631
 
584
- export { type AsyncHandlerReturn, Command, type CommandReturnPayload, type Contact, type EventHandler, type EventPayload, GetPermissionsErrorCodes, GetPermissionsErrorMessage, type GetPermissionsInput, type GetPermissionsPayload, type MiniAppGetPermissionsErrorPayload, type MiniAppGetPermissionsPayload, type MiniAppGetPermissionsSuccessPayload, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessPayload, type MiniAppRequestPermissionErrorPayload, type MiniAppRequestPermissionPayload, type MiniAppRequestPermissionSuccessPayload, type MiniAppSendHapticFeedbackErrorPayload, type MiniAppSendHapticFeedbackPayload, type MiniAppSendHapticFeedbackSuccessPayload, type MiniAppSendTransactionErrorPayload, type MiniAppSendTransactionPayload, type MiniAppSendTransactionSuccessPayload, type MiniAppShareContactsErrorPayload, type MiniAppShareContactsPayload, type MiniAppShareContactsSuccessPayload, type MiniAppShareFilesErrorPayload, type MiniAppShareFilesPayload, type MiniAppShareFilesSuccessPayload, type MiniAppSignMessageErrorPayload, type MiniAppSignMessagePayload, type MiniAppSignMessageSuccessPayload, type MiniAppSignTypedDataErrorPayload, type MiniAppSignTypedDataPayload, type MiniAppSignTypedDataSuccessPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCodes, MiniKitInstallErrorMessage, type MiniKitInstallReturnType, Network, type PayCommandInput, type PayCommandPayload, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, Permission, type PermissionSettings, RequestPermissionErrorCodes, RequestPermissionErrorMessage, type RequestPermissionInput, type RequestPermissionPayload, ResponseEvent, SendHapticFeedbackErrorCodes, SendHapticFeedbackErrorMessage, type SendHapticFeedbackInput, type SendHapticFeedbackPayload, SendTransactionErrorCodes, SendTransactionErrorMessage, type SendTransactionInput, type SendTransactionPayload, ShareContactsErrorCodes, ShareContactsErrorMessage, type ShareContactsInput, type ShareContactsPayload, ShareFilesErrorCodes, ShareFilesErrorMessage, type ShareFilesInput, type ShareFilesPayload, SignMessageErrorCodes, SignMessageErrorMessage, type SignMessageInput, type SignMessagePayload, SignTypedDataErrorCodes, SignTypedDataErrorMessage, type SignTypedDataInput, type SignTypedDataPayload, type SiweMessage, TokenDecimals, Tokens, type TokensPayload, type User, type UserNameService, VerificationErrorMessage, type VerifyCommandInput, type VerifyCommandPayload, WalletAuthErrorCodes, WalletAuthErrorMessage, type WalletAuthInput, type WalletAuthPayload, type WebViewBasePayload, getIsUserVerified, parseSiweMessage, tokenToDecimals, verifySiweMessage };
632
+ export { type AsyncHandlerReturn, Command, type CommandReturnPayload, type Contact, type DeviceProperties, type EventHandler, type EventPayload, GetPermissionsErrorCodes, GetPermissionsErrorMessage, type GetPermissionsInput, type GetPermissionsPayload, MicrophoneErrorCodes, MicrophoneErrorMessage, type MiniAppGetPermissionsErrorPayload, type MiniAppGetPermissionsPayload, type MiniAppGetPermissionsSuccessPayload, type MiniAppMicrophoneErrorPayload, type MiniAppMicrophonePayload, type MiniAppMicrophoneSuccessPayload, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessPayload, type MiniAppRequestPermissionErrorPayload, type MiniAppRequestPermissionPayload, type MiniAppRequestPermissionSuccessPayload, type MiniAppSendHapticFeedbackErrorPayload, type MiniAppSendHapticFeedbackPayload, type MiniAppSendHapticFeedbackSuccessPayload, type MiniAppSendTransactionErrorPayload, type MiniAppSendTransactionPayload, type MiniAppSendTransactionSuccessPayload, type MiniAppShareContactsErrorPayload, type MiniAppShareContactsPayload, type MiniAppShareContactsSuccessPayload, type MiniAppShareErrorPayload, type MiniAppSharePayload, type MiniAppShareSuccessPayload, type MiniAppSignMessageErrorPayload, type MiniAppSignMessagePayload, type MiniAppSignMessageSuccessPayload, type MiniAppSignTypedDataErrorPayload, type MiniAppSignTypedDataPayload, type MiniAppSignTypedDataSuccessPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCodes, MiniKitInstallErrorMessage, type MiniKitInstallReturnType, Network, type PayCommandInput, type PayCommandPayload, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, Permission, type PermissionSettings, RequestPermissionErrorCodes, RequestPermissionErrorMessage, type RequestPermissionInput, type RequestPermissionPayload, ResponseEvent, SendHapticFeedbackErrorCodes, SendHapticFeedbackErrorMessage, type SendHapticFeedbackInput, type SendHapticFeedbackPayload, SendTransactionErrorCodes, SendTransactionErrorMessage, type SendTransactionInput, type SendTransactionPayload, ShareContactsErrorCodes, ShareContactsErrorMessage, type ShareContactsInput, type ShareContactsPayload, ShareFilesErrorCodes, ShareFilesErrorMessage, type ShareInput, type SharePayload, SignMessageErrorCodes, SignMessageErrorMessage, type SignMessageInput, type SignMessagePayload, SignTypedDataErrorCodes, SignTypedDataErrorMessage, type SignTypedDataInput, type SignTypedDataPayload, type SiweMessage, TokenDecimals, Tokens, type TokensPayload, type User, type UserNameService, VerificationErrorMessage, type VerifyCommandInput, type VerifyCommandPayload, WalletAuthErrorCodes, WalletAuthErrorMessage, type WalletAuthInput, type WalletAuthPayload, type WebViewBasePayload, getIsUserVerified, parseSiweMessage, tokenToDecimals, verifySiweMessage };
package/build/index.js CHANGED
@@ -3,6 +3,8 @@ import {
3
3
  Command,
4
4
  GetPermissionsErrorCodes,
5
5
  GetPermissionsErrorMessage,
6
+ MicrophoneErrorCodes,
7
+ MicrophoneErrorMessage,
6
8
  MiniKit,
7
9
  MiniKitInstallErrorCodes,
8
10
  MiniKitInstallErrorMessage,
@@ -34,7 +36,7 @@ import {
34
36
  parseSiweMessage,
35
37
  tokenToDecimals,
36
38
  verifySiweMessage
37
- } from "./chunk-VOZXVH3R.js";
39
+ } from "./chunk-DKXMTG56.js";
38
40
 
39
41
  // index.ts
40
42
  import { VerificationLevel } from "@worldcoin/idkit-core";
@@ -97,6 +99,8 @@ export {
97
99
  Command,
98
100
  GetPermissionsErrorCodes,
99
101
  GetPermissionsErrorMessage,
102
+ MicrophoneErrorCodes,
103
+ MicrophoneErrorMessage,
100
104
  MiniKit,
101
105
  MiniKitInstallErrorCodes,
102
106
  MiniKitInstallErrorMessage,