@parity/product-sdk 0.27.0 → 0.29.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/individuality/contract.test.ts +48 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parity/product-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Unified SDK for building products in the Polkadot ecosystem - umbrella package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"polkadot-api": "^2.1.6",
|
|
74
74
|
"@parity/product-sdk-address": "0.2.0",
|
|
75
|
+
"@parity/product-sdk-cloud-storage": "0.12.1",
|
|
76
|
+
"@parity/product-sdk-chain-client": "0.12.5",
|
|
77
|
+
"@parity/product-sdk-contracts": "0.10.9",
|
|
78
|
+
"@parity/product-sdk-host": "0.21.0",
|
|
75
79
|
"@parity/product-sdk-crypto": "0.1.1",
|
|
76
|
-
"@parity/product-sdk-
|
|
77
|
-
"@parity/product-sdk-contracts": "0.10.7",
|
|
78
|
-
"@parity/product-sdk-host": "0.19.1",
|
|
79
|
-
"@parity/product-sdk-chain-client": "0.12.3",
|
|
80
|
-
"@parity/product-sdk-keys": "0.3.24",
|
|
80
|
+
"@parity/product-sdk-keys": "0.3.26",
|
|
81
81
|
"@parity/product-sdk-logger": "0.1.1",
|
|
82
|
-
"@parity/product-sdk-signer": "0.14.4",
|
|
83
|
-
"@parity/result": "0.2.0",
|
|
84
82
|
"@parity/product-sdk-errors": "0.2.0",
|
|
85
|
-
"@parity/product-sdk-
|
|
86
|
-
"@parity/
|
|
87
|
-
"@parity/product-sdk-
|
|
83
|
+
"@parity/product-sdk-individuality": "0.5.0",
|
|
84
|
+
"@parity/result": "0.2.0",
|
|
85
|
+
"@parity/product-sdk-signer": "0.14.6",
|
|
86
|
+
"@parity/product-sdk-local-storage": "0.3.11",
|
|
87
|
+
"@parity/product-sdk-tx": "0.4.9"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"react": "^18.0.0 || ^19.0.0"
|
|
@@ -45,6 +45,7 @@ import type {
|
|
|
45
45
|
GamePlayersChain,
|
|
46
46
|
IndividualityChain,
|
|
47
47
|
LegacySuffixChain,
|
|
48
|
+
LiteAliasBindChain,
|
|
48
49
|
LiteSignUpChain,
|
|
49
50
|
NetworkSuffixChain,
|
|
50
51
|
PapiIndividualityChain,
|
|
@@ -133,23 +134,35 @@ type FromPapiSatisfiesContracts = Assert<
|
|
|
133
134
|
: false
|
|
134
135
|
>;
|
|
135
136
|
|
|
137
|
+
// Storage is the only way either chain resolves a suffix since the re-pin, so the
|
|
138
|
+
// bring-your-own-client path needs it asserted too.
|
|
139
|
+
type FromPapiSatisfiesTheSuffixStorage = Assert<
|
|
140
|
+
PapiIndividualityChain<
|
|
141
|
+
PaseoClient["individuality"],
|
|
142
|
+
PaseoClient["raw"]["individuality"]
|
|
143
|
+
> extends NetworkSuffixChain
|
|
144
|
+
? true
|
|
145
|
+
: false
|
|
146
|
+
>;
|
|
147
|
+
|
|
136
148
|
type PaseoSatisfiesScoreContext = Assert<PaseoClient extends ScoreContextChain ? true : false>;
|
|
137
149
|
type DevnetSatisfiesScoreContext = Assert<DevnetClient extends ScoreContextChain ? true : false>;
|
|
138
150
|
type PreviewnetSatisfiesScoreContext = Assert<
|
|
139
151
|
PreviewnetClient extends ScoreContextChain ? true : false
|
|
140
152
|
>;
|
|
141
153
|
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
// The suffix moved from a constant to storage upstream, and the 2026-09-03 re-pin
|
|
155
|
+
// brought that to both live chains. Devnet still predates it, so it holds the old
|
|
156
|
+
// shape and is the one asserted negatively now.
|
|
157
|
+
type PreviewnetPredatesTheLegacySuffix = Assert<
|
|
158
|
+
PreviewnetClient extends LegacySuffixChain ? false : true
|
|
146
159
|
>;
|
|
147
160
|
type PaseoPredatesTheLegacySuffix = Assert<PaseoClient extends LegacySuffixChain ? false : true>;
|
|
148
161
|
type DevnetPredatesTheLegacySuffix = Assert<DevnetClient extends LegacySuffixChain ? false : true>;
|
|
149
|
-
type
|
|
150
|
-
PreviewnetClient extends NetworkSuffixChain ?
|
|
162
|
+
type PreviewnetHasSuffixStorage = Assert<
|
|
163
|
+
PreviewnetClient extends NetworkSuffixChain ? true : false
|
|
151
164
|
>;
|
|
152
|
-
type
|
|
165
|
+
type PaseoHasSuffixStorage = Assert<PaseoClient extends NetworkSuffixChain ? true : false>;
|
|
153
166
|
type DevnetHasNoSuffixStorage = Assert<DevnetClient extends NetworkSuffixChain ? false : true>;
|
|
154
167
|
|
|
155
168
|
// The two are declared separately, so a rename on either side would go
|
|
@@ -409,14 +422,38 @@ type LiteSignUpReadBase = GameChain & SignUpChain & ScoreContextChain & LiteSign
|
|
|
409
422
|
type PaseoSatisfiesTheLiteReadWithATld = Assert<
|
|
410
423
|
PaseoClient extends LiteSignUpReadBase ? true : false
|
|
411
424
|
>;
|
|
412
|
-
|
|
413
|
-
|
|
425
|
+
// Both chains resolve the suffix from storage since the 2026-09-03 re-pin, so the
|
|
426
|
+
// storage overload is the live path and neither can use the constant one.
|
|
427
|
+
type PaseoSatisfiesTheLiteReadFromStorage = Assert<
|
|
428
|
+
PaseoClient extends LiteSignUpReadBase & NetworkSuffixChain ? true : false
|
|
429
|
+
>;
|
|
430
|
+
type PreviewnetSatisfiesTheLiteReadFromStorage = Assert<
|
|
431
|
+
PreviewnetClient extends LiteSignUpReadBase & NetworkSuffixChain ? true : false
|
|
414
432
|
>;
|
|
415
|
-
type
|
|
416
|
-
PreviewnetClient extends LiteSignUpReadBase & LegacySuffixChain ?
|
|
433
|
+
type NeitherChainHasTheLegacyConstant = Assert<
|
|
434
|
+
PaseoClient | PreviewnetClient extends LiteSignUpReadBase & LegacySuffixChain ? false : true
|
|
417
435
|
>;
|
|
418
436
|
type DevnetPredatesTheLiteRead = Assert<DevnetClient extends LiteSignUpReadBase ? false : true>;
|
|
419
437
|
|
|
438
|
+
// Wider than the reads above: the builder assembles the extrinsic itself, so it
|
|
439
|
+
// needs the chain spec and the metadata blob, not just the call.
|
|
440
|
+
type PaseoSatisfiesBindContract = Assert<PaseoClient extends LiteAliasBindChain ? true : false>;
|
|
441
|
+
type PreviewnetSatisfiesBindContract = Assert<
|
|
442
|
+
PreviewnetClient extends LiteAliasBindChain ? true : false
|
|
443
|
+
>;
|
|
444
|
+
type DevnetSatisfiesBindContract = Assert<DevnetClient extends LiteAliasBindChain ? true : false>;
|
|
445
|
+
type FromPapiSatisfiesBindContract = Assert<
|
|
446
|
+
PapiIndividualityChain<
|
|
447
|
+
PaseoClient["individuality"],
|
|
448
|
+
PaseoClient["raw"]["individuality"]
|
|
449
|
+
> extends LiteAliasBindChain
|
|
450
|
+
? true
|
|
451
|
+
: false
|
|
452
|
+
>;
|
|
453
|
+
type RejectsBogusBindClient = Assert<
|
|
454
|
+
ClientWithoutIndividuality extends LiteAliasBindChain ? false : true
|
|
455
|
+
>;
|
|
456
|
+
|
|
420
457
|
// Pinned by name for the same reason `sign_up_with_account`'s are: PAPI encodes
|
|
421
458
|
// the object it is handed, so a renamed field silently encodes as `undefined` —
|
|
422
459
|
// and `account` here is a call argument, not implied by the signer.
|