@learncard/network-plugin 2.5.21 → 2.5.23
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/dist/lcn-plugin.cjs.development.js +28 -12
- package/dist/lcn-plugin.cjs.development.js.map +2 -2
- package/dist/lcn-plugin.cjs.production.min.js +2 -2
- package/dist/lcn-plugin.cjs.production.min.js.map +3 -3
- package/dist/lcn-plugin.esm.js +28 -12
- package/dist/lcn-plugin.esm.js.map +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +9 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -2048,7 +2048,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
2048
2048
|
var __toCommonJS22 = /* @__PURE__ */ __name22((mod) => __copyProps222(__defProp222({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
2049
2049
|
var src_exports22 = {};
|
|
2050
2050
|
__export22(src_exports22, {
|
|
2051
|
-
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () =>
|
|
2051
|
+
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2,
|
|
2052
2052
|
AchievementCredentialValidator: () => AchievementCredentialValidator2,
|
|
2053
2053
|
AchievementCriteriaValidator: () => AchievementCriteriaValidator2,
|
|
2054
2054
|
AchievementSubjectValidator: () => AchievementSubjectValidator2,
|
|
@@ -6403,6 +6403,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
6403
6403
|
controller: z2.string(),
|
|
6404
6404
|
publicKeyJwk: JWKValidator2.optional(),
|
|
6405
6405
|
publicKeyBase58: z2.string().optional(),
|
|
6406
|
+
publicKeyMultibase: z2.string().optional(),
|
|
6406
6407
|
blockChainAccountId: z2.string().optional()
|
|
6407
6408
|
}).catchall(z2.any())
|
|
6408
6409
|
);
|
|
@@ -6711,7 +6712,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
6711
6712
|
display: LCNProfileDisplayValidator2.optional().describe("Display settings for the profile."),
|
|
6712
6713
|
highlightedCredentials: z2.array(z2.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
|
|
6713
6714
|
role: z2.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
6714
|
-
dob: z2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
6715
|
+
dob: z2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
|
|
6716
|
+
country: z2.string().optional().describe("Country for the profile.")
|
|
6715
6717
|
});
|
|
6716
6718
|
var LCNProfileQueryValidator2 = z2.object({
|
|
6717
6719
|
profileId: StringQuery2,
|
|
@@ -7105,12 +7107,12 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
7105
7107
|
sent: z2.string().datetime().optional(),
|
|
7106
7108
|
webhookUrl: z2.string().optional()
|
|
7107
7109
|
});
|
|
7108
|
-
var
|
|
7110
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
7109
7111
|
var AuthGrantValidator2 = z2.object({
|
|
7110
7112
|
id: z2.string(),
|
|
7111
7113
|
name: z2.string(),
|
|
7112
7114
|
description: z2.string().optional(),
|
|
7113
|
-
challenge: z2.string().startsWith(
|
|
7115
|
+
challenge: z2.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
7114
7116
|
status: z2.enum(["revoked", "active"], {
|
|
7115
7117
|
required_error: "Status is required",
|
|
7116
7118
|
invalid_type_error: "Status must be either active or revoked"
|
|
@@ -11558,6 +11560,7 @@ var VerificationMethodValidator = z.string().or(
|
|
|
11558
11560
|
controller: z.string(),
|
|
11559
11561
|
publicKeyJwk: JWKValidator.optional(),
|
|
11560
11562
|
publicKeyBase58: z.string().optional(),
|
|
11563
|
+
publicKeyMultibase: z.string().optional(),
|
|
11561
11564
|
blockChainAccountId: z.string().optional()
|
|
11562
11565
|
}).catchall(z.any())
|
|
11563
11566
|
);
|
|
@@ -11866,7 +11869,8 @@ var LCNProfileValidator = z.object({
|
|
|
11866
11869
|
display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
|
|
11867
11870
|
highlightedCredentials: z.array(z.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
|
|
11868
11871
|
role: z.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
11869
|
-
dob: z.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
11872
|
+
dob: z.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
|
|
11873
|
+
country: z.string().optional().describe("Country for the profile.")
|
|
11870
11874
|
});
|
|
11871
11875
|
var LCNProfileQueryValidator = z.object({
|
|
11872
11876
|
profileId: StringQuery,
|
|
@@ -12452,7 +12456,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
12452
12456
|
var __toCommonJS2 = /* @__PURE__ */ __name4((mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
12453
12457
|
var src_exports2 = {};
|
|
12454
12458
|
__export2(src_exports2, {
|
|
12455
|
-
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () =>
|
|
12459
|
+
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: () => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2,
|
|
12456
12460
|
AchievementCredentialValidator: () => AchievementCredentialValidator2,
|
|
12457
12461
|
AchievementCriteriaValidator: () => AchievementCriteriaValidator2,
|
|
12458
12462
|
AchievementSubjectValidator: () => AchievementSubjectValidator2,
|
|
@@ -16784,6 +16788,7 @@ var require_types_cjs_development = __commonJS2({
|
|
|
16784
16788
|
controller: z2.string(),
|
|
16785
16789
|
publicKeyJwk: JWKValidator2.optional(),
|
|
16786
16790
|
publicKeyBase58: z2.string().optional(),
|
|
16791
|
+
publicKeyMultibase: z2.string().optional(),
|
|
16787
16792
|
blockChainAccountId: z2.string().optional()
|
|
16788
16793
|
}).catchall(z2.any())
|
|
16789
16794
|
);
|
|
@@ -17092,7 +17097,8 @@ var require_types_cjs_development = __commonJS2({
|
|
|
17092
17097
|
display: LCNProfileDisplayValidator2.optional().describe("Display settings for the profile."),
|
|
17093
17098
|
highlightedCredentials: z2.array(z2.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
|
|
17094
17099
|
role: z2.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
|
|
17095
|
-
dob: z2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".')
|
|
17100
|
+
dob: z2.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
|
|
17101
|
+
country: z2.string().optional().describe("Country for the profile.")
|
|
17096
17102
|
});
|
|
17097
17103
|
var LCNProfileQueryValidator2 = z2.object({
|
|
17098
17104
|
profileId: StringQuery2,
|
|
@@ -17486,12 +17492,12 @@ var require_types_cjs_development = __commonJS2({
|
|
|
17486
17492
|
sent: z2.string().datetime().optional(),
|
|
17487
17493
|
webhookUrl: z2.string().optional()
|
|
17488
17494
|
});
|
|
17489
|
-
var
|
|
17495
|
+
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
17490
17496
|
var AuthGrantValidator2 = z2.object({
|
|
17491
17497
|
id: z2.string(),
|
|
17492
17498
|
name: z2.string(),
|
|
17493
17499
|
description: z2.string().optional(),
|
|
17494
|
-
challenge: z2.string().startsWith(
|
|
17500
|
+
challenge: z2.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
|
|
17495
17501
|
status: z2.enum(["revoked", "active"], {
|
|
17496
17502
|
required_error: "Status is required",
|
|
17497
17503
|
invalid_type_error: "Status must be either active or revoked"
|
|
@@ -17885,10 +17891,20 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
17885
17891
|
throw new Error("Please make an account first!");
|
|
17886
17892
|
return client.profile.paginatedConnectionRequests.query(options);
|
|
17887
17893
|
},
|
|
17888
|
-
generateInvite: async (_learnCard, challenge, expiration) => {
|
|
17894
|
+
generateInvite: async (_learnCard, challenge, expiration, maxUses) => {
|
|
17889
17895
|
if (!userData)
|
|
17890
17896
|
throw new Error("Please make an account first!");
|
|
17891
|
-
return client.profile.generateInvite.mutate({ challenge, expiration });
|
|
17897
|
+
return client.profile.generateInvite.mutate({ challenge, expiration, maxUses });
|
|
17898
|
+
},
|
|
17899
|
+
listInvites: async () => {
|
|
17900
|
+
if (!userData)
|
|
17901
|
+
throw new Error("Please make an account first!");
|
|
17902
|
+
return client.profile.listInvites.query();
|
|
17903
|
+
},
|
|
17904
|
+
invalidateInvite: async (_learnCard, challenge) => {
|
|
17905
|
+
if (!userData)
|
|
17906
|
+
throw new Error("Please make an account first!");
|
|
17907
|
+
return client.profile.invalidateInvite.mutate({ challenge });
|
|
17892
17908
|
},
|
|
17893
17909
|
blockProfile: async (_learnCard, profileId) => {
|
|
17894
17910
|
if (!userData)
|
|
@@ -18650,7 +18666,7 @@ var getVerifyBoostPlugin = /* @__PURE__ */ __name(async (learnCard, trustedBoost
|
|
|
18650
18666
|
}
|
|
18651
18667
|
}
|
|
18652
18668
|
}
|
|
18653
|
-
} catch
|
|
18669
|
+
} catch {
|
|
18654
18670
|
verificationCheck.errors.push("Boost authenticity could not be verified.");
|
|
18655
18671
|
}
|
|
18656
18672
|
return verificationCheck;
|