@dotdm/env 1.0.6-dev.1779335670 → 2.0.0-dev.1779912670

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.
@@ -0,0 +1,12 @@
1
+ // src/registry.ts
2
+ var PASEO_V2_REGISTRY_ADDRESS = "0xf62c2ece29cd8df2e10040ecfa5a894a5c5d9cb0";
3
+ function getRegistryAddress(name = "paseo") {
4
+ if (name === "paseo" || name === "paseo-next-v2" || name === "paseo-v2") {
5
+ return PASEO_V2_REGISTRY_ADDRESS;
6
+ }
7
+ return PASEO_V2_REGISTRY_ADDRESS;
8
+ }
9
+
10
+ export {
11
+ getRegistryAddress
12
+ };
package/dist/index.d.ts CHANGED
@@ -5,9 +5,7 @@ import * as polkadot_api from 'polkadot-api';
5
5
  import { PolkadotClient, TypedApi } from 'polkadot-api';
6
6
  import { polkadot_asset_hub } from '@parity/product-sdk-descriptors/polkadot-asset-hub';
7
7
  import { paseo_asset_hub } from '@parity/product-sdk-descriptors/paseo-asset-hub';
8
- import { previewnet_asset_hub } from '@parity/product-sdk-descriptors/previewnet-asset-hub';
9
8
  import { paseo_bulletin } from '@parity/product-sdk-descriptors/paseo-bulletin';
10
- import { previewnet_bulletin } from '@parity/product-sdk-descriptors/previewnet-bulletin';
11
9
  export { ss58Address } from '@polkadot-labs/hdkd-helpers';
12
10
 
13
11
  interface ChainFaucet {
@@ -44,13 +42,6 @@ declare const KNOWN_CHAINS: {
44
42
  readonly url: "https://paritytech.github.io/polkadot-bulletin-chain/authorizations?tab=faucet";
45
43
  }];
46
44
  };
