@pear-protocol/core-sdk 1.17.2 → 1.17.3

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.
@@ -52,6 +52,22 @@ declare class Auth {
52
52
  loginMethod: "email" | "evm_wallet" | "oauth" | "x";
53
53
  };
54
54
  }>;
55
+ /**
56
+ * Show or hide the authenticated user's X account on the leaderboard.
57
+ *
58
+ * Hiding withholds the handle, name and avatar from every viewer while keeping the
59
+ * account linked, so signing in through X keeps working.
60
+ *
61
+ * Pass the state you want, not a flip, so a retry after a dropped response is harmless
62
+ * and two open tabs cannot disagree. `xHidden` is spelled the same here as on the user
63
+ * profile, which is where you read the current state from.
64
+ *
65
+ * No linked X account is needed: the setting belongs to the user and outlives the link,
66
+ * so hiding first and linking afterwards never publishes the handle at all.
67
+ */
68
+ setXVisibility(body: HttpTypes.SetXVisibilityRequest, headers?: ClientHeaders): Promise<{
69
+ xHidden: boolean;
70
+ }>;
55
71
  /**
56
72
  * Unlink the authenticated user's X account. Removes the public handle immediately.
57
73
  */
@@ -72,6 +72,26 @@ class Auth {
72
72
  });
73
73
  }
74
74
  /**
75
+ * Show or hide the authenticated user's X account on the leaderboard.
76
+ *
77
+ * Hiding withholds the handle, name and avatar from every viewer while keeping the
78
+ * account linked, so signing in through X keeps working.
79
+ *
80
+ * Pass the state you want, not a flip, so a retry after a dropped response is harmless
81
+ * and two open tabs cannot disagree. `xHidden` is spelled the same here as on the user
82
+ * profile, which is where you read the current state from.
83
+ *
84
+ * No linked X account is needed: the setting belongs to the user and outlives the link,
85
+ * so hiding first and linking afterwards never publishes the handle at all.
86
+ */
87
+ async setXVisibility(body, headers) {
88
+ return await this.client.fetch(`/auth/link/x/visibility`, {
89
+ method: "PATCH",
90
+ headers,
91
+ body
92
+ });
93
+ }
94
+ /**
75
95
  * Unlink the authenticated user's X account. Removes the public handle immediately.
76
96
  */
77
97
  async disconnectX(headers) {
@@ -5090,6 +5090,7 @@ declare class Core {
5090
5090
  xHandle: string | null;
5091
5091
  xName: string | null;
5092
5092
  xAvatarUrl: string | null;
5093
+ xHidden: boolean;
5093
5094
  };
5094
5095
  preferences: {
5095
5096
  slippageToleranceBps: number;
@@ -5126,6 +5127,15 @@ declare class Core {
5126
5127
  createAuthToken: (body: HttpTypes.CreateAuthTokenParams, headers?: ClientHeaders) => Promise<{
5127
5128
  token: string;
5128
5129
  }>;
5130
+ /** Prepares a fast USDC withdrawal for L1 wallet authorization. */
5131
+ prepareFastWithdraw: (body: HttpTypes.PrepareLighterFastWithdrawParams, headers?: ClientHeaders) => Promise<{
5132
+ messageToSign: string;
5133
+ txInfo: string;
5134
+ }>;
5135
+ /** Submits a wallet-authorized fast USDC withdrawal. */
5136
+ submitFastWithdraw: (body: HttpTypes.SubmitLighterFastWithdrawParams, headers?: ClientHeaders) => Promise<{
5137
+ txHash: string;
5138
+ }>;
5129
5139
  };
5130
5140
  };
5131
5141
  statistics: {
@@ -660,7 +660,23 @@ class Core {
660
660
  headers,
661
661
  body
662
662
  });
663
- }, "createAuthToken")
663
+ }, "createAuthToken"),
664
+ /** Prepares a fast USDC withdrawal for L1 wallet authorization. */
665
+ prepareFastWithdraw: /* @__PURE__ */ __name(async (body, headers) => {
666
+ return await this.client.fetch(`/misc/lighter/prepare-fast-withdraw`, {
667
+ method: "POST",
668
+ headers,
669
+ body
670
+ });
671
+ }, "prepareFastWithdraw"),
672
+ /** Submits a wallet-authorized fast USDC withdrawal. */
673
+ submitFastWithdraw: /* @__PURE__ */ __name(async (body, headers) => {
674
+ return await this.client.fetch(`/misc/lighter/submit-fast-withdraw`, {
675
+ method: "POST",
676
+ headers,
677
+ body
678
+ });
679
+ }, "submitFastWithdraw")
664
680
  }
665
681
  };
666
682
  statistics = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "1.17.2",
3
+ "version": "1.17.3",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@pear-protocol/types": "^1.25.0",
29
+ "@pear-protocol/types": "^1.26.0",
30
30
  "@pear-protocol/utils": "^0.5.2",
31
31
  "qs": "^6.14.0"
32
32
  },