gdc-common-utils-ts 2.5.1 → 2.5.2
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.
|
@@ -10,8 +10,9 @@ export declare const PostalActivationLicenseStatuses: Readonly<{
|
|
|
10
10
|
export type PostalActivationLicenseStatus = typeof PostalActivationLicenseStatuses[keyof typeof PostalActivationLicenseStatuses];
|
|
11
11
|
/**
|
|
12
12
|
* Public binding recorded for the activation licence. The activation code is
|
|
13
|
-
* deliberately absent
|
|
14
|
-
*
|
|
13
|
+
* deliberately absent. The VC carries only a salted, pepper-dependent scrypt
|
|
14
|
+
* binding so the host can verify the same code later without disclosing it or
|
|
15
|
+
* enabling offline guessing from the credential alone.
|
|
15
16
|
*/
|
|
16
17
|
export type PostalActivationLicenseBinding = Readonly<{
|
|
17
18
|
licenseId: string;
|
|
@@ -20,6 +21,11 @@ export type PostalActivationLicenseBinding = Readonly<{
|
|
|
20
21
|
controllerEmail: string;
|
|
21
22
|
controllerKeyMaterial: string;
|
|
22
23
|
postalAddressHash: string;
|
|
24
|
+
protectedCode: Readonly<{
|
|
25
|
+
algorithm: 'scrypt-v1';
|
|
26
|
+
salt: string;
|
|
27
|
+
digest: string;
|
|
28
|
+
}>;
|
|
23
29
|
hostDid: string;
|
|
24
30
|
network: 'test-network' | 'network';
|
|
25
31
|
status: PostalActivationLicenseStatus;
|
|
@@ -58,6 +58,11 @@ export function buildOrganizationRegistrationAuthorizationCredential(input) {
|
|
|
58
58
|
status: input.postalLicense.status,
|
|
59
59
|
postalAddressHash: required(input.postalLicense.postalAddressHash, 'postalLicense.postalAddressHash'),
|
|
60
60
|
deliveredAt: required(input.postalLicense.deliveredAt, 'postalLicense.deliveredAt'),
|
|
61
|
+
protectedCode: {
|
|
62
|
+
algorithm: input.postalLicense.protectedCode.algorithm,
|
|
63
|
+
salt: required(input.postalLicense.protectedCode.salt, 'postalLicense.protectedCode.salt'),
|
|
64
|
+
digest: required(input.postalLicense.protectedCode.digest, 'postalLicense.protectedCode.digest'),
|
|
65
|
+
},
|
|
61
66
|
},
|
|
62
67
|
},
|
|
63
68
|
validFrom: required(input.validFrom, 'validFrom'),
|