@parity/product-deploy 0.7.28 → 0.7.30-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/assets/environments.json +34 -30
- package/dist/bug-report.js +4 -4
- package/dist/{chunk-TPDF24MG.js → chunk-2ULXHYB4.js} +58 -7
- package/dist/{chunk-37M4NISG.js → chunk-2WWR3DVD.js} +3 -3
- package/dist/{chunk-2VAUMZB2.js → chunk-7Y7RDOGT.js} +39 -8
- package/dist/{chunk-BMAEWZYV.js → chunk-AFBOKCCQ.js} +3 -3
- package/dist/{chunk-THZU3FZU.js → chunk-E62JHC4N.js} +2 -2
- package/dist/{chunk-ZJDGVUN3.js → chunk-EYWOZU4M.js} +3 -3
- package/dist/{chunk-Y7XKC43A.js → chunk-FIKBEVYL.js} +1 -1
- package/dist/{chunk-HZKRLQLG.js → chunk-GL2HHK4G.js} +34 -30
- package/dist/{chunk-5VZQ2KSU.js → chunk-JCOZV25R.js} +18 -15
- package/dist/{chunk-IDYGYIMH.js → chunk-LHLCPDGL.js} +1 -1
- package/dist/{chunk-6Y3XJGV7.js → chunk-MZ4Z5AXI.js} +115 -62
- package/dist/{chunk-T7EEVWNU.js → chunk-SI2ZUOYD.js} +5 -5
- package/dist/chunk-SLE4P6MO.js +39 -0
- package/dist/chunk-XAB7WM3S.js +90 -0
- package/dist/{chunk-64KTKZ7H.js → chunk-YCVK36KC.js} +1 -1
- package/dist/{chunk-LFKP64TQ.js → chunk-YP6AS724.js} +5 -1
- package/dist/{chunk-7NKOV5SU.js → chunk-ZGH7YHV5.js} +1 -1
- package/dist/chunk-probe.js +3 -3
- package/dist/deploy.d.ts +3 -1
- package/dist/deploy.js +11 -9
- package/dist/dotns.d.ts +19 -2
- package/dist/dotns.js +7 -5
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -10
- package/dist/manifest/publish.js +10 -10
- package/dist/memory-report.js +2 -2
- package/dist/merkle.js +9 -9
- package/dist/personhood/bind-paid-alias.d.ts +1 -1
- package/dist/personhood/bind-paid-alias.js +3 -2
- package/dist/personhood/bind-personal-id.js +2 -2
- package/dist/personhood/bootstrap.d.ts +7 -0
- package/dist/personhood/bootstrap.js +29 -17
- package/dist/personhood/chain-prereqs.d.ts +76 -0
- package/dist/personhood/chain-prereqs.js +17 -0
- package/dist/personhood/claim-pgas.d.ts +33 -2
- package/dist/personhood/claim-pgas.js +4 -2
- package/dist/personhood/constants.d.ts +5 -5
- package/dist/personhood/constants.js +3 -3
- package/dist/personhood/member-key.js +2 -2
- package/dist/personhood/people-client.js +5 -5
- package/dist/personhood/proof-validity.d.ts +41 -0
- package/dist/personhood/proof-validity.js +12 -0
- package/dist/personhood/reprove.d.ts +1 -1
- package/dist/personhood/reprove.js +10 -13
- package/dist/pool.js +3 -3
- package/dist/run-state.js +1 -1
- package/dist/telemetry.d.ts +43 -1
- package/dist/telemetry.js +4 -2
- package/dist/version-check.js +3 -3
- package/package.json +3 -3
package/dist/dotns.js
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
WS_HEARTBEAT_TIMEOUT_MS,
|
|
25
25
|
__formatContractDryRunFailureForTest,
|
|
26
26
|
canRegister,
|
|
27
|
+
classifyAliasAccountRow,
|
|
27
28
|
classifyDotnsLabel,
|
|
28
29
|
classifyTxRetryDecision,
|
|
29
30
|
computeDomainTokenId,
|
|
@@ -47,11 +48,11 @@ import {
|
|
|
47
48
|
stripTrailingDigits,
|
|
48
49
|
validateDomainLabel,
|
|
49
50
|
verifyNonceAdvanced
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-MZ4Z5AXI.js";
|
|
52
|
+
import "./chunk-FIKBEVYL.js";
|
|
53
|
+
import "./chunk-YP6AS724.js";
|
|
54
|
+
import "./chunk-2WWR3DVD.js";
|
|
55
|
+
import "./chunk-GL2HHK4G.js";
|
|
55
56
|
import "./chunk-ZOC4GITL.js";
|
|
56
57
|
export {
|
|
57
58
|
ATTR_TX_RESOLUTION_KIND,
|
|
@@ -79,6 +80,7 @@ export {
|
|
|
79
80
|
WS_HEARTBEAT_TIMEOUT_MS,
|
|
80
81
|
__formatContractDryRunFailureForTest,
|
|
81
82
|
canRegister,
|
|
83
|
+
classifyAliasAccountRow,
|
|
82
84
|
classifyDotnsLabel,
|
|
83
85
|
classifyTxRetryDecision,
|
|
84
86
|
computeDomainTokenId,
|
package/dist/environments.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-MMAZFJDG.js";
|
|
8
8
|
import {
|
|
9
9
|
publishManifest
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EYWOZU4M.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_TEXT_RECORD_BUDGET_BYTES,
|
|
13
13
|
PLACEHOLDER_CID,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
deploy,
|
|
25
25
|
merkleizeJS,
|
|
26
26
|
merkleizeWithStableOrder
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2ULXHYB4.js";
|
|
28
28
|
import {
|
|
29
29
|
computeStats,
|
|
30
30
|
renderSummary,
|
|
@@ -46,26 +46,26 @@ import {
|
|
|
46
46
|
isVolatilePath,
|
|
47
47
|
parseManifest
|
|
48
48
|
} from "./chunk-S7EM5VMW.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-E62JHC4N.js";
|
|
50
|
+
import "./chunk-YCVK36KC.js";
|
|
51
51
|
import {
|
|
52
52
|
probeChunks
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-ZGH7YHV5.js";
|
|
54
54
|
import "./chunk-C2TS5MER.js";
|
|
55
55
|
import {
|
|
56
56
|
DEFAULT_MNEMONIC,
|
|
57
57
|
DotNS,
|
|
58
58
|
parseDomainName,
|
|
59
59
|
sanitizeDomainLabel
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-MZ4Z5AXI.js";
|
|
61
61
|
import {
|
|
62
62
|
bootstrapPool,
|
|
63
63
|
derivePoolAccounts,
|
|
64
64
|
ensureAuthorized,
|
|
65
65
|
fetchPoolAuthorizations,
|
|
66
66
|
selectAccount
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import "./chunk-
|
|
67
|
+
} from "./chunk-FIKBEVYL.js";
|
|
68
|
+
import "./chunk-YP6AS724.js";
|
|
69
69
|
import {
|
|
70
70
|
VERSION,
|
|
71
71
|
loadRunState,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
shouldSkipStaleWarning,
|
|
76
76
|
stateFilePath,
|
|
77
77
|
writeRunState
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-2WWR3DVD.js";
|
|
79
79
|
import {
|
|
80
80
|
DEFAULT_ENV_ID,
|
|
81
81
|
defaultBundledPath,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
loadEnvironments,
|
|
86
86
|
resolveEndpoints,
|
|
87
87
|
validateContractAddresses
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-GL2HHK4G.js";
|
|
89
89
|
import "./chunk-ZOC4GITL.js";
|
|
90
90
|
import "./chunk-HOTQDYHD.js";
|
|
91
91
|
export {
|
package/dist/manifest/publish.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishManifest
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EYWOZU4M.js";
|
|
4
4
|
import "../chunk-RI3ZLNPN.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-2ULXHYB4.js";
|
|
6
6
|
import "../chunk-IW3X2MJF.js";
|
|
7
7
|
import "../chunk-KOSF5FDO.js";
|
|
8
8
|
import "../chunk-L2SKSKB6.js";
|
|
9
9
|
import "../chunk-S7EM5VMW.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-E62JHC4N.js";
|
|
11
|
+
import "../chunk-YCVK36KC.js";
|
|
12
|
+
import "../chunk-ZGH7YHV5.js";
|
|
13
13
|
import "../chunk-C2TS5MER.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-MZ4Z5AXI.js";
|
|
15
|
+
import "../chunk-FIKBEVYL.js";
|
|
16
|
+
import "../chunk-YP6AS724.js";
|
|
17
|
+
import "../chunk-2WWR3DVD.js";
|
|
18
|
+
import "../chunk-GL2HHK4G.js";
|
|
19
19
|
import "../chunk-ZOC4GITL.js";
|
|
20
20
|
import "../chunk-HOTQDYHD.js";
|
|
21
21
|
export {
|
package/dist/memory-report.js
CHANGED
package/dist/merkle.js
CHANGED
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
merkleizeKuboBackend,
|
|
7
7
|
merkleizeWithStableOrder,
|
|
8
8
|
rebuildOrderedCarFromBytes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2ULXHYB4.js";
|
|
10
10
|
import "./chunk-IW3X2MJF.js";
|
|
11
11
|
import "./chunk-KOSF5FDO.js";
|
|
12
12
|
import "./chunk-L2SKSKB6.js";
|
|
13
13
|
import "./chunk-S7EM5VMW.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-E62JHC4N.js";
|
|
15
|
+
import "./chunk-YCVK36KC.js";
|
|
16
|
+
import "./chunk-ZGH7YHV5.js";
|
|
17
17
|
import "./chunk-C2TS5MER.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MZ4Z5AXI.js";
|
|
19
|
+
import "./chunk-FIKBEVYL.js";
|
|
20
|
+
import "./chunk-YP6AS724.js";
|
|
21
|
+
import "./chunk-2WWR3DVD.js";
|
|
22
|
+
import "./chunk-GL2HHK4G.js";
|
|
23
23
|
import "./chunk-ZOC4GITL.js";
|
|
24
24
|
import "./chunk-HOTQDYHD.js";
|
|
25
25
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SS58String, PolkadotSigner } from 'polkadot-api';
|
|
2
2
|
|
|
3
|
-
type PaidAliasBindingErrorKind = "NotARecognizedPerson" | "RingRootNotFound" | "
|
|
3
|
+
type PaidAliasBindingErrorKind = "NotARecognizedPerson" | "RingRootNotFound" | "AliasFeeUnset" | "InsufficientPgas" | "BadProof" | "DispatchError" | "RpcError" | "ClientError" | "Unknown";
|
|
4
4
|
declare class PaidAliasBindingError extends Error {
|
|
5
5
|
readonly kind: PaidAliasBindingErrorKind;
|
|
6
6
|
readonly dispatchError?: unknown;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PaidAliasBindingError,
|
|
3
3
|
bindPaidAliasToAccount
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-JCOZV25R.js";
|
|
5
|
+
import "../chunk-SLE4P6MO.js";
|
|
6
|
+
import "../chunk-SI2ZUOYD.js";
|
|
6
7
|
import "../chunk-ZYVGHDMU.js";
|
|
7
8
|
export {
|
|
8
9
|
PaidAliasBindingError,
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
PersonalIdBindingError,
|
|
3
3
|
bindPersonalIdToAccount,
|
|
4
4
|
buildAsPersonExtensionValue
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-LHLCPDGL.js";
|
|
6
|
+
import "../chunk-SI2ZUOYD.js";
|
|
7
7
|
import "../chunk-ZYVGHDMU.js";
|
|
8
8
|
export {
|
|
9
9
|
PersonalIdBindingError,
|
|
@@ -2,6 +2,7 @@ import { SS58String } from 'polkadot-api';
|
|
|
2
2
|
import { bindPersonalIdToAccount } from './bind-personal-id.js';
|
|
3
3
|
import { claimPgas } from './claim-pgas.js';
|
|
4
4
|
import { bindPaidAliasToAccount } from './bind-paid-alias.js';
|
|
5
|
+
import { runChainPrereqProbes } from './chain-prereqs.js';
|
|
5
6
|
|
|
6
7
|
interface BootstrapState {
|
|
7
8
|
recognized: boolean;
|
|
@@ -70,6 +71,12 @@ interface RunBootstrapTestApis {
|
|
|
70
71
|
claimPgas?: typeof claimPgas;
|
|
71
72
|
/** Override `bindPaidAliasToAccount` (defaults to the real import). */
|
|
72
73
|
bindPaidAliasToAccount?: typeof bindPaidAliasToAccount;
|
|
74
|
+
/**
|
|
75
|
+
* Override `runChainPrereqProbes` (defaults to the real import).
|
|
76
|
+
* Tests can inject a no-op or a function that throws to verify probe
|
|
77
|
+
* failure is handled correctly.
|
|
78
|
+
*/
|
|
79
|
+
runChainPrereqProbes?: typeof runChainPrereqProbes;
|
|
73
80
|
}
|
|
74
81
|
declare function runBootstrap({ mnemonic, environmentId, requireRecognized, _testApis, }: {
|
|
75
82
|
mnemonic: string;
|
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveMemberEntropy,
|
|
3
3
|
deriveMemberKey
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-AFBOKCCQ.js";
|
|
5
|
+
import "../chunk-UPWEOGLQ.js";
|
|
5
6
|
import {
|
|
6
7
|
bindPaidAliasToAccount
|
|
7
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-JCOZV25R.js";
|
|
9
|
+
import "../chunk-SLE4P6MO.js";
|
|
8
10
|
import {
|
|
9
11
|
bindPersonalIdToAccount
|
|
10
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-LHLCPDGL.js";
|
|
13
|
+
import {
|
|
14
|
+
runChainPrereqProbes
|
|
15
|
+
} from "../chunk-XAB7WM3S.js";
|
|
11
16
|
import {
|
|
12
17
|
claimPgas
|
|
13
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-7Y7RDOGT.js";
|
|
14
19
|
import {
|
|
15
20
|
DOTNS_CONTEXT_BYTES,
|
|
21
|
+
PEOPLE_MEMBER_IDENTIFIER_HEX,
|
|
16
22
|
PGAS_ASSET_ID
|
|
17
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-SI2ZUOYD.js";
|
|
18
24
|
import {
|
|
19
25
|
bytesToHex
|
|
20
26
|
} from "../chunk-ZYVGHDMU.js";
|
|
21
|
-
import "../chunk-UPWEOGLQ.js";
|
|
22
27
|
import {
|
|
23
28
|
WS_HEARTBEAT_TIMEOUT_MS
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-MZ4Z5AXI.js";
|
|
30
|
+
import "../chunk-FIKBEVYL.js";
|
|
31
|
+
import "../chunk-YP6AS724.js";
|
|
32
|
+
import "../chunk-2WWR3DVD.js";
|
|
28
33
|
import {
|
|
29
34
|
loadEnvironments
|
|
30
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-GL2HHK4G.js";
|
|
31
36
|
import "../chunk-ZOC4GITL.js";
|
|
32
37
|
|
|
33
38
|
// src/personhood/bootstrap.ts
|
|
@@ -51,13 +56,14 @@ async function probeBootstrapState({
|
|
|
51
56
|
memberKey,
|
|
52
57
|
account
|
|
53
58
|
}) {
|
|
54
|
-
const { PEOPLE_MEMBER_IDENTIFIER_HEX } = await import("./constants.js");
|
|
59
|
+
const { PEOPLE_MEMBER_IDENTIFIER_HEX: PEOPLE_MEMBER_IDENTIFIER_HEX2 } = await import("./constants.js");
|
|
55
60
|
const people = peopleUnsafeApi;
|
|
56
61
|
const ah = ahUnsafeApi;
|
|
57
62
|
const [memberPosition, pgasAcct, feeRaw, aliasRow] = await Promise.all([
|
|
58
|
-
people.query.Members.Members.getValue(
|
|
63
|
+
people.query.Members.Members.getValue(PEOPLE_MEMBER_IDENTIFIER_HEX2, bytesToHex(memberKey), { at: "best" }),
|
|
59
64
|
ah.query.Assets.Account.getValue(PGAS_ASSET_ID, account, { at: "best" }),
|
|
60
|
-
|
|
65
|
+
// §3.1: Storage renamed from PaidAliasFee → AliasFee (individuality#955).
|
|
66
|
+
ah.query.AliasAccounts.AliasFee.getValue({ at: "best" }),
|
|
61
67
|
ah.query.AliasAccounts.AccountToAlias.getValue(account, { at: "best" })
|
|
62
68
|
]);
|
|
63
69
|
const recognized = memberPosition?.type === "Included";
|
|
@@ -70,7 +76,9 @@ async function probeBootstrapState({
|
|
|
70
76
|
const pgasBalance = pgasAcct?.balance ?? 0n;
|
|
71
77
|
const paidAliasFee = feeRaw ?? 0n;
|
|
72
78
|
const aliasBound = aliasRow ? {
|
|
73
|
-
|
|
79
|
+
// NOTE: `paid` field removed from AccountToAlias in individuality#955.
|
|
80
|
+
// Treat all bound aliases as paid (AliasFee applies to everyone).
|
|
81
|
+
paid: true,
|
|
74
82
|
contextHex: aliasRow.ca.context,
|
|
75
83
|
revision: aliasRow.revision
|
|
76
84
|
} : null;
|
|
@@ -157,6 +165,10 @@ async function runBootstrap({
|
|
|
157
165
|
}
|
|
158
166
|
const actionsExecuted = [];
|
|
159
167
|
let currentState = { ...initialState };
|
|
168
|
+
if (nextBootstrapAction(currentState) !== null) {
|
|
169
|
+
const _runChainPrereqProbes = _testApis?.runChainPrereqProbes ?? runChainPrereqProbes;
|
|
170
|
+
await _runChainPrereqProbes(ahUnsafeApi, PEOPLE_MEMBER_IDENTIFIER_HEX);
|
|
171
|
+
}
|
|
160
172
|
if (!currentState.personalIdBound) {
|
|
161
173
|
const memberKeyHex = "0x" + Array.from(memberKey, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
162
174
|
const peoplePeopleStore = peopleUnsafeApi.query.People;
|
|
@@ -183,8 +195,8 @@ async function runBootstrap({
|
|
|
183
195
|
account: ss58
|
|
184
196
|
});
|
|
185
197
|
}
|
|
186
|
-
const buildRingProof = async ({ members, context, msg }) => {
|
|
187
|
-
const result = verifiable.one_shot(memberEntropy, members, context, msg);
|
|
198
|
+
const buildRingProof = async ({ ringExponent, members, context, msg }) => {
|
|
199
|
+
const result = verifiable.one_shot(ringExponent, memberEntropy, members, context, msg);
|
|
188
200
|
return { proof: result.proof, alias: result.alias };
|
|
189
201
|
};
|
|
190
202
|
if (currentState.pgasBalance < currentState.paidAliasFee) {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XCM location for the relay native asset (DOT/PAS) — "here from relay".
|
|
3
|
+
* See docs-internal/dotns-bootstrap-handover.md §6.2.
|
|
4
|
+
*/
|
|
5
|
+
declare const NATIVE_LOC: {
|
|
6
|
+
parents: 1;
|
|
7
|
+
interior: {
|
|
8
|
+
type: "Here";
|
|
9
|
+
value: undefined;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* XCM location for the PGAS fungible asset on Asset Hub.
|
|
14
|
+
* PalletInstance(50) = the Assets pallet; GeneralIndex = PGAS asset id.
|
|
15
|
+
* See docs-internal/dotns-bootstrap-handover.md §6.2.
|
|
16
|
+
*/
|
|
17
|
+
declare const PGAS_LOC: {
|
|
18
|
+
parents: 0;
|
|
19
|
+
interior: {
|
|
20
|
+
type: "X2";
|
|
21
|
+
value: readonly [{
|
|
22
|
+
readonly type: "PalletInstance";
|
|
23
|
+
readonly value: 50;
|
|
24
|
+
}, {
|
|
25
|
+
readonly type: "GeneralIndex";
|
|
26
|
+
readonly value: bigint;
|
|
27
|
+
}];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Probe §6.1 — `MembersSubscriber.RingCollectionExponents[peopleIdent]`.
|
|
32
|
+
*
|
|
33
|
+
* The chain's `verify_membership_at_rev` reads this map to look up the ring
|
|
34
|
+
* exponent for the collection. If it is None (populated only when
|
|
35
|
+
* `initialize_ring_roots` was never run before `process_ring_updates`), every
|
|
36
|
+
* ring-VRF flow returns `Error::CollectionNotFound` which maps to
|
|
37
|
+
* `InvalidTransaction::BadProof`.
|
|
38
|
+
*
|
|
39
|
+
* Fix: chain operator must run `sudo-fix-preview-people-exponent.ts` (or
|
|
40
|
+
* equivalent) to populate the storage entry. This is an operator-only fix.
|
|
41
|
+
* See docs-internal/dotns-bootstrap-handover.md §6.1.
|
|
42
|
+
*/
|
|
43
|
+
declare function probeRingCollectionExponents(ahUnsafeApi: unknown, peopleIdent: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Probe §6.3 — `Assets.Asset[PGAS_ASSET_ID]`.
|
|
46
|
+
*
|
|
47
|
+
* The PGAS fungible asset (id 2_000_000_000) must exist on Asset Hub before
|
|
48
|
+
* `Pgas.claim_pgas` can succeed. If missing, the call rejects with
|
|
49
|
+
* `InvalidTransaction::Custom(233) = PgasAssetNotCreated`.
|
|
50
|
+
*
|
|
51
|
+
* Fix: chain operator must run `Pgas.create_pgas_asset` (authorized origin
|
|
52
|
+
* only) or apply a migration. This is an operator-only fix.
|
|
53
|
+
* See docs-internal/dotns-bootstrap-handover.md §6.3.
|
|
54
|
+
*/
|
|
55
|
+
declare function probePgasAsset(ahUnsafeApi: unknown): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Probe §6.2 — `AssetConversion.Pools[[NATIVE_LOC, PGAS_LOC]]`.
|
|
58
|
+
*
|
|
59
|
+
* Required when routing transaction weight fees through PGAS via
|
|
60
|
+
* ChargeAssetTxPayment (so PAS-zero accounts can pay entirely in PGAS).
|
|
61
|
+
* Without the swap pool, the chain returns `InvalidTransaction::Payment`.
|
|
62
|
+
*
|
|
63
|
+
* Fix: chain operator must create the pool via `sudo-create-pgas-pool.ts` or
|
|
64
|
+
* the equivalent `dot` CLI sequence. This is an operator-only fix.
|
|
65
|
+
* See docs-internal/dotns-bootstrap-handover.md §6.2.
|
|
66
|
+
*/
|
|
67
|
+
declare function probePgasNativePool(ahUnsafeApi: unknown, nativeLoc?: typeof NATIVE_LOC, pgasLoc?: typeof PGAS_LOC): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Run all three chain prerequisite probes in order. Fails fast on the first
|
|
70
|
+
* missing prerequisite so the user gets the most actionable error.
|
|
71
|
+
*
|
|
72
|
+
* Wire this into the bootstrap entry point BEFORE any chain submission.
|
|
73
|
+
*/
|
|
74
|
+
declare function runChainPrereqProbes(ahUnsafeApi: unknown, peopleIdent: string): Promise<void>;
|
|
75
|
+
|
|
76
|
+
export { NATIVE_LOC, PGAS_LOC, probePgasAsset, probePgasNativePool, probeRingCollectionExponents, runChainPrereqProbes };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NATIVE_LOC,
|
|
3
|
+
PGAS_LOC,
|
|
4
|
+
probePgasAsset,
|
|
5
|
+
probePgasNativePool,
|
|
6
|
+
probeRingCollectionExponents,
|
|
7
|
+
runChainPrereqProbes
|
|
8
|
+
} from "../chunk-XAB7WM3S.js";
|
|
9
|
+
import "../chunk-SI2ZUOYD.js";
|
|
10
|
+
export {
|
|
11
|
+
NATIVE_LOC,
|
|
12
|
+
PGAS_LOC,
|
|
13
|
+
probePgasAsset,
|
|
14
|
+
probePgasNativePool,
|
|
15
|
+
probeRingCollectionExponents,
|
|
16
|
+
runChainPrereqProbes
|
|
17
|
+
};
|
|
@@ -24,6 +24,16 @@ interface PgasClaimProgress {
|
|
|
24
24
|
onBroadcasted?: () => void;
|
|
25
25
|
onBestBlock?: (blockHash: string) => void;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Injection seam for `validate_with_commitment` (verifiablejs/nodejs ≥ beta.4).
|
|
29
|
+
* Signature: (ringExponent, proof, commitment, context, message) → alias bytes.
|
|
30
|
+
* Throws if the proof does not verify against the given commitment.
|
|
31
|
+
*
|
|
32
|
+
* Tests supply a mock; production callers get the real function from verifiablejs.
|
|
33
|
+
* When the installed verifiablejs < 1.3.0-beta.4 lacks the export, the default
|
|
34
|
+
* implementation throws a clear error rather than silently skipping the check.
|
|
35
|
+
*/
|
|
36
|
+
type ValidateWithCommitment = (ringExponent: number, proof: Uint8Array, commitment: Uint8Array, context: Uint8Array, message: Uint8Array) => Uint8Array;
|
|
27
37
|
interface ClaimPgasParams {
|
|
28
38
|
peopleUnsafeApi: unknown;
|
|
29
39
|
ahUnsafeApi: unknown;
|
|
@@ -33,12 +43,33 @@ interface ClaimPgasParams {
|
|
|
33
43
|
buildRingProof: BuildRingProof;
|
|
34
44
|
slotIndex?: number;
|
|
35
45
|
progress?: PgasClaimProgress;
|
|
46
|
+
/**
|
|
47
|
+
* Injectable `validate_with_commitment` for testing. Defaults to the real
|
|
48
|
+
* verifiablejs export when available. See docs-internal/dotns-bootstrap-handover.md §5.
|
|
49
|
+
*/
|
|
50
|
+
validateWithCommitment?: ValidateWithCommitment;
|
|
36
51
|
}
|
|
37
52
|
interface ClaimPgasResult {
|
|
38
53
|
blockHash: string;
|
|
39
54
|
amount: bigint;
|
|
40
55
|
alias: Uint8Array;
|
|
41
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Compute the AsPgas inherited-implication exclude set DYNAMICALLY from the
|
|
59
|
+
* live AH chain's signed-extension pipeline order.
|
|
60
|
+
*
|
|
61
|
+
* See docs-internal/dotns-bootstrap-handover.md §4.3 for the full rationale.
|
|
62
|
+
* Hardcoding this set is exactly how BadProof'd in past runtime upgrades:
|
|
63
|
+
* whenever the runtime adds a new origin-modifier extension before AsPgas,
|
|
64
|
+
* a static exclude silently includes its bytes in the implication hash.
|
|
65
|
+
*
|
|
66
|
+
* Recipe: everything ≤ AsPgas in the pipeline is excluded (those extensions
|
|
67
|
+
* run before AsPgas and their bytes are NOT part of the inherited implication).
|
|
68
|
+
* Additionally, "AuthorizeCall" (empty value+implicit, no-op) and
|
|
69
|
+
* "StorageWeightReclaim" (outer wrapper, no contribution) are always excluded
|
|
70
|
+
* even if they appear after AsPgas in a future runtime layout.
|
|
71
|
+
*/
|
|
72
|
+
declare function buildImplicationExclude(pipelineOrder: string[]): Set<string>;
|
|
42
73
|
/**
|
|
43
74
|
* Build the AsPgas::Claim extension value for a `claim_pgas` General extrinsic.
|
|
44
75
|
* Exported so unit tests can assert that the ring-VRF proof is encoded as a hex
|
|
@@ -56,6 +87,6 @@ declare function buildAsPgasClaimExtensionValue(proof: Uint8Array, ringIndex: nu
|
|
|
56
87
|
day: number;
|
|
57
88
|
};
|
|
58
89
|
};
|
|
59
|
-
declare const claimPgas: ({ peopleUnsafeApi, ahUnsafeApi, ahClient, target, memberKey, buildRingProof, slotIndex, progress, }: ClaimPgasParams) => Promise<ClaimPgasResult>;
|
|
90
|
+
declare const claimPgas: ({ peopleUnsafeApi, ahUnsafeApi, ahClient, target, memberKey, buildRingProof, slotIndex, progress, validateWithCommitment, }: ClaimPgasParams) => Promise<ClaimPgasResult>;
|
|
60
91
|
|
|
61
|
-
export { type BuildRingProof, type BuildRingProofInput, type ClaimPgasParams, type ClaimPgasResult, PgasClaimError, type PgasClaimErrorKind, type PgasClaimProgress, type RingExponent, buildAsPgasClaimExtensionValue, claimPgas };
|
|
92
|
+
export { type BuildRingProof, type BuildRingProofInput, type ClaimPgasParams, type ClaimPgasResult, PgasClaimError, type PgasClaimErrorKind, type PgasClaimProgress, type RingExponent, type ValidateWithCommitment, buildAsPgasClaimExtensionValue, buildImplicationExclude, claimPgas };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PgasClaimError,
|
|
3
3
|
buildAsPgasClaimExtensionValue,
|
|
4
|
+
buildImplicationExclude,
|
|
4
5
|
claimPgas
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-7Y7RDOGT.js";
|
|
7
|
+
import "../chunk-SI2ZUOYD.js";
|
|
7
8
|
import "../chunk-ZYVGHDMU.js";
|
|
8
9
|
export {
|
|
9
10
|
PgasClaimError,
|
|
10
11
|
buildAsPgasClaimExtensionValue,
|
|
12
|
+
buildImplicationExclude,
|
|
11
13
|
claimPgas
|
|
12
14
|
};
|
|
@@ -14,10 +14,10 @@ declare const PGAS_ASSET_LOCATION: {
|
|
|
14
14
|
}];
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
declare const PROOF_BYTES =
|
|
18
|
-
declare const BANDERSNATCH_SIGNATURE_BYTES =
|
|
19
|
-
declare const PEOPLE_MEMBER_IDENTIFIER_HEX = "
|
|
17
|
+
declare const PROOF_BYTES = 785;
|
|
18
|
+
declare const BANDERSNATCH_SIGNATURE_BYTES = 64;
|
|
19
|
+
declare const PEOPLE_MEMBER_IDENTIFIER_HEX = "0x706f703a706f6c6b61646f742e6e6574776f726b2f70656f706c652020202020";
|
|
20
20
|
declare const MEMBER_ENTROPY_KEY: Uint8Array<ArrayBuffer>;
|
|
21
|
-
declare const
|
|
21
|
+
declare const ALIAS_PROOF_TAG: Uint8Array<ArrayBuffer>;
|
|
22
22
|
|
|
23
|
-
export { BANDERSNATCH_SIGNATURE_BYTES, DOTNS_CONTEXT_BYTES, DOTNS_CONTEXT_HEX, MEMBER_ENTROPY_KEY,
|
|
23
|
+
export { ALIAS_PROOF_TAG, BANDERSNATCH_SIGNATURE_BYTES, DOTNS_CONTEXT_BYTES, DOTNS_CONTEXT_HEX, MEMBER_ENTROPY_KEY, PEOPLE_MEMBER_IDENTIFIER_HEX, PGAS_ASSET_ID, PGAS_ASSET_LOCATION, PROOF_BYTES };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALIAS_PROOF_TAG,
|
|
2
3
|
BANDERSNATCH_SIGNATURE_BYTES,
|
|
3
4
|
DOTNS_CONTEXT_BYTES,
|
|
4
5
|
DOTNS_CONTEXT_HEX,
|
|
5
6
|
MEMBER_ENTROPY_KEY,
|
|
6
|
-
PAID_PROOF_TAG,
|
|
7
7
|
PEOPLE_MEMBER_IDENTIFIER_HEX,
|
|
8
8
|
PGAS_ASSET_ID,
|
|
9
9
|
PGAS_ASSET_LOCATION,
|
|
10
10
|
PROOF_BYTES
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SI2ZUOYD.js";
|
|
12
12
|
export {
|
|
13
|
+
ALIAS_PROOF_TAG,
|
|
13
14
|
BANDERSNATCH_SIGNATURE_BYTES,
|
|
14
15
|
DOTNS_CONTEXT_BYTES,
|
|
15
16
|
DOTNS_CONTEXT_HEX,
|
|
16
17
|
MEMBER_ENTROPY_KEY,
|
|
17
|
-
PAID_PROOF_TAG,
|
|
18
18
|
PEOPLE_MEMBER_IDENTIFIER_HEX,
|
|
19
19
|
PGAS_ASSET_ID,
|
|
20
20
|
PGAS_ASSET_LOCATION,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveMemberEntropy,
|
|
3
3
|
deriveMemberKey
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-T7EEVWNU.js";
|
|
4
|
+
} from "../chunk-AFBOKCCQ.js";
|
|
6
5
|
import "../chunk-UPWEOGLQ.js";
|
|
6
|
+
import "../chunk-SI2ZUOYD.js";
|
|
7
7
|
export {
|
|
8
8
|
deriveMemberEntropy,
|
|
9
9
|
deriveMemberKey
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WS_HEARTBEAT_TIMEOUT_MS
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-MZ4Z5AXI.js";
|
|
4
|
+
import "../chunk-FIKBEVYL.js";
|
|
5
|
+
import "../chunk-YP6AS724.js";
|
|
6
|
+
import "../chunk-2WWR3DVD.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEnvironments
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-GL2HHK4G.js";
|
|
10
10
|
import "../chunk-ZOC4GITL.js";
|
|
11
11
|
|
|
12
12
|
// src/personhood/people-client.ts
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encode a bigint as 8 bytes, little-endian (u64).
|
|
3
|
+
* This is the wire format used in the AliasAccounts proof message.
|
|
4
|
+
*/
|
|
5
|
+
declare const u64LeBytes: (v: bigint) => Uint8Array;
|
|
6
|
+
/**
|
|
7
|
+
* Build the 32-byte blake2_256 message that the ring-VRF proof must be built
|
|
8
|
+
* against, as required by AliasAccounts after individuality#955.
|
|
9
|
+
*
|
|
10
|
+
* Wire layout of the pre-image (54 bytes):
|
|
11
|
+
* ALIAS_PROOF_TAG — 14 raw bytes ("alias-accounts", no length prefix)
|
|
12
|
+
* accountPub — 32 raw bytes (AccountId32 / SS58 public key)
|
|
13
|
+
* u64LE(proofValidAt) — 8 little-endian bytes
|
|
14
|
+
*
|
|
15
|
+
* Throws if accountPub is not exactly 32 bytes (wrong key or truncation would
|
|
16
|
+
* silently misalign the u64 at the end, producing an undetectable BadProof).
|
|
17
|
+
*/
|
|
18
|
+
declare const buildAliasProofMessage: (accountPub: Uint8Array, proofValidAt: bigint) => Uint8Array;
|
|
19
|
+
type TimestampNowQuery = {
|
|
20
|
+
query: {
|
|
21
|
+
Timestamp: {
|
|
22
|
+
Now: {
|
|
23
|
+
getValue: (opts?: {
|
|
24
|
+
at: string;
|
|
25
|
+
}) => Promise<bigint>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Read the current chain timestamp from Asset Hub and return it in seconds
|
|
32
|
+
* (as a bigint) suitable for passing as `proof_valid_at`.
|
|
33
|
+
*
|
|
34
|
+
* `Timestamp.Now` returns milliseconds; dividing by 1000n converts to seconds.
|
|
35
|
+
*
|
|
36
|
+
* Do NOT cache this value across retries — the ProofValidityWindow is 300s.
|
|
37
|
+
* Re-call on every tx attempt so the timestamp stays within the window.
|
|
38
|
+
*/
|
|
39
|
+
declare const getProofValidAtSec: (ahApi: TimestampNowQuery) => Promise<bigint>;
|
|
40
|
+
|
|
41
|
+
export { buildAliasProofMessage, getProofValidAtSec, u64LeBytes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SS58String, PolkadotSigner } from 'polkadot-api';
|
|
2
2
|
|
|
3
|
-
type ReproveAliasErrorKind = "NoStoredAlias" | "
|
|
3
|
+
type ReproveAliasErrorKind = "NoStoredAlias" | "RingRootNotFound" | "RevisionNotAdvanced" | "AliasMismatch" | "NotARecognizedPerson" | "BadProof" | "DispatchError" | "RpcError" | "ClientError" | "Unknown";
|
|
4
4
|
declare class ReproveAliasError extends Error {
|
|
5
5
|
readonly kind: ReproveAliasErrorKind;
|
|
6
6
|
readonly dispatchError?: unknown;
|