This repository contains the Blockpass Web Widget implementation and example integrations.
This is a monorepo project using workspaces:
packages/- Contains the core widget implementationexamples/- Contains example integrations and usage demonstrations
- Bun v1.2.15 or later
Install dependencies for all workspaces:
bun installLocated 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:devLocated 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:devOr, run it directly from the example directory:
cd examples/kycc-api-first
bun run devSee the example's README for environment setup and more details.
To build sdk packages:
bun run sdk:buildTo test sdk packages:
bun run sdk:testTo 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.36KBThis tarball can be used in two ways:
- Publishing: You can publish it to npm or any other registry using the publish command. Make sure you have the necessary registry key.
- 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