starknet 10.6.3 → 10.6.5
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.global.js +16 -3
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -388,7 +388,8 @@ var SYSTEM_MESSAGES = {
|
|
|
388
388
|
unsupportedMethodForRpcVersion: "Unsupported method for RPC version",
|
|
389
389
|
txEvictedFromMempool: "Transaction TTL, evicted from the mempool, try to increase the tip",
|
|
390
390
|
consensusFailed: "Consensus failed to finalize the block proposal",
|
|
391
|
-
txFailsBlockBuildingValidation: "Transaction fails block building validation"
|
|
391
|
+
txFailsBlockBuildingValidation: "Transaction fails block building validation",
|
|
392
|
+
snip36RequiresRPC010: "SNIP-36 `proof` and `proofFacts` are not supported by RPC 0.9, connect to a RPC 0.10.1+ node!"
|
|
392
393
|
};
|
|
393
394
|
var SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS = "0.14.1";
|
|
394
395
|
|
|
@@ -6544,6 +6545,10 @@ var RpcChannel = class {
|
|
|
6544
6545
|
versionType !== "transaction" || isRPC08Plus_ResourceBoundsBN(invocation.resourceBounds),
|
|
6545
6546
|
SYSTEM_MESSAGES.SWOldV3
|
|
6546
6547
|
);
|
|
6548
|
+
assert(
|
|
6549
|
+
!invocation.proofFacts?.length && !invocation.proof,
|
|
6550
|
+
SYSTEM_MESSAGES.snip36RequiresRPC010
|
|
6551
|
+
);
|
|
6547
6552
|
const details = {
|
|
6548
6553
|
signature: signatureToHexArray(invocation.signature),
|
|
6549
6554
|
nonce: toHex(invocation.nonce),
|
|
@@ -7425,7 +7430,7 @@ var WebSocketChannel = class {
|
|
|
7425
7430
|
this.websocket.addEventListener("error", this.errorListener);
|
|
7426
7431
|
}
|
|
7427
7432
|
idResolver(id) {
|
|
7428
|
-
if (id) return id;
|
|
7433
|
+
if (id !== void 0) return id;
|
|
7429
7434
|
return this.sendId++;
|
|
7430
7435
|
}
|
|
7431
7436
|
/**
|
|
@@ -7483,7 +7488,15 @@ var WebSocketChannel = class {
|
|
|
7483
7488
|
logger.warn("WebSocket received non-string message data:", event.data);
|
|
7484
7489
|
return;
|
|
7485
7490
|
}
|
|
7486
|
-
|
|
7491
|
+
let message;
|
|
7492
|
+
try {
|
|
7493
|
+
message = JSON.parse(event.data);
|
|
7494
|
+
} catch (error) {
|
|
7495
|
+
logger.error(
|
|
7496
|
+
`WebSocketChannel: Error parsing incoming message: ${event.data}, Error: ${error}`
|
|
7497
|
+
);
|
|
7498
|
+
return;
|
|
7499
|
+
}
|
|
7487
7500
|
if (message.id === sendId) {
|
|
7488
7501
|
clearTimeout(timeoutId);
|
|
7489
7502
|
this.websocket.removeEventListener("message", messageHandler);
|