@privy-io/js-sdk-core 0.1.1 → 0.2.0-beta-20230925233038

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/esm/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import {TextEncoder as $fdlOJ$TextEncoder} from "text-encoding";
2
- import {logout as $fdlOJ$logout, authenticateCustomJwtAccount as $fdlOJ$authenticateCustomJwtAccount, passwordlessInit as $fdlOJ$passwordlessInit, passwordlessAuthenticate as $fdlOJ$passwordlessAuthenticate, passwordlessLink as $fdlOJ$passwordlessLink, passwordlessUnlink as $fdlOJ$passwordlessUnlink, passwordlessSmsInit as $fdlOJ$passwordlessSmsInit, passwordlessSmsAuthenticate as $fdlOJ$passwordlessSmsAuthenticate, passwordlessSmsLink as $fdlOJ$passwordlessSmsLink, passwordlessSmsUnlink as $fdlOJ$passwordlessSmsUnlink, getAppConfig as $fdlOJ$getAppConfig, recordAnalyticsEvent as $fdlOJ$recordAnalyticsEvent, refreshSession as $fdlOJ$refreshSession} from "@privy-io/public-api";
3
- import {StaticJsonRpcProvider as $fdlOJ$StaticJsonRpcProvider} from "@ethersproject/providers";
4
- import $fdlOJ$eventemitter3 from "eventemitter3";
5
- import $fdlOJ$fetchretry from "fetch-retry";
6
- import {v4 as $fdlOJ$v4} from "uuid";
7
- import $fdlOJ$jscookie from "js-cookie";
8
- import {decodeJwt as $fdlOJ$decodeJwt} from "jose";
1
+ import {TextEncoder as $cHhfT$TextEncoder} from "text-encoding";
2
+ import {logout as $cHhfT$logout, authenticateCustomJwtAccount as $cHhfT$authenticateCustomJwtAccount, passwordlessInit as $cHhfT$passwordlessInit, passwordlessAuthenticate as $cHhfT$passwordlessAuthenticate, passwordlessLink as $cHhfT$passwordlessLink, passwordlessUnlink as $cHhfT$passwordlessUnlink, passwordlessSmsInit as $cHhfT$passwordlessSmsInit, passwordlessSmsAuthenticate as $cHhfT$passwordlessSmsAuthenticate, passwordlessSmsLink as $cHhfT$passwordlessSmsLink, passwordlessSmsUnlink as $cHhfT$passwordlessSmsUnlink, getAppConfig as $cHhfT$getAppConfig, recordAnalyticsEvent as $cHhfT$recordAnalyticsEvent, refreshSession as $cHhfT$refreshSession} from "@privy-io/public-api";
3
+ import {StaticJsonRpcProvider as $cHhfT$StaticJsonRpcProvider} from "@ethersproject/providers";
4
+ import $cHhfT$eventemitter3 from "eventemitter3";
5
+ import $cHhfT$fetchretry from "fetch-retry";
6
+ import {v4 as $cHhfT$v4} from "uuid";
7
+ import $cHhfT$jscookie from "js-cookie";
8
+ import {decodeJwt as $cHhfT$decodeJwt} from "jose";
9
9
 
10
10
 
11
11
 
12
12
 
