@b3dotfun/sdk 0.1.66-alpha.1 → 0.1.66

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.
@@ -8,7 +8,6 @@ const authentication_client_1 = require("@feathersjs/authentication-client");
8
8
  const js_cookie_1 = __importDefault(require("js-cookie"));
9
9
  const constants_1 = require("./shared/constants");
10
10
  exports.B3_API_URL = process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
11
- const DEV_USER_GROUP = 4;
12
11
  const authenticate = async (app, accessToken, identityToken, params) => {
13
12
  const fullToken = `${accessToken}+${identityToken}`;
14
13
  // Do not authenticate if there is no token
@@ -23,13 +22,6 @@ const authenticate = async (app, accessToken, identityToken, params) => {
23
22
  }, {
24
23
  query: params || {},
25
24
  });
26
- // Extend cookie expiration to 30 days for dev users
27
- if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
28
- const token = js_cookie_1.default.get(constants_1.B3_AUTH_COOKIE_NAME);
29
- if (token) {
30
- js_cookie_1.default.set(constants_1.B3_AUTH_COOKIE_NAME, token, { expires: 30 });
31
- }
32
- }
33
25
  return response;
34
26
  }
35
27
  catch (error) {
@@ -7451,8 +7451,6 @@ export declare function useFirstEOA(chain?: {
7451
7451
  [x: `bool[${string}]`]: undefined;
7452
7452
  [x: `bytes[${string}]`]: undefined;
7453
7453
  [x: `bytes1[${string}]`]: undefined;
7454
- [x: `bytes4[${string}]`]: undefined;
7455
- [x: `bytes30[${string}]`]: undefined;
7456
7454
  [x: `bytes18[${string}]`]: undefined;
7457
7455
  [x: `bytes6[${string}]`]: undefined;
7458
7456
  [x: `bytes9[${string}]`]: undefined;
@@ -7460,6 +7458,7 @@ export declare function useFirstEOA(chain?: {
7460
7458
  [x: `bytes10[${string}]`]: undefined;
7461
7459
  [x: `bytes2[${string}]`]: undefined;
7462
7460
  [x: `bytes3[${string}]`]: undefined;
7461
+ [x: `bytes4[${string}]`]: undefined;
7463
7462
  [x: `bytes5[${string}]`]: undefined;
7464
7463
  [x: `bytes7[${string}]`]: undefined;
7465
7464
  [x: `bytes11[${string}]`]: undefined;
@@ -7480,6 +7479,7 @@ export declare function useFirstEOA(chain?: {
7480
7479
  [x: `bytes27[${string}]`]: undefined;
7481
7480
  [x: `bytes28[${string}]`]: undefined;
7482
7481
  [x: `bytes29[${string}]`]: undefined;
7482
+ [x: `bytes30[${string}]`]: undefined;
7483
7483
  [x: `bytes31[${string}]`]: undefined;
7484
7484
  [x: `bytes32[${string}]`]: undefined;
7485
7485
  [x: `int[${string}]`]: undefined;
@@ -7553,8 +7553,6 @@ export declare function useFirstEOA(chain?: {
7553
7553
  bool?: undefined;
7554
7554
  bytes?: undefined;
7555
7555
  bytes1?: undefined;
7556
- bytes4?: undefined;
7557
- bytes30?: undefined;
7558
7556
  bytes18?: undefined;
7559
7557
  bytes6?: undefined;
7560
7558
  bytes9?: undefined;
@@ -7562,6 +7560,7 @@ export declare function useFirstEOA(chain?: {
7562
7560
  bytes10?: undefined;
7563
7561
  bytes2?: undefined;
7564
7562
  bytes3?: undefined;
7563
+ bytes4?: undefined;
7565
7564
  bytes5?: undefined;
7566
7565
  bytes7?: undefined;
7567
7566
  bytes11?: undefined;
@@ -7582,6 +7581,7 @@ export declare function useFirstEOA(chain?: {
7582
7581
  bytes27?: undefined;
7583
7582
  bytes28?: undefined;
7584
7583
  bytes29?: undefined;
7584
+ bytes30?: undefined;
7585
7585
  bytes31?: undefined;
7586
7586
  bytes32?: undefined;
7587
7587
  int56?: undefined;
@@ -2,7 +2,6 @@ import { AuthenticationClient } from "@feathersjs/authentication-client";
2
2
  import Cookies from "js-cookie";
3
3
  import { B3_AUTH_COOKIE_NAME } from "./shared/constants/index.js";
4
4
  export const B3_API_URL = process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
5
- const DEV_USER_GROUP = 4;
6
5
  export const authenticate = async (app, accessToken, identityToken, params) => {
7
6
  const fullToken = `${accessToken}+${identityToken}`;
8
7
  // Do not authenticate if there is no token
@@ -17,13 +16,6 @@ export const authenticate = async (app, accessToken, identityToken, params) => {
17
16
  }, {
18
17
  query: params || {},
19
18
  });
20
- // Extend cookie expiration to 30 days for dev users
21
- if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
22
- const token = Cookies.get(B3_AUTH_COOKIE_NAME);
23
- if (token) {
24
- Cookies.set(B3_AUTH_COOKIE_NAME, token, { expires: 30 });
25
- }
26
- }
27
19
  return response;
28
20
  }
29
21
  catch (error) {
@@ -7451,8 +7451,6 @@ export declare function useFirstEOA(chain?: {
7451
7451
  [x: `bool[${string}]`]: undefined;
7452
7452
  [x: `bytes[${string}]`]: undefined;
7453
7453
  [x: `bytes1[${string}]`]: undefined;
7454
- [x: `bytes4[${string}]`]: undefined;
7455
- [x: `bytes30[${string}]`]: undefined;
7456
7454
  [x: `bytes18[${string}]`]: undefined;
7457
7455
  [x: `bytes6[${string}]`]: undefined;
7458
7456
  [x: `bytes9[${string}]`]: undefined;
@@ -7460,6 +7458,7 @@ export declare function useFirstEOA(chain?: {
7460
7458
  [x: `bytes10[${string}]`]: undefined;
7461
7459
  [x: `bytes2[${string}]`]: undefined;
7462
7460
  [x: `bytes3[${string}]`]: undefined;
7461
+ [x: `bytes4[${string}]`]: undefined;
7463
7462
  [x: `bytes5[${string}]`]: undefined;
7464
7463
  [x: `bytes7[${string}]`]: undefined;
7465
7464
  [x: `bytes11[${string}]`]: undefined;
@@ -7480,6 +7479,7 @@ export declare function useFirstEOA(chain?: {
7480
7479
  [x: `bytes27[${string}]`]: undefined;
7481
7480
  [x: `bytes28[${string}]`]: undefined;
7482
7481
  [x: `bytes29[${string}]`]: undefined;
7482
+ [x: `bytes30[${string}]`]: undefined;
7483
7483
  [x: `bytes31[${string}]`]: undefined;
7484
7484
  [x: `bytes32[${string}]`]: undefined;
7485
7485
  [x: `int[${string}]`]: undefined;
@@ -7553,8 +7553,6 @@ export declare function useFirstEOA(chain?: {
7553
7553
  bool?: undefined;
7554
7554
  bytes?: undefined;
7555
7555
  bytes1?: undefined;
7556
- bytes4?: undefined;
7557
- bytes30?: undefined;
7558
7556
  bytes18?: undefined;
7559
7557
  bytes6?: undefined;
7560
7558
  bytes9?: undefined;
@@ -7562,6 +7560,7 @@ export declare function useFirstEOA(chain?: {
7562
7560
  bytes10?: undefined;
7563
7561
  bytes2?: undefined;
7564
7562
  bytes3?: undefined;
7563
+ bytes4?: undefined;
7565
7564
  bytes5?: undefined;
7566
7565
  bytes7?: undefined;
7567
7566
  bytes11?: undefined;
@@ -7582,6 +7581,7 @@ export declare function useFirstEOA(chain?: {
7582
7581
  bytes27?: undefined;
7583
7582
  bytes28?: undefined;
7584
7583
  bytes29?: undefined;
7584
+ bytes30?: undefined;
7585
7585
  bytes31?: undefined;
7586
7586
  bytes32?: undefined;
7587
7587
  int56?: undefined;
@@ -7451,8 +7451,6 @@ export declare function useFirstEOA(chain?: {
7451
7451
  [x: `bool[${string}]`]: undefined;
7452
7452
  [x: `bytes[${string}]`]: undefined;
7453
7453
  [x: `bytes1[${string}]`]: undefined;
7454
- [x: `bytes4[${string}]`]: undefined;
7455
- [x: `bytes30[${string}]`]: undefined;
7456
7454
  [x: `bytes18[${string}]`]: undefined;
7457
7455
  [x: `bytes6[${string}]`]: undefined;
7458
7456
  [x: `bytes9[${string}]`]: undefined;
@@ -7460,6 +7458,7 @@ export declare function useFirstEOA(chain?: {
7460
7458
  [x: `bytes10[${string}]`]: undefined;
7461
7459
  [x: `bytes2[${string}]`]: undefined;
7462
7460
  [x: `bytes3[${string}]`]: undefined;
7461
+ [x: `bytes4[${string}]`]: undefined;
7463
7462
  [x: `bytes5[${string}]`]: undefined;
7464
7463
  [x: `bytes7[${string}]`]: undefined;
7465
7464
  [x: `bytes11[${string}]`]: undefined;
@@ -7480,6 +7479,7 @@ export declare function useFirstEOA(chain?: {
7480
7479
  [x: `bytes27[${string}]`]: undefined;
7481
7480
  [x: `bytes28[${string}]`]: undefined;
7482
7481
  [x: `bytes29[${string}]`]: undefined;
7482
+ [x: `bytes30[${string}]`]: undefined;
7483
7483
  [x: `bytes31[${string}]`]: undefined;
7484
7484
  [x: `bytes32[${string}]`]: undefined;
7485
7485
  [x: `int[${string}]`]: undefined;
@@ -7553,8 +7553,6 @@ export declare function useFirstEOA(chain?: {
7553
7553
  bool?: undefined;
7554
7554
  bytes?: undefined;
7555
7555
  bytes1?: undefined;
7556
- bytes4?: undefined;
7557
- bytes30?: undefined;
7558
7556
  bytes18?: undefined;
7559
7557
  bytes6?: undefined;
7560
7558
  bytes9?: undefined;
@@ -7562,6 +7560,7 @@ export declare function useFirstEOA(chain?: {
7562
7560
  bytes10?: undefined;
7563
7561
  bytes2?: undefined;
7564
7562
  bytes3?: undefined;
7563
+ bytes4?: undefined;
7565
7564
  bytes5?: undefined;
7566
7565
  bytes7?: undefined;
7567
7566
  bytes11?: undefined;
@@ -7582,6 +7581,7 @@ export declare function useFirstEOA(chain?: {
7582
7581
  bytes27?: undefined;
7583
7582
  bytes28?: undefined;
7584
7583
  bytes29?: undefined;
7584
+ bytes30?: undefined;
7585
7585
  bytes31?: undefined;
7586
7586
  bytes32?: undefined;
7587
7587
  int56?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.1.66-alpha.1",
3
+ "version": "0.1.66",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
package/src/app.shared.ts CHANGED
@@ -6,8 +6,6 @@ import { B3_AUTH_COOKIE_NAME } from "./shared/constants";
6
6
  export const B3_API_URL =
7
7
  process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
8
8
 
9
- const DEV_USER_GROUP = 4;
10
-
11
9
  export const authenticate = async (
12
10
  app: ClientApplication,
13
11
  accessToken: string,
@@ -32,15 +30,6 @@ export const authenticate = async (
32
30
  query: params || {},
33
31
  },
34
32
  );
35
-
36
- // Extend cookie expiration to 30 days for dev users
37
- if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
38
- const token = Cookies.get(B3_AUTH_COOKIE_NAME);
39
- if (token) {
40
- Cookies.set(B3_AUTH_COOKIE_NAME, token, { expires: 30 });
41
- }
42
- }
43
-
44
33
  return response;
45
34
  } catch (error) {
46
35
  return null;