npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vereign/lib-seal

v1.0.6

Published

A library that exposes the functionality of seal extraction and iframes embedding

Downloads

2,482

Readme

Seal Library

Seal Library is an integration tool for reading sealed emails and using Iframe API to verify them.

Installation

  • Set up authentication to the company NPM account

  • $ yarn add @vereign/lib-seal @vereign/lib-mime @vereign/lib-png

    @vereign/lib-mime and @vereign/lib-png are required peer dependencies

Development and publishing

  • Set up authentication to the company NPM account using publish token or login via npm login/yarn login
  • npm publish/yarn publish

Development of the Iframe API

Any change in the Iframe API and its errors must be reflected in Public Iframe API documentation

Development of the SealService

Changes related to the:

  • Seal template must be reflected in Seal in Email documentation
  • Seal metadata must be reflected in Seal Metadata documentation
  • Seal ID and Seal URL must be reflected in glossary

API

SealService API

SealService provides a function to extract seals from mime. It depends on @vereign/lib-mime functionality of parsing the forwarded and replied parts of the MIME.

At the moment, it supports only Outlook and Gmail emails. To support other email platforms, relevant adjustments have to be applied to the @vereign/lib-mime

import { SealService } from "@vereign/lib-seal"

// Obtain MIME of the email
const mime = "...";

const {
    sealId,
    sealUrl,
    publicKey
} = await SealService.extractSealFromMime(mime)

// Proceed with the loading of the Iframe API

Iframe API

Load iframe API to perform sealing and sending of the email

import { IframeAPI } from "@vereign/lib-seal";

// Concept of the iframe Url explained here
// https://code.vereign.com/seal/documentation/-/tree/master/apis/iframe#iframe-url
iframeUrl = "https://seal-integrator.com/vframe";
const iframeAPI = await IframeAPI.loadAPI(iframeUrl);

// Integrator story related to sealing and sending explained here
// https://code.vereign.com/seal/building-blocks/iframe#sender-create-seal-send-a-message-via-outlook-add-inchrome-extension-and-publish-sender-status

await iframeAPI.destroy();

Load iframe API of sender to perform verification of the email

import { IframeAPI, StatusApiError, MimeVerificationError, SealApiError, SealService } from "@vereign/lib-seal"

// Obtain MIME of the email
const mime = "...";

const { sealUrl } = await SealService.extractSealFromMime(mime)

const senderIframeAPI = IframeAPI.loadAPIForSeal(sealUrl);

// Integrator story related to verification explained here
// https://code.vereign.com/seal/building-blocks/iframe#recipient-read-and-verify-email-publish-receipt-record

await senderIframeAPI.destroy()

Concepts and relevant documentation

License

AGPLv3