@privy-io/api-base 1.9.4 → 1.10.0-beta-20260827192706

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
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("./schemas/error.js"),e=require("./classes/api-error.js"),o=require("./constants/error-codes.js");require("zod"),exports.APIError=r.APIError,exports.AccountTransferRequiredError=e.AccountTransferRequiredError,exports.AllowlistRejectedError=e.AllowlistRejectedError,exports.ForbiddenError=e.ForbiddenError,exports.HttpError=e.HttpError,exports.InsufficientBalanceError=e.InsufficientBalanceError,exports.InternalServerError=e.InternalServerError,exports.InvalidInputError=e.InvalidInputError,exports.LegacyInvalidInputError=e.LegacyInvalidInputError,exports.NotFoundError=e.NotFoundError,exports.PaymentFailedError=e.PaymentFailedError,exports.RequestTimeoutError=e.RequestTimeoutError,exports.ResourceConflictError=e.ResourceConflictError,exports.TooManyRequestsError=e.TooManyRequestsError,exports.UnauthorizedError=e.UnauthorizedError,exports.UnsupportedMediaType=e.UnsupportedMediaType,exports.PrivyErrorCode=o.PrivyErrorCode;
2
- //# sourceMappingURL=index.js.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("zod"),t=function(e){return e.OAUTH_ACCOUNT_SUSPENDED=`oauth_account_suspended`,e.MISSING_OR_INVALID_PRIVY_APP_ID=`missing_or_invalid_privy_app_id`,e.MISSING_OR_INVALID_PRIVY_CLIENT_ID=`missing_or_invalid_privy_client_id`,e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID=`missing_or_invalid_privy_account_id`,e.MISSING_OR_INVALID_TOKEN=`missing_or_invalid_token`,e.MISSING_MFA_ENROLLMENT=`missing_mfa_enrollment`,e.MISSING_OR_INVALID_MFA=`missing_or_invalid_mfa`,e.EXPIRED_OR_INVALID_MFA_TOKEN=`expired_or_invalid_mfa_token`,e.INVALID_DATA=`invalid_data`,e.INVALID_CREDENTIALS=`invalid_credentials`,e.PASSKEY_NOT_REGISTERED=`passkey_not_registered`,e.INVALID_CAPTCHA=`invalid_captcha`,e.LINKED_TO_ANOTHER_USER=`linked_to_another_user`,e.ALLOWLIST_REJECTED=`allowlist_rejected`,e.CANNOT_UNLINK_EMBEDDED_WALLET=`cannot_unlink_embedded_wallet`,e.CANNOT_UNLINK_SOLE_ACCOUNT=`cannot_unlink_sole_account`,e.CANNOT_LINK_MORE_OF_TYPE=`cannot_link_more_of_type`,e.LINKED_ACCOUNT_NOT_FOUND=`linked_account_not_found`,e.TOO_MANY_REQUESTS=`too_many_requests`,e.RESOURCE_CONFLICT=`resource_conflict`,e.INVALID_ORIGIN=`invalid_origin`,e.MISSING_ORIGIN=`missing_origin`,e.INVALID_NATIVE_APP_ID=`invalid_native_app_id`,e.TOKEN_ALREADY_USED=`token_already_used`,e.ALREADY_LOGGED_OUT=`already_logged_out`,e.NOT_SUPPORTED=`not_supported`,e.USER_UNSUBSCRIBED=`user_unsubscribed`,e.MAX_APPS_REACHED=`max_apps_reached`,e.USER_LIMIT_REACHED=`max_accounts_reached`,e.DEVICE_REVOKED=`device_revoked`,e.WALLET_PASSWORD_EXISTS=`wallet_password_exists`,e.OAUTH_STATE_MISMATCH=`oauth_state_mismatch`,e.MAX_DENYLIST_ENTRIES_REACHED=`max_denylist_entries_reached`,e.MAX_TEST_ACCOUNTS_REACHED=`max_test_accounts_reached`,e.DISALLOWED_LOGIN_METHOD=`disallowed_login_method`,e.DISALLOWED_PLUS_EMAIL=`disallowed_plus_email`,e.DISALLOWED_RECOVERY_METHOD=`disallowed_recovery_method`,e.LEGACY_DASHBOARD_LOGIN_CONFIGURATION=`legacy_dashboard_login_configuration`,e.CANNOT_SET_PASSWORD=`cannot_set_password`,e.INVALID_PKCE_PARAMETERS=`invalid_pkce_parameters`,e.INVALID_APP_URL_SCHEME_CONFIGURATION=`invalid_app_url_scheme_configuration`,e.CROSS_APP_CONNECTION_NOT_ALLOWED=`cross_app_connection_not_allowed`,e.USER_DOES_NOT_EXIST=`user_does_not_exist`,e.ALREADY_EXISTS=`resource_already_exists`,e.ACCOUNT_TRANSFER_REQUIRED=`account_transfer_required`,e.USER_HAS_NOT_DELEGATED_WALLET=`user_has_not_delegated_wallet`,e.FEATURE_NOT_ENABLED=`feature_not_enabled`,e.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED=`onramp_minimum_identity_verification_required`,e.ONRAMP_IDENTITY_VERIFICATION_REQUIRED=`onramp_identity_verification_required`,e.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED=`onramp_document_verification_required`,e.ONRAMP_UNSUPPORTED_INFORMATION=`onramp_unsupported_information`,e.ONRAMP_TRANSACTION_LIMIT_REACHED=`transaction_limit_reached`,e.ONRAMP_QUOTE_EXPIRED=`onramp_quote_expired`,e.INSUFFICIENT_FUNDS=`insufficient_funds`,e.TRANSACTION_BROADCAST_FAILURE=`transaction_broadcast_failure`,e.TRANSACTION_EXECUTION_FAILURE=`transaction_execution_failure`,e.INVALID_SOLANA_TRANSACTION=`invalid_solana_transaction`,e.INVALID_POLICY_FORMAT=`invalid_policy_format`,e.INVALID_AGGREGATION_FORMAT=`invalid_aggregation_format`,e.POLICY_VIOLATION=`policy_violation`,e.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS=`authorization_key_has_associated_wallets`,e.COMPLIANCE_BLOCKED=`compliance_blocked`,e.INVALID_REQUEST=`invalid_request`,e.SIGNUP_DISABLED=`signup_disabled`,e.INVALID_STATE=`invalid_state`,e.WALLET_ENTITY_ASSIGNMENT_FAILED=`wallet_entity_assignment_failed`,e.WALLET_ENTITY_LIMIT_EXCEEDED=`wallet_entity_limit_exceeded`,e.WALLET_ENTITY_ALREADY_SET=`wallet_entity_already_set`,e}({});var n=class extends Error{status;code;responseData;constructor(e,t,n,r){super(t),this.status=e,this.code=n,this.name=`HttpError`,this.responseData=r}toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:``}`}},r=class extends n{constructor(e,t){super(400,e,t||`invalid_data`),this.name=`InvalidInputError`}},i=class extends n{constructor(e,t){super(401,e,t),this.name=`UnauthorizedError`}},a=class extends i{constructor(e){super(e||`User is not allowed to login to this app.`,`allowlist_rejected`),this.name=`AllowlistRejectedError`}},o=class extends n{constructor(e,t){super(403,e,t),this.name=`ForbiddenError`}},s=class extends n{constructor(e){super(404,e),this.name=`NotFoundError`}},c=class extends n{constructor(e,t){super(408,e,t),this.name=`RequestTimeoutError`}},l=class extends n{constructor(e){super(415,e),this.name=`UnsupportedMediaType`}},u=class extends n{constructor(e,t){super(422,e,t),this.name=`LegacyInvalidInputError`}},d=class extends n{constructor(e){super(429,e||`Too many requests. Please wait to try again.`,`too_many_requests`),this.name=`TooManyRequestsError`}},f=class extends n{constructor(e,t){super(409,e||`Conflict encountered while trying to modify resource.`,t||`resource_conflict`),this.name=`ResourceConflictError`}},p=class extends n{constructor(e){super(400,e||`Insufficient balance.`,`insufficient_funds`),this.name=`InsufficientBalanceError`}},m=class extends n{constructor(e){super(402,e||`Payment failed.`)}},h=class extends n{constructor(e,t,n){super(500,e||`Service unavailable.`,t,n),this.name=`InternalServerError`}},g=class extends n{data;constructor(e){super(400,`Account transfer required`,`account_transfer_required`,e),this.data=e,this.name=`AccountTransferRequiredError`}};const _=e.z.object({error:e.z.string(),cause:e.z.string().optional(),code:e.z.nativeEnum(t).optional()});exports.APIError=_,exports.AccountTransferRequiredError=g,exports.AllowlistRejectedError=a,exports.ForbiddenError=o,exports.HttpError=n,exports.InsufficientBalanceError=p,exports.InternalServerError=h,exports.InvalidInputError=r,exports.LegacyInvalidInputError=u,exports.NotFoundError=s,exports.PaymentFailedError=m,exports.PrivyErrorCode=t,exports.RequestTimeoutError=c,exports.ResourceConflictError=f,exports.TooManyRequestsError=d,exports.UnauthorizedError=i,exports.UnsupportedMediaType=l;
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","names":["z"],"sources":["../../src/constants/error-codes.ts","../../src/classes/api-error.ts","../../src/schemas/error.ts"],"mappings":"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"}
@@ -1,174 +1,183 @@
1
- import { z } from 'zod';
2
-
1
+ import { z } from "zod";
2
+ //#region src/constants/error-codes.d.ts
3
3
  declare enum PrivyErrorCode {
4
- /** The user's OAuth account is suspended and is not allowed. */
5
- OAUTH_ACCOUNT_SUSPENDED = "oauth_account_suspended",
6
- /** The Privy app id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
7
- MISSING_OR_INVALID_PRIVY_APP_ID = "missing_or_invalid_privy_app_id",
8
- /** The Privy app client id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
9
- MISSING_OR_INVALID_PRIVY_CLIENT_ID = "missing_or_invalid_privy_client_id",
10
- /** The Privy account id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
11
- MISSING_OR_INVALID_PRIVY_ACCOUNT_ID = "missing_or_invalid_privy_account_id",
12
- /** The refresh or access token is either not provided or not valid. */
13
- MISSING_OR_INVALID_TOKEN = "missing_or_invalid_token",
14
- /** The user does not have any enrolled MFA methods but one is required. */
15
- MISSING_MFA_ENROLLMENT = "missing_mfa_enrollment",
16
- /** The user does not have a valid MFA connected */
17
- MISSING_OR_INVALID_MFA = "missing_or_invalid_mfa",
18
- /** The MFA Token provided has expired */
19
- EXPIRED_OR_INVALID_MFA_TOKEN = "expired_or_invalid_mfa_token",
20
- /** The body of the request contains input that is invalid. Check the response body for detailed information. */
21
- INVALID_DATA = "invalid_data",
22
- /** A form of INVALID_DATA specifically when the user is trying to authenticate and did not match the provided challenge. */
23
- INVALID_CREDENTIALS = "invalid_credentials",
24
- /** When the user is trying to authenticate and did provide a valid CAPTCHA token. */
25
- INVALID_CAPTCHA = "invalid_captcha",
26
- /** You attempted to link an account that belongs to another user. */
27
- LINKED_TO_ANOTHER_USER = "linked_to_another_user",
28
- /** This app has an allowlist and the login account was not included. Either disable the allowlist or have the user try again with a different account. */
29
- ALLOWLIST_REJECTED = "allowlist_rejected",
30
- /** Embedded wallets cannot be unlinked */
31
- CANNOT_UNLINK_EMBEDDED_WALLET = "cannot_unlink_embedded_wallet",
32
- /** You are unable to unlink an account when there is only one account present. */
33
- CANNOT_UNLINK_SOLE_ACCOUNT = "cannot_unlink_sole_account",
34
- /** Cannot link another account of this type */
35
- CANNOT_LINK_MORE_OF_TYPE = "cannot_link_more_of_type",
36
- /** Linked account cannot be found. The account was either invalid or has already been unlinked. */
37
- LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
38
- /** Too many requests. Please wait to try again. */
39
- TOO_MANY_REQUESTS = "too_many_requests",
40
- /** Conflict encountered while trying to update resource. */
41
- RESOURCE_CONFLICT = "resource_conflict",
42
- /** Origin was expected and is invalid. */
43
- INVALID_ORIGIN = "invalid_origin",
44
- /** Origin was expected and is not set. */
45
- MISSING_ORIGIN = "missing_origin",
46
- /** Native App ID was expected and is invalid. */
47
- INVALID_NATIVE_APP_ID = "invalid_native_app_id",
48
- /** Refresh token re-use detected. */
49
- TOKEN_ALREADY_USED = "token_already_used",
50
- /** Attempting to log out of a session that does not exist. */
51
- ALREADY_LOGGED_OUT = "already_logged_out",
52
- /** The value (phone number, email) that was submitted is not supported. */
53
- NOT_SUPPORTED = "not_supported",
54
- /** You have previously unsubscribed from the sending email/phone number. */
55
- USER_UNSUBSCRIBED = "user_unsubscribed",
56
- /** You have reached the maximum number of apps allowed per account. */
57
- MAX_APPS_REACHED = "max_apps_reached",
58
- /** You have reached the maximum number of users allowed per app. */
59
- USER_LIMIT_REACHED = "max_accounts_reached",
60
- /** You are trying to reconstruct an embedded wallet on a device that has been marked as revoked */
61
- DEVICE_REVOKED = "device_revoked",
62
- /** You attempted to set a password on a wallet with an existing password */
63
- WALLET_PASSWORD_EXISTS = "wallet_password_exists",
64
- /** The user attempted to complete an oauth flow with a different state than started. */
65
- OAUTH_STATE_MISMATCH = "oauth_state_mismatch",
66
- /** You have reached the maximum number of denylist entries allowed per app. */
67
- MAX_DENYLIST_ENTRIES_REACHED = "max_denylist_entries_reached",
68
- /** You have reached the maximum number of test account entries allowed per app. */
69
- MAX_TEST_ACCOUNTS_REACHED = "max_test_accounts_reached",
70
- /** The user attempted to log in or link a disallowed method. */
71
- DISALLOWED_LOGIN_METHOD = "disallowed_login_method",
72
- /** The user attempted to log in with an email address with a + in it, but the app is configured to disallow this */
73
- DISALLOWED_PLUS_EMAIL = "disallowed_plus_email",
74
- /** The user attempted to recover their embedded wallet via a disallowed method. */
75
- DISALLOWED_RECOVERY_METHOD = "disallowed_recovery_method",
76
- /** The customer must enforce login methods through the dashboard */
77
- LEGACY_DASHBOARD_LOGIN_CONFIGURATION = "legacy_dashboard_login_configuration",
78
- /** Cannot set password on this wallet */
79
- CANNOT_SET_PASSWORD = "cannot_set_password",
80
- /** Invalid PKCE parameters */
81
- INVALID_PKCE_PARAMETERS = "invalid_pkce_parameters",
82
- /** Invalid app url scheme configuration */
83
- INVALID_APP_URL_SCHEME_CONFIGURATION = "invalid_app_url_scheme_configuration",
84
- /** This app is not permitted to provider to target app */
85
- CROSS_APP_CONNECTION_NOT_ALLOWED = "cross_app_connection_not_allowed",
86
- /** There is no user with this login method */
87
- USER_DOES_NOT_EXIST = "user_does_not_exist",
88
- /** The resource already exists */
89
- ALREADY_EXISTS = "resource_already_exists",
90
- ACCOUNT_TRANSFER_REQUIRED = "account_transfer_required",
91
- /** The user has not consented to delegated actions for this wallet */
92
- USER_HAS_NOT_DELEGATED_WALLET = "user_has_not_delegated_wallet",
93
- /** This feature is not enabled on the app */
94
- FEATURE_NOT_ENABLED = "feature_not_enabled",
95
- /** The onramp requires minimum identity verification before the user can continue. */
96
- ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED = "onramp_minimum_identity_verification_required",
97
- /** The onramp requires identity verification before the user can continue. */
98
- ONRAMP_IDENTITY_VERIFICATION_REQUIRED = "onramp_identity_verification_required",
99
- /** The onramp requires document verification before the user can continue. */
100
- ONRAMP_DOCUMENT_VERIFICATION_REQUIRED = "onramp_document_verification_required",
101
- /** The wallet address is not supported for this onramp. */
102
- ONRAMP_UNSUPPORTED_INFORMATION = "onramp_unsupported_information",
103
- /** The onramp purchase is above the user's current transaction limit. */
104
- ONRAMP_TRANSACTION_LIMIT_REACHED = "transaction_limit_reached",
105
- /** The onramp quote expired before payment completed. */
106
- ONRAMP_QUOTE_EXPIRED = "onramp_quote_expired",
107
- /** Wallet has insufficent funds for transaction */
108
- INSUFFICIENT_FUNDS = "insufficient_funds",
109
- /** Transaction broadcast failure */
110
- TRANSACTION_BROADCAST_FAILURE = "transaction_broadcast_failure",
111
- /** Transaction execution failure */
112
- TRANSACTION_EXECUTION_FAILURE = "transaction_execution_failure",
113
- /** The Solana transaction could not be deserialized */
114
- INVALID_SOLANA_TRANSACTION = "invalid_solana_transaction",
115
- /** Invalid policy format */
116
- INVALID_POLICY_FORMAT = "invalid_policy_format",
117
- /** Invalid aggregation format */
118
- INVALID_AGGREGATION_FORMAT = "invalid_aggregation_format",
119
- /** Policy violation */
120
- POLICY_VIOLATION = "policy_violation",
121
- /** Authorization key has associated wallets */
122
- AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
123
- /** Operation blocked for compliance reasons. */
124
- COMPLIANCE_BLOCKED = "compliance_blocked",
125
- /** Invalid request */
126
- INVALID_REQUEST = "invalid_request",
127
- /** User sign ups are suspended for this account. */
128
- SIGNUP_DISABLED = "signup_disabled",
129
- /** The resource exists but is not in a valid state for this operation. */
130
- INVALID_STATE = "invalid_state"
131
- }
132
-
4
+ /** The user's OAuth account is suspended and is not allowed. */
5
+ OAUTH_ACCOUNT_SUSPENDED = "oauth_account_suspended",
6
+ /** The Privy app id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
7
+ MISSING_OR_INVALID_PRIVY_APP_ID = "missing_or_invalid_privy_app_id",
8
+ /** The Privy app client id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
9
+ MISSING_OR_INVALID_PRIVY_CLIENT_ID = "missing_or_invalid_privy_client_id",
10
+ /** The Privy account id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
11
+ MISSING_OR_INVALID_PRIVY_ACCOUNT_ID = "missing_or_invalid_privy_account_id",
12
+ /** The refresh or access token is either not provided or not valid. */
13
+ MISSING_OR_INVALID_TOKEN = "missing_or_invalid_token",
14
+ /** The user does not have any enrolled MFA methods but one is required. */
15
+ MISSING_MFA_ENROLLMENT = "missing_mfa_enrollment",
16
+ /** The user does not have a valid MFA connected */
17
+ MISSING_OR_INVALID_MFA = "missing_or_invalid_mfa",
18
+ /** The MFA Token provided has expired */
19
+ EXPIRED_OR_INVALID_MFA_TOKEN = "expired_or_invalid_mfa_token",
20
+ /** The body of the request contains input that is invalid. Check the response body for detailed information. */
21
+ INVALID_DATA = "invalid_data",
22
+ /** A form of INVALID_DATA specifically when the user is trying to authenticate and did not match the provided challenge. */
23
+ INVALID_CREDENTIALS = "invalid_credentials",
24
+ /** The passkey the user authenticated with is not registered for this app. The credential may have been created under a different credential manager or app. Prompt the user for another login method. */
25
+ PASSKEY_NOT_REGISTERED = "passkey_not_registered",
26
+ /** When the user is trying to authenticate and did provide a valid CAPTCHA token. */
27
+ INVALID_CAPTCHA = "invalid_captcha",
28
+ /** You attempted to link an account that belongs to another user. */
29
+ LINKED_TO_ANOTHER_USER = "linked_to_another_user",
30
+ /** This app has an allowlist and the login account was not included. Either disable the allowlist or have the user try again with a different account. */
31
+ ALLOWLIST_REJECTED = "allowlist_rejected",
32
+ /** Embedded wallets cannot be unlinked */
33
+ CANNOT_UNLINK_EMBEDDED_WALLET = "cannot_unlink_embedded_wallet",
34
+ /** You are unable to unlink an account when there is only one account present. */
35
+ CANNOT_UNLINK_SOLE_ACCOUNT = "cannot_unlink_sole_account",
36
+ /** Cannot link another account of this type */
37
+ CANNOT_LINK_MORE_OF_TYPE = "cannot_link_more_of_type",
38
+ /** Linked account cannot be found. The account was either invalid or has already been unlinked. */
39
+ LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
40
+ /** Too many requests. Please wait to try again. */
41
+ TOO_MANY_REQUESTS = "too_many_requests",
42
+ /** Conflict encountered while trying to update resource. */
43
+ RESOURCE_CONFLICT = "resource_conflict",
44
+ /** Origin was expected and is invalid. */
45
+ INVALID_ORIGIN = "invalid_origin",
46
+ /** Origin was expected and is not set. */
47
+ MISSING_ORIGIN = "missing_origin",
48
+ /** Native App ID was expected and is invalid. */
49
+ INVALID_NATIVE_APP_ID = "invalid_native_app_id",
50
+ /** Refresh token re-use detected. */
51
+ TOKEN_ALREADY_USED = "token_already_used",
52
+ /** Attempting to log out of a session that does not exist. */
53
+ ALREADY_LOGGED_OUT = "already_logged_out",
54
+ /** The value (phone number, email) that was submitted is not supported. */
55
+ NOT_SUPPORTED = "not_supported",
56
+ /** You have previously unsubscribed from the sending email/phone number. */
57
+ USER_UNSUBSCRIBED = "user_unsubscribed",
58
+ /** You have reached the maximum number of apps allowed per account. */
59
+ MAX_APPS_REACHED = "max_apps_reached",
60
+ /** You have reached the maximum number of users allowed per app. */
61
+ USER_LIMIT_REACHED = "max_accounts_reached",
62
+ /** You are trying to reconstruct an embedded wallet on a device that has been marked as revoked */
63
+ DEVICE_REVOKED = "device_revoked",
64
+ /** You attempted to set a password on a wallet with an existing password */
65
+ WALLET_PASSWORD_EXISTS = "wallet_password_exists",
66
+ /** The user attempted to complete an oauth flow with a different state than started. */
67
+ OAUTH_STATE_MISMATCH = "oauth_state_mismatch",
68
+ /** You have reached the maximum number of denylist entries allowed per app. */
69
+ MAX_DENYLIST_ENTRIES_REACHED = "max_denylist_entries_reached",
70
+ /** You have reached the maximum number of test account entries allowed per app. */
71
+ MAX_TEST_ACCOUNTS_REACHED = "max_test_accounts_reached",
72
+ /** The user attempted to log in or link a disallowed method. */
73
+ DISALLOWED_LOGIN_METHOD = "disallowed_login_method",
74
+ /** The user attempted to log in with an email address with a + in it, but the app is configured to disallow this */
75
+ DISALLOWED_PLUS_EMAIL = "disallowed_plus_email",
76
+ /** The user attempted to recover their embedded wallet via a disallowed method. */
77
+ DISALLOWED_RECOVERY_METHOD = "disallowed_recovery_method",
78
+ /** The customer must enforce login methods through the dashboard */
79
+ LEGACY_DASHBOARD_LOGIN_CONFIGURATION = "legacy_dashboard_login_configuration",
80
+ /** Cannot set password on this wallet */
81
+ CANNOT_SET_PASSWORD = "cannot_set_password",
82
+ /** Invalid PKCE parameters */
83
+ INVALID_PKCE_PARAMETERS = "invalid_pkce_parameters",
84
+ /** Invalid app url scheme configuration */
85
+ INVALID_APP_URL_SCHEME_CONFIGURATION = "invalid_app_url_scheme_configuration",
86
+ /** This app is not permitted to provider to target app */
87
+ CROSS_APP_CONNECTION_NOT_ALLOWED = "cross_app_connection_not_allowed",
88
+ /** There is no user with this login method */
89
+ USER_DOES_NOT_EXIST = "user_does_not_exist",
90
+ /** The resource already exists */
91
+ ALREADY_EXISTS = "resource_already_exists",
92
+ ACCOUNT_TRANSFER_REQUIRED = "account_transfer_required",
93
+ /** The user has not consented to delegated actions for this wallet */
94
+ USER_HAS_NOT_DELEGATED_WALLET = "user_has_not_delegated_wallet",
95
+ /** This feature is not enabled on the app */
96
+ FEATURE_NOT_ENABLED = "feature_not_enabled",
97
+ /** The onramp requires minimum identity verification before the user can continue. */
98
+ ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED = "onramp_minimum_identity_verification_required",
99
+ /** The onramp requires identity verification before the user can continue. */
100
+ ONRAMP_IDENTITY_VERIFICATION_REQUIRED = "onramp_identity_verification_required",
101
+ /** The onramp requires document verification before the user can continue. */
102
+ ONRAMP_DOCUMENT_VERIFICATION_REQUIRED = "onramp_document_verification_required",
103
+ /** The wallet address is not supported for this onramp. */
104
+ ONRAMP_UNSUPPORTED_INFORMATION = "onramp_unsupported_information",
105
+ /** The onramp purchase is above the user's current transaction limit. */
106
+ ONRAMP_TRANSACTION_LIMIT_REACHED = "transaction_limit_reached",
107
+ /** The onramp quote expired before payment completed. */
108
+ ONRAMP_QUOTE_EXPIRED = "onramp_quote_expired",
109
+ /** Wallet has insufficent funds for transaction */
110
+ INSUFFICIENT_FUNDS = "insufficient_funds",
111
+ /** Transaction broadcast failure */
112
+ TRANSACTION_BROADCAST_FAILURE = "transaction_broadcast_failure",
113
+ /** Transaction execution failure */
114
+ TRANSACTION_EXECUTION_FAILURE = "transaction_execution_failure",
115
+ /** The Solana transaction could not be deserialized */
116
+ INVALID_SOLANA_TRANSACTION = "invalid_solana_transaction",
117
+ /** Invalid policy format */
118
+ INVALID_POLICY_FORMAT = "invalid_policy_format",
119
+ /** Invalid aggregation format */
120
+ INVALID_AGGREGATION_FORMAT = "invalid_aggregation_format",
121
+ /** Policy violation */
122
+ POLICY_VIOLATION = "policy_violation",
123
+ /** Authorization key has associated wallets */
124
+ AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
125
+ /** Operation blocked for compliance reasons. */
126
+ COMPLIANCE_BLOCKED = "compliance_blocked",
127
+ /** Invalid request */
128
+ INVALID_REQUEST = "invalid_request",
129
+ /** User sign ups are suspended for this account. */
130
+ SIGNUP_DISABLED = "signup_disabled",
131
+ /** The resource exists but is not in a valid state for this operation. */
132
+ INVALID_STATE = "invalid_state",
133
+ /** The wallet was created but could not be attributed to the requested entity. */
134
+ WALLET_ENTITY_ASSIGNMENT_FAILED = "wallet_entity_assignment_failed",
135
+ /** The entity already has the maximum number of wallets attributed to it. */
136
+ WALLET_ENTITY_LIMIT_EXCEEDED = "wallet_entity_limit_exceeded",
137
+ /** The wallet is already attributed to an entity. Attribution is set-once. */
138
+ WALLET_ENTITY_ALREADY_SET = "wallet_entity_already_set"
139
+ }
140
+ //#endregion
141
+ //#region src/classes/api-error.d.ts
133
142
  type ApiErrorType = {
134
- error: string;
135
- cause?: string;
136
- code?: PrivyErrorCode;
137
- data?: Record<string, any>;
143
+ error: string;
144
+ cause?: string;
145
+ code?: PrivyErrorCode;
146
+ data?: Record<string, any>;
138
147
  };
