@pear-protocol/core-sdk 1.2.0 → 1.4.0
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/core/index.d.ts +1373 -1
- package/dist/core/index.js +56 -0
- package/package.json +2 -2
package/dist/core/index.js
CHANGED
|
@@ -113,6 +113,34 @@ class Core {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
+
ladders = {
|
|
117
|
+
list: async (query, headers) => {
|
|
118
|
+
return await this.client.fetch(`/ladders`, {
|
|
119
|
+
method: "GET",
|
|
120
|
+
headers,
|
|
121
|
+
query
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
create: async (body, headers) => {
|
|
125
|
+
return await this.client.fetch(`/ladders`, {
|
|
126
|
+
method: "POST",
|
|
127
|
+
headers,
|
|
128
|
+
body
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
get: async (ladderId, headers) => {
|
|
132
|
+
return await this.client.fetch(`/ladders/${ladderId}`, {
|
|
133
|
+
method: "GET",
|
|
134
|
+
headers
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
cancel: async (ladderId, headers) => {
|
|
138
|
+
return await this.client.fetch(`/ladders/${ladderId}/cancel`, {
|
|
139
|
+
method: "POST",
|
|
140
|
+
headers
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
116
144
|
instruments = {
|
|
117
145
|
list: async (query, headers) => {
|
|
118
146
|
return await this.client.fetch(`/instruments`, {
|
|
@@ -225,6 +253,34 @@ class Core {
|
|
|
225
253
|
});
|
|
226
254
|
}
|
|
227
255
|
};
|
|
256
|
+
savedBaskets = {
|
|
257
|
+
list: async (headers) => {
|
|
258
|
+
return await this.client.fetch(`/saved-baskets`, {
|
|
259
|
+
method: "GET",
|
|
260
|
+
headers
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
create: async (body, headers) => {
|
|
264
|
+
return await this.client.fetch(`/saved-baskets`, {
|
|
265
|
+
method: "POST",
|
|
266
|
+
headers,
|
|
267
|
+
body
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
update: async (id, body, headers) => {
|
|
271
|
+
return await this.client.fetch(`/saved-baskets/${id}`, {
|
|
272
|
+
method: "PATCH",
|
|
273
|
+
headers,
|
|
274
|
+
body
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
delete: async (id, headers) => {
|
|
278
|
+
return await this.client.fetch(`/saved-baskets/${id}`, {
|
|
279
|
+
method: "DELETE",
|
|
280
|
+
headers
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
};
|
|
228
284
|
schedules = {
|
|
229
285
|
list: async (query, headers) => {
|
|
230
286
|
return await this.client.fetch(`/schedules`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pear-protocol/types": "^1.
|
|
28
|
+
"@pear-protocol/types": "^1.4.0",
|
|
29
29
|
"@pear-protocol/utils": "^0.0.23",
|
|
30
30
|
"qs": "^6.14.0"
|
|
31
31
|
},
|