@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.
- package/dist/browser/index.js +10 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.js +10 -3
- package/dist/node/index.js.map +1 -1
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
7614
|
-
storageProof:
|
|
7620
|
+
contractProof: contractProofForEnc,
|
|
7621
|
+
storageProof: storageProofForEnc
|
|
7615
7622
|
});
|
|
7616
7623
|
return bytesToHex(encoded);
|
|
7617
7624
|
}
|