@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.
@@ -7604,14 +7604,21 @@ var PolkadotHubChain = class _PolkadotHubChain {
7604
7604
  childKeysHex,
7605
7605
  blockHash
7606
7606
  ]);
7607
+ const childNodes = childRead.proof.map((p) => hexToBytes(p));
7607
7608
  storageProofEncoded.set(
7608
7609
  addr20,
7609
- childRead.proof.map((p) => hexToBytes(p))
7610
+ childNodes
7610
7611
  );
7611
7612
  }
7613
+ const storageEntries = Array.from(storageProofEncoded.entries());
7614
+ const contractProofForEnc = mainProofBytes.map((b) => Array.from(b));
7615
+ const storageProofForEnc = storageEntries.map(([k, nodes]) => [
7616
+ Array.from(k),
7617
+ nodes.map((n) => Array.from(n))
7618
+ ]);
7612
7619
  const encoded = EvmStateProof.enc({
7613
- contractProof: mainProofBytes,
7614
- storageProof: Array.from(storageProofEncoded.entries())
7620
+ contractProof: contractProofForEnc,
7621
+ storageProof: storageProofForEnc
7615
7622
  });
7616
7623
  return bytesToHex(encoded);
7617
7624
  }