@hyperbridge/sdk 1.8.6-rc.1 → 1.8.6

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.
@@ -7654,14 +7654,21 @@ var PolkadotHubChain = class _PolkadotHubChain {
7654
7654
  childKeysHex,
7655
7655
  blockHash
7656
7656
  ]);
7657
+ const childNodes = childRead.proof.map((p) => hexToBytes(p));
7657
7658
  storageProofEncoded.set(
7658
7659
  addr20,
7659
- childRead.proof.map((p) => hexToBytes(p))
7660
+ childNodes
7660
7661
  );
7661
7662
  }
7663
+ const storageEntries = Array.from(storageProofEncoded.entries());
7664
+ const contractProofForEnc = mainProofBytes.map((b) => Array.from(b));
7665
+ const storageProofForEnc = storageEntries.map(([k, nodes]) => [
7666
+ Array.from(k),
7667
+ nodes.map((n) => Array.from(n))
7668
+ ]);
7662
7669
  const encoded = EvmStateProof.enc({
7663
- contractProof: mainProofBytes,
7664
- storageProof: Array.from(storageProofEncoded.entries())
7670
+ contractProof: contractProofForEnc,
7671
+ storageProof: storageProofForEnc
7665
7672
  });
7666
7673
  return bytesToHex(encoded);
7667
7674
  }