@privy-io/js-sdk-core 0.27.0 → 0.27.1-beta-20240912214844
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/PrivyInternal.js +1 -1
- package/dist/PrivyInternal.js.map +1 -1
- package/dist/dts/EmailApi.d.ts +52 -38
- package/dist/dts/FarcasterApi.d.ts +52 -38
- package/dist/dts/OAuthApi.d.ts +52 -38
- package/dist/dts/PasskeyApi.d.ts +5 -5
- package/dist/dts/PhoneApi.d.ts +52 -38
- package/dist/dts/UserApi.d.ts +26 -19
- package/dist/dts/types.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +2 -2
package/dist/PrivyInternal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"fetch-retry";import{v4 as e}from"uuid";import{PrivyErrorCode as s}from"@privy-io/api-base";import{getPathWithParams as i,AppConfig as n,AnalyticsEvent as a,RefreshSession as o}from"@privy-io/public-api";import{PrivyApiError as r}from"./Error.js";import{Session as h}from"./Session.js";import c from"./toAbortSignalTimeout.js";import"eventemitter3";import"js-cookie";import"./Token.js";import"jose";const l="privy:caid";class d{baseUrl;_config;appId;appClientId;_storage;_analyticsId;_sdkVersion="js-sdk-core:0.27.
|
|
1
|
+
import t from"fetch-retry";import{v4 as e}from"uuid";import{PrivyErrorCode as s}from"@privy-io/api-base";import{getPathWithParams as i,AppConfig as n,AnalyticsEvent as a,RefreshSession as o}from"@privy-io/public-api";import{PrivyApiError as r}from"./Error.js";import{Session as h}from"./Session.js";import c from"./toAbortSignalTimeout.js";import"eventemitter3";import"js-cookie";import"./Token.js";import"jose";const l="privy:caid";class d{baseUrl;_config;appId;appClientId;_storage;_analyticsId;_sdkVersion="js-sdk-core:0.27.1-beta-20240912214844";_fetch;nativeAppIdentifier;callbacks;_cache=new Map;session;constructor(e){this._storage=e.storage,this._analyticsId=null,this._getOrGenerateClientAnalyticsId(),this.baseUrl=e.baseUrl??"https://auth.privy.io",this.appId=e.appId,this.appClientId=e.appClientId,this._sdkVersion=e.sdkVersion??this._sdkVersion,this.callbacks=e.callbacks,"undefined"==typeof document&&(this.nativeAppIdentifier=e.nativeAppIdentifier),this.session=new h({storage:this._storage,isUsingServerCookies:!1}),this._fetch=t(fetch,{retries:3,retryDelay:500})}get isReady(){return Boolean(this._config)}get config(){return this._config}get caid(){return this._analyticsId}async _initialize(){this.isReady||(this._config=await this.getAppConfig(),this._config?.custom_api_url&&(this.baseUrl=this._config.custom_api_url,this.session.isUsingServerCookies=!0),this.callbacks?.setIsReady?.(!0),this.createAnalyticsEvent("sdk_initialize",{}))}async fetch(t,{body:e,params:s,headers:n,options:a={onRequest:this._beforeRequest.bind(this)}}){const o=`${this.baseUrl}${i(t.path,s)}`,h=new Request(o,{method:t.method,body:JSON.stringify(e),headers:n}),c=await a.onRequest(h),l=await this._fetch(h,c),d=await l.json();if(l.status>299)throw new r(d);return d}async _beforeRequestWithoutInitialize(t){const e=await this.session.getToken(),s=new Headers(t.headers);s.set("privy-app-id",this.appId),this.appClientId&&s.set("privy-client-id",this.appClientId),s.set("privy-client",this._sdkVersion),s.set("Authorization",`Bearer ${e}`),s.set("Content-Type","application/json"),s.set("Accept","application/json");const i=await this._getOrGenerateClientAnalyticsId();return i&&s.set("privy-ca-id",i),this.nativeAppIdentifier&&s.set("x-native-app-identifier",this.nativeAppIdentifier),{signal:c(2e4),headers:s,credentials:"include"}}async beforeRequestWithoutRefresh(t){return await this._initialize(),this._beforeRequestWithoutInitialize(t)}async _beforeRequest(t){return await this._initialize(),await this.getAccessToken(),this.beforeRequestWithoutRefresh(t)}async getAppConfig(){return await this.fetch(n,{params:{app_id:this.appId},options:{onRequest:this._beforeRequestWithoutInitialize.bind(this)}})}async _getOrGenerateClientAnalyticsId(){if(this._analyticsId)return this._analyticsId;try{const t=await this._storage.get(l);if("string"==typeof t&&t.length>0)return this._analyticsId=t,t}catch(t){console.error("Unable to load clientId",t)}try{this._analyticsId=e()}catch(t){console.error("Unable to generate uuidv4",t)}if(!this._analyticsId)return null;try{await this._storage.put(l,this._analyticsId)}catch(t){console.error(`Unable to store clientId: ${this._analyticsId}`,t)}return this._analyticsId}async destroyClientAnalyticsId(){try{return await this._storage.del(l)}catch(t){console.error("Unable to delete clientId",t)}}async createAnalyticsEvent(t,e){try{await this.fetch(a,{body:{event_name:t,client_id:await this._getOrGenerateClientAnalyticsId(),payload:e},options:{onRequest:this.beforeRequestWithoutRefresh.bind(this)}})}catch(t){}}async refreshSession(){const t=await this.session.getRefreshToken()??void 0,e=t??"key",s=this._cache.get(e);if(s)return await s;const i=this._refreshSession(t);this._cache.set(e,i);try{return await i}catch(t){throw t}finally{this._cache.delete(e)}}async _refreshSession(t){const e=await this.session.getToken();if(!this.session.hasRefreshCredentials(e,t??null))throw await this._initialize(),new Error("missing_or_invalid_token");try{const{session_update_action:e,...s}=await this.fetch(o,{body:{refresh_token:t},options:{onRequest:this.beforeRequestWithoutRefresh.bind(this)}});return this.callbacks?.setUser?.(s.user),"set"===e&&await Promise.all([this.session.storeToken(s.token),this.session.storeRefreshToken(s.refresh_token),this.session.storeIdentityToken(s.identity_token)]),"clear"===e&&(await this.session.destroyLocalState(),this.callbacks?.setUser?.(null)),"ignore"===e&&s.token&&(await this.session.storeToken(s.token),s.identity_token&&await this.session.storeIdentityToken(s.identity_token)),s}catch(t){throw(t instanceof r&&t.code===s.MISSING_OR_INVALID_TOKEN||t instanceof Error&&"missing_or_invalid_token"===t.message)&&(await this.session.destroyLocalState(),this.callbacks?.setUser?.(null)),t}}async getAccessToken(){const[t,e]=await Promise.all([this.session.getToken(),this.session.getRefreshToken()]);if(!this.session.tokenIsActive(t)&&this.session.hasRefreshCredentials(t,e))try{return await this.refreshSession(),await this.session.getToken()}catch(t){return null}return t}async getIdentityToken(){return await this.session.getIdentityToken()}}export{d as PrivyInternal};
|
|
2
2
|
//# sourceMappingURL=PrivyInternal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivyInternal.js","sources":["../src/PrivyInternal.ts"],"sourcesContent":[null],"names":["CLIENT_ANALYTICS_ID_KEY","PrivyInternal","baseUrl","_config","appId","appClientId","_storage","_analyticsId","_sdkVersion","_fetch","nativeAppIdentifier","callbacks","_cache","Map","session","constructor","o","this","storage","_getOrGenerateClientAnalyticsId","sdkVersion","document","Session","isUsingServerCookies","rfetch","fetch","retries","retryDelay","isReady","Boolean","config","caid","_initialize","getAppConfig","custom_api_url","setIsReady","createAnalyticsEvent","r","body","params","headers","options","onRequest","_beforeRequest","bind","url","getPathWithParams","path","request","Request","method","JSON","stringify","requestInit","res","json","status","PrivyApiError","_beforeRequestWithoutInitialize","token","getToken","Headers","set","signal","toAbortSignalTimeout","credentials","beforeRequestWithoutRefresh","getAccessToken","AppConfig","app_id","clientAnalyticsId","get","length","e","console","error","uuid","put","destroyClientAnalyticsId","del","name","properties","AnalyticsEvent","event_name","client_id","payload","refreshSession","refreshToken","getRefreshToken","undefined","key","cached","promise","_refreshSession","delete","hasRefreshCredentials","Error","session_update_action","RefreshSession","refresh_token","setUser","user","Promise","all","storeToken","storeRefreshToken","storeIdentityToken","identity_token","destroyLocalState","code","PrivyErrorCode","MISSING_OR_INVALID_TOKEN","message","tokenIsActive","getIdentityToken"],"mappings":"4ZAkDA,MACMA,EAA0B,mBAOnBC,EACXC,QACQC,QAECC,MACAC,YACQC,SAOTC,aAGSC,YAAsB,
|
|
1
|
+
{"version":3,"file":"PrivyInternal.js","sources":["../src/PrivyInternal.ts"],"sourcesContent":[null],"names":["CLIENT_ANALYTICS_ID_KEY","PrivyInternal","baseUrl","_config","appId","appClientId","_storage","_analyticsId","_sdkVersion","_fetch","nativeAppIdentifier","callbacks","_cache","Map","session","constructor","o","this","storage","_getOrGenerateClientAnalyticsId","sdkVersion","document","Session","isUsingServerCookies","rfetch","fetch","retries","retryDelay","isReady","Boolean","config","caid","_initialize","getAppConfig","custom_api_url","setIsReady","createAnalyticsEvent","r","body","params","headers","options","onRequest","_beforeRequest","bind","url","getPathWithParams","path","request","Request","method","JSON","stringify","requestInit","res","json","status","PrivyApiError","_beforeRequestWithoutInitialize","token","getToken","Headers","set","signal","toAbortSignalTimeout","credentials","beforeRequestWithoutRefresh","getAccessToken","AppConfig","app_id","clientAnalyticsId","get","length","e","console","error","uuid","put","destroyClientAnalyticsId","del","name","properties","AnalyticsEvent","event_name","client_id","payload","refreshSession","refreshToken","getRefreshToken","undefined","key","cached","promise","_refreshSession","delete","hasRefreshCredentials","Error","session_update_action","RefreshSession","refresh_token","setUser","user","Promise","all","storeToken","storeRefreshToken","storeIdentityToken","identity_token","destroyLocalState","code","PrivyErrorCode","MISSING_OR_INVALID_TOKEN","message","tokenIsActive","getIdentityToken"],"mappings":"4ZAkDA,MACMA,EAA0B,mBAOnBC,EACXC,QACQC,QAECC,MACAC,YACQC,SAOTC,aAGSC,YAAsB,yCACtBC,OAGRC,oBAGAC,UAMQC,OAAS,IAAIC,IAKvBC,QAUP,WAAAC,CAAYC,GAEVC,KAAKX,SAAWU,EAAEE,QAClBD,KAAKV,aAAe,KACfU,KAAKE,kCAEVF,KAAKf,QAAUc,EAAEd,SA1DS,wBA2D1Be,KAAKb,MAAQY,EAAEZ,MACfa,KAAKZ,YAAcW,EAAEX,YACrBY,KAAKT,YAAcQ,EAAEI,YAAcH,KAAKT,YACxCS,KAAKN,UAAYK,EAAEL,UAKK,oBAAbU,WACTJ,KAAKP,oBAAsBM,EAAEN,qBAG/BO,KAAKH,QAAU,IAAIQ,EAAQ,CACzBJ,QAASD,KAAKX,SACdiB,sBAAsB,IAOxBN,KAAKR,OAASe,EAAOC,MAAO,CAC1BC,QAAS,EACTC,WAAY,KAEf,CAOD,WAAIC,GACF,OAAOC,QAAQZ,KAAKd,QACrB,CAKD,UAAI2B,GACF,OAAOb,KAAKd,OACb,CASD,QAAI4B,GACF,OAAOd,KAAKV,YACb,CAOO,iBAAMyB,GACRf,KAAKW,UAITX,KAA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QAAQ8C,WACb3C,KAAKH,QAAQ0E,oBAGf,IACGvE,KAAKH,QAAQmG,cAActD,IAC5B1C,KAAKH,QAAQiF,sBAAsBpC,EAAO4B,GAE1C,IAIE,aAHMtE,KAAKqE,uBAGErE,KAAKH,QAAQ8C,UAC3B,CAAC,MAAOe,GACP,OAAO,IACR,CAGH,OAAOhB,CACR,CAEM,sBAAMuD,GACX,aAAajG,KAAKH,QAAQoG,kBAC3B"}
|
package/dist/dts/EmailApi.d.ts
CHANGED
|
@@ -40,28 +40,35 @@ export default class EmailApi {
|
|
|
40
40
|
latest_verified_at: number | null;
|
|
41
41
|
} | {
|
|
42
42
|
type: "phone";
|
|
43
|
-
phoneNumber: string;
|
|
44
43
|
verified_at: number;
|
|
45
44
|
first_verified_at: number | null;
|
|
46
45
|
latest_verified_at: number | null;
|
|
46
|
+
phoneNumber: string;
|
|
47
47
|
} | {
|
|
48
48
|
type: "wallet";
|
|
49
49
|
address: string;
|
|
50
|
-
chain_type: "ethereum";
|
|
51
50
|
verified_at: number;
|
|
52
51
|
first_verified_at: number | null;
|
|
53
52
|
latest_verified_at: number | null;
|
|
53
|
+
chain_type: "ethereum";
|
|
54
54
|
wallet_client: "unknown";
|
|
55
55
|
chain_id?: string | undefined;
|
|
56
56
|
wallet_client_type?: string | undefined;
|
|
57
57
|
connector_type?: string | undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: "smart_wallet";
|
|
60
|
+
address: string;
|
|
61
|
+
smart_wallet_type: "safe" | "kernel" | "biconomy" | "light_account";
|
|
62
|
+
verified_at: number;
|
|
63
|
+
first_verified_at: number | null;
|
|
64
|
+
latest_verified_at: number | null;
|
|
58
65
|
} | {
|
|
59
66
|
type: "wallet";
|
|
60
67
|
address: string;
|
|
61
|
-
chain_type: "solana";
|
|
62
68
|
verified_at: number;
|
|
63
69
|
first_verified_at: number | null;
|
|
64
70
|
latest_verified_at: number | null;
|
|
71
|
+
chain_type: "solana";
|
|
65
72
|
wallet_client: "unknown";
|
|
66
73
|
wallet_client_type?: string | undefined;
|
|
67
74
|
connector_type?: string | undefined;
|
|
@@ -81,10 +88,10 @@ export default class EmailApi {
|
|
|
81
88
|
signer_public_key?: string | undefined;
|
|
82
89
|
} | {
|
|
83
90
|
type: "passkey";
|
|
84
|
-
credential_id: string;
|
|
85
91
|
verified_at: number;
|
|
86
92
|
first_verified_at: number | null;
|
|
87
93
|
latest_verified_at: number | null;
|
|
94
|
+
credential_id: string;
|
|
88
95
|
enrolled_in_mfa: boolean;
|
|
89
96
|
created_with_browser?: string | undefined;
|
|
90
97
|
created_with_os?: string | undefined;
|
|
@@ -105,11 +112,11 @@ export default class EmailApi {
|
|
|
105
112
|
} | {
|
|
106
113
|
type: "wallet";
|
|
107
114
|
address: string;
|
|
108
|
-
|
|
115
|
+
chain_id: "eip155:1";
|
|
109
116
|
verified_at: number;
|
|
110
117
|
first_verified_at: number | null;
|
|
111
118
|
latest_verified_at: number | null;
|
|
112
|
-
|
|
119
|
+
chain_type: "ethereum";
|
|
113
120
|
wallet_client: "privy";
|
|
114
121
|
wallet_client_type: "privy";
|
|
115
122
|
connector_type: "embedded";
|
|
@@ -120,11 +127,11 @@ export default class EmailApi {
|
|
|
120
127
|
type: "wallet";
|
|
121
128
|
address: string;
|
|
122
129
|
public_key: string;
|
|
123
|
-
|
|
130
|
+
chain_id: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
124
131
|
verified_at: number;
|
|
125
132
|
first_verified_at: number | null;
|
|
126
133
|
latest_verified_at: number | null;
|
|
127
|
-
|
|
134
|
+
chain_type: "solana";
|
|
128
135
|
wallet_client_type: "privy";
|
|
129
136
|
connector_type: "embedded";
|
|
130
137
|
imported: boolean;
|
|
@@ -133,75 +140,75 @@ export default class EmailApi {
|
|
|
133
140
|
type: "google_oauth";
|
|
134
141
|
name: string | null;
|
|
135
142
|
email: string;
|
|
136
|
-
subject: string;
|
|
137
143
|
verified_at: number;
|
|
138
144
|
first_verified_at: number | null;
|
|
139
145
|
latest_verified_at: number | null;
|
|
146
|
+
subject: string;
|
|
140
147
|
} | {
|
|
141
148
|
type: "twitter_oauth";
|
|
142
149
|
name: string | null;
|
|
143
150
|
username: string | null;
|
|
144
|
-
subject: string;
|
|
145
151
|
verified_at: number;
|
|
146
152
|
first_verified_at: number | null;
|
|
147
153
|
latest_verified_at: number | null;
|
|
148
154
|
profile_picture_url: string | null;
|
|
155
|
+
subject: string;
|
|
149
156
|
} | {
|
|
150
157
|
type: "discord_oauth";
|
|
151
158
|
email: string | null;
|
|
152
159
|
username: string | null;
|
|
153
|
-
subject: string;
|
|
154
160
|
verified_at: number;
|
|
155
161
|
first_verified_at: number | null;
|
|
156
162
|
latest_verified_at: number | null;
|
|
163
|
+
subject: string;
|
|
157
164
|
} | {
|
|
158
165
|
type: "github_oauth";
|
|
159
166
|
name: string | null;
|
|
160
167
|
email: string | null;
|
|
161
168
|
username: string | null;
|
|
162
|
-
subject: string;
|
|
163
169
|
verified_at: number;
|
|
164
170
|
first_verified_at: number | null;
|
|
165
171
|
latest_verified_at: number | null;
|
|
172
|
+
subject: string;
|
|
166
173
|
} | {
|
|
167
174
|
type: "linkedin_oauth";
|
|
168
175
|
email: string | null;
|
|
169
|
-
subject: string;
|
|
170
176
|
verified_at: number;
|
|
171
177
|
first_verified_at: number | null;
|
|
172
178
|
latest_verified_at: number | null;
|
|
179
|
+
subject: string;
|
|
173
180
|
name?: string | undefined;
|
|
174
181
|
vanity_name?: string | undefined;
|
|
175
182
|
} | {
|
|
176
183
|
type: "spotify_oauth";
|
|
177
184
|
name: string | null;
|
|
178
185
|
email: string | null;
|
|
179
|
-
subject: string;
|
|
180
186
|
verified_at: number;
|
|
181
187
|
first_verified_at: number | null;
|
|
182
188
|
latest_verified_at: number | null;
|
|
189
|
+
subject: string;
|
|
183
190
|
} | {
|
|
184
191
|
type: "instagram_oauth";
|
|
185
192
|
username: string | null;
|
|
186
|
-
subject: string;
|
|
187
193
|
verified_at: number;
|
|
188
194
|
first_verified_at: number | null;
|
|
189
195
|
latest_verified_at: number | null;
|
|
196
|
+
subject: string;
|
|
190
197
|
} | {
|
|
191
198
|
type: "tiktok_oauth";
|
|
192
199
|
name: string | null;
|
|
193
200
|
username: string | null;
|
|
194
|
-
subject: string;
|
|
195
201
|
verified_at: number;
|
|
196
202
|
first_verified_at: number | null;
|
|
197
203
|
latest_verified_at: number | null;
|
|
204
|
+
subject: string;
|
|
198
205
|
} | {
|
|
199
206
|
type: "apple_oauth";
|
|
200
207
|
email: string | null;
|
|
201
|
-
subject: string;
|
|
202
208
|
verified_at: number;
|
|
203
209
|
first_verified_at: number | null;
|
|
204
210
|
latest_verified_at: number | null;
|
|
211
|
+
subject: string;
|
|
205
212
|
} | {
|
|
206
213
|
type: "custom_auth";
|
|
207
214
|
verified_at: number;
|
|
@@ -210,11 +217,11 @@ export default class EmailApi {
|
|
|
210
217
|
custom_user_id: string;
|
|
211
218
|
} | {
|
|
212
219
|
type: "cross_app";
|
|
213
|
-
|
|
220
|
+
provider_app_id: string;
|
|
214
221
|
verified_at: number;
|
|
215
222
|
first_verified_at: number | null;
|
|
216
223
|
latest_verified_at: number | null;
|
|
217
|
-
|
|
224
|
+
subject: string;
|
|
218
225
|
embedded_wallets: {
|
|
219
226
|
address: string;
|
|
220
227
|
}[];
|
|
@@ -247,28 +254,35 @@ export default class EmailApi {
|
|
|
247
254
|
latest_verified_at: number | null;
|
|
248
255
|
} | {
|
|
249
256
|
type: "phone";
|
|
250
|
-
phoneNumber: string;
|
|
251
257
|
verified_at: number;
|
|
252
258
|
first_verified_at: number | null;
|
|
253
259
|
latest_verified_at: number | null;
|
|
260
|
+
phoneNumber: string;
|
|
254
261
|
} | {
|
|
255
262
|
type: "wallet";
|
|
256
263
|
address: string;
|
|
257
|
-
chain_type: "ethereum";
|
|
258
264
|
verified_at: number;
|
|
259
265
|
first_verified_at: number | null;
|
|
260
266
|
latest_verified_at: number | null;
|
|
267
|
+
chain_type: "ethereum";
|
|
261
268
|
wallet_client: "unknown";
|
|
262
269
|
chain_id?: string | undefined;
|
|
263
270
|
wallet_client_type?: string | undefined;
|
|
264
271
|
connector_type?: string | undefined;
|
|
272
|
+
} | {
|
|
273
|
+
type: "smart_wallet";
|
|
274
|
+
address: string;
|
|
275
|
+
smart_wallet_type: "safe" | "kernel" | "biconomy" | "light_account";
|
|
276
|
+
verified_at: number;
|
|
277
|
+
first_verified_at: number | null;
|
|
278
|
+
latest_verified_at: number | null;
|
|
265
279
|
} | {
|
|
266
280
|
type: "wallet";
|
|
267
281
|
address: string;
|
|
268
|
-
chain_type: "solana";
|
|
269
282
|
verified_at: number;
|
|
270
283
|
first_verified_at: number | null;
|
|
271
284
|
latest_verified_at: number | null;
|
|
285
|
+
chain_type: "solana";
|
|
272
286
|
wallet_client: "unknown";
|
|
273
287
|
wallet_client_type?: string | undefined;
|
|
274
288
|
connector_type?: string | undefined;
|
|
@@ -288,10 +302,10 @@ export default class EmailApi {
|
|
|
288
302
|
signer_public_key?: string | undefined;
|
|
289
303
|
} | {
|
|
290
304
|
type: "passkey";
|
|
291
|
-
credential_id: string;
|
|
292
305
|
verified_at: number;
|
|
293
306
|
first_verified_at: number | null;
|
|
294
307
|
latest_verified_at: number | null;
|
|
308
|
+
credential_id: string;
|
|
295
309
|
enrolled_in_mfa: boolean;
|
|
296
310
|
created_with_browser?: string | undefined;
|
|
297
311
|
created_with_os?: string | undefined;
|
|
@@ -312,11 +326,11 @@ export default class EmailApi {
|
|
|
312
326
|
} | {
|
|
313
327
|
type: "wallet";
|
|
314
328
|
address: string;
|
|
315
|
-
|
|
329
|
+
chain_id: "eip155:1";
|
|
316
330
|
verified_at: number;
|
|
317
331
|
first_verified_at: number | null;
|
|
318
332
|
latest_verified_at: number | null;
|
|
319
|
-
|
|
333
|
+
chain_type: "ethereum";
|
|
320
334
|
wallet_client: "privy";
|
|
321
335
|
wallet_client_type: "privy";
|
|
322
336
|
connector_type: "embedded";
|
|
@@ -327,11 +341,11 @@ export default class EmailApi {
|
|
|
327
341
|
type: "wallet";
|
|
328
342
|
address: string;
|
|
329
343
|
public_key: string;
|
|
330
|
-
|
|
344
|
+
chain_id: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
331
345
|
verified_at: number;
|
|
332
346
|
first_verified_at: number | null;
|
|
333
347
|
latest_verified_at: number | null;
|
|
334
|
-
|
|
348
|
+
chain_type: "solana";
|
|
335
349
|
wallet_client_type: "privy";
|
|
336
350
|
connector_type: "embedded";
|
|
337
351
|
imported: boolean;
|
|
@@ -340,75 +354,75 @@ export default class EmailApi {
|
|
|
340
354
|
type: "google_oauth";
|
|
341
355
|
name: string | null;
|
|
342
356
|
email: string;
|
|
343
|
-
subject: string;
|
|
344
357
|
verified_at: number;
|
|
345
358
|
first_verified_at: number | null;
|
|
346
359
|
latest_verified_at: number | null;
|
|
360
|
+
subject: string;
|
|
347
361
|
} | {
|
|
348
362
|
type: "twitter_oauth";
|
|
349
363
|
name: string | null;
|
|
350
364
|
username: string | null;
|
|
351
|
-
subject: string;
|
|
352
365
|
verified_at: number;
|
|
353
366
|
first_verified_at: number | null;
|
|
354
367
|
latest_verified_at: number | null;
|
|
355
368
|
profile_picture_url: string | null;
|
|
369
|
+
subject: string;
|
|
356
370
|
} | {
|
|
357
371
|
type: "discord_oauth";
|
|
358
372
|
email: string | null;
|
|
359
373
|
username: string | null;
|
|
360
|
-
subject: string;
|
|
361
374
|
verified_at: number;
|
|
362
375
|
first_verified_at: number | null;
|
|
363
376
|
latest_verified_at: number | null;
|
|
377
|
+
subject: string;
|
|
364
378
|
} | {
|
|
365
379
|
type: "github_oauth";
|
|
366
380
|
name: string | null;
|
|
367
381
|
email: string | null;
|
|
368
382
|
username: string | null;
|
|
369
|
-
subject: string;
|
|
370
383
|
verified_at: number;
|
|
371
384
|
first_verified_at: number | null;
|
|
372
385
|
latest_verified_at: number | null;
|
|
386
|
+
subject: string;
|
|
373
387
|
} | {
|
|
374
388
|
type: "linkedin_oauth";
|
|
375
389
|
email: string | null;
|
|
376
|
-
subject: string;
|
|
377
390
|
verified_at: number;
|
|
378
391
|
first_verified_at: number | null;
|
|
379
392
|
latest_verified_at: number | null;
|
|
393
|
+
subject: string;
|
|
380
394
|
name?: string | undefined;
|
|
381
395
|
vanity_name?: string | undefined;
|
|
382
396
|
} | {
|
|
383
397
|
type: "spotify_oauth";
|
|
384
398
|
name: string | null;
|
|
385
399
|
email: string | null;
|
|
386
|
-
subject: string;
|
|
387
400
|
verified_at: number;
|
|
388
401
|
first_verified_at: number | null;
|
|
389
402
|
latest_verified_at: number | null;
|
|
403
|
+
subject: string;
|
|
390
404
|
} | {
|
|
391
405
|
type: "instagram_oauth";
|
|
392
406
|
username: string | null;
|
|
393
|
-
subject: string;
|
|
394
407
|
verified_at: number;
|
|
395
408
|
first_verified_at: number | null;
|
|
396
409
|
latest_verified_at: number | null;
|
|
410
|
+
subject: string;
|
|
397
411
|
} | {
|
|
398
412
|
type: "tiktok_oauth";
|
|
399
413
|
name: string | null;
|
|
400
414
|
username: string | null;
|
|
401
|
-
subject: string;
|
|
402
415
|
verified_at: number;
|
|
403
416
|
first_verified_at: number | null;
|
|
404
417
|
latest_verified_at: number | null;
|
|
418
|
+
subject: string;
|
|
405
419
|
} | {
|
|
406
420
|
type: "apple_oauth";
|
|
407
421
|
email: string | null;
|
|
408
|
-
subject: string;
|
|
409
422
|
verified_at: number;
|
|
410
423
|
first_verified_at: number | null;
|
|
411
424
|
latest_verified_at: number | null;
|
|
425
|
+
subject: string;
|
|
412
426
|
} | {
|
|
413
427
|
type: "custom_auth";
|
|
414
428
|
verified_at: number;
|
|
@@ -417,11 +431,11 @@ export default class EmailApi {
|
|
|
417
431
|
custom_user_id: string;
|
|
418
432
|
} | {
|
|
419
433
|
type: "cross_app";
|
|
420
|
-
|
|
434
|
+
provider_app_id: string;
|
|
421
435
|
verified_at: number;
|
|
422
436
|
first_verified_at: number | null;
|
|
423
437
|
latest_verified_at: number | null;
|
|
424
|
-
|
|
438
|
+
subject: string;
|
|
425
439
|
embedded_wallets: {
|
|
426
440
|
address: string;
|
|
427
441
|
}[];
|