@magic-ext/magic-widget 0.1.0 → 1.0.0-canary.979.20834563242.0

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/dist/cjs/index.js CHANGED
@@ -14041,7 +14041,7 @@ function isValidEmail(source) {
14041
14041
  return emailRegex.test(source);
14042
14042
  }
14043
14043
 
14044
- var m=(o=>(o.MissingApiKey="MISSING_API_KEY",o.ModalNotReady="MODAL_NOT_READY",o.ConnectionLost="CONNECTION_WAS_LOST",o.MalformedResponse="MALFORMED_RESPONSE",o.InvalidArgument="INVALID_ARGUMENT",o.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",o.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",o))(m||{}),v=(s=>(s.SyncWeb3Method="SYNC_WEB3_METHOD",s.DuplicateIframe="DUPLICATE_IFRAME",s.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",s.DeprecationNotice="DEPRECATION_NOTICE",s.ProductAnnouncement="ANNOUNCEMENT",s))(v||{}),_=(i=>(i[i.ParseError=-32700]="ParseError",i[i.InvalidRequest=-32600]="InvalidRequest",i[i.MethodNotFound=-32601]="MethodNotFound",i[i.InvalidParams=-32602]="InvalidParams",i[i.InternalError=-32603]="InternalError",i[i.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",i[i.MagicLinkExpired=-10001]="MagicLinkExpired",i[i.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",i[i.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",i[i.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",i[i.UpdateEmailFailed=-10004]="UpdateEmailFailed",i[i.UserRequestEditEmail=-10005]="UserRequestEditEmail",i[i.InactiveRecipient=-10010]="InactiveRecipient",i[i.AccessDeniedToUser=-10011]="AccessDeniedToUser",i[i.RedirectLoginComplete=-10015]="RedirectLoginComplete",i[i.DpopInvalidated=-10019]="DpopInvalidated",i))(_||{});var u=(t=>(t.PROVIDER="magic_3pw_provider",t.ADDRESS="magic_3pw_address",t.CHAIN_ID="magic_3pw_chainId",t))(u||{}),g=(t=>(t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t.Web3ModalSelected="web3modal_selected",t))(g||{}),f=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e.RevealPK="magic_reveal_key",e.EnableMFA="magic_auth_enable_mfa_flow",e.DisableMFA="magic_auth_disable_mfa_flow",e.GetMultichainPublicAddress="magic_get_multichain_public_address",e))(f||{});var E=(c=>(c.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",c.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",c.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",c.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",c.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",c.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",c.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",c.MAGIC_PONG="MAGIC_PONG",c.MAGIC_POPUP_RESPONSE="MAGIC_POPUP_RESPONSE",c.MAGIC_POPUP_OAUTH_VERIFY_RESPONSE="MAGIC_POPUP_OAUTH_VERIFY_RESPONSE",c.MAGIC_THIRD_PARTY_WALLET_REQUEST="MAGIC_THIRD_PARTY_WALLET_REQUEST",c))(E||{}),A=(n=>(n.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",n.MAGIC_THIRD_PARTY_WALLET_RESPONSE="MAGIC_THIRD_PARTY_WALLET_RESPONSE",n.MAGIC_THIRD_PARTY_WALLET_UPDATE="MAGIC_THIRD_PARTY_WALLET_EVENT",n.MAGIC_PING="MAGIC_PING",n))(A||{});var R=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(R||{});var y=(r=>(r.Retry="retry",r))(y||{}),T=(d=>(d.EmailSent="email-sent",d.EmailNotDeliverable="email-not-deliverable",d))(T||{}),x=(s=>(s.VerifyEmailOtp="verify-email-otp",s.VerifyMFACode="verify-mfa-code",s.LostDevice="lost-device",s.VerifyRecoveryCode="verify-recovery-code",s.Cancel="cancel",s))(x||{}),I=(t=>(t.VerifySmsOtp="verify-sms-otp",t.Cancel="cancel",t.Retry="retry",t))(I||{}),h=(t=>(t.SmsOTPSent="sms-otp-sent",t.InvalidSmsOtp="invalid-sms-otp",t.ExpiredSmsOtp="expired-sms-otp",t))(h||{}),N=(p=>(p.EmailOTPSent="email-otp-sent",p.InvalidEmailOtp="invalid-email-otp",p.InvalidMfaOtp="invalid-mfa-otp",p.ExpiredEmailOtp="expired-email-otp",p.MfaSentHandle="mfa-sent-handle",p.RecoveryCodeSentHandle="recovery-code-sent-handle",p.InvalidRecoveryCode="invalid-recovery-code",p.RecoveryCodeSuccess="recovery-code-success",p.LoginThrottled="login-throttled",p))(N||{}),O=(r=>(r.Retry="device-retry",r))(O||{}),S=(n=>(n.DeviceApproved="device-approved",n.DeviceNeedsApproval="device-needs-approval",n.DeviceVerificationLinkExpired="device-verification-link-expired",n.DeviceVerificationEmailSent="device-verification-email-sent",n))(S||{}),C=(n=>(n.Retry="Recency/auth-factor-retry",n.Cancel="Recency/auth-factor-verification-cancel",n.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",n.VerifyMFACode="Recency/verify-mfa-code",n))(C||{}),b=(a=>(a.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",a.PrimaryAuthFactorVerified="Recency/auth-factor-verified",a.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",a.EmailExpired="Recency/auth-factor-verification-email-expired",a.EmailSent="Recency/auth-factor-verification-email-sent",a.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",a))(b||{}),L=(t=>(t.RetryWithNewEmail="UpdateEmail/retry-with-new-email",t.Cancel="UpdateEmail/new-email-verification-cancel",t.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",t))(L||{}),U=(l=>(l.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",l.EmailUpdated="UpdateEmail/email-updated",l.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",l.EmailExpired="UpdateEmail/new-email-verification-email-expired",l.EmailSent="UpdateEmail/new-email-verification-email-sent",l.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",l.InvalidEmail="UpdateEmail/new-email-invalid",l.EmailAlreadyExists="UpdateEmail/new-email-already-exists",l))(U||{}),F=(r=>(r.IDTokenCreated="Auth/id-token-created",r))(F||{}),D=(r=>(r.Cancel="Farcaster/cancel",r))(D||{}),k=(t=>(t.MFASecretGenerated="mfa-secret-generated",t.InvalidMFAOtp="invalid-mfa-otp",t.MFARecoveryCodes="mfa-recovery-codes",t))(k||{}),w=(d=>(d.VerifyMFACode="verify-mfa-code",d.Cancel="cancel-mfa-setup",d))(w||{}),G=(t=>(t.MFACodeRequested="mfa-code-requested",t.InvalidMFAOtp="invalid-mfa-otp",t.InvalidRecoveryCode="invalid-recovery-code",t))(G||{}),V=(t=>(t.VerifyMFACode="verify-mfa-code",t.LostDevice="lost-device",t.Cancel="cancel-mfa-disable",t))(V||{});var H=(r=>(r.Harmony="HARMONY",r))(H||{});var P=(r=>(r.ClosedByUser="closed-by-user",r))(P||{}),W=(r=>(r.ClosedByUser="closed-by-user-on-received",r))(W||{}),q=(o=>(o.EnterNewPhoneNumber="enter-new-phone-number",o.EnterOtpCode="enter-otp-code",o.RecoveryFactorAlreadyExists="recovery-factor-already-exists",o.MalformedPhoneNumber="malformed-phone-number",o.InvalidOtpCode="invalid-otp-code",o.RecoveryFactorUpdated="recovery-factor-updated",o.RecoveryFactorDeleted="recovery-factor-deleted",o))(q||{}),Y=(n=>(n.SendNewPhoneNumber="send-new-phone-number",n.SendOtpCode="send-otp-code",n.Cancel="cancel",n.StartEditPhoneNumber="start-edit-phone-number",n))(Y||{}),J=(r=>(r.PhoneNumber="phone_number",r))(J||{}),M=(a=>(a.SmsOtpSent="sms-otp-sent",a.LoginThrottled="login-throttled",a.InvalidSmsOtp="invalid-sms-otp",a.SmsVerified="sms-verified",a.AccountRecovered="account-recovered",a.UpdateEmailRequired="update-email-required",a))(M||{}),B=(n=>(n.Cancel="cancel",n.VerifyOtp="verify-otp-code",n.ResendSms="resend-sms-otp",n.UpdateEmail="update-email",n))(B||{});var Q=(n=>(n.Success="nft-checkout-success",n.Failure="nft-checkout-failure",n.Initiated="nft-checkout-initiated",n.Disconnect="disconnect",n))(Q||{});var j=(r=>(r.WalletInfoFetched="Wallet/wallet-info-fetched",r))(j||{});var X=(r=>(r.CloseMagicWindow="close-magic-window",r))(X||{});var $=(r=>(r.PopupUrl="popup-url",r))($||{}),z=(d=>(d.PopupEvent="popup-event",d.Cancel="cancel",d))(z||{});
14044
+ var m=(o=>(o.MissingApiKey="MISSING_API_KEY",o.ModalNotReady="MODAL_NOT_READY",o.ConnectionLost="CONNECTION_WAS_LOST",o.MalformedResponse="MALFORMED_RESPONSE",o.InvalidArgument="INVALID_ARGUMENT",o.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",o.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",o))(m||{}),v=(s=>(s.SyncWeb3Method="SYNC_WEB3_METHOD",s.DuplicateIframe="DUPLICATE_IFRAME",s.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",s.DeprecationNotice="DEPRECATION_NOTICE",s.ProductAnnouncement="ANNOUNCEMENT",s))(v||{}),_=(i=>(i[i.ParseError=-32700]="ParseError",i[i.InvalidRequest=-32600]="InvalidRequest",i[i.MethodNotFound=-32601]="MethodNotFound",i[i.InvalidParams=-32602]="InvalidParams",i[i.InternalError=-32603]="InternalError",i[i.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",i[i.MagicLinkExpired=-10001]="MagicLinkExpired",i[i.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",i[i.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",i[i.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",i[i.UpdateEmailFailed=-10004]="UpdateEmailFailed",i[i.UserRequestEditEmail=-10005]="UserRequestEditEmail",i[i.InactiveRecipient=-10010]="InactiveRecipient",i[i.AccessDeniedToUser=-10011]="AccessDeniedToUser",i[i.RedirectLoginComplete=-10015]="RedirectLoginComplete",i[i.DpopInvalidated=-10019]="DpopInvalidated",i))(_||{});var u=(t=>(t.PROVIDER="magic_3pw_provider",t.ADDRESS="magic_3pw_address",t.CHAIN_ID="magic_3pw_chainId",t))(u||{}),g=(t=>(t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t.Web3ModalSelected="web3modal_selected",t))(g||{}),f=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e.RevealPK="magic_reveal_key",e.EnableMFA="magic_auth_enable_mfa_flow",e.DisableMFA="magic_auth_disable_mfa_flow",e.GetMultichainPublicAddress="magic_get_multichain_public_address",e))(f||{});var E=(c=>(c.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",c.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",c.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",c.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",c.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",c.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",c.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",c.MAGIC_PONG="MAGIC_PONG",c.MAGIC_POPUP_RESPONSE="MAGIC_POPUP_RESPONSE",c.MAGIC_POPUP_OAUTH_VERIFY_RESPONSE="MAGIC_POPUP_OAUTH_VERIFY_RESPONSE",c.MAGIC_THIRD_PARTY_WALLET_REQUEST="MAGIC_THIRD_PARTY_WALLET_REQUEST",c))(E||{}),A=(n=>(n.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",n.MAGIC_THIRD_PARTY_WALLET_RESPONSE="MAGIC_THIRD_PARTY_WALLET_RESPONSE",n.MAGIC_THIRD_PARTY_WALLET_UPDATE="MAGIC_THIRD_PARTY_WALLET_EVENT",n.MAGIC_PING="MAGIC_PING",n))(A||{});var R=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(R||{});var y=(r=>(r.Retry="retry",r))(y||{}),T=(p=>(p.EmailSent="email-sent",p.EmailNotDeliverable="email-not-deliverable",p))(T||{}),x=(s=>(s.VerifyEmailOtp="verify-email-otp",s.VerifyMFACode="verify-mfa-code",s.LostDevice="lost-device",s.VerifyRecoveryCode="verify-recovery-code",s.Cancel="cancel",s))(x||{}),I=(t=>(t.VerifySmsOtp="verify-sms-otp",t.Cancel="cancel",t.Retry="retry",t))(I||{}),h=(t=>(t.SmsOTPSent="sms-otp-sent",t.InvalidSmsOtp="invalid-sms-otp",t.ExpiredSmsOtp="expired-sms-otp",t))(h||{}),N=(d=>(d.EmailOTPSent="email-otp-sent",d.InvalidEmailOtp="invalid-email-otp",d.InvalidMfaOtp="invalid-mfa-otp",d.ExpiredEmailOtp="expired-email-otp",d.MfaSentHandle="mfa-sent-handle",d.RecoveryCodeSentHandle="recovery-code-sent-handle",d.InvalidRecoveryCode="invalid-recovery-code",d.RecoveryCodeSuccess="recovery-code-success",d.LoginThrottled="login-throttled",d))(N||{}),O=(r=>(r.Retry="device-retry",r))(O||{}),S=(n=>(n.DeviceApproved="device-approved",n.DeviceNeedsApproval="device-needs-approval",n.DeviceVerificationLinkExpired="device-verification-link-expired",n.DeviceVerificationEmailSent="device-verification-email-sent",n))(S||{}),C=(n=>(n.Retry="Recency/auth-factor-retry",n.Cancel="Recency/auth-factor-verification-cancel",n.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",n.VerifyMFACode="Recency/verify-mfa-code",n))(C||{}),b=(a=>(a.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",a.PrimaryAuthFactorVerified="Recency/auth-factor-verified",a.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",a.EmailExpired="Recency/auth-factor-verification-email-expired",a.EmailSent="Recency/auth-factor-verification-email-sent",a.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",a))(b||{}),L=(t=>(t.RetryWithNewEmail="UpdateEmail/retry-with-new-email",t.Cancel="UpdateEmail/new-email-verification-cancel",t.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",t))(L||{}),U=(l=>(l.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",l.EmailUpdated="UpdateEmail/email-updated",l.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",l.EmailExpired="UpdateEmail/new-email-verification-email-expired",l.EmailSent="UpdateEmail/new-email-verification-email-sent",l.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",l.InvalidEmail="UpdateEmail/new-email-invalid",l.EmailAlreadyExists="UpdateEmail/new-email-already-exists",l))(U||{}),F=(r=>(r.IDTokenCreated="Auth/id-token-created",r))(F||{}),k=(r=>(r.Cancel="Farcaster/cancel",r))(k||{}),D=(t=>(t.MFASecretGenerated="mfa-secret-generated",t.InvalidMFAOtp="invalid-mfa-otp",t.MFARecoveryCodes="mfa-recovery-codes",t))(D||{}),w=(p=>(p.VerifyMFACode="verify-mfa-code",p.Cancel="cancel-mfa-setup",p))(w||{}),G=(t=>(t.MFACodeRequested="mfa-code-requested",t.InvalidMFAOtp="invalid-mfa-otp",t.InvalidRecoveryCode="invalid-recovery-code",t))(G||{}),V=(t=>(t.VerifyMFACode="verify-mfa-code",t.LostDevice="lost-device",t.Cancel="cancel-mfa-disable",t))(V||{});var H=(r=>(r.Harmony="HARMONY",r))(H||{});var P=(r=>(r.ClosedByUser="closed-by-user",r))(P||{}),W=(r=>(r.ClosedByUser="closed-by-user-on-received",r))(W||{}),q=(o=>(o.EnterNewPhoneNumber="enter-new-phone-number",o.EnterOtpCode="enter-otp-code",o.RecoveryFactorAlreadyExists="recovery-factor-already-exists",o.MalformedPhoneNumber="malformed-phone-number",o.InvalidOtpCode="invalid-otp-code",o.RecoveryFactorUpdated="recovery-factor-updated",o.RecoveryFactorDeleted="recovery-factor-deleted",o))(q||{}),Y=(n=>(n.SendNewPhoneNumber="send-new-phone-number",n.SendOtpCode="send-otp-code",n.Cancel="cancel",n.StartEditPhoneNumber="start-edit-phone-number",n))(Y||{}),J=(r=>(r.PhoneNumber="phone_number",r))(J||{}),M=(a=>(a.SmsOtpSent="sms-otp-sent",a.LoginThrottled="login-throttled",a.InvalidSmsOtp="invalid-sms-otp",a.SmsVerified="sms-verified",a.AccountRecovered="account-recovered",a.UpdateEmailRequired="update-email-required",a))(M||{}),B=(n=>(n.Cancel="cancel",n.VerifyOtp="verify-otp-code",n.ResendSms="resend-sms-otp",n.UpdateEmail="update-email",n))(B||{});var Q=(n=>(n.Success="nft-checkout-success",n.Failure="nft-checkout-failure",n.Initiated="nft-checkout-initiated",n.Disconnect="disconnect",n))(Q||{});var $=(r=>(r.WalletInfoFetched="Wallet/wallet-info-fetched",r))($||{});var j=(r=>(r.CloseMagicWindow="close-magic-window",r))(j||{});var X=(r=>(r.PopupUrl="popup-url",r))(X||{}),z=(p=>(p.PopupEvent="popup-event",p.Cancel="cancel",p))(z||{});
14045
14045
 
14046
14046
  // Reown project ID
14047
14047
  const projectId = '141e0e0e531b47a47d662bca4eb70fae';
@@ -14236,13 +14236,23 @@ class MagicWidgetExtension extends provider.Extension.Internal {
14236
14236
  if (account.address && account.address !== storedAddress) {
14237
14237
  localStorage.setItem(u.ADDRESS, account.address);
14238
14238
  this.sdk.rpcProvider.emit('accountsChanged', [account.address]);
14239
- this.postWalletUpdate(account);
14239
+ this.dispatchWalletUpdate({
14240
+ chain: account.chain,
14241
+ address: account.address,
14242
+ addresses: account.addresses,
14243
+ updatedField: 'address',
14244
+ });
14240
14245
  }
14241
14246
  // Chain changed
14242
14247
  if (account.chainId && account.chainId.toString() !== storedChainId) {
14243
14248
  localStorage.setItem(u.CHAIN_ID, account.chainId.toString());
14244
14249
  this.sdk.rpcProvider.emit('chainChanged', account.chainId);
14245
- this.postWalletUpdate(account);
14250
+ this.dispatchWalletUpdate({
14251
+ chain: account.chain,
14252
+ address: account.address,
14253
+ addresses: account.addresses,
14254
+ updatedField: 'chain',
14255
+ });
14246
14256
  }
14247
14257
  },
14248
14258
  });
@@ -14267,12 +14277,9 @@ class MagicWidgetExtension extends provider.Extension.Internal {
14267
14277
  console.error('Failed to invalidate Magic session after wallet disconnect:', error);
14268
14278
  }
14269
14279
  }
14270
- async postWalletUpdate(account) {
14280
+ async dispatchWalletUpdate(details) {
14271
14281
  try {
14272
- this.sdk.overlay.postThirdPartyWalletUpdate({
14273
- account: account.address,
14274
- chainId: account.chainId,
14275
- });
14282
+ this.sdk.overlay.postThirdPartyWalletUpdate(details);
14276
14283
  }
14277
14284
  catch (error) {
14278
14285
  console.error('Failed to post third party wallet event:', error);