@talismn/sapi 0.0.0-pr2162-20250911045609 → 0.0.0-pr2165-20250922010842

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.
@@ -340,16 +340,18 @@ const getPayloadWithMetadataHash = (chain, chainInfo, payload) => {
340
340
  specName,
341
341
  specVersion
342
342
  } = chainInfo;
343
-
344
- // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
345
- const merkleizedMetadata = merkleizeMetadata.merkleizeMetadata(chain.hexMetadata, {
343
+ const metadataHashInputs = {
346
344
  tokenSymbol,
347
345
  decimals,
348
346
  base58Prefix,
349
347
  specName,
350
348
  specVersion
351
- });
349
+ };
350
+
351
+ // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
352
+ const merkleizedMetadata = merkleizeMetadata.merkleizeMetadata(chain.hexMetadata, metadataHashInputs);
352
353
  const metadataHash = utils.toHex(merkleizedMetadata.digest());
354
+ log.log("metadataHash", metadataHash, metadataHashInputs);
353
355
  const payloadWithMetadataHash = {
354
356
  ...payload,
355
357
  mode: 1,
@@ -340,16 +340,18 @@ const getPayloadWithMetadataHash = (chain, chainInfo, payload) => {
340
340
  specName,
341
341
  specVersion
342
342
  } = chainInfo;
343
-
344
- // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
345
- const merkleizedMetadata = merkleizeMetadata.merkleizeMetadata(chain.hexMetadata, {
343
+ const metadataHashInputs = {
346
344
  tokenSymbol,
347
345
  decimals,
348
346
  base58Prefix,
349
347
  specName,
350
348
  specVersion
351
- });
349
+ };
350
+
351
+ // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
352
+ const merkleizedMetadata = merkleizeMetadata.merkleizeMetadata(chain.hexMetadata, metadataHashInputs);
352
353
  const metadataHash = utils.toHex(merkleizedMetadata.digest());
354
+ log.log("metadataHash", metadataHash, metadataHashInputs);
353
355
  const payloadWithMetadataHash = {
354
356
  ...payload,
355
357
  mode: 1,
@@ -334,16 +334,18 @@ const getPayloadWithMetadataHash = (chain, chainInfo, payload) => {
334
334
  specName,
335
335
  specVersion
336
336
  } = chainInfo;
337
-
338
- // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
339
- const merkleizedMetadata = merkleizeMetadata(chain.hexMetadata, {
337
+ const metadataHashInputs = {
340
338
  tokenSymbol,
341
339
  decimals,
342
340
  base58Prefix,
343
341
  specName,
344
342
  specVersion
345
- });
343
+ };
344
+
345
+ // since ultimately this needs a V15 object, would be nice if this accepted one directly as input
346
+ const merkleizedMetadata = merkleizeMetadata(chain.hexMetadata, metadataHashInputs);
346
347
  const metadataHash = toHex(merkleizedMetadata.digest());
348
+ log.log("metadataHash", metadataHash, metadataHashInputs);
347
349
  const payloadWithMetadataHash = {
348
350
  ...payload,
349
351
  mode: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/sapi",
3
- "version": "0.0.0-pr2162-20250911045609",
3
+ "version": "0.0.0-pr2165-20250922010842",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",
@@ -18,7 +18,7 @@
18
18
  "/dist"
19
19
  ],
20
20
  "engines": {
21
- "node": ">=18"
21
+ "node": ">=20"
22
22
  },
23
23
  "dependencies": {
24
24
  "@polkadot-api/merkleize-metadata": "1.1.18",
@@ -31,7 +31,7 @@
31
31
  "anylogger": "^1.0.11",
32
32
  "polkadot-api": "1.13.1",
33
33
  "scale-ts": "^1.6.1",
34
- "@talismn/scale": "0.2.0"
34
+ "@talismn/scale": "0.0.0-pr2165-20250922010842"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/jest": "^29.5.14",