@sats-connect/core 0.0.3-9ea8b00 → 0.0.3-aae39fb
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/index.mjs +24 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -25,12 +25,6 @@ var RunesApi = class {
|
|
|
25
25
|
baseURL: `${RUNES_API_BASE_URL(network)}`
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
parseError = (error) => {
|
|
29
|
-
return {
|
|
30
|
-
code: error.response?.status,
|
|
31
|
-
message: JSON.stringify(error.response?.data)
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
28
|
estimateMintCost = async (mintParams) => {
|
|
35
29
|
try {
|
|
36
30
|
const response = await this.client.post("/mint/estimate", {
|
|
@@ -42,7 +36,10 @@ var RunesApi = class {
|
|
|
42
36
|
} catch (error) {
|
|
43
37
|
const err = error;
|
|
44
38
|
return {
|
|
45
|
-
error:
|
|
39
|
+
error: {
|
|
40
|
+
code: err.response?.status,
|
|
41
|
+
message: err.response?.data
|
|
42
|
+
}
|
|
46
43
|
};
|
|
47
44
|
}
|
|
48
45
|
};
|
|
@@ -57,7 +54,10 @@ var RunesApi = class {
|
|
|
57
54
|
} catch (error) {
|
|
58
55
|
const err = error;
|
|
59
56
|
return {
|
|
60
|
-
error:
|
|
57
|
+
error: {
|
|
58
|
+
code: err.response?.status,
|
|
59
|
+
message: err.response?.data
|
|
60
|
+
}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
};
|
|
@@ -72,7 +72,10 @@ var RunesApi = class {
|
|
|
72
72
|
} catch (error) {
|
|
73
73
|
const err = error;
|
|
74
74
|
return {
|
|
75
|
-
error:
|
|
75
|
+
error: {
|
|
76
|
+
code: err.response?.status,
|
|
77
|
+
message: err.response?.data
|
|
78
|
+
}
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
};
|
|
@@ -87,7 +90,10 @@ var RunesApi = class {
|
|
|
87
90
|
} catch (error) {
|
|
88
91
|
const err = error;
|
|
89
92
|
return {
|
|
90
|
-
error:
|
|
93
|
+
error: {
|
|
94
|
+
code: err.response?.status,
|
|
95
|
+
message: err.response?.data
|
|
96
|
+
}
|
|
91
97
|
};
|
|
92
98
|
}
|
|
93
99
|
};
|
|
@@ -102,7 +108,10 @@ var RunesApi = class {
|
|
|
102
108
|
} catch (error) {
|
|
103
109
|
const err = error;
|
|
104
110
|
return {
|
|
105
|
-
error:
|
|
111
|
+
error: {
|
|
112
|
+
code: err.response?.status,
|
|
113
|
+
message: err.response?.data
|
|
114
|
+
}
|
|
106
115
|
};
|
|
107
116
|
}
|
|
108
117
|
};
|
|
@@ -117,7 +126,10 @@ var RunesApi = class {
|
|
|
117
126
|
} catch (error) {
|
|
118
127
|
const err = error;
|
|
119
128
|
return {
|
|
120
|
-
error:
|
|
129
|
+
error: {
|
|
130
|
+
code: err.response?.status,
|
|
131
|
+
message: err.response?.data
|
|
132
|
+
}
|
|
121
133
|
};
|
|
122
134
|
}
|
|
123
135
|
};
|