47
- readonly "preview-net": {
48
- readonly assethubUrl: "wss://previewnet.substrate.dev/asset-hub";
49
- readonly bulletinUrl: "wss://previewnet.substrate.dev/bulletin";
50
- readonly ipfsGatewayUrl: "https://previewnet.substrate.dev/ipfs";
51
- readonly registryAddress: string;
52
- readonly productSdkEnvironment: "previewnet";
53
- };
54
45
  readonly local: {
55
46
  readonly assethubUrl: "ws://127.0.0.1:10020";
56
47
  readonly bulletinUrl: "ws://127.0.0.1:10030";
@@ -62,9 +53,9 @@ type KnownChainName = keyof typeof KNOWN_CHAINS;
62
53
  declare function isKnownChainPreset(name: string): boolean;
63
54
  declare function getChainPreset(name: string): ChainPreset;
64
55
 
65
- type CdmDeployAssetHubDescriptor = typeof paseo_asset_hub | typeof previewnet_asset_hub;
56
+ type CdmDeployAssetHubDescriptor = typeof paseo_asset_hub;
66
57
  type CdmAssetHubDescriptor = CdmDeployAssetHubDescriptor | typeof polkadot_asset_hub;
67
- type CdmBulletinDescriptor = typeof paseo_bulletin | typeof previewnet_bulletin;
58
+ type CdmBulletinDescriptor = typeof paseo_bulletin;
68
59
  type CdmDeployAssetHubApi = TypedApi<CdmDeployAssetHubDescriptor>;
69
60
  type CdmAssetHubApi = TypedApi<CdmAssetHubDescriptor>;
70
61
  type CdmBulletinApi = TypedApi<CdmBulletinDescriptor>;
@@ -116,10 +107,10 @@ interface CdmChainEndpoints {
116
107
  /**
117
108
  * Connect to both Asset Hub and Bulletin over direct WebSocket RPC.
118
109
  *
119
- * Accepts either a supported deploy chain name (`"paseo"`, `"preview-net"`,
120
- * `"local"`) resolved through `getChainPreset`, or explicit URLs. Polkadot
121
- * remains available for Asset-Hub-only install reads, but product-sdk does
122
- * not publish a Polkadot Bulletin descriptor yet.
110
+ * Accepts either a supported deploy chain name (`"paseo"` or `"local"`)
111
+ * resolved through `getChainPreset`, or explicit URLs. Polkadot remains
112
+ * available for Asset-Hub-only install reads, but product-sdk does not publish
113
+ * a Polkadot Bulletin descriptor yet.
123
114
  *
124
115
  * The returned object matches product-sdk's `ChainClient` shape closely enough
125
116
  * for callers to pass either one into CDM APIs. CDM builds this locally because
@@ -141,8 +132,8 @@ interface IpfsGateway {
141
132
  * factory for convenience.
142
133
  *
143
134
  * Product SDK's Bulletin read helpers go through the host preimage
144
- * subscription and do not cover CDM's custom gateway URLs (local,
145
- * preview-net). Keep this thin wrapper for install flows.
135
+ * subscription and do not cover CDM's custom gateway URLs (local/custom).
136
+ * Keep this thin wrapper for install flows.
146
137
  */
147
138
  declare function connectIpfsGateway(url: string): IpfsGateway;
148
139
 
package/dist/index.js CHANGED
@@ -1,13 +1,11 @@
1
1
  import {
2
2
  getRegistryAddress
3
- } from "./chunk-3LTEJCST.js";
3
+ } from "./chunk-HTQLXSDE.js";
4
4
 
5
5
  // src/known_chains.ts
6
6
  import { BULLETIN_RPCS } from "@parity/product-sdk-host";
7
7
  var PASEO_ASSET_HUB_URL = "wss://paseo-asset-hub-next-rpc.polkadot.io";
8
- var PREVIEW_NET_ASSET_HUB_URL = "wss://previewnet.substrate.dev/asset-hub";
9
8
  var PASEO_IPFS_GATEWAY_URL = "https://paseo-bulletin-next-ipfs.polkadot.io/ipfs";
10
- var PREVIEW_NET_IPFS_GATEWAY_URL = "https://previewnet.substrate.dev/ipfs";
11
9
  var KNOWN_CHAINS = {
12
10
  polkadot: {
13
11
  assethubUrl: "wss://polkadot-asset-hub-rpc.polkadot.io",
@@ -29,13 +27,6 @@ var KNOWN_CHAINS = {
29
27
  }
30
28
  ]
31
29
  },
32
- "preview-net": {
33
- assethubUrl: PREVIEW_NET_ASSET_HUB_URL,
34
- bulletinUrl: BULLETIN_RPCS.previewnet[0],
35
- ipfsGatewayUrl: PREVIEW_NET_IPFS_GATEWAY_URL,
36
- registryAddress: getRegistryAddress("preview-net"),
37
- productSdkEnvironment: "previewnet"
38
- },
39
30
  local: {
40
31
  assethubUrl: "ws://127.0.0.1:10020",
41
32
  bulletinUrl: "ws://127.0.0.1:10030",
@@ -44,9 +35,8 @@ var KNOWN_CHAINS = {
44
35
  }
45
36
  };
46
37
  function normalizeChainName(name) {
47
- if (name === "previewnet") return "preview-net";
48
38
  if (name === "paseo-next-v2" || name === "paseo-v2") return "paseo";
49
- if (name === "preview-net" || name === "paseo" || name === "polkadot" || name === "local") {
39
+ if (name === "paseo" || name === "polkadot" || name === "local") {
50
40
  return name;
51
41
  }
52
42
  if (name === "custom") return "custom";
@@ -75,25 +65,21 @@ import {
75
65
  import { getWsProvider } from "polkadot-api/ws";
76
66
  import { polkadot_asset_hub } from "@parity/product-sdk-descriptors/polkadot-asset-hub";
77
67
  import { paseo_asset_hub } from "@parity/product-sdk-descriptors/paseo-asset-hub";
78
- import { previewnet_asset_hub } from "@parity/product-sdk-descriptors/previewnet-asset-hub";
79
68
  import { paseo_bulletin } from "@parity/product-sdk-descriptors/paseo-bulletin";
80
- import { previewnet_bulletin } from "@parity/product-sdk-descriptors/previewnet-bulletin";
81
69
  var DEPLOY_CHAIN_DESCRIPTORS = {
82
70
  paseo: { assetHub: paseo_asset_hub, bulletin: paseo_bulletin },
83
- "preview-net": { assetHub: previewnet_asset_hub, bulletin: previewnet_bulletin },
84
71
  local: { assetHub: paseo_asset_hub, bulletin: paseo_bulletin }
85
72
  };
86
73
  var ASSET_HUB_DESCRIPTORS = {
87
74
  polkadot: polkadot_asset_hub,
88
75
  paseo: paseo_asset_hub,
89
- "preview-net": previewnet_asset_hub,
90
76
  local: paseo_asset_hub
91
77
  };
92
78
  function resolveExplicitChainName(chainName) {
93
79
  const normalized = normalizeChainName(chainName);
94
80
  if (!normalized) {
95
81
  throw new Error(
96
- `Unknown chain "${chainName}". Valid names: polkadot, paseo, preview-net, local, custom`
82
+ `Unknown chain "${chainName}". Valid names: polkadot, paseo, local, custom`
97
83
  );
98
84
  }
99
85
  return normalized;
@@ -107,7 +93,7 @@ function resolveDeployDescriptors(chainName) {
107
93
  const descriptorChain = normalized && normalized !== "custom" ? normalized : "paseo";
108
94
  if (descriptorChain === "polkadot") {
109
95
  throw new Error(
110
- 'CDM deploy connections are only available for "paseo", "preview-net", and "local"; product-sdk does not publish a Polkadot Bulletin descriptor yet.'
96
+ 'CDM deploy connections are only available for "paseo" and "local"; product-sdk does not publish a Polkadot Bulletin descriptor yet.'
111
97
  );
112
98
  }
113
99
  return DEPLOY_CHAIN_DESCRIPTORS[descriptorChain];
@@ -161,11 +147,10 @@ function createDirectChainClient(chains, rpcs) {
161
147
  }
162
148
  if (import.meta.vitest) {
163
149
  const { test, expect } = import.meta.vitest;
164
- test("preview-net deploy connections use previewnet descriptors", () => {
165
- const descriptors = resolveDeployDescriptors("preview-net");
166
- expect(descriptors.assetHub).toBe(previewnet_asset_hub);
167
- expect(descriptors.bulletin).toBe(previewnet_bulletin);
168
- expect(descriptors.bulletin).not.toBe(paseo_bulletin);
150
+ test("local deploy connections use paseo descriptors", () => {
151
+ const descriptors = resolveDeployDescriptors("local");
152
+ expect(descriptors.assetHub).toBe(paseo_asset_hub);
153
+ expect(descriptors.bulletin).toBe(paseo_bulletin);
169
154
  });
170
155
  }
171
156
 
@@ -1,4 +1,4 @@
1
- type ProductSdkEnvironment = "paseo" | "previewnet";
1
+ type ProductSdkEnvironment = "paseo";
2
2
  declare function getRegistryAddress(name?: string): string;
3
3
 
4
4
  export { type ProductSdkEnvironment, getRegistryAddress };
package/dist/registry.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getRegistryAddress
3
- } from "./chunk-3LTEJCST.js";
3
+ } from "./chunk-HTQLXSDE.js";
4
4
  export {
5
5
  getRegistryAddress
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdm/env",
3
- "version": "1.0.6-dev.1779335670",
3
+ "version": "2.0.0-dev.1779912670",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -21,13 +21,13 @@
21
21
  "access": "public"
22
22
  },
23
23
  "dependencies": {
24
- "@parity/product-sdk-descriptors": "^0.4.0",
25
- "@parity/product-sdk-host": "^0.3.0",
24
+ "@parity/product-sdk-descriptors": "^0.5.0",
25
+ "@parity/product-sdk-host": "^0.5.0",
26
26
  "@polkadot-labs/hdkd": "^0.0.26",
27
27
  "@polkadot-labs/hdkd-helpers": "^0.0.27",
28
28
  "polkadot-api": "^2.1.2",
29
29
  "smoldot": "^2.0.40",
30
- "@dotdm/utils": "0.3.2-dev.1779335670"
30
+ "@dotdm/utils": "0.4.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^24.10.1",
@@ -1,16 +0,0 @@
1
- // src/registry.ts
2
- var PASEO_V2_REGISTRY_ADDRESS = "0xa7ae171c78f06c248a9b2556c793aa1df5c9173a";
3
- var PREVIEW_NET_REGISTRY_ADDRESS = "0xa7ae171c78f06c248a9b2556c793aa1df5c9173a";
4
- function getRegistryAddress(name = "paseo") {
5
- if (name === "paseo" || name === "paseo-next-v2" || name === "paseo-v2") {
6
- return PASEO_V2_REGISTRY_ADDRESS;
7
- }
8
- if (name === "preview-net" || name === "previewnet") {
9
- return PREVIEW_NET_REGISTRY_ADDRESS;
10
- }
11
- return PASEO_V2_REGISTRY_ADDRESS;
12
- }
13
-
14
- export {
15
- getRegistryAddress
16
- };