139
148
  declare class HttpError extends Error {
140
- status: number;
141
- /** Unique Privy error code. The SDK/customers should be able to use this code to programmatically */
142
- code?: PrivyErrorCode;
143
- responseData?: Record<string, any>;
144
- constructor(status: number, message: string, code?: PrivyErrorCode, responseData?: Record<string, any>);
145
- toString(): string;
149
+ status: number;
150
+ /** Unique Privy error code. The SDK/customers should be able to use this code to programmatically */
151
+ code?: PrivyErrorCode;
152
+ responseData?: Record<string, any>;
153
+ constructor(status: number, message: string, code?: PrivyErrorCode, responseData?: Record<string, any>);
154
+ toString(): string;
146
155
  }
147
156
  declare class InvalidInputError extends HttpError {
148
- constructor(message: string, errorCode?: PrivyErrorCode);
157
+ constructor(message: string, errorCode?: PrivyErrorCode);
149
158
  }
150
159
  declare class UnauthorizedError extends HttpError {
151
- constructor(message: string, errorCode?: PrivyErrorCode);
160
+ constructor(message: string, errorCode?: PrivyErrorCode);
152
161
  }
153
162
  declare class AllowlistRejectedError extends UnauthorizedError {
154
- /**
155
- * TODO: Changing the default message will cause existing allowlist SDK checks to fail and
156
- * should not be done until we're sure all users are off the version of the SDK that checks for
157
- * that string.
158
- */
159
- constructor(message?: string);
163
+ /**
164
+ * TODO: Changing the default message will cause existing allowlist SDK checks to fail and
165
+ * should not be done until we're sure all users are off the version of the SDK that checks for
166
+ * that string.
167
+ */
168
+ constructor(message?: string);
160
169
  }
