@criipto/signatures
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

@criipto/signatures

A Node.js SDK for Criipto Signatures

Sign PAdeS-LTA documents using MitID, BankID or any other eID supported by Criipto.

Examples

Getting started

Requirements

This library supports Node 16 and later.

Installation

The SDK is available on NPM:

npm install --save @criipto/signatures
yarn add @criipto/signatures

Configure the SDK

import CriiptoSignatures from '@criipto/signatures';
const client = new CriiptoSignatures("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}");

Basic example

import CriiptoSignatures from '@criipto/signatures';
const client = new CriiptoSignatures("{YOUR_CRIIPTO_CLIENT_ID}", "{YOUR_CRIIPTO_CLIENT_SECRET}");

// Create signature order
const signatureOrder = await client.createSignatureOrder({
  title: "Node.js sample",
  documents: [
    {
      pdf: {
        title: "Node.js Sample",
        blob: pdf // Buffer
        storageMode: 'Temporary'
      }
    }
  ]
});

// Add signatory to signature order
const signatory = await client.addSignatory(signatureOrder.id);
console.log(signatory.href);

const closed = await client.closeSignatureOrder(signatureOrder.id);

Package Sidebar

Install

npm i @criipto/signatures

Weekly Downloads

319

Version

1.5.0

License

MIT

Unpacked Size

128 kB

Total Files

9

Last publish

Collaborators

  • sgryt
  • mickhansen