@parity/product-deploy 0.8.3-rc.8 → 0.8.3
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/README.md +53 -2
- package/bin/bulletin-deploy +21 -1
- package/dist/auth/index.js +2 -1
- package/dist/auth/vendor/index.js +2 -1
- package/dist/auth-config.js +1 -1
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-7DGFJC6E.js → chunk-2OZVKA3D.js} +45 -14
- package/dist/{chunk-3OWKSL7K.js → chunk-3LNKPUZ7.js} +1 -1
- package/dist/{chunk-RPU72Z4B.js → chunk-DKGCOGRT.js} +111 -12
- package/dist/{chunk-OFVBJOFB.js → chunk-HK3B5MKA.js} +1 -1
- package/dist/{chunk-YOQLRCQV.js → chunk-JMHX3M4C.js} +2 -2
- package/dist/{chunk-T4PAK4YK.js → chunk-LRRQP7DH.js} +2 -2
- package/dist/{chunk-EGNMZHMR.js → chunk-S7S7WENB.js} +14 -3
- package/dist/{chunk-WHMNBSG7.js → chunk-WF2XKCEZ.js} +5 -4
- package/dist/{chunk-YXGNQZZF.js → chunk-XM5MFMMX.js} +1 -1
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.js +55 -2
- package/dist/commands/logout.js +2 -2
- package/dist/commands/whoami.js +1 -1
- package/dist/deploy.d.ts +13 -4
- package/dist/deploy.js +10 -8
- package/dist/dotns.d.ts +7 -0
- package/dist/dotns.js +3 -3
- package/dist/index.js +9 -9
- package/dist/manifest/publish.js +9 -9
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +8 -8
- package/dist/personhood/bootstrap.js +3 -3
- package/dist/personhood/people-client.js +3 -3
- package/dist/run-state.js +1 -1
- package/dist/storage-signer.js +8 -8
- package/dist/telemetry.js +2 -2
- package/dist/version-check.js +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-327NAPBD.js → chunk-YUSHBZBX.js} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# bulletin-deploy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CLI tool for deploying web apps to the [Polkadot Bulletin Chain](https://github.com/paritytech/polkadot-bulletin-chain) via [DotNS](https://github.com/paritytech/dotns).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install -g bulletin-deploy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
# Build your app, then deploy:
|
|
15
|
+
bulletin-deploy ./dist my-app.dot
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Session-based signing (mobile wallet)
|
|
19
|
+
|
|
20
|
+
Sign in once with your mobile Polkadot wallet — no mnemonic on disk:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
bulletin-deploy login # Scan QR code with your Polkadot wallet app
|
|
24
|
+
bulletin-deploy whoami # Show the currently signed-in address
|
|
25
|
+
bulletin-deploy logout # Sign out and clear the session
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
After `login`, subsequent deploys will use the session signer automatically.
|
|
29
|
+
|
|
30
|
+
## Options
|
|
31
|
+
|
|
32
|
+
Run `bulletin-deploy --help` for the full option reference.
|
|
33
|
+
|
|
34
|
+
Key options:
|
|
35
|
+
|
|
36
|
+
| Option | Description |
|
|
37
|
+
|--------|-------------|
|
|
38
|
+
| `--env <id>` | Target environment (default: `paseo-next-v2`). Run `--list-environments` to see available IDs. |
|
|
39
|
+
| `--mnemonic "..."` | DotNS owner mnemonic (or set `MNEMONIC` env var). Alternative to session signing. |
|
|
40
|
+
| `--js-merkle` | Use pure-JS merkleization (no IPFS Kubo binary required). |
|
|
41
|
+
| `--publish` | List the domain in the on-chain Publisher registry after deploy. |
|
|
42
|
+
| `--config <path>` | Explicit path to `bulletin-deploy.config.ts` for product deploys. |
|
|
43
|
+
| `--tag "..."` | Label the deploy in telemetry. |
|
|
44
|
+
| `--version` | Print the installed version and exit. |
|
|
45
|
+
|
|
46
|
+
## Environments
|
|
47
|
+
|
|
48
|
+
bulletin-deploy ships with built-in environment presets (RPC endpoints, contract addresses). Use `--list-environments` to print the table. Override individual fields with `--environment-file <path>` or `--contract KEY=0x...`.
|
|
49
|
+
|
|
50
|
+
## Telemetry
|
|
51
|
+
|
|
52
|
+
Anonymous deploy telemetry is sent to Sentry by default. Set `BULLETIN_DEPLOY_UPDATE_CHECK=0` to disable the version check. The DSN is baked into the published package; source builds are silent.
|
|
53
|
+
|
|
54
|
+
## Contributing
|
|
55
|
+
|
|
56
|
+
See [docs-internal/](docs-internal/) for design notes and investigation logs (internal; not published to npm).
|
package/bin/bulletin-deploy
CHANGED
|
@@ -8,6 +8,16 @@ import { loadRunState, writeRunState, shouldSkipStaleWarning, shouldShowOomHint,
|
|
|
8
8
|
import { loadEnvironments, listEnvironments, formatEnvironmentTable, DEFAULT_ENV_ID } from "../dist/environments.js";
|
|
9
9
|
import * as fs from "fs";
|
|
10
10
|
|
|
11
|
+
// Suppress "@parity/product-sdk-logger" localStorage warning in Node.js v22+.
|
|
12
|
+
// The logger tries to read log-level config from localStorage which doesn't exist
|
|
13
|
+
// in Node.js — it emits a NoSuchNativeMethod warning we cannot fix upstream.
|
|
14
|
+
const _origEmitWarning = process.emitWarning.bind(process);
|
|
15
|
+
process.emitWarning = (warning, ...rest) => {
|
|
16
|
+
const msg = (typeof warning === "string" ? warning : warning?.message ?? String(warning)).toLowerCase();
|
|
17
|
+
if (msg.includes("localstorage") || msg.includes("local storage")) return;
|
|
18
|
+
_origEmitWarning(warning, ...rest);
|
|
19
|
+
};
|
|
20
|
+
|
|
11
21
|
// Install early so anything printed during flag parsing / preflight is
|
|
12
22
|
// available to the bug-report log tail.
|
|
13
23
|
installLogCapture();
|
|
@@ -202,6 +212,9 @@ if (flags.help || positional.length === 0) {
|
|
|
202
212
|
|
|
203
213
|
Usage:
|
|
204
214
|
bulletin-deploy <build-dir> <domain.dot> Deploy an app
|
|
215
|
+
bulletin-deploy login Sign in with your Polkadot mobile app
|
|
216
|
+
bulletin-deploy logout Sign out and clear the session
|
|
217
|
+
bulletin-deploy whoami Show the currently signed-in identity
|
|
205
218
|
|
|
206
219
|
Options:
|
|
207
220
|
--env <id> Target environment from environments.json (default: paseo-next-v2).
|
|
@@ -290,7 +303,14 @@ if (!flags.help && !flags.version) {
|
|
|
290
303
|
console.error("");
|
|
291
304
|
markRelaunchOomHintShown();
|
|
292
305
|
} else if (prev.status === "crashed" && prev.reason) {
|
|
293
|
-
|
|
306
|
+
const reasonMap = {
|
|
307
|
+
"unhandled": "crashed unexpectedly",
|
|
308
|
+
"uncaught": "crashed unexpectedly",
|
|
309
|
+
"SIGINT": "was interrupted (Ctrl-C)",
|
|
310
|
+
"SIGTERM": "was stopped",
|
|
311
|
+
};
|
|
312
|
+
const friendly = reasonMap[prev.reason] ?? "did not exit cleanly";
|
|
313
|
+
console.error(` Previous deploy ${friendly}. Continuing.`);
|
|
294
314
|
} else if (prev.status === "running") {
|
|
295
315
|
console.error(` Previous deploy did not exit cleanly. Continuing.`);
|
|
296
316
|
}
|
package/dist/auth/index.js
CHANGED
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
requestResourceAllocation,
|
|
7
7
|
resolveSigner,
|
|
8
8
|
summarizeOutcomes
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-2OZVKA3D.js";
|
|
10
10
|
import {
|
|
11
11
|
renderLoginStatus,
|
|
12
12
|
renderLogoutStatus,
|
|
13
13
|
renderQrCode
|
|
14
14
|
} from "../chunk-RIRDBSBG.js";
|
|
15
|
+
import "../chunk-ZOC4GITL.js";
|
|
15
16
|
export {
|
|
16
17
|
DEFAULT_RESOURCES,
|
|
17
18
|
SignerNotAvailableError,
|
package/dist/auth-config.js
CHANGED
package/dist/bug-report.js
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
offerBugReport,
|
|
10
10
|
scrubSecrets,
|
|
11
11
|
setDeployContext
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LRRQP7DH.js";
|
|
13
|
+
import "./chunk-HK3B5MKA.js";
|
|
14
|
+
import "./chunk-WF2XKCEZ.js";
|
|
15
|
+
import "./chunk-XM5MFMMX.js";
|
|
16
16
|
export {
|
|
17
17
|
buildCliFlagsSummary,
|
|
18
18
|
buildLabels,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NonRetryableError
|
|
3
|
+
} from "./chunk-ZOC4GITL.js";
|
|
4
|
+
|
|
1
5
|
// src/auth/vendor/auth.ts
|
|
2
6
|
import { readdir, unlink } from "fs/promises";
|
|
3
7
|
import { homedir } from "os";
|
|
@@ -33,22 +37,49 @@ function createSessionSigner(session, ref) {
|
|
|
33
37
|
extra: value,
|
|
34
38
|
additionalSigned
|
|
35
39
|
}));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
extensions,
|
|
44
|
-
txExtVersion: 0
|
|
45
|
-
}
|
|
40
|
+
let noAllowanceMsg = null;
|
|
41
|
+
const origErr = console.error;
|
|
42
|
+
console.error = (...args) => {
|
|
43
|
+
const msg = args.map(String).join(" ");
|
|
44
|
+
if (msg.includes("NoAllowanceError") || msg.includes("no allowance set")) {
|
|
45
|
+
noAllowanceMsg = msg;
|
|
46
|
+
return;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
origErr(...args);
|
|
49
|
+
};
|
|
50
|
+
let clearPoll = null;
|
|
51
|
+
try {
|
|
52
|
+
const result = await Promise.race([
|
|
53
|
+
session.createTransaction({
|
|
54
|
+
payload: {
|
|
55
|
+
tag: "v1",
|
|
56
|
+
value: {
|
|
57
|
+
signer: productAccountId,
|
|
58
|
+
genesisHash,
|
|
59
|
+
callData,
|
|
60
|
+
extensions,
|
|
61
|
+
txExtVersion: 0
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}),
|
|
65
|
+
new Promise((_, reject) => {
|
|
66
|
+
clearPoll = setInterval(() => {
|
|
67
|
+
if (noAllowanceMsg) {
|
|
68
|
+
reject(new NonRetryableError(
|
|
69
|
+
"Session signing allowance has expired (~2-3 days after login). Run `bulletin-deploy login` to renew."
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
}, 200);
|
|
73
|
+
})
|
|
74
|
+
]);
|
|
75
|
+
if (result.isErr()) {
|
|
76
|
+
throw new Error(`Mobile signing rejected: ${result.error.message}`);
|
|
77
|
+
}
|
|
78
|
+
return result.value;
|
|
79
|
+
} finally {
|
|
80
|
+
if (clearPoll !== null) clearInterval(clearPoll);
|
|
81
|
+
console.error = origErr;
|
|
50
82
|
}
|
|
51
|
-
return result.value;
|
|
52
83
|
};
|
|
53
84
|
const signBytes = async (data) => {
|
|
54
85
|
const result = await session.signRaw({
|
|
@@ -27,25 +27,26 @@ import {
|
|
|
27
27
|
DOT_DAPP_ID,
|
|
28
28
|
DOT_PRODUCT_ID,
|
|
29
29
|
hasPersistedSession
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YUSHBZBX.js";
|
|
31
31
|
import {
|
|
32
32
|
setDeployContext
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LRRQP7DH.js";
|
|
34
34
|
import {
|
|
35
35
|
probeChunks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3LNKPUZ7.js";
|
|
37
37
|
import {
|
|
38
38
|
packSection
|
|
39
39
|
} from "./chunk-C2TS5MER.js";
|
|
40
40
|
import {
|
|
41
41
|
DotNS,
|
|
42
|
+
PUBLISHER_ABI,
|
|
42
43
|
PublisherNotSupportedError,
|
|
43
44
|
TX_TIMEOUT_MS,
|
|
44
45
|
fetchNonce,
|
|
45
46
|
parseDomainName,
|
|
46
47
|
popStatusName,
|
|
47
48
|
verifyNonceAdvanced
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-S7S7WENB.js";
|
|
49
50
|
import {
|
|
50
51
|
derivePoolAccounts,
|
|
51
52
|
detectTestnet,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
truncateAddress,
|
|
68
69
|
withDeploySpan,
|
|
69
70
|
withSpan
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-WF2XKCEZ.js";
|
|
71
72
|
import {
|
|
72
73
|
DEFAULT_ENV_ID,
|
|
73
74
|
getPopSelfServeConfig,
|
|
@@ -104,6 +105,7 @@ import { base32 } from "multiformats/bases/base32";
|
|
|
104
105
|
import { base58btc } from "multiformats/bases/base58";
|
|
105
106
|
import * as dagPB from "@ipld/dag-pb";
|
|
106
107
|
import { UnixFS } from "ipfs-unixfs";
|
|
108
|
+
import { keccak256, toBytes } from "viem";
|
|
107
109
|
import { cryptoWaitReady } from "@polkadot/util-crypto";
|
|
108
110
|
import { getPolkadotSigner as getPolkadotSigner2 } from "polkadot-api/signer";
|
|
109
111
|
import { sr25519CreateDerive as sr25519CreateDerive2 } from "@polkadot-labs/hdkd";
|
|
@@ -247,7 +249,7 @@ function extractBulletinSlotKey(outcomes) {
|
|
|
247
249
|
if (allocated?.tag !== "BulletInAllowance") continue;
|
|
248
250
|
const key = allocated.value?.slotAccountKey;
|
|
249
251
|
if (!(key instanceof Uint8Array)) continue;
|
|
250
|
-
return toHex(
|
|
252
|
+
return toHex(key);
|
|
251
253
|
}
|
|
252
254
|
return null;
|
|
253
255
|
}
|
|
@@ -452,8 +454,41 @@ async function getDirectProvider(mnemonic, derivationPath = "") {
|
|
|
452
454
|
setDeployAttribute("deploy.signer.address", truncateAddress(ss58));
|
|
453
455
|
return { client, unsafeApi, signer, ss58 };
|
|
454
456
|
}
|
|
457
|
+
async function getSignerProvider(signer, ss58) {
|
|
458
|
+
const primary = BULLETIN_ENDPOINTS[0];
|
|
459
|
+
console.log(` Connecting to Bulletin: ${primary}`);
|
|
460
|
+
const client = createPolkadotClient2(getWsProvider2(
|
|
461
|
+
BULLETIN_ENDPOINTS,
|
|
462
|
+
{ heartbeatTimeout: WS_HEARTBEAT_TIMEOUT_MS, onStatusChanged: makeBulletinStatusHandler(primary) }
|
|
463
|
+
));
|
|
464
|
+
const unsafeApi = client.getUnsafeApi();
|
|
465
|
+
console.log(` Using external signer: ${ss58}`);
|
|
466
|
+
let [auth, currentBlock] = await Promise.all([
|
|
467
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum2("Account", ss58)),
|
|
468
|
+
client.getFinalizedBlock()
|
|
469
|
+
]);
|
|
470
|
+
let now = currentBlock.number;
|
|
471
|
+
if (!auth || Number(auth.expiration ?? 0) <= now) {
|
|
472
|
+
try {
|
|
473
|
+
await ensureAuthorized(unsafeApi, ss58, "external signer");
|
|
474
|
+
[auth, currentBlock] = await Promise.all([
|
|
475
|
+
unsafeApi.query.TransactionStorage.Authorizations.getValue(Enum2("Account", ss58)),
|
|
476
|
+
client.getFinalizedBlock()
|
|
477
|
+
]);
|
|
478
|
+
now = currentBlock.number;
|
|
479
|
+
} catch (e) {
|
|
480
|
+
client.destroy();
|
|
481
|
+
throw new NonRetryableError(`Account ${ss58} is not authorized for Bulletin storage and auto-authorization failed: ${e.message}`);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
console.log(` Authorization: expires at block ${Number(auth?.expiration ?? 0)} (current: ${now})`);
|
|
485
|
+
setDeployAttribute("deploy.signer.mode", "external");
|
|
486
|
+
setDeployAttribute("deploy.signer.address", truncateAddress(ss58));
|
|
487
|
+
return { client, unsafeApi, signer, ss58 };
|
|
488
|
+
}
|
|
455
489
|
function __selectStorageProviderModeForTest(options) {
|
|
456
490
|
if (options.storageSigner && options.storageSignerAddress) return "storageSigner";
|
|
491
|
+
if (options.signer && options.signerAddress) return "signer";
|
|
457
492
|
if (options.mnemonic) return "direct";
|
|
458
493
|
return "pool";
|
|
459
494
|
}
|
|
@@ -478,6 +513,8 @@ function selectStorageReconnect(options) {
|
|
|
478
513
|
}
|
|
479
514
|
};
|
|
480
515
|
}
|
|
516
|
+
if (options.signer && options.signerAddress)
|
|
517
|
+
return () => getSignerProvider(options.signer, options.signerAddress);
|
|
481
518
|
if (options.mnemonic)
|
|
482
519
|
return () => getDirectProvider(options.mnemonic, options.derivationPath);
|
|
483
520
|
return () => getProvider();
|
|
@@ -1687,8 +1724,7 @@ async function publish(dotns, parsed, failOnError) {
|
|
|
1687
1724
|
setDeployAttribute("deploy.publish.status", "failed");
|
|
1688
1725
|
if (failOnError) throw e;
|
|
1689
1726
|
const msg = e?.message ?? String(e);
|
|
1690
|
-
console.
|
|
1691
|
-
captureWarning("publish failed", { error: msg.slice(0, 200) });
|
|
1727
|
+
console.log(` Publish failed: ${msg}`);
|
|
1692
1728
|
}
|
|
1693
1729
|
}
|
|
1694
1730
|
async function unpublish(domainName, options = {}) {
|
|
@@ -1847,7 +1883,14 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1847
1883
|
const outcomes = await requestResourceAllocation(
|
|
1848
1884
|
resolvedUserSession.userSession,
|
|
1849
1885
|
DOT_PRODUCT_ID,
|
|
1850
|
-
|
|
1886
|
+
// StatementStoreAllowance is required for createTransaction (the session
|
|
1887
|
+
// signer uses it to send signing requests to the phone). Include it here
|
|
1888
|
+
// so a deploy without a prior `login` still works. onExisting:"Ignore"
|
|
1889
|
+
// makes this a no-op if the allowance was already granted by login.
|
|
1890
|
+
[
|
|
1891
|
+
{ tag: "BulletInAllowance", value: void 0 },
|
|
1892
|
+
{ tag: "StatementStoreAllowance", value: void 0 }
|
|
1893
|
+
]
|
|
1851
1894
|
);
|
|
1852
1895
|
const hexKey = extractBulletinSlotKey(outcomes);
|
|
1853
1896
|
if (hexKey) {
|
|
@@ -1894,6 +1937,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1894
1937
|
const reconnect = selectStorageReconnect(options);
|
|
1895
1938
|
let dotnsPreflight = null;
|
|
1896
1939
|
let previousContenthashCid = null;
|
|
1940
|
+
let preflightPublishNeeded = false;
|
|
1897
1941
|
try {
|
|
1898
1942
|
console.log("\n" + "=".repeat(60));
|
|
1899
1943
|
console.log("Preflight");
|
|
@@ -1919,10 +1963,34 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1919
1963
|
}
|
|
1920
1964
|
console.log(` Mode: subdomain (parent ${parsed.parentLabel}.dot owned by signer)`);
|
|
1921
1965
|
} else {
|
|
1966
|
+
preflightPublishNeeded = false;
|
|
1922
1967
|
try {
|
|
1923
1968
|
dotnsPreflight = await preflight.preflight(name);
|
|
1924
1969
|
previousContenthashCid = await readPreviousContenthashSafe(preflight, name);
|
|
1925
1970
|
setDeployAttribute("deploy.incremental", previousContenthashCid ? "true" : "false");
|
|
1971
|
+
if (options.publish && parsed && !parsed.isSubdomain) {
|
|
1972
|
+
const publisher = preflight._contracts?.PUBLISHER;
|
|
1973
|
+
const zeroAddr = "0x0000000000000000000000000000000000000000";
|
|
1974
|
+
if (!publisher || publisher === zeroAddr) {
|
|
1975
|
+
console.log(` Publish: not supported on this environment \u2014 will be skipped`);
|
|
1976
|
+
} else {
|
|
1977
|
+
const labelhash = keccak256(toBytes(name));
|
|
1978
|
+
try {
|
|
1979
|
+
const alreadyPublished = await preflight.contractCall(
|
|
1980
|
+
publisher,
|
|
1981
|
+
PUBLISHER_ABI,
|
|
1982
|
+
"isPublished",
|
|
1983
|
+
[labelhash]
|
|
1984
|
+
);
|
|
1985
|
+
preflightPublishNeeded = !alreadyPublished;
|
|
1986
|
+
if (!preflightPublishNeeded) {
|
|
1987
|
+
console.log(` Publish: already published \u2014 will be skipped`);
|
|
1988
|
+
}
|
|
1989
|
+
} catch {
|
|
1990
|
+
preflightPublishNeeded = true;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1926
1994
|
} finally {
|
|
1927
1995
|
preflight.disconnect();
|
|
1928
1996
|
}
|
|
@@ -1944,6 +2012,20 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1944
2012
|
);
|
|
1945
2013
|
}
|
|
1946
2014
|
}
|
|
2015
|
+
if (options.signer && options.signerAddress) {
|
|
2016
|
+
const steps = computePhoneSigningSteps(dotnsPreflight, preflightPublishNeeded);
|
|
2017
|
+
if (steps.length === 1) {
|
|
2018
|
+
console.log(`
|
|
2019
|
+
\u{1F4F1} Have your phone ready \u2014 1 signature needed (${steps[0].toLowerCase()})`);
|
|
2020
|
+
} else if (steps.length > 1) {
|
|
2021
|
+
const display = steps.flatMap(
|
|
2022
|
+
(s, i) => s === "Register" && steps[i - 1] === "Commitment" ? ["(wait)", s] : [s]
|
|
2023
|
+
);
|
|
2024
|
+
console.log(`
|
|
2025
|
+
\u{1F4F1} Have your phone ready \u2014 ${steps.length} signatures needed`);
|
|
2026
|
+
console.log(` ${display.map((s) => s.toLowerCase()).join(" \xB7 ")}`);
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
1947
2029
|
provider = await reconnect();
|
|
1948
2030
|
const providerWithReconnect = { ...provider, reconnect };
|
|
1949
2031
|
const isTestnet = await detectTestnet(provider.unsafeApi);
|
|
@@ -2128,7 +2210,11 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
2128
2210
|
console.log("=".repeat(60));
|
|
2129
2211
|
await withSpan("deploy.dotns", "2. dotns", { "deploy.domain": name, "deploy.subdomain": String(parsed?.isSubdomain ?? false) }, async () => {
|
|
2130
2212
|
const dotns = new DotNS();
|
|
2131
|
-
await dotns.connect(
|
|
2213
|
+
await dotns.connect({
|
|
2214
|
+
...resolveDotnsConnectOptions(options, envAssetHub, envAutoAccountMapping, envContracts, envNativeToEthRatio, envId, envPopSelfServe, envRegisterStorageDeposit),
|
|
2215
|
+
...options.signer && options.signerAddress ? { onPhoneSigningRequired: (label) => console.log(`
|
|
2216
|
+
Check your phone \u2192 ${label}`) } : {}
|
|
2217
|
+
});
|
|
2132
2218
|
if (parsed?.isSubdomain) {
|
|
2133
2219
|
const { owned, owner } = await dotns.checkSubdomainOwnership(parsed.sublabel, parsed.parentLabel);
|
|
2134
2220
|
if (owned) {
|
|
@@ -2153,7 +2239,9 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
2153
2239
|
const contenthashHex = `0x${encodeContenthash(cid)}`;
|
|
2154
2240
|
await dotns.setContenthash(name, contenthashHex);
|
|
2155
2241
|
if (options.publish && parsed) {
|
|
2156
|
-
|
|
2242
|
+
if (preflightPublishNeeded !== false) {
|
|
2243
|
+
await publish(dotns, parsed, options.failOnPublishError);
|
|
2244
|
+
}
|
|
2157
2245
|
}
|
|
2158
2246
|
dotns.disconnect();
|
|
2159
2247
|
});
|
|
@@ -2219,6 +2307,16 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
2219
2307
|
sessionCleanup?.();
|
|
2220
2308
|
}
|
|
2221
2309
|
}
|
|
2310
|
+
function computePhoneSigningSteps(dotnsPreflight, publishNeeded) {
|
|
2311
|
+
if (!dotnsPreflight || dotnsPreflight.plannedAction === "abort") return [];
|
|
2312
|
+
const steps = [];
|
|
2313
|
+
if (dotnsPreflight.plannedAction === "register") {
|
|
2314
|
+
steps.push("Commitment", "Register");
|
|
2315
|
+
}
|
|
2316
|
+
steps.push("Link content");
|
|
2317
|
+
if (publishNeeded) steps.push("Publish to registry");
|
|
2318
|
+
return steps;
|
|
2319
|
+
}
|
|
2222
2320
|
|
|
2223
2321
|
// src/merkle.ts
|
|
2224
2322
|
var CidPreservingBlockstore = class {
|
|
@@ -2664,5 +2762,6 @@ export {
|
|
|
2664
2762
|
browserUrlFor,
|
|
2665
2763
|
interpretBitswapResult,
|
|
2666
2764
|
probeP2pRetrieval,
|
|
2667
|
-
deploy
|
|
2765
|
+
deploy,
|
|
2766
|
+
computePhoneSigningSteps
|
|
2668
2767
|
};
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
resolveDotnsConnectOptions,
|
|
7
7
|
storeDirectory,
|
|
8
8
|
storeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DKGCOGRT.js";
|
|
10
10
|
import {
|
|
11
11
|
DotNS
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S7S7WENB.js";
|
|
13
13
|
import {
|
|
14
14
|
getPopSelfServeConfig,
|
|
15
15
|
loadEnvironments,
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HK3B5MKA.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WF2XKCEZ.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
setDeploySentryTag,
|
|
9
9
|
truncateAddress,
|
|
10
10
|
withSpan
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WF2XKCEZ.js";
|
|
12
12
|
import {
|
|
13
13
|
validateContractAddresses
|
|
14
14
|
} from "./chunk-5K3RI5C2.js";
|
|
@@ -759,8 +759,8 @@ var ReviveClientWrapper = class _ReviveClientWrapper {
|
|
|
759
759
|
const decision = classifyTxRetryDecision(e);
|
|
760
760
|
if (decision === "abort" || attempt === DOTNS_TX_MAX_ATTEMPTS) break;
|
|
761
761
|
const ms = dotnsRetryBackoffMs(attempt);
|
|
762
|
-
const
|
|
763
|
-
console.log(` ${label}: attempt ${attempt}/${DOTNS_TX_MAX_ATTEMPTS} failed (${
|
|
762
|
+
const msg = e?.message ?? String(e);
|
|
763
|
+
console.log(` ${label}: attempt ${attempt}/${DOTNS_TX_MAX_ATTEMPTS} failed (${msg}), retrying in ${ms}ms\u2026`);
|
|
764
764
|
await new Promise((r) => setTimeout(r, ms));
|
|
765
765
|
}
|
|
766
766
|
}
|
|
@@ -958,6 +958,7 @@ var DotNS = class {
|
|
|
958
958
|
_environmentId = null;
|
|
959
959
|
_popSelfServe = null;
|
|
960
960
|
_registerStorageDeposit = MINIMUM_REGISTER_STORAGE_DEPOSIT;
|
|
961
|
+
_onPhoneSigningRequired = void 0;
|
|
961
962
|
// Test-only seam: consumed once by classifyAliasAccountState() then cleared.
|
|
962
963
|
// Mirrors the __setDeployRootSpanForTest / __setSentryForTest pattern.
|
|
963
964
|
_classifyOverrideForTest = null;
|
|
@@ -1005,6 +1006,9 @@ var DotNS = class {
|
|
|
1005
1006
|
if (options.registerStorageDeposit !== void 0) {
|
|
1006
1007
|
this._registerStorageDeposit = options.registerStorageDeposit;
|
|
1007
1008
|
}
|
|
1009
|
+
if (options.onPhoneSigningRequired !== void 0) {
|
|
1010
|
+
this._onPhoneSigningRequired = options.onPhoneSigningRequired;
|
|
1011
|
+
}
|
|
1008
1012
|
const rpc = options.rpc || process.env.DOTNS_RPC || this.assetHubEndpoints[0];
|
|
1009
1013
|
this.rpc = rpc;
|
|
1010
1014
|
this._usesExternalSigner = Boolean(options.signer && options.signerAddress);
|
|
@@ -1657,6 +1661,9 @@ var DotNS = class {
|
|
|
1657
1661
|
await new Promise((r) => setTimeout(r, POLL_INTERVAL_MS));
|
|
1658
1662
|
}
|
|
1659
1663
|
};
|
|
1664
|
+
console.log(`
|
|
1665
|
+
Linking content...`);
|
|
1666
|
+
this._onPhoneSigningRequired?.("Link content");
|
|
1660
1667
|
const txRes = await this.contractTransaction(this._contracts.DOTNS_CONTENT_RESOLVER, 0n, DOTNS_CONTENT_RESOLVER_ABI, "setContenthash", [node, contenthashHex], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect });
|
|
1661
1668
|
const finalOnChain = (await this.getContenthash(domainName) || "0x").toLowerCase();
|
|
1662
1669
|
if (finalOnChain !== expected) {
|
|
@@ -1884,6 +1891,7 @@ var DotNS = class {
|
|
|
1884
1891
|
}
|
|
1885
1892
|
};
|
|
1886
1893
|
try {
|
|
1894
|
+
this._onPhoneSigningRequired?.("Publish to registry");
|
|
1887
1895
|
const txRes = await this.contractTransaction(publisher, 0n, PUBLISHER_ABI, "publish", [label], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect });
|
|
1888
1896
|
const finalPublished = await withTimeout(
|
|
1889
1897
|
this.contractCall(publisher, PUBLISHER_ABI, "isPublished", [labelhash]),
|
|
@@ -2028,6 +2036,7 @@ var DotNS = class {
|
|
|
2028
2036
|
this.ensureConnected();
|
|
2029
2037
|
console.log(`
|
|
2030
2038
|
Submitting commitment...`);
|
|
2039
|
+
this._onPhoneSigningRequired?.("Commitment");
|
|
2031
2040
|
const commitTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, 0n, DOTNS_REGISTRAR_CONTROLLER_ABI, "commit", [commitment], (s) => console.log(` ${s}`));
|
|
2032
2041
|
logTxResolution(commitTxRes);
|
|
2033
2042
|
console.log(` Committed at: ${(/* @__PURE__ */ new Date()).toISOString()}`);
|
|
@@ -2122,6 +2131,7 @@ var DotNS = class {
|
|
|
2122
2131
|
setDeployAttribute("deploy.payment_wei", priceWei.toString());
|
|
2123
2132
|
console.log(` Oracle price: ${formatEther(priceWei)} PAS`);
|
|
2124
2133
|
console.log(` Paying: ${formatEther(bufferedPaymentWei)} PAS`);
|
|
2134
|
+
this._onPhoneSigningRequired?.("Register");
|
|
2125
2135
|
const registerTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, bufferedPaymentNative, DOTNS_REGISTRAR_CONTROLLER_ABI, "register", [registration], (s) => console.log(` ${s}`));
|
|
2126
2136
|
logTxResolution(registerTxRes);
|
|
2127
2137
|
if (registerTxRes.kind === TX_KIND_HASH) {
|
|
@@ -2545,6 +2555,7 @@ var DotNS = class {
|
|
|
2545
2555
|
this.connected = false;
|
|
2546
2556
|
}
|
|
2547
2557
|
this._usesExternalSigner = false;
|
|
2558
|
+
this._onPhoneSigningRequired = void 0;
|
|
2548
2559
|
}
|
|
2549
2560
|
};
|
|
2550
2561
|
var dotns = new DotNS();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
writeRunState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XM5MFMMX.js";
|
|
5
5
|
|
|
6
6
|
// src/memory-report.ts
|
|
7
7
|
import * as fs2 from "fs";
|
|
@@ -17,7 +17,6 @@ import * as path from "path";
|
|
|
17
17
|
var VERSION = package_default.version;
|
|
18
18
|
var DOTNS_BACKEND = "contract";
|
|
19
19
|
var DOTNS_POP_SOURCE = "personhood-precompile";
|
|
20
|
-
var DEFAULT_DSN = "https://e021c025d79c4c3ade2862a11f13c40b@o4511059872841728.ingest.de.sentry.io/4511093597405264";
|
|
21
20
|
var INTERNAL_ORG_RE = /^(paritytech|w3f|polkadot-fellows)\//i;
|
|
22
21
|
var PARITY_HOST_APPS = /* @__PURE__ */ new Set(["playground-cli"]);
|
|
23
22
|
function extractRepoSlug(url) {
|
|
@@ -45,7 +44,7 @@ function isInternalContext() {
|
|
|
45
44
|
hostApp: process.env.BULLETIN_DEPLOY_HOST_APP
|
|
46
45
|
});
|
|
47
46
|
}
|
|
48
|
-
var OPT_OUT = process.env.BULLETIN_DEPLOY_TELEMETRY === "0";
|
|
47
|
+
var OPT_OUT = process.env.BULLETIN_DEPLOY_TELEMETRY === "0" || process.env.BULLETIN_DEPLOY_TELEMETRY === "off";
|
|
49
48
|
var OPT_IN = process.env.BULLETIN_DEPLOY_TELEMETRY === "1";
|
|
50
49
|
var DISABLED = OPT_OUT || !OPT_IN && !isInternalContext();
|
|
51
50
|
var CONVENTIONAL_BRANCH_PREFIXES = /* @__PURE__ */ new Set([
|
|
@@ -117,8 +116,10 @@ function initTelemetry() {
|
|
|
117
116
|
if (process.env.BULLETIN_DEPLOY_USE_AMBIENT_SENTRY === "1") {
|
|
118
117
|
return;
|
|
119
118
|
}
|
|
119
|
+
const dsn = process.env.SENTRY_DSN || (true ? "" : "");
|
|
120
|
+
if (!dsn) return;
|
|
120
121
|
Sentry.init({
|
|
121
|
-
dsn
|
|
122
|
+
dsn,
|
|
122
123
|
release: `${package_default.name}@${VERSION}`,
|
|
123
124
|
tracesSampleRate: 1,
|
|
124
125
|
environment: process.env.CI ? "ci" : "local",
|
package/dist/chunk-probe.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
_decodeStorageValue,
|
|
6
6
|
_resetProbeSession,
|
|
7
7
|
probeChunks
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-3LNKPUZ7.js";
|
|
9
|
+
import "./chunk-WF2XKCEZ.js";
|
|
10
|
+
import "./chunk-XM5MFMMX.js";
|
|
11
11
|
export {
|
|
12
12
|
ChainProbeCrossValidationError,
|
|
13
13
|
ChainProbeMetadataError,
|
package/dist/commands/login.js
CHANGED
|
@@ -2,13 +2,31 @@ import "../chunk-JQKKMUCT.js";
|
|
|
2
2
|
import {
|
|
3
3
|
DEFAULT_RESOURCES,
|
|
4
4
|
summarizeOutcomes
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-2OZVKA3D.js";
|
|
6
6
|
import {
|
|
7
7
|
renderLoginStatus
|
|
8
8
|
} from "../chunk-RIRDBSBG.js";
|
|
9
9
|
import {
|
|
10
|
+
extractBulletinSlotKey,
|
|
11
|
+
writeBulletinSlotKey
|
|
12
|
+
} from "../chunk-DKGCOGRT.js";
|
|
13
|
+
import "../chunk-HOTQDYHD.js";
|
|
14
|
+
import "../chunk-IW3X2MJF.js";
|
|
15
|
+
import "../chunk-KOSF5FDO.js";
|
|
16
|
+
import "../chunk-J3NIXHZZ.js";
|
|
17
|
+
import "../chunk-S7EM5VMW.js";
|
|
18
|
+
import {
|
|
19
|
+
DOT_DAPP_ID,
|
|
10
20
|
getAuthClient
|
|
11
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-YUSHBZBX.js";
|
|
22
|
+
import "../chunk-LRRQP7DH.js";
|
|
23
|
+
import "../chunk-HK3B5MKA.js";
|
|
24
|
+
import "../chunk-3LNKPUZ7.js";
|
|
25
|
+
import "../chunk-C2TS5MER.js";
|
|
26
|
+
import "../chunk-S7S7WENB.js";
|
|
27
|
+
import "../chunk-QS7YU76C.js";
|
|
28
|
+
import "../chunk-WF2XKCEZ.js";
|
|
29
|
+
import "../chunk-XM5MFMMX.js";
|
|
12
30
|
import "../chunk-5K3RI5C2.js";
|
|
13
31
|
import "../chunk-ZOC4GITL.js";
|
|
14
32
|
|
|
@@ -30,6 +48,36 @@ async function runLogin(envId, _opts = {}) {
|
|
|
30
48
|
const client = await getAuthClient(envId);
|
|
31
49
|
const result = await client.connect();
|
|
32
50
|
if (result.kind === "existing") {
|
|
51
|
+
const sessionHandle2 = await client.getSessionSigner();
|
|
52
|
+
if (sessionHandle2) {
|
|
53
|
+
let sssExpired = false;
|
|
54
|
+
const origErr = console.error;
|
|
55
|
+
console.error = (...args) => {
|
|
56
|
+
const msg = args.map(String).join(" ");
|
|
57
|
+
if (msg.includes("NoAllowanceError") || msg.includes("no allowance set")) {
|
|
58
|
+
sssExpired = true;
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
origErr(...args);
|
|
62
|
+
};
|
|
63
|
+
await Promise.race([
|
|
64
|
+
client.requestAllocation(sessionHandle2.userSession, DEFAULT_RESOURCES).catch(() => {
|
|
65
|
+
}),
|
|
66
|
+
new Promise((r) => setTimeout(r, 3e3))
|
|
67
|
+
]);
|
|
68
|
+
console.error = origErr;
|
|
69
|
+
sessionHandle2.destroy();
|
|
70
|
+
if (sssExpired) {
|
|
71
|
+
console.error(
|
|
72
|
+
`
|
|
73
|
+
Statement Store allowance has expired for ${result.address}.
|
|
74
|
+
Run: bulletin-deploy logout
|
|
75
|
+
Then: bulletin-deploy login
|
|
76
|
+
to re-pair and renew (allowance lasts ~2-3 days).`
|
|
77
|
+
);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
33
81
|
console.log(`Already signed in as: ${result.address}`);
|
|
34
82
|
return;
|
|
35
83
|
}
|
|
@@ -49,6 +97,11 @@ async function runLogin(envId, _opts = {}) {
|
|
|
49
97
|
const outcomes = await client.requestAllocation(sessionHandle.userSession, DEFAULT_RESOURCES);
|
|
50
98
|
const summary = summarizeOutcomes(outcomes, DEFAULT_RESOURCES);
|
|
51
99
|
console.log("\n" + summarizeLogin(address, summary));
|
|
100
|
+
const hexKey = extractBulletinSlotKey(outcomes);
|
|
101
|
+
if (hexKey) {
|
|
102
|
+
await writeBulletinSlotKey(DOT_DAPP_ID, hexKey);
|
|
103
|
+
console.log(` Bulletin storage key cached \u2713`);
|
|
104
|
+
}
|
|
52
105
|
} finally {
|
|
53
106
|
sessionHandle.destroy();
|
|
54
107
|
}
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-2OZVKA3D.js";
|
|
3
3
|
import {
|
|
4
4
|
renderLogoutStatus
|
|
5
5
|
} from "../chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
getAuthClient
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-YUSHBZBX.js";
|
|
9
9
|
import "../chunk-5K3RI5C2.js";
|
|
10
10
|
import "../chunk-ZOC4GITL.js";
|
|
11
11
|
|
package/dist/commands/whoami.js
CHANGED
package/dist/deploy.d.ts
CHANGED
|
@@ -82,9 +82,8 @@ declare const ENCRYPT_TAG_LEN = 16;
|
|
|
82
82
|
declare const ENCRYPT_KEY_LEN = 32;
|
|
83
83
|
declare const ENCRYPT_PBKDF2_ITERATIONS = 100000;
|
|
84
84
|
declare function encryptContent(data: Uint8Array, password: string): Promise<Uint8Array>;
|
|
85
|
-
/** storageSigner > mnemonic > pool precedence for storage routing. Exported for unit testing.
|
|
86
|
-
|
|
87
|
-
declare function __selectStorageProviderModeForTest(options: Pick<DeployOptions, "storageSigner" | "storageSignerAddress" | "mnemonic">): "storageSigner" | "direct" | "pool";
|
|
85
|
+
/** storageSigner > signer > mnemonic > pool precedence for storage routing. Exported for unit testing. */
|
|
86
|
+
declare function __selectStorageProviderModeForTest(options: Pick<DeployOptions, "storageSigner" | "storageSignerAddress" | "signer" | "signerAddress" | "mnemonic">): "storageSigner" | "signer" | "direct" | "pool";
|
|
88
87
|
/**
|
|
89
88
|
* Decide how to source the signer for a deploy invocation. Exported for unit testing.
|
|
90
89
|
*
|
|
@@ -378,5 +377,15 @@ declare function interpretBitswapResult(outcome: {
|
|
|
378
377
|
*/
|
|
379
378
|
declare function probeP2pRetrieval(client: any, cid: string, timeoutMs?: number): Promise<BitswapProbeResult>;
|
|
380
379
|
declare function deploy(content: DeployContent, domainName?: string | null, options?: DeployOptions): Promise<DeployResult>;
|
|
380
|
+
/**
|
|
381
|
+
* Compute the ordered list of step labels that will require a phone tap,
|
|
382
|
+
* given the DotNS preflight result and whether publish is needed.
|
|
383
|
+
* Returns [] when deploy would abort or preflight is null.
|
|
384
|
+
* Exported for unit testing.
|
|
385
|
+
*/
|
|
386
|
+
declare function computePhoneSigningSteps(dotnsPreflight: {
|
|
387
|
+
plannedAction: string;
|
|
388
|
+
needsPopUpgrade: boolean;
|
|
389
|
+
} | null, publishNeeded: boolean): string[];
|
|
381
390
|
|
|
382
|
-
export { BULLETIN_ENDPOINTS, type BitswapErrorVariant, type BitswapProbeResult, CHUNK_MORTALITY_PERIOD, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, type DeployContent, type DeployOptions, type DeployResult, ENCRYPT_KEY_LEN, ENCRYPT_MAGIC, ENCRYPT_NONCE_LEN, ENCRYPT_PBKDF2_ITERATIONS, ENCRYPT_SALT_LEN, ENCRYPT_TAG_LEN, type SizeDecision, type StoreDirectoryOptions, WS_HEARTBEAT_TIMEOUT_MS, __assignDenseNoncesForTest, __selectStorageProviderModeForTest, applyManifestFetchAttributes, assertSubdomainOwnerMatchesSigner, browserUrlFor, buildFilesMap, checkDeploySize, chooseSignerInput, chunk, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
|
391
|
+
export { BULLETIN_ENDPOINTS, type BitswapErrorVariant, type BitswapProbeResult, CHUNK_MORTALITY_PERIOD, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, type DeployContent, type DeployOptions, type DeployResult, ENCRYPT_KEY_LEN, ENCRYPT_MAGIC, ENCRYPT_NONCE_LEN, ENCRYPT_PBKDF2_ITERATIONS, ENCRYPT_SALT_LEN, ENCRYPT_TAG_LEN, type SizeDecision, type StoreDirectoryOptions, WS_HEARTBEAT_TIMEOUT_MS, __assignDenseNoncesForTest, __selectStorageProviderModeForTest, applyManifestFetchAttributes, assertSubdomainOwnerMatchesSigner, browserUrlFor, buildFilesMap, checkDeploySize, chooseSignerInput, chunk, computePhoneSigningSteps, computeStorageCid, createCID, deploy, deriveRootSigner, detectFramework, encodeContenthash, encryptContent, estimateUploadBytes, friendlyChainError, hasIPFS, interpretBitswapResult, isConnectionError, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
package/dist/deploy.js
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
checkDeploySize,
|
|
20
20
|
chooseSignerInput,
|
|
21
21
|
chunk,
|
|
22
|
+
computePhoneSigningSteps,
|
|
22
23
|
computeStorageCid,
|
|
23
24
|
createCID,
|
|
24
25
|
deploy,
|
|
@@ -43,21 +44,21 @@ import {
|
|
|
43
44
|
storeDirectoryV2,
|
|
44
45
|
storeFile,
|
|
45
46
|
unpublish
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-DKGCOGRT.js";
|
|
47
48
|
import "./chunk-HOTQDYHD.js";
|
|
48
49
|
import "./chunk-IW3X2MJF.js";
|
|
49
50
|
import "./chunk-KOSF5FDO.js";
|
|
50
51
|
import "./chunk-J3NIXHZZ.js";
|
|
51
52
|
import "./chunk-S7EM5VMW.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-YUSHBZBX.js";
|
|
54
|
+
import "./chunk-LRRQP7DH.js";
|
|
55
|
+
import "./chunk-HK3B5MKA.js";
|
|
56
|
+
import "./chunk-3LNKPUZ7.js";
|
|
56
57
|
import "./chunk-C2TS5MER.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-S7S7WENB.js";
|
|
58
59
|
import "./chunk-QS7YU76C.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-WF2XKCEZ.js";
|
|
61
|
+
import "./chunk-XM5MFMMX.js";
|
|
61
62
|
import "./chunk-5K3RI5C2.js";
|
|
62
63
|
import {
|
|
63
64
|
EXIT_CODE_NO_RETRY,
|
|
@@ -86,6 +87,7 @@ export {
|
|
|
86
87
|
checkDeploySize,
|
|
87
88
|
chooseSignerInput,
|
|
88
89
|
chunk,
|
|
90
|
+
computePhoneSigningSteps,
|
|
89
91
|
computeStorageCid,
|
|
90
92
|
createCID,
|
|
91
93
|
deploy,
|
package/dist/dotns.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ interface DotNSConnectOptions {
|
|
|
30
30
|
popSelfServe?: PopSelfServeConfig | null;
|
|
31
31
|
/** Optional override for the storage deposit required for a fresh TLD register(). Loaded from environments.json per-env. */
|
|
32
32
|
registerStorageDeposit?: bigint;
|
|
33
|
+
/**
|
|
34
|
+
* Called immediately before each on-chain transaction that requires an
|
|
35
|
+
* interactive mobile wallet approval. Only wired in when the session signer
|
|
36
|
+
* is active; pool/mnemonic paths leave this unset.
|
|
37
|
+
*/
|
|
38
|
+
onPhoneSigningRequired?: (label: string) => void;
|
|
33
39
|
}
|
|
34
40
|
interface OwnershipResult {
|
|
35
41
|
owned: boolean;
|
|
@@ -394,6 +400,7 @@ declare class DotNS {
|
|
|
394
400
|
private _environmentId;
|
|
395
401
|
private _popSelfServe;
|
|
396
402
|
private _registerStorageDeposit;
|
|
403
|
+
private _onPhoneSigningRequired;
|
|
397
404
|
private _classifyOverrideForTest;
|
|
398
405
|
/** Test-only: inject a fixed classifyAliasAccountState return value for the next call. Consumed once. */
|
|
399
406
|
__setClassifyOverrideForTest(state: AliasAccountState): void;
|
package/dist/dotns.js
CHANGED
|
@@ -50,10 +50,10 @@ import {
|
|
|
50
50
|
stripTrailingDigits,
|
|
51
51
|
validateDomainLabel,
|
|
52
52
|
verifyNonceAdvanced
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-S7S7WENB.js";
|
|
54
54
|
import "./chunk-QS7YU76C.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-WF2XKCEZ.js";
|
|
56
|
+
import "./chunk-XM5MFMMX.js";
|
|
57
57
|
import "./chunk-5K3RI5C2.js";
|
|
58
58
|
import "./chunk-ZOC4GITL.js";
|
|
59
59
|
export {
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-MMAZFJDG.js";
|
|
5
5
|
import {
|
|
6
6
|
publishManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JMHX3M4C.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_TEXT_RECORD_BUDGET_BYTES,
|
|
10
10
|
PLACEHOLDER_CID,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
deploy,
|
|
25
25
|
merkleizeJS,
|
|
26
26
|
merkleizeWithStableOrder
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-DKGCOGRT.js";
|
|
28
28
|
import "./chunk-HOTQDYHD.js";
|
|
29
29
|
import {
|
|
30
30
|
computeStats,
|
|
@@ -47,19 +47,19 @@ import {
|
|
|
47
47
|
isVolatilePath,
|
|
48
48
|
parseManifest
|
|
49
49
|
} from "./chunk-S7EM5VMW.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-YUSHBZBX.js";
|
|
51
|
+
import "./chunk-LRRQP7DH.js";
|
|
52
|
+
import "./chunk-HK3B5MKA.js";
|
|
53
53
|
import {
|
|
54
54
|
probeChunks
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-3LNKPUZ7.js";
|
|
56
56
|
import "./chunk-C2TS5MER.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_MNEMONIC,
|
|
59
59
|
DotNS,
|
|
60
60
|
parseDomainName,
|
|
61
61
|
sanitizeDomainLabel
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-S7S7WENB.js";
|
|
63
63
|
import {
|
|
64
64
|
bootstrapPool,
|
|
65
65
|
derivePoolAccounts,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
fetchPoolAuthorizations,
|
|
68
68
|
selectAccount
|
|
69
69
|
} from "./chunk-QS7YU76C.js";
|
|
70
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-WF2XKCEZ.js";
|
|
71
71
|
import {
|
|
72
72
|
VERSION,
|
|
73
73
|
loadRunState,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
shouldSkipStaleWarning,
|
|
78
78
|
stateFilePath,
|
|
79
79
|
writeRunState
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-XM5MFMMX.js";
|
|
81
81
|
import {
|
|
82
82
|
DEFAULT_ENV_ID,
|
|
83
83
|
deepMergeEnvironments,
|
package/dist/manifest/publish.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishManifest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JMHX3M4C.js";
|
|
4
4
|
import "../chunk-RI3ZLNPN.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-DKGCOGRT.js";
|
|
6
6
|
import "../chunk-HOTQDYHD.js";
|
|
7
7
|
import "../chunk-IW3X2MJF.js";
|
|
8
8
|
import "../chunk-KOSF5FDO.js";
|
|
9
9
|
import "../chunk-J3NIXHZZ.js";
|
|
10
10
|
import "../chunk-S7EM5VMW.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-YUSHBZBX.js";
|
|
12
|
+
import "../chunk-LRRQP7DH.js";
|
|
13
|
+
import "../chunk-HK3B5MKA.js";
|
|
14
|
+
import "../chunk-3LNKPUZ7.js";
|
|
15
15
|
import "../chunk-C2TS5MER.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-S7S7WENB.js";
|
|
17
17
|
import "../chunk-QS7YU76C.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-WF2XKCEZ.js";
|
|
19
|
+
import "../chunk-XM5MFMMX.js";
|
|
20
20
|
import "../chunk-5K3RI5C2.js";
|
|
21
21
|
import "../chunk-ZOC4GITL.js";
|
|
22
22
|
export {
|
package/dist/memory-report.js
CHANGED
package/dist/merkle.js
CHANGED
|
@@ -6,21 +6,21 @@ import {
|
|
|
6
6
|
merkleizeKuboBackend,
|
|
7
7
|
merkleizeWithStableOrder,
|
|
8
8
|
rebuildOrderedCarFromBytes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DKGCOGRT.js";
|
|
10
10
|
import "./chunk-HOTQDYHD.js";
|
|
11
11
|
import "./chunk-IW3X2MJF.js";
|
|
12
12
|
import "./chunk-KOSF5FDO.js";
|
|
13
13
|
import "./chunk-J3NIXHZZ.js";
|
|
14
14
|
import "./chunk-S7EM5VMW.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-YUSHBZBX.js";
|
|
16
|
+
import "./chunk-LRRQP7DH.js";
|
|
17
|
+
import "./chunk-HK3B5MKA.js";
|
|
18
|
+
import "./chunk-3LNKPUZ7.js";
|
|
19
19
|
import "./chunk-C2TS5MER.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-S7S7WENB.js";
|
|
21
21
|
import "./chunk-QS7YU76C.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-WF2XKCEZ.js";
|
|
23
|
+
import "./chunk-XM5MFMMX.js";
|
|
24
24
|
import "./chunk-5K3RI5C2.js";
|
|
25
25
|
import "./chunk-ZOC4GITL.js";
|
|
26
26
|
export {
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
} from "../chunk-SI2ZUOYD.js";
|
|
27
27
|
import {
|
|
28
28
|
WS_HEARTBEAT_TIMEOUT_MS
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-S7S7WENB.js";
|
|
30
30
|
import "../chunk-QS7YU76C.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-WF2XKCEZ.js";
|
|
32
|
+
import "../chunk-XM5MFMMX.js";
|
|
33
33
|
import {
|
|
34
34
|
loadEnvironments
|
|
35
35
|
} from "../chunk-5K3RI5C2.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WS_HEARTBEAT_TIMEOUT_MS
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-S7S7WENB.js";
|
|
4
4
|
import "../chunk-QS7YU76C.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-WF2XKCEZ.js";
|
|
6
|
+
import "../chunk-XM5MFMMX.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEnvironments
|
|
9
9
|
} from "../chunk-5K3RI5C2.js";
|
package/dist/run-state.js
CHANGED
package/dist/storage-signer.js
CHANGED
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
getSlotSignerProvider,
|
|
4
4
|
readBulletinSlotSigner,
|
|
5
5
|
writeBulletinSlotKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DKGCOGRT.js";
|
|
7
7
|
import "./chunk-HOTQDYHD.js";
|
|
8
8
|
import "./chunk-IW3X2MJF.js";
|
|
9
9
|
import "./chunk-KOSF5FDO.js";
|
|
10
10
|
import "./chunk-J3NIXHZZ.js";
|
|
11
11
|
import "./chunk-S7EM5VMW.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-YUSHBZBX.js";
|
|
13
|
+
import "./chunk-LRRQP7DH.js";
|
|
14
|
+
import "./chunk-HK3B5MKA.js";
|
|
15
|
+
import "./chunk-3LNKPUZ7.js";
|
|
16
16
|
import "./chunk-C2TS5MER.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-S7S7WENB.js";
|
|
18
18
|
import "./chunk-QS7YU76C.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-WF2XKCEZ.js";
|
|
20
|
+
import "./chunk-XM5MFMMX.js";
|
|
21
21
|
import "./chunk-5K3RI5C2.js";
|
|
22
22
|
import "./chunk-ZOC4GITL.js";
|
|
23
23
|
export {
|
package/dist/telemetry.js
CHANGED
package/dist/version-check.js
CHANGED
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
isPreReleaseVersion,
|
|
12
12
|
preReleaseWarning,
|
|
13
13
|
promptYesNo
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-HK3B5MKA.js";
|
|
15
|
+
import "./chunk-WF2XKCEZ.js";
|
|
16
|
+
import "./chunk-XM5MFMMX.js";
|
|
17
17
|
export {
|
|
18
18
|
assessVersion,
|
|
19
19
|
checkNodeVersion,
|
package/package.json
CHANGED
|
File without changes
|