161
170
  declare class ForbiddenError extends HttpError {
162
- constructor(message: string, errorCode?: PrivyErrorCode);
171
+ constructor(message: string, errorCode?: PrivyErrorCode);
163
172
  }
164
173
  declare class NotFoundError extends HttpError {
165
- constructor(message: string);
174
+ constructor(message: string);
166
175
  }
167
176
  declare class RequestTimeoutError extends HttpError {
168
- constructor(message: string, errorCode?: PrivyErrorCode);
177
+ constructor(message: string, errorCode?: PrivyErrorCode);
169
178
  }
170
179
  declare class UnsupportedMediaType extends HttpError {
171
- constructor(message: string);
180
+ constructor(message: string);
172
181
  }
173
182
  /**
174
183
  * @deprecated
@@ -178,63 +187,63 @@ declare class UnsupportedMediaType extends HttpError {
178
187
  * In the past, we would occasionally return 422 for invalid input.
179
188
  */
180
189
  declare class LegacyInvalidInputError extends HttpError {
181
- constructor(message: string, errorCode: PrivyErrorCode);
190
+ constructor(message: string, errorCode: PrivyErrorCode);
182
191
  }
183
192
  declare class TooManyRequestsError extends HttpError {
184
- constructor(message?: string);
193
+ constructor(message?: string);
185
194
  }
186
195
  declare class ResourceConflictError extends HttpError {
187
- constructor(message?: string, errorCode?: PrivyErrorCode);
196
+ constructor(message?: string, errorCode?: PrivyErrorCode);
188
197
  }
189
198
  declare class InsufficientBalanceError extends HttpError {
190
- constructor(message?: string);
199
+ constructor(message?: string);
191
200
  }
192
201
  declare class PaymentFailedError extends HttpError {
193
- constructor(message?: string);
202
+ constructor(message?: string);
194
203
  }
195
204
  declare class InternalServerError extends HttpError {
196
- constructor(message?: string);
205
+ constructor(message?: string, errorCode?: PrivyErrorCode, responseData?: Record<string, any>);
197
206
  }
198
207
  declare class AccountTransferRequiredError extends HttpError {
199
- data: {
200
- nonce: string;
201
- subject: string;
202
- otherUser: {
203
- embeddedWalletAddress: string | null;
204
- farcasterEmbeddedAddress?: string;
205
- oAuthUserInfo?: Record<string, any>;
206
- };
207
- account: {
208
- displayName: string | null;
209
- };
208
+ data: {
209
+ nonce: string;
210
+ subject: string;
211
+ otherUser: {
212
+ embeddedWalletAddress: string | null;
213
+ farcasterEmbeddedAddress?: string;
214
+ oAuthUserInfo?: Record<string, any>;
210
215
  };
211
- constructor(data: {
212
- nonce: string;
213
- subject: string;
214
- otherUser: {
215
- embeddedWalletAddress: string | null;
216
- farcasterEmbeddedAddress?: string;
217
- oAuthUserInfo?: Record<string, any>;
218
- };
219
- account: {
220
- displayName: string | null;
221
- };
222
- });
223
- }
224
-
216
+ account: {
217
+ displayName: string | null;
218
+ };
219
+ };
220
+ constructor(data: {
221
+ nonce: string;
222
+ subject: string;
223
+ otherUser: {
224
+ embeddedWalletAddress: string | null;
225
+ farcasterEmbeddedAddress?: string;
226
+ oAuthUserInfo?: Record<string, any>;
227
+ };
228
+ account: {
229
+ displayName: string | null;
230
+ };
231
+ });
232
+ }
233
+ //#endregion
234
+ //#region src/schemas/error.d.ts
225
235
  declare const APIError: z.ZodObject<{
226
- error: z.ZodString;
227
- cause: z.ZodOptional<z.ZodString>;
228
- code: z.ZodOptional<z.ZodNativeEnum<typeof PrivyErrorCode>>;
236
+ error: z.ZodString;
237
+ cause: z.ZodOptional<z.ZodString>;
238
+ code: z.ZodOptional<z.ZodNativeEnum<typeof PrivyErrorCode>>;
229
239
  }, "strip", z.ZodTypeAny, {
230
- error: string;
231
- cause?: string | undefined;
232
- code?: PrivyErrorCode | undefined;
240
+ error: string;
241
+ cause?: string | undefined;
242
+ code?: PrivyErrorCode | undefined;
233
243
  }, {
234
- error: string;
235
- cause?: string | undefined;
236
- code?: PrivyErrorCode | undefined;
244
+ error: string;
245
+ cause?: string | undefined;
246
+ code?: PrivyErrorCode | undefined;
237
247
  }>;
