Skip to content

blockpass-org/blockpass-web-widget

Repository files navigation

Blockpass Web Widget

This repository contains the Blockpass Web Widget implementation and example integrations.

Project Structure

This is a monorepo project using workspaces:

  • packages/ - Contains the core widget implementation
  • examples/ - Contains example integrations and usage demonstrations

Getting Started

Prerequisites

  • Bun v1.2.15 or later

Installation

Install dependencies for all workspaces:

bun install

Examples

React Client Site Example

Located in examples/react-csp/, this example demonstrates how to integrate the Blockpass Web Widget in a React application with Client Site.

To run the React Client Site example:

bun example:react:dev

KYCC API First Example

Located in examples/kycc-api-first/, this example demonstrates how to integrate the Blockpass Web Widget with the Blockpass KYCC API using a Next.js application.

This reference implementation covers:

  • Personal Information (name, email, date of birth)
  • Selfie Verification
  • Proof of Address (resident address, proof of address document)
  • Identity Documents (passport, national ID, driving license)
  • Crypto Addresses

Features:

  • Server-side form handling with Next.js Server Actions
  • Type-safe form data submission
  • Support for multiple document types and crypto addresses
  • Modern UI with Tailwind CSS and shadcn/ui components

To run the KYCC API First example:

bun example:kycc_api:dev

Or, run it directly from the example directory:

cd examples/kycc-api-first
bun run dev

See the example's README for environment setup and more details.

Development

Building Packages

To build sdk packages:

bun run sdk:build

Test Packages

To test sdk packages:

bun run sdk:test

Packing Packages as tgz (tarball + gzip)

To pack sdk packages:

bun run sdk:pack

# Output
packed 488B package.json
packed 26B dist/index.d.ts
packed 26B dist/index.js
packed 1.62KB dist/widget.d.ts
packed 6.79KB dist/widget.js

blockpass-web-widget-0.0.1.tgz

Total files: 5
Shasum: d1eaa64884dbfc0abb92731fd0114de22deaa7a9
Integrity: sha512-AqYCfQEu+SUFt[...]gx5/c9jiTKWVA==
Unpacked size: 8.95KB
Packed size: 2.36KB

This tarball can be used in two ways:

  1. Publishing: You can publish it to npm or any other registry using the publish command. Make sure you have the necessary registry key.
  2. Installation in Other Projects: You can install the tarball in other projects with the following command:
npm install blockpass-web-widget-0.0.1.tgz

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •