@getpara/user-management-client 2.0.0-fc.3 → 2.1.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.
@@ -1,81 +0,0 @@
1
- import "../chunk-BBZEL7EG.js";
2
- const AUTH_TYPES = [
3
- "email",
4
- "phone",
5
- "phoneLegacy",
6
- "farcaster",
7
- "telegram",
8
- "userId",
9
- "externalWallet",
10
- "discord",
11
- "x",
12
- "customId",
13
- "guestId"
14
- ];
15
- var EncryptorType = /* @__PURE__ */ ((EncryptorType2) => {
16
- EncryptorType2["USER"] = "USER";
17
- EncryptorType2["RECOVERY"] = "RECOVERY";
18
- EncryptorType2["BIOMETRICS"] = "BIOMETRICS";
19
- EncryptorType2["PASSWORD"] = "PASSWORD";
20
- return EncryptorType2;
21
- })(EncryptorType || {});
22
- var KeyShareType = /* @__PURE__ */ ((KeyShareType2) => {
23
- KeyShareType2["USER"] = "USER";
24
- KeyShareType2["RECOVERY"] = "RECOVERY";
25
- return KeyShareType2;
26
- })(KeyShareType || {});
27
- var PasswordStatus = /* @__PURE__ */ ((PasswordStatus2) => {
28
- PasswordStatus2["PENDING"] = "PENDING";
29
- PasswordStatus2["COMPLETE"] = "COMPLETE";
30
- return PasswordStatus2;
31
- })(PasswordStatus || {});
32
- var PublicKeyStatus = /* @__PURE__ */ ((PublicKeyStatus2) => {
33
- PublicKeyStatus2["PENDING"] = "PENDING";
34
- PublicKeyStatus2["COMPLETE"] = "COMPLETE";
35
- return PublicKeyStatus2;
36
- })(PublicKeyStatus || {});
37
- var PublicKeyType = /* @__PURE__ */ ((PublicKeyType2) => {
38
- PublicKeyType2["MOBILE"] = "MOBILE";
39
- PublicKeyType2["WEB"] = "WEB";
40
- return PublicKeyType2;
41
- })(PublicKeyType || {});
42
- var OAuthMethod = /* @__PURE__ */ ((OAuthMethod2) => {
43
- OAuthMethod2["GOOGLE"] = "GOOGLE";
44
- OAuthMethod2["TWITTER"] = "TWITTER";
45
- OAuthMethod2["APPLE"] = "APPLE";
46
- OAuthMethod2["DISCORD"] = "DISCORD";
47
- OAuthMethod2["FACEBOOK"] = "FACEBOOK";
48
- OAuthMethod2["FARCASTER"] = "FARCASTER";
49
- OAuthMethod2["TELEGRAM"] = "TELEGRAM";
50
- return OAuthMethod2;
51
- })(OAuthMethod || {});
52
- const OAUTH_METHODS = ["GOOGLE", "TWITTER", "APPLE", "DISCORD", "FACEBOOK", "FARCASTER", "TELEGRAM"];
53
- const LINKED_ACCOUNT_TYPES = [
54
- "EMAIL",
55
- "PHONE",
56
- "GOOGLE",
57
- "FACEBOOK",
58
- "APPLE",
59
- "TWITTER",
60
- "DISCORD",
61
- "TELEGRAM",
62
- "FARCASTER",
63
- "EXTERNAL_WALLET"
64
- ];
65
- var AuthMethod = /* @__PURE__ */ ((AuthMethod2) => {
66
- AuthMethod2["PASSWORD"] = "PASSWORD";
67
- AuthMethod2["PASSKEY"] = "PASSKEY";
68
- return AuthMethod2;
69
- })(AuthMethod || {});
70
- export {
71
- AUTH_TYPES,
72
- AuthMethod,
73
- EncryptorType,
74
- KeyShareType,
75
- LINKED_ACCOUNT_TYPES,
76
- OAUTH_METHODS,
77
- OAuthMethod,
78
- PasswordStatus,
79
- PublicKeyStatus,
80
- PublicKeyType
81
- };
@@ -1,9 +0,0 @@
1
- import "../chunk-BBZEL7EG.js";
2
- var EmailTheme = /* @__PURE__ */ ((EmailTheme2) => {
3
- EmailTheme2["LIGHT"] = "light";
4
- EmailTheme2["DARK"] = "dark";
5
- return EmailTheme2;
6
- })(EmailTheme || {});
7
- export {
8
- EmailTheme
9
- };
@@ -1,5 +0,0 @@
1
- export * from "./auth.js";
2
- export * from "./email.js";
3
- export * from "./onRamp.js";
4
- export * from "./partner.js";
5
- export * from "./wallet.js";
@@ -1,38 +0,0 @@
1
- import "../chunk-BBZEL7EG.js";
2
- var OnRampProvider = /* @__PURE__ */ ((OnRampProvider2) => {
3
- OnRampProvider2["RAMP"] = "RAMP";
4
- OnRampProvider2["STRIPE"] = "STRIPE";
5
- OnRampProvider2["MOONPAY"] = "MOONPAY";
6
- return OnRampProvider2;
7
- })(OnRampProvider || {});
8
- var OnRampAsset = /* @__PURE__ */ ((OnRampAsset2) => {
9
- OnRampAsset2["ETHEREUM"] = "ETHEREUM";
10
- OnRampAsset2["USDC"] = "USDC";
11
- OnRampAsset2["TETHER"] = "TETHER";
12
- OnRampAsset2["POLYGON"] = "POLYGON";
13
- OnRampAsset2["SOLANA"] = "SOLANA";
14
- OnRampAsset2["ATOM"] = "ATOM";
15
- OnRampAsset2["CELO"] = "CELO";
16
- OnRampAsset2["CUSD"] = "CUSD";
17
- OnRampAsset2["CEUR"] = "CEUR";
18
- OnRampAsset2["CREAL"] = "CREAL";
19
- OnRampAsset2["BERA"] = "BERA";
20
- return OnRampAsset2;
21
- })(OnRampAsset || {});
22
- var OnRampPurchaseStatus = /* @__PURE__ */ ((OnRampPurchaseStatus2) => {
23
- OnRampPurchaseStatus2["INITIATED"] = "INITIATED";
24
- OnRampPurchaseStatus2["FINISHED"] = "FINISHED";
25
- OnRampPurchaseStatus2["CANCELLED"] = "CANCELLED";
26
- return OnRampPurchaseStatus2;
27
- })(OnRampPurchaseStatus || {});
28
- var OnRampPurchaseType = /* @__PURE__ */ ((OnRampPurchaseType2) => {
29
- OnRampPurchaseType2["BUY"] = "BUY";
30
- OnRampPurchaseType2["SELL"] = "SELL";
31
- return OnRampPurchaseType2;
32
- })(OnRampPurchaseType || {});
33
- export {
34
- OnRampAsset,
35
- OnRampProvider,
36
- OnRampPurchaseStatus,
37
- OnRampPurchaseType
38
- };
File without changes
@@ -1,79 +0,0 @@
1
- import "../chunk-BBZEL7EG.js";
2
- var WalletScheme = /* @__PURE__ */ ((WalletScheme2) => {
3
- WalletScheme2["DKLS"] = "DKLS";
4
- WalletScheme2["CGGMP"] = "CGGMP";
5
- WalletScheme2["ED25519"] = "ED25519";
6
- return WalletScheme2;
7
- })(WalletScheme || {});
8
- const WALLET_SCHEMES = ["DKLS", "CGGMP", "ED25519"];
9
- var WalletType = /* @__PURE__ */ ((WalletType2) => {
10
- WalletType2["EVM"] = "EVM";
11
- WalletType2["SOLANA"] = "SOLANA";
12
- WalletType2["COSMOS"] = "COSMOS";
13
- return WalletType2;
14
- })(WalletType || {});
15
- const WALLET_TYPES = ["EVM", "SOLANA", "COSMOS"];
16
- var Chain = /* @__PURE__ */ ((Chain2) => {
17
- Chain2["ETH"] = "ETH";
18
- Chain2["CELO"] = "CELO";
19
- Chain2["MATIC"] = "MATIC";
20
- return Chain2;
21
- })(Chain || {});
22
- var Network = /* @__PURE__ */ ((Network2) => {
23
- Network2["ETHEREUM"] = "ETHEREUM";
24
- Network2["SEPOLIA"] = "SEPOLIA";
25
- Network2["ARBITRUM"] = "ARBITRUM";
26
- Network2["BASE"] = "BASE";
27
- Network2["OPTIMISM"] = "OPTIMISM";
28
- Network2["POLYGON"] = "POLYGON";
29
- Network2["SOLANA"] = "SOLANA";
30
- Network2["COSMOS"] = "COSMOS";
31
- Network2["CELO"] = "CELO";
32
- Network2["NOBLE"] = "NOBLE";
33
- Network2["SOLANA_DEVNET"] = "SOLANA_DEVNET";
34
- Network2["BERACHAIN"] = "BERACHAIN";
35
- return Network2;
36
- })(Network || {});
37
- const PREGEN_IDENTIFIER_TYPES = [
38
- "EMAIL",
39
- "PHONE",
40
- "CUSTOM_ID",
41
- "GUEST_ID",
42
- "DISCORD",
43
- "TWITTER",
44
- "TELEGRAM",
45
- "FARCASTER"
46
- ];
47
- const NON_ED25519 = ["DKLS", "CGGMP"];
48
- const EVM_WALLETS = [
49
- "METAMASK",
50
- "RAINBOW",
51
- "COINBASE",
52
- "WALLETCONNECT",
53
- "FARCASTER",
54
- "ZERION",
55
- "SAFE",
56
- "RABBY",
57
- "OKX",
58
- "HAHA",
59
- "BACKPACK",
60
- "PHANTOM",
61
- "VALORA"
62
- ];
63
- const SOLANA_WALLETS = ["PHANTOM", "GLOW", "BACKPACK", "SOLFLARE"];
64
- const COSMOS_WALLETS = ["KEPLR", "LEAP", "COSMOSTATION"];
65
- const EXTERNAL_WALLET_TYPES = [.../* @__PURE__ */ new Set([...EVM_WALLETS, ...SOLANA_WALLETS, ...COSMOS_WALLETS])];
66
- export {
67
- COSMOS_WALLETS,
68
- Chain,
69
- EVM_WALLETS,
70
- EXTERNAL_WALLET_TYPES,
71
- NON_ED25519,
72
- Network,
73
- PREGEN_IDENTIFIER_TYPES,
74
- SOLANA_WALLETS,
75
- WALLET_SCHEMES,
76
- WALLET_TYPES,
77
- WalletScheme,
78
- WalletType
79
- };
@@ -1,263 +0,0 @@
1
- import { CurrentWalletIds, ExternalWalletType, SupportedWalletTypes, TExternalWallet } from './wallet.js';
2
- export declare const AUTH_TYPES: readonly ["email", "phone", "phoneLegacy", "farcaster", "telegram", "userId", "externalWallet", "discord", "x", "customId", "guestId"];
3
- export type AuthType = 'email' | 'phone' | 'phoneLegacy' | 'farcaster' | 'telegram' | 'userId' | 'externalWallet' | 'discord' | 'x' | 'customId' | 'guestId';
4
- export type PrimaryAuthType = Extract<AuthType, 'email' | 'phone' | 'farcaster' | 'telegram' | 'externalWallet'>;
5
- export type VerifiedAuthType = Extract<PrimaryAuthType, 'email' | 'phone' | 'externalWallet'>;
6
- export type PregenAuthType = Exclude<PrimaryAuthType, 'externalWallet'> | Extract<AuthType, 'discord' | 'x' | 'customId'>;
7
- export type AuthIdentifier<T extends AuthType | never> = T extends 'phone' ? `+${number}` : string;
8
- export type AuthInfo<T extends Exclude<AuthType, 'phoneLegacy'> = Exclude<AuthType, 'phoneLegacy'>> = {
9
- auth: Auth<T>;
10
- authType: T;
11
- identifier: AuthIdentifier<T>;
12
- };
13
- export type PrimaryAuthInfo = AuthInfo<PrimaryAuthType>;
14
- export type VerifiedAuthInfo = AuthInfo<VerifiedAuthType>;
15
- export type PregenAuthInfo = AuthInfo<PregenAuthType>;
16
- export type AuthParams = Record<string, any> & {
17
- email?: string;
18
- phone?: string;
19
- countryCode?: string;
20
- farcasterUsername?: string;
21
- telegramUserId?: string;
22
- userId?: string;
23
- externalWalletAddress?: string;
24
- };
25
- export type Auth<T extends AuthType = AuthType> = T extends 'email' ? {
26
- email: string;
27
- } : T extends 'phoneLegacy' ? {
28
- phone: string;
29
- countryCode: string;
30
- } : T extends 'phone' ? {
31
- phone: AuthIdentifier<'phone'>;
32
- } : T extends 'farcaster' ? {
33
- farcasterUsername: AuthIdentifier<'farcaster'>;
34
- } : T extends 'telegram' ? {
35
- telegramUserId: AuthIdentifier<'telegram'>;
36
- } : T extends 'externalWallet' ? {
37
- externalWalletAddress: AuthIdentifier<'externalWallet'>;
38
- } : T extends 'x' ? {
39
- xUsername: AuthIdentifier<'x'>;
40
- } : T extends 'discord' ? {
41
- discordUsername: AuthIdentifier<'discord'>;
42
- } : T extends 'customId' ? {
43
- customId: AuthIdentifier<'customId'>;
44
- } : T extends 'guestId' ? {
45
- guestId: AuthIdentifier<'guestId'>;
46
- } : {
47
- userId: AuthIdentifier<'userId'>;
48
- };
49
- export type PrimaryAuth = Auth<PrimaryAuthType>;
50
- export type VerifiedAuth = Auth<VerifiedAuthType>;
51
- export type PregenAuth = Auth<PregenAuthType>;
52
- export type PregenOrGuestAuth = Auth<PregenAuthType | 'guestId'>;
53
- export type AuthExtras = {
54
- /**
55
- * The current user's third-party username.
56
- */
57
- username?: string;
58
- /**
59
- * The current user's third-party display name.
60
- */
61
- displayName?: string;
62
- /**
63
- * The current user's third-party profile picture URL.
64
- */
65
- pfpUrl?: string;
66
- /**
67
- * The current user's external wallet information.
68
- */
69
- externalWallet?: ExternalWalletInfo;
70
- };
71
- export declare enum EncryptorType {
72
- USER = "USER",
73
- RECOVERY = "RECOVERY",
74
- BIOMETRICS = "BIOMETRICS",
75
- PASSWORD = "PASSWORD"
76
- }
77
- export declare enum KeyShareType {
78
- USER = "USER",
79
- RECOVERY = "RECOVERY"
80
- }
81
- export declare enum PasswordStatus {
82
- PENDING = "PENDING",
83
- COMPLETE = "COMPLETE"
84
- }
85
- export declare enum PublicKeyStatus {
86
- PENDING = "PENDING",
87
- COMPLETE = "COMPLETE"
88
- }
89
- export declare enum PublicKeyType {
90
- MOBILE = "MOBILE",
91
- WEB = "WEB"
92
- }
93
- export interface EncryptedKeyShare {
94
- encryptedShare: string;
95
- encryptedKey?: string;
96
- type: KeyShareType;
97
- biometricPublicKey?: string;
98
- encryptor: EncryptorType;
99
- recoveryPublicKeyId?: string;
100
- partnerId?: string;
101
- protocolId?: string;
102
- }
103
- /** @deprecated use the string union type `TOAuthMethod` instead */
104
- export declare enum OAuthMethod {
105
- GOOGLE = "GOOGLE",
106
- TWITTER = "TWITTER",
107
- APPLE = "APPLE",
108
- DISCORD = "DISCORD",
109
- FACEBOOK = "FACEBOOK",
110
- FARCASTER = "FARCASTER",
111
- TELEGRAM = "TELEGRAM"
112
- }
113
- export declare const OAUTH_METHODS: readonly ["GOOGLE", "TWITTER", "APPLE", "DISCORD", "FACEBOOK", "FARCASTER", "TELEGRAM"];
114
- export type TOAuthMethod = (typeof OAUTH_METHODS)[number];
115
- export declare const LINKED_ACCOUNT_TYPES: readonly ["EMAIL", "PHONE", "GOOGLE", "FACEBOOK", "APPLE", "TWITTER", "DISCORD", "TELEGRAM", "FARCASTER", "EXTERNAL_WALLET"];
116
- export type TLinkedAccountType = (typeof LINKED_ACCOUNT_TYPES)[number] | 'EXTERNAL_WALLET';
117
- export type SupportedAccountLinks = (TLinkedAccountType | TExternalWallet)[];
118
- export declare enum AuthMethod {
119
- PASSWORD = "PASSWORD",
120
- PASSKEY = "PASSKEY"
121
- }
122
- export type BiometricLocationHint = {
123
- useragent?: string;
124
- aaguid?: string;
125
- };
126
- export type TelegramAuthResponse = {
127
- auth_date: number;
128
- first_name?: string;
129
- hash: string;
130
- id: number;
131
- last_name?: string;
132
- photo_url?: string;
133
- username?: string;
134
- };
135
- export type SessionInfo = {
136
- userId?: string;
137
- sessionId?: string;
138
- sessionLookupId?: string;
139
- partnerId: string;
140
- biometricVerifiedAt?: number;
141
- currentWalletIds?: CurrentWalletIds;
142
- needsWallet?: boolean;
143
- isAuthenticated?: boolean;
144
- supportedWalletTypes: SupportedWalletTypes;
145
- cosmosPrefix?: string;
146
- origin?: string;
147
- email?: string;
148
- verifiedExternalWalletAddresses?: string[];
149
- };
150
- export type ServerAuthStateBase = AuthExtras & {
151
- auth: PrimaryAuth;
152
- userId: string;
153
- };
154
- export type ServerAuthStateVerify = ServerAuthStateBase & {
155
- stage: 'verify';
156
- signatureVerificationMessage?: string;
157
- };
158
- export type ServerAuthStateSignup = ServerAuthStateBase & {
159
- stage: 'signup';
160
- signupAuthMethods: AuthMethod[];
161
- };
162
- export type ServerAuthStateLogin = ServerAuthStateBase & {
163
- stage: 'login';
164
- biometricHints?: BiometricLocationHint[];
165
- loginAuthMethods: AuthMethod[];
166
- isWalletSelectionNeeded?: boolean;
167
- };
168
- export type VerifyThirdPartyAuth = ServerAuthStateSignup | ServerAuthStateLogin;
169
- export type ExternalWalletInfo = {
170
- address: string;
171
- type: ExternalWalletType;
172
- provider?: string;
173
- providerId?: TExternalWallet;
174
- addressBech32?: string;
175
- withFullParaAuth?: boolean;
176
- ensName?: string | null;
177
- ensAvatar?: string | null;
178
- isConnectionOnly?: boolean;
179
- withVerification?: boolean;
180
- };
181
- export type VerifyExternalWalletParams = {
182
- /**
183
- * The external wallet information to verify.
184
- */
185
- externalWallet: ExternalWalletInfo;
186
- /**
187
- * The signature of the signed verification string.
188
- */
189
- signedMessage: string;
190
- /**
191
- * For Cosmos wallets, the wallet's public key as a hex string.
192
- */
193
- cosmosPublicKeyHex?: string;
194
- /**
195
- * For Cosmos wallets, the base64 signer string.
196
- */
197
- cosmosSigner?: string;
198
- };
199
- export type LoginExternalWalletResponse = ServerAuthStateLogin | (ServerAuthStateVerify & {
200
- signatureVerificationMessage: string;
201
- });
202
- export type VerifyTelegramResponse = VerifyThirdPartyAuth;
203
- export type VerifyFarcasterResponse = VerifyThirdPartyAuth | Record<string, never>;
204
- export type ServerAuthState = ServerAuthStateVerify | ServerAuthStateSignup | ServerAuthStateLogin;
205
- export type SignUpOrLogInResponse = ServerAuthStateVerify | ServerAuthStateLogin;
206
- export type Setup2faResponse = {
207
- /**
208
- * Indicates whether 2FA has already been set up for the current user.
209
- */
210
- isSetup: true;
211
- uri: undefined;
212
- } | {
213
- isSetup?: false;
214
- /**
215
- * A URI for the user to set up two-factor authentication.
216
- */
217
- uri: string;
218
- };
219
- export type AccountMetadataKey = Lowercase<Exclude<TOAuthMethod, 'TWITTER'> | 'X'>;
220
- export type AccountMetadata = Partial<Record<AccountMetadataKey, {
221
- date: Date;
222
- metadata: Record<string, any>;
223
- }>>;
224
- export type IssueJwtParams = {
225
- /**
226
- * The index of the Para RSA keypair to use for signing the JWT. Defaults to `0`.
227
- */
228
- keyIndex?: number;
229
- };
230
- export type IssueJwtResponse = {
231
- /**
232
- * The Para JWT token.
233
- */
234
- token: string;
235
- /**
236
- * The `keyid`` / `kid` of the keypair used to sign the JWT.
237
- */
238
- keyId: string;
239
- };
240
- export type LinkedAccount<D extends Date | string = Date> = {
241
- id?: string;
242
- date: D;
243
- type: TLinkedAccountType;
244
- identifier: string;
245
- displayName: string;
246
- externalWallet?: ExternalWalletInfo;
247
- metadata?: unknown;
248
- };
249
- export type LinkedAccounts<D extends Date | string = Date> = {
250
- primary: LinkedAccount<D>[];
251
- linked: LinkedAccount<D>[];
252
- };
253
- export type LinkAccountParams = {
254
- type: TLinkedAccountType;
255
- identifier?: string;
256
- externalWallet?: ExternalWalletInfo;
257
- };
258
- export type VerifyLinkParams = {
259
- linkedAccountId: string;
260
- userId: string;
261
- telegramAuthResponse?: TelegramAuthResponse;
262
- verificationCode?: string;
263
- };
@@ -1,27 +0,0 @@
1
- export declare enum EmailTheme {
2
- LIGHT = "light",
3
- DARK = "dark"
4
- }
5
- export interface VerificationEmailProps {
6
- theme?: EmailTheme;
7
- homepageUrl?: string;
8
- xUrl?: string;
9
- linkedinUrl?: string;
10
- githubUrl?: string;
11
- supportUrl?: string;
12
- brandColor?: string;
13
- }
14
- export interface BackupKitEmailProps {
15
- theme?: EmailTheme;
16
- homepageUrl?: string;
17
- xUrl?: string;
18
- linkedinUrl?: string;
19
- githubUrl?: string;
20
- supportUrl?: string;
21
- brandColor?: string;
22
- }
23
- export type ResendVerificationCodeParams = VerificationEmailProps & {
24
- userId: string;
25
- type?: 'EMAIL' | 'PHONE';
26
- linkedAccountId?: string;
27
- };
@@ -1,5 +0,0 @@
1
- export * from './auth.js';
2
- export * from './email.js';
3
- export * from './onRamp.js';
4
- export * from './partner.js';
5
- export * from './wallet.js';
@@ -1,69 +0,0 @@
1
- import { Network, TWalletType } from './wallet.js';
2
- export declare enum OnRampProvider {
3
- RAMP = "RAMP",
4
- STRIPE = "STRIPE",
5
- MOONPAY = "MOONPAY"
6
- }
7
- export declare enum OnRampAsset {
8
- ETHEREUM = "ETHEREUM",
9
- USDC = "USDC",
10
- TETHER = "TETHER",
11
- POLYGON = "POLYGON",
12
- SOLANA = "SOLANA",
13
- ATOM = "ATOM",
14
- CELO = "CELO",
15
- CUSD = "CUSD",
16
- CEUR = "CEUR",
17
- CREAL = "CREAL",
18
- BERA = "BERA"
19
- }
20
- export declare enum OnRampPurchaseStatus {
21
- INITIATED = "INITIATED",
22
- FINISHED = "FINISHED",
23
- CANCELLED = "CANCELLED"
24
- }
25
- export declare enum OnRampPurchaseType {
26
- BUY = "BUY",
27
- SELL = "SELL"
28
- }
29
- export interface OnRampPurchase {
30
- id: string;
31
- userId: string;
32
- type?: OnRampPurchaseType;
33
- walletId?: string | null;
34
- walletType?: TWalletType;
35
- externalWalletAddress?: string | null;
36
- address?: string | null;
37
- status?: OnRampPurchaseStatus;
38
- provider?: OnRampProvider;
39
- providerKey?: string | null;
40
- fiat?: string | null;
41
- fiatQuantity?: string | null;
42
- asset?: OnRampAsset;
43
- assetQuantity?: string | null;
44
- network?: Network | null;
45
- testMode?: boolean;
46
- }
47
- export type OnRampPurchaseCreateParams = Omit<OnRampPurchase, 'id' | 'userId'> & {
48
- networks?: Network[] | 'all';
49
- assets?: OnRampAsset[] | 'all';
50
- defaultNetwork?: Network;
51
- defaultAsset?: OnRampAsset;
52
- };
53
- export type OnRampPurchaseUpdateParams = Omit<OnRampPurchase, 'id' | 'userId'>;
54
- type ProviderAssetInfo = [string, Partial<Record<OnRampPurchaseType, boolean>>];
55
- export type OnRampAssetInfo = Record<TWalletType, Partial<Record<Network, Partial<Record<OnRampAsset, Partial<Record<OnRampProvider, ProviderAssetInfo>>>>>>>;
56
- export type OnRampAllowedAssets = Partial<Record<Network, true | OnRampAsset[]>>;
57
- export type OnRampConfig = {
58
- isBuyEnabled: boolean;
59
- isReceiveEnabled: boolean;
60
- isWithdrawEnabled: boolean;
61
- assetInfo: OnRampAssetInfo;
62
- providers: OnRampProvider[];
63
- allowedAssets?: OnRampAllowedAssets;
64
- rampApiKey?: string;
65
- defaultOnRampAsset?: OnRampAsset;
66
- defaultOnRampNetwork?: Network;
67
- defaultBuyAmount?: [string, string];
68
- };
69
- export {};
@@ -1,21 +0,0 @@
1
- import { AuthMethod, SupportedAccountLinks } from './auth.js';
2
- import { SupportedWalletTypes } from './wallet.js';
3
- export interface PartnerEntity {
4
- id: string;
5
- displayName: string;
6
- apiKey?: string;
7
- logoUrl?: string;
8
- iconUrl?: string;
9
- portalHeaderLogoUrl?: string;
10
- policiesEnabled: boolean;
11
- backgroundColor?: string;
12
- foregroundColor?: string;
13
- accentColor?: string;
14
- font?: string;
15
- themeMode?: 'light' | 'dark';
16
- portalUrl?: string;
17
- supportedAuthMethods?: AuthMethod[];
18
- supportedWalletTypes?: SupportedWalletTypes;
19
- supportedAccountLinks?: SupportedAccountLinks;
20
- cosmosPrefix?: string;
21
- }
@@ -1,79 +0,0 @@
1
- import { PartnerEntity } from './partner.js';
2
- /** @deprecated use the string union type `TWalletScheme` instead */
3
- export declare enum WalletScheme {
4
- DKLS = "DKLS",
5
- CGGMP = "CGGMP",
6
- ED25519 = "ED25519"
7
- }
8
- export declare const WALLET_SCHEMES: readonly ["DKLS", "CGGMP", "ED25519"];
9
- export type TWalletScheme = (typeof WALLET_SCHEMES)[number];
10
- /** @deprecated use the string union type `TWalletType` instead */
11
- export declare enum WalletType {
12
- EVM = "EVM",
13
- SOLANA = "SOLANA",
14
- COSMOS = "COSMOS"
15
- }
16
- export declare const WALLET_TYPES: readonly ["EVM", "SOLANA", "COSMOS"];
17
- export type TWalletType = (typeof WALLET_TYPES)[number];
18
- export declare enum Chain {
19
- ETH = "ETH",
20
- CELO = "CELO",
21
- MATIC = "MATIC"
22
- }
23
- export declare enum Network {
24
- ETHEREUM = "ETHEREUM",
25
- SEPOLIA = "SEPOLIA",
26
- ARBITRUM = "ARBITRUM",
27
- BASE = "BASE",
28
- OPTIMISM = "OPTIMISM",
29
- POLYGON = "POLYGON",
30
- SOLANA = "SOLANA",
31
- COSMOS = "COSMOS",
32
- CELO = "CELO",
33
- NOBLE = "NOBLE",
34
- SOLANA_DEVNET = "SOLANA_DEVNET",
35
- BERACHAIN = "BERACHAIN"
36
- }
37
- export type WalletRef = 'walletId' | 'externalWalletAddress';
38
- export type WalletParams = Partial<{
39
- walletId?: string;
40
- externalWalletAddress?: string;
41
- }>;
42
- export type EmbeddedWalletType = Exclude<TWalletType, never>;
43
- export type ExternalWalletType = Exclude<TWalletType, never>;
44
- export declare const PREGEN_IDENTIFIER_TYPES: readonly ["EMAIL", "PHONE", "CUSTOM_ID", "GUEST_ID", "DISCORD", "TWITTER", "TELEGRAM", "FARCASTER"];
45
- export type TPregenIdentifierType = (typeof PREGEN_IDENTIFIER_TYPES)[number];
46
- export type PregenIds = Partial<Record<TPregenIdentifierType, string[]>>;
47
- export interface WalletEntity {
48
- address: string | null;
49
- createdAt: string;
50
- isPregen?: boolean;
51
- pregenIdentifier: string;
52
- pregenIdentifierType: TPregenIdentifierType;
53
- id: string;
54
- keyGenComplete: boolean;
55
- name: string | null;
56
- partnerId: string;
57
- partner?: PartnerEntity;
58
- publicKey: string | null;
59
- scheme: string;
60
- type: TWalletType;
61
- updatedAt: string;
62
- userId: string | null;
63
- lastUsedAt: string | null;
64
- lastUsedPartnerId?: string;
65
- lastUsedPartner?: PartnerEntity;
66
- ensName?: string | null;
67
- ensAvatar?: string | null;
68
- }
69
- export type CurrentWalletIds = Partial<Record<TWalletType, string[]>>;
70
- export declare const NON_ED25519: string[];
71
- export type SupportedWalletTypes = {
72
- type: TWalletType;
73
- optional?: boolean;
74
- }[];
75
- export declare const EVM_WALLETS: readonly ["METAMASK", "RAINBOW", "COINBASE", "WALLETCONNECT", "FARCASTER", "ZERION", "SAFE", "RABBY", "OKX", "HAHA", "BACKPACK", "PHANTOM", "VALORA"];
76
- export declare const SOLANA_WALLETS: readonly ["PHANTOM", "GLOW", "BACKPACK", "SOLFLARE"];
77
- export declare const COSMOS_WALLETS: readonly ["KEPLR", "LEAP", "COSMOSTATION"];
78
- export declare const EXTERNAL_WALLET_TYPES: readonly ("FARCASTER" | "METAMASK" | "RAINBOW" | "COINBASE" | "WALLETCONNECT" | "ZERION" | "SAFE" | "RABBY" | "OKX" | "HAHA" | "BACKPACK" | "PHANTOM" | "VALORA" | "GLOW" | "SOLFLARE" | "KEPLR" | "LEAP" | "COSMOSTATION")[];
79
- export type TExternalWallet = (typeof EXTERNAL_WALLET_TYPES)[number];