@pear-protocol/core-sdk 0.0.17 → 0.0.18

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.
@@ -18,6 +18,8 @@ declare class Core {
18
18
  agentWalletAddress: string;
19
19
  isSubaccount: boolean;
20
20
  mainAccountAddress: string;
21
+ } | {
22
+ l1_address: string;
21
23
  } | undefined;
22
24
  deletedAt?: string | undefined;
23
25
  }[];
@@ -34,6 +36,8 @@ declare class Core {
34
36
  agentWalletAddress: string;
35
37
  isSubaccount: boolean;
36
38
  mainAccountAddress: string;
39
+ } | {
40
+ l1_address: string;
37
41
  } | undefined;
38
42
  deletedAt?: string | undefined;
39
43
  };
@@ -50,6 +54,8 @@ declare class Core {
50
54
  agentWalletAddress: string;
51
55
  isSubaccount: boolean;
52
56
  mainAccountAddress: string;
57
+ } | {
58
+ l1_address: string;
53
59
  } | undefined;
54
60
  deletedAt?: string | undefined;
55
61
  };
@@ -85,6 +91,12 @@ declare class Core {
85
91
  api_secret: string;
86
92
  api_pass: string;
87
93
  };
94
+ } | {
95
+ connector: "lighter";
96
+ credentials: {
97
+ api_private_key: string;
98
+ api_key_index: number;
99
+ };
88
100
  }>;
89
101
  restore: (id: string, headers?: ClientHeaders) => Promise<void>;
90
102
  };
@@ -1846,6 +1858,30 @@ declare class Core {
1846
1858
  };
1847
1859
  }>;
1848
1860
  };
1861
+ misc: {
1862
+ lighter: {
1863
+ createApiKey: (body: HttpTypes.CreateLighterApiKeyParams, headers?: ClientHeaders) => Promise<{
1864
+ privateKey: string;
1865
+ publicKey: string;
1866
+ apiKeyIndex: number;
1867
+ messageToSign: string;
1868
+ txInfo: string;
1869
+ }>;
1870
+ changePubKey: (body: HttpTypes.SubmitChangePubKeyParams, headers?: ClientHeaders) => Promise<{
1871
+ txHash: string;
1872
+ }>;
1873
+ prepareApproveIntegrator: (body: HttpTypes.PrepareApproveIntegratorParams, headers?: ClientHeaders) => Promise<{
1874
+ messageToSign: string;
1875
+ txInfo: string;
1876
+ }>;
1877
+ submitApproveIntegrator: (body: HttpTypes.SubmitApproveIntegratorParams, headers?: ClientHeaders) => Promise<{
1878
+ txHash: string;
1879
+ }>;
1880
+ createAuthToken: (body: HttpTypes.CreateAuthTokenParams, headers?: ClientHeaders) => Promise<{
1881
+ token: string;
1882
+ }>;
1883
+ };
1884
+ };
1849
1885
  statistics: {
1850
1886
  daily: (query: HttpTypes.DailyStatisticsQueryParamsInput, headers?: ClientHeaders) => Promise<{
1851
1887
  data: {
@@ -226,6 +226,51 @@ class Core {
226
226
  });
227
227
  }
228
228
  };
229
+ misc = {
230
+ lighter: {
231
+ createApiKey: async (body, headers) => {
232
+ return await this.client.fetch(`/misc/lighter/create-api-key`, {
233
+ method: "POST",
234
+ headers,
235
+ body
236
+ });
237
+ },
238
+ changePubKey: async (body, headers) => {
239
+ return await this.client.fetch(`/misc/lighter/change-pub-key`, {
240
+ method: "POST",
241
+ headers,
242
+ body
243
+ });
244
+ },
245
+ prepareApproveIntegrator: async (body, headers) => {
246
+ return await this.client.fetch(
247
+ `/misc/lighter/prepare-approve-integrator`,
248
+ {
249
+ method: "POST",
250
+ headers,
251
+ body
252
+ }
253
+ );
254
+ },
255
+ submitApproveIntegrator: async (body, headers) => {
256
+ return await this.client.fetch(
257
+ `/misc/lighter/submit-approve-integrator`,
258
+ {
259
+ method: "POST",
260
+ headers,
261
+ body
262
+ }
263
+ );
264
+ },
265
+ createAuthToken: async (body, headers) => {
266
+ return await this.client.fetch(`/misc/lighter/create-auth-token`, {
267
+ method: "POST",
268
+ headers,
269
+ body
270
+ });
271
+ }
272
+ }
273
+ };
229
274
  statistics = {
230
275
  daily: async (query, headers) => {
231
276
  return await this.client.fetch(`/statistics/daily`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@pear-protocol/types": "0.0.15",
29
- "@pear-protocol/utils": "0.0.15",
28
+ "@pear-protocol/types": "0.0.16",
29
+ "@pear-protocol/utils": "0.0.16",
30
30
  "qs": "^6.14.0"
31
31
  },
32
32
  "devDependencies": {