13
- class $e682ccb78399239f$export$2e2bcd8739ae039 {
13
+ class $5b544411e9cb5378$export$2e2bcd8739ae039 {
14
14
  /**
15
15
  * @internal
16
16
  */ #privyInternal;
@@ -24,7 +24,7 @@ class $e682ccb78399239f$export$2e2bcd8739ae039 {
24
24
  *
25
25
  * @param token The JWT from the non-Privy service
26
26
  */ async syncWithToken(token) {
27
- const res = await this.#privyInternal.fetch((0, $fdlOJ$authenticateCustomJwtAccount), {
27
+ const res = await this.#privyInternal.fetch((0, $cHhfT$authenticateCustomJwtAccount), {
28
28
  body: {
29
29
  token: token
30
30
  }
@@ -37,7 +37,7 @@ class $e682ccb78399239f$export$2e2bcd8739ae039 {
37
37
 
38
38
 
39
39
 
40
- class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
40
+ class $af143d739a53ea2e$export$2e2bcd8739ae039 {
41
41
  /**
42
42
  * @internal
43
43
  */ #privyInternal;
@@ -52,7 +52,7 @@ class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
52
52
  * @param email The email address to send the one time login code
53
53
  * @param token A CAPTCHA token
54
54
  */ async sendCode(email, token) {
55
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessInit), {
55
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessInit), {
56
56
  body: {
57
57
  email: email,
58
58
  token: token
@@ -65,7 +65,7 @@ class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
65
65
  * @param email The email address that the one time code was sent to
66
66
  * @param code The one time code
67
67
  */ async loginWithCode(email, code) {
68
- const res = await this.#privyInternal.fetch((0, $fdlOJ$passwordlessAuthenticate), {
68
+ const res = await this.#privyInternal.fetch((0, $cHhfT$passwordlessAuthenticate), {
69
69
  body: {
70
70
  email: email,
71
71
  code: code
@@ -81,7 +81,7 @@ class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
81
81
  * @param email The email address that the one time code was sent to
82
82
  * @param code The one time code
83
83
  */ async linkWithCode(email, code) {
84
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessLink), {
84
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessLink), {
85
85
  body: {
86
86
  email: email,
87
87
  code: code
@@ -89,7 +89,7 @@ class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
89
89
  });
90
90
  }
91
91
  async unlink(email) {
92
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessUnlink), {
92
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessUnlink), {
93
93
  body: {
94
94
  address: email
95
95
  }
@@ -99,7 +99,7 @@ class $96a8f034f38c2c62$export$2e2bcd8739ae039 {
99
99
 
100
100
 
101
101
 
102
- class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
102
+ class $2f6830c14939ab87$export$2e2bcd8739ae039 {
103
103
  /**
104
104
  * @internal
105
105
  */ #privyInternal;
@@ -114,7 +114,7 @@ class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
114
114
  * @param phoneNumber The phone number to send the one time login code
115
115
  * @param token A CAPTCHA token
116
116
  */ async sendCode(phoneNumber, token) {
117
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessSmsInit), {
117
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessSmsInit), {
118
118
  body: {
119
119
  phoneNumber: phoneNumber,
120
120
  token: token
@@ -127,7 +127,7 @@ class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
127
127
  * @param phoneNumber The phone number that the one time code was sent to
128
128
  * @param code The one time code
129
129
  */ async loginWithCode(phoneNumber, code) {
130
- const res = await this.#privyInternal.fetch((0, $fdlOJ$passwordlessSmsAuthenticate), {
130
+ const res = await this.#privyInternal.fetch((0, $cHhfT$passwordlessSmsAuthenticate), {
131
131
  body: {
132
132
  phoneNumber: phoneNumber,
133
133
  code: code
@@ -143,7 +143,7 @@ class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
143
143
  * @param phoneNumber The phone number that the one time code was sent to
144
144
  * @param code The one time code
145
145
  */ async linkWithCode(phoneNumber, code) {
146
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessSmsLink), {
146
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessSmsLink), {
147
147
  body: {
148
148
  phoneNumber: phoneNumber,
149
149
  code: code
@@ -151,7 +151,7 @@ class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
151
151
  });
152
152
  }
153
153
  async unlink(phoneNumber) {
154
- return this.#privyInternal.fetch((0, $fdlOJ$passwordlessSmsUnlink), {
154
+ return this.#privyInternal.fetch((0, $cHhfT$passwordlessSmsUnlink), {
155
155
  body: {
156
156
  phoneNumber: phoneNumber
157
157
  }
@@ -160,7 +160,7 @@ class $04e9bebb951e0c7e$export$2e2bcd8739ae039 {
160
160
  }
161
161
 
162
162
 
163
- class $955bfb5a5edecad4$export$2e2bcd8739ae039 {
163
+ class $03a158f151dbddfa$export$2e2bcd8739ae039 {
164
164
  /**
165
165
  * @internal
166
166
  */ #privyInternal;
@@ -168,15 +168,15 @@ class $955bfb5a5edecad4$export$2e2bcd8739ae039 {
168
168
  * @internal
169
169
  */ constructor(privyInternal){
170
170
  this.#privyInternal = privyInternal;
171
- this.phone = new (0, $04e9bebb951e0c7e$export$2e2bcd8739ae039)(this.#privyInternal);
172
- this.email = new (0, $96a8f034f38c2c62$export$2e2bcd8739ae039)(this.#privyInternal);
173
- this.customProvider = new (0, $e682ccb78399239f$export$2e2bcd8739ae039)(this.#privyInternal);
171
+ this.phone = new (0, $2f6830c14939ab87$export$2e2bcd8739ae039)(this.#privyInternal);
172
+ this.email = new (0, $af143d739a53ea2e$export$2e2bcd8739ae039)(this.#privyInternal);
173
+ this.customProvider = new (0, $5b544411e9cb5378$export$2e2bcd8739ae039)(this.#privyInternal);
174
174
  }
175
175
  /**
176
176
  * Logs the current user out.
177
177
  */ async logout() {
178
178
  try {
179
- await this.#privyInternal.fetch((0, $fdlOJ$logout), {
179
+ await this.#privyInternal.fetch((0, $cHhfT$logout), {
180
180
  body: {
181
181
  refresh_token: this.#privyInternal.session.refreshToken ?? undefined
182
182
  }
@@ -191,7 +191,7 @@ class $955bfb5a5edecad4$export$2e2bcd8739ae039 {
191
191
  }
192
192
 
193
193
 
194
- const $3fea037b39853544$export$625cf84d855940d4 = {
194
+ const $717fab5e281c3f8b$export$625cf84d855940d4 = {
195
195
  id: 42161,
196
196
  name: "Arbitrum One",
197
197
  network: "arbitrum",
@@ -241,7 +241,7 @@ const $3fea037b39853544$export$625cf84d855940d4 = {
241
241
  };
242
242
 
243
243
 
244
- const $5cd11e46a9ac45df$export$857f1b5f596fb425 = {
244
+ const $37cfa4207e7a9724$export$857f1b5f596fb425 = {
245
245
  id: 421613,
246
246
  name: "Arbitrum Goerli",
247
247
  network: "arbitrum-goerli",
@@ -292,7 +292,7 @@ const $5cd11e46a9ac45df$export$857f1b5f596fb425 = {
292
292
  };
293
293
 
294
294
 
295
- const $f2266046a7507579$export$ca1d15c01fde7266 = {
295
+ const $7bedacd9ad9cb6fb$export$ca1d15c01fde7266 = {
296
296
  id: 43114,
297
297
  name: "Avalanche",
298
298
  network: "avalanche",
@@ -326,7 +326,7 @@ const $f2266046a7507579$export$ca1d15c01fde7266 = {
326
326
  };
327
327
 
328
328
 
329
- const $0bbdff61bcb77830$export$714c92acd9d3100a = {
329
+ const $754bd2cdf81f7ac6$export$714c92acd9d3100a = {
330
330
  id: 43113,
331
331
  name: "Avalanche Fuji",
332
332
  network: "avalanche-fuji",
@@ -361,7 +361,7 @@ const $0bbdff61bcb77830$export$714c92acd9d3100a = {
361
361
  };
362
362
 
363
363
 
364
- const $8e5ed855f7f912d0$export$e2253033e6e1df16 = {
364
+ const $d770cf1cdf2ff226$export$e2253033e6e1df16 = {
365
365
  id: 8453,
366
366
  network: "base",
367
367
  name: "Base",
@@ -404,7 +404,7 @@ const $8e5ed855f7f912d0$export$e2253033e6e1df16 = {
404
404
  };
405
405
 
406
406
 
407
- const $f54a2e14e1d8a57d$export$8ae5747389a6ab6b = {
407
+ const $cbf8f89d8eef185a$export$8ae5747389a6ab6b = {
408
408
  id: 84531,
409
409
  network: "base-goerli",
410
410
  name: "Base Goerli Testnet",
@@ -447,7 +447,7 @@ const $f54a2e14e1d8a57d$export$8ae5747389a6ab6b = {
447
447
  };
448
448
 
449
449
 
450
- const $1fe6d49303d1b309$export$671bdf559232d1e0 = {
450
+ const $1432c44f431239e5$export$671bdf559232d1e0 = {
451
451
  id: 42220,
452
452
  name: "Celo Mainnet",
453
453
  network: "celo",
@@ -487,7 +487,7 @@ const $1fe6d49303d1b309$export$671bdf559232d1e0 = {
487
487
  };
488
488
 
489
489
 
490
- const $794e5fcc6fbcd8df$export$ea1d1a16df546697 = {
490
+ const $363cd5db9f55a629$export$ea1d1a16df546697 = {
491
491
  id: 44787,
492
492
  name: "Celo Alfajores Testnet",
493
493
  network: "celo-alfajores",
@@ -527,7 +527,7 @@ const $794e5fcc6fbcd8df$export$ea1d1a16df546697 = {
527
527
  };
528
528
 
529
529
 
530
- const $dd9c9d3f892375a3$export$d5a6d2ad15089d83 = {
530
+ const $55d793c653c29c34$export$d5a6d2ad15089d83 = {
531
531
  id: 314,
532
532
  name: "Filecoin - Mainnet",
533
533
  network: "filecoin-mainnet",
@@ -569,7 +569,7 @@ const $dd9c9d3f892375a3$export$d5a6d2ad15089d83 = {
569
569
  };
570
570
 
571
571
 
572
- const $f3a92deaec4182c8$export$de9b05abdae7c2c = {
572
+ const $7780da93757a14af$export$de9b05abdae7c2c = {
573
573
  id: 314159,
574
574
  name: "Filecoin - Calibration testnet",
575
575
  network: "filecoin-calibration",
@@ -599,7 +599,7 @@ const $f3a92deaec4182c8$export$de9b05abdae7c2c = {
599
599
  };
600
600
 
601
601
 
602
- const $ef71324da6e93be6$export$50b37201a1017e1e = {
602
+ const $3afe19427c51ab6c$export$50b37201a1017e1e = {
603
603
  id: 5,
604
604
  network: "goerli",
605
605
  name: "Goerli",
@@ -650,7 +650,7 @@ const $ef71324da6e93be6$export$50b37201a1017e1e = {
650
650
  };
651
651
 
652
652
 
653
- const $7507f76ddce18ab1$export$7d9a0b32b656284d = {
653
+ const $02deacf9d649996b$export$7d9a0b32b656284d = {
654
654
  id: 59144,
655
655
  network: "linea-mainnet",
656
656
  name: "Linea Mainnet",
@@ -699,7 +699,7 @@ const $7507f76ddce18ab1$export$7d9a0b32b656284d = {
699
699
  };
700
700
 
701
701
 
702
- const $db0add24f91165c9$export$9b359a3964075c2b = {
702
+ const $121fef3407d57c4e$export$9b359a3964075c2b = {
703
703
  id: 59140,
704
704
  network: "linea-testnet",
705
705
  name: "Linea Goerli Testnet",
@@ -748,7 +748,7 @@ const $db0add24f91165c9$export$9b359a3964075c2b = {
748
748
  };
749
749
 
750
750
 
751
- const $2fd08fe5279c649f$export$536d3e0d2c7baf54 = {
751
+ const $9144bb9efb468d33$export$536d3e0d2c7baf54 = {
752
752
  id: 1,
753
753
  network: "homestead",
754
754
  name: "Ethereum",
@@ -798,7 +798,7 @@ const $2fd08fe5279c649f$export$536d3e0d2c7baf54 = {
798
798
  };
799
799
 
800
800
 
801
- const $c0fc898708b5c03c$export$e584d4a579189f9b = {
801
+ const $adddc27bff53bcb4$export$e584d4a579189f9b = {
802
802
  id: 10,
803
803
  name: "OP Mainnet",
804
804
  network: "optimism",
@@ -848,7 +848,7 @@ const $c0fc898708b5c03c$export$e584d4a579189f9b = {
848
848
  };
849
849
 
850
850
 
851
- const $20cda9ec9bdd69ae$export$50b3e5cabd7d7a60 = {
851
+ const $dc141fa8ce18c982$export$50b3e5cabd7d7a60 = {
852
852
  id: 420,
853
853
  name: "Optimism Goerli Testnet",
854
854
  network: "optimism-goerli",
@@ -899,7 +899,7 @@ const $20cda9ec9bdd69ae$export$50b3e5cabd7d7a60 = {
899
899
  };
900
900
 
901
901
 
902
- const $dae31d00cceb5ed1$export$b7b19aa0ee06c73 = {
902
+ const $302cf4d54d3aa2af$export$b7b19aa0ee06c73 = {
903
903
  id: 137,
904
904
  name: "Polygon Mainnet",
905
905
  network: "matic",
@@ -949,7 +949,7 @@ const $dae31d00cceb5ed1$export$b7b19aa0ee06c73 = {
949
949
  };
950
950
 
951
951
 
952
- const $4e8fde1a95428707$export$34b6ef3a78067459 = {
952
+ const $3387822563474d54$export$34b6ef3a78067459 = {
953
953
  id: 80001,
954
954
  name: "Mumbai",
955
955
  network: "maticmum",
@@ -1000,7 +1000,7 @@ const $4e8fde1a95428707$export$34b6ef3a78067459 = {
1000
1000
  };
1001
1001
 
1002
1002
 
1003
- const $e5636bd4149958a1$export$31254237fd28c61a = {
1003
+ const $6c3596305198421e$export$31254237fd28c61a = {
1004
1004
  id: 11155111,
1005
1005
  network: "sepolia",
1006
1006
  name: "Sepolia",
@@ -1051,28 +1051,28 @@ const $e5636bd4149958a1$export$31254237fd28c61a = {
1051
1051
  };
1052
1052
 
1053
1053
 
1054
- const $909ea10c4deb7831$export$f92d15367ea6b4f7 = [
1055
- (0, $3fea037b39853544$export$625cf84d855940d4),
1056
- (0, $5cd11e46a9ac45df$export$857f1b5f596fb425),
1057
- (0, $ef71324da6e93be6$export$50b37201a1017e1e),
1058
- (0, $e5636bd4149958a1$export$31254237fd28c61a),
1059
- (0, $2fd08fe5279c649f$export$536d3e0d2c7baf54),
1060
- (0, $c0fc898708b5c03c$export$e584d4a579189f9b),
1061
- (0, $20cda9ec9bdd69ae$export$50b3e5cabd7d7a60),
1062
- (0, $dae31d00cceb5ed1$export$b7b19aa0ee06c73),
1063
- (0, $4e8fde1a95428707$export$34b6ef3a78067459),
1064
- (0, $1fe6d49303d1b309$export$671bdf559232d1e0),
1065
- (0, $794e5fcc6fbcd8df$export$ea1d1a16df546697),
1066
- (0, $dd9c9d3f892375a3$export$d5a6d2ad15089d83),
1067
- (0, $f3a92deaec4182c8$export$de9b05abdae7c2c),
1068
- (0, $8e5ed855f7f912d0$export$e2253033e6e1df16),
1069
- (0, $f54a2e14e1d8a57d$export$8ae5747389a6ab6b),
1070
- (0, $7507f76ddce18ab1$export$7d9a0b32b656284d),
1071
- (0, $db0add24f91165c9$export$9b359a3964075c2b),
1072
- (0, $f2266046a7507579$export$ca1d15c01fde7266),
1073
- (0, $0bbdff61bcb77830$export$714c92acd9d3100a)
1054
+ const $2f9341e25c156dcc$export$f92d15367ea6b4f7 = [
1055
+ (0, $717fab5e281c3f8b$export$625cf84d855940d4),
1056
+ (0, $37cfa4207e7a9724$export$857f1b5f596fb425),
1057
+ (0, $3afe19427c51ab6c$export$50b37201a1017e1e),
1058
+ (0, $6c3596305198421e$export$31254237fd28c61a),
1059
+ (0, $9144bb9efb468d33$export$536d3e0d2c7baf54),
1060
+ (0, $adddc27bff53bcb4$export$e584d4a579189f9b),
1061
+ (0, $dc141fa8ce18c982$export$50b3e5cabd7d7a60),
1062
+ (0, $302cf4d54d3aa2af$export$b7b19aa0ee06c73),
1063
+ (0, $3387822563474d54$export$34b6ef3a78067459),
1064
+ (0, $1432c44f431239e5$export$671bdf559232d1e0),
1065
+ (0, $363cd5db9f55a629$export$ea1d1a16df546697),
1066
+ (0, $55d793c653c29c34$export$d5a6d2ad15089d83),
1067
+ (0, $7780da93757a14af$export$de9b05abdae7c2c),
1068
+ (0, $d770cf1cdf2ff226$export$e2253033e6e1df16),
1069
+ (0, $cbf8f89d8eef185a$export$8ae5747389a6ab6b),
1070
+ (0, $02deacf9d649996b$export$7d9a0b32b656284d),
1071
+ (0, $121fef3407d57c4e$export$9b359a3964075c2b),
1072
+ (0, $7bedacd9ad9cb6fb$export$ca1d15c01fde7266),
1073
+ (0, $754bd2cdf81f7ac6$export$714c92acd9d3100a)
1074
1074
  ];
1075
- const $909ea10c4deb7831$export$3486db705befb001 = new Set($909ea10c4deb7831$export$f92d15367ea6b4f7.map((chain)=>chain.id));
1075
+ const $2f9341e25c156dcc$export$3486db705befb001 = new Set($2f9341e25c156dcc$export$f92d15367ea6b4f7.map((chain)=>chain.id));
1076
1076
 
1077
1077
 
1078
1078
 
@@ -1086,17 +1086,17 @@ const $909ea10c4deb7831$export$3486db705befb001 = new Set($909ea10c4deb7831$expo
1086
1086
  * is the only place that has access to the private key and thus is the only one
1087
1087
  * who can create signatures. All other methods do not need the private key and
1088
1088
  * can therefore be implemented by clients of the iframe.
1089
- */ const $0e2651eab08b0995$export$c70f8b9e7a68f3d9 = [
1089
+ */ const $f248392d7375bfcd$export$c70f8b9e7a68f3d9 = [
1090
1090
  "eth_sign",
1091
1091
  "eth_populateTransactionRequest",
1092
1092
  "eth_signTransaction",
1093
1093
  "personal_sign",
1094
1094
  "eth_signTypedData_v4"
1095
1095
  ];
1096
- const $0e2651eab08b0995$export$ed257f2588d73f92 = (method)=>{
1097
- return $0e2651eab08b0995$export$c70f8b9e7a68f3d9.includes(method);
1096
+ const $f248392d7375bfcd$export$ed257f2588d73f92 = (method)=>{
1097
+ return $f248392d7375bfcd$export$c70f8b9e7a68f3d9.includes(method);
1098
1098
  };
1099
- const $0e2651eab08b0995$export$beaff6b088e4f134 = [
1099
+ const $f248392d7375bfcd$export$beaff6b088e4f134 = [
1100
1100
  "error",
1101
1101
  "invalid_request_arguments",
1102
1102
  "wallet_not_on_device",
@@ -1105,7 +1105,7 @@ const $0e2651eab08b0995$export$beaff6b088e4f134 = [
1105
1105
  ];
1106
1106
 
1107
1107
 
1108
- var $7a102e2cbe11da0c$export$bcef4598d6aa064e;
1108
+ var $2c414ad78ae810d4$export$bcef4598d6aa064e;
1109
1109
  (function(PrivyErrorCode) {
1110
1110
  PrivyErrorCode["MISSING_OR_INVALID_PRIVY_APP_ID"] = "missing_or_invalid_privy_app_id";
1111
1111
  PrivyErrorCode["MISSING_OR_INVALID_PRIVY_ACCOUNT_ID"] = "missing_or_invalid_privy_account_id";
@@ -1120,8 +1120,8 @@ var $7a102e2cbe11da0c$export$bcef4598d6aa064e;
1120
1120
  PrivyErrorCode["GENERIC_CONNECT_WALLET_ERROR"] = "generic_connect_wallet_error";
1121
1121
  PrivyErrorCode["CLIENT_REQUEST_TIMEOUT"] = "client_request_timeout";
1122
1122
  PrivyErrorCode["INVALID_CREDENTIALS"] = "invalid_credentials";
1123
- })($7a102e2cbe11da0c$export$bcef4598d6aa064e || ($7a102e2cbe11da0c$export$bcef4598d6aa064e = {}));
1124
- class $7a102e2cbe11da0c$export$40842056b5426348 extends Error {
1123
+ })($2c414ad78ae810d4$export$bcef4598d6aa064e || ($2c414ad78ae810d4$export$bcef4598d6aa064e = {}));
1124
+ class $2c414ad78ae810d4$export$40842056b5426348 extends Error {
1125
1125
  /**
1126
1126
  * @param type Privy error type.
1127
1127
  * @param message Human-readable message.
@@ -1135,7 +1135,7 @@ class $7a102e2cbe11da0c$export$40842056b5426348 extends Error {
1135
1135
  return `${this.type}${this.privyErrorCode ? `-${this.privyErrorCode}` : ""}: ${this.message}${this.cause ? ` [cause: ${this.cause}]` : ""}`;
1136
1136
  }
1137
1137
  }
1138
- class $7a102e2cbe11da0c$export$417589b978208a8f extends $7a102e2cbe11da0c$export$40842056b5426348 {
1138
+ class $2c414ad78ae810d4$export$417589b978208a8f extends $2c414ad78ae810d4$export$40842056b5426348 {
1139
1139
  constructor(message, code, data){
1140
1140
  super(message);
1141
1141
  this.type = "provider_error";
@@ -1143,73 +1143,73 @@ class $7a102e2cbe11da0c$export$417589b978208a8f extends $7a102e2cbe11da0c$export
1143
1143
  this.data = data;
1144
1144
  }
1145
1145
  }
1146
- class $7a102e2cbe11da0c$export$4ee5e2a38200b61e extends Error {
1146
+ class $2c414ad78ae810d4$export$4ee5e2a38200b61e extends Error {
1147
1147
  constructor(type, message){
1148
1148
  super(message);
1149
1149
  this.type = type;
1150
1150
  }
1151
1151
  }
1152
- class $7a102e2cbe11da0c$export$75d61f1bcb44b776 extends $7a102e2cbe11da0c$export$40842056b5426348 {
1152
+ class $2c414ad78ae810d4$export$75d61f1bcb44b776 extends $2c414ad78ae810d4$export$40842056b5426348 {
1153
1153
  constructor(message, cause, privyErrorCode){
1154
1154
  super(message, cause, privyErrorCode);
1155
1155
  this.type = "connector_error";
1156
1156
  }
1157
1157
  }
1158
- class $7a102e2cbe11da0c$export$7c35c76e874bdcb extends Error {
1158
+ class $2c414ad78ae810d4$export$7c35c76e874bdcb extends Error {
1159
1159
  constructor(message, code, data){
1160
1160
  super(message);
1161
1161
  this.code = code;
1162
1162
  this.data = data;
1163
1163
  }
1164
1164
  }
1165
- function $7a102e2cbe11da0c$export$141c9b0218e5efe9(error) {
1165
+ function $2c414ad78ae810d4$export$141c9b0218e5efe9(error) {
1166
1166
  const type = error.type;
1167
- return typeof type === "string" && (0, $0e2651eab08b0995$export$beaff6b088e4f134).includes(type);
1167
+ return typeof type === "string" && (0, $f248392d7375bfcd$export$beaff6b088e4f134).includes(type);
1168
1168
  }
1169
- function $7a102e2cbe11da0c$export$8e5517a02da6043(error) {
1170
- return $7a102e2cbe11da0c$export$141c9b0218e5efe9(error) && error.type === "wallet_not_on_device";
1169
+ function $2c414ad78ae810d4$export$8e5517a02da6043(error) {
1170
+ return $2c414ad78ae810d4$export$141c9b0218e5efe9(error) && error.type === "wallet_not_on_device";
1171
1171
  }
1172
1172
 
1173
1173
 
1174
- const $fe8dd73ef21c3024$var$SUPPORTED_STATIC_METHODS = [
1174
+ const $901e2e50c31dd0af$var$SUPPORTED_STATIC_METHODS = [
1175
1175
  "eth_accounts",
1176
1176
  "eth_requestAccounts",
1177
1177
  "eth_chainId",
1178
1178
  "eth_estimateGas",
1179
1179
  "wallet_switchEthereumChain"
1180
1180
  ];
1181
- const $fe8dd73ef21c3024$var$SUPPORTED_JSON_RPC_METHODS = [
1181
+ const $901e2e50c31dd0af$var$SUPPORTED_JSON_RPC_METHODS = [
1182
1182
  "eth_sign",
1183
1183
  "eth_populateTransactionRequest",
1184
1184
  "eth_signTransaction",
1185
1185
  "personal_sign",
1186
1186
  "eth_signTypedData_v4"
1187
1187
  ];
1188
- const $fe8dd73ef21c3024$export$ed257f2588d73f92 = (method)=>{
1189
- return $fe8dd73ef21c3024$var$SUPPORTED_JSON_RPC_METHODS.includes(method);
1188
+ const $901e2e50c31dd0af$export$ed257f2588d73f92 = (method)=>{
1189
+ return $901e2e50c31dd0af$var$SUPPORTED_JSON_RPC_METHODS.includes(method);
1190
1190
  };
1191
- const $fe8dd73ef21c3024$export$1994a077b98ee0d5 = (method)=>$fe8dd73ef21c3024$var$SUPPORTED_STATIC_METHODS.includes(method);
1191
+ const $901e2e50c31dd0af$export$1994a077b98ee0d5 = (method)=>$901e2e50c31dd0af$var$SUPPORTED_STATIC_METHODS.includes(method);
1192
1192
 
1193
1193
 
1194
1194
 
1195
- const $93c0a15e49a033eb$export$e682a3879cb3666e = "4df5e2316331463a9130964bd6078dfa";
1196
- const $93c0a15e49a033eb$export$5cf1676300c48d00 = "fe9c30fc-3bc5-4064-91e2-6ab5887f8f4d";
1197
- const $93c0a15e49a033eb$export$45f1e355ab86a109 = (chainId, chains, rpcConfig)=>{
1195
+ const $3be130f46fd437ac$export$e682a3879cb3666e = "4df5e2316331463a9130964bd6078dfa";
1196
+ const $3be130f46fd437ac$export$5cf1676300c48d00 = "fe9c30fc-3bc5-4064-91e2-6ab5887f8f4d";
1197
+ const $3be130f46fd437ac$export$45f1e355ab86a109 = (chainId, chains, rpcConfig)=>{
1198
1198
  const chainIdInt = Number(chainId);
1199
1199
  const chain = chains.find((chain)=>chain.id === chainIdInt);
1200
- if (!chain) throw new (0, $7a102e2cbe11da0c$export$75d61f1bcb44b776)(`Unsupported chainId ${chainId}`, 4901);
1200
+ if (!chain) throw new (0, $2c414ad78ae810d4$export$75d61f1bcb44b776)(`Unsupported chainId ${chainId}`, 4901);
1201
1201
  let rpcUrl;
1202
1202
  // Priority given to bring-your-own RPC -> Infura -> Blast -> Default
1203
1203
  if (rpcConfig.rpcUrls[chainIdInt]) rpcUrl = rpcConfig.rpcUrls[chainIdInt];
1204
- else if (chain.rpcUrls["infura"]?.http[0]) rpcUrl = chain.rpcUrls["infura"].http[0] + "/" + $93c0a15e49a033eb$export$e682a3879cb3666e;
1205
- else if (chain.rpcUrls["blast"]?.http[0]) rpcUrl = chain.rpcUrls["blast"].http[0] + "/" + $93c0a15e49a033eb$export$5cf1676300c48d00;
1204
+ else if (chain.rpcUrls["infura"]?.http[0]) rpcUrl = chain.rpcUrls["infura"].http[0] + "/" + $3be130f46fd437ac$export$e682a3879cb3666e;
1205
+ else if (chain.rpcUrls["blast"]?.http[0]) rpcUrl = chain.rpcUrls["blast"].http[0] + "/" + $3be130f46fd437ac$export$5cf1676300c48d00;
1206
1206
  else rpcUrl = chain.rpcUrls["default"]?.http[0];
1207
- if (!rpcUrl) throw new (0, $7a102e2cbe11da0c$export$75d61f1bcb44b776)(`No RPC url found for ${chainId}`);
1207
+ if (!rpcUrl) throw new (0, $2c414ad78ae810d4$export$75d61f1bcb44b776)(`No RPC url found for ${chainId}`);
1208
1208
  return rpcUrl;
1209
1209
  };
1210
1210
 
1211
1211
 
1212
- class $ed667f6fcbd5f0f2$export$26f7ada50d209c97 extends (0, $fdlOJ$eventemitter3) {
1212
+ class $8efc598a5848a0f4$export$26f7ada50d209c97 extends (0, $cHhfT$eventemitter3) {
1213
1213
  #walletProxy;
1214
1214
  #privyInternal;
1215
1215
  #address;
@@ -1225,13 +1225,13 @@ class $ed667f6fcbd5f0f2$export$26f7ada50d209c97 extends (0, $fdlOJ$eventemitter3
1225
1225
  this.#address = address;
1226
1226
  this.#chainId = chainId;
1227
1227
  this.#chains = chains;
1228
- this.#provider = new (0, $fdlOJ$StaticJsonRpcProvider)((0, $93c0a15e49a033eb$export$45f1e355ab86a109)(chainId, chains, {
1228
+ this.#provider = new (0, $cHhfT$StaticJsonRpcProvider)((0, $3be130f46fd437ac$export$45f1e355ab86a109)(chainId, chains, {
1229
1229
  rpcUrls: []
1230
1230
  }));
1231
1231
  }
1232
1232
  async request(request) {
1233
- if ((0, $fe8dd73ef21c3024$export$ed257f2588d73f92)(request.method)) return this.handleIFrameRpc(request);
1234
- else if ((0, $fe8dd73ef21c3024$export$1994a077b98ee0d5)(request.method)) return this.handleStatic(request);
1233
+ if ((0, $901e2e50c31dd0af$export$ed257f2588d73f92)(request.method)) return this.handleIFrameRpc(request);
1234
+ else if ((0, $901e2e50c31dd0af$export$1994a077b98ee0d5)(request.method)) return this.handleStatic(request);
1235
1235
  else if (request.method === "eth_estimateGas") return this.handleEstimateGas(request);
1236
1236
  else return this.handleJsonRpc(request);
1237
1237
  }
@@ -1278,7 +1278,7 @@ class $ed667f6fcbd5f0f2$export$26f7ada50d209c97 extends (0, $fdlOJ$eventemitter3
1278
1278
  }
1279
1279
  handleSwitchEthereumChain(args) {
1280
1280
  if (!args.params || !Array.isArray(args.params)) // 4200 = unsupported method
1281
- throw new (0, $7a102e2cbe11da0c$export$7c35c76e874bdcb)(`Invalid params for ${args.method}`, 4200);
1281
+ throw new (0, $2c414ad78ae810d4$export$7c35c76e874bdcb)(`Invalid params for ${args.method}`, 4200);
1282
1282
  let newChain;
1283
1283
  // Legacy support for passing in a chainId as a string.
1284
1284
  // The standard is to pass in an object with a chainId property.
@@ -1286,10 +1286,10 @@ class $ed667f6fcbd5f0f2$export$26f7ada50d209c97 extends (0, $fdlOJ$eventemitter3
1286
1286
  if (typeof args.params[0] === "string") newChain = args.params[0];
1287
1287
  else if ("chainId" in args.params[0] && typeof args.params[0].chainId === "string") newChain = args.params[0].chainId;
1288
1288
  else // 4200 = unsupported method
1289
- throw new (0, $7a102e2cbe11da0c$export$7c35c76e874bdcb)(`Invalid params for ${args.method}`, 4200);
1289
+ throw new (0, $2c414ad78ae810d4$export$7c35c76e874bdcb)(`Invalid params for ${args.method}`, 4200);
1290
1290
  // It will be passed as a hexString, convert to number.
1291
1291
  this.#chainId = Number(newChain);
1292
- this.#provider = new (0, $fdlOJ$StaticJsonRpcProvider)((0, $93c0a15e49a033eb$export$45f1e355ab86a109)(this.#chainId, this.#chains, {
1292
+ this.#provider = new (0, $cHhfT$StaticJsonRpcProvider)((0, $3be130f46fd437ac$export$45f1e355ab86a109)(this.#chainId, this.#chains, {
1293
1293
  rpcUrls: []
1294
1294
  }));
1295
1295
  this.emit("chainChanged", newChain);
@@ -1316,7 +1316,7 @@ class $ed667f6fcbd5f0f2$export$26f7ada50d209c97 extends (0, $fdlOJ$eventemitter3
1316
1316
  }
1317
1317
 
1318
1318
 
1319
- class $c49329927a06d75f$export$4a16012cef0432f7 {
1319
+ class $e8d5484ae4ee7c99$export$4a16012cef0432f7 {
1320
1320
  enqueue(eventId, callbacks) {
1321
1321
  this.callbacks[eventId] = callbacks;
1322
1322
  }
@@ -1347,25 +1347,25 @@ class $c49329927a06d75f$export$4a16012cef0432f7 {
1347
1347
 
1348
1348
 
1349
1349
 
1350
- const $c244c00b386c92f6$export$4702905edceab12f = 15000;
1351
- function $c244c00b386c92f6$var$isErrorResponseEvent(event) {
1350
+ const $ec4d12c83cf907eb$export$4702905edceab12f = 15000;
1351
+ function $ec4d12c83cf907eb$var$isErrorResponseEvent(event) {
1352
1352
  return event.error !== undefined;
1353
1353
  }
1354
1354
  // We'll need unique identifiers to associate with each event.
1355
- const $c244c00b386c92f6$var$uniqueId = function(id) {
1355
+ const $ec4d12c83cf907eb$var$uniqueId = function(id) {
1356
1356
  return ()=>`id-${id++}`;
1357
1357
  }(0);
1358
1358
  // This is a lossy serialization!
1359
1359
  // i.e. trying to deserialize the output will result in `string`s where there
1360
1360
  // were originally `BigInt`s
1361
- const $c244c00b386c92f6$var$replacer = (_key, value)=>typeof value === "bigint" ? value.toString() : value;
1362
- const $c244c00b386c92f6$var$serialize = (event, data)=>`${event}${JSON.stringify(data, $c244c00b386c92f6$var$replacer)}`;
1363
- const $c244c00b386c92f6$var$sleep = (ms)=>{
1361
+ const $ec4d12c83cf907eb$var$replacer = (_key, value)=>typeof value === "bigint" ? value.toString() : value;
1362
+ const $ec4d12c83cf907eb$var$serialize = (event, data)=>`${event}${JSON.stringify(data, $ec4d12c83cf907eb$var$replacer)}`;
1363
+ const $ec4d12c83cf907eb$var$sleep = (ms)=>{
1364
1364
  return new Promise((resolve)=>{
1365
1365
  setTimeout(resolve, ms);
1366
1366
  });
1367
1367
  };
1368
- const $c244c00b386c92f6$var$expiringPromise = (promise, ms)=>{
1368
+ const $ec4d12c83cf907eb$var$expiringPromise = (promise, ms)=>{
1369
1369
  return Promise.race([
1370
1370
  promise,
1371
1371
  new Promise((_, reject)=>{
@@ -1373,59 +1373,59 @@ const $c244c00b386c92f6$var$expiringPromise = (promise, ms)=>{
1373
1373
  })
1374
1374
  ]);
1375
1375
  };
1376
- class $c244c00b386c92f6$export$574bb90dcdb39533 {
1376
+ class $ec4d12c83cf907eb$export$574bb90dcdb39533 {
1377
1377
  #embeddedWalletMessagePoster;
1378
1378
  constructor(embeddedWalletMessagePoster){
1379
1379
  this.ready = false;
1380
1380
  this.cache = new Map();
1381
- this.eventCallbacks = new (0, $c49329927a06d75f$export$4a16012cef0432f7)();
1381
+ this.eventCallbacks = new (0, $e8d5484ae4ee7c99$export$4a16012cef0432f7)();
1382
1382
  this.#embeddedWalletMessagePoster = embeddedWalletMessagePoster;
1383
1383
  }
1384
- async create(data, timeoutMs = $c244c00b386c92f6$export$4702905edceab12f) {
1384
+ async create(data, timeoutMs = $ec4d12c83cf907eb$export$4702905edceab12f) {
1385
1385
  await this.waitForReady();
1386
- return $c244c00b386c92f6$var$expiringPromise(this.invoke("privy:wallet:create", data, this.#embeddedWalletMessagePoster), timeoutMs);
1386
+ return $ec4d12c83cf907eb$var$expiringPromise(this.invoke("privy:wallet:create", data, this.#embeddedWalletMessagePoster), timeoutMs);
1387
1387
  }
1388
- async connect(data, timeoutMs = $c244c00b386c92f6$export$4702905edceab12f) {
1388
+ async connect(data, timeoutMs = $ec4d12c83cf907eb$export$4702905edceab12f) {
1389
1389
  await this.waitForReady();
1390
- return $c244c00b386c92f6$var$expiringPromise(this.invoke("privy:wallet:connect", data, this.#embeddedWalletMessagePoster), timeoutMs);
1390
+ return $ec4d12c83cf907eb$var$expiringPromise(this.invoke("privy:wallet:connect", data, this.#embeddedWalletMessagePoster), timeoutMs);
1391
1391
  }
1392
- async recover(data, timeoutMs = $c244c00b386c92f6$export$4702905edceab12f) {
1392
+ async recover(data, timeoutMs = $ec4d12c83cf907eb$export$4702905edceab12f) {
1393
1393
  await this.waitForReady();
1394
- return $c244c00b386c92f6$var$expiringPromise(this.invoke("privy:wallet:recover", data, this.#embeddedWalletMessagePoster), timeoutMs);
1394
+ return $ec4d12c83cf907eb$var$expiringPromise(this.invoke("privy:wallet:recover", data, this.#embeddedWalletMessagePoster), timeoutMs);
1395
1395
  }
1396
- async setPassword(data, timeoutMs = $c244c00b386c92f6$export$4702905edceab12f) {
1396
+ async setPassword(data, timeoutMs = $ec4d12c83cf907eb$export$4702905edceab12f) {
1397
1397
  await this.waitForReady();
1398
- return $c244c00b386c92f6$var$expiringPromise(this.invoke("privy:wallet:set-recovery-password", data, this.#embeddedWalletMessagePoster), timeoutMs);
1398
+ return $ec4d12c83cf907eb$var$expiringPromise(this.invoke("privy:wallet:set-recovery-password", data, this.#embeddedWalletMessagePoster), timeoutMs);
1399
1399
  }
1400
- async rpc(data, timeoutMs = $c244c00b386c92f6$export$4702905edceab12f) {
1400
+ async rpc(data, timeoutMs = $ec4d12c83cf907eb$export$4702905edceab12f) {
1401
1401
  await this.waitForReady();
1402
- return $c244c00b386c92f6$var$expiringPromise(this.invoke("privy:wallet:rpc", data, this.#embeddedWalletMessagePoster), timeoutMs);
1402
+ return $ec4d12c83cf907eb$var$expiringPromise(this.invoke("privy:wallet:rpc", data, this.#embeddedWalletMessagePoster), timeoutMs);
1403
1403
  }
1404
1404
  handleEmbeddedWalletMessages(event) {
1405
1405
  switch(event.event){
1406
1406
  case "privy:iframe:ready":
1407
1407
  const readyCallbacks = this.eventCallbacks.dequeue(event.event, event.id);
1408
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return readyCallbacks.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1408
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return readyCallbacks.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1409
1409
  else return readyCallbacks.resolve(event.data);
1410
1410
  case "privy:wallet:create":
1411
1411
  const createCallbacks = this.eventCallbacks.dequeue(event.event, event.id);
1412
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return createCallbacks.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1412
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return createCallbacks.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1413
1413
  else return createCallbacks.resolve(event.data);
1414
1414
  case "privy:wallet:connect":
1415
1415
  const connectCallbacks = this.eventCallbacks.dequeue(event.event, event.id);
1416
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return connectCallbacks.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1416
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return connectCallbacks.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1417
1417
  else return connectCallbacks.resolve(event.data);
1418
1418
  case "privy:wallet:recover":
1419
1419
  const recoverCallbacks = this.eventCallbacks.dequeue(event.event, event.id);
1420
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return recoverCallbacks.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1420
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return recoverCallbacks.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1421
1421
  else return recoverCallbacks.resolve(event.data);
1422
1422
  case "privy:wallet:rpc":
1423
1423
  const rpcCallbacks = this.eventCallbacks.dequeue(event.event, event.id);
1424
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return rpcCallbacks.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1424
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return rpcCallbacks.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1425
1425
  else return rpcCallbacks.resolve(event.data);
1426
1426
  case "privy:wallet:set-recovery-password":
1427
1427
  const cb = this.eventCallbacks.dequeue(event.event, event.id);
1428
- if ($c244c00b386c92f6$var$isErrorResponseEvent(event)) return cb.reject(new (0, $7a102e2cbe11da0c$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1428
+ if ($ec4d12c83cf907eb$var$isErrorResponseEvent(event)) return cb.reject(new (0, $2c414ad78ae810d4$export$4ee5e2a38200b61e)(event.error.type, event.error.message));
1429
1429
  else return cb.resolve(event.data);
1430
1430
  }
1431
1431
  }
@@ -1437,12 +1437,12 @@ class $c244c00b386c92f6$export$574bb90dcdb39533 {
1437
1437
  this.ready = true;
1438
1438
  resolve(null);
1439
1439
  }).catch(reject);
1440
- await $c244c00b386c92f6$var$sleep(150);
1440
+ await $ec4d12c83cf907eb$var$sleep(150);
1441
1441
  }
1442
1442
  });
1443
1443
  }
1444
1444
  async invoke(event, data, embeddedWalletMessagePoster) {
1445
- const key = $c244c00b386c92f6$var$serialize(event, data);
1445
+ const key = $ec4d12c83cf907eb$var$serialize(event, data);
1446
1446
  if (event === "privy:wallet:create") {
1447
1447
  const cached = this.cache.get(key);
1448
1448
  if (cached) return cached;
@@ -1450,7 +1450,7 @@ class $c244c00b386c92f6$export$574bb90dcdb39533 {
1450
1450
  // This is the promise that is returned to outside callers so they can use async functions.
1451
1451
  const res = new Promise((resolve, reject)=>{
1452
1452
  // Create a unique ID for this event.
1453
- const eventId = $c244c00b386c92f6$var$uniqueId();
1453
+ const eventId = $ec4d12c83cf907eb$var$uniqueId();
1454
1454
  // Enqueue callbacks for this event associated with the unique id.
1455
1455
  this.eventCallbacks.enqueue(eventId, {
1456
1456
  resolve: resolve,
@@ -1476,7 +1476,7 @@ class $c244c00b386c92f6$export$574bb90dcdb39533 {
1476
1476
 
1477
1477
 
1478
1478
 
1479
- class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1479
+ class $1dda957052f810e0$export$2e2bcd8739ae039 {
1480
1480
  /**
1481
1481
  * @internal
1482
1482
  */ #privyInternal;
@@ -1489,12 +1489,12 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1489
1489
  /**
1490
1490
  * @internal
1491
1491
  */ constructor(privyInternal, embeddedWalletMessagePoster){
1492
- this.#chains = (0, $909ea10c4deb7831$export$f92d15367ea6b4f7).map((chain)=>chain);
1492
+ this.#chains = (0, $2f9341e25c156dcc$export$f92d15367ea6b4f7).map((chain)=>chain);
1493
1493
  this.#privyInternal = privyInternal;
1494
- if (embeddedWalletMessagePoster) this.#proxy = new (0, $c244c00b386c92f6$export$574bb90dcdb39533)(embeddedWalletMessagePoster);
1494
+ if (embeddedWalletMessagePoster) this.#proxy = new (0, $ec4d12c83cf907eb$export$574bb90dcdb39533)(embeddedWalletMessagePoster);
1495
1495
  }
1496
1496
  setMessagePoster(poster) {
1497
- this.#proxy = new (0, $c244c00b386c92f6$export$574bb90dcdb39533)(poster);
1497
+ this.#proxy = new (0, $ec4d12c83cf907eb$export$574bb90dcdb39533)(poster);
1498
1498
  }
1499
1499
  /**
1500
1500
  * Creates an embedded wallet
@@ -1511,7 +1511,7 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1511
1511
  recoveryPassword: password
1512
1512
  });
1513
1513
  if (!address) throw new Error("Failed to create wallet");
1514
- return new (0, $ed667f6fcbd5f0f2$export$26f7ada50d209c97)({
1514
+ return new (0, $8efc598a5848a0f4$export$26f7ada50d209c97)({
1515
1515
  address: address,
1516
1516
  privyInternal: this.#privyInternal,
1517
1517
  chains: this.#chains,
@@ -1527,7 +1527,7 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1527
1527
  */ async getProvider(password) {
1528
1528
  if (!this.#proxy) throw new Error("Embedded wallet proxy not initialized");
1529
1529
  const address = await this.#load(password);
1530
- return new (0, $ed667f6fcbd5f0f2$export$26f7ada50d209c97)({
1530
+ return new (0, $8efc598a5848a0f4$export$26f7ada50d209c97)({
1531
1531
  address: address,
1532
1532
  privyInternal: this.#privyInternal,
1533
1533
  chains: this.#chains,
@@ -1550,7 +1550,7 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1550
1550
  address: address,
1551
1551
  recoveryPassword: password
1552
1552
  });
1553
- return new (0, $ed667f6fcbd5f0f2$export$26f7ada50d209c97)({
1553
+ return new (0, $8efc598a5848a0f4$export$26f7ada50d209c97)({
1554
1554
  address: address,
1555
1555
  privyInternal: this.#privyInternal,
1556
1556
  chains: this.#chains,
@@ -1592,14 +1592,14 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1592
1592
  });
1593
1593
  return address;
1594
1594
  } catch (err) {
1595
- if ((0, $7a102e2cbe11da0c$export$8e5517a02da6043)(err) && embeddedWallet.recovery_method === "privy") {
1595
+ if ((0, $2c414ad78ae810d4$export$8e5517a02da6043)(err) && embeddedWallet.recovery_method === "privy") {
1596
1596
  await this.#proxy.recover({
1597
1597
  accessToken: token,
1598
1598
  address: address,
1599
1599
  recoveryPassword: password
1600
1600
  });
1601
1601
  return address;
1602
- } else if ((0, $7a102e2cbe11da0c$export$8e5517a02da6043)(err) && !password) // password is required
1602
+ } else if ((0, $2c414ad78ae810d4$export$8e5517a02da6043)(err) && !password) // password is required
1603
1603
  throw new Error("User recovery password required");
1604
1604
  else throw err;
1605
1605
  }
@@ -1610,23 +1610,23 @@ class $c838da93fb583f7c$export$2e2bcd8739ae039 {
1610
1610
 
1611
1611
 
1612
1612
 
1613
- var $d019bc61f66dc929$exports = {};
1614
- $d019bc61f66dc929$exports = JSON.parse('{"name":"@privy-io/js-sdk-core","version":"0.1.1","description":"Vanilla JS client for the Privy Auth API","keywords":["authentication","authorization","identity","privacy","privy","user data","web3"],"license":"Apache-2.0","source":"./src/index.ts","main":"./dist/index.js","module":"./dist/esm/index.js","types":"./dist/index.d.ts","typings":"./dist/index","exports":{".":{"require":"./dist/index.js","import":"./dist/esm/index.js","types":"./dist/index.d.ts"}},"targets":{"main":{"isLibrary":true},"module":{"isLibrary":true}},"files":["dist/**/*","LICENSE","README.md"],"scripts":{"build":"npx parcel build","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build","dev":"npx parcel watch","test":"jest --testMatch \\"**/test/unit/**/*.test.ts\\"","test:ci":"npm run test","test-integration":"jest --testMatch \\"**/test/integration/**/*.test.ts\\"","lint":"eslint \\"src/**/*.{ts,tsx,js,jsx}\\" && npx tsc --noEmit","format":"eslint \\"src/**/*.{ts,tsx,js,jsx}\\" --fix"},"devDependencies":{"@privy-io/tsconfig":"*","@tsconfig/node16-strictest-esm":"^1.0.3","@types/text-encoding":"^0.0.37","parcel":"^2.9.3"},"dependencies":{"@ethersproject/providers":"^5.7.2","@privy-io/public-api":"*","eventemitter3":"^5.0.1","fetch-retry":"^5.0.6","jose":"^4.11.2","js-cookie":"^3.0.5","text-encoding":"^0.7.0","uuid":">=8 <10"},"author":"privy.io","browserslist":["defaults","node >= 18","not op_mini all"],"publishConfig":{"access":"public"}}');
1613
+ var $53a9b3651331d972$exports = {};
1614
+ $53a9b3651331d972$exports = JSON.parse('{"name":"@privy-io/js-sdk-core","version":"0.2.0-beta-20230925233038","description":"Vanilla JS client for the Privy Auth API","keywords":["authentication","authorization","identity","privacy","privy","user data","web3"],"license":"Apache-2.0","source":"./src/index.ts","main":"./dist/index.js","module":"./dist/esm/index.js","types":"./dist/index.d.ts","typings":"./dist/index","exports":{".":{"require":"./dist/index.js","import":"./dist/esm/index.js","types":"./dist/index.d.ts"}},"targets":{"main":{"isLibrary":true,"sourceMap":false},"module":{"isLibrary":true,"sourceMap":false}},"files":["dist/**/*","LICENSE","README.md"],"scripts":{"build":"npx parcel build","clean":"rm -rf dist .turbo","prepublishOnly":"npm run clean && npm run build","dev":"npx parcel watch","test":"jest --testMatch \\"**/test/unit/**/*.test.ts\\"","test:ci":"npm run test","test-integration":"jest --testMatch \\"**/test/integration/**/*.test.ts\\"","lint":"eslint \\"src/**/*.{ts,tsx,js,jsx}\\" && npx tsc --noEmit","format":"eslint \\"src/**/*.{ts,tsx,js,jsx}\\" --fix"},"devDependencies":{"@privy-io/tsconfig":"*","@tsconfig/node16-strictest-esm":"^1.0.3","@types/text-encoding":"^0.0.37","parcel":"^2.9.3"},"dependencies":{"@ethersproject/providers":"^5.7.2","@privy-io/public-api":"1.1.0-beta-20230925233038","eventemitter3":"^5.0.1","fetch-retry":"^5.0.6","jose":"^4.11.2","js-cookie":"^3.0.5","text-encoding":"^0.7.0","uuid":">=8 <10"},"author":"privy.io","browserslist":["defaults","node >= 18","not op_mini all"],"publishConfig":{"access":"public"}}');
1615
1615
 
1616
1616
 
1617
1617
 
1618
1618
 
1619
- class $dafc1d5a5d2c2ddb$export$50792b0e93539fde {
1619
+ class $efa0c2e06cf7cca2$export$50792b0e93539fde {
1620
1620
  static parse(token) {
1621
1621
  try {
1622
- return new $dafc1d5a5d2c2ddb$export$50792b0e93539fde(token);
1622
+ return new $efa0c2e06cf7cca2$export$50792b0e93539fde(token);
1623
1623
  } catch (error) {
1624
1624
  return null;
1625
1625
  }
1626
1626
  }
1627
1627
  constructor(value){
1628
1628
  this.value = value;
1629
- this._decoded = $fdlOJ$decodeJwt(value);
1629
+ this._decoded = $cHhfT$decodeJwt(value);
1630
1630
  }
1631
1631
  /**
1632
1632
  * The subject is the user id to which this token is assigned.
@@ -1660,18 +1660,18 @@ class $dafc1d5a5d2c2ddb$export$50792b0e93539fde {
1660
1660
  }
1661
1661
 
1662
1662
 
1663
- const $f7be880219889a89$var$TOKEN_STORAGE_KEY = "privy:token";
1664
- const $f7be880219889a89$var$TOKEN_COOKIE_KEY = "privy-token";
1665
- const $f7be880219889a89$var$REFRESH_TOKEN_STORAGE_KEY = "privy:refresh_token";
1666
- const $f7be880219889a89$var$REFRESH_TOKEN_COOKIE_KEY = "privy-refresh-token";
1667
- const $f7be880219889a89$var$SESSION_COOKIE_KEY = "privy-session";
1668
- const $f7be880219889a89$var$FORKED_TOKEN_STORAGE_KEY = "privy:session_transfer_token";
1663
+ const $0b6eb30d38bf8477$var$TOKEN_STORAGE_KEY = "privy:token";
1664
+ const $0b6eb30d38bf8477$var$TOKEN_COOKIE_KEY = "privy-token";
1665
+ const $0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY = "privy:refresh_token";
1666
+ const $0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY = "privy-refresh-token";
1667
+ const $0b6eb30d38bf8477$var$SESSION_COOKIE_KEY = "privy-session";
1668
+ const $0b6eb30d38bf8477$var$FORKED_TOKEN_STORAGE_KEY = "privy:session_transfer_token";
1669
1669
  // By default, a session will be considered unauthenticated
1670
1670
  // 30 seconds prior to its token's expiration time. This is
1671
1671
  // so we can eagerly re-authenticate before the server would
1672
1672
  // reject requests with a 401.
1673
- const $f7be880219889a89$var$DEFAULT_EXPIRATION_PADDING_IN_SECONDS = 30;
1674
- class $f7be880219889a89$export$1fb4852a55678982 {
1673
+ const $0b6eb30d38bf8477$var$DEFAULT_EXPIRATION_PADDING_IN_SECONDS = 30;
1674
+ class $0b6eb30d38bf8477$export$1fb4852a55678982 {
1675
1675
  #storage;
1676
1676
  #isUsingServerCookies;
1677
1677
  constructor(o){
@@ -1683,9 +1683,9 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1683
1683
  }
1684
1684
  get token() {
1685
1685
  try {
1686
- const token = this.#storage.get($f7be880219889a89$var$TOKEN_STORAGE_KEY);
1686
+ const token = this.#storage.get($0b6eb30d38bf8477$var$TOKEN_STORAGE_KEY);
1687
1687
  if (typeof token === "string") // This should throw error if the token is not a JWT
1688
- return new (0, $dafc1d5a5d2c2ddb$export$50792b0e93539fde)(token).value;
1688
+ return new (0, $efa0c2e06cf7cca2$export$50792b0e93539fde)(token).value;
1689
1689
  else return null;
1690
1690
  } catch (error) {
1691
1691
  console.error(error);
@@ -1695,7 +1695,7 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1695
1695
  }
1696
1696
  get refreshToken() {
1697
1697
  try {
1698
- const refreshToken = this.#storage.get($f7be880219889a89$var$REFRESH_TOKEN_STORAGE_KEY);
1698
+ const refreshToken = this.#storage.get($0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY);
1699
1699
  return typeof refreshToken === "string" ? refreshToken : null;
1700
1700
  } catch (error) {
1701
1701
  console.error(error);
@@ -1705,7 +1705,7 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1705
1705
  }
1706
1706
  get forkedToken() {
1707
1707
  try {
1708
- const forkedToken = this.#storage.get($f7be880219889a89$var$FORKED_TOKEN_STORAGE_KEY);
1708
+ const forkedToken = this.#storage.get($0b6eb30d38bf8477$var$FORKED_TOKEN_STORAGE_KEY);
1709
1709
  return typeof forkedToken === "string" ? forkedToken : null;
1710
1710
  } catch (error) {
1711
1711
  console.error(error);
@@ -1717,7 +1717,7 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1717
1717
  // is present, as it is set with the same lifespan as the refresh token and at the same time.
1718
1718
  get mightHaveServerCookies() {
1719
1719
  try {
1720
- const sessionToken = (0, $fdlOJ$jscookie).get($f7be880219889a89$var$SESSION_COOKIE_KEY);
1720
+ const sessionToken = (0, $cHhfT$jscookie).get($0b6eb30d38bf8477$var$SESSION_COOKIE_KEY);
1721
1721
  return sessionToken !== undefined && sessionToken.length > 0;
1722
1722
  } catch (error) {
1723
1723
  console.error(error);
@@ -1748,8 +1748,8 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1748
1748
  *
1749
1749
  * @returns true if token is considered active, false otherwise.
1750
1750
  */ hasActiveToken() {
1751
- const token = (0, $dafc1d5a5d2c2ddb$export$50792b0e93539fde).parse(this.token);
1752
- return token !== null && !token.isExpired($f7be880219889a89$var$DEFAULT_EXPIRATION_PADDING_IN_SECONDS);
1751
+ const token = (0, $efa0c2e06cf7cca2$export$50792b0e93539fde).parse(this.token);
1752
+ return token !== null && !token.isExpired($0b6eb30d38bf8477$var$DEFAULT_EXPIRATION_PADDING_IN_SECONDS);
1753
1753
  }
1754
1754
  destroyLocalState() {
1755
1755
  this.storeToken(null);
@@ -1758,24 +1758,24 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1758
1758
  }
1759
1759
  storeToken(token) {
1760
1760
  if (typeof token === "string") {
1761
- this.#storage.put($f7be880219889a89$var$TOKEN_STORAGE_KEY, token);
1761
+ this.#storage.put($0b6eb30d38bf8477$var$TOKEN_STORAGE_KEY, token);
1762
1762
  if (!this.#isUsingServerCookies) {
1763
- const exp = (0, $dafc1d5a5d2c2ddb$export$50792b0e93539fde).parse(token)?.expiration;
1764
- (0, $fdlOJ$jscookie).set($f7be880219889a89$var$TOKEN_COOKIE_KEY, token, {
1763
+ const exp = (0, $efa0c2e06cf7cca2$export$50792b0e93539fde).parse(token)?.expiration;
1764
+ (0, $cHhfT$jscookie).set($0b6eb30d38bf8477$var$TOKEN_COOKIE_KEY, token, {
1765
1765
  sameSite: "Strict",
1766
1766
  secure: true,
1767
1767
  expires: exp ? new Date(exp * 1000) : undefined
1768
1768
  });
1769
1769
  }
1770
1770
  } else {
1771
- this.#storage.del($f7be880219889a89$var$TOKEN_STORAGE_KEY);
1772
- (0, $fdlOJ$jscookie).remove($f7be880219889a89$var$TOKEN_COOKIE_KEY);
1771
+ this.#storage.del($0b6eb30d38bf8477$var$TOKEN_STORAGE_KEY);
1772
+ (0, $cHhfT$jscookie).remove($0b6eb30d38bf8477$var$TOKEN_COOKIE_KEY);
1773
1773
  }
1774
1774
  }
1775
1775
  storeRefreshToken(refreshToken) {
1776
1776
  if (typeof refreshToken === "string") {
1777
- this.#storage.put($f7be880219889a89$var$REFRESH_TOKEN_STORAGE_KEY, refreshToken);
1778
- if (!this.#isUsingServerCookies) (0, $fdlOJ$jscookie).set($f7be880219889a89$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
1777
+ this.#storage.put($0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY, refreshToken);
1778
+ if (!this.#isUsingServerCookies) (0, $cHhfT$jscookie).set($0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY, refreshToken, {
1779
1779
  sameSite: "Strict",
1780
1780
  secure: true,
1781
1781
  // Note! This is capped to 7 days on Safari and Brave:
@@ -1783,12 +1783,12 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1783
1783
  expires: 30
1784
1784
  });
1785
1785
  } else {
1786
- this.#storage.del($f7be880219889a89$var$REFRESH_TOKEN_STORAGE_KEY);
1787
- (0, $fdlOJ$jscookie).remove($f7be880219889a89$var$REFRESH_TOKEN_COOKIE_KEY);
1786
+ this.#storage.del($0b6eb30d38bf8477$var$REFRESH_TOKEN_STORAGE_KEY);
1787
+ (0, $cHhfT$jscookie).remove($0b6eb30d38bf8477$var$REFRESH_TOKEN_COOKIE_KEY);
1788
1788
  }
1789
1789
  }
1790
1790
  clearForkedToken() {
1791
- this.#storage.del($f7be880219889a89$var$FORKED_TOKEN_STORAGE_KEY);
1791
+ this.#storage.del($0b6eb30d38bf8477$var$FORKED_TOKEN_STORAGE_KEY);
1792
1792
  }
1793
1793
  }
1794
1794
 
@@ -1796,16 +1796,16 @@ class $f7be880219889a89$export$1fb4852a55678982 {
1796
1796
  /**
1797
1797
  * Patch for AbortSignal.timeout since it is not supported in iOS Safari < 16
1798
1798
  * Adapted from: https://github.com/mo/abortcontroller-polyfill/issues/73#issuecomment-1541180943
1799
- */ const $23b60b0520ebfec6$var$toAbortSignalTimeout = (duration)=>{
1799
+ */ const $972f0079ffedc5b0$var$toAbortSignalTimeout = (duration)=>{
1800
1800
  const controller = new AbortController();
1801
1801
  setTimeout(()=>controller.abort(), duration);
1802
1802
  return controller.signal;
1803
1803
  };
1804
- var $23b60b0520ebfec6$export$2e2bcd8739ae039 = $23b60b0520ebfec6$var$toAbortSignalTimeout;
1804
+ var $972f0079ffedc5b0$export$2e2bcd8739ae039 = $972f0079ffedc5b0$var$toAbortSignalTimeout;
1805
1805
 
1806
1806
 
1807
- const $d20bcd05f51689d2$var$DEFAULT_PRIVY_API_URL = "https://auth.privy.io";
1808
- class $d20bcd05f51689d2$export$9e80c3751b841788 {
1807
+ const $83ff42e2a0f1e24a$var$DEFAULT_PRIVY_API_URL = "https://auth.privy.io";
1808
+ class $83ff42e2a0f1e24a$export$9e80c3751b841788 {
1809
1809
  #storage;
1810
1810
  #clientId;
1811
1811
  #sdkVersion;
@@ -1817,17 +1817,17 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1817
1817
  * @property {string} o.appId - The application ID
1818
1818
  * @property {string} o.baseUrl - The base URL for the application
1819
1819
  */ constructor(o){
1820
- this.#sdkVersion = `js-sdk-core:${0, $d019bc61f66dc929$exports.version}`;
1821
- this.baseUrl = o.baseUrl ?? $d20bcd05f51689d2$var$DEFAULT_PRIVY_API_URL;
1820
+ this.#sdkVersion = `js-sdk-core:${0, $53a9b3651331d972$exports.version}`;
1821
+ this.baseUrl = o.baseUrl ?? $83ff42e2a0f1e24a$var$DEFAULT_PRIVY_API_URL;
1822
1822
  this.appId = o.appId;
1823
1823
  this.#storage = o.storage;
1824
- this.#clientId = (0, $fdlOJ$v4)();
1824
+ this.#clientId = (0, $cHhfT$v4)();
1825
1825
  this.#sdkVersion = o.sdkVersion ?? this.#sdkVersion;
1826
- this.session = new (0, $f7be880219889a89$export$1fb4852a55678982)({
1826
+ this.session = new (0, $0b6eb30d38bf8477$export$1fb4852a55678982)({
1827
1827
  storage: this.#storage,
1828
1828
  isUsingServerCookies: false
1829
1829
  });
1830
- this.#fetch = (0, $fdlOJ$fetchretry)(fetch, {
1830
+ this.#fetch = (0, $cHhfT$fetchretry)(fetch, {
1831
1831
  retries: 3,
1832
1832
  retryDelay: 500
1833
1833
  });
@@ -1848,7 +1848,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1848
1848
  this.config = await this.getAppConfig();
1849
1849
  if (this.config?.custom_api_url) {
1850
1850
  this.baseUrl = this.config.custom_api_url;
1851
- this.#fetch = (0, $fdlOJ$fetchretry)(fetch, {
1851
+ this.#fetch = (0, $cHhfT$fetchretry)(fetch, {
1852
1852
  retries: 3,
1853
1853
  retryDelay: 500
1854
1854
  });
@@ -1890,7 +1890,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1890
1890
  headers.set("Content-Type", "application/json");
1891
1891
  headers.set("Accept", "application/json");
1892
1892
  return {
1893
- signal: (0, $23b60b0520ebfec6$export$2e2bcd8739ae039)(3000),
1893
+ signal: (0, $972f0079ffedc5b0$export$2e2bcd8739ae039)(3000),
1894
1894
  headers: headers,
1895
1895
  credentials: "include"
1896
1896
  };
@@ -1912,7 +1912,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1912
1912
  *
1913
1913
  * Returns a promise that resolves to the application configuration
1914
1914
  */ async getAppConfig() {
1915
- return this.fetch((0, $fdlOJ$getAppConfig), {
1915
+ return this.fetch((0, $cHhfT$getAppConfig), {
1916
1916
  params: {
1917
1917
  app_id: this.appId
1918
1918
  },
@@ -1929,7 +1929,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1929
1929
  *
1930
1930
  * Returns a promise that resolves to the response of the analytics event creation
1931
1931
  */ async createAnalyticsEvent(name, properties) {
1932
- return this.fetch((0, $fdlOJ$recordAnalyticsEvent), {
1932
+ return this.fetch((0, $cHhfT$recordAnalyticsEvent), {
1933
1933
  body: {
1934
1934
  event_name: name,
1935
1935
  client_id: this.#clientId,
@@ -1943,7 +1943,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1943
1943
  *
1944
1944
  * Returns a promise that resolves to the response of the session refresh
1945
1945
  */ async refreshSession() {
1946
- const res = await this.fetch((0, $fdlOJ$refreshSession), {
1946
+ const res = await this.fetch((0, $cHhfT$refreshSession), {
1947
1947
  body: {
1948
1948
  refresh_token: this.session.refreshToken ?? undefined
1949
1949
  },
@@ -1967,7 +1967,7 @@ class $d20bcd05f51689d2$export$9e80c3751b841788 {
1967
1967
  }
1968
1968
 
1969
1969
 
1970
- class $8bd75308be6bba56$export$2e2bcd8739ae039 {
1970
+ class $aeac4add5e2aa09d$export$2e2bcd8739ae039 {
1971
1971
  /**
1972
1972
  * @internal
1973
1973
  */ #privyInternal;
@@ -1984,13 +1984,13 @@ class $8bd75308be6bba56$export$2e2bcd8739ae039 {
1984
1984
  }
1985
1985
 
1986
1986
 
1987
- class $774a046612cfe588$export$2e2bcd8739ae039 {
1987
+ class $a43e642a0de69b32$export$2e2bcd8739ae039 {
1988
1988
  #privyInternal;
1989
1989
  /** Create a new `Privy` Client */ constructor(o){
1990
- this.#privyInternal = new (0, $d20bcd05f51689d2$export$9e80c3751b841788)(o);
1991
- this.user = new (0, $8bd75308be6bba56$export$2e2bcd8739ae039)(this.#privyInternal);
1992
- this.auth = new (0, $955bfb5a5edecad4$export$2e2bcd8739ae039)(this.#privyInternal);
1993
- this.embeddedWallet = new (0, $c838da93fb583f7c$export$2e2bcd8739ae039)(this.#privyInternal, o.embeddedWalletMessagePoster);
1990
+ this.#privyInternal = new (0, $83ff42e2a0f1e24a$export$9e80c3751b841788)(o);
1991
+ this.user = new (0, $aeac4add5e2aa09d$export$2e2bcd8739ae039)(this.#privyInternal);
1992
+ this.auth = new (0, $03a158f151dbddfa$export$2e2bcd8739ae039)(this.#privyInternal);
1993
+ this.embeddedWallet = new (0, $1dda957052f810e0$export$2e2bcd8739ae039)(this.#privyInternal, o.embeddedWalletMessagePoster);
1994
1994
  }
1995
1995
  setMessagePoster(poster) {
1996
1996
  this.embeddedWallet.setMessagePoster(poster);
@@ -1998,7 +1998,7 @@ class $774a046612cfe588$export$2e2bcd8739ae039 {
1998
1998
  }
1999
1999
 
2000
2000
 
2001
- class $5619ac446340380b$export$19fffca37ef3e106 {
2001
+ class $451b924a20bb5457$export$19fffca37ef3e106 {
2002
2002
  get(key) {
2003
2003
  const val = localStorage.getItem(key);
2004
2004
  return val === null ? undefined : JSON.parse(val);
@@ -2016,7 +2016,7 @@ class $5619ac446340380b$export$19fffca37ef3e106 {
2016
2016
  }
2017
2017
 
2018
2018
 
2019
- class $4ec4af43adcd9806$export$467265324939f47f {
2019
+ class $94c28b2caada9967$export$467265324939f47f {
2020
2020
  get(key) {
2021
2021
  return this._cache[key];
2022
2022
  }
@@ -2036,12 +2036,11 @@ class $4ec4af43adcd9806$export$467265324939f47f {
2036
2036
  }
2037
2037
 
2038
2038
 
2039
- var $bd69d25d1a305f68$exports = {};
2039
+ var $548053672b0514e6$exports = {};
2040
2040
 
2041
2041
 
2042
- globalThis.TextEncoder ??= (0, $fdlOJ$TextEncoder);
2043
- var $a6e1b29c10faf0c5$export$2e2bcd8739ae039 = (0, $774a046612cfe588$export$2e2bcd8739ae039);
2042
+ globalThis.TextEncoder ??= (0, $cHhfT$TextEncoder);
2043
+ var $72afd1f4960afa4d$export$2e2bcd8739ae039 = (0, $a43e642a0de69b32$export$2e2bcd8739ae039);
2044
2044
 
2045
2045
 
2046
- export {$a6e1b29c10faf0c5$export$2e2bcd8739ae039 as default, $5619ac446340380b$export$19fffca37ef3e106 as LocalStorage, $4ec4af43adcd9806$export$467265324939f47f as InMemoryCache};
2047
- //# sourceMappingURL=index.js.map
2046
+ export {$72afd1f4960afa4d$export$2e2bcd8739ae039 as default, $451b924a20bb5457$export$19fffca37ef3e106 as LocalStorage, $94c28b2caada9967$export$467265324939f47f as InMemoryCache};