@dotdm/env 1.0.4 → 1.0.5-dev.1779077482
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/chunk-SO33KTRP.js +16 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +7 -4
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +6 -0
- package/package.json +8 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/registry.ts
|
|
2
|
+
var PASEO_V2_REGISTRY_ADDRESS = "0xa7ae171c78f06c248a9b2556c793aa1df5c9173a";
|
|
3
|
+
var PREVIEW_NET_REGISTRY_ADDRESS = "0xa7ae171c78f06c248a9b2556c793aa1df5c9173a";
|
|
4
|
+
function getRegistryAddress(name) {
|
|
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 void 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
getRegistryAddress
|
|
16
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ProductSdkEnvironment } from './registry.js';
|
|
2
|
+
export { getRegistryAddress } from './registry.js';
|
|
1
3
|
export { DEFAULT_NODE_URL, REGISTRY_ADDRESS } from '@dotdm/utils';
|
|
2
4
|
import * as polkadot_api from 'polkadot-api';
|
|
3
5
|
import { PolkadotClient, TypedApi } from 'polkadot-api';
|
|
@@ -12,7 +14,7 @@ interface ChainFaucet {
|
|
|
12
14
|
label: string;
|
|
13
15
|
url: string;
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
|
|
16
18
|
interface ChainPreset {
|
|
17
19
|
assethubUrl: string;
|
|
18
20
|
bulletinUrl: string;
|
|
@@ -32,7 +34,7 @@ declare const KNOWN_CHAINS: {
|
|
|
32
34
|
readonly assethubUrl: "wss://paseo-asset-hub-next-rpc.polkadot.io";
|
|
33
35
|
readonly bulletinUrl: "wss://paseo-bulletin-next-rpc.polkadot.io";
|
|
34
36
|
readonly ipfsGatewayUrl: "https://paseo-bulletin-next-ipfs.polkadot.io/ipfs";
|
|
35
|
-
readonly registryAddress:
|
|
37
|
+
readonly registryAddress: string | undefined;
|
|
36
38
|
readonly productSdkEnvironment: "paseo";
|
|
37
39
|
readonly faucets: readonly [{
|
|
38
40
|
readonly label: "Asset Hub";
|
|
@@ -46,7 +48,7 @@ declare const KNOWN_CHAINS: {
|
|
|
46
48
|
readonly assethubUrl: "wss://previewnet.substrate.dev/asset-hub";
|
|
47
49
|
readonly bulletinUrl: "wss://paseo-bulletin-next-rpc.polkadot.io";
|
|
48
50
|
readonly ipfsGatewayUrl: "https://paseo-bulletin-next-ipfs.polkadot.io/ipfs";
|
|
49
|
-
readonly registryAddress:
|
|
51
|
+
readonly registryAddress: string | undefined;
|
|
50
52
|
readonly productSdkEnvironment: "previewnet";
|
|
51
53
|
};
|
|
52
54
|
readonly local: {
|
|
@@ -162,4 +164,4 @@ declare function prepareSignerFromMnemonic(mnemonic: string): polkadot_api.Polka
|
|
|
162
164
|
*/
|
|
163
165
|
declare function prepareSignerFromSuri(suri: string): polkadot_api.PolkadotSigner;
|
|
164
166
|
|
|
165
|
-
export { type AssetHubConnection, type BulletinConnection, type CdmAssetHubApi, type CdmAssetHubClient, type CdmBulletinApi, type CdmChainClient, type CdmChainEndpoints, type CdmDeployAssetHubApi, type ChainFaucet, type ChainPreset, type IpfsGateway, type KnownChainName,
|
|
167
|
+
export { type AssetHubConnection, type BulletinConnection, type CdmAssetHubApi, type CdmAssetHubClient, type CdmBulletinApi, type CdmChainClient, type CdmChainEndpoints, type CdmDeployAssetHubApi, type ChainFaucet, type ChainPreset, type IpfsGateway, type KnownChainName, ProductSdkEnvironment, connectIpfsGateway, createCdmAssetHubClient, createCdmChainClient, getChainPreset, isKnownChainPreset, prepareSigner, prepareSignerFromMnemonic, prepareSignerFromSuri };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getRegistryAddress
|
|
3
|
+
} from "./chunk-SO33KTRP.js";
|
|
4
|
+
|
|
1
5
|
// src/known_chains.ts
|
|
2
6
|
import { BULLETIN_RPCS } from "@parity/product-sdk-host";
|
|
3
7
|
import { REGISTRY_ADDRESS } from "@dotdm/utils";
|
|
4
|
-
var PASEO_V2_REGISTRY_ADDRESS = "0x5c7b23d386ff622c7f7a4e7a95d5c7a67b10a00d";
|
|
5
|
-
var PREVIEW_NET_REGISTRY_ADDRESS = "0x5c7b23d386ff622c7f7a4e7a95d5c7a67b10a00d";
|
|
6
8
|
var PASEO_ASSET_HUB_URL = "wss://paseo-asset-hub-next-rpc.polkadot.io";
|
|
7
9
|
var PASEO_IPFS_GATEWAY_URL = "https://paseo-bulletin-next-ipfs.polkadot.io/ipfs";
|
|
8
10
|
var KNOWN_CHAINS = {
|
|
@@ -16,7 +18,7 @@ var KNOWN_CHAINS = {
|
|
|
16
18
|
assethubUrl: PASEO_ASSET_HUB_URL,
|
|
17
19
|
bulletinUrl: BULLETIN_RPCS.paseo[0],
|
|
18
20
|
ipfsGatewayUrl: PASEO_IPFS_GATEWAY_URL,
|
|
19
|
-
registryAddress:
|
|
21
|
+
registryAddress: getRegistryAddress("paseo"),
|
|
20
22
|
productSdkEnvironment: "paseo",
|
|
21
23
|
faucets: [
|
|
22
24
|
{ label: "Asset Hub", url: "https://faucet.polkadot.io/" },
|
|
@@ -32,7 +34,7 @@ var KNOWN_CHAINS = {
|
|
|
32
34
|
// so CDM stores preview-net metadata on Paseo Bulletin for now.
|
|
33
35
|
bulletinUrl: BULLETIN_RPCS.paseo[0],
|
|
34
36
|
ipfsGatewayUrl: PASEO_IPFS_GATEWAY_URL,
|
|
35
|
-
registryAddress:
|
|
37
|
+
registryAddress: getRegistryAddress("preview-net"),
|
|
36
38
|
productSdkEnvironment: "previewnet"
|
|
37
39
|
},
|
|
38
40
|
local: {
|
|
@@ -194,6 +196,7 @@ export {
|
|
|
194
196
|
createCdmAssetHubClient,
|
|
195
197
|
createCdmChainClient,
|
|
196
198
|
getChainPreset,
|
|
199
|
+
getRegistryAddress,
|
|
197
200
|
isKnownChainPreset,
|
|
198
201
|
prepareSigner,
|
|
199
202
|
prepareSignerFromMnemonic,
|
package/dist/registry.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotdm/env",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-dev.1779077482",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./registry": {
|
|
13
|
+
"types": "./dist/registry.d.ts",
|
|
14
|
+
"import": "./dist/registry.js"
|
|
11
15
|
}
|
|
12
16
|
},
|
|
13
17
|
"files": [
|
|
@@ -18,12 +22,12 @@
|
|
|
18
22
|
},
|
|
19
23
|
"dependencies": {
|
|
20
24
|
"@parity/product-sdk-descriptors": "^0.4.0",
|
|
21
|
-
"@parity/product-sdk-host": "^0.
|
|
25
|
+
"@parity/product-sdk-host": "^0.3.0",
|
|
22
26
|
"@polkadot-labs/hdkd": "^0.0.26",
|
|
23
27
|
"@polkadot-labs/hdkd-helpers": "^0.0.27",
|
|
24
28
|
"polkadot-api": "^2.1.2",
|
|
25
29
|
"smoldot": "^2.0.40",
|
|
26
|
-
"@dotdm/utils": "0.3.1"
|
|
30
|
+
"@dotdm/utils": "0.3.1-dev.1779077482"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
33
|
"@types/node": "^24.10.1",
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
"typescript": "^5.9.3"
|
|
32
36
|
},
|
|
33
37
|
"scripts": {
|
|
34
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
38
|
+
"build": "tsup src/index.ts src/registry.ts --format esm --dts --clean",
|
|
35
39
|
"clean": "rm -rf dist"
|
|
36
40
|
}
|
|
37
41
|
}
|