@departurelabs/notific-integrate
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@departurelabs/notific-integrate

This package contains the Notific Integrate script. This script is used to create a URL to link your users to Notific. It takes a config and creates a URL which will be parsed by Notific once the user is authenticated

Installation

npm i -S @departurelabs/notific-integrate

Usage

Example integration:

<script>
import { createUrl } from "@departurelabs/notific-integrate"

const notificUrl = createUrl({
  name: "Deeplink Integrator",
  canister_id: "rrkah-fqaaa-aaaaa-aaaaq-cai",
  allowed_callbacks: [],
  notify_callback: {
    principal: "rrkah-fqaaa-aaaaa-aaaaq-cai",
    method: "notify",
  },
  secret: "secret",
})
<script>

<template>

  <a href={notificUrl}>Link account with Notific</a>

</template>

Configuration properties

  • name: The name of the integrator application
  • canister_id: The canister id of the integrator application
  • allowed_callbacks: The Principals that are allowed to be called from within Notific
  • notify_callback:
    • principal: The principal that will be called when the user performs a callback action from Notific
    • method: The method that will be called when the user performs a callback action from Notific
  • secret: A secret that can be used to link the user to the integrator application

Websites

Package Sidebar

Install

npm i @departurelabs/notific-integrate

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

6.37 kB

Total Files

7

Last publish

Collaborators

  • departuredani
  • departure_labs