Options
All
  • Public
  • Public/Protected
  • All
Menu

@octosign/client

@octosign/client

Web/Node.js client library for Octosign White Label.

Getting Started

To get started, install @octosign/client:

npm install @octosign/client
# OR
yarn add @octosign/client

Then you can use the client:

import { apiClient } from '@octosign/client';
const client = apiClient();

// Launch URL that should be used by user to launch the signer application
console.log(client.getLaunchURL());

await client.waitForStatus('READY');

const content =
    '<?xml version="1.0"?><Document><Title>Lorem Ipsum</Title></Document>';
console.log(await client.sign({ content }));
// => { content: '<?xml version="1.0"?><Document><Title>Lorem Ipsum</Title>...</Document>' }

See Full API Reference.

More Info

For more information on this client library, see the Full API Reference.

For more information on the HTTP API this client is wrapping, see HTTP Server API Documentation.

For more information about Octosign White Label in general, check whitelabel.octosign.com.

Development

To start working, run npm run watch:build in one terminal and npm run watch:test in other so that any changes you make are instantly rebuilt and retested.

All commonly used scripts:

  • npm run build - Build the package for publishing.
  • npm run fix - Fix all linting/formatting issues.
  • npm test - Run all automated tests.
  • npm run watch:build - Watch for changed and run build automatically.
  • npm run watch:test - Watch for changed and run test automatically.
  • npm run cov - Generate and open coverage report.
  • npm run doc - Generate and open docs.
  • npm run version - Bump version, update CHANGELOG, commit&tag. Mostly just for me.
  • npm run prepare-release - Clean up, run all checks, run version. Mostly just for me.

Credits

Created and configured using Typescript Starter by Jason Dreyzehner (bitjson) and Contributors.

Uses cross-fetch by Leonardo Quixada (lquixada) and Contributors.

Generated using TypeDoc