@parity/product-deploy 0.10.0-rc.3 → 0.10.0-rc.4
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/DEPLOYMENT.md +61 -83
- package/bin/bulletin-bootstrap +24 -9
- package/dist/auth/index.js +2 -1
- package/dist/auth/vendor/index.js +2 -1
- package/dist/auth-config.js +4 -3
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-7OOKA4BJ.js → chunk-3CUIQTSD.js} +5 -2
- package/dist/{chunk-4PVJ2JBZ.js → chunk-4IUTMHVB.js} +73 -41
- package/dist/{chunk-5OKB3TEB.js → chunk-5FLTDWWP.js} +4 -1
- package/dist/{chunk-IF6BNIKT.js → chunk-5V2RCZXO.js} +1 -1
- package/dist/{chunk-DFRIBV6O.js → chunk-76CVW4DE.js} +1 -1
- package/dist/{chunk-EJ5QLQU4.js → chunk-BZRRNX7T.js} +5 -4
- package/dist/{chunk-KY3CRS66.js → chunk-CCTQO2Q4.js} +1 -1
- package/dist/{chunk-GKG2EQKM.js → chunk-CJHVSSSR.js} +50 -21
- package/dist/{chunk-FAB6BWDB.js → chunk-GRWWVYSV.js} +2 -2
- package/dist/chunk-TSPERKUS.js +6 -0
- package/dist/{chunk-UBLIZRYW.js → chunk-W2VFJGBC.js} +1 -1
- package/dist/{chunk-RI3ZLNPN.js → chunk-WIMRJK32.js} +1 -1
- package/dist/{chunk-D2WW2CIA.js → chunk-XOR2CEKA.js} +2 -2
- package/dist/{chunk-ZG56UL3V.js → chunk-ZHRQDZIK.js} +1 -1
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.js +27 -18
- package/dist/commands/logout.js +6 -5
- package/dist/commands/transfer.js +8 -5
- package/dist/commands/whoami.js +7 -4
- package/dist/deploy-actors.js +6 -5
- package/dist/deploy.d.ts +19 -2
- package/dist/deploy.js +17 -10
- package/dist/dotns.js +4 -4
- package/dist/index.js +13 -12
- package/dist/manifest/byte-budget.d.ts +4 -5
- package/dist/manifest/byte-budget.js +1 -1
- package/dist/manifest/publish.js +13 -12
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +11 -10
- package/dist/personhood/bootstrap.js +4 -4
- package/dist/personhood/people-client.js +4 -4
- package/dist/pool.d.ts +7 -2
- package/dist/pool.js +3 -1
- package/dist/run-state.js +1 -1
- package/dist/sss-allowance-cache.js +5 -4
- package/dist/storage-signer.js +11 -10
- package/dist/telemetry.js +2 -2
- package/dist/version-check.js +3 -3
- package/docs/bootstrap.md +47 -13
- package/docs/e2e-bootstrap.md +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
preflightSssAllowance
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5V2RCZXO.js";
|
|
4
4
|
import {
|
|
5
5
|
statementSigningAccount
|
|
6
6
|
} from "./chunk-GRPLHUYC.js";
|
|
@@ -34,16 +34,19 @@ import {
|
|
|
34
34
|
STALE_SESSION_MESSAGE,
|
|
35
35
|
getPeopleChainEndpoints,
|
|
36
36
|
hasPersistedSession
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3CUIQTSD.js";
|
|
38
38
|
import {
|
|
39
39
|
setDeployContext
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XOR2CEKA.js";
|
|
41
41
|
import {
|
|
42
42
|
probeChunks
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-W2VFJGBC.js";
|
|
44
44
|
import {
|
|
45
45
|
packSection
|
|
46
46
|
} from "./chunk-C2TS5MER.js";
|
|
47
|
+
import {
|
|
48
|
+
CLI_NAME
|
|
49
|
+
} from "./chunk-TSPERKUS.js";
|
|
47
50
|
import {
|
|
48
51
|
DotNS,
|
|
49
52
|
PUBLISHER_ABI,
|
|
@@ -53,7 +56,7 @@ import {
|
|
|
53
56
|
parseDomainName,
|
|
54
57
|
popStatusName,
|
|
55
58
|
verifyNonceAdvanced
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-GRWWVYSV.js";
|
|
57
60
|
import {
|
|
58
61
|
derivePoolAccounts,
|
|
59
62
|
detectTestnet,
|
|
@@ -61,7 +64,7 @@ import {
|
|
|
61
64
|
fetchPoolAuthorizations,
|
|
62
65
|
isAuthorizationSufficient,
|
|
63
66
|
selectAccount
|
|
64
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-4IUTMHVB.js";
|
|
65
68
|
import {
|
|
66
69
|
VERSION,
|
|
67
70
|
captureWarning,
|
|
@@ -75,7 +78,7 @@ import {
|
|
|
75
78
|
truncateAddress,
|
|
76
79
|
withDeploySpan,
|
|
77
80
|
withSpan
|
|
78
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-76CVW4DE.js";
|
|
79
82
|
import {
|
|
80
83
|
DEFAULT_ENV_ID,
|
|
81
84
|
getPopSelfServeConfig,
|
|
@@ -417,7 +420,9 @@ function isBenignTeardownError(error) {
|
|
|
417
420
|
const s = error instanceof Error ? `${error.name ?? ""} ${error.message ?? ""}` : String(error);
|
|
418
421
|
return /DestroyedError|Client destroyed/.test(s);
|
|
419
422
|
}
|
|
420
|
-
var
|
|
423
|
+
var SHA256_MULTIHASH_CODE = 18;
|
|
424
|
+
var BLAKE2B_256_MULTIHASH_CODE = 45600;
|
|
425
|
+
var CID_CONFIG = { version: 1, codec: 85, hashCode: SHA256_MULTIHASH_CODE, hashLength: 32 };
|
|
421
426
|
function deriveRootSigner(mnemonic, path3 = "") {
|
|
422
427
|
const entropy = mnemonicToEntropy(mnemonic);
|
|
423
428
|
const miniSecret = entropyToMiniSecret(entropy);
|
|
@@ -593,6 +598,9 @@ function chooseSignerInput(opts) {
|
|
|
593
598
|
function isPhoneSignerActive(options) {
|
|
594
599
|
return !!(options.signer && options.signerAddress && !options.transferTo);
|
|
595
600
|
}
|
|
601
|
+
function shouldHandoverName(opts) {
|
|
602
|
+
return !!opts.transferTo && opts.registeredFresh;
|
|
603
|
+
}
|
|
596
604
|
function formatStorageSignerLine(slotAddress, failReason) {
|
|
597
605
|
if (slotAddress) return ` Storage signer: allowance slot ${slotAddress}`;
|
|
598
606
|
return ` Storage signer: pool fallback (${failReason ?? "no session"})`;
|
|
@@ -616,7 +624,7 @@ function selectStorageReconnect(options) {
|
|
|
616
624
|
console.warn(
|
|
617
625
|
`\u26A0 Bulletin allowance slot not usable: ${reason}
|
|
618
626
|
Falling back to the shared pool account for storage (fine on testnet).
|
|
619
|
-
To use your own allowance, run:
|
|
627
|
+
To use your own allowance, run: ${CLI_NAME} logout && ${CLI_NAME} login`
|
|
620
628
|
);
|
|
621
629
|
return getProvider();
|
|
622
630
|
}
|
|
@@ -690,9 +698,8 @@ function watchTransaction(tx, signer, txOpts, onSuccess, { label = "transaction"
|
|
|
690
698
|
});
|
|
691
699
|
}
|
|
692
700
|
async function storeChunk(unsafeApi, signer, chunkBytes, nonce, ss58, opts = {}) {
|
|
693
|
-
const
|
|
694
|
-
const
|
|
695
|
-
const tx = unsafeApi.tx.TransactionStorage.store_with_cid_config({ cid: { codec: BigInt(CID_CONFIG.codec), hashing: toHashingEnum(hashCode) }, data: chunkBytes });
|
|
701
|
+
const cid = createCID(chunkBytes, CID_CONFIG.codec, CID_CONFIG.hashCode);
|
|
702
|
+
const tx = unsafeApi.tx.TransactionStorage.store_with_cid_config({ cid: { codec: BigInt(CID_CONFIG.codec), hashing: toHashingEnum(CID_CONFIG.hashCode) }, data: chunkBytes });
|
|
696
703
|
const txOpts = { mortality: { mortal: true, period: CHUNK_MORTALITY_PERIOD }, nonce };
|
|
697
704
|
const { value, viaFallback, receipt } = await watchTransaction(tx, signer, txOpts, () => {
|
|
698
705
|
console.log(` CID: ${cid.toString()}`);
|
|
@@ -700,11 +707,15 @@ async function storeChunk(unsafeApi, signer, chunkBytes, nonce, ss58, opts = {})
|
|
|
700
707
|
}, { label: `chunk(nonce:${nonce})`, rpc: BULLETIN_ENDPOINTS, senderSS58: ss58, expectedNonce: nonce, timeoutMs: CHUNK_TIMEOUT_MS, fetchNonce: opts.fetchNonce });
|
|
701
708
|
return { ...value, viaFallback, receipt };
|
|
702
709
|
}
|
|
703
|
-
async function storeFile(contentBytes, {
|
|
710
|
+
async function storeFile(contentBytes, {
|
|
711
|
+
client: existingClient,
|
|
712
|
+
unsafeApi: existingApi,
|
|
713
|
+
signer: existingSigner,
|
|
714
|
+
hashCode = CID_CONFIG.hashCode
|
|
715
|
+
} = {}) {
|
|
704
716
|
console.log(`
|
|
705
717
|
Size: ${(contentBytes.length / 1024).toFixed(2)} KB`);
|
|
706
718
|
if (contentBytes.length > MAX_FILE_SIZE) throw new Error(`File exceeds 8MB limit. Use chunked deployment.`);
|
|
707
|
-
const hashCode = 18;
|
|
708
719
|
const cid = createCID(contentBytes, CID_CONFIG.codec, hashCode);
|
|
709
720
|
console.log(` CID: ${cid.toString()}`);
|
|
710
721
|
let client, unsafeApi, signer;
|
|
@@ -719,6 +730,13 @@ async function storeFile(contentBytes, { client: existingClient, unsafeApi: exis
|
|
|
719
730
|
signer = provider.signer;
|
|
720
731
|
}
|
|
721
732
|
try {
|
|
733
|
+
const [probe] = await probeChunks([cid.toString()], { client });
|
|
734
|
+
if (probe.present === true) {
|
|
735
|
+
console.log(` Already on chain (block ${probe.block}, index ${probe.index}) \u2014 skipping upload.
|
|
736
|
+
`);
|
|
737
|
+
if (!existingClient) client.destroy();
|
|
738
|
+
return cid.toString();
|
|
739
|
+
}
|
|
722
740
|
const tx = unsafeApi.tx.TransactionStorage.store_with_cid_config({ cid: { codec: BigInt(CID_CONFIG.codec), hashing: toHashingEnum(hashCode) }, data: contentBytes });
|
|
723
741
|
const txOpts = { mortality: { mortal: true, period: 256 } };
|
|
724
742
|
console.log(` Submitting...`);
|
|
@@ -1996,7 +2014,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
1996
2014
|
if (options.suri) throw e;
|
|
1997
2015
|
if (e?.name === "SignerNotAvailableError") {
|
|
1998
2016
|
if (hasSession) console.error(STALE_SESSION_MESSAGE);
|
|
1999
|
-
else console.log(
|
|
2017
|
+
else console.log(` Login session unavailable or expired \u2014 falling back to pool. Run \`${CLI_NAME} login\` to use your identity.`);
|
|
2000
2018
|
} else {
|
|
2001
2019
|
throw e;
|
|
2002
2020
|
}
|
|
@@ -2012,7 +2030,7 @@ async function deploy(content, domainName = null, options = {}) {
|
|
|
2012
2030
|
const allowed = await preflightSssAllowance(statementAccount, () => getPeopleChainEndpoints(envId));
|
|
2013
2031
|
if (allowed === false) {
|
|
2014
2032
|
throw new NonRetryableError(
|
|
2015
|
-
|
|
2033
|
+
`Session signing allowance has expired (~2-3 days after login). Run \`${CLI_NAME} logout\`, then \`${CLI_NAME} login\`, to renew (login alone won't refresh a stale session).`
|
|
2016
2034
|
);
|
|
2017
2035
|
}
|
|
2018
2036
|
} catch (e) {
|
|
@@ -2394,6 +2412,7 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2394
2412
|
...phoneSignerActive ? { onPhoneSigningRequired: (label) => console.log(`
|
|
2395
2413
|
Check your phone \u2192 ${label}`) } : {}
|
|
2396
2414
|
});
|
|
2415
|
+
let registeredFresh = false;
|
|
2397
2416
|
if (parsed?.isSubdomain) {
|
|
2398
2417
|
const { owned, owner } = await dotns.checkSubdomainOwnership(parsed.sublabel, parsed.parentLabel);
|
|
2399
2418
|
if (owned) {
|
|
@@ -2405,6 +2424,7 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2405
2424
|
if (!parentOwnership.owned) throw new Error(`You must own ${parsed.parentLabel}.dot to register subdomains under it`);
|
|
2406
2425
|
console.log(` Status: Registering subdomain...`);
|
|
2407
2426
|
await dotns.registerSubdomain(parsed.sublabel, parsed.parentLabel);
|
|
2427
|
+
registeredFresh = true;
|
|
2408
2428
|
}
|
|
2409
2429
|
} else {
|
|
2410
2430
|
const { owned } = await dotns.checkOwnership(name);
|
|
@@ -2413,6 +2433,7 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2413
2433
|
} else {
|
|
2414
2434
|
console.log(` Status: Registering...`);
|
|
2415
2435
|
await dotns.register(name);
|
|
2436
|
+
registeredFresh = true;
|
|
2416
2437
|
}
|
|
2417
2438
|
}
|
|
2418
2439
|
const contenthashHex = `0x${encodeContenthash(cid)}`;
|
|
@@ -2422,7 +2443,12 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2422
2443
|
await publish(dotns, parsed, options.failOnPublishError);
|
|
2423
2444
|
}
|
|
2424
2445
|
}
|
|
2425
|
-
if (options.transferTo) {
|
|
2446
|
+
if (options.transferTo && !registeredFresh) {
|
|
2447
|
+
console.log(` ${name}.dot already existed \u2014 updated content only; ownership unchanged (not transferred to ${options.transferTo}).`);
|
|
2448
|
+
console.log(` If you meant to claim it, run: ${CLI_NAME} transfer ${name} --env ${envId}${options.suri ? ` --mnemonic "<your worker key>"` : ""}`);
|
|
2449
|
+
setDeployAttribute("deploy.transfer.status", "skipped-existing");
|
|
2450
|
+
}
|
|
2451
|
+
if (shouldHandoverName({ transferTo: options.transferTo, registeredFresh })) {
|
|
2426
2452
|
const transferTo = options.transferTo;
|
|
2427
2453
|
await withSpan("deploy.transfer", `3. transfer ${name}.dot`, { "deploy.transfer.to": transferTo }, async () => {
|
|
2428
2454
|
setDeployAttribute("deploy.transfer.worker", truncateAddress(options.signerAddress ?? ""));
|
|
@@ -2434,7 +2460,7 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2434
2460
|
console.log(` Handed ${name}.dot to ${transferTo} (${transferRes.status}${transferRes.txHash ? `, tx ${transferRes.txHash}` : ""}).`);
|
|
2435
2461
|
} catch (e) {
|
|
2436
2462
|
setDeployAttribute("deploy.transfer.status", "failed");
|
|
2437
|
-
const recover =
|
|
2463
|
+
const recover = `${CLI_NAME} transfer ${name} --env ${envId}` + (options.suri ? ` --mnemonic "<your worker key>"` : "");
|
|
2438
2464
|
try {
|
|
2439
2465
|
dotns.disconnect();
|
|
2440
2466
|
} catch {
|
|
@@ -2497,9 +2523,9 @@ Have your phone ready \u2014 1 signature needed (link content)`);
|
|
|
2497
2523
|
console.log("\n" + "=".repeat(60));
|
|
2498
2524
|
console.log("DEPLOYMENT COMPLETE!");
|
|
2499
2525
|
console.log("=".repeat(60));
|
|
2500
|
-
console.log("\
|
|
2501
|
-
console.log(`
|
|
2502
|
-
console.log(`
|
|
2526
|
+
console.log("\nCheck it out here:");
|
|
2527
|
+
console.log(` ${browserUrlFor(name, envId)}`);
|
|
2528
|
+
console.log(` ${name}.dot (in a Polkadot-aware browser)`);
|
|
2503
2529
|
console.log("\n" + "=".repeat(60) + "\n");
|
|
2504
2530
|
return { domainName: name, fullDomain: `${name}.dot`, cid, ipfsCid };
|
|
2505
2531
|
} finally {
|
|
@@ -2938,6 +2964,8 @@ export {
|
|
|
2938
2964
|
retryBudgetExhausted,
|
|
2939
2965
|
isConnectionError,
|
|
2940
2966
|
isBenignTeardownError,
|
|
2967
|
+
SHA256_MULTIHASH_CODE,
|
|
2968
|
+
BLAKE2B_256_MULTIHASH_CODE,
|
|
2941
2969
|
deriveRootSigner,
|
|
2942
2970
|
createCID,
|
|
2943
2971
|
encodeContenthash,
|
|
@@ -2951,6 +2979,7 @@ export {
|
|
|
2951
2979
|
__selectStorageProviderModeForTest,
|
|
2952
2980
|
chooseSignerInput,
|
|
2953
2981
|
isPhoneSignerActive,
|
|
2982
|
+
shouldHandoverName,
|
|
2954
2983
|
formatStorageSignerLine,
|
|
2955
2984
|
storeFile,
|
|
2956
2985
|
__assignDenseNoncesForTest,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SI2ZUOYD.js";
|
|
4
4
|
import {
|
|
5
5
|
isTestnetSpecName
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4IUTMHVB.js";
|
|
7
7
|
import {
|
|
8
8
|
captureWarning,
|
|
9
9
|
markCodePath,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
setDeploySentryTag,
|
|
12
12
|
truncateAddress,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-76CVW4DE.js";
|
|
15
15
|
import {
|
|
16
16
|
validateContractAddresses
|
|
17
17
|
} from "./chunk-QRKI6MMK.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/manifest/byte-budget.ts
|
|
2
2
|
var DEFAULT_TEXT_RECORD_BUDGET_BYTES = 1024;
|
|
3
|
-
var PLACEHOLDER_CID = "
|
|
3
|
+
var PLACEHOLDER_CID = "bafk2bzacecjiwibwnfb6fl6rd26a5lrokoutx4lxut6pgw6mmtkqg4comxrae";
|
|
4
4
|
function getTextRecordBudgetBytes() {
|
|
5
5
|
const raw = process.env.BULLETIN_TEXT_BUDGET;
|
|
6
6
|
if (raw === void 0 || raw === "") return DEFAULT_TEXT_RECORD_BUDGET_BYTES;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
classifyErrorArea,
|
|
3
3
|
isInteractive,
|
|
4
4
|
promptYesNo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZHRQDZIK.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getCurrentSentryTraceId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-76CVW4DE.js";
|
|
10
10
|
|
|
11
11
|
// src/bug-report.ts
|
|
12
12
|
import { execSync, execFileSync } from "child_process";
|
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-W2VFJGBC.js";
|
|
9
|
+
import "./chunk-76CVW4DE.js";
|
|
10
|
+
import "./chunk-CCTQO2Q4.js";
|
|
11
11
|
export {
|
|
12
12
|
ChainProbeCrossValidationError,
|
|
13
13
|
ChainProbeMetadataError,
|
package/dist/commands/login.js
CHANGED
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
createSlotAccountSigner,
|
|
9
9
|
requestResourceAllocation,
|
|
10
10
|
summarizeOutcomes
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-5FLTDWWP.js";
|
|
12
12
|
import {
|
|
13
13
|
renderLoginStatus
|
|
14
14
|
} from "../chunk-RIRDBSBG.js";
|
|
15
15
|
import {
|
|
16
16
|
waitForBulletinAuthorization
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-CJHVSSSR.js";
|
|
18
18
|
import {
|
|
19
19
|
preflightSssAllowance
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-5V2RCZXO.js";
|
|
21
21
|
import {
|
|
22
22
|
statementSigningAccount
|
|
23
23
|
} from "../chunk-GRPLHUYC.js";
|
|
@@ -31,16 +31,19 @@ import {
|
|
|
31
31
|
getAuthClient,
|
|
32
32
|
getPeopleChainEndpoints,
|
|
33
33
|
resolveBulletinEndpoints
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-3CUIQTSD.js";
|
|
35
|
+
import "../chunk-XOR2CEKA.js";
|
|
36
|
+
import "../chunk-ZHRQDZIK.js";
|
|
37
|
+
import "../chunk-W2VFJGBC.js";
|
|
38
38
|
import "../chunk-C2TS5MER.js";
|
|
39
|
-
import
|
|
39
|
+
import {
|
|
40
|
+
CLI_NAME
|
|
41
|
+
} from "../chunk-TSPERKUS.js";
|
|
42
|
+
import "../chunk-GRWWVYSV.js";
|
|
40
43
|
import "../chunk-SI2ZUOYD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-4IUTMHVB.js";
|
|
45
|
+
import "../chunk-76CVW4DE.js";
|
|
46
|
+
import "../chunk-CCTQO2Q4.js";
|
|
44
47
|
import {
|
|
45
48
|
loadEnvironments
|
|
46
49
|
} from "../chunk-QRKI6MMK.js";
|
|
@@ -56,7 +59,11 @@ function allocationErrorMessage(reason) {
|
|
|
56
59
|
case "Rejected":
|
|
57
60
|
return "Bulletin storage access was declined on your phone. Approve the request to enable storage signing.";
|
|
58
61
|
case "NotAvailable":
|
|
59
|
-
return
|
|
62
|
+
return `Bulletin storage is not available for this product on your phone.
|
|
63
|
+
This may mean the wallet paired under a different product ID.
|
|
64
|
+
Run: ${CLI_NAME} logout
|
|
65
|
+
Then: ${CLI_NAME} login
|
|
66
|
+
to re-pair and establish the allocation.`;
|
|
60
67
|
case "UnexpectedResponse":
|
|
61
68
|
return "Unexpected response from the mobile wallet during storage allocation. Try again.";
|
|
62
69
|
default:
|
|
@@ -67,7 +74,7 @@ function allocationFailedMessage(reason) {
|
|
|
67
74
|
return `Allowance pre-warm failed: ${reason}
|
|
68
75
|
Likely cause: personhood or alias not yet established for this account.
|
|
69
76
|
Storage will fall back to the pool for now.
|
|
70
|
-
Run:
|
|
77
|
+
Run: ${CLI_NAME} logout, then ${CLI_NAME} login,
|
|
71
78
|
to retry once your wallet's personhood/alias is in place.`;
|
|
72
79
|
}
|
|
73
80
|
function formatAllocationSummary(summary) {
|
|
@@ -137,8 +144,8 @@ async function runLogin(envId, _opts = {}) {
|
|
|
137
144
|
console.error(
|
|
138
145
|
`
|
|
139
146
|
Statement Store allowance has expired for ${result.address}.
|
|
140
|
-
Run:
|
|
141
|
-
Then:
|
|
147
|
+
Run: ${CLI_NAME} logout
|
|
148
|
+
Then: ${CLI_NAME} login
|
|
142
149
|
to re-pair and renew (allowance lasts ~2-3 days).`
|
|
143
150
|
);
|
|
144
151
|
tearingDown = true;
|
|
@@ -154,7 +161,7 @@ to re-pair and renew (allowance lasts ~2-3 days).`
|
|
|
154
161
|
console.warn(
|
|
155
162
|
`
|
|
156
163
|
Bulletin storage slot allowance not available \u2014 storage will fall back to pool.
|
|
157
|
-
Run:
|
|
164
|
+
Run: ${CLI_NAME} logout && ${CLI_NAME} login
|
|
158
165
|
to re-establish your allowance.`
|
|
159
166
|
);
|
|
160
167
|
}
|
|
@@ -197,7 +204,8 @@ to re-establish your allowance.`
|
|
|
197
204
|
if (summaryText) console.log(summaryText);
|
|
198
205
|
if (summary.rejected.length > 0 || summary.unavailable.length > 0) {
|
|
199
206
|
console.warn(
|
|
200
|
-
|
|
207
|
+
` Some allowances were not granted \u2014 Bulletin storage falls back to a pool account;
|
|
208
|
+
PGAS/contract gaps surface at deploy time. Run: ${CLI_NAME} logout && ${CLI_NAME} login to retry.`
|
|
201
209
|
);
|
|
202
210
|
}
|
|
203
211
|
let slotSigner = await createSlotAccountSigner(handle.adapter, BULLETIN_RESOURCE);
|
|
@@ -245,7 +253,8 @@ to re-establish your allowance.`
|
|
|
245
253
|
} else {
|
|
246
254
|
console.log("\n" + summarizeLogin(handle.address, null));
|
|
247
255
|
console.warn(
|
|
248
|
-
|
|
256
|
+
` Bulletin storage slot not available \u2014 storage will fall back to a pool account.
|
|
257
|
+
Run: ${CLI_NAME} logout && ${CLI_NAME} login to retry.`
|
|
249
258
|
);
|
|
250
259
|
}
|
|
251
260
|
} catch (err) {
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-5FLTDWWP.js";
|
|
3
3
|
import {
|
|
4
4
|
renderLogoutStatus
|
|
5
5
|
} from "../chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
clearSssAllowanceCache
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-5V2RCZXO.js";
|
|
9
9
|
import "../chunk-GRPLHUYC.js";
|
|
10
10
|
import {
|
|
11
11
|
getAuthClient
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-3CUIQTSD.js";
|
|
13
|
+
import "../chunk-TSPERKUS.js";
|
|
14
|
+
import "../chunk-76CVW4DE.js";
|
|
15
|
+
import "../chunk-CCTQO2Q4.js";
|
|
15
16
|
import "../chunk-QRKI6MMK.js";
|
|
16
17
|
import "../chunk-ZOC4GITL.js";
|
|
17
18
|
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLI_NAME
|
|
3
|
+
} from "../chunk-TSPERKUS.js";
|
|
1
4
|
import {
|
|
2
5
|
DEFAULT_MNEMONIC,
|
|
3
6
|
DotNS
|
|
4
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-GRWWVYSV.js";
|
|
5
8
|
import "../chunk-SI2ZUOYD.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-4IUTMHVB.js";
|
|
10
|
+
import "../chunk-76CVW4DE.js";
|
|
11
|
+
import "../chunk-CCTQO2Q4.js";
|
|
9
12
|
import {
|
|
10
13
|
getPopSelfServeConfig,
|
|
11
14
|
loadEnvironments,
|
|
@@ -23,7 +26,7 @@ async function resolveTransferRecipient(to, ctx) {
|
|
|
23
26
|
async function runTransfer(envId, opts) {
|
|
24
27
|
const label = (opts.label ?? "").replace(/\.dot$/, "");
|
|
25
28
|
if (!label) {
|
|
26
|
-
throw new Error(
|
|
29
|
+
throw new Error(`Usage: ${CLI_NAME} transfer <label> [--to <0xH160>] [--mnemonic <key>]`);
|
|
27
30
|
}
|
|
28
31
|
let sessionH160;
|
|
29
32
|
if (!opts.to) {
|
package/dist/commands/whoami.js
CHANGED
|
@@ -2,16 +2,19 @@ import {
|
|
|
2
2
|
STALE_SESSION_MESSAGE,
|
|
3
3
|
getAuthClient,
|
|
4
4
|
hasPersistedSession
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import
|
|
7
|
-
|
|
5
|
+
} from "../chunk-3CUIQTSD.js";
|
|
6
|
+
import {
|
|
7
|
+
CLI_NAME
|
|
8
|
+
} from "../chunk-TSPERKUS.js";
|
|
9
|
+
import "../chunk-76CVW4DE.js";
|
|
10
|
+
import "../chunk-CCTQO2Q4.js";
|
|
8
11
|
import "../chunk-QRKI6MMK.js";
|
|
9
12
|
import "../chunk-ZOC4GITL.js";
|
|
10
13
|
|
|
11
14
|
// src/commands/whoami.ts
|
|
12
15
|
function formatWhoami(addresses) {
|
|
13
16
|
if (!addresses) {
|
|
14
|
-
return
|
|
17
|
+
return `Not logged in. Run \`${CLI_NAME} login\` to sign in.`;
|
|
15
18
|
}
|
|
16
19
|
return [
|
|
17
20
|
`Logged in:`,
|
package/dist/deploy-actors.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import "./chunk-JQKKMUCT.js";
|
|
2
2
|
import {
|
|
3
3
|
resolveSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5FLTDWWP.js";
|
|
5
5
|
import "./chunk-RIRDBSBG.js";
|
|
6
|
+
import "./chunk-TSPERKUS.js";
|
|
6
7
|
import {
|
|
7
8
|
DEFAULT_MNEMONIC
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GRWWVYSV.js";
|
|
9
10
|
import "./chunk-SI2ZUOYD.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4IUTMHVB.js";
|
|
12
|
+
import "./chunk-76CVW4DE.js";
|
|
13
|
+
import "./chunk-CCTQO2Q4.js";
|
|
13
14
|
import "./chunk-QRKI6MMK.js";
|
|
14
15
|
import "./chunk-ZOC4GITL.js";
|
|
15
16
|
|
package/dist/deploy.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ declare function isConnectionError(error: any): boolean;
|
|
|
80
80
|
* even when its message differs.
|
|
81
81
|
*/
|
|
82
82
|
declare function isBenignTeardownError(error: any): boolean;
|
|
83
|
+
declare const SHA256_MULTIHASH_CODE = 18;
|
|
84
|
+
declare const BLAKE2B_256_MULTIHASH_CODE = 45600;
|
|
83
85
|
declare function deriveRootSigner(mnemonic: string, path?: string): {
|
|
84
86
|
signer: PolkadotSigner;
|
|
85
87
|
ss58: string;
|
|
@@ -118,13 +120,28 @@ declare function chooseSignerInput(opts: {
|
|
|
118
120
|
hasSession?: boolean;
|
|
119
121
|
}): "mnemonic" | "injected" | "resolve" | "pool";
|
|
120
122
|
declare function isPhoneSignerActive(options: Pick<DeployOptions, "signer" | "signerAddress" | "transferTo">): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Decide whether to hand the name over to the signed-in user after a deploy.
|
|
125
|
+
* The handover only fires when the worker FRESHLY REGISTERED the name in this
|
|
126
|
+
* run (#928): updating the content of a name that already exists must never
|
|
127
|
+
* change its ownership. Without this, re-deploying any pre-existing name in
|
|
128
|
+
* transfer mode silently transferred it to whatever session was on disk —
|
|
129
|
+
* which captured shared E2E fixture labels for a local developer's account.
|
|
130
|
+
* Exported for unit testing.
|
|
131
|
+
*/
|
|
132
|
+
declare function shouldHandoverName(opts: {
|
|
133
|
+
transferTo?: string;
|
|
134
|
+
registeredFresh: boolean;
|
|
135
|
+
}): boolean;
|
|
121
136
|
/**
|
|
122
137
|
* Produce the one-line storage-signer status printed at resolution time. Exported for unit testing.
|
|
123
138
|
* Success: " Storage signer: allowance slot <ss58>"
|
|
124
139
|
* Fallback: " Storage signer: pool fallback (<reason>)"
|
|
125
140
|
*/
|
|
126
141
|
declare function formatStorageSignerLine(slotAddress: string | null, failReason?: string): string;
|
|
127
|
-
declare function storeFile(contentBytes: Uint8Array, { client: existingClient, unsafeApi: existingApi, signer: existingSigner }?: ExistingProvider
|
|
142
|
+
declare function storeFile(contentBytes: Uint8Array, { client: existingClient, unsafeApi: existingApi, signer: existingSigner, hashCode, }?: ExistingProvider & {
|
|
143
|
+
hashCode?: number;
|
|
144
|
+
}): Promise<string>;
|
|
128
145
|
/**
|
|
129
146
|
* Pre-compute dense nonces for chunks that need submission.
|
|
130
147
|
* Chunks where stored[i] !== null are already on chain (skipped via skipCids or
|
|
@@ -413,4 +430,4 @@ declare function computePhoneSigningSteps(dotnsPreflight: {
|
|
|
413
430
|
needsPopUpgrade: boolean;
|
|
414
431
|
} | null, publishNeeded: boolean): string[];
|
|
415
432
|
|
|
416
|
-
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, formatStorageSignerLine, friendlyChainError, hasIPFS, interpretBitswapResult, isBenignTeardownError, isConnectionError, isPhoneSignerActive, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
|
433
|
+
export { BLAKE2B_256_MULTIHASH_CODE, 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, SHA256_MULTIHASH_CODE, 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, formatStorageSignerLine, friendlyChainError, hasIPFS, interpretBitswapResult, isBenignTeardownError, isConnectionError, isPhoneSignerActive, makeBulletinStatusHandler, merkleize, probeP2pRetrieval, resolveDotnsConnectOptions, resolveReproducibleTimestamp, retryBudgetExhausted, setWsHaltCallback, shouldHandoverName, storeChunkedContent, storeDirectory, storeDirectoryV2, storeFile, unpublish };
|
package/dist/deploy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BLAKE2B_256_MULTIHASH_CODE,
|
|
2
3
|
BULLETIN_ENDPOINTS,
|
|
3
4
|
CHUNK_MORTALITY_PERIOD,
|
|
4
5
|
DEFAULT_BULLETIN_RPC,
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
ENCRYPT_PBKDF2_ITERATIONS,
|
|
10
11
|
ENCRYPT_SALT_LEN,
|
|
11
12
|
ENCRYPT_TAG_LEN,
|
|
13
|
+
SHA256_MULTIHASH_CODE,
|
|
12
14
|
WS_HEARTBEAT_TIMEOUT_MS,
|
|
13
15
|
__assignDenseNoncesForTest,
|
|
14
16
|
__selectStorageProviderModeForTest,
|
|
@@ -42,35 +44,38 @@ import {
|
|
|
42
44
|
resolveReproducibleTimestamp,
|
|
43
45
|
retryBudgetExhausted,
|
|
44
46
|
setWsHaltCallback,
|
|
47
|
+
shouldHandoverName,
|
|
45
48
|
storeChunkedContent,
|
|
46
49
|
storeDirectory,
|
|
47
50
|
storeDirectoryV2,
|
|
48
51
|
storeFile,
|
|
49
52
|
unpublish
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-CJHVSSSR.js";
|
|
54
|
+
import "./chunk-5V2RCZXO.js";
|
|
52
55
|
import "./chunk-GRPLHUYC.js";
|
|
53
56
|
import "./chunk-HOTQDYHD.js";
|
|
54
57
|
import "./chunk-IW3X2MJF.js";
|
|
55
58
|
import "./chunk-KOSF5FDO.js";
|
|
56
59
|
import "./chunk-J3NIXHZZ.js";
|
|
57
60
|
import "./chunk-S7EM5VMW.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-3CUIQTSD.js";
|
|
62
|
+
import "./chunk-XOR2CEKA.js";
|
|
63
|
+
import "./chunk-ZHRQDZIK.js";
|
|
64
|
+
import "./chunk-W2VFJGBC.js";
|
|
62
65
|
import "./chunk-C2TS5MER.js";
|
|
63
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-TSPERKUS.js";
|
|
67
|
+
import "./chunk-GRWWVYSV.js";
|
|
64
68
|
import "./chunk-SI2ZUOYD.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-4IUTMHVB.js";
|
|
70
|
+
import "./chunk-76CVW4DE.js";
|
|
71
|
+
import "./chunk-CCTQO2Q4.js";
|
|
68
72
|
import "./chunk-QRKI6MMK.js";
|
|
69
73
|
import {
|
|
70
74
|
EXIT_CODE_NO_RETRY,
|
|
71
75
|
NonRetryableError
|
|
72
76
|
} from "./chunk-ZOC4GITL.js";
|
|
73
77
|
export {
|
|
78
|
+
BLAKE2B_256_MULTIHASH_CODE,
|
|
74
79
|
BULLETIN_ENDPOINTS,
|
|
75
80
|
CHUNK_MORTALITY_PERIOD,
|
|
76
81
|
DEFAULT_BULLETIN_RPC,
|
|
@@ -83,6 +88,7 @@ export {
|
|
|
83
88
|
ENCRYPT_TAG_LEN,
|
|
84
89
|
EXIT_CODE_NO_RETRY,
|
|
85
90
|
NonRetryableError,
|
|
91
|
+
SHA256_MULTIHASH_CODE,
|
|
86
92
|
WS_HEARTBEAT_TIMEOUT_MS,
|
|
87
93
|
__assignDenseNoncesForTest,
|
|
88
94
|
__selectStorageProviderModeForTest,
|
|
@@ -116,6 +122,7 @@ export {
|
|
|
116
122
|
resolveReproducibleTimestamp,
|
|
117
123
|
retryBudgetExhausted,
|
|
118
124
|
setWsHaltCallback,
|
|
125
|
+
shouldHandoverName,
|
|
119
126
|
storeChunkedContent,
|
|
120
127
|
storeDirectory,
|
|
121
128
|
storeDirectoryV2,
|
package/dist/dotns.js
CHANGED
|
@@ -54,11 +54,11 @@ import {
|
|
|
54
54
|
validateDomainLabel,
|
|
55
55
|
verifyNonceAdvanced,
|
|
56
56
|
weiToNative
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-GRWWVYSV.js";
|
|
58
58
|
import "./chunk-SI2ZUOYD.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-4IUTMHVB.js";
|
|
60
|
+
import "./chunk-76CVW4DE.js";
|
|
61
|
+
import "./chunk-CCTQO2Q4.js";
|
|
62
62
|
import "./chunk-QRKI6MMK.js";
|
|
63
63
|
import "./chunk-ZOC4GITL.js";
|
|
64
64
|
export {
|