@learncard/simple-signing-plugin 1.0.3
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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/simple-signing-plugin.cjs.development.js +4614 -0
- package/dist/simple-signing-plugin.cjs.development.js.map +7 -0
- package/dist/simple-signing-plugin.cjs.production.min.js +5 -0
- package/dist/simple-signing-plugin.cjs.production.min.js.map +7 -0
- package/dist/simple-signing-plugin.esm.js +4593 -0
- package/dist/simple-signing-plugin.esm.js.map +7 -0
- package/dist/types.d.ts +39 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 WeLibrary, LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[<img src="https://user-images.githubusercontent.com/2185016/190510561-294db809-09fd-4771-9749-6c0e0f4144fd.png" width="215"/>](https://learncard.com)
|
|
2
|
+
|
|
3
|
+
# Simple Signing Plugin
|
|
4
|
+
|
|
5
|
+
A LearnCard plugin that integrates with the Simple Signing Service to enable signature verification for LearnCard Network operations.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This plugin provides a connection between LearnCard and a Simple Signing Service implementation. It allows LearnCard Network operations to utilize a signing authority that can verify and sign actions within the network.
|
|
10
|
+
|
|
11
|
+
Key features:
|
|
12
|
+
- Integration with LearnCard Network for credential operations
|
|
13
|
+
- Signing Authority for network actions like claim links and Auto Boosts
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { initLearnCard } from '@learncard/init';
|
|
19
|
+
import { getSimpleSigningPlugin } from '@learncard/simple-signing-plugin';
|
|
20
|
+
|
|
21
|
+
// Initialize LearnCard with network capabilities
|
|
22
|
+
const learnCard = await initLearnCard({ seed: 'abc123', network: true });
|
|
23
|
+
|
|
24
|
+
// Add the Simple Signing Plugin
|
|
25
|
+
const saLearnCard = await learnCard.addPlugin(
|
|
26
|
+
await getSimpleSigningPlugin(learnCard, 'https://yourendpoint.com/trpc')
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// Now your LearnCard instance can use signing operations with the Simple Signing Service
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Self-Hosting
|
|
33
|
+
|
|
34
|
+
This plugin is designed to work with a self-hosted Simple Signing Service. See the `simple-signing-service` package for details on setting up your own service.
|
|
35
|
+
|
|
36
|
+
## E2E Testing
|
|
37
|
+
|
|
38
|
+
This plugin is particularly useful for end-to-end testing of LearnCard Network operations that require Signing Authorities, without needing to implement a full production signing authority.
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT © [Learning Economy Foundation](https://github.com/Learning-Economy-Foundation)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LearnCard } from '@learncard/core';
|
|
2
|
+
import { SimpleSigningPluginDependentMethods, SimpleSigningPlugin } from './types';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export declare const getSimpleSigningPlugin: (initialLearnCard: LearnCard<any, "id", SimpleSigningPluginDependentMethods>, url: string) => Promise<SimpleSigningPlugin>;
|
|
5
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,mCAAmC,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnF,cAAc,SAAS,CAAC;AAexB,eAAO,MAAM,sBAAsB,qBACb,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,mCAAmC,CAAC,OACtE,MAAM,KACZ,OAAO,CAAC,mBAAmB,CAqD7B,CAAC"}
|