@vleap/warps-adapter-fastset 0.1.0-beta.43 → 0.1.0-beta.45
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.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -633,7 +633,7 @@ var _BcsType = class _BcsType2 {
|
|
|
633
633
|
_write = /* @__PURE__ */ new WeakMap();
|
|
634
634
|
_serialize = /* @__PURE__ */ new WeakMap();
|
|
635
635
|
var BcsType = _BcsType;
|
|
636
|
-
var SERIALIZED_BCS_BRAND = Symbol.for("@mysten/serialized-bcs");
|
|
636
|
+
var SERIALIZED_BCS_BRAND = /* @__PURE__ */ Symbol.for("@mysten/serialized-bcs");
|
|
637
637
|
var SerializedBcs = class {
|
|
638
638
|
constructor(schema, bytes) {
|
|
639
639
|
__privateAdd(this, _schema);
|
|
@@ -1401,12 +1401,23 @@ var FastsetClient = class {
|
|
|
1401
1401
|
this.proxyUrl = proxyUrl;
|
|
1402
1402
|
}
|
|
1403
1403
|
async request(url, method, params) {
|
|
1404
|
-
const
|
|
1404
|
+
const requestId = id++;
|
|
1405
|
+
const request = this.buildJsonRpcRequest(requestId, method, params);
|
|
1405
1406
|
const headers = { "Content-Type": "application/json" };
|
|
1406
1407
|
const body = this.jsonSerialize(request);
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1408
|
+
try {
|
|
1409
|
+
const response = await fetch(url, { method: "POST", headers, body });
|
|
1410
|
+
if (!response.ok) {
|
|
1411
|
+
return { jsonrpc: "2.0", id: requestId, error: { code: response.status, message: response.statusText } };
|
|
1412
|
+
}
|
|
1413
|
+
try {
|
|
1414
|
+
return await response.json();
|
|
1415
|
+
} catch {
|
|
1416
|
+
return { jsonrpc: "2.0", id: requestId, error: { code: -32700, message: "Parse error" } };
|
|
1417
|
+
}
|
|
1418
|
+
} catch {
|
|
1419
|
+
return { jsonrpc: "2.0", id: requestId, error: { code: -32603, message: "Internal error" } };
|
|
1420
|
+
}
|
|
1410
1421
|
}
|
|
1411
1422
|
buildJsonRpcRequest(id2, method, params) {
|
|
1412
1423
|
return { jsonrpc: "2.0", id: id2, method, params };
|
|
@@ -1850,7 +1861,8 @@ var WarpFastsetOutput = class {
|
|
|
1850
1861
|
values: { string: stringValues, native: rawValues, mapped: {} },
|
|
1851
1862
|
output: {},
|
|
1852
1863
|
messages: {},
|
|
1853
|
-
destination: null
|
|
1864
|
+
destination: null,
|
|
1865
|
+
resolvedInputs: []
|
|
1854
1866
|
};
|
|
1855
1867
|
}
|
|
1856
1868
|
async extractQueryOutput(warp, typedValues, actionIndex, inputs) {
|