@crpt/cades-pluginer
v0.0.1
Published
Cades plugin helper
Downloads
8
Keywords
Readme
cades-pluginer
CADES Pluginer already contains cadesplugin_api.js in own bundle.
Usage
import { CadesPluginer as anyName } from "@crpt/cades-pluginer";
//or
import CadesPluginer from "@crpt/cades-pluginer";
//usually you will need 2 methods
CadesPluginer.getFinalCertsArray().then(certs => {
console.log("certs", certs);
CadesPluginer.signMessage("lalala", certs[0].certificate).then(signed =>
console.log("signed", signed);
);
});
| method | description | |---|---| | getFinalCertsArray(): Promise<Cert[]> | Init plugin, create store, . Cert: {certificate: {}, info: [] }, certificate is an original cadesplugin Certificate object, info is an array [name, date_from, date_to, serial_number]. | | signMessage(message, cert, detached): Promise| Sign message with selected certificate. |