238
-
239
- export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
240
- export type { ApiErrorType };
248
+ //#endregion
249
+ export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
@@ -1,174 +1,183 @@
1
- import { z } from 'zod';
2
-
1
+ import { z } from "zod";
2
+ //#region src/constants/error-codes.d.ts
3
3
  declare enum PrivyErrorCode {
4
- /** The user's OAuth account is suspended and is not allowed. */
5
- OAUTH_ACCOUNT_SUSPENDED = "oauth_account_suspended",
6
- /** The Privy app id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
7
- MISSING_OR_INVALID_PRIVY_APP_ID = "missing_or_invalid_privy_app_id",
8
- /** The Privy app client id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
9
- MISSING_OR_INVALID_PRIVY_CLIENT_ID = "missing_or_invalid_privy_client_id",
10
- /** The Privy account id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
11
- MISSING_OR_INVALID_PRIVY_ACCOUNT_ID = "missing_or_invalid_privy_account_id",
12
- /** The refresh or access token is either not provided or not valid. */
13
- MISSING_OR_INVALID_TOKEN = "missing_or_invalid_token",
14
- /** The user does not have any enrolled MFA methods but one is required. */
15
- MISSING_MFA_ENROLLMENT = "missing_mfa_enrollment",
16
- /** The user does not have a valid MFA connected */
17
- MISSING_OR_INVALID_MFA = "missing_or_invalid_mfa",
18
- /** The MFA Token provided has expired */
19
- EXPIRED_OR_INVALID_MFA_TOKEN = "expired_or_invalid_mfa_token",
20
- /** The body of the request contains input that is invalid. Check the response body for detailed information. */
21
- INVALID_DATA = "invalid_data",
22
- /** A form of INVALID_DATA specifically when the user is trying to authenticate and did not match the provided challenge. */
23
- INVALID_CREDENTIALS = "invalid_credentials",
24
- /** When the user is trying to authenticate and did provide a valid CAPTCHA token. */
25
- INVALID_CAPTCHA = "invalid_captcha",
26
- /** You attempted to link an account that belongs to another user. */
27
- LINKED_TO_ANOTHER_USER = "linked_to_another_user",
28
- /** This app has an allowlist and the login account was not included. Either disable the allowlist or have the user try again with a different account. */
29
- ALLOWLIST_REJECTED = "allowlist_rejected",
30
- /** Embedded wallets cannot be unlinked */
31
- CANNOT_UNLINK_EMBEDDED_WALLET = "cannot_unlink_embedded_wallet",
32
- /** You are unable to unlink an account when there is only one account present. */
33
- CANNOT_UNLINK_SOLE_ACCOUNT = "cannot_unlink_sole_account",
34
- /** Cannot link another account of this type */
35
- CANNOT_LINK_MORE_OF_TYPE = "cannot_link_more_of_type",
36
- /** Linked account cannot be found. The account was either invalid or has already been unlinked. */
37
- LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
38
- /** Too many requests. Please wait to try again. */
39
- TOO_MANY_REQUESTS = "too_many_requests",
40
- /** Conflict encountered while trying to update resource. */
41
- RESOURCE_CONFLICT = "resource_conflict",
42
- /** Origin was expected and is invalid. */
43
- INVALID_ORIGIN = "invalid_origin",
44
- /** Origin was expected and is not set. */
45
- MISSING_ORIGIN = "missing_origin",
46
- /** Native App ID was expected and is invalid. */
47
- INVALID_NATIVE_APP_ID = "invalid_native_app_id",
48
- /** Refresh token re-use detected. */
49
- TOKEN_ALREADY_USED = "token_already_used",
50
- /** Attempting to log out of a session that does not exist. */
51
- ALREADY_LOGGED_OUT = "already_logged_out",
52
- /** The value (phone number, email) that was submitted is not supported. */
53
- NOT_SUPPORTED = "not_supported",
54
- /** You have previously unsubscribed from the sending email/phone number. */
55
- USER_UNSUBSCRIBED = "user_unsubscribed",
56
- /** You have reached the maximum number of apps allowed per account. */
57
- MAX_APPS_REACHED = "max_apps_reached",
58
- /** You have reached the maximum number of users allowed per app. */
59
- USER_LIMIT_REACHED = "max_accounts_reached",
60
- /** You are trying to reconstruct an embedded wallet on a device that has been marked as revoked */
61
- DEVICE_REVOKED = "device_revoked",
62
- /** You attempted to set a password on a wallet with an existing password */
63
- WALLET_PASSWORD_EXISTS = "wallet_password_exists",
64
- /** The user attempted to complete an oauth flow with a different state than started. */
65
- OAUTH_STATE_MISMATCH = "oauth_state_mismatch",
66
- /** You have reached the maximum number of denylist entries allowed per app. */
67
- MAX_DENYLIST_ENTRIES_REACHED = "max_denylist_entries_reached",
68
- /** You have reached the maximum number of test account entries allowed per app. */
69
- MAX_TEST_ACCOUNTS_REACHED = "max_test_accounts_reached",
70
- /** The user attempted to log in or link a disallowed method. */
71
- DISALLOWED_LOGIN_METHOD = "disallowed_login_method",
72
- /** The user attempted to log in with an email address with a + in it, but the app is configured to disallow this */
73
- DISALLOWED_PLUS_EMAIL = "disallowed_plus_email",
74
- /** The user attempted to recover their embedded wallet via a disallowed method. */
75
- DISALLOWED_RECOVERY_METHOD = "disallowed_recovery_method",
76
- /** The customer must enforce login methods through the dashboard */
77
- LEGACY_DASHBOARD_LOGIN_CONFIGURATION = "legacy_dashboard_login_configuration",
78
- /** Cannot set password on this wallet */
79
- CANNOT_SET_PASSWORD = "cannot_set_password",
80
- /** Invalid PKCE parameters */
81
- INVALID_PKCE_PARAMETERS = "invalid_pkce_parameters",
82
- /** Invalid app url scheme configuration */
83
- INVALID_APP_URL_SCHEME_CONFIGURATION = "invalid_app_url_scheme_configuration",
84
- /** This app is not permitted to provider to target app */
85
- CROSS_APP_CONNECTION_NOT_ALLOWED = "cross_app_connection_not_allowed",
86
- /** There is no user with this login method */
87
- USER_DOES_NOT_EXIST = "user_does_not_exist",
88
- /** The resource already exists */
89
- ALREADY_EXISTS = "resource_already_exists",
90
- ACCOUNT_TRANSFER_REQUIRED = "account_transfer_required",
91
- /** The user has not consented to delegated actions for this wallet */
92
- USER_HAS_NOT_DELEGATED_WALLET = "user_has_not_delegated_wallet",
93
- /** This feature is not enabled on the app */
94
- FEATURE_NOT_ENABLED = "feature_not_enabled",
95
- /** The onramp requires minimum identity verification before the user can continue. */
96
- ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED = "onramp_minimum_identity_verification_required",
97
- /** The onramp requires identity verification before the user can continue. */
98
- ONRAMP_IDENTITY_VERIFICATION_REQUIRED = "onramp_identity_verification_required",
99
- /** The onramp requires document verification before the user can continue. */
100
- ONRAMP_DOCUMENT_VERIFICATION_REQUIRED = "onramp_document_verification_required",
101
- /** The wallet address is not supported for this onramp. */
102
- ONRAMP_UNSUPPORTED_INFORMATION = "onramp_unsupported_information",
103
- /** The onramp purchase is above the user's current transaction limit. */
104
- ONRAMP_TRANSACTION_LIMIT_REACHED = "transaction_limit_reached",
105
- /** The onramp quote expired before payment completed. */
106
- ONRAMP_QUOTE_EXPIRED = "onramp_quote_expired",
107
- /** Wallet has insufficent funds for transaction */
108
- INSUFFICIENT_FUNDS = "insufficient_funds",
109
- /** Transaction broadcast failure */
110
- TRANSACTION_BROADCAST_FAILURE = "transaction_broadcast_failure",
111
- /** Transaction execution failure */
112
- TRANSACTION_EXECUTION_FAILURE = "transaction_execution_failure",
113
- /** The Solana transaction could not be deserialized */
114
- INVALID_SOLANA_TRANSACTION = "invalid_solana_transaction",
115
- /** Invalid policy format */
116
- INVALID_POLICY_FORMAT = "invalid_policy_format",
117
- /** Invalid aggregation format */
118
- INVALID_AGGREGATION_FORMAT = "invalid_aggregation_format",
119
- /** Policy violation */
120
- POLICY_VIOLATION = "policy_violation",
121
- /** Authorization key has associated wallets */
122
- AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
123
- /** Operation blocked for compliance reasons. */
124
- COMPLIANCE_BLOCKED = "compliance_blocked",
125
- /** Invalid request */
126
- INVALID_REQUEST = "invalid_request",
127
- /** User sign ups are suspended for this account. */
128
- SIGNUP_DISABLED = "signup_disabled",
129
- /** The resource exists but is not in a valid state for this operation. */
130
- INVALID_STATE = "invalid_state"
131
- }
132
-
4
+ /** The user's OAuth account is suspended and is not allowed. */
5
+ OAUTH_ACCOUNT_SUSPENDED = "oauth_account_suspended",
6
+ /** The Privy app id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
7
+ MISSING_OR_INVALID_PRIVY_APP_ID = "missing_or_invalid_privy_app_id",
8
+ /** The Privy app client id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
9
+ MISSING_OR_INVALID_PRIVY_CLIENT_ID = "missing_or_invalid_privy_client_id",
10
+ /** The Privy account id is either not provided or not valid. Check the developer dashboard to verify you are setting the correct value. */
11
+ MISSING_OR_INVALID_PRIVY_ACCOUNT_ID = "missing_or_invalid_privy_account_id",
12
+ /** The refresh or access token is either not provided or not valid. */
13
+ MISSING_OR_INVALID_TOKEN = "missing_or_invalid_token",
14
+ /** The user does not have any enrolled MFA methods but one is required. */
15
+ MISSING_MFA_ENROLLMENT = "missing_mfa_enrollment",
16
+ /** The user does not have a valid MFA connected */
17
+ MISSING_OR_INVALID_MFA = "missing_or_invalid_mfa",
18
+ /** The MFA Token provided has expired */
19
+ EXPIRED_OR_INVALID_MFA_TOKEN = "expired_or_invalid_mfa_token",
20
+ /** The body of the request contains input that is invalid. Check the response body for detailed information. */
21
+ INVALID_DATA = "invalid_data",
22
+ /** A form of INVALID_DATA specifically when the user is trying to authenticate and did not match the provided challenge. */
23
+ INVALID_CREDENTIALS = "invalid_credentials",
24
+ /** The passkey the user authenticated with is not registered for this app. The credential may have been created under a different credential manager or app. Prompt the user for another login method. */
25
+ PASSKEY_NOT_REGISTERED = "passkey_not_registered",
26
+ /** When the user is trying to authenticate and did provide a valid CAPTCHA token. */
27
+ INVALID_CAPTCHA = "invalid_captcha",
28
+ /** You attempted to link an account that belongs to another user. */
29
+ LINKED_TO_ANOTHER_USER = "linked_to_another_user",
30
+ /** This app has an allowlist and the login account was not included. Either disable the allowlist or have the user try again with a different account. */
31
+ ALLOWLIST_REJECTED = "allowlist_rejected",
32
+ /** Embedded wallets cannot be unlinked */
33
+ CANNOT_UNLINK_EMBEDDED_WALLET = "cannot_unlink_embedded_wallet",
34
+ /** You are unable to unlink an account when there is only one account present. */
35
+ CANNOT_UNLINK_SOLE_ACCOUNT = "cannot_unlink_sole_account",
36
+ /** Cannot link another account of this type */
37
+ CANNOT_LINK_MORE_OF_TYPE = "cannot_link_more_of_type",
38
+ /** Linked account cannot be found. The account was either invalid or has already been unlinked. */
39
+ LINKED_ACCOUNT_NOT_FOUND = "linked_account_not_found",
40
+ /** Too many requests. Please wait to try again. */
41
+ TOO_MANY_REQUESTS = "too_many_requests",
42
+ /** Conflict encountered while trying to update resource. */
43
+ RESOURCE_CONFLICT = "resource_conflict",
44
+ /** Origin was expected and is invalid. */
45
+ INVALID_ORIGIN = "invalid_origin",
46
+ /** Origin was expected and is not set. */
47
+ MISSING_ORIGIN = "missing_origin",
48
+ /** Native App ID was expected and is invalid. */
49
+ INVALID_NATIVE_APP_ID = "invalid_native_app_id",
50
+ /** Refresh token re-use detected. */
51
+ TOKEN_ALREADY_USED = "token_already_used",
52
+ /** Attempting to log out of a session that does not exist. */
53
+ ALREADY_LOGGED_OUT = "already_logged_out",
54
+ /** The value (phone number, email) that was submitted is not supported. */
55
+ NOT_SUPPORTED = "not_supported",
56
+ /** You have previously unsubscribed from the sending email/phone number. */
57
+ USER_UNSUBSCRIBED = "user_unsubscribed",
58
+ /** You have reached the maximum number of apps allowed per account. */
59
+ MAX_APPS_REACHED = "max_apps_reached",
60
+ /** You have reached the maximum number of users allowed per app. */
61
+ USER_LIMIT_REACHED = "max_accounts_reached",
62
+ /** You are trying to reconstruct an embedded wallet on a device that has been marked as revoked */
63
+ DEVICE_REVOKED = "device_revoked",
64
+ /** You attempted to set a password on a wallet with an existing password */
65
+ WALLET_PASSWORD_EXISTS = "wallet_password_exists",
66
+ /** The user attempted to complete an oauth flow with a different state than started. */
67
+ OAUTH_STATE_MISMATCH = "oauth_state_mismatch",
68
+ /** You have reached the maximum number of denylist entries allowed per app. */
69
+ MAX_DENYLIST_ENTRIES_REACHED = "max_denylist_entries_reached",
70
+ /** You have reached the maximum number of test account entries allowed per app. */
71
+ MAX_TEST_ACCOUNTS_REACHED = "max_test_accounts_reached",
72
+ /** The user attempted to log in or link a disallowed method. */
73
+ DISALLOWED_LOGIN_METHOD = "disallowed_login_method",
74
+ /** The user attempted to log in with an email address with a + in it, but the app is configured to disallow this */
75
+ DISALLOWED_PLUS_EMAIL = "disallowed_plus_email",
76
+ /** The user attempted to recover their embedded wallet via a disallowed method. */
77
+ DISALLOWED_RECOVERY_METHOD = "disallowed_recovery_method",
78
+ /** The customer must enforce login methods through the dashboard */
79
+ LEGACY_DASHBOARD_LOGIN_CONFIGURATION = "legacy_dashboard_login_configuration",
80
+ /** Cannot set password on this wallet */
81
+ CANNOT_SET_PASSWORD = "cannot_set_password",
82
+ /** Invalid PKCE parameters */
83
+ INVALID_PKCE_PARAMETERS = "invalid_pkce_parameters",
84
+ /** Invalid app url scheme configuration */
85
+ INVALID_APP_URL_SCHEME_CONFIGURATION = "invalid_app_url_scheme_configuration",
86
+ /** This app is not permitted to provider to target app */
87
+ CROSS_APP_CONNECTION_NOT_ALLOWED = "cross_app_connection_not_allowed",
88
+ /** There is no user with this login method */
89
+ USER_DOES_NOT_EXIST = "user_does_not_exist",
90
+ /** The resource already exists */
91
+ ALREADY_EXISTS = "resource_already_exists",
92
+ ACCOUNT_TRANSFER_REQUIRED = "account_transfer_required",
93
+ /** The user has not consented to delegated actions for this wallet */
94
+ USER_HAS_NOT_DELEGATED_WALLET = "user_has_not_delegated_wallet",
95
+ /** This feature is not enabled on the app */
96
+ FEATURE_NOT_ENABLED = "feature_not_enabled",
97
+ /** The onramp requires minimum identity verification before the user can continue. */
98
+ ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED = "onramp_minimum_identity_verification_required",
99
+ /** The onramp requires identity verification before the user can continue. */
100
+ ONRAMP_IDENTITY_VERIFICATION_REQUIRED = "onramp_identity_verification_required",
101
+ /** The onramp requires document verification before the user can continue. */
102
+ ONRAMP_DOCUMENT_VERIFICATION_REQUIRED = "onramp_document_verification_required",
103
+ /** The wallet address is not supported for this onramp. */
104
+ ONRAMP_UNSUPPORTED_INFORMATION = "onramp_unsupported_information",
105
+ /** The onramp purchase is above the user's current transaction limit. */
106
+ ONRAMP_TRANSACTION_LIMIT_REACHED = "transaction_limit_reached",
107
+ /** The onramp quote expired before payment completed. */
108
+ ONRAMP_QUOTE_EXPIRED = "onramp_quote_expired",
109
+ /** Wallet has insufficent funds for transaction */
110
+ INSUFFICIENT_FUNDS = "insufficient_funds",
111
+ /** Transaction broadcast failure */
112
+ TRANSACTION_BROADCAST_FAILURE = "transaction_broadcast_failure",
113
+ /** Transaction execution failure */
114
+ TRANSACTION_EXECUTION_FAILURE = "transaction_execution_failure",
115
+ /** The Solana transaction could not be deserialized */
116
+ INVALID_SOLANA_TRANSACTION = "invalid_solana_transaction",
117
+ /** Invalid policy format */
118
+ INVALID_POLICY_FORMAT = "invalid_policy_format",
119
+ /** Invalid aggregation format */
120
+ INVALID_AGGREGATION_FORMAT = "invalid_aggregation_format",
121
+ /** Policy violation */
122
+ POLICY_VIOLATION = "policy_violation",
123
+ /** Authorization key has associated wallets */
124
+ AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS = "authorization_key_has_associated_wallets",
125
+ /** Operation blocked for compliance reasons. */
126
+ COMPLIANCE_BLOCKED = "compliance_blocked",
127
+ /** Invalid request */
128
+ INVALID_REQUEST = "invalid_request",
129
+ /** User sign ups are suspended for this account. */
130
+ SIGNUP_DISABLED = "signup_disabled",
131
+ /** The resource exists but is not in a valid state for this operation. */
132
+ INVALID_STATE = "invalid_state",
133
+ /** The wallet was created but could not be attributed to the requested entity. */
134
+ WALLET_ENTITY_ASSIGNMENT_FAILED = "wallet_entity_assignment_failed",
135
+ /** The entity already has the maximum number of wallets attributed to it. */
136
+ WALLET_ENTITY_LIMIT_EXCEEDED = "wallet_entity_limit_exceeded",
137
+ /** The wallet is already attributed to an entity. Attribution is set-once. */
138
+ WALLET_ENTITY_ALREADY_SET = "wallet_entity_already_set"
139
+ }
140
+ //#endregion
141
+ //#region src/classes/api-error.d.ts
133
142
  type ApiErrorType = {
134
- error: string;
135
- cause?: string;
136
- code?: PrivyErrorCode;
137
- data?: Record<string, any>;
143
+ error: string;
144
+ cause?: string;
145
+ code?: PrivyErrorCode;
146
+ data?: Record<string, any>;
138
147
  };
