@learncard/did-web-plugin 1.0.7 → 1.0.9
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.
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/plugin.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './types';\nexport * from './plugin';\n", "import { LearnCard } from '@learncard/core';\n\nimport { DidWebPluginDependentMethods, DidWebPluginMethods, DidWebPlugin } from './types';\nexport * from './types';\n\n/**\n * @group Plugins\n */\nexport const getDidWebPlugin = async (\n learnCard: LearnCard<any, 'id', DidWebPluginDependentMethods>,\n didWeb: string\n): Promise<DidWebPlugin> => {\n const existingDid = learnCard.id.did();\n\n learnCard?.debug?.('Adding DID Web Plugin');\n if (!didWeb.includes('did:web:')) {\n throw new Error('Must provide a valid did:web DID into constructor.');\n }\n\n return {\n name: 'DID Web',\n displayName: 'DID Web',\n description:\n 'The LearnCard DID Web Plugin is a plugin for adding did-web support to a LearnCard agent for signing VCs.',\n id: {\n did: (_learnCard, method) => {\n if (!method || method === 'web') return didWeb;\n\n return learnCard.id.did(method);\n },\n keypair: (_learnCard, algorithm) => learnCard.id.keypair(algorithm),\n },\n methods: {},\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACQO,IAAM,kBAAkB,8BAC3B,WACA,WACwB;AACxB,QAAM,cAAc,UAAU,GAAG,IAAI;AAErC,aAAW,QAAQ,uBAAuB;AAC1C,MAAI,CAAC,OAAO,SAAS,UAAU,GAAG;AAC9B,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACxE;AAEA,SAAO;AAAA,IACH,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aACI;AAAA,IACJ,IAAI;AAAA,MACA,KAAK,CAAC,YAAY,WAAW;AACzB,YAAI,CAAC,UAAU,WAAW;AAAO,iBAAO;AAExC,eAAO,UAAU,GAAG,IAAI,MAAM;AAAA,MAClC;AAAA,MACA,SAAS,CAAC,YAAY,cAAc,UAAU,GAAG,QAAQ,SAAS;AAAA,IACtE;AAAA,IACA,SAAS,CAAC;AAAA,EACd;AACJ,GA1B+B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var t=(i,e)=>o(i,"name",{value:e,configurable:!0});var g=(i,e)=>{for(var r in e)o(i,r,{get:e[r],enumerable:!0})},u=(i,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of s(e))!D.call(i,d)&&d!==r&&o(i,d,{get:()=>e[d],enumerable:!(n=a(e,d))||n.enumerable});return i};var p=i=>u(o({},"__esModule",{value:!0}),i);var l={};g(l,{getDidWebPlugin:()=>b});module.exports=p(l);var b=t(async(i,e)=>{let r=i.id.did();if(i?.debug?.("Adding DID Web Plugin"),!e.includes("did:web:"))throw new Error("Must provide a valid did:web DID into constructor.");return{name:"DID Web",displayName:"DID Web",description:"The LearnCard DID Web Plugin is a plugin for adding did-web support to a LearnCard agent for signing VCs.",id:{did:(n,d)=>!d||d==="web"?e:i.id.did(d),keypair:(n,d)=>i.id.keypair(d)},methods:{}}},"getDidWebPlugin");
|
|
2
2
|
//# sourceMappingURL=did-web-plugin.cjs.production.min.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/plugin.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './types';\nexport * from './plugin';\n", "import { LearnCard } from '@learncard/core';\n\nimport { DidWebPluginDependentMethods, DidWebPluginMethods, DidWebPlugin } from './types';\nexport * from './types';\n\n/**\n * @group Plugins\n */\nexport const getDidWebPlugin = async (\n learnCard: LearnCard<any, 'id', DidWebPluginDependentMethods>,\n didWeb: string\n): Promise<DidWebPlugin> => {\n const existingDid = learnCard.id.did();\n\n learnCard?.debug?.('Adding DID Web Plugin');\n if (!didWeb.includes('did:web:')) {\n throw new Error('Must provide a valid did:web DID into constructor.');\n }\n\n return {\n name: 'DID Web',\n displayName: 'DID Web',\n description:\n 'The LearnCard DID Web Plugin is a plugin for adding did-web support to a LearnCard agent for signing VCs.',\n id: {\n did: (_learnCard, method) => {\n if (!method || method === 'web') return didWeb;\n\n return learnCard.id.did(method);\n },\n keypair: (_learnCard, algorithm) => learnCard.id.keypair(algorithm),\n },\n methods: {},\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "+cAAA,0DCQO,GAAM,GAAkB,QAC3B,EACA,IACwB,CACxB,GAAM,GAAc,EAAU,GAAG,IAAI,EAGrC,GADA,GAAW,QAAQ,uBAAuB,EACtC,CAAC,EAAO,SAAS,UAAU,EAC3B,KAAM,IAAI,OAAM,oDAAoD,EAGxE,MAAO,CACH,KAAM,UACN,YAAa,UACb,YACI,4GACJ,GAAI,CACA,IAAK,CAAC,EAAY,IACV,CAAC,GAAU,IAAW,MAAc,EAEjC,EAAU,GAAG,IAAI,CAAM,EAElC,QAAS,CAAC,EAAY,IAAc,EAAU,GAAG,QAAQ,CAAS,CACtE,EACA,QAAS,CAAC,CACd,CACJ,EA1B+B",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/did-web-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/did-web-plugin.esm.js",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"jest": "^29.3.0",
|
|
29
29
|
"shx": "^0.3.4",
|
|
30
30
|
"ts-jest": "^29.0.3",
|
|
31
|
-
"@learncard/types": "5.3.
|
|
31
|
+
"@learncard/types": "5.3.2"
|
|
32
32
|
},
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@learncard/
|
|
36
|
-
"@learncard/
|
|
37
|
-
"@learncard/
|
|
38
|
-
"@learncard/
|
|
39
|
-
"@learncard/
|
|
40
|
-
"@learncard/
|
|
41
|
-
"@learncard/
|
|
42
|
-
"@learncard/
|
|
43
|
-
"@learncard/
|
|
44
|
-
"@learncard/
|
|
35
|
+
"@learncard/ceramic-plugin": "1.0.3",
|
|
36
|
+
"@learncard/core": "9.0.3",
|
|
37
|
+
"@learncard/didkey-plugin": "1.0.3",
|
|
38
|
+
"@learncard/didkit-plugin": "^1.0.5",
|
|
39
|
+
"@learncard/expiration-plugin": "1.0.5",
|
|
40
|
+
"@learncard/helpers": "1.0.7",
|
|
41
|
+
"@learncard/learn-card-plugin": "1.0.6",
|
|
42
|
+
"@learncard/types": "5.3.2",
|
|
43
|
+
"@learncard/vc-plugin": "1.0.5",
|
|
44
|
+
"@learncard/vc-templates-plugin": "1.0.4"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|