@parity/product-deploy 0.10.0-rc.0 → 0.10.0-rc.1
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 +124 -0
- package/README.md +73 -6
- package/assets/environments.json +41 -0
- package/bin/bulletin-deploy +11 -16
- package/dist/allocations-CEPeZr6T.d.ts +111 -0
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.js +5 -1
- package/dist/auth/vendor/index.d.ts +3 -2
- package/dist/auth/vendor/index.js +5 -1
- package/dist/auth/vendor/ui/index.d.ts +2 -1
- package/dist/auth-CA_YKtM2.d.ts +128 -0
- package/dist/auth-config.d.ts +13 -8
- package/dist/auth-config.js +4 -4
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-PKQOUCPD.js → chunk-2GDPXSW3.js} +5 -5
- package/dist/{chunk-VR3LF62E.js → chunk-4ADUQDYJ.js} +38 -12
- package/dist/{chunk-DHY2ZXVZ.js → chunk-5OKB3TEB.js} +8 -1
- package/dist/{chunk-2BTYPNYW.js → chunk-64RSUZN4.js} +10 -2
- package/dist/{chunk-HUT626G6.js → chunk-HA7BNUK3.js} +1 -1
- package/dist/{chunk-GJTVPP7E.js → chunk-HEUKYXEZ.js} +1 -1
- package/dist/{chunk-MI5B3UCM.js → chunk-HOO5NKN3.js} +1 -1
- package/dist/{chunk-GL3U7K2B.js → chunk-QRKI6MMK.js} +41 -0
- package/dist/{chunk-ZJCTG7HF.js → chunk-RX3ZUVVS.js} +3 -2
- package/dist/{chunk-G676QAN4.js → chunk-S42FFXAR.js} +2 -2
- package/dist/{chunk-Q3RIJ7PU.js → chunk-VHAKRWRH.js} +3 -3
- package/dist/{chunk-DY7RVMM5.js → chunk-ZF2SEY7S.js} +64 -20
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.d.ts +42 -6
- package/dist/commands/login.js +86 -34
- package/dist/commands/logout.d.ts +2 -1
- package/dist/commands/logout.js +6 -6
- package/dist/commands/transfer.js +5 -4
- package/dist/commands/whoami.d.ts +2 -1
- package/dist/commands/whoami.js +4 -4
- package/dist/deploy-actors.d.ts +3 -2
- package/dist/deploy-actors.js +6 -5
- package/dist/deploy.d.ts +13 -1
- package/dist/deploy.js +15 -10
- package/dist/dotns.d.ts +10 -4
- package/dist/dotns.js +5 -4
- package/dist/environments.js +1 -1
- package/dist/index.js +12 -11
- package/dist/manifest/publish.js +12 -11
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +11 -10
- package/dist/personhood/bootstrap.js +6 -6
- package/dist/personhood/people-client.js +5 -4
- package/dist/run-state.js +1 -1
- package/dist/{signer-vR6KKC7V.d.ts → signer-Duup0hgQ.d.ts} +1 -1
- package/dist/sss-allowance-cache.js +5 -5
- package/dist/storage-signer.js +11 -10
- package/dist/telemetry.d.ts +17 -1
- package/dist/telemetry.js +4 -2
- package/dist/version-check.js +3 -3
- package/docs/bootstrap.md +1 -1
- package/docs/e2e-bootstrap.md +34 -12
- package/docs/telemetry.md +10 -11
- package/docs/testing.md +2 -0
- package/package.json +3 -2
- package/dist/auth-C-Pel0AT.d.ts +0 -235
package/DEPLOYMENT.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Deploying your first app
|
|
2
|
+
|
|
3
|
+
This guide walks you from zero to a deployed, viewable web app on the [Polkadot Bulletin Chain](https://github.com/paritytech/polkadot-bulletin-chain) testnet, using `bulletin-deploy`.
|
|
4
|
+
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> This targets a **testnet** (`paseo-next-v2`) by default. It is reference/proof-of-concept tooling — see the security notice in the [README](README.md#security).
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
1. **Node.js ≥ 22.**
|
|
11
|
+
```sh
|
|
12
|
+
node --version # must print v22 or higher
|
|
13
|
+
```
|
|
14
|
+
2. **The CLI**, installed globally:
|
|
15
|
+
```sh
|
|
16
|
+
npm install -g bulletin-deploy
|
|
17
|
+
```
|
|
18
|
+
3. **A built static site** — a directory of static files (HTML/CSS/JS), for example `./dist`. Build your app however you normally would (`npm run build`, etc.); `bulletin-deploy` uploads the resulting directory as-is.
|
|
19
|
+
4. **An identity to own the name** — choose one:
|
|
20
|
+
- **Mobile Polkadot wallet (recommended).** No mnemonic on disk; you sign in once by scanning a QR code. See [Sign in](#1-sign-in-recommended) below.
|
|
21
|
+
- **A testnet mnemonic.** Pass `--mnemonic "..."` (or set the `MNEMONIC` env var) instead of signing in.
|
|
22
|
+
|
|
23
|
+
That is all you need on testnet. You do **not** need testnet funds for the recommended path: a worker account registers the name and uploads the content, then transfers ownership to your account as the final step.
|
|
24
|
+
|
|
25
|
+
### Optional: IPFS / Kubo
|
|
26
|
+
|
|
27
|
+
By default the CLI uses the [IPFS Kubo](https://docs.ipfs.tech/install/) binary to merkleize your site if it is on your `PATH`, and otherwise falls back to a pure-JavaScript implementation. You can force the pure-JS path (no binary required) with `--js-merkle`. If you see `IPFS CLI not installed`, either install Kubo or add `--js-merkle`.
|
|
28
|
+
|
|
29
|
+
## Choosing a name
|
|
30
|
+
|
|
31
|
+
Apps are addressed by a DotNS name like `myapp.dot`. A few rules:
|
|
32
|
+
|
|
33
|
+
- The base label must be **at least 6 characters** (shorter labels are reserved).
|
|
34
|
+
- Pick something not already registered. The CLI tells you during a deploy whether the name is available or already owned by you.
|
|
35
|
+
|
|
36
|
+
## Deploy
|
|
37
|
+
|
|
38
|
+
### 1. Sign in (recommended)
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
bulletin-deploy login # scan the QR code with your Polkadot wallet app
|
|
42
|
+
bulletin-deploy whoami # confirm the signed-in address
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If you would rather sign with a mnemonic, skip this and pass `--mnemonic` on the deploy command instead.
|
|
46
|
+
|
|
47
|
+
### 2. Deploy your build directory
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
bulletin-deploy ./dist myapp.dot
|
|
51
|
+
# or, without an IPFS binary installed:
|
|
52
|
+
bulletin-deploy ./dist myapp.dot --js-merkle
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The CLI will:
|
|
56
|
+
|
|
57
|
+
1. Merkleize your directory into content-addressed chunks.
|
|
58
|
+
2. Upload the chunks to the Bulletin Chain and wait for finality.
|
|
59
|
+
3. Register `myapp.dot` in DotNS and point it at your content.
|
|
60
|
+
4. Transfer ownership of the name to your signed-in account.
|
|
61
|
+
|
|
62
|
+
On success it prints a summary:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
============================================================
|
|
66
|
+
DEPLOYMENT COMPLETE!
|
|
67
|
+
============================================================
|
|
68
|
+
- Polkadot Desktop: myapp.dot
|
|
69
|
+
- Polkadot Browser: https://myapp.dot.li
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. View it
|
|
73
|
+
|
|
74
|
+
- Open **`https://myapp.dot.li`** in any browser.
|
|
75
|
+
- Or open **`myapp.dot`** directly in a Polkadot-aware browser/extension.
|
|
76
|
+
|
|
77
|
+
## If the transfer step fails
|
|
78
|
+
|
|
79
|
+
If your content uploads but the final ownership transfer fails, the name is registered by the worker and you can claim it separately:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
bulletin-deploy transfer myapp.dot # → your signed-in account
|
|
83
|
+
bulletin-deploy transfer myapp.dot --to 0x... # → an explicit recipient
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Choosing a different network
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
bulletin-deploy --list-environments # show available environment IDs
|
|
90
|
+
bulletin-deploy ./dist myapp.dot --env <id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The default is `paseo-next-v2`. Override individual fields with `--environment-file <path>` or `--contract KEY=0x...`.
|
|
94
|
+
|
|
95
|
+
## Bootstrapping your own storage pool
|
|
96
|
+
|
|
97
|
+
On `paseo-next-v2` and the other shared Parity testnets the upload pool is **already authorized** — you don't need to bootstrap anything to deploy. You only need this if you run your own setup: a custom pool mnemonic, your own Bulletin chain, or a testnet that was just reset (a wipe clears all authorizations).
|
|
98
|
+
|
|
99
|
+
Uploading content to the Bulletin Chain requires the storage account to hold a `TransactionStorage` authorization — a quota of transactions and bytes. `bulletin-deploy` never grants this itself; the account must be authorized by the chain's authorizer first. The separate `bulletin-bootstrap` CLI does that for a pool:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
bulletin-bootstrap --env <id> # authorize the default pool on an environment
|
|
103
|
+
bulletin-bootstrap --env <id> --pool-size 20 # authorize a larger pool
|
|
104
|
+
bulletin-bootstrap --mnemonic "<phrase>" # authorize a custom pool's accounts
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
It derives the pool accounts, authorizes each one for storage, and funds them. On a testnet the authorizer is the dev account (`//Alice`); on a production chain the network's own authorizer must grant authorization — `bulletin-bootstrap` cannot self-authorize there. It's a one-time setup step, not part of a routine deploy. See [`docs/bootstrap.md`](docs/bootstrap.md) for the full operator reference.
|
|
108
|
+
|
|
109
|
+
## Signing modes, in short
|
|
110
|
+
|
|
111
|
+
- **Signed in (default):** a worker registers and uploads, then hands the name to your account — zero wallet signatures on testnet.
|
|
112
|
+
- **`--no-transfer-to-signedin-user`:** sign every DotNS transaction with your mobile session instead.
|
|
113
|
+
- **`--mnemonic "..."` / `MNEMONIC`:** use a mnemonic instead of a session.
|
|
114
|
+
|
|
115
|
+
## Troubleshooting
|
|
116
|
+
|
|
117
|
+
| Symptom | Cause / fix |
|
|
118
|
+
|---|---|
|
|
119
|
+
| `IPFS CLI not installed` | Install [Kubo](https://docs.ipfs.tech/install/), or add `--js-merkle`. |
|
|
120
|
+
| Name rejected as reserved / too short | Use a base label of **6+ characters**. |
|
|
121
|
+
| `Login session unavailable or expired` | Re-run `bulletin-deploy login`. |
|
|
122
|
+
| Not authorized to upload | The storage account lacks a Bulletin `TransactionStorage` authorization. On `paseo-next-v2` the shared pool is already authorized; on your own setup, see [Bootstrapping your own storage pool](#bootstrapping-your-own-storage-pool). On a production chain, request authorization from the network's authorizer. |
|
|
123
|
+
|
|
124
|
+
For the full option reference, run `bulletin-deploy --help`.
|
package/README.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# bulletin-deploy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> The following is a prototype, reference implementation, and proof-of-concept. This open source code is provided for research, experimentation, and developer education only. This code has not been audited, is actively experimental, and may contain bugs, vulnerabilities, or incomplete features. Use at your own risk.
|
|
5
|
+
|
|
6
|
+
Deploy a static web app to the [Polkadot Bulletin Chain](https://github.com/paritytech/polkadot-bulletin-chain) and serve it under a human-readable `.dot` name — from one command. Names are resolved through DotNS, Polkadot's on-chain naming system.
|
|
7
|
+
|
|
8
|
+
It targets Polkadot **testnets** (default: `paseo-next-v2`). This is reference tooling for putting a static site on-chain, not a managed hosting service — you run the deploys yourself, and there is no server or account to sign up for.
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/bulletin-deploy)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **On-chain static hosting** — Upload a built site (any framework, or plain HTML) to the Bulletin Chain and address it by a `.dot` name. No web server to run.
|
|
16
|
+
- **Mobile-wallet signing** — `login` once by scanning a QR with your Polkadot wallet; deploy with no mnemonic stored on disk.
|
|
17
|
+
- **Zero-signature testnet deploys** — a local worker registers the name and uploads the content, then transfers ownership to your signed-in account — no wallet taps in the default testnet flow.
|
|
18
|
+
- **Incremental uploads** — re-deploys only push the content chunks that changed, so updates are fast and cheap.
|
|
19
|
+
- **No native dependency required** — `--js-merkle` does content addressing in pure JavaScript; the IPFS Kubo binary is optional, not required.
|
|
20
|
+
- **Built-in environments** — target presets (RPC endpoints + contract addresses) selectable with `--env`, overridable per field.
|
|
21
|
+
- **Telemetry off by default** — opt-in only, and honors the `DO_NOT_TRACK` convention.
|
|
4
22
|
|
|
5
23
|
## Install
|
|
6
24
|
|
|
@@ -8,6 +26,8 @@ CLI tool for deploying web apps to the [Polkadot Bulletin Chain](https://github.
|
|
|
8
26
|
npm install -g bulletin-deploy
|
|
9
27
|
```
|
|
10
28
|
|
|
29
|
+
Requires **Node.js ≥ 22**. Content addressing uses the IPFS [Kubo](https://docs.ipfs.tech/install/) binary if it's on your `PATH`; otherwise pass `--js-merkle` to run it in pure JavaScript with no native dependency.
|
|
30
|
+
|
|
11
31
|
## Quick start
|
|
12
32
|
|
|
13
33
|
```sh
|
|
@@ -15,17 +35,28 @@ npm install -g bulletin-deploy
|
|
|
15
35
|
bulletin-deploy ./dist my-app.dot
|
|
16
36
|
```
|
|
17
37
|
|
|
18
|
-
|
|
38
|
+
Once it finishes, your site is served at `https://my-app.dot.li`.
|
|
39
|
+
|
|
40
|
+
New here? **[DEPLOYMENT.md](DEPLOYMENT.md)** walks you from prerequisites to a viewable app, step by step — including how to acquire a `.dot` name, what authorization a network requires (the raw "not authorized" chain error is a common first-run trap), and where a deployed site is viewable.
|
|
41
|
+
|
|
42
|
+
## Signing with a mobile wallet
|
|
19
43
|
|
|
20
44
|
Sign in once with your mobile Polkadot wallet — no mnemonic on disk:
|
|
21
45
|
|
|
22
46
|
```sh
|
|
23
|
-
bulletin-deploy login # Scan QR code with your Polkadot wallet app
|
|
47
|
+
bulletin-deploy login # Scan the QR code with your Polkadot wallet app
|
|
24
48
|
bulletin-deploy whoami # Show the currently signed-in address
|
|
25
49
|
bulletin-deploy logout # Sign out and clear the session
|
|
26
50
|
```
|
|
27
51
|
|
|
28
|
-
After `login`, subsequent deploys
|
|
52
|
+
After `login`, subsequent deploys hand the name to your signed-in account with **zero mobile signatures** (testnet): a local worker (the default dev account, or your `--mnemonic`) registers the name and uploads the content, then transfers ownership to your signed-in address as the final step. Pass `--no-transfer-to-signedin-user` to sign every DotNS transaction with your mobile session instead.
|
|
53
|
+
|
|
54
|
+
If a deploy's content lands but the final transfer fails, hand the name over separately:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
bulletin-deploy transfer my-app.dot # → the signed-in account
|
|
58
|
+
bulletin-deploy transfer my-app.dot --to 0x... # → an explicit recipient
|
|
59
|
+
```
|
|
29
60
|
|
|
30
61
|
## Options
|
|
31
62
|
|
|
@@ -37,19 +68,39 @@ Key options:
|
|
|
37
68
|
|--------|-------------|
|
|
38
69
|
| `--env <id>` | Target environment (default: `paseo-next-v2`). Run `--list-environments` to see available IDs. |
|
|
39
70
|
| `--mnemonic "..."` | DotNS owner mnemonic (or set `MNEMONIC` env var). Alternative to session signing. |
|
|
71
|
+
| `--no-transfer-to-signedin-user` | When signed in, sign every DotNS tx with your mobile session instead of the default register-as-worker-then-hand-over flow. |
|
|
72
|
+
| `--to <0xH160>` | Recipient address for the `transfer` subcommand. Defaults to the signed-in account. |
|
|
40
73
|
| `--js-merkle` | Use pure-JS merkleization (no IPFS Kubo binary required). |
|
|
41
74
|
| `--publish` | List the domain in the on-chain Publisher registry after deploy. |
|
|
42
75
|
| `--config <path>` | Explicit path to `bulletin-deploy.config.ts` for product deploys. |
|
|
43
76
|
| `--tag "..."` | Label the deploy in telemetry. |
|
|
44
77
|
| `--version` | Print the installed version and exit. |
|
|
45
78
|
|
|
79
|
+
Subcommands: `login`, `logout`, `whoami` (session management, above) and `transfer <domain.dot>` (hand a name you registered to the signed-in account or `--to`).
|
|
80
|
+
|
|
46
81
|
## Environments
|
|
47
82
|
|
|
48
|
-
bulletin-deploy ships with built-in environment presets (RPC endpoints, contract addresses). Use `--list-environments` to print the table
|
|
83
|
+
bulletin-deploy ships with built-in environment presets (RPC endpoints, contract addresses). The default is `paseo-next-v2`, a Polkadot testnet. Use `--list-environments` to print the table; override individual fields with `--environment-file <path>` or `--contract KEY=0x...`. For what a starting account needs on a given network — funding, a `.dot` name, authorization — see **[DEPLOYMENT.md](DEPLOYMENT.md)**.
|
|
84
|
+
|
|
85
|
+
## Build from source
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
git clone https://github.com/paritytech/bulletin-deploy
|
|
89
|
+
cd bulletin-deploy
|
|
90
|
+
npm ci
|
|
91
|
+
npm run build
|
|
92
|
+
npm test # offline unit tests
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This produces the same `bulletin-deploy` CLI in `bin/`. See [`docs/testing.md`](docs/testing.md) for the live-testnet E2E suite.
|
|
96
|
+
|
|
97
|
+
## Releases
|
|
98
|
+
|
|
99
|
+
Releases use a two-stage flow: a release candidate is validated by the end-to-end test matrix against a live testnet, then the byte-identical source is published to npm under the stable version. Once Trusted Publishing is enabled, npm provenance will let you verify that a published release was built from this repository.
|
|
49
100
|
|
|
50
101
|
## Telemetry
|
|
51
102
|
|
|
52
|
-
Deploy telemetry (Sentry) is **off by default**. It activates only if you explicitly opt in with `BULLETIN_DEPLOY_TELEMETRY=1`, or when the CLI detects it is running in Parity's own CI. Set `BULLETIN_DEPLOY_TELEMETRY=0` to force it off in any context. The Sentry DSN baked into the package is a public project identifier, not a secret — it grants no access to collected data.
|
|
103
|
+
Deploy telemetry (Sentry) is **off by default**. It activates only if you explicitly opt in with `BULLETIN_DEPLOY_TELEMETRY=1`, or when the CLI detects it is running in Parity's own CI. Set `BULLETIN_DEPLOY_TELEMETRY=0` — or the cross-tool `DO_NOT_TRACK=1` — to force it off in any context. The Sentry DSN baked into the package is a public project identifier, not a secret — it grants no access to collected data.
|
|
53
104
|
|
|
54
105
|
Separately from telemetry, the CLI checks the npm registry for the minimum supported version. Set `BULLETIN_DEPLOY_UPDATE_CHECK=0` to disable that check.
|
|
55
106
|
|
|
@@ -57,6 +108,22 @@ Separately from telemetry, the CLI checks the npm registry for the minimum suppo
|
|
|
57
108
|
|
|
58
109
|
Issues and pull requests are welcome on the GitHub repository. Releases are cut by the maintainers. (Parity-internal design notes and investigation logs live in `docs-internal/`, which is not published to npm.)
|
|
59
110
|
|
|
111
|
+
## Security
|
|
112
|
+
|
|
113
|
+
> [!WARNING]
|
|
114
|
+
> The following is a prototype, reference implementation, and proof-of-concept. This open source code is provided for research, experimentation, and developer education only. This code has not been audited, is actively experimental, and may contain bugs, vulnerabilities, or incomplete features. Use at your own risk.
|
|
115
|
+
|
|
116
|
+
This repository contains reference and proof-of-concept code. Unless a specific release states otherwise, it has **not** received a full security audit. Use in production or production-like deployments should only follow an independent security review of the relevant code, configuration, generated output, and deployment environment.
|
|
117
|
+
|
|
118
|
+
Before deploying this for real use cases, you are responsible for:
|
|
119
|
+
|
|
120
|
+
- Reviewing the code yourself — we publish a reference, not a hardened production build.
|
|
121
|
+
- Checking that the dependencies are up to date and free of known vulnerabilities.
|
|
122
|
+
- Securing your own fork or deployment environment (keys, secrets, network configuration).
|
|
123
|
+
- Tracking the latest tagged release for security fixes; older releases are not backported (exceptions might apply).
|
|
124
|
+
|
|
125
|
+
Do **not** open a public issue for a suspected vulnerability. Follow Parity's responsible-disclosure process (`SECURITY.md`, inherited org-wide from [`paritytech/.github`](https://github.com/paritytech/.github/blob/main/SECURITY.md)) and email **security@parity.io**. For Parity's Bug Bounty programme, see https://parity.io/bug-bounty.
|
|
126
|
+
|
|
60
127
|
## License
|
|
61
128
|
|
|
62
129
|
[GPL-3.0-or-later](LICENSE). Versions up to and including 0.8.3 were published under Apache-2.0; the license changed to GPL-3.0-or-later ahead of the project being open-sourced.
|
package/assets/environments.json
CHANGED
|
@@ -128,6 +128,35 @@
|
|
|
128
128
|
"PUBLISHER": "0xa616254fd98724c7a3d295c98ca393a486096b68"
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
"id": "summit",
|
|
133
|
+
"name": "Summit",
|
|
134
|
+
"network": "testnet",
|
|
135
|
+
"description": "Web3 Summit Network",
|
|
136
|
+
"e2eEligible": false,
|
|
137
|
+
"ipfs": "https://summit-ipfs.polkadot.io",
|
|
138
|
+
"autoAccountMapping": true,
|
|
139
|
+
"nativeToEthRatio": 100000000,
|
|
140
|
+
"registerStorageDeposit": 2000000000000,
|
|
141
|
+
"contracts": {
|
|
142
|
+
"DOTNS_PROTOCOL_REGISTRY": "0x09f1AE947950eA2d1f010fE2abC00fDd5A745820",
|
|
143
|
+
"DOTNS_REGISTRAR": "0xf3969bCBE60463302306663C62A6A8ef91ab9aA5",
|
|
144
|
+
"DOTNS_REGISTRAR_CONTROLLER": "0xA68a5b2A6be6d014be0dB07c0ed4bacc4A6A570A",
|
|
145
|
+
"DOTNS_REGISTRY": "0xFb7AB7E142ED0248D77198CA8722D67C1930D783",
|
|
146
|
+
"DOTNS_POP_CONTROLLER": "0xC7DD78B145ed109092A2d1E79324E5FE219B9518",
|
|
147
|
+
"ROOT_GATEWAY_DISPATCHER": "0x22362162032ED2442b43f5902b3421be5aCF1b60",
|
|
148
|
+
"DOTNS_RESOLVER": "0xC7f1C3B16BFd0c5910EE37a4a2033f4506AcE94d",
|
|
149
|
+
"DOTNS_CONTENT_RESOLVER": "0xf110e5799c3f0adb8ED885C02c45Ecfe7fD86226",
|
|
150
|
+
"DOTNS_REVERSE_RESOLVER": "0x5aa444C6cbA9bd703d1a0B5E5C643FB886F80bB4",
|
|
151
|
+
"DOTNS_POP_RESOLVER": "0x03FD2ed7B1b848c59A2428224162dE00D11a8133",
|
|
152
|
+
"DOTNS_NAME_ESCROW": "0xDbE911007f8cd9876D384b8c025d3BB157DCCcA4",
|
|
153
|
+
"POP_RULES": "0x6331e51C9AfC73BfE12562fd160BA2c66A73f984",
|
|
154
|
+
"STORE_FACTORY": "0x2947af3CBFb45b89610524a25921C32cB65C4C39",
|
|
155
|
+
"LABEL_STORE_BEACON": "0x670Dab225ea4f2EeB0e6Df2e49AA595aB2CAa5cb",
|
|
156
|
+
"USER_STORE_BEACON": "0x31e392736889c973A25509861C7D6E6F2EaD951C",
|
|
157
|
+
"MULTICALL3": "0x1C1044BEa5bDe0F435436bB52A8340fBE1D59847"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
131
160
|
{
|
|
132
161
|
"id": "polkadot",
|
|
133
162
|
"name": "Polkadot",
|
|
@@ -166,6 +195,9 @@
|
|
|
166
195
|
"wss": "wss://paseo-rpc.n.dwellir.com",
|
|
167
196
|
"uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
|
|
168
197
|
},
|
|
198
|
+
"summit": {
|
|
199
|
+
"wss": "wss://summit-rpc.polkadot.io"
|
|
200
|
+
},
|
|
169
201
|
"polkadot": {
|
|
170
202
|
"wss": [
|
|
171
203
|
"wss://polkadot-rpc.n.dwellir.com",
|
|
@@ -213,6 +245,9 @@
|
|
|
213
245
|
"wss": "wss://paseo-asset-hub-next-rpc.polkadot.io",
|
|
214
246
|
"parachainId": 1500
|
|
215
247
|
},
|
|
248
|
+
"summit": {
|
|
249
|
+
"wss": "wss://summit-asset-hub-rpc.polkadot.io"
|
|
250
|
+
},
|
|
216
251
|
"polkadot": {
|
|
217
252
|
"wss": [
|
|
218
253
|
"wss://asset-hub-polkadot-rpc.n.dwellir.com",
|
|
@@ -326,6 +361,9 @@
|
|
|
326
361
|
"wss": "wss://paseo-people-next-system-rpc.polkadot.io",
|
|
327
362
|
"parachainId": 1502
|
|
328
363
|
},
|
|
364
|
+
"summit": {
|
|
365
|
+
"wss": "wss://summit-people-rpc.polkadot.io"
|
|
366
|
+
},
|
|
329
367
|
"polkadot": {
|
|
330
368
|
"wss": [
|
|
331
369
|
"wss://people-polkadot-rpc.n.dwellir.com",
|
|
@@ -376,6 +414,9 @@
|
|
|
376
414
|
"wss": "wss://paseo-bulletin-next-rpc.polkadot.io",
|
|
377
415
|
"parachainId": 1501
|
|
378
416
|
},
|
|
417
|
+
"summit": {
|
|
418
|
+
"wss": "wss://summit-bulletin-rpc.polkadot.io"
|
|
419
|
+
},
|
|
379
420
|
"custom": {
|
|
380
421
|
"wss": "wss://previewnet.substrate.dev/bulletin",
|
|
381
422
|
"parachainId": 2487
|
package/bin/bulletin-deploy
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, NonRetryableError, EXIT_CODE_NO_RETRY, isConnectionError, unpublish } from "../dist/deploy.js";
|
|
3
|
+
import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, NonRetryableError, EXIT_CODE_NO_RETRY, isConnectionError, isBenignTeardownError, unpublish } from "../dist/deploy.js";
|
|
4
4
|
import { VERSION, setDeployAttribute, captureWarning, closeTelemetry, setRunStateActive, markRelaunchOomHintShown } from "../dist/telemetry.js";
|
|
5
5
|
import { handleFailedDeploy, handlePreflightVersionCheck, fetchVersionInfo, preReleaseWarning, checkNodeVersion } from "../dist/version-check.js";
|
|
6
6
|
import { setDeployContext, installLogCapture, buildCliFlagsSummary } from "../dist/bug-report.js";
|
|
@@ -142,12 +142,8 @@ if (flags.unpublish) {
|
|
|
142
142
|
// installed yet here, so SSO subcommands install these guards to swallow that +
|
|
143
143
|
// connection-teardown noise and surface anything else.
|
|
144
144
|
function installSsoTeardownGuards() {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return isConnectionError(e) || /DestroyedError|Client destroyed/.test(s);
|
|
148
|
-
};
|
|
149
|
-
process.on("unhandledRejection", (e) => { if (!benignTeardown(e)) { console.error(e); process.exit(1); } });
|
|
150
|
-
process.on("uncaughtException", (e) => { if (!benignTeardown(e)) { console.error(e); process.exit(1); } });
|
|
145
|
+
process.on("unhandledRejection", (e) => { if (!isBenignTeardownError(e)) { console.error(e); process.exit(1); } });
|
|
146
|
+
process.on("uncaughtException", (e) => { if (!isBenignTeardownError(e)) { console.error(e); process.exit(1); } });
|
|
151
147
|
}
|
|
152
148
|
|
|
153
149
|
// Sign-in subcommands: login / logout / whoami.
|
|
@@ -396,9 +392,13 @@ if (!flags.help && !flags.version) {
|
|
|
396
392
|
if (process.env.BULLETIN_DEPLOY_DEBUG_HANDLERS === "1") {
|
|
397
393
|
console.error(`[handleUnhandled ${kind}] match=${isConnectionError(e)} type=${e?.constructor?.name ?? typeof e} msg=${msgStr.slice(0, 200)}`);
|
|
398
394
|
}
|
|
399
|
-
|
|
395
|
+
// Benign teardown noise (connection errors + "DestroyedError: Client destroyed"
|
|
396
|
+
// from session-adapter teardown after the deploy's work is done) must not mark
|
|
397
|
+
// the deploy killed / exit 2. The SSO subcommands already whitelist this; the
|
|
398
|
+
// deploy path must too (the owner-signs update path tears down a session).
|
|
399
|
+
if (isBenignTeardownError(e)) {
|
|
400
400
|
try {
|
|
401
|
-
captureWarning(`Suppressed ${kind} connection
|
|
401
|
+
captureWarning(`Suppressed ${kind} teardown/connection noise`, { msg: msgStr.slice(0, 200) });
|
|
402
402
|
} catch { /* telemetry best-effort */ }
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
@@ -486,7 +486,7 @@ try {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
console.log(`CID: ${result.cid}`);
|
|
489
|
-
console.log(`Domain: ${result.
|
|
489
|
+
console.log(`Domain: ${result.fullDomain}`);
|
|
490
490
|
|
|
491
491
|
// Opt-in manifest publish on top of the legacy contenthash deploy.
|
|
492
492
|
//
|
|
@@ -515,13 +515,8 @@ try {
|
|
|
515
515
|
console.error(`Manifest publish failed: ${err?.message ?? err}`);
|
|
516
516
|
process.exit(err instanceof NonRetryableError ? EXIT_CODE_NO_RETRY : 1);
|
|
517
517
|
}
|
|
518
|
-
} else {
|
|
519
|
-
const where = flags.config
|
|
520
|
-
? `--config ${flags.config}`
|
|
521
|
-
: `bulletin-deploy.config.{ts,js,mjs} via walking up from ${buildDirAbs}`;
|
|
522
|
-
console.log("");
|
|
523
|
-
console.log(`⚠ No bulletin-deploy.config.ts — ${domain} published as legacy contenthash only. Add config to enable product manifest: https://github.com/paritytech/triangle-js-sdks`);
|
|
524
518
|
}
|
|
519
|
+
// No config → the contenthash-only deploy above is the whole job; nothing else to do.
|
|
525
520
|
}
|
|
526
521
|
|
|
527
522
|
if (!flags.help && !flags.version) {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as polkadot_api from 'polkadot-api';
|
|
2
|
+
import { TerminalAdapter, UserSession } from '@parity/product-sdk-terminal';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Structural mirror of host-papp's `ApAllocatableResource` codec type. We
|
|
6
|
+
* declare it locally because host-papp's package root doesn't re-export the
|
|
7
|
+
* codec types yet — when it does (and product-sdk-terminal threads them
|
|
8
|
+
* through) this can be replaced with a direct import.
|
|
9
|
+
*
|
|
10
|
+
* StatementStoreAllowance — write to the SSS (host_chat, allowance ring).
|
|
11
|
+
* BulletInAllowance — write to Bulletin (TransactionStorage.store).
|
|
12
|
+
* SmartContractAllowance — PGAS sponsoring for Revive contract calls.
|
|
13
|
+
* The `value` is the derivation index of the
|
|
14
|
+
* product account (0 for the default account).
|
|
15
|
+
* AutoSigning — surrender the product-account signing key to
|
|
16
|
+
* the host so it can sign on the user's behalf
|
|
17
|
+
* without per-call prompts. Not used today.
|
|
18
|
+
*
|
|
19
|
+
* NOTE: host-api v0.8 renamed this variant to 'BulletinAllowance', but the
|
|
20
|
+
* SSO resource-allocation codec (host-papp, which this path reaches via
|
|
21
|
+
* product-sdk-terminal) retains the old 'BulletInAllowance' spelling as of
|
|
22
|
+
* host-papp 0.8.5 / terminal 0.3.1. Ours must match the SSO codec — the
|
|
23
|
+
* _SDK_COMPAT_PIN below fails the build if the SDK's spelling ever changes.
|
|
24
|
+
*/
|
|
25
|
+
type AllocatableResource = {
|
|
26
|
+
tag: "StatementStoreAllowance";
|
|
27
|
+
value: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
tag: "BulletInAllowance";
|
|
30
|
+
value: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
tag: "SmartContractAllowance";
|
|
33
|
+
value: number;
|
|
34
|
+
} | {
|
|
35
|
+
tag: "AutoSigning";
|
|
36
|
+
value: undefined;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Outcome of one allocation. We don't read the inner `Allocated` payload
|
|
40
|
+
* (allowance slot keys, derivation secrets) — the host stores them and uses
|
|
41
|
+
* them transparently on subsequent calls. We just need the tag to know
|
|
42
|
+
* whether the allocation succeeded.
|
|
43
|
+
*/
|
|
44
|
+
type AllocationOutcome = {
|
|
45
|
+
tag: "Allocated";
|
|
46
|
+
value: unknown;
|
|
47
|
+
} | {
|
|
48
|
+
tag: "Rejected";
|
|
49
|
+
value: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
tag: "NotAvailable";
|
|
52
|
+
value: undefined;
|
|
53
|
+
};
|
|
54
|
+
/** Tag-only view, handy for downstream code that doesn't care about payloads. */
|
|
55
|
+
type ResourceTag = AllocatableResource["tag"];
|
|
56
|
+
type OnExistingAllowancePolicy = "Ignore" | "Increase";
|
|
57
|
+
/**
|
|
58
|
+
* Default mobile-granted resource set for a CLI product account: write access
|
|
59
|
+
* to the statement store + Bulletin, plus PGAS sponsoring for the default
|
|
60
|
+
* (index 0) product account.
|
|
61
|
+
*/
|
|
62
|
+
declare const DEFAULT_RESOURCES: AllocatableResource[];
|
|
63
|
+
/**
|
|
64
|
+
* The BulletInAllowance resource singleton. Callers that only need this one
|
|
65
|
+
* resource (e.g. createSlotAccountSigner) use this constant instead of
|
|
66
|
+
* constructing the literal — keeps the SSO codec spelling in one place.
|
|
67
|
+
*/
|
|
68
|
+
declare const BULLETIN_RESOURCE: AllocatableResource;
|
|
69
|
+
/**
|
|
70
|
+
* Send a `host_request_resource_allocation` request over the user's active
|
|
71
|
+
* session. The host (mobile wallet) prompts the user to approve and returns
|
|
72
|
+
* one outcome per requested resource in order. Granted key material is cached
|
|
73
|
+
* to disk by the terminal facet (`{appId}_AllowanceKeys.json`) so subsequent
|
|
74
|
+
* calls (and the storage-signer reader) find it without a second wallet prompt.
|
|
75
|
+
*
|
|
76
|
+
* Throws on transport-level failures (Statement Store unreachable, encryption
|
|
77
|
+
* error, etc.). Per-resource refusals are reported as `Rejected`/`NotAvailable`
|
|
78
|
+
* outcomes — callers inspect the array to decide whether to proceed.
|
|
79
|
+
*
|
|
80
|
+
* `onExisting` is pinned to "Ignore": return existing cached keys if any, else
|
|
81
|
+
* allocate a new slot. Auto-pick would give "Increase" when all slot-table
|
|
82
|
+
* resources are already cached, which re-prompts the user unnecessarily.
|
|
83
|
+
*/
|
|
84
|
+
declare function requestResourceAllocation(session: UserSession, adapter: TerminalAdapter, resources?: AllocatableResource[], onExisting?: OnExistingAllowancePolicy): Promise<AllocationOutcome[]>;
|
|
85
|
+
interface AllocationSummary {
|
|
86
|
+
granted: AllocatableResource[];
|
|
87
|
+
rejected: AllocatableResource[];
|
|
88
|
+
unavailable: AllocatableResource[];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Bucket allocation outcomes by tag. Order-sensitive: `outcomes[i]` maps to
|
|
92
|
+
* `resources[i]`. Outcomes without a matching resource are silently dropped.
|
|
93
|
+
*/
|
|
94
|
+
declare function summarizeOutcomes(outcomes: AllocationOutcome[], resources: AllocatableResource[]): AllocationSummary;
|
|
95
|
+
/**
|
|
96
|
+
* Read a previously allocated slot signer from the terminal cache
|
|
97
|
+
* (`{appId}_AllowanceKeys.json`) written by `requestResourceAllocation`.
|
|
98
|
+
*
|
|
99
|
+
* Returns `null` on a cache miss — never triggers a phone prompt. Use this
|
|
100
|
+
* instead of `adapter.allowance.getBulletinSigner()` when the allocation has
|
|
101
|
+
* already been claimed in the same session (e.g. after a successful
|
|
102
|
+
* `requestResourceAllocation(DEFAULT_RESOURCES)` call) so that step 2 of the
|
|
103
|
+
* login flow is a guaranteed cache-hit with zero additional wallet interaction.
|
|
104
|
+
*
|
|
105
|
+
* Throws only for SmartContractAllowance / AutoSigning resources (not applicable
|
|
106
|
+
* to BulletInAllowance). Returns `null` for BulletInAllowance when no cached
|
|
107
|
+
* entry exists.
|
|
108
|
+
*/
|
|
109
|
+
declare function createSlotAccountSigner(adapter: TerminalAdapter, resource: AllocatableResource): Promise<polkadot_api.PolkadotSigner | null>;
|
|
110
|
+
|
|
111
|
+
export { type AllocatableResource as A, BULLETIN_RESOURCE as B, DEFAULT_RESOURCES as D, type OnExistingAllowancePolicy as O, type ResourceTag as R, type AllocationOutcome as a, type AllocationSummary as b, createSlotAccountSigner as c, requestResourceAllocation as r, summarizeOutcomes as s };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { A as
|
|
1
|
+
export { A as AuthClient, a as AuthConfig, C as ConnectResult, L as LoginHandle, b as LoginStatus, c as LogoutHandle, d as LogoutStatus, S as SessionAddresses, e as SessionHandle, f as createAuthClient } from '../auth-CA_YKtM2.js';
|
|
2
2
|
export { renderQrCode } from '@parity/product-sdk-terminal';
|
|
3
|
-
export { R as ResolvedSigner, S as SignerNotAvailableError, r as resolveSigner } from '../signer-
|
|
3
|
+
export { R as ResolvedSigner, S as SignerNotAvailableError, r as resolveSigner } from '../signer-Duup0hgQ.js';
|
|
4
|
+
export { A as AllocatableResource, a as AllocationOutcome, b as AllocationSummary, B as BULLETIN_RESOURCE, D as DEFAULT_RESOURCES, c as createSlotAccountSigner, r as requestResourceAllocation, s as summarizeOutcomes } from '../allocations-CEPeZr6T.js';
|
|
4
5
|
export { renderLoginStatus, renderLogoutStatus } from './vendor/ui/index.js';
|
|
5
6
|
import 'polkadot-api';
|
|
6
7
|
import '@parity/product-sdk-tx';
|
package/dist/auth/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import "../chunk-JQKKMUCT.js";
|
|
2
2
|
import {
|
|
3
|
+
BULLETIN_RESOURCE,
|
|
3
4
|
DEFAULT_RESOURCES,
|
|
4
5
|
SignerNotAvailableError,
|
|
5
6
|
createAuthClient,
|
|
7
|
+
createSlotAccountSigner,
|
|
6
8
|
requestResourceAllocation,
|
|
7
9
|
resolveSigner,
|
|
8
10
|
summarizeOutcomes
|
|
9
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-5OKB3TEB.js";
|
|
10
12
|
import {
|
|
11
13
|
renderLoginStatus,
|
|
12
14
|
renderLogoutStatus,
|
|
@@ -14,9 +16,11 @@ import {
|
|
|
14
16
|
} from "../chunk-RIRDBSBG.js";
|
|
15
17
|
import "../chunk-ZOC4GITL.js";
|
|
16
18
|
export {
|
|
19
|
+
BULLETIN_RESOURCE,
|
|
17
20
|
DEFAULT_RESOURCES,
|
|
18
21
|
SignerNotAvailableError,
|
|
19
22
|
createAuthClient,
|
|
23
|
+
createSlotAccountSigner,
|
|
20
24
|
renderLoginStatus,
|
|
21
25
|
renderLogoutStatus,
|
|
22
26
|
renderQrCode,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { A as
|
|
1
|
+
export { A as AuthClient, a as AuthConfig, C as ConnectResult, L as LoginHandle, b as LoginStatus, c as LogoutHandle, d as LogoutStatus, S as SessionAddresses, e as SessionHandle, f as createAuthClient } from '../../auth-CA_YKtM2.js';
|
|
2
2
|
import { UserSession } from '@parity/product-sdk-terminal';
|
|
3
3
|
import { PolkadotSigner } from 'polkadot-api';
|
|
4
|
-
export { R as ResolvedSigner, S as SignerNotAvailableError, a as SignerOptions, b as SignerSource, p as parseDevAccountName, r as resolveSigner } from '../../signer-
|
|
4
|
+
export { R as ResolvedSigner, S as SignerNotAvailableError, a as SignerOptions, b as SignerSource, p as parseDevAccountName, r as resolveSigner } from '../../signer-Duup0hgQ.js';
|
|
5
|
+
export { A as AllocatableResource, a as AllocationOutcome, b as AllocationSummary, B as BULLETIN_RESOURCE, D as DEFAULT_RESOURCES, O as OnExistingAllowancePolicy, R as ResourceTag, c as createSlotAccountSigner, r as requestResourceAllocation, s as summarizeOutcomes } from '../../allocations-CEPeZr6T.js';
|
|
5
6
|
import '@parity/product-sdk-tx';
|
|
6
7
|
|
|
7
8
|
interface ProductAccountRef {
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BULLETIN_RESOURCE,
|
|
2
3
|
DEFAULT_RESOURCES,
|
|
3
4
|
INCOMPLETE_SESSION_MESSAGE,
|
|
4
5
|
SignerNotAvailableError,
|
|
5
6
|
createAuthClient,
|
|
6
7
|
createSessionSigner,
|
|
8
|
+
createSlotAccountSigner,
|
|
7
9
|
deriveProductPublicKey,
|
|
8
10
|
parseDevAccountName,
|
|
9
11
|
requestResourceAllocation,
|
|
10
12
|
resolveSigner,
|
|
11
13
|
sessionRootPublicKey,
|
|
12
14
|
summarizeOutcomes
|
|
13
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-5OKB3TEB.js";
|
|
14
16
|
import "../../chunk-ZOC4GITL.js";
|
|
15
17
|
export {
|
|
18
|
+
BULLETIN_RESOURCE,
|
|
16
19
|
DEFAULT_RESOURCES,
|
|
17
20
|
INCOMPLETE_SESSION_MESSAGE,
|
|
18
21
|
SignerNotAvailableError,
|
|
19
22
|
createAuthClient,
|
|
20
23
|
createSessionSigner,
|
|
24
|
+
createSlotAccountSigner,
|
|
21
25
|
deriveProductPublicKey,
|
|
22
26
|
parseDevAccountName,
|
|
23
27
|
requestResourceAllocation,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { renderQrCode } from '@parity/product-sdk-terminal';
|
|
2
|
-
import {
|
|
2
|
+
import { b as LoginStatus, d as LogoutStatus } from '../../../auth-CA_YKtM2.js';
|
|
3
3
|
import 'polkadot-api';
|
|
4
|
+
import '../../../allocations-CEPeZr6T.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Pure formatters that map the `LoginStatus` / `LogoutStatus` streams to
|