@gardenfi/orderbook 2.2.0 → 2.2.1-beta.2
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/index2.cjs +1 -1
- package/dist/index2.js +4 -5
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +21 -22
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +6 -187
- package/dist/src/lib/asset.d.ts +1 -0
- package/dist/src/lib/orderbook/orderbook.d.ts +1 -2
- package/dist/src/lib/orderbook/orderbook.types.d.ts +1 -2
- package/dist/src/lib/orders/orders.types.d.ts +1 -1
- package/dist/src/lib/orders/ordersProvider.d.ts +1 -2
- package/package.json +2 -2
- package/dist/index7.cjs +0 -1
- package/dist/index7.js +0 -9
package/dist/index2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@gardenfi/utils"),l=require("./index6.cjs");class h{constructor(n){this.Url=n}async createOrder(n,o){const e=await o.getAuthHeaders();if(e.error)return r.Err(e.error);try{const t=await r.Fetcher.post(this.Url.endpoint("/relayer").endpoint("create-order"),{body:JSON.stringify(n),headers:{...e.val,"Content-Type":"application/json"}});return t.error?r.Err(t.error):t.result?r.Ok(t.result):r.Err("CreateOrder: Unexpected error, result is undefined")}catch(t){return r.Err("CreateOrder Err:",String(t))}}async getOrder(n,o){const e=o?`/id/${n}/matched`:`/id/${n}/unmatched`,t=this.Url.endpoint("orders").endpoint(e);try{const s=await r.Fetcher.get(t);return s.error?r.Err(s.error):s.result?r.Ok(s.result):r.Err("GetOrder: Unexpected error, result is undefined")}catch(s){return r.Err("GetOrder:",String(s))}}async getMatchedOrders(n,o,e){const t=l.ConstructUrl(this.Url.endpoint("orders"),`/user/${n}/matched`,{...e,status:o});try{const s=await r.Fetcher.get(t);return s.error?r.Err(s.error):s.result?r.Ok(s.result):r.Err("GetMatchedOrders: Unexpected error, result is undefined")}catch(s){return r.Err("GetMatchedOrders:",String(s))}}async getUnMatchedOrders(n,o){const e=l.ConstructUrl(this.Url.endpoint("orders"),`/user/${n}/unmatched`,o);try{const t=await r.Fetcher.get(e);return t.error?r.Err(t.error):t.result?r.Ok(t.result):r.Err("GetUnMatchedOrders: Unexpected error, result is undefined")}catch(t){return r.Err("GetUnMatchedOrders:",String(t))}}async getOrders(n,o,e,t,s,u){const a=n?"/matched":"/unmatched",d={};o&&(d.page=o.page,d.per_page=o.per_page),e&&(d.address=e),t&&(d.tx_hash=t),s&&(d.from_chain=s),u&&(d.to_chain=u);const i=l.ConstructUrl(this.Url.endpoint("orders"),a,d);try{const c=await r.Fetcher.get(i);return c.error?r.Err(c.error):c.result?r.Ok(c.result):r.Err("GetAllOrders: Unexpected error, result is undefined")}catch(c){return r.Err("GetAllOrders:",String(c))}}async subscribeOrders(n,o,e,t,s="all",u){let a=!1;const d=async()=>{if(!a){a=!0;try{const c=o?await this.getMatchedOrders(n,s,u):await this.getUnMatchedOrders(n,u);c.ok?await t(c.val):console.error("Error fetching orders:",c.error)}catch(c){console.error("Error fetching orders:",c)}finally{a=!1}}};await d();const i=setInterval(d,e);return()=>{clearInterval(i)}}async getOrdersCount(n){const o=this.Url.endpoint("orders").endpoint(`/user/${n}/count`);try{const e=await r.Fetcher.get(o);return e.error?r.Err(e.error):e.status===r.ApiStatus.Ok&&e.result!==void 0?r.Ok(e.result):r.Err("GetOrdersCount: Unexpected error, result is undefined")}catch(e){return r.Err("GetOrdersCount:",String(e))}}}exports.Orderbook=h;
|
package/dist/index2.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Err as t, Fetcher as a, Ok as i } from "
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
class m {
|
|
1
|
+
import { Err as t, Fetcher as a, Ok as i, ApiStatus as f } from "@gardenfi/utils";
|
|
2
|
+
import { ConstructUrl as p } from "./index6.js";
|
|
3
|
+
class U {
|
|
5
4
|
constructor(n) {
|
|
6
5
|
this.Url = n;
|
|
7
6
|
}
|
|
@@ -118,5 +117,5 @@ class m {
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
export {
|
|
121
|
-
|
|
120
|
+
U as Orderbook
|
|
122
121
|
};
|
package/dist/index4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@gardenfi/utils"),d=require("./index6.cjs");class h{constructor(s){this.url=new r.Url("/orders",s)}async getOrder(s,c){const t=c?`/id/matched/${s}`:`/id/unmatched/${s}`,n=this.url.endpoint(t);try{const e=await r.Fetcher.get(n);return e.error?r.Err(e.error):e.result?r.Ok(e.result):r.Err("GetOrder: Unexpected error, result is undefined")}catch(e){return r.Err("GetOrder:",String(e))}}async getMatchedOrders(s,c,t){const n=d.ConstructUrl(this.url,`/user/matched/${s}`,{...t,pending:c});try{const e=await r.Fetcher.get(n);return e.error?r.Err(e.error):e.result?r.Ok(e.result):r.Err("GetMatchedOrders: Unexpected error, result is undefined")}catch(e){return r.Err("GetMatchedOrders:",String(e))}}async getUnMatchedOrders(s,c){const t=d.ConstructUrl(this.url,`/user/unmatched/${s}`,c);try{const n=await r.Fetcher.get(t);return n.error?r.Err(n.error):n.result?r.Ok(n.result):r.Err("GetUnMatchedOrders: Unexpected error, result is undefined")}catch(n){return r.Err("GetUnMatchedOrders:",String(n))}}async getOrders(s,c){const t=s?"/matched":"/unmatched",n=d.ConstructUrl(this.url,t,c);try{const e=await r.Fetcher.get(n);return e.error?r.Err(e.error):e.result?r.Ok(e.result):r.Err("GetAllOrders: Unexpected error, result is undefined")}catch(e){return r.Err("GetAllOrders:",String(e))}}async subscribeOrders(s,c,t,n,e=!1,i){let o=!1;const a=async()=>{if(!o){o=!0;try{const u=c?await this.getMatchedOrders(s,e,i):await this.getUnMatchedOrders(s,i);u.ok?await n(u.val):console.error("Error fetching orders:",u.error)}catch(u){console.error("Error fetching orders:",u)}finally{o=!1}}};await a();const l=setInterval(a,t);return()=>{clearInterval(l)}}async getOrdersCount(s){const c=this.url.endpoint(`/user/count/${s}`);try{const t=await r.Fetcher.get(c);return t.error?r.Err(t.error):t.status===r.ApiStatus.Ok&&t.result!==void 0?r.Ok(t.result):r.Err("GetOrdersCount: Unexpected error, result is undefined")}catch(t){return r.Err("GetOrdersCount:",String(t))}}}exports.OrdersProvider=h;
|
package/dist/index4.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Fetcher as u, Err as s, Ok as d } from "
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
class w {
|
|
1
|
+
import { Url as f, Fetcher as u, Err as s, Ok as d, ApiStatus as g } from "@gardenfi/utils";
|
|
2
|
+
import { ConstructUrl as i } from "./index6.js";
|
|
3
|
+
class m {
|
|
5
4
|
constructor(t) {
|
|
6
5
|
this.url = new f("/orders", t);
|
|
7
6
|
}
|
|
8
|
-
async getOrder(t,
|
|
9
|
-
const e =
|
|
7
|
+
async getOrder(t, c) {
|
|
8
|
+
const e = c ? `/id/matched/${t}` : `/id/unmatched/${t}`, n = this.url.endpoint(e);
|
|
10
9
|
try {
|
|
11
10
|
const r = await u.get(n);
|
|
12
11
|
return r.error ? s(r.error) : r.result ? d(r.result) : s("GetOrder: Unexpected error, result is undefined");
|
|
@@ -14,10 +13,10 @@ class w {
|
|
|
14
13
|
return s("GetOrder:", String(r));
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
async getMatchedOrders(t,
|
|
16
|
+
async getMatchedOrders(t, c, e) {
|
|
18
17
|
const n = i(this.url, `/user/matched/${t}`, {
|
|
19
18
|
...e,
|
|
20
|
-
pending:
|
|
19
|
+
pending: c
|
|
21
20
|
});
|
|
22
21
|
try {
|
|
23
22
|
const r = await u.get(
|
|
@@ -28,11 +27,11 @@ class w {
|
|
|
28
27
|
return s("GetMatchedOrders:", String(r));
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
async getUnMatchedOrders(t,
|
|
30
|
+
async getUnMatchedOrders(t, c) {
|
|
32
31
|
const e = i(
|
|
33
32
|
this.url,
|
|
34
33
|
`/user/unmatched/${t}`,
|
|
35
|
-
|
|
34
|
+
c
|
|
36
35
|
);
|
|
37
36
|
try {
|
|
38
37
|
const n = await u.get(
|
|
@@ -43,8 +42,8 @@ class w {
|
|
|
43
42
|
return s("GetUnMatchedOrders:", String(n));
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
async getOrders(t,
|
|
47
|
-
const e = t ? "/matched" : "/unmatched", n = i(this.url, e,
|
|
45
|
+
async getOrders(t, c) {
|
|
46
|
+
const e = t ? "/matched" : "/unmatched", n = i(this.url, e, c);
|
|
48
47
|
try {
|
|
49
48
|
const r = await u.get(n);
|
|
50
49
|
return r.error ? s(r.error) : r.result ? d(r.result) : s("GetAllOrders: Unexpected error, result is undefined");
|
|
@@ -52,18 +51,18 @@ class w {
|
|
|
52
51
|
return s("GetAllOrders:", String(r));
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
async subscribeOrders(t,
|
|
54
|
+
async subscribeOrders(t, c, e, n, r = !1, l) {
|
|
56
55
|
let a = !1;
|
|
57
56
|
const h = async () => {
|
|
58
57
|
if (!a) {
|
|
59
58
|
a = !0;
|
|
60
59
|
try {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
) : console.error("Error fetching orders:",
|
|
65
|
-
} catch (
|
|
66
|
-
console.error("Error fetching orders:",
|
|
60
|
+
const o = c ? await this.getMatchedOrders(t, r, l) : await this.getUnMatchedOrders(t, l);
|
|
61
|
+
o.ok ? await n(
|
|
62
|
+
o.val
|
|
63
|
+
) : console.error("Error fetching orders:", o.error);
|
|
64
|
+
} catch (o) {
|
|
65
|
+
console.error("Error fetching orders:", o);
|
|
67
66
|
} finally {
|
|
68
67
|
a = !1;
|
|
69
68
|
}
|
|
@@ -76,9 +75,9 @@ class w {
|
|
|
76
75
|
};
|
|
77
76
|
}
|
|
78
77
|
async getOrdersCount(t) {
|
|
79
|
-
const
|
|
78
|
+
const c = this.url.endpoint(`/user/count/${t}`);
|
|
80
79
|
try {
|
|
81
|
-
const e = await u.get(
|
|
80
|
+
const e = await u.get(c);
|
|
82
81
|
return e.error ? s(e.error) : e.status === g.Ok && e.result !== void 0 ? d(e.result) : s("GetOrdersCount: Unexpected error, result is undefined");
|
|
83
82
|
} catch (e) {
|
|
84
83
|
return s("GetOrdersCount:", String(e));
|
|
@@ -86,5 +85,5 @@ class w {
|
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
export {
|
|
89
|
-
|
|
88
|
+
m as OrdersProvider
|
|
90
89
|
};
|
package/dist/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(n,o,t)=>{const r=n.endpoint(o);return t&&Object.entries(t).forEach(([c,e])=>{e!==void 0&&r.searchParams.append(c,e.toString())}),r};exports.ConstructUrl=i;
|
package/dist/index6.js
CHANGED
|
@@ -1,190 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
7
|
-
t instanceof WeakSet ? t.add(e) : t.set(e, a);
|
|
8
|
-
}, w = (e, t, a, r) => (p(e, t, "write to private field"), t.set(e, a), a);
|
|
9
|
-
const d = (e) => new Promise((t) => setTimeout(t, e));
|
|
10
|
-
class g {
|
|
11
|
-
/**
|
|
12
|
-
* @param {number} maxRetries - The maximum number of retries, if less < 0 then it is set to 0
|
|
13
|
-
* @param {number} delay - The delay between retries
|
|
14
|
-
*/
|
|
15
|
-
constructor(t, a) {
|
|
16
|
-
this.maxRetries = Math.max(t, 0), this.delay = a;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retries a function until it succeeds or the max number of retries is reached
|
|
20
|
-
*
|
|
21
|
-
* @param {() => Promise<T>} fn - The function to retry
|
|
22
|
-
* @return {Promise<T>} a Promise that resolves to the result of the function
|
|
23
|
-
*/
|
|
24
|
-
async retry(t) {
|
|
25
|
-
let a = 0, r;
|
|
26
|
-
for (; a < this.maxRetries + 1; )
|
|
27
|
-
try {
|
|
28
|
-
return await t();
|
|
29
|
-
} catch (i) {
|
|
30
|
-
a++, r = i, await d(this.delay * a);
|
|
31
|
-
}
|
|
32
|
-
throw r;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const v = (e) => {
|
|
36
|
-
try {
|
|
37
|
-
return JSON.parse(e);
|
|
38
|
-
} catch {
|
|
39
|
-
return e;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
class m {
|
|
43
|
-
static async _postWithFallback(t, a) {
|
|
44
|
-
let r = "";
|
|
45
|
-
for (const i of t)
|
|
46
|
-
try {
|
|
47
|
-
const s = await fetch(i, {
|
|
48
|
-
method: "POST",
|
|
49
|
-
...a
|
|
50
|
-
});
|
|
51
|
-
if (s.status >= 500) {
|
|
52
|
-
r = await (s.text() || s.json());
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
return await this.parse(s);
|
|
56
|
-
} catch (s) {
|
|
57
|
-
r = y(s);
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
throw new Error(r || "All APIs failed");
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Asynchronously sends a POST request to multiple URLs with fallback logic.
|
|
64
|
-
*
|
|
65
|
-
* @param {string[]} input - array of URLs to send the POST request to
|
|
66
|
-
* @param {RequestInit} [init] - optional request initialization options
|
|
67
|
-
* @return {Promise<T>} a Promise that resolves to the parsed response data
|
|
68
|
-
*/
|
|
69
|
-
static async postWithFallback(t, a) {
|
|
70
|
-
return await n(a).retry(
|
|
71
|
-
() => this._postWithFallback(t, a)
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
static async _getWithFallback(t, a) {
|
|
75
|
-
let r = "";
|
|
76
|
-
for (const i of t)
|
|
77
|
-
try {
|
|
78
|
-
const s = await fetch(i, a);
|
|
79
|
-
if (s.status >= 500) {
|
|
80
|
-
r = await (s.text() || s.json());
|
|
81
|
-
continue;
|
|
82
|
-
}
|
|
83
|
-
return await this.parse(s);
|
|
84
|
-
} catch (s) {
|
|
85
|
-
r = y(s);
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
throw new Error(r || "All APIs failed");
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Asynchronously sends a POST request to multiple URLs with fallback mechanism.
|
|
92
|
-
*
|
|
93
|
-
* @param {string[]} input - An array of URLs to retrieve data from.
|
|
94
|
-
* @param {RequestInit} [init] - Optional request options.
|
|
95
|
-
* @return {Promise<T>} A promise that resolves to the retrieved data.
|
|
96
|
-
*/
|
|
97
|
-
static async getWithFallback(t, a) {
|
|
98
|
-
return await n(a).retry(
|
|
99
|
-
() => this._getWithFallback(t, a)
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
static async _get(t, a) {
|
|
103
|
-
return await this.parse(await fetch(t, a));
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Asynchronously retrieves data of type T from the specified URL or RequestInfo, with optional initialization options.
|
|
107
|
-
*
|
|
108
|
-
* @param {RequestInfo | URL} input - The URL or RequestInfo to fetch data from
|
|
109
|
-
* @param {RequestInit} init - Optional initialization options for the fetch request
|
|
110
|
-
* @return {Promise<T>} The retrieved data of type T
|
|
111
|
-
*/
|
|
112
|
-
static async get(t, a) {
|
|
113
|
-
return await n(a).retry(() => this._get(t, a));
|
|
114
|
-
}
|
|
115
|
-
static async _post(t, a) {
|
|
116
|
-
return await this.parse(
|
|
117
|
-
await fetch(t, {
|
|
118
|
-
method: "POST",
|
|
119
|
-
...a
|
|
120
|
-
})
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Asynchronously sends a POST request to the specified URL or RequestInfo, with optional initialization options.
|
|
125
|
-
*/
|
|
126
|
-
static async post(t, a) {
|
|
127
|
-
return await n(a).retry(() => this._post(t, a));
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Parses the response and returns the result as the specified type.
|
|
131
|
-
*
|
|
132
|
-
* @param {Response} res - the response object to be parsed
|
|
133
|
-
* @return {Promise<T>} the parsed result of type T
|
|
134
|
-
*/
|
|
135
|
-
static async parse(t) {
|
|
136
|
-
const a = await t.text();
|
|
137
|
-
if (t.status >= 200 && t.status < 300)
|
|
138
|
-
return v(a);
|
|
139
|
-
throw new Error(a);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function y(e) {
|
|
143
|
-
return (e == null ? void 0 : e.message) || (e == null ? void 0 : e.toString()) || "unknown error";
|
|
144
|
-
}
|
|
145
|
-
const n = (e) => new g((e == null ? void 0 : e.retryCount) ?? 2, (e == null ? void 0 : e.retryDelay) ?? 1e3);
|
|
146
|
-
var o, c, l;
|
|
147
|
-
class f {
|
|
148
|
-
constructor(t, a, r = void 0) {
|
|
149
|
-
u(this, o, void 0), u(this, c, void 0), u(this, l, void 0), w(this, o, t), w(this, l, r), w(this, c, a);
|
|
150
|
-
}
|
|
151
|
-
get ok() {
|
|
152
|
-
return h(this, o);
|
|
153
|
-
}
|
|
154
|
-
get error() {
|
|
155
|
-
return h(this, l);
|
|
156
|
-
}
|
|
157
|
-
get val() {
|
|
158
|
-
return h(this, c);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
o = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap();
|
|
162
|
-
const k = (e) => new f(!0, e), W = (e, ...t) => {
|
|
163
|
-
if (typeof e == "string" && t && t.length > 0) {
|
|
164
|
-
let a = [e, ...t].map((r) => {
|
|
165
|
-
if (r) {
|
|
166
|
-
if (r instanceof Error)
|
|
167
|
-
return r.message;
|
|
168
|
-
if (typeof r == "string")
|
|
169
|
-
return r;
|
|
170
|
-
if (r != null && r.toString)
|
|
171
|
-
return r.toString();
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
return new f(
|
|
175
|
-
!1,
|
|
176
|
-
null,
|
|
177
|
-
a.filter((r) => r !== void 0).join(" ")
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
return new f(!1, null, e);
|
|
1
|
+
const i = (o, e, t) => {
|
|
2
|
+
const r = o.endpoint(e);
|
|
3
|
+
return t && Object.entries(t).forEach(([c, n]) => {
|
|
4
|
+
n !== void 0 && r.searchParams.append(c, n.toString());
|
|
5
|
+
}), r;
|
|
181
6
|
};
|
|
182
7
|
export {
|
|
183
|
-
|
|
184
|
-
m as Fetcher,
|
|
185
|
-
k as Ok,
|
|
186
|
-
f as Result,
|
|
187
|
-
g as Retry,
|
|
188
|
-
v as safeParseJson,
|
|
189
|
-
d as sleep
|
|
8
|
+
i as ConstructUrl
|
|
190
9
|
};
|
package/dist/src/lib/asset.d.ts
CHANGED
|
@@ -72,3 +72,4 @@ export declare const getTimeLock: (chain: Chain) => number;
|
|
|
72
72
|
export declare const NativeTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
73
73
|
export declare const isEvmNativeToken: (chain: Chain, tokenAddress: string) => boolean;
|
|
74
74
|
export declare const isSolanaNativeToken: (chain: Chain, tokenAddress: string) => boolean;
|
|
75
|
+
export declare const isNativeToken: (asset: Asset) => boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AsyncResult } from '@catalogfi/utils';
|
|
2
1
|
import { CreateOrder, CreateOrderRequestWithAdditionalData, IOrderbook, MatchedOrder, PaginatedData, PaginationConfig, Status } from './orderbook.types';
|
|
3
|
-
import { IAuth, Url } from '@gardenfi/utils';
|
|
2
|
+
import { AsyncResult, IAuth, Url } from '@gardenfi/utils';
|
|
4
3
|
import { Chain } from '../asset';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AsyncResult } from '@catalogfi/utils';
|
|
2
1
|
import { IOrderProvider } from './orders.types';
|
|
3
2
|
import { CreateOrder, MatchedOrder, PaginatedData, PaginationConfig } from '../orderbook/orderbook.types';
|
|
4
|
-
import { Url } from '@gardenfi/utils';
|
|
3
|
+
import { AsyncResult, Url } from '@gardenfi/utils';
|
|
5
4
|
|
|
6
5
|
export declare class OrdersProvider implements IOrderProvider {
|
|
7
6
|
private url;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gardenfi/orderbook",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@coral-xyz/anchor": "^0.30.1",
|
|
30
|
-
"@gardenfi/utils": "2.2.
|
|
30
|
+
"@gardenfi/utils": "2.2.1-beta.2",
|
|
31
31
|
"bufferutil": "^4.0.8",
|
|
32
32
|
"siwe": "^2.1.4",
|
|
33
33
|
"utf-8-validate": "^6.0.3",
|
package/dist/index7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(n,o,t)=>{const r=n.endpoint(o);return t&&Object.entries(t).forEach(([c,e])=>{e!==void 0&&r.searchParams.append(c,e.toString())}),r};exports.ConstructUrl=i;
|