@thruputchain/client 0.28.0 → 0.30.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/README.md +113 -18
- package/dist/actions-B7htk5FS.js +698 -0
- package/dist/actions-B7htk5FS.js.map +1 -0
- package/dist/actions-CIaI049y.cjs +788 -0
- package/dist/actions-CIaI049y.cjs.map +1 -0
- package/dist/actions.cjs +5 -8
- package/dist/actions.d.cts +4 -4
- package/dist/actions.d.ts +4 -4
- package/dist/actions.js +3 -3
- package/dist/{contract-D77iA2iY.js → contract-BOlNskwd.js} +235 -87
- package/dist/contract-BOlNskwd.js.map +1 -0
- package/dist/{contract-DSu2UPPm.cjs → contract-D_vxUudr.cjs} +281 -109
- package/dist/contract-D_vxUudr.cjs.map +1 -0
- package/dist/contract.cjs +1 -5
- package/dist/contract.d.cts +3 -4
- package/dist/contract.d.ts +3 -4
- package/dist/contract.js +2 -2
- package/dist/contracts.cjs +5 -5
- package/dist/contracts.d.cts +6 -74
- package/dist/contracts.d.cts.map +1 -1
- package/dist/contracts.d.ts +6 -74
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +4 -4
- package/dist/decimal-BX7abv5J.cjs +171 -0
- package/dist/decimal-BX7abv5J.cjs.map +1 -0
- package/dist/decimal-CoHOISys.js +124 -0
- package/dist/decimal-CoHOISys.js.map +1 -0
- package/dist/default_wallet-DkqsCa5C.d.ts +90 -0
- package/dist/default_wallet-DkqsCa5C.d.ts.map +1 -0
- package/dist/default_wallet-Dqs4_iTD.d.cts +90 -0
- package/dist/default_wallet-Dqs4_iTD.d.cts.map +1 -0
- package/dist/{dev_wallet-CAbOSrak.cjs → dev_wallet-BVChhV6j.cjs} +85 -6
- package/dist/dev_wallet-BVChhV6j.cjs.map +1 -0
- package/dist/{dev_wallet-CU3RpQLm.js → dev_wallet-D9LuPZ-h.js} +84 -5
- package/dist/dev_wallet-D9LuPZ-h.js.map +1 -0
- package/dist/{execution-J5jkXhV1.d.cts → execution-pSt6k620.d.cts} +23 -50
- package/dist/execution-pSt6k620.d.cts.map +1 -0
- package/dist/{execution-XJ0iwFaX.d.ts → execution-uiuFPV0d.d.ts} +23 -50
- package/dist/execution-uiuFPV0d.d.ts.map +1 -0
- package/dist/{hex-DIcaALXL.js → hex-B8D-jBgz.js} +2 -2
- package/dist/{hex-DIcaALXL.js.map → hex-B8D-jBgz.js.map} +1 -1
- package/dist/{hex-DkGpiZ5e.cjs → hex-CSDZ9d6z.cjs} +2 -2
- package/dist/{hex-DkGpiZ5e.cjs.map → hex-CSDZ9d6z.cjs.map} +1 -1
- package/dist/{index-soFVQX9j.d.cts → index-B1efA-Y_.d.ts} +24 -21
- package/dist/index-B1efA-Y_.d.ts.map +1 -0
- package/dist/{index-C3HVRvQd.d.ts → index-BGmH_Sm7.d.cts} +12 -62
- package/dist/index-BGmH_Sm7.d.cts.map +1 -0
- package/dist/{index-DeS1S0m-.d.ts → index-BmOG68Hd.d.ts} +39 -17
- package/dist/index-BmOG68Hd.d.ts.map +1 -0
- package/dist/{index-B5KqSHeL.d.cts → index-BsvYcU_Y.d.cts} +2 -2
- package/dist/{index-B5KqSHeL.d.cts.map → index-BsvYcU_Y.d.cts.map} +1 -1
- package/dist/{index-CtjZ61tl.d.cts → index-CG-q0j9w.d.ts} +12 -62
- package/dist/index-CG-q0j9w.d.ts.map +1 -0
- package/dist/index-CPtBvHE8.d.ts +145 -0
- package/dist/index-CPtBvHE8.d.ts.map +1 -0
- package/dist/{index-DfmDUk5Y.d.ts → index-DBKsOzCN.d.cts} +24 -21
- package/dist/index-DBKsOzCN.d.cts.map +1 -0
- package/dist/{index-Bb01ytjJ.d.ts → index-Dtv_GV6M.d.ts} +40 -11
- package/dist/index-Dtv_GV6M.d.ts.map +1 -0
- package/dist/{index-CtjWsAXV.d.cts → index-JKm4TBlY.d.cts} +40 -11
- package/dist/index-JKm4TBlY.d.cts.map +1 -0
- package/dist/index-Xre-0Jka.d.cts +145 -0
- package/dist/index-Xre-0Jka.d.cts.map +1 -0
- package/dist/{index-CedOvhGY.d.cts → index-ozfbEuYI.d.cts} +39 -17
- package/dist/index-ozfbEuYI.d.cts.map +1 -0
- package/dist/index.cjs +40 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -17
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +11 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -38
- package/dist/index.js.map +1 -1
- package/dist/provider.cjs +3 -3
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +3 -3
- package/dist/provider.js.map +1 -1
- package/dist/{codec-Bxlt1gKO.js → readError-B3Rz7rgs.js} +359 -56
- package/dist/readError-B3Rz7rgs.js.map +1 -0
- package/dist/{codec-BcK8ASsg.cjs → readError-COcEDNoZ.cjs} +363 -96
- package/dist/readError-COcEDNoZ.cjs.map +1 -0
- package/dist/requestAirdrop-DBCOST2B.d.ts +1818 -0
- package/dist/requestAirdrop-DBCOST2B.d.ts.map +1 -0
- package/dist/requestAirdrop-T1eVn3l5.d.cts +1818 -0
- package/dist/requestAirdrop-T1eVn3l5.d.cts.map +1 -0
- package/dist/sendInvocation-185ZJrta.cjs +583 -0
- package/dist/sendInvocation-185ZJrta.cjs.map +1 -0
- package/dist/sendInvocation-DBaNWhr3.js +439 -0
- package/dist/sendInvocation-DBaNWhr3.js.map +1 -0
- package/dist/signed-op.cjs +2 -2
- package/dist/signed-op.d.cts +2 -2
- package/dist/signed-op.d.ts +1 -1
- package/dist/signed-op.js +2 -2
- package/dist/{signedOp-DAucp6xg.cjs → signedOp-CVyeJ5ig.cjs} +3 -3
- package/dist/{signedOp-DAucp6xg.cjs.map → signedOp-CVyeJ5ig.cjs.map} +1 -1
- package/dist/{signedOp-DpmUpH-e.js → signedOp-D6WYZG9j.js} +3 -3
- package/dist/{signedOp-DpmUpH-e.js.map → signedOp-D6WYZG9j.js.map} +1 -1
- package/dist/{signed_op-_lR85dn2.cjs → signed_op-BBsDKOlD.cjs} +4 -4
- package/dist/{signed_op-_lR85dn2.cjs.map → signed_op-BBsDKOlD.cjs.map} +1 -1
- package/dist/{signed_op-zGq4eBo8.d.ts → signed_op-DHb4n2JO.d.cts} +3 -3
- package/dist/{signed_op-D2usgASc.d.cts.map → signed_op-DHb4n2JO.d.cts.map} +1 -1
- package/dist/{signed_op-D2usgASc.d.cts → signed_op-Dfa8WD0j.d.ts} +3 -3
- package/dist/{signed_op-zGq4eBo8.d.ts.map → signed_op-Dfa8WD0j.d.ts.map} +1 -1
- package/dist/{signed_op-CwN-_CXw.js → signed_op-h9X9-vBL.js} +3 -3
- package/dist/{signed_op-CwN-_CXw.js.map → signed_op-h9X9-vBL.js.map} +1 -1
- package/dist/transport-BhWZxHcz.cjs +528 -0
- package/dist/transport-BhWZxHcz.cjs.map +1 -0
- package/dist/transport-EyDYuibb.js +504 -0
- package/dist/transport-EyDYuibb.js.map +1 -0
- package/dist/transport.cjs +6 -13
- package/dist/transport.d.cts +3 -3
- package/dist/transport.d.ts +3 -3
- package/dist/transport.js +4 -4
- package/dist/types-VYjJcTip.d.cts +161 -0
- package/dist/types-VYjJcTip.d.cts.map +1 -0
- package/dist/types-VYjJcTip.d.ts +161 -0
- package/dist/types-VYjJcTip.d.ts.map +1 -0
- package/dist/{validation-eXATmgO0.js → validation-BLQ64Dfh.js} +3 -3
- package/dist/validation-BLQ64Dfh.js.map +1 -0
- package/dist/{validation-4w-vDGAi.cjs → validation-CZqtmMLJ.cjs} +3 -3
- package/dist/validation-CZqtmMLJ.cjs.map +1 -0
- package/dist/{wallet-BNKgOXrF.js → wallet-NlZiI4-3.js} +161 -77
- package/dist/wallet-NlZiI4-3.js.map +1 -0
- package/dist/{wallet-7R5M_7h4.cjs → wallet-UvyXtxh5.cjs} +161 -77
- package/dist/wallet-UvyXtxh5.cjs.map +1 -0
- package/dist/wallet.cjs +2 -8
- package/dist/wallet.d.cts +4 -3
- package/dist/wallet.d.ts +4 -3
- package/dist/wallet.js +3 -3
- package/package.json +5 -5
- package/dist/actions-B5-CjpEF.cjs +0 -513
- package/dist/actions-B5-CjpEF.cjs.map +0 -1
- package/dist/actions-C1SMLWO5.js +0 -430
- package/dist/actions-C1SMLWO5.js.map +0 -1
- package/dist/artifact-BM_MVzhL.d.cts +0 -35
- package/dist/artifact-BM_MVzhL.d.cts.map +0 -1
- package/dist/artifact-BM_MVzhL.d.ts +0 -35
- package/dist/artifact-BM_MVzhL.d.ts.map +0 -1
- package/dist/client-jOZxB8yW.d.cts +0 -798
- package/dist/client-jOZxB8yW.d.cts.map +0 -1
- package/dist/client-jOZxB8yW.d.ts +0 -798
- package/dist/client-jOZxB8yW.d.ts.map +0 -1
- package/dist/codec-BcK8ASsg.cjs.map +0 -1
- package/dist/codec-Bxlt1gKO.js.map +0 -1
- package/dist/contract-D77iA2iY.js.map +0 -1
- package/dist/contract-DSu2UPPm.cjs.map +0 -1
- package/dist/dev_wallet-CAbOSrak.cjs.map +0 -1
- package/dist/dev_wallet-CU3RpQLm.js.map +0 -1
- package/dist/execution-J5jkXhV1.d.cts.map +0 -1
- package/dist/execution-XJ0iwFaX.d.ts.map +0 -1
- package/dist/index-Bb01ytjJ.d.ts.map +0 -1
- package/dist/index-C3HVRvQd.d.ts.map +0 -1
- package/dist/index-CIHK7Ew9.d.cts +0 -303
- package/dist/index-CIHK7Ew9.d.cts.map +0 -1
- package/dist/index-CIHK7Ew9.d.ts +0 -303
- package/dist/index-CIHK7Ew9.d.ts.map +0 -1
- package/dist/index-CedOvhGY.d.cts.map +0 -1
- package/dist/index-CtjWsAXV.d.cts.map +0 -1
- package/dist/index-CtjZ61tl.d.cts.map +0 -1
- package/dist/index-DeS1S0m-.d.ts.map +0 -1
- package/dist/index-DfmDUk5Y.d.ts.map +0 -1
- package/dist/index-soFVQX9j.d.cts.map +0 -1
- package/dist/readError-CCVlmBhj.cjs +0 -624
- package/dist/readError-CCVlmBhj.cjs.map +0 -1
- package/dist/readError-D1dppovI.js +0 -571
- package/dist/readError-D1dppovI.js.map +0 -1
- package/dist/readViews-DbWELMMq.d.cts +0 -609
- package/dist/readViews-DbWELMMq.d.cts.map +0 -1
- package/dist/readViews-nV3jbpYc.d.ts +0 -609
- package/dist/readViews-nV3jbpYc.d.ts.map +0 -1
- package/dist/sendInvocation-Dsr9ij5P.cjs +0 -661
- package/dist/sendInvocation-Dsr9ij5P.cjs.map +0 -1
- package/dist/sendInvocation-tBmf8haQ.js +0 -505
- package/dist/sendInvocation-tBmf8haQ.js.map +0 -1
- package/dist/transport-5FPeNwuv.cjs +0 -279
- package/dist/transport-5FPeNwuv.cjs.map +0 -1
- package/dist/transport-IrhVlS4w.js +0 -261
- package/dist/transport-IrhVlS4w.js.map +0 -1
- package/dist/validation-4w-vDGAi.cjs.map +0 -1
- package/dist/validation-eXATmgO0.js.map +0 -1
- package/dist/wallet-7R5M_7h4.cjs.map +0 -1
- package/dist/wallet-BNKgOXrF.js.map +0 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_decimal = require("./decimal-BX7abv5J.cjs");
|
|
2
|
+
const require_hex = require("./hex-CSDZ9d6z.cjs");
|
|
3
|
+
const require_transactionHash = require("./transactionHash-D5yf4KoL.cjs");
|
|
4
|
+
let _thruputchain_protocol = require("@thruputchain/protocol");
|
|
2
5
|
let _thruputchain_protocol_utils = require("@thruputchain/protocol/utils");
|
|
3
6
|
//#region src/rpc/schema.json
|
|
4
7
|
var schema_default = {
|
|
@@ -11106,55 +11109,30 @@ var schema_default = {
|
|
|
11106
11109
|
}
|
|
11107
11110
|
};
|
|
11108
11111
|
//#endregion
|
|
11109
|
-
//#region src/
|
|
11110
|
-
const
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
const parsed = BigInt(value);
|
|
11116
|
-
if (parsed < minimum || parsed > maximum) throw new RangeError(`Invalid ${field}: expected an integer from ${minimum} to ${maximum}`);
|
|
11117
|
-
return parsed;
|
|
11112
|
+
//#region src/rpc/localError.ts
|
|
11113
|
+
const localErrors = /* @__PURE__ */ new WeakSet();
|
|
11114
|
+
/** Record an error that the client raised before dispatch. */
|
|
11115
|
+
function markLocalError(error) {
|
|
11116
|
+
localErrors.add(error);
|
|
11117
|
+
return error;
|
|
11118
11118
|
}
|
|
11119
|
-
/**
|
|
11120
|
-
function
|
|
11121
|
-
|
|
11122
|
-
return value.toString();
|
|
11123
|
-
}
|
|
11124
|
-
function serializeU64(value, field) {
|
|
11125
|
-
if (typeof value !== "bigint" || value < 0n || value > U64_MAX) throw new RangeError(`${field} must be a uint64 bigint`);
|
|
11126
|
-
return value.toString();
|
|
11119
|
+
/** True only for an error recorded by {@link markLocalError}. */
|
|
11120
|
+
function isLocalError(error) {
|
|
11121
|
+
return typeof error === "object" && error !== null && localErrors.has(error);
|
|
11127
11122
|
}
|
|
11128
11123
|
//#endregion
|
|
11129
11124
|
//#region src/rpc/codec.ts
|
|
11130
|
-
/** An unfamiliar variant is data, never success, absence, or retry permission. */
|
|
11131
|
-
var UnsupportedRpcValue = class {
|
|
11132
|
-
raw;
|
|
11133
|
-
unsupported = true;
|
|
11134
|
-
constructor(raw) {
|
|
11135
|
-
this.raw = raw;
|
|
11136
|
-
}
|
|
11137
|
-
};
|
|
11138
11125
|
/** Malformed known result data, with the complete original result retained. */
|
|
11139
|
-
|
|
11140
|
-
path
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
this.raw = raw;
|
|
11146
|
-
this.name = "RpcDecodingError";
|
|
11147
|
-
}
|
|
11148
|
-
};
|
|
11126
|
+
function rpcValueInvalid(path, raw) {
|
|
11127
|
+
return new require_decimal.ThruputError("rpcValueInvalid", `Invalid native RPC value at ${path}`, { context: {
|
|
11128
|
+
path,
|
|
11129
|
+
raw
|
|
11130
|
+
} });
|
|
11131
|
+
}
|
|
11149
11132
|
/** Invalid local input. The transport was not called; this is not retry permission. */
|
|
11150
|
-
|
|
11151
|
-
path;
|
|
11152
|
-
|
|
11153
|
-
super(`${message} at ${path}`);
|
|
11154
|
-
this.path = path;
|
|
11155
|
-
this.name = "RpcRequestValidationError";
|
|
11156
|
-
}
|
|
11157
|
-
};
|
|
11133
|
+
function rpcRequestInvalid(path, message = "Invalid native RPC request") {
|
|
11134
|
+
return markLocalError(new require_decimal.ThruputError("rpcRequestInvalid", `${message} at ${path}`, { context: { path } }));
|
|
11135
|
+
}
|
|
11158
11136
|
const catalog = schema_default;
|
|
11159
11137
|
const rpcPageMethods = new Set(Object.entries(catalog.methods).filter(([, m]) => m.paged).map(([name]) => name));
|
|
11160
11138
|
const patterns = /* @__PURE__ */ new Map();
|
|
@@ -11167,13 +11145,20 @@ function matches(pattern, text) {
|
|
|
11167
11145
|
return regex.test(text);
|
|
11168
11146
|
}
|
|
11169
11147
|
const rpcMethodNames = Object.freeze(Object.keys(catalog.methods));
|
|
11170
|
-
function record(value) {
|
|
11148
|
+
function record$1(value) {
|
|
11171
11149
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11172
11150
|
}
|
|
11151
|
+
/** Cheap internal decode failure; each boundary converts it to a `ThruputError` once. */
|
|
11152
|
+
var SchemaMismatch = class {
|
|
11153
|
+
path;
|
|
11154
|
+
constructor(path) {
|
|
11155
|
+
this.path = path;
|
|
11156
|
+
}
|
|
11157
|
+
};
|
|
11173
11158
|
/** The codec implements only the schema forms emitted by the pinned Rust owner. */
|
|
11174
11159
|
function convert(s, value, encode, path) {
|
|
11175
11160
|
const fail = () => {
|
|
11176
|
-
throw new
|
|
11161
|
+
throw new SchemaMismatch(path);
|
|
11177
11162
|
};
|
|
11178
11163
|
if (s.$ref) {
|
|
11179
11164
|
const name = s.$ref.split("/").at(-1);
|
|
@@ -11204,18 +11189,18 @@ function convert(s, value, encode, path) {
|
|
|
11204
11189
|
if (variants) {
|
|
11205
11190
|
const tag = s["x-tag"];
|
|
11206
11191
|
if (tag) {
|
|
11207
|
-
if (!record(value) || typeof value[tag] !== "string") return fail();
|
|
11192
|
+
if (!record$1(value) || typeof value[tag] !== "string") return fail();
|
|
11208
11193
|
const variant = variants.find((v) => v.properties[tag].const === value[tag]);
|
|
11209
11194
|
if (variant) return convert(variant, value, encode, path);
|
|
11210
|
-
if (!encode && s["x-extensible"]) return new UnsupportedRpcValue(value);
|
|
11195
|
+
if (!encode && s["x-extensible"]) return new require_decimal.UnsupportedRpcValue(value);
|
|
11211
11196
|
return fail();
|
|
11212
11197
|
}
|
|
11213
11198
|
for (const variant of variants) try {
|
|
11214
11199
|
return convert(variant, value, encode, path);
|
|
11215
11200
|
} catch (error) {
|
|
11216
|
-
if (!(error instanceof
|
|
11201
|
+
if (!(error instanceof SchemaMismatch)) throw error;
|
|
11217
11202
|
}
|
|
11218
|
-
if (!encode && s["x-extensible"] && typeof value === "string") return new UnsupportedRpcValue(value);
|
|
11203
|
+
if (!encode && s["x-extensible"] && typeof value === "string") return new require_decimal.UnsupportedRpcValue(value);
|
|
11219
11204
|
return fail();
|
|
11220
11205
|
}
|
|
11221
11206
|
if (s["x-integer-minimum"] !== void 0) {
|
|
@@ -11228,14 +11213,14 @@ function convert(s, value, encode, path) {
|
|
|
11228
11213
|
}
|
|
11229
11214
|
if (typeof value === "string" && !allowed(value)) return fail();
|
|
11230
11215
|
try {
|
|
11231
|
-
return parseDecimal(value, path, minimum, maximum);
|
|
11216
|
+
return require_decimal.parseDecimal(value, path, minimum, maximum);
|
|
11232
11217
|
} catch {
|
|
11233
11218
|
return fail();
|
|
11234
11219
|
}
|
|
11235
11220
|
}
|
|
11236
11221
|
if (s.type === "null") return value === null ? null : fail();
|
|
11237
11222
|
if (s.type === "object") {
|
|
11238
|
-
if (!record(value) || value instanceof Uint8Array) return fail();
|
|
11223
|
+
if (!record$1(value) || value instanceof Uint8Array) return fail();
|
|
11239
11224
|
const properties = s.properties ?? {};
|
|
11240
11225
|
if (s["x-forbidden"]?.some((k) => Object.hasOwn(value, k))) return fail();
|
|
11241
11226
|
for (const [field, required] of Object.entries(s.dependencies ?? {})) if (Object.hasOwn(value, field) && required.some((k) => !Object.hasOwn(value, k))) return fail();
|
|
@@ -11274,10 +11259,10 @@ function encodeRequest(method, value) {
|
|
|
11274
11259
|
if (!entry) throw new Error(`Unknown native RPC method ${method}`);
|
|
11275
11260
|
try {
|
|
11276
11261
|
const encoded = convert(entry.params, value, true, "/params");
|
|
11277
|
-
if (entry.paged && Object.hasOwn(encoded, "start") === Object.hasOwn(encoded, "cursor")) throw new
|
|
11262
|
+
if (entry.paged && Object.hasOwn(encoded, "start") === Object.hasOwn(encoded, "cursor")) throw new SchemaMismatch("/params");
|
|
11278
11263
|
return encoded;
|
|
11279
11264
|
} catch (error) {
|
|
11280
|
-
if (error instanceof
|
|
11265
|
+
if (error instanceof SchemaMismatch) throw rpcRequestInvalid(error.path);
|
|
11281
11266
|
throw error;
|
|
11282
11267
|
}
|
|
11283
11268
|
}
|
|
@@ -11287,76 +11272,358 @@ function decodeResult(method, value) {
|
|
|
11287
11272
|
try {
|
|
11288
11273
|
return convert(entry.result, value, false, "/result");
|
|
11289
11274
|
} catch (error) {
|
|
11290
|
-
if (error instanceof
|
|
11275
|
+
if (error instanceof SchemaMismatch) throw rpcValueInvalid(error.path, value);
|
|
11291
11276
|
throw error;
|
|
11292
11277
|
}
|
|
11293
11278
|
}
|
|
11294
11279
|
/** Method/code membership and structural evidence; relational identity checks live in the reader. */
|
|
11295
11280
|
function decodeErrorData(method, code, value) {
|
|
11296
11281
|
const entry = catalog.errors[method]?.find((entry) => entry.code === code);
|
|
11297
|
-
if (!entry) throw
|
|
11298
|
-
|
|
11282
|
+
if (!entry) throw rpcValueInvalid("/error", value);
|
|
11283
|
+
try {
|
|
11284
|
+
return convert(entry.schema, value, false, "/error/data");
|
|
11285
|
+
} catch (error) {
|
|
11286
|
+
if (error instanceof SchemaMismatch) throw rpcValueInvalid(error.path, value);
|
|
11287
|
+
throw error;
|
|
11288
|
+
}
|
|
11299
11289
|
}
|
|
11300
11290
|
//#endregion
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11291
|
+
//#region src/rpc/errorReader.ts
|
|
11292
|
+
const record = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11293
|
+
const equal$1 = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
|
|
11294
|
+
/**
|
|
11295
|
+
* Classifies method-specific causes without granting retries. Unknown, malformed,
|
|
11296
|
+
* or contradictory evidence stays unclassified with the complete raw error.
|
|
11297
|
+
* Supply the locally computed/requested hash to bind admission or observation evidence.
|
|
11298
|
+
*/
|
|
11299
|
+
function decodeRpcError(method, raw, expectedTransactionHash) {
|
|
11300
|
+
const unclassified = () => ({
|
|
11301
|
+
classification: "unclassified",
|
|
11302
|
+
raw
|
|
11303
|
+
});
|
|
11304
|
+
if (!record(raw) || typeof raw.code !== "number" || !Number.isInteger(raw.code) || raw.code < -2147483648 || raw.code > 2147483647 || typeof raw.message !== "string") return unclassified();
|
|
11305
|
+
try {
|
|
11306
|
+
const data = decodeErrorData(method, raw.code, raw.data);
|
|
11307
|
+
if (!validFunding(data)) return unclassified();
|
|
11308
|
+
if (expectedTransactionHash) {
|
|
11309
|
+
if (method === "sendTransaction" && "transactionHash" in data && data.transactionHash && !equal$1(data.transactionHash, expectedTransactionHash)) return unclassified();
|
|
11310
|
+
if (method === "getTransactionReceipt" && "observation" in data && data.observation && !equal$1(data.observation.transactionHash, expectedTransactionHash)) return unclassified();
|
|
11311
|
+
}
|
|
11312
|
+
return {
|
|
11313
|
+
classification: "known",
|
|
11314
|
+
data,
|
|
11315
|
+
raw
|
|
11316
|
+
};
|
|
11317
|
+
} catch (error) {
|
|
11318
|
+
if (require_decimal.isThruputError(error, "rpcValueInvalid")) return unclassified();
|
|
11319
|
+
throw error;
|
|
11305
11320
|
}
|
|
11306
|
-
}
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
return
|
|
11321
|
+
}
|
|
11322
|
+
function validFunding(data) {
|
|
11323
|
+
if (data.kind !== "fundingAttemptStopped" && data.kind !== "localFundingUnresolved") return true;
|
|
11324
|
+
if (data.signedTransaction) try {
|
|
11325
|
+
if (!data.transactionHash || !equal$1(require_transactionHash.hashSignedTransaction((0, _thruputchain_protocol.deserialize)(data.signedTransaction, _thruputchain_protocol.codec.SignedTransaction)), data.transactionHash)) return false;
|
|
11326
|
+
} catch {
|
|
11327
|
+
return false;
|
|
11311
11328
|
}
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
return
|
|
11329
|
+
if (data.kind === "fundingAttemptStopped") return !data.receipt || !!data.transactionHash && equal$1(data.receipt.transactionHash, data.transactionHash);
|
|
11330
|
+
if (data.cause) {
|
|
11331
|
+
if (!validFunding(data.cause)) return false;
|
|
11332
|
+
if (data.cause.transactionHash && !equal$1(data.cause.transactionHash, data.transactionHash)) return false;
|
|
11333
|
+
if (data.cause.signedTransaction && !equal$1(data.cause.signedTransaction, data.signedTransaction)) return false;
|
|
11317
11334
|
}
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11335
|
+
return true;
|
|
11336
|
+
}
|
|
11337
|
+
/**
|
|
11338
|
+
* Wrap a JSON-RPC error from a native method. Keep the complete raw error and a
|
|
11339
|
+
* conservative typed reading; unknown or contradictory evidence is `unrecognized`.
|
|
11340
|
+
*/
|
|
11341
|
+
function nativeRpcError(error, method, expectedTransactionHash) {
|
|
11342
|
+
const raw = record(error.raw) ? error.raw : {
|
|
11343
|
+
...typeof error.code === "number" ? { code: error.code } : {},
|
|
11344
|
+
...typeof error.rpcMessage === "string" ? { message: error.rpcMessage } : {},
|
|
11345
|
+
...error.data === void 0 ? {} : { data: error.data }
|
|
11346
|
+
};
|
|
11347
|
+
const decoded = decodeRpcError(method, raw, expectedTransactionHash);
|
|
11348
|
+
return new require_decimal.ThruputError("nativeRpcError", `${method}: ${error.rpcMessage} (RPC ${error.code})`, { context: {
|
|
11349
|
+
code: error.code,
|
|
11350
|
+
rpcMessage: error.rpcMessage,
|
|
11351
|
+
method,
|
|
11352
|
+
raw,
|
|
11353
|
+
...decoded.classification === "known" ? {
|
|
11354
|
+
kind: decoded.data.kind,
|
|
11355
|
+
data: decoded.data
|
|
11356
|
+
} : { kind: "unrecognized" }
|
|
11357
|
+
} });
|
|
11358
|
+
}
|
|
11359
|
+
//#endregion
|
|
11360
|
+
//#region src/rpc/client.ts
|
|
11361
|
+
/**
|
|
11362
|
+
* The endpoint, network, or method set does not match what the client requires.
|
|
11363
|
+
* Raised by a local check, so it proves that the request was not dispatched.
|
|
11364
|
+
*/
|
|
11365
|
+
function rpcIncompatible(kind, message) {
|
|
11366
|
+
return markLocalError(new require_decimal.ThruputError("rpcIncompatible", message, { context: { kind } }));
|
|
11367
|
+
}
|
|
11368
|
+
const equal = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
|
|
11369
|
+
/**
|
|
11370
|
+
* Connect a native wire-14 client. This layer reads once or sends once; it does
|
|
11371
|
+
* not sign, poll, retry, refresh discovery on failure, or switch wire formats.
|
|
11372
|
+
* Unknown response variants are UnsupportedRpcValue objects retaining raw data.
|
|
11373
|
+
*/
|
|
11374
|
+
async function createRpcClient(options) {
|
|
11375
|
+
const transport = options.transport;
|
|
11376
|
+
const expected = options.expectedNetworkHash ? new Uint8Array(options.expectedNetworkHash) : void 0;
|
|
11377
|
+
if (expected && expected.length !== 32) throw new RangeError("expectedNetworkHash must have 32 bytes");
|
|
11378
|
+
const required = [...options.requiredMethods ?? []];
|
|
11379
|
+
let discovery;
|
|
11380
|
+
let configured = /* @__PURE__ */ new Set();
|
|
11381
|
+
const requireMethods = (methods) => {
|
|
11382
|
+
for (const method of methods) if (!configured.has(method)) throw rpcIncompatible("method", `Endpoint does not advertise ${method}`);
|
|
11383
|
+
};
|
|
11384
|
+
const requestOnce = async (method, params, control, hash) => {
|
|
11385
|
+
try {
|
|
11386
|
+
return await transport.request(method, params, control);
|
|
11387
|
+
} catch (error) {
|
|
11388
|
+
if (require_decimal.isThruputError(error, "rpcError")) throw nativeRpcError(error.context, method, hash);
|
|
11389
|
+
throw error;
|
|
11390
|
+
}
|
|
11391
|
+
};
|
|
11392
|
+
const read = async (method, control) => decodeResult(method, await requestOnce(method, {}, control));
|
|
11393
|
+
const refreshDiscovery = async (control) => {
|
|
11394
|
+
const version = await read("getVersionInfo", control);
|
|
11395
|
+
if (!/^14\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(version.wireFormat)) throw rpcIncompatible("wireVersion", `Unsupported RPC wire format ${version.wireFormat}`);
|
|
11396
|
+
const methods = new Set(version.supportedMethods);
|
|
11397
|
+
for (const method of [
|
|
11398
|
+
"getVersionInfo",
|
|
11399
|
+
"getNetworkInfo",
|
|
11400
|
+
...required
|
|
11401
|
+
]) if (!methods.has(method)) throw rpcIncompatible("method", `Endpoint does not advertise ${method}`);
|
|
11402
|
+
const network = await read("getNetworkInfo", control);
|
|
11403
|
+
const wanted = expected ?? discovery?.network.networkHash;
|
|
11404
|
+
if (wanted && !equal(wanted, network.networkHash)) throw rpcIncompatible("network", "RPC network identity does not match");
|
|
11405
|
+
const limits = methods.has("getServerLimits") ? await read("getServerLimits", control) : void 0;
|
|
11406
|
+
discovery = {
|
|
11407
|
+
version,
|
|
11408
|
+
network,
|
|
11409
|
+
...limits ? { limits } : {}
|
|
11410
|
+
};
|
|
11411
|
+
configured = methods;
|
|
11412
|
+
return structuredClone(discovery);
|
|
11413
|
+
};
|
|
11414
|
+
await refreshDiscovery({ signal: options.signal });
|
|
11415
|
+
const methods = Object.fromEntries(rpcMethodNames.map((name) => [name, async (request = {}, control) => {
|
|
11416
|
+
const method = name;
|
|
11417
|
+
control?.signal?.throwIfAborted();
|
|
11418
|
+
requireMethods([method]);
|
|
11419
|
+
const params = encodeRequest(method, request);
|
|
11420
|
+
const input = structuredClone(request);
|
|
11421
|
+
const limits = discovery.limits;
|
|
11422
|
+
checkLimits(method, input, limits);
|
|
11423
|
+
let submittedHash;
|
|
11424
|
+
if (method === "sendTransaction") try {
|
|
11425
|
+
submittedHash = require_transactionHash.hashSignedTransaction((0, _thruputchain_protocol.deserialize)(input.signedTransaction, _thruputchain_protocol.codec.SignedTransaction));
|
|
11426
|
+
} catch {
|
|
11427
|
+
throw rpcRequestInvalid("/params/signedTransaction", "Invalid signed transaction XDR");
|
|
11428
|
+
}
|
|
11429
|
+
const raw = await requestOnce(method, params, control, submittedHash ?? (method === "getTransactionReceipt" ? input.transactionHash : void 0));
|
|
11430
|
+
const result = decodeResult(method, raw);
|
|
11431
|
+
checkResult(method, input, result, raw, submittedHash, limits, discovery.network.networkHash);
|
|
11432
|
+
return result;
|
|
11433
|
+
}]));
|
|
11434
|
+
return Object.defineProperty(Object.assign(methods, {
|
|
11435
|
+
refreshDiscovery,
|
|
11436
|
+
requireMethods
|
|
11437
|
+
}), "discovery", {
|
|
11438
|
+
get: () => structuredClone(discovery),
|
|
11439
|
+
enumerable: true
|
|
11440
|
+
});
|
|
11441
|
+
}
|
|
11442
|
+
function checkLimits(method, input, limits) {
|
|
11443
|
+
if (rpcPageMethods.has(method)) {
|
|
11444
|
+
if (!limits) throw rpcIncompatible("limits", "History calls require advertised server limits");
|
|
11445
|
+
const cap = method === "getEvents" ? limits.maxEventsPerPage : limits.maxTransactionsPerPage;
|
|
11446
|
+
if (input.limit !== void 0 && input.limit > cap) throw rpcRequestInvalid("/params/limit", `limit exceeds endpoint cap ${cap}`);
|
|
11447
|
+
if (typeof input.cursor === "string" && BigInt((input.cursor.length - 2) / 2) > limits.maxCursorBytes) throw rpcRequestInvalid("/params/cursor", "cursor exceeds endpoint cap");
|
|
11323
11448
|
}
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11449
|
+
if (method === "simulateInvocation" || method === "simulateInvocations") {
|
|
11450
|
+
if (!limits) throw rpcIncompatible("limits", "Simulation calls require advertised server limits");
|
|
11451
|
+
const calls = method === "simulateInvocation" ? [input] : input.invocations;
|
|
11452
|
+
let gas = 0n, bytes = 0;
|
|
11453
|
+
for (const call of calls) {
|
|
11454
|
+
const callGas = call.gasLimit;
|
|
11455
|
+
if (callGas !== void 0 && callGas > limits.maxSimulationGas) throw rpcRequestInvalid("/params/gasLimit", "gasLimit exceeds endpoint cap");
|
|
11456
|
+
const size = call.calldata.length;
|
|
11457
|
+
if (BigInt(size) > limits.maxSimulationCalldataBytes) throw rpcRequestInvalid("/params/calldata", "calldata exceeds endpoint cap");
|
|
11458
|
+
gas += callGas ?? limits.maxSimulationGas;
|
|
11459
|
+
bytes += size;
|
|
11460
|
+
}
|
|
11461
|
+
if (method === "simulateInvocations") {
|
|
11462
|
+
const batch = limits.simulationBatch;
|
|
11463
|
+
if (!batch) throw rpcIncompatible("limits", "Batch simulation limits are unavailable");
|
|
11464
|
+
if (calls.length > batch.maxInvocations || bytes > batch.maxCalldataBytes || gas > batch.maxGas) throw rpcRequestInvalid("/params/invocations", "simulation batch exceeds endpoint cap");
|
|
11465
|
+
}
|
|
11329
11466
|
}
|
|
11330
|
-
}
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11467
|
+
}
|
|
11468
|
+
/**
|
|
11469
|
+
* Local block and time results must match their own request: a pinned
|
|
11470
|
+
* timepoint comes back exactly, a multi-block request returns `count`
|
|
11471
|
+
* blocks, a step change reports the requested step (none when cleared), and a
|
|
11472
|
+
* mode change reports the requested mode and interval.
|
|
11473
|
+
*/
|
|
11474
|
+
function checkBlockControlResult(method, input, value, invalid) {
|
|
11475
|
+
if (method === "dev_produceBlock") {
|
|
11476
|
+
const block = value;
|
|
11477
|
+
if (block.blockHeight <= 0n || input.blockTimepoint !== void 0 && block.blockTimepoint !== input.blockTimepoint) invalid();
|
|
11335
11478
|
}
|
|
11336
|
-
|
|
11337
|
-
|
|
11479
|
+
if (method === "dev_produceBlocks" && value.blocks.length !== input.count) invalid();
|
|
11480
|
+
if (method === "dev_setNextBlockTimepoint" && value.nextBlockTimepoint !== input.blockTimepoint) invalid();
|
|
11481
|
+
if (method === "dev_setBlockTimeStep" && value.stepNanoseconds !== input.stepNanoseconds) invalid();
|
|
11482
|
+
if (method === "dev_setBlockDriver") {
|
|
11483
|
+
const status = value;
|
|
11484
|
+
if (typeof status.mode === "string" && status.mode !== input.mode || input.intervalMilliseconds !== void 0 && status.intervalMilliseconds !== input.intervalMilliseconds) invalid();
|
|
11485
|
+
}
|
|
11486
|
+
}
|
|
11487
|
+
function checkResult(method, input, value, raw, submittedHash, limits, networkHash) {
|
|
11488
|
+
const invalid = () => {
|
|
11489
|
+
throw rpcValueInvalid("/result", raw);
|
|
11490
|
+
};
|
|
11491
|
+
if (value === null) return;
|
|
11492
|
+
const result = value;
|
|
11493
|
+
if (method === "getTransactionReceipt" && !equal(result.transactionHash, input.transactionHash) || submittedHash && !equal(result.transactionHash, submittedHash)) invalid();
|
|
11494
|
+
if (method === "getBlockByHeight" && (result.blockHeight <= 0n || result.blockHeight !== input.blockHeight || !equal(result.networkHash, networkHash))) invalid();
|
|
11495
|
+
if ((method === "getBalance" || method === "getRegisteredAuth") && !equal(result.address, input.address)) invalid();
|
|
11496
|
+
if (method === "simulateInvocations" && result.results.length !== input.invocations.length) invalid();
|
|
11497
|
+
if ((method === "simulateInvocation" || method === "simulateInvocations") && input.minStateBlockHeight !== void 0 && result.stateBlockHeight < input.minStateBlockHeight) invalid();
|
|
11498
|
+
if (method === "dev_fundAccount") {
|
|
11499
|
+
const funding = value;
|
|
11500
|
+
try {
|
|
11501
|
+
if (!equal(funding.recipient, input.recipient) || funding.rawAmount !== input.rawAmount || !equal(funding.transactionHash, require_transactionHash.hashSignedTransaction((0, _thruputchain_protocol.deserialize)(funding.signedTransaction, _thruputchain_protocol.codec.SignedTransaction)))) invalid();
|
|
11502
|
+
} catch {
|
|
11503
|
+
invalid();
|
|
11504
|
+
}
|
|
11505
|
+
}
|
|
11506
|
+
checkBlockControlResult(method, input, value, invalid);
|
|
11507
|
+
if (method === "faucet_requestAirdrop" && "recipient" in result && !equal(result.recipient, input.recipient)) invalid();
|
|
11508
|
+
if (!rpcPageMethods.has(method)) return;
|
|
11509
|
+
const page = value;
|
|
11510
|
+
const entries = method === "getEvents" ? page.events : page.transactions;
|
|
11511
|
+
const cap = method === "getEvents" ? limits.maxEventsPerPage : limits.maxTransactionsPerPage;
|
|
11512
|
+
if (page.oldestIndexedBlockHeight > page.latestIndexedBlockHeight || entries.length > (input.limit ?? Math.min(50, cap)) || page.nextCursor !== null && (page.nextCursor === input.cursor || BigInt((page.nextCursor.length - 2) / 2) > limits.maxCursorBytes)) invalid();
|
|
11513
|
+
if (entries.some((entry) => entry.blockHeight < page.oldestIndexedBlockHeight || entry.blockHeight > page.latestIndexedBlockHeight)) invalid();
|
|
11514
|
+
const start = input.start;
|
|
11515
|
+
if (method === "getTransactionsByBlock") {
|
|
11516
|
+
if (page.oldestIndexedBlockHeight < 1n || !entries.length && page.nextCursor !== null || input.cursor !== void 0 && (input.blockHeight < page.oldestIndexedBlockHeight || input.blockHeight > page.latestIndexedBlockHeight) || entries.some((entry) => entry.blockHeight !== input.blockHeight)) invalid();
|
|
11517
|
+
} else if (start?.anchor.kind === "atHeight") {
|
|
11518
|
+
const anchor = start.anchor.blockHeight;
|
|
11519
|
+
if (anchor < page.oldestIndexedBlockHeight || entries.some((entry) => start.order === "ascending" ? entry.blockHeight < anchor : entry.blockHeight > anchor)) invalid();
|
|
11520
|
+
}
|
|
11521
|
+
const identities = /* @__PURE__ */ new Set();
|
|
11522
|
+
const keys = [];
|
|
11523
|
+
for (const [index, entry] of entries.entries()) {
|
|
11524
|
+
const event = method === "getEvents" ? page.events[index] : void 0;
|
|
11525
|
+
const hash = require_hex.toHex0x(entry.transactionHash);
|
|
11526
|
+
const sequence = event?.sequenceNumber ?? 0;
|
|
11527
|
+
const identity = method === "getEvents" ? `${hash}/${sequence}` : hash;
|
|
11528
|
+
if (identities.has(identity)) invalid();
|
|
11529
|
+
identities.add(identity);
|
|
11530
|
+
keys.push([
|
|
11531
|
+
entry.blockHeight,
|
|
11532
|
+
hash,
|
|
11533
|
+
sequence
|
|
11534
|
+
]);
|
|
11535
|
+
if (event && !input.filters.some((filter) => filter.addresses.some((address) => equal(address, event.event.address)) && [
|
|
11536
|
+
"topic0",
|
|
11537
|
+
"topic1",
|
|
11538
|
+
"topic2"
|
|
11539
|
+
].every((key, i) => {
|
|
11540
|
+
const values = filter.topics?.[key];
|
|
11541
|
+
return !values?.length || !!event.event.topics[i] && values.some((topic) => equal(topic, event.event.topics[i]));
|
|
11542
|
+
}))) invalid();
|
|
11543
|
+
}
|
|
11544
|
+
const compare = (left, right) => {
|
|
11545
|
+
for (let i = 0; i < 3; i++) {
|
|
11546
|
+
if (left[i] < right[i]) return -1;
|
|
11547
|
+
if (left[i] > right[i]) return 1;
|
|
11548
|
+
}
|
|
11549
|
+
return 0;
|
|
11550
|
+
};
|
|
11551
|
+
const asc = keys.every((key, i) => i === 0 || compare(keys[i - 1], key) < 0);
|
|
11552
|
+
const desc = keys.every((key, i) => i === 0 || compare(keys[i - 1], key) > 0);
|
|
11553
|
+
if (!(start ? start.order === "ascending" ? asc : desc : asc || desc)) invalid();
|
|
11554
|
+
}
|
|
11555
|
+
//#endregion
|
|
11556
|
+
//#region src/transport/readError.ts
|
|
11557
|
+
/**
|
|
11558
|
+
* Classify an infrastructure read failure without replacing the original error.
|
|
11559
|
+
*
|
|
11560
|
+
* Pass the caller's signal to distinguish explicit cancellation from a transport
|
|
11561
|
+
* timeout. Plain Error wrappers are inspected through their causes; other
|
|
11562
|
+
* `ThruputError` codes and unrecognized failures remain unknown. A bare TypeError
|
|
11563
|
+
* is not evidence of a network failure. Custom transports should throw code
|
|
11564
|
+
* `httpRequestFailed` for that case. Transaction-not-found remains
|
|
11565
|
+
* operation-specific rather than a general retry. This classification never
|
|
11566
|
+
* authorizes transaction resubmission.
|
|
11567
|
+
*/
|
|
11568
|
+
function classifyReadError(error, options = {}) {
|
|
11569
|
+
if (options.signal?.aborted) return "cancelled";
|
|
11570
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11571
|
+
while (error !== null && typeof error === "object" && !seen.has(error)) {
|
|
11572
|
+
seen.add(error);
|
|
11573
|
+
if (require_decimal.isThruputError(error, "httpRequestFailed")) return "transient";
|
|
11574
|
+
if (require_decimal.isThruputError(error, "httpResponseError")) return [
|
|
11575
|
+
408,
|
|
11576
|
+
429,
|
|
11577
|
+
500,
|
|
11578
|
+
502,
|
|
11579
|
+
503,
|
|
11580
|
+
504
|
|
11581
|
+
].includes(error.context.status) ? "transient" : "permanent";
|
|
11582
|
+
if (require_decimal.isThruputError(error, "nativeRpcError")) switch (error.context.kind) {
|
|
11583
|
+
case "backendUnavailable":
|
|
11584
|
+
case "stateHeightUnavailable":
|
|
11585
|
+
case "backendTimeout":
|
|
11586
|
+
case "overloaded": return "transient";
|
|
11587
|
+
case "invalidParams":
|
|
11588
|
+
case "invalidCursor":
|
|
11589
|
+
case "transactionInvalid":
|
|
11590
|
+
case "transactionRejected":
|
|
11591
|
+
case "historyUnavailable": return "permanent";
|
|
11592
|
+
default: return "unknown";
|
|
11593
|
+
}
|
|
11594
|
+
if ("name" in error) {
|
|
11595
|
+
if (error.name === "TimeoutError") return "transient";
|
|
11596
|
+
if (error.name === "AbortError") return "cancelled";
|
|
11597
|
+
}
|
|
11598
|
+
if (!(error instanceof Error) || error.constructor !== Error) return "unknown";
|
|
11599
|
+
error = error.cause;
|
|
11600
|
+
}
|
|
11601
|
+
return "unknown";
|
|
11602
|
+
}
|
|
11603
|
+
//#endregion
|
|
11604
|
+
Object.defineProperty(exports, "classifyReadError", {
|
|
11338
11605
|
enumerable: true,
|
|
11339
11606
|
get: function() {
|
|
11340
|
-
return
|
|
11607
|
+
return classifyReadError;
|
|
11341
11608
|
}
|
|
11342
11609
|
});
|
|
11343
|
-
Object.defineProperty(exports, "
|
|
11610
|
+
Object.defineProperty(exports, "createRpcClient", {
|
|
11344
11611
|
enumerable: true,
|
|
11345
11612
|
get: function() {
|
|
11346
|
-
return
|
|
11613
|
+
return createRpcClient;
|
|
11347
11614
|
}
|
|
11348
11615
|
});
|
|
11349
|
-
Object.defineProperty(exports, "
|
|
11616
|
+
Object.defineProperty(exports, "isLocalError", {
|
|
11350
11617
|
enumerable: true,
|
|
11351
11618
|
get: function() {
|
|
11352
|
-
return
|
|
11619
|
+
return isLocalError;
|
|
11353
11620
|
}
|
|
11354
11621
|
});
|
|
11355
|
-
Object.defineProperty(exports, "
|
|
11622
|
+
Object.defineProperty(exports, "rpcIncompatible", {
|
|
11356
11623
|
enumerable: true,
|
|
11357
11624
|
get: function() {
|
|
11358
|
-
return
|
|
11625
|
+
return rpcIncompatible;
|
|
11359
11626
|
}
|
|
11360
11627
|
});
|
|
11361
11628
|
|
|
11362
|
-
//# sourceMappingURL=
|
|
11629
|
+
//# sourceMappingURL=readError-COcEDNoZ.cjs.map
|