@parity/product-deploy 0.8.3-rc.8 → 0.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -201
- package/README.md +59 -2
- package/assets/environments.json +0 -1
- package/bin/bulletin-deploy +21 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js +2 -1
- package/dist/auth/vendor/index.d.ts +2 -3
- package/dist/auth/vendor/index.js +2 -1
- package/dist/auth/vendor/ui/index.d.ts +1 -2
- package/dist/auth-C-Pel0AT.d.ts +235 -0
- package/dist/auth-config.d.ts +30 -8
- package/dist/auth-config.js +14 -6
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-YXGNQZZF.js → chunk-2SR5D4CP.js} +19 -15
- package/dist/{chunk-OFVBJOFB.js → chunk-6NW5M3F5.js} +9 -20
- package/dist/{chunk-7DGFJC6E.js → chunk-DHY2ZXVZ.js} +81 -42
- package/dist/chunk-G56VYTUD.js +75 -0
- package/dist/{chunk-5K3RI5C2.js → chunk-GL3U7K2B.js} +0 -1
- package/dist/{chunk-327NAPBD.js → chunk-H4LWILH4.js} +32 -6
- package/dist/chunk-J7CYVTAW.js +43 -0
- package/dist/{chunk-WHMNBSG7.js → chunk-LCKLYFAZ.js} +5 -4
- package/dist/{chunk-3OWKSL7K.js → chunk-NP4SLURL.js} +1 -1
- package/dist/{chunk-T4PAK4YK.js → chunk-O2NWQLYB.js} +2 -2
- package/dist/{chunk-RPU72Z4B.js → chunk-RD2QHYTL.js} +242 -36
- package/dist/{chunk-EGNMZHMR.js → chunk-WZBAQCA5.js} +15 -4
- package/dist/{chunk-YOQLRCQV.js → chunk-YIKGVALU.js} +3 -3
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.d.ts +34 -9
- package/dist/commands/login.js +186 -30
- package/dist/commands/logout.d.ts +1 -2
- package/dist/commands/logout.js +5 -3
- package/dist/commands/whoami.d.ts +1 -2
- package/dist/commands/whoami.js +7 -4
- package/dist/deploy.d.ts +19 -4
- package/dist/deploy.js +14 -9
- package/dist/dotns.d.ts +7 -0
- package/dist/dotns.js +4 -4
- package/dist/environments.js +1 -1
- package/dist/index.js +11 -10
- package/dist/manifest/publish.js +11 -10
- package/dist/manifest/types.d.ts +1 -1
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +10 -9
- package/dist/personhood/bootstrap.js +10 -10
- package/dist/personhood/people-client.js +4 -4
- package/dist/run-state.js +1 -1
- package/dist/{signer-CriGqahj.d.ts → signer-vR6KKC7V.d.ts} +1 -1
- package/dist/spinner.d.ts +21 -0
- package/dist/spinner.js +6 -0
- package/dist/sss-allowance.d.ts +29 -0
- package/dist/sss-allowance.js +8 -0
- package/dist/storage-signer.d.ts +94 -2
- package/dist/storage-signer.js +18 -9
- package/dist/telemetry.js +2 -2
- package/dist/version-check.d.ts +0 -3
- package/dist/version-check.js +3 -3
- package/package.json +19 -15
- package/dist/allocations-B65Is4Md.d.ts +0 -97
- package/dist/auth-DkRZBK-T.d.ts +0 -122
package/dist/commands/login.js
CHANGED
|
@@ -1,63 +1,219 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import
|
|
3
|
-
DEFAULT_RESOURCES,
|
|
4
|
-
summarizeOutcomes
|
|
5
|
-
} from "../chunk-7DGFJC6E.js";
|
|
2
|
+
import "../chunk-DHY2ZXVZ.js";
|
|
6
3
|
import {
|
|
7
4
|
renderLoginStatus
|
|
8
5
|
} from "../chunk-RIRDBSBG.js";
|
|
9
6
|
import {
|
|
10
|
-
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import
|
|
7
|
+
startSpinner
|
|
8
|
+
} from "../chunk-J7CYVTAW.js";
|
|
9
|
+
import {
|
|
10
|
+
waitForBulletinAuthorization
|
|
11
|
+
} from "../chunk-RD2QHYTL.js";
|
|
12
|
+
import {
|
|
13
|
+
checkSSSAllowance
|
|
14
|
+
} from "../chunk-G56VYTUD.js";
|
|
15
|
+
import "../chunk-HOTQDYHD.js";
|
|
16
|
+
import "../chunk-IW3X2MJF.js";
|
|
17
|
+
import "../chunk-KOSF5FDO.js";
|
|
18
|
+
import "../chunk-J3NIXHZZ.js";
|
|
19
|
+
import "../chunk-S7EM5VMW.js";
|
|
20
|
+
import {
|
|
21
|
+
DOT_PRODUCT_ID,
|
|
22
|
+
getAuthClient,
|
|
23
|
+
getPeopleChainEndpoints,
|
|
24
|
+
resolveBulletinEndpoints
|
|
25
|
+
} from "../chunk-H4LWILH4.js";
|
|
26
|
+
import "../chunk-O2NWQLYB.js";
|
|
27
|
+
import "../chunk-6NW5M3F5.js";
|
|
28
|
+
import "../chunk-NP4SLURL.js";
|
|
29
|
+
import "../chunk-C2TS5MER.js";
|
|
30
|
+
import "../chunk-WZBAQCA5.js";
|
|
31
|
+
import "../chunk-QS7YU76C.js";
|
|
32
|
+
import "../chunk-LCKLYFAZ.js";
|
|
33
|
+
import "../chunk-2SR5D4CP.js";
|
|
34
|
+
import {
|
|
35
|
+
loadEnvironments
|
|
36
|
+
} from "../chunk-GL3U7K2B.js";
|
|
13
37
|
import "../chunk-ZOC4GITL.js";
|
|
14
38
|
|
|
15
39
|
// src/commands/login.ts
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
import { ss58Encode } from "@parity/product-sdk-address";
|
|
41
|
+
var ALLOCATION_TIMEOUT_MS = 6e4;
|
|
42
|
+
function allocationErrorMessage(reason) {
|
|
43
|
+
switch (reason) {
|
|
44
|
+
case "NoSession":
|
|
45
|
+
return "No active session found \u2014 try logging in again.";
|
|
46
|
+
case "Rejected":
|
|
47
|
+
return "Bulletin storage access was declined on your phone. Approve the request to enable storage signing.";
|
|
48
|
+
case "NotAvailable":
|
|
49
|
+
return "Bulletin storage is not available for this product on your phone.\n This may mean the wallet paired under a different product ID.\n Run: bulletin-deploy logout\n Then: bulletin-deploy login\n to re-pair and establish the allocation.";
|
|
50
|
+
case "UnexpectedResponse":
|
|
51
|
+
return "Unexpected response from the mobile wallet during storage allocation. Try again.";
|
|
52
|
+
default:
|
|
53
|
+
return `Allocation failed (${reason}).`;
|
|
23
54
|
}
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
}
|
|
56
|
+
function summarizeLogin(address, slotAddress) {
|
|
57
|
+
const lines = [`Signed in as: ${address}`];
|
|
58
|
+
if (slotAddress) {
|
|
59
|
+
lines.push(`Bulletin storage slot: ${slotAddress} \u2713`);
|
|
60
|
+
} else {
|
|
61
|
+
lines.push("Bulletin storage slot: not allocated (storage will fall back to pool)");
|
|
26
62
|
}
|
|
27
63
|
return lines.join("\n");
|
|
28
64
|
}
|
|
65
|
+
function bulletinAuthSummary(authorized, expiration, timeoutSeconds = 180) {
|
|
66
|
+
if (authorized) {
|
|
67
|
+
return {
|
|
68
|
+
message: `\u2713 Bulletin allowance authorized (until block ${expiration})`,
|
|
69
|
+
isWarning: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
message: ` Couldn't confirm on-chain authorization within ${timeoutSeconds}s. Your login is valid \u2014 your next deploy will use the slot once it's authorized, or fall back to the pool meanwhile.`,
|
|
74
|
+
isWarning: true
|
|
75
|
+
};
|
|
76
|
+
}
|
|
29
77
|
async function runLogin(envId, _opts = {}) {
|
|
78
|
+
let tearingDown = false;
|
|
79
|
+
const teardownFilter = (e) => {
|
|
80
|
+
const msg = String(e?.message ?? e);
|
|
81
|
+
if (tearingDown && /not connected|client destroyed|destroyederror/i.test(msg)) return;
|
|
82
|
+
console.error(e);
|
|
83
|
+
process.exit(1);
|
|
84
|
+
};
|
|
85
|
+
process.on("uncaughtException", teardownFilter);
|
|
86
|
+
process.on("unhandledRejection", teardownFilter);
|
|
30
87
|
const client = await getAuthClient(envId);
|
|
31
88
|
const result = await client.connect();
|
|
32
89
|
if (result.kind === "existing") {
|
|
90
|
+
const sessionHandle = await client.getSessionSigner();
|
|
91
|
+
if (sessionHandle) {
|
|
92
|
+
try {
|
|
93
|
+
const productPubkey = sessionHandle.signer.publicKey;
|
|
94
|
+
const peopleEndpoints = await getPeopleChainEndpoints(envId);
|
|
95
|
+
const allowed = await checkSSSAllowance(productPubkey, peopleEndpoints);
|
|
96
|
+
if (allowed === false) {
|
|
97
|
+
console.error(
|
|
98
|
+
`
|
|
99
|
+
Statement Store allowance has expired for ${result.address}.
|
|
100
|
+
Run: bulletin-deploy logout
|
|
101
|
+
Then: bulletin-deploy login
|
|
102
|
+
to re-pair and renew (allowance lasts ~2-3 days).`
|
|
103
|
+
);
|
|
104
|
+
tearingDown = true;
|
|
105
|
+
sessionHandle.destroy();
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
await Promise.race([
|
|
110
|
+
Promise.resolve(
|
|
111
|
+
sessionHandle.adapter.allowance.getBulletinSigner(sessionHandle.userSession.id, DOT_PRODUCT_ID)
|
|
112
|
+
).then((r) => {
|
|
113
|
+
if (r.isErr()) {
|
|
114
|
+
console.warn(
|
|
115
|
+
`
|
|
116
|
+
Bulletin storage slot allowance not available \u2014 storage will fall back to pool.
|
|
117
|
+
Run: bulletin-deploy logout && bulletin-deploy login
|
|
118
|
+
to re-establish your allowance.`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}).catch(() => {
|
|
122
|
+
}),
|
|
123
|
+
new Promise((r) => setTimeout(r, 3e3))
|
|
124
|
+
]);
|
|
125
|
+
} catch {
|
|
126
|
+
}
|
|
127
|
+
} finally {
|
|
128
|
+
sessionHandle.destroy();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
33
131
|
console.log(`Already signed in as: ${result.address}`);
|
|
132
|
+
tearingDown = true;
|
|
34
133
|
return;
|
|
35
134
|
}
|
|
36
135
|
console.log(result.qrCode);
|
|
37
|
-
console.log("Scan the QR code with your Polkadot
|
|
38
|
-
const
|
|
136
|
+
console.log("Scan the QR code with your Polkadot mobile app.");
|
|
137
|
+
const handle = await client.waitForLogin(result.login, (status) => {
|
|
39
138
|
const msg = renderLoginStatus(status);
|
|
40
139
|
if (msg) process.stdout.write(`\r${msg}`);
|
|
41
140
|
});
|
|
42
|
-
if (!
|
|
141
|
+
if (!handle) {
|
|
142
|
+
tearingDown = true;
|
|
43
143
|
console.error("\nLogin failed.");
|
|
144
|
+
process.exit(1);
|
|
44
145
|
return;
|
|
45
146
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
147
|
+
try {
|
|
148
|
+
console.log("\nRequesting Bulletin storage allowance \u2014 check your phone to approve.");
|
|
149
|
+
const bulletinSignerPromise = handle.adapter.allowance.getBulletinSigner(
|
|
150
|
+
handle.userSession.id,
|
|
151
|
+
DOT_PRODUCT_ID
|
|
152
|
+
);
|
|
153
|
+
const timeoutPromise = new Promise(
|
|
154
|
+
(_, reject) => setTimeout(
|
|
155
|
+
() => reject(new Error(
|
|
156
|
+
`Allocation request timed out after ${Math.round(ALLOCATION_TIMEOUT_MS / 1e3)}s \u2014 ensure your phone is unlocked and the Polkadot mobile app is open, then try logging in again.`
|
|
157
|
+
)),
|
|
158
|
+
ALLOCATION_TIMEOUT_MS
|
|
159
|
+
)
|
|
160
|
+
);
|
|
161
|
+
const signerResult = await Promise.race([bulletinSignerPromise, timeoutPromise]);
|
|
162
|
+
if (signerResult.isOk()) {
|
|
163
|
+
const slotSigner = signerResult.value;
|
|
164
|
+
const slotAddress = ss58Encode(slotSigner.publicKey);
|
|
165
|
+
const { doc } = await loadEnvironments();
|
|
166
|
+
const bulletinEndpoints = resolveBulletinEndpoints(doc, envId) ?? void 0;
|
|
167
|
+
const spinner = startSpinner("Confirming Bulletin authorization on-chain");
|
|
168
|
+
const onSigint = () => {
|
|
169
|
+
spinner.stop();
|
|
170
|
+
console.log(
|
|
171
|
+
"Cancelled \u2014 on-chain authorization not yet confirmed. Your login is saved; your next deploy will use the slot once it's authorized, or fall back to the pool meanwhile."
|
|
172
|
+
);
|
|
173
|
+
console.log("\n" + summarizeLogin(handle.address, slotAddress));
|
|
174
|
+
tearingDown = true;
|
|
175
|
+
handle.destroy();
|
|
176
|
+
process.exit(0);
|
|
177
|
+
};
|
|
178
|
+
process.once("SIGINT", onSigint);
|
|
179
|
+
let authResult;
|
|
180
|
+
try {
|
|
181
|
+
authResult = await waitForBulletinAuthorization(slotAddress, {
|
|
182
|
+
timeoutMs: Infinity,
|
|
183
|
+
quiet: true,
|
|
184
|
+
endpoints: bulletinEndpoints
|
|
185
|
+
});
|
|
186
|
+
} finally {
|
|
187
|
+
spinner.stop();
|
|
188
|
+
process.removeListener("SIGINT", onSigint);
|
|
189
|
+
}
|
|
190
|
+
const summary = bulletinAuthSummary(
|
|
191
|
+
authResult.authorized,
|
|
192
|
+
authResult.authorized ? authResult.expiration : void 0
|
|
193
|
+
);
|
|
194
|
+
console.log(summary.message);
|
|
195
|
+
console.log("\n" + summarizeLogin(handle.address, slotAddress));
|
|
196
|
+
} else {
|
|
197
|
+
const err = signerResult.error;
|
|
198
|
+
console.log("\n" + summarizeLogin(handle.address, null));
|
|
199
|
+
console.warn(` ${allocationErrorMessage(err.reason)}`);
|
|
54
200
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
201
|
+
} catch (err) {
|
|
202
|
+
await Promise.resolve(handle.userSession.abortPendingRequests()).catch(() => {
|
|
203
|
+
});
|
|
204
|
+
tearingDown = true;
|
|
205
|
+
console.error(`
|
|
206
|
+
Allocation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
207
|
+
process.exit(1);
|
|
208
|
+
} finally {
|
|
209
|
+
tearingDown = true;
|
|
210
|
+
handle.destroy();
|
|
58
211
|
}
|
|
212
|
+
process.exit(0);
|
|
59
213
|
}
|
|
60
214
|
export {
|
|
215
|
+
allocationErrorMessage,
|
|
216
|
+
bulletinAuthSummary,
|
|
61
217
|
runLogin,
|
|
62
218
|
summarizeLogin
|
|
63
219
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as LogoutStatus } from '../auth-C-Pel0AT.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
-
import '../allocations-B65Is4Md.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* logout — sign out the current session.
|
package/dist/commands/logout.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-DHY2ZXVZ.js";
|
|
3
3
|
import {
|
|
4
4
|
renderLogoutStatus
|
|
5
5
|
} from "../chunk-RIRDBSBG.js";
|
|
6
6
|
import {
|
|
7
7
|
getAuthClient
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-H4LWILH4.js";
|
|
9
|
+
import "../chunk-LCKLYFAZ.js";
|
|
10
|
+
import "../chunk-2SR5D4CP.js";
|
|
11
|
+
import "../chunk-GL3U7K2B.js";
|
|
10
12
|
import "../chunk-ZOC4GITL.js";
|
|
11
13
|
|
|
12
14
|
// src/commands/logout.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { S as SessionAddresses } from '../auth-
|
|
1
|
+
import { S as SessionAddresses } from '../auth-C-Pel0AT.js';
|
|
2
2
|
import '@parity/product-sdk-terminal';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
-
import '../allocations-B65Is4Md.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* whoami — show the currently logged-in session account, or "not logged in".
|
package/dist/commands/whoami.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
+
STALE_SESSION_MESSAGE,
|
|
2
3
|
getAuthClient,
|
|
3
4
|
hasPersistedSession
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-H4LWILH4.js";
|
|
6
|
+
import "../chunk-LCKLYFAZ.js";
|
|
7
|
+
import "../chunk-2SR5D4CP.js";
|
|
8
|
+
import "../chunk-GL3U7K2B.js";
|
|
6
9
|
import "../chunk-ZOC4GITL.js";
|
|
7
10
|
|
|
8
11
|
// src/commands/whoami.ts
|
|
@@ -29,12 +32,12 @@ async function runWhoami(envId) {
|
|
|
29
32
|
console.log(formatWhoami(handle.addresses));
|
|
30
33
|
handle.destroy();
|
|
31
34
|
} else {
|
|
32
|
-
console.
|
|
35
|
+
console.error(STALE_SESSION_MESSAGE);
|
|
33
36
|
}
|
|
34
37
|
} catch (err) {
|
|
35
38
|
const e = err;
|
|
36
39
|
if (e?.name === "SignerNotAvailableError") {
|
|
37
|
-
console.
|
|
40
|
+
console.error(STALE_SESSION_MESSAGE);
|
|
38
41
|
} else {
|
|
39
42
|
console.log(`Could not reach login service: ${e?.message ?? String(err)}`);
|
|
40
43
|
console.log(formatWhoami(null));
|
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
|
*
|
|
@@ -107,6 +106,12 @@ declare function chooseSignerInput(opts: {
|
|
|
107
106
|
hasInjectedSigner: boolean;
|
|
108
107
|
hasSession?: boolean;
|
|
109
108
|
}): "mnemonic" | "injected" | "resolve" | "pool";
|
|
109
|
+
/**
|
|
110
|
+
* Produce the one-line storage-signer status printed at resolution time. Exported for unit testing.
|
|
111
|
+
* Success: " Storage signer: allowance slot <ss58>"
|
|
112
|
+
* Fallback: " Storage signer: pool fallback (<reason>)"
|
|
113
|
+
*/
|
|
114
|
+
declare function formatStorageSignerLine(slotAddress: string | null, failReason?: string): string;
|
|
110
115
|
declare function storeFile(contentBytes: Uint8Array, { client: existingClient, unsafeApi: existingApi, signer: existingSigner }?: ExistingProvider): Promise<string>;
|
|
111
116
|
/**
|
|
112
117
|
* Pre-compute dense nonces for chunks that need submission.
|
|
@@ -378,5 +383,15 @@ declare function interpretBitswapResult(outcome: {
|
|
|
378
383
|
*/
|
|
379
384
|
declare function probeP2pRetrieval(client: any, cid: string, timeoutMs?: number): Promise<BitswapProbeResult>;
|
|
380
385
|
declare function deploy(content: DeployContent, domainName?: string | null, options?: DeployOptions): Promise<DeployResult>;
|
|
386
|
+
/**
|
|
387
|
+
* Compute the ordered list of step labels that will require a phone tap,
|
|
388
|
+
* given the DotNS preflight result and whether publish is needed.
|
|
389
|
+
* Returns [] when deploy would abort or preflight is null.
|
|
390
|
+
* Exported for unit testing.
|
|
391
|
+
*/
|
|
392
|
+
declare function computePhoneSigningSteps(dotnsPreflight: {
|
|
393
|
+
plannedAction: string;
|
|
394
|
+
needsPopUpgrade: boolean;
|
|
395
|
+
} | null, publishNeeded: boolean): string[];
|
|
381
396
|
|
|
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 };
|
|
397
|
+
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, 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,
|
|
@@ -27,6 +28,7 @@ import {
|
|
|
27
28
|
encodeContenthash,
|
|
28
29
|
encryptContent,
|
|
29
30
|
estimateUploadBytes,
|
|
31
|
+
formatStorageSignerLine,
|
|
30
32
|
friendlyChainError,
|
|
31
33
|
hasIPFS,
|
|
32
34
|
interpretBitswapResult,
|
|
@@ -43,22 +45,23 @@ import {
|
|
|
43
45
|
storeDirectoryV2,
|
|
44
46
|
storeFile,
|
|
45
47
|
unpublish
|
|
46
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-RD2QHYTL.js";
|
|
49
|
+
import "./chunk-G56VYTUD.js";
|
|
47
50
|
import "./chunk-HOTQDYHD.js";
|
|
48
51
|
import "./chunk-IW3X2MJF.js";
|
|
49
52
|
import "./chunk-KOSF5FDO.js";
|
|
50
53
|
import "./chunk-J3NIXHZZ.js";
|
|
51
54
|
import "./chunk-S7EM5VMW.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-H4LWILH4.js";
|
|
56
|
+
import "./chunk-O2NWQLYB.js";
|
|
57
|
+
import "./chunk-6NW5M3F5.js";
|
|
58
|
+
import "./chunk-NP4SLURL.js";
|
|
56
59
|
import "./chunk-C2TS5MER.js";
|
|
57
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-WZBAQCA5.js";
|
|
58
61
|
import "./chunk-QS7YU76C.js";
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-LCKLYFAZ.js";
|
|
63
|
+
import "./chunk-2SR5D4CP.js";
|
|
64
|
+
import "./chunk-GL3U7K2B.js";
|
|
62
65
|
import {
|
|
63
66
|
EXIT_CODE_NO_RETRY,
|
|
64
67
|
NonRetryableError
|
|
@@ -86,6 +89,7 @@ export {
|
|
|
86
89
|
checkDeploySize,
|
|
87
90
|
chooseSignerInput,
|
|
88
91
|
chunk,
|
|
92
|
+
computePhoneSigningSteps,
|
|
89
93
|
computeStorageCid,
|
|
90
94
|
createCID,
|
|
91
95
|
deploy,
|
|
@@ -94,6 +98,7 @@ export {
|
|
|
94
98
|
encodeContenthash,
|
|
95
99
|
encryptContent,
|
|
96
100
|
estimateUploadBytes,
|
|
101
|
+
formatStorageSignerLine,
|
|
97
102
|
friendlyChainError,
|
|
98
103
|
hasIPFS,
|
|
99
104
|
interpretBitswapResult,
|
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,11 +50,11 @@ import {
|
|
|
50
50
|
stripTrailingDigits,
|
|
51
51
|
validateDomainLabel,
|
|
52
52
|
verifyNonceAdvanced
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-WZBAQCA5.js";
|
|
54
54
|
import "./chunk-QS7YU76C.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-LCKLYFAZ.js";
|
|
56
|
+
import "./chunk-2SR5D4CP.js";
|
|
57
|
+
import "./chunk-GL3U7K2B.js";
|
|
58
58
|
import "./chunk-ZOC4GITL.js";
|
|
59
59
|
export {
|
|
60
60
|
ATTR_TX_RESOLUTION_KIND,
|
package/dist/environments.js
CHANGED
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-YIKGVALU.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_TEXT_RECORD_BUDGET_BYTES,
|
|
10
10
|
PLACEHOLDER_CID,
|
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
deploy,
|
|
25
25
|
merkleizeJS,
|
|
26
26
|
merkleizeWithStableOrder
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-RD2QHYTL.js";
|
|
28
|
+
import "./chunk-G56VYTUD.js";
|
|
28
29
|
import "./chunk-HOTQDYHD.js";
|
|
29
30
|
import {
|
|
30
31
|
computeStats,
|
|
@@ -47,19 +48,19 @@ import {
|
|
|
47
48
|
isVolatilePath,
|
|
48
49
|
parseManifest
|
|
49
50
|
} from "./chunk-S7EM5VMW.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-H4LWILH4.js";
|
|
52
|
+
import "./chunk-O2NWQLYB.js";
|
|
53
|
+
import "./chunk-6NW5M3F5.js";
|
|
53
54
|
import {
|
|
54
55
|
probeChunks
|
|
55
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-NP4SLURL.js";
|
|
56
57
|
import "./chunk-C2TS5MER.js";
|
|
57
58
|
import {
|
|
58
59
|
DEFAULT_MNEMONIC,
|
|
59
60
|
DotNS,
|
|
60
61
|
parseDomainName,
|
|
61
62
|
sanitizeDomainLabel
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-WZBAQCA5.js";
|
|
63
64
|
import {
|
|
64
65
|
bootstrapPool,
|
|
65
66
|
derivePoolAccounts,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
fetchPoolAuthorizations,
|
|
68
69
|
selectAccount
|
|
69
70
|
} from "./chunk-QS7YU76C.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-LCKLYFAZ.js";
|
|
71
72
|
import {
|
|
72
73
|
VERSION,
|
|
73
74
|
loadRunState,
|
|
@@ -77,7 +78,7 @@ import {
|
|
|
77
78
|
shouldSkipStaleWarning,
|
|
78
79
|
stateFilePath,
|
|
79
80
|
writeRunState
|
|
80
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-2SR5D4CP.js";
|
|
81
82
|
import {
|
|
82
83
|
DEFAULT_ENV_ID,
|
|
83
84
|
deepMergeEnvironments,
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
loadEnvironments,
|
|
89
90
|
resolveEndpoints,
|
|
90
91
|
validateContractAddresses
|
|
91
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-GL3U7K2B.js";
|
|
92
93
|
import "./chunk-ZOC4GITL.js";
|
|
93
94
|
export {
|
|
94
95
|
DEFAULT_ENV_ID,
|
package/dist/manifest/publish.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishManifest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YIKGVALU.js";
|
|
4
4
|
import "../chunk-RI3ZLNPN.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-RD2QHYTL.js";
|
|
6
|
+
import "../chunk-G56VYTUD.js";
|
|
6
7
|
import "../chunk-HOTQDYHD.js";
|
|
7
8
|
import "../chunk-IW3X2MJF.js";
|
|
8
9
|
import "../chunk-KOSF5FDO.js";
|
|
9
10
|
import "../chunk-J3NIXHZZ.js";
|
|
10
11
|
import "../chunk-S7EM5VMW.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-H4LWILH4.js";
|
|
13
|
+
import "../chunk-O2NWQLYB.js";
|
|
14
|
+
import "../chunk-6NW5M3F5.js";
|
|
15
|
+
import "../chunk-NP4SLURL.js";
|
|
15
16
|
import "../chunk-C2TS5MER.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-WZBAQCA5.js";
|
|
17
18
|
import "../chunk-QS7YU76C.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-LCKLYFAZ.js";
|
|
20
|
+
import "../chunk-2SR5D4CP.js";
|
|
21
|
+
import "../chunk-GL3U7K2B.js";
|
|
21
22
|
import "../chunk-ZOC4GITL.js";
|
|
22
23
|
export {
|
|
23
24
|
publishManifest
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ interface ProductConfig {
|
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
85
|
* import { defineConfig } from "bulletin-deploy";
|
|
86
|
-
* export default defineConfig({ domain: "
|
|
86
|
+
* export default defineConfig({ domain: "demoapp.dot", ... });
|
|
87
87
|
*/
|
|
88
88
|
declare function defineConfig<T extends ProductConfig>(config: T): T;
|
|
89
89
|
|
package/dist/memory-report.js
CHANGED
package/dist/merkle.js
CHANGED
|
@@ -6,22 +6,23 @@ import {
|
|
|
6
6
|
merkleizeKuboBackend,
|
|
7
7
|
merkleizeWithStableOrder,
|
|
8
8
|
rebuildOrderedCarFromBytes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RD2QHYTL.js";
|
|
10
|
+
import "./chunk-G56VYTUD.js";
|
|
10
11
|
import "./chunk-HOTQDYHD.js";
|
|
11
12
|
import "./chunk-IW3X2MJF.js";
|
|
12
13
|
import "./chunk-KOSF5FDO.js";
|
|
13
14
|
import "./chunk-J3NIXHZZ.js";
|
|
14
15
|
import "./chunk-S7EM5VMW.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-H4LWILH4.js";
|
|
17
|
+
import "./chunk-O2NWQLYB.js";
|
|
18
|
+
import "./chunk-6NW5M3F5.js";
|
|
19
|
+
import "./chunk-NP4SLURL.js";
|
|
19
20
|
import "./chunk-C2TS5MER.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-WZBAQCA5.js";
|
|
21
22
|
import "./chunk-QS7YU76C.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-LCKLYFAZ.js";
|
|
24
|
+
import "./chunk-2SR5D4CP.js";
|
|
25
|
+
import "./chunk-GL3U7K2B.js";
|
|
25
26
|
import "./chunk-ZOC4GITL.js";
|
|
26
27
|
export {
|
|
27
28
|
buildOrderedCar,
|