139
148
  declare class HttpError extends Error {
140
- status: number;
141
- /** Unique Privy error code. The SDK/customers should be able to use this code to programmatically */
142
- code?: PrivyErrorCode;
143
- responseData?: Record<string, any>;
144
- constructor(status: number, message: string, code?: PrivyErrorCode, responseData?: Record<string, any>);
145
- toString(): string;
149
+ status: number;
150
+ /** Unique Privy error code. The SDK/customers should be able to use this code to programmatically */
151
+ code?: PrivyErrorCode;
152
+ responseData?: Record<string, any>;
153
+ constructor(status: number, message: string, code?: PrivyErrorCode, responseData?: Record<string, any>);
154
+ toString(): string;
146
155
  }
147
156
  declare class InvalidInputError extends HttpError {
148
- constructor(message: string, errorCode?: PrivyErrorCode);
157
+ constructor(message: string, errorCode?: PrivyErrorCode);
149
158
  }
150
159
  declare class UnauthorizedError extends HttpError {
151
- constructor(message: string, errorCode?: PrivyErrorCode);
160
+ constructor(message: string, errorCode?: PrivyErrorCode);
152
161
  }
153
162
  declare class AllowlistRejectedError extends UnauthorizedError {
154
- /**
155
- * TODO: Changing the default message will cause existing allowlist SDK checks to fail and
156
- * should not be done until we're sure all users are off the version of the SDK that checks for
157
- * that string.
158
- */
159
- constructor(message?: string);
163
+ /**
164
+ * TODO: Changing the default message will cause existing allowlist SDK checks to fail and
165
+ * should not be done until we're sure all users are off the version of the SDK that checks for
166
+ * that string.
167
+ */
168
+ constructor(message?: string);
160
169
  }
161
170
  declare class ForbiddenError extends HttpError {
162
- constructor(message: string, errorCode?: PrivyErrorCode);
171
+ constructor(message: string, errorCode?: PrivyErrorCode);
163
172
  }
164
173
  declare class NotFoundError extends HttpError {
165
- constructor(message: string);
174
+ constructor(message: string);
166
175
  }
167
176
  declare class RequestTimeoutError extends HttpError {
168
- constructor(message: string, errorCode?: PrivyErrorCode);
177
+ constructor(message: string, errorCode?: PrivyErrorCode);
169
178
  }
170
179
  declare class UnsupportedMediaType extends HttpError {
171
- constructor(message: string);
180
+ constructor(message: string);
172
181
  }
173
182
  /**
174
183
  * @deprecated
@@ -178,63 +187,63 @@ declare class UnsupportedMediaType extends HttpError {
178
187
  * In the past, we would occasionally return 422 for invalid input.
179
188
  */
180
189
  declare class LegacyInvalidInputError extends HttpError {
181
- constructor(message: string, errorCode: PrivyErrorCode);
190
+ constructor(message: string, errorCode: PrivyErrorCode);
182
191
  }
183
192
  declare class TooManyRequestsError extends HttpError {
184
- constructor(message?: string);
193
+ constructor(message?: string);
185
194
  }
186
195
  declare class ResourceConflictError extends HttpError {
187
- constructor(message?: string, errorCode?: PrivyErrorCode);
196
+ constructor(message?: string, errorCode?: PrivyErrorCode);
188
197
  }
189
198
  declare class InsufficientBalanceError extends HttpError {
190
- constructor(message?: string);
199
+ constructor(message?: string);
191
200
  }
192
201
  declare class PaymentFailedError extends HttpError {
193
- constructor(message?: string);
202
+ constructor(message?: string);
194
203
  }
195
204
  declare class InternalServerError extends HttpError {
196
- constructor(message?: string);
205
+ constructor(message?: string, errorCode?: PrivyErrorCode, responseData?: Record<string, any>);
197
206
  }
198
207
  declare class AccountTransferRequiredError extends HttpError {
199
- data: {
200
- nonce: string;
201
- subject: string;
202
- otherUser: {
203
- embeddedWalletAddress: string | null;
204
- farcasterEmbeddedAddress?: string;
205
- oAuthUserInfo?: Record<string, any>;
206
- };
207
- account: {
208
- displayName: string | null;
209
- };
208
+ data: {
209
+ nonce: string;
210
+ subject: string;
211
+ otherUser: {
212
+ embeddedWalletAddress: string | null;
213
+ farcasterEmbeddedAddress?: string;
214
+ oAuthUserInfo?: Record<string, any>;
210
215
  };
211
- constructor(data: {
212
- nonce: string;
213
- subject: string;
214
- otherUser: {
215
- embeddedWalletAddress: string | null;
216
- farcasterEmbeddedAddress?: string;
217
- oAuthUserInfo?: Record<string, any>;
218
- };
219
- account: {
220
- displayName: string | null;
221
- };
222
- });
223
- }
224
-
216
+ account: {
217
+ displayName: string | null;
218
+ };
219
+ };
220
+ constructor(data: {
221
+ nonce: string;
222
+ subject: string;
223
+ otherUser: {
224
+ embeddedWalletAddress: string | null;
225
+ farcasterEmbeddedAddress?: string;
226
+ oAuthUserInfo?: Record<string, any>;
227
+ };
228
+ account: {
229
+ displayName: string | null;
230
+ };
231
+ });
232
+ }
233
+ //#endregion
234
+ //#region src/schemas/error.d.ts
225
235
  declare const APIError: z.ZodObject<{
226
- error: z.ZodString;
227
- cause: z.ZodOptional<z.ZodString>;
228
- code: z.ZodOptional<z.ZodNativeEnum<typeof PrivyErrorCode>>;
236
+ error: z.ZodString;
237
+ cause: z.ZodOptional<z.ZodString>;
238
+ code: z.ZodOptional<z.ZodNativeEnum<typeof PrivyErrorCode>>;
229
239
  }, "strip", z.ZodTypeAny, {
230
- error: string;
231
- cause?: string | undefined;
232
- code?: PrivyErrorCode | undefined;
240
+ error: string;
241
+ cause?: string | undefined;
242
+ code?: PrivyErrorCode | undefined;
233
243
  }, {
234
- error: string;
235
- cause?: string | undefined;
236
- code?: PrivyErrorCode | undefined;
244
+ error: string;
245
+ cause?: string | undefined;
246
+ code?: PrivyErrorCode | undefined;
237
247
  }>;
238
-
239
- export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
240
- export type { ApiErrorType };
248
+ //#endregion
249
+ export { APIError, AccountTransferRequiredError, AllowlistRejectedError, ApiErrorType, ForbiddenError, HttpError, InsufficientBalanceError, InternalServerError, InvalidInputError, LegacyInvalidInputError, NotFoundError, PaymentFailedError, PrivyErrorCode, RequestTimeoutError, ResourceConflictError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaType };
@@ -1,2 +1,2 @@
1
- export{APIError}from"./schemas/error.mjs";export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,PaymentFailedError,RequestTimeoutError,ResourceConflictError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./classes/api-error.mjs";export{PrivyErrorCode}from"./constants/error-codes.mjs";import"zod";
2
- //# sourceMappingURL=index.mjs.map
1
+ import{z as e}from"zod";let t=function(e){return e.OAUTH_ACCOUNT_SUSPENDED=`oauth_account_suspended`,e.MISSING_OR_INVALID_PRIVY_APP_ID=`missing_or_invalid_privy_app_id`,e.MISSING_OR_INVALID_PRIVY_CLIENT_ID=`missing_or_invalid_privy_client_id`,e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID=`missing_or_invalid_privy_account_id`,e.MISSING_OR_INVALID_TOKEN=`missing_or_invalid_token`,e.MISSING_MFA_ENROLLMENT=`missing_mfa_enrollment`,e.MISSING_OR_INVALID_MFA=`missing_or_invalid_mfa`,e.EXPIRED_OR_INVALID_MFA_TOKEN=`expired_or_invalid_mfa_token`,e.INVALID_DATA=`invalid_data`,e.INVALID_CREDENTIALS=`invalid_credentials`,e.PASSKEY_NOT_REGISTERED=`passkey_not_registered`,e.INVALID_CAPTCHA=`invalid_captcha`,e.LINKED_TO_ANOTHER_USER=`linked_to_another_user`,e.ALLOWLIST_REJECTED=`allowlist_rejected`,e.CANNOT_UNLINK_EMBEDDED_WALLET=`cannot_unlink_embedded_wallet`,e.CANNOT_UNLINK_SOLE_ACCOUNT=`cannot_unlink_sole_account`,e.CANNOT_LINK_MORE_OF_TYPE=`cannot_link_more_of_type`,e.LINKED_ACCOUNT_NOT_FOUND=`linked_account_not_found`,e.TOO_MANY_REQUESTS=`too_many_requests`,e.RESOURCE_CONFLICT=`resource_conflict`,e.INVALID_ORIGIN=`invalid_origin`,e.MISSING_ORIGIN=`missing_origin`,e.INVALID_NATIVE_APP_ID=`invalid_native_app_id`,e.TOKEN_ALREADY_USED=`token_already_used`,e.ALREADY_LOGGED_OUT=`already_logged_out`,e.NOT_SUPPORTED=`not_supported`,e.USER_UNSUBSCRIBED=`user_unsubscribed`,e.MAX_APPS_REACHED=`max_apps_reached`,e.USER_LIMIT_REACHED=`max_accounts_reached`,e.DEVICE_REVOKED=`device_revoked`,e.WALLET_PASSWORD_EXISTS=`wallet_password_exists`,e.OAUTH_STATE_MISMATCH=`oauth_state_mismatch`,e.MAX_DENYLIST_ENTRIES_REACHED=`max_denylist_entries_reached`,e.MAX_TEST_ACCOUNTS_REACHED=`max_test_accounts_reached`,e.DISALLOWED_LOGIN_METHOD=`disallowed_login_method`,e.DISALLOWED_PLUS_EMAIL=`disallowed_plus_email`,e.DISALLOWED_RECOVERY_METHOD=`disallowed_recovery_method`,e.LEGACY_DASHBOARD_LOGIN_CONFIGURATION=`legacy_dashboard_login_configuration`,e.CANNOT_SET_PASSWORD=`cannot_set_password`,e.INVALID_PKCE_PARAMETERS=`invalid_pkce_parameters`,e.INVALID_APP_URL_SCHEME_CONFIGURATION=`invalid_app_url_scheme_configuration`,e.CROSS_APP_CONNECTION_NOT_ALLOWED=`cross_app_connection_not_allowed`,e.USER_DOES_NOT_EXIST=`user_does_not_exist`,e.ALREADY_EXISTS=`resource_already_exists`,e.ACCOUNT_TRANSFER_REQUIRED=`account_transfer_required`,e.USER_HAS_NOT_DELEGATED_WALLET=`user_has_not_delegated_wallet`,e.FEATURE_NOT_ENABLED=`feature_not_enabled`,e.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED=`onramp_minimum_identity_verification_required`,e.ONRAMP_IDENTITY_VERIFICATION_REQUIRED=`onramp_identity_verification_required`,e.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED=`onramp_document_verification_required`,e.ONRAMP_UNSUPPORTED_INFORMATION=`onramp_unsupported_information`,e.ONRAMP_TRANSACTION_LIMIT_REACHED=`transaction_limit_reached`,e.ONRAMP_QUOTE_EXPIRED=`onramp_quote_expired`,e.INSUFFICIENT_FUNDS=`insufficient_funds`,e.TRANSACTION_BROADCAST_FAILURE=`transaction_broadcast_failure`,e.TRANSACTION_EXECUTION_FAILURE=`transaction_execution_failure`,e.INVALID_SOLANA_TRANSACTION=`invalid_solana_transaction`,e.INVALID_POLICY_FORMAT=`invalid_policy_format`,e.INVALID_AGGREGATION_FORMAT=`invalid_aggregation_format`,e.POLICY_VIOLATION=`policy_violation`,e.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS=`authorization_key_has_associated_wallets`,e.COMPLIANCE_BLOCKED=`compliance_blocked`,e.INVALID_REQUEST=`invalid_request`,e.SIGNUP_DISABLED=`signup_disabled`,e.INVALID_STATE=`invalid_state`,e.WALLET_ENTITY_ASSIGNMENT_FAILED=`wallet_entity_assignment_failed`,e.WALLET_ENTITY_LIMIT_EXCEEDED=`wallet_entity_limit_exceeded`,e.WALLET_ENTITY_ALREADY_SET=`wallet_entity_already_set`,e}({});var n=class extends Error{status;code;responseData;constructor(e,t,n,r){super(t),this.status=e,this.code=n,this.name=`HttpError`,this.responseData=r}toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:``}`}},r=class extends n{constructor(e,t){super(400,e,t||`invalid_data`),this.name=`InvalidInputError`}},i=class extends n{constructor(e,t){super(401,e,t),this.name=`UnauthorizedError`}},a=class extends i{constructor(e){super(e||`User is not allowed to login to this app.`,`allowlist_rejected`),this.name=`AllowlistRejectedError`}},o=class extends n{constructor(e,t){super(403,e,t),this.name=`ForbiddenError`}},s=class extends n{constructor(e){super(404,e),this.name=`NotFoundError`}},c=class extends n{constructor(e,t){super(408,e,t),this.name=`RequestTimeoutError`}},l=class extends n{constructor(e){super(415,e),this.name=`UnsupportedMediaType`}},u=class extends n{constructor(e,t){super(422,e,t),this.name=`LegacyInvalidInputError`}},d=class extends n{constructor(e){super(429,e||`Too many requests. Please wait to try again.`,`too_many_requests`),this.name=`TooManyRequestsError`}},f=class extends n{constructor(e,t){super(409,e||`Conflict encountered while trying to modify resource.`,t||`resource_conflict`),this.name=`ResourceConflictError`}},p=class extends n{constructor(e){super(400,e||`Insufficient balance.`,`insufficient_funds`),this.name=`InsufficientBalanceError`}},m=class extends n{constructor(e){super(402,e||`Payment failed.`)}},h=class extends n{constructor(e,t,n){super(500,e||`Service unavailable.`,t,n),this.name=`InternalServerError`}},g=class extends n{data;constructor(e){super(400,`Account transfer required`,`account_transfer_required`,e),this.data=e,this.name=`AccountTransferRequiredError`}};const _=e.object({error:e.string(),cause:e.string().optional(),code:e.nativeEnum(t).optional()});export{_ as APIError,g as AccountTransferRequiredError,a as AllowlistRejectedError,o as ForbiddenError,n as HttpError,p as InsufficientBalanceError,h as InternalServerError,r as InvalidInputError,u as LegacyInvalidInputError,s as NotFoundError,m as PaymentFailedError,t as PrivyErrorCode,c as RequestTimeoutError,f as ResourceConflictError,d as TooManyRequestsError,i as UnauthorizedError,l as UnsupportedMediaType};
2
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/constants/error-codes.ts","../../src/classes/api-error.ts","../../src/schemas/error.ts"],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/api-base",
3
- "version": "1.9.4",
3
+ "version": "1.10.0-beta-20260827192706",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  ".": {
@@ -29,34 +29,24 @@
29
29
  "devDependencies": {
30
30
  "oxlint": "1.57.0",
31
31
  "oxlint-tsgolint": "0.18.0",
32
- "@rollup/plugin-node-resolve": "^15.3.0",
33
- "@rollup/plugin-replace": "^6.0.1",
34
- "@rollup/plugin-swc": "^0.4.0",
35
- "@rollup/plugin-terser": "^0.4.4",
36
- "@rollup/plugin-typescript": "^11.1.6",
37
- "@swc/core": "^1.10.0",
38
32
  "@swc/jest": "^0.2.39",
39
- "@swc/plugin-styled-components": "^6.0.1",
40
- "glob": "^10.3.12",
41
33
  "jest": "^29.7.0",
42
- "rollup": "4.60.1",
34
+ "rolldown": "1.1.5",
35
+ "rolldown-plugin-dts": "0.27.1",
43
36
  "rollup-plugin-copy": "3.5.0",
44
- "rollup-plugin-dts": "^6.1.1",
45
- "typescript": "~6.0.2",
46
- "@privy-io/build-config": "1.0.0",
47
- "@privy-io/tsconfig": "0.0.0"
37
+ "typescript": "7.0.2",
38
+ "@privy-io/tsconfig": "0.0.0",
39
+ "@privy-io/build-config": "1.0.0"
48
40
  },
49
41
  "publishConfig": {
50
42
  "access": "public"
51
43
  },
52
44
  "scripts": {
53
- "build:types": "rollup --config rollup.types.mjs",
54
- "build:code": "rollup --config rollup.build.mjs",
45
+ "build": "rolldown --config rolldown.config.mjs",
55
46
  "check-types": "tsc --noEmit",
56
47
  "clean": "rm -rf dist .turbo .swc *.tsbuildinfo",
57
48
  "clean:reset": "rm -rf dist .turbo .swc node_modules *.tsbuildinfo",
58
- "dev:code": "rollup --config rollup.dev.mjs --watch",
59
- "dev:types": "rollup --config rollup.types.mjs --watch",
49
+ "dev": "rolldown --config rolldown.config.mjs --watch",
60
50
  "format": "oxlint src --fix",
61
51
  "lint": "oxlint src",
62
52
  "test": "jest"
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("../constants/error-codes.js");class e extends Error{toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(r,e,s,t){super(e),this.status=r,this.code=s,this.name="HttpError",this.responseData=t}}class s extends e{constructor(r,e){super(401,r,e),this.name="UnauthorizedError"}}exports.AccountTransferRequiredError=class extends e{constructor(e){super(400,"Account transfer required",r.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED,e),this.data=e,this.name="AccountTransferRequiredError"}},exports.AllowlistRejectedError=class extends s{constructor(e){super(e||"User is not allowed to login to this app.",r.PrivyErrorCode.ALLOWLIST_REJECTED),this.name="AllowlistRejectedError"}},exports.ForbiddenError=class extends e{constructor(r,e){super(403,r,e),this.name="ForbiddenError"}},exports.HttpError=e,exports.InsufficientBalanceError=class extends e{constructor(e){super(400,e||"Insufficient balance.",r.PrivyErrorCode.INSUFFICIENT_FUNDS),this.name="InsufficientBalanceError"}},exports.InternalServerError=class extends e{constructor(r){super(500,r||"Service unavailable."),this.name="InternalServerError"}},exports.InvalidInputError=class extends e{constructor(e,s){super(400,e,s||r.PrivyErrorCode.INVALID_DATA),this.name="InvalidInputError"}},exports.LegacyInvalidInputError=class extends e{constructor(r,e){super(422,r,e),this.name="LegacyInvalidInputError"}},exports.NotFoundError=class extends e{constructor(r){super(404,r),this.name="NotFoundError"}},exports.PaymentFailedError=class extends e{constructor(r){super(402,r||"Payment failed.")}},exports.RequestTimeoutError=class extends e{constructor(r,e){super(408,r,e),this.name="RequestTimeoutError"}},exports.ResourceConflictError=class extends e{constructor(e,s){super(409,e||"Conflict encountered while trying to modify resource.",s||r.PrivyErrorCode.RESOURCE_CONFLICT),this.name="ResourceConflictError"}},exports.TooManyRequestsError=class extends e{constructor(e){super(429,e||"Too many requests. Please wait to try again.",r.PrivyErrorCode.TOO_MANY_REQUESTS),this.name="TooManyRequestsError"}},exports.UnauthorizedError=s,exports.UnsupportedMediaType=class extends e{constructor(r){super(415,r),this.name="UnsupportedMediaType"}};
2
- //# sourceMappingURL=api-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-error.js","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","UnauthorizedError","errorCode","t","PrivyErrorCode","ACCOUNT_TRANSFER_REQUIRED","data","ALLOWLIST_REJECTED","INSUFFICIENT_FUNDS","INVALID_DATA","RESOURCE_CONFLICT","TOO_MANY_REQUESTS"],"mappings":"0DAWO,MAAMA,UAAkBC,MAoB7B,QAAAC,GACE,MAAO,GAAGC,KAAKC,SAASD,KAAKE,UAAUF,KAAKG,MAAQ,YAAYH,KAAKG,SAAW,IAClF,CAhBAC,WAAAA,CACEC,EACAH,EACAI,EACAC,GAEAC,MAAMN,GACNF,KAAKK,OAASA,EACdL,KAAKM,KAAOA,EAEZN,KAAKC,KAAO,YACZD,KAAKO,aAAeA,CACtB,EAcK,MAAME,UAA0BZ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,mBACd,uCAuGK,cAA2CJ,EAChDO,WAAAA,CACEO,GAaAH,MAAM,IAAK,4BAA6BI,EAAAA,eAAeC,0BAA2BC,GAAAA,KAb3EA,KAAAA,EAcPd,KAAKC,KAAO,8BACd,kCArHK,cAAqCQ,EAM1CL,WAAAA,CAAYF,GACVM,MACEN,GAAW,4CACXU,EAAAA,eAAeG,oBAEjBf,KAAKC,KAAO,wBACd,0BAGK,cAA6BJ,EAClCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,gBACd,wDA6DK,cAAuCJ,EAC5CO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBAAyBU,EAAAA,eAAeI,oBAC9DhB,KAAKC,KAAO,0BACd,+BASK,cAAkCJ,EACvCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBACtBF,KAAKC,KAAO,qBACd,6BA/GK,cAAgCJ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GAAaE,EAAAA,eAAeK,cAChDjB,KAAKC,KAAO,mBACd,mCA4DK,cAAsCJ,EAC3CO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,yBACd,yBAhCK,cAA4BJ,EACjCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,eACd,8BA6DK,cAAiCJ,EACtCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,kBACxB,+BA7DK,cAAkCL,EACvCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,qBACd,iCAoCK,cAAoCJ,EACzCO,WAAAA,CAAYF,EAAkBQ,GAC5BF,MACE,IACAN,GAAW,wDACXQ,GAAaE,EAAAA,eAAeM,mBAE9BlB,KAAKC,KAAO,uBACd,gCApBK,cAAmCJ,EACxCO,WAAAA,CAAYF,GACVM,MACE,IACAN,GAAW,+CACXU,EAAAA,eAAeO,mBAEjBnB,KAAKC,KAAO,sBACd,4DA7BK,cAAmCJ,EACxCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,sBACd"}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("./api-error.js");require("../constants/error-codes.js"),exports.AccountTransferRequiredError=r.AccountTransferRequiredError,exports.AllowlistRejectedError=r.AllowlistRejectedError,exports.ForbiddenError=r.ForbiddenError,exports.HttpError=r.HttpError,exports.InsufficientBalanceError=r.InsufficientBalanceError,exports.InternalServerError=r.InternalServerError,exports.InvalidInputError=r.InvalidInputError,exports.LegacyInvalidInputError=r.LegacyInvalidInputError,exports.NotFoundError=r.NotFoundError,exports.PaymentFailedError=r.PaymentFailedError,exports.RequestTimeoutError=r.RequestTimeoutError,exports.ResourceConflictError=r.ResourceConflictError,exports.TooManyRequestsError=r.TooManyRequestsError,exports.UnauthorizedError=r.UnauthorizedError,exports.UnsupportedMediaType=r.UnsupportedMediaType;
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";var _,i=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_MFA_ENROLLMENT="missing_mfa_enrollment",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.RESOURCE_CONFLICT="resource_conflict",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED="onramp_minimum_identity_verification_required",_.ONRAMP_IDENTITY_VERIFICATION_REQUIRED="onramp_identity_verification_required",_.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED="onramp_document_verification_required",_.ONRAMP_UNSUPPORTED_INFORMATION="onramp_unsupported_information",_.ONRAMP_TRANSACTION_LIMIT_REACHED="transaction_limit_reached",_.ONRAMP_QUOTE_EXPIRED="onramp_quote_expired",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.COMPLIANCE_BLOCKED="compliance_blocked",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_.INVALID_STATE="invalid_state",_);exports.PrivyErrorCode=i;
2
- //# sourceMappingURL=error-codes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-codes.js","sources":["../../../src/constants/error-codes.ts"],"names":["PrivyErrorCode"],"mappings":"aAAYA,IAAAA,EAALA,IAAKA,EAAAA,CAAAA,GAAAA,wBAAAA,0BAAAA,EAAAA,gCAAAA,kCAAAA,EAAAA,mCAAAA,qCAAAA,EAAAA,oCAAAA,sCAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,aAAAA,eAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,cAAAA,gBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,mBAAAA,uBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,qBAAAA,uBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,iCAAAA,mCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,eAAAA,0BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,8CAAAA,gDAAAA,EAAAA,sCAAAA,wCAAAA,EAAAA,sCAAAA,wCAAAA,EAAAA,+BAAAA,iCAAAA,EAAAA,iCAAAA,4BAAAA,EAAAA,qBAAAA,uBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,yCAAAA,2CAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,cAAAA,gBAAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("./error-codes.js");exports.PrivyErrorCode=r.PrivyErrorCode;
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("zod"),o=require("../constants/error-codes.js");const e=r.z.object({error:r.z.string(),cause:r.z.string().optional(),code:r.z.nativeEnum(o.PrivyErrorCode).optional()});exports.APIError=e;
2
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sources":["../../../src/schemas/error.ts"],"names":["APIError","z","object","error","string","cause","optional","code","nativeEnum","PrivyErrorCode"],"mappings":"2EAIO,MAAMA,EAAWC,EAAAA,EAAEC,OAAO,CAC/BC,MAAOF,EAAAA,EAAEG,SACTC,MAAOJ,EAAAA,EAAEG,SAASE,WAElBC,KAAMN,EAAAA,EAAEO,WAAWC,kBAAgBH"}
@@ -1,2 +0,0 @@
1
- "use strict";var r=require("./error.js");require("zod"),require("../constants/error-codes.js"),exports.APIError=r.APIError;
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{PrivyErrorCode as s}from"../constants/error-codes.mjs";class r extends Error{toString(){return`${this.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(s,r,e,t){super(r),this.status=s,this.code=e,this.name="HttpError",this.responseData=t}}class e extends r{constructor(r,e){super(400,r,e||s.INVALID_DATA),this.name="InvalidInputError"}}class t extends r{constructor(s,r){super(401,s,r),this.name="UnauthorizedError"}}class n extends t{constructor(r){super(r||"User is not allowed to login to this app.",s.ALLOWLIST_REJECTED),this.name="AllowlistRejectedError"}}class o extends r{constructor(s,r){super(403,s,r),this.name="ForbiddenError"}}class c extends r{constructor(s){super(404,s),this.name="NotFoundError"}}class a extends r{constructor(s,r){super(408,s,r),this.name="RequestTimeoutError"}}class u extends r{constructor(s){super(415,s),this.name="UnsupportedMediaType"}}class i extends r{constructor(s,r){super(422,s,r),this.name="LegacyInvalidInputError"}}class d extends r{constructor(r){super(429,r||"Too many requests. Please wait to try again.",s.TOO_MANY_REQUESTS),this.name="TooManyRequestsError"}}class l extends r{constructor(r,e){super(409,r||"Conflict encountered while trying to modify resource.",e||s.RESOURCE_CONFLICT),this.name="ResourceConflictError"}}class p extends r{constructor(r){super(400,r||"Insufficient balance.",s.INSUFFICIENT_FUNDS),this.name="InsufficientBalanceError"}}class h extends r{constructor(s){super(402,s||"Payment failed.")}}class E extends r{constructor(s){super(500,s||"Service unavailable."),this.name="InternalServerError"}}class m extends r{constructor(r){super(400,"Account transfer required",s.ACCOUNT_TRANSFER_REQUIRED,r),this.data=r,this.name="AccountTransferRequiredError"}}export{m as AccountTransferRequiredError,n as AllowlistRejectedError,o as ForbiddenError,r as HttpError,p as InsufficientBalanceError,E as InternalServerError,e as InvalidInputError,i as LegacyInvalidInputError,c as NotFoundError,h as PaymentFailedError,a as RequestTimeoutError,l as ResourceConflictError,d as TooManyRequestsError,t as UnauthorizedError,u as UnsupportedMediaType};
2
- //# sourceMappingURL=api-error.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-error.mjs","sources":["../../../src/classes/api-error.ts"],"names":["HttpError","Error","toString","this","name","message","cause","constructor","status","code","responseData","super","InvalidInputError","errorCode","PrivyErrorCode","INVALID_DATA","UnauthorizedError","AllowlistRejectedError","ALLOWLIST_REJECTED","ForbiddenError","NotFoundError","RequestTimeoutError","UnsupportedMediaType","LegacyInvalidInputError","TooManyRequestsError","TOO_MANY_REQUESTS","ResourceConflictError","RESOURCE_CONFLICT","InsufficientBalanceError","INSUFFICIENT_FUNDS","PaymentFailedError","InternalServerError","AccountTransferRequiredError","t","ACCOUNT_TRANSFER_REQUIRED","data"],"mappings":"8DAWO,MAAMA,UAAkBC,MAoB7B,QAAAC,GACE,MAAO,GAAGC,KAAKC,SAASD,KAAKE,UAAUF,KAAKG,MAAQ,YAAYH,KAAKG,SAAW,IAClF,CAhBAC,WAAAA,CACEC,EACAH,EACAI,EACAC,GAEAC,MAAMN,GACNF,KAAKK,OAASA,EACdL,KAAKM,KAAOA,EAEZN,KAAKC,KAAO,YACZD,KAAKO,aAAeA,CACtB,EAOK,MAAME,UAA0BZ,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GAAaC,EAAeC,cAChDZ,KAAKC,KAAO,mBACd,EAGK,MAAMY,UAA0BhB,EACrCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,mBACd,EAGK,MAAMa,UAA+BD,EAM1CT,WAAAA,CAAYF,GACVM,MACEN,GAAW,4CACXS,EAAeI,oBAEjBf,KAAKC,KAAO,wBACd,EAGK,MAAMe,UAAuBnB,EAClCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,gBACd,EAGK,MAAMgB,UAAsBpB,EACjCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,eACd,EAGK,MAAMiB,UAA4BrB,EACvCO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,qBACd,EAGK,MAAMkB,UAA6BtB,EACxCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GACXF,KAAKC,KAAO,sBACd,EAUK,MAAMmB,UAAgCvB,EAC3CO,WAAAA,CAAYF,EAAiBQ,GAC3BF,MAAM,IAAKN,EAASQ,GACpBV,KAAKC,KAAO,yBACd,EAGK,MAAMoB,UAA6BxB,EACxCO,WAAAA,CAAYF,GACVM,MACE,IACAN,GAAW,+CACXS,EAAeW,mBAEjBtB,KAAKC,KAAO,sBACd,EAIK,MAAMsB,UAA8B1B,EACzCO,WAAAA,CAAYF,EAAkBQ,GAC5BF,MACE,IACAN,GAAW,wDACXQ,GAAaC,EAAea,mBAE9BxB,KAAKC,KAAO,uBACd,EAGK,MAAMwB,UAAiC5B,EAC5CO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBAAyBS,EAAee,oBAC9D1B,KAAKC,KAAO,0BACd,EAGK,MAAM0B,UAA2B9B,EACtCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,kBACxB,EAGK,MAAM0B,UAA4B/B,EACvCO,WAAAA,CAAYF,GACVM,MAAM,IAAKN,GAAW,wBACtBF,KAAKC,KAAO,qBACd,EAGK,MAAM4B,UAAqChC,EAChDO,WAAAA,CACE0B,GAaAtB,MAAM,IAAK,4BAA6BG,EAAeoB,0BAA2BC,GAAAA,KAb3EA,KAAAA,EAcPhC,KAAKC,KAAO,8BACd"}
@@ -1,2 +0,0 @@
1
- export{AccountTransferRequiredError,AllowlistRejectedError,ForbiddenError,HttpError,InsufficientBalanceError,InternalServerError,InvalidInputError,LegacyInvalidInputError,NotFoundError,PaymentFailedError,RequestTimeoutError,ResourceConflictError,TooManyRequestsError,UnauthorizedError,UnsupportedMediaType}from"./api-error.mjs";import"../constants/error-codes.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- var _,I=((_={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",_.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",_.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",_.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",_.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",_.MISSING_MFA_ENROLLMENT="missing_mfa_enrollment",_.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",_.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",_.INVALID_DATA="invalid_data",_.INVALID_CREDENTIALS="invalid_credentials",_.INVALID_CAPTCHA="invalid_captcha",_.LINKED_TO_ANOTHER_USER="linked_to_another_user",_.ALLOWLIST_REJECTED="allowlist_rejected",_.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",_.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",_.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",_.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",_.TOO_MANY_REQUESTS="too_many_requests",_.RESOURCE_CONFLICT="resource_conflict",_.INVALID_ORIGIN="invalid_origin",_.MISSING_ORIGIN="missing_origin",_.INVALID_NATIVE_APP_ID="invalid_native_app_id",_.TOKEN_ALREADY_USED="token_already_used",_.ALREADY_LOGGED_OUT="already_logged_out",_.NOT_SUPPORTED="not_supported",_.USER_UNSUBSCRIBED="user_unsubscribed",_.MAX_APPS_REACHED="max_apps_reached",_.USER_LIMIT_REACHED="max_accounts_reached",_.DEVICE_REVOKED="device_revoked",_.WALLET_PASSWORD_EXISTS="wallet_password_exists",_.OAUTH_STATE_MISMATCH="oauth_state_mismatch",_.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",_.MAX_TEST_ACCOUNTS_REACHED="max_test_accounts_reached",_.DISALLOWED_LOGIN_METHOD="disallowed_login_method",_.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",_.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",_.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",_.CANNOT_SET_PASSWORD="cannot_set_password",_.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",_.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",_.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",_.USER_DOES_NOT_EXIST="user_does_not_exist",_.ALREADY_EXISTS="resource_already_exists",_.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",_.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",_.FEATURE_NOT_ENABLED="feature_not_enabled",_.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED="onramp_minimum_identity_verification_required",_.ONRAMP_IDENTITY_VERIFICATION_REQUIRED="onramp_identity_verification_required",_.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED="onramp_document_verification_required",_.ONRAMP_UNSUPPORTED_INFORMATION="onramp_unsupported_information",_.ONRAMP_TRANSACTION_LIMIT_REACHED="transaction_limit_reached",_.ONRAMP_QUOTE_EXPIRED="onramp_quote_expired",_.INSUFFICIENT_FUNDS="insufficient_funds",_.TRANSACTION_BROADCAST_FAILURE="transaction_broadcast_failure",_.TRANSACTION_EXECUTION_FAILURE="transaction_execution_failure",_.INVALID_SOLANA_TRANSACTION="invalid_solana_transaction",_.INVALID_POLICY_FORMAT="invalid_policy_format",_.INVALID_AGGREGATION_FORMAT="invalid_aggregation_format",_.POLICY_VIOLATION="policy_violation",_.AUTHORIZATION_KEY_HAS_ASSOCIATED_WALLETS="authorization_key_has_associated_wallets",_.COMPLIANCE_BLOCKED="compliance_blocked",_.INVALID_REQUEST="invalid_request",_.SIGNUP_DISABLED="signup_disabled",_.INVALID_STATE="invalid_state",_);export{I as PrivyErrorCode};
2
- //# sourceMappingURL=error-codes.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-codes.mjs","sources":["../../../src/constants/error-codes.ts"],"names":["PrivyErrorCode"],"mappings":"AAAYA,IAAAA,EAALA,IAAKA,EAAAA,CAAAA,GAAAA,wBAAAA,0BAAAA,EAAAA,gCAAAA,kCAAAA,EAAAA,mCAAAA,qCAAAA,EAAAA,oCAAAA,sCAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,aAAAA,eAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,yBAAAA,2BAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,cAAAA,gBAAAA,EAAAA,kBAAAA,oBAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,mBAAAA,uBAAAA,EAAAA,eAAAA,iBAAAA,EAAAA,uBAAAA,yBAAAA,EAAAA,qBAAAA,uBAAAA,EAAAA,6BAAAA,+BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,wBAAAA,0BAAAA,EAAAA,qCAAAA,uCAAAA,EAAAA,iCAAAA,mCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,eAAAA,0BAAAA,EAAAA,0BAAAA,4BAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,oBAAAA,sBAAAA,EAAAA,8CAAAA,gDAAAA,EAAAA,sCAAAA,wCAAAA,EAAAA,sCAAAA,wCAAAA,EAAAA,+BAAAA,iCAAAA,EAAAA,iCAAAA,4BAAAA,EAAAA,qBAAAA,uBAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,8BAAAA,gCAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,sBAAAA,wBAAAA,EAAAA,2BAAAA,6BAAAA,EAAAA,iBAAAA,mBAAAA,EAAAA,yCAAAA,2CAAAA,EAAAA,mBAAAA,qBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,gBAAAA,kBAAAA,EAAAA,cAAAA,gBAAAA"}
@@ -1,2 +0,0 @@
1
- export{PrivyErrorCode}from"./error-codes.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{z as o}from"zod";import{PrivyErrorCode as r}from"../constants/error-codes.mjs";const t=o.object({error:o.string(),cause:o.string().optional(),code:o.nativeEnum(r).optional()});export{t as APIError};
2
- //# sourceMappingURL=error.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.mjs","sources":["../../../src/schemas/error.ts"],"names":["APIError","z","object","error","string","cause","optional","code","nativeEnum","PrivyErrorCode"],"mappings":"sFAIO,MAAMA,EAAWC,EAAEC,OAAO,CAC/BC,MAAOF,EAAEG,SACTC,MAAOJ,EAAEG,SAASE,WAElBC,KAAMN,EAAEO,WAAWC,GAAgBH"}
@@ -1,2 +0,0 @@
1
- export{APIError}from"./error.mjs";import"zod";import"../constants/error-codes.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":""}