@parity/product-sdk 0.32.0 → 0.34.0
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/package.json +11 -11
- package/src/nfts/contract.test.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parity/product-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Unified SDK for building products in the Polkadot ecosystem - umbrella package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -79,22 +79,22 @@
|
|
|
79
79
|
],
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"polkadot-api": "^2.1.6",
|
|
82
|
+
"@parity/product-sdk-chain-client": "0.12.10",
|
|
83
|
+
"@parity/product-sdk-cloud-storage": "0.12.6",
|
|
82
84
|
"@parity/product-sdk-address": "0.2.0",
|
|
83
|
-
"@parity/product-sdk-
|
|
85
|
+
"@parity/product-sdk-contracts": "0.10.13",
|
|
84
86
|
"@parity/product-sdk-crypto": "0.1.1",
|
|
85
|
-
"@parity/product-sdk-
|
|
86
|
-
"@parity/product-sdk-host": "0.23.0",
|
|
87
|
-
"@parity/product-sdk-contracts": "0.10.11",
|
|
87
|
+
"@parity/product-sdk-host": "0.25.0",
|
|
88
88
|
"@parity/product-sdk-individuality": "0.7.0",
|
|
89
|
+
"@parity/product-sdk-keys": "0.4.3",
|
|
89
90
|
"@parity/product-sdk-logger": "0.1.1",
|
|
90
91
|
"@parity/product-sdk-errors": "0.2.0",
|
|
91
|
-
"@parity/product-sdk-keys": "0.4.1",
|
|
92
|
-
"@parity/result": "0.2.0",
|
|
93
92
|
"@parity/product-sdk-nfts": "0.1.0",
|
|
94
|
-
"@parity/product-sdk-signer": "0.
|
|
95
|
-
"@parity/
|
|
96
|
-
"@parity/product-sdk-renderer": "0.
|
|
97
|
-
"@parity/product-sdk-
|
|
93
|
+
"@parity/product-sdk-signer": "0.16.1",
|
|
94
|
+
"@parity/result": "0.2.0",
|
|
95
|
+
"@parity/product-sdk-renderer": "0.5.0",
|
|
96
|
+
"@parity/product-sdk-local-storage": "0.3.15",
|
|
97
|
+
"@parity/product-sdk-tx": "0.4.13"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"react": "^18.0.0 || ^19.0.0"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* hypothetical: it is the live state of the other supported network.
|
|
26
26
|
*/
|
|
27
27
|
import type { getChainAPI } from "@parity/product-sdk-chain-client";
|
|
28
|
-
import type { NftsChain, NftsCreditsChain } from "@parity/product-sdk-nfts";
|
|
28
|
+
import type { NftsChain, NftsCreditsChain, NftsInstancesChain } from "@parity/product-sdk-nfts";
|
|
29
29
|
import { expect, test } from "vitest";
|
|
30
30
|
|
|
31
31
|
// The false branch must be `false`, not `never`. `never` is assignable to
|
|
@@ -43,6 +43,12 @@ type PaseoSatisfiesContract = Assert<PaseoClient extends NftsChain ? true : fals
|
|
|
43
43
|
// has to satisfy the second contract too.
|
|
44
44
|
type PaseoSatisfiesCredits = Assert<PaseoClient extends NftsCreditsChain ? true : false>;
|
|
45
45
|
|
|
46
|
+
// The instance-display read takes its own contract — one runtime API,
|
|
47
|
+
// `ScarcityApi.metadata_batch`. This is the line that checks the hand-written
|
|
48
|
+
// query enum and the `resolved` + three-layer result against what PAPI
|
|
49
|
+
// generated from the pinned runtime.
|
|
50
|
+
type PaseoSatisfiesInstances = Assert<PaseoClient extends NftsInstancesChain ? true : false>;
|
|
51
|
+
|
|
46
52
|
// The negative control, and a real fact about the network rather than a
|
|
47
53
|
// hypothetical: devnet Asset Hub has no `Scarcity` and no `NftClaims`. If
|
|
48
54
|
// `NftsChain` ever stopped constraining, this `@ts-expect-error` would report
|
|
@@ -50,6 +56,11 @@ type PaseoSatisfiesCredits = Assert<PaseoClient extends NftsCreditsChain ? true
|
|
|
50
56
|
// @ts-expect-error devnet Asset Hub carries neither pallet
|
|
51
57
|
type DevnetLacksPallets = Assert<DevnetClient extends NftsChain ? true : false>;
|
|
52
58
|
|
|
59
|
+
// No `Scarcity` pallet also means no `ScarcityApi`, so the instances contract
|
|
60
|
+
// must refuse the devnet client the same way.
|
|
61
|
+
// @ts-expect-error devnet Asset Hub has no ScarcityApi runtime API
|
|
62
|
+
type DevnetLacksScarcityApi = Assert<DevnetClient extends NftsInstancesChain ? true : false>;
|
|
63
|
+
|
|
53
64
|
test("nfts chain contract holds against the paseo descriptor", () => {
|
|
54
65
|
// The assertions above are compile-time. This keeps vitest from reporting
|
|
55
66
|
// the file as having no tests, and documents that a green run means tsc
|