# BSL Package Licensing Guide for MetaMUI-PQC

**Date:** 2025-07-06  
**Author:** Phantom (phantom@metamui.id)

## Overview

All MetaMUI cryptographic packages are licensed under the Business Source License 1.1 (BSL-1.1) with a dual-licensing model. This document explains the licensing structure and requirements for package publication.

## License Structure

### 1. Business Source License 1.1 (BSL-1.1)
- **Non-production use**: Free for research, education, personal projects
- **Production use**: Requires commercial license
- **Change date**: 4 years from release (converts to MIT)
- **Additional use grant**: Non-commercial use permitted

### 2. Commercial License
- Required for production/commercial use
- Contact: licensing@metamui.id
- Includes support and warranty options
- Revenue sharing for specific use cases

## Package.json License Configuration

Each package must include:

```json
{
  "license": "BSL-1.1",
  "licenses": [
    {
      "type": "BSL-1.1",
      "url": "https://github.com/SovereignWallet-Network/[package-name]/blob/main/LICENSE-BSL"
    },
    {
      "type": "Commercial",
      "url": "https://pqc.metamui.id/licensing"
    }
  ]
}
```

## Required License Files

Each package repository must contain:

### 1. LICENSE-BSL
```
Business Source License 1.1

License text of the Business Source License 1.1

Parameters:
- Licensor: Sovereign Wallet Co., Ltd.
- Licensed Work: [Package Name] version [X.Y.Z]
- Change Date: [4 years from release date]
- Change License: MIT License

Additional Use Grant: You may use the Licensed Work for non-commercial 
purposes including research, education, and personal projects without 
requiring a commercial license.
```

### 2. LICENSE-COMMERCIAL
```
Commercial License Agreement

For commercial licensing inquiries, please contact:
- Email: licensing@metamui.id
- Web: https://pqc.metamui.id/licensing

Commercial licenses include:
- Production use rights
- Priority support
- Warranty and indemnification
- Custom terms available
```

### 3. LICENSE-FAQ.md
```markdown
# Licensing FAQ

## Can I use this in my personal project?
Yes, personal and non-commercial use is free under BSL-1.1.

## Can I use this in my company's production system?
Production use requires a commercial license. Contact licensing@metamui.id.

## What happens after 4 years?
The code automatically converts to MIT license, becoming fully open source.

## Can I contribute to the project?
Yes! We welcome contributions under our CLA.
```

## README License Section

Each package README must include:

```markdown
## License

This package is dual-licensed:

- **Business Source License 1.1** - Free for non-production use
- **Commercial License** - Required for production use

The BSL license converts to MIT after 4 years from each release.

### Quick License Guide

| Use Case | License Required | Cost |
|----------|-----------------|------|
| Personal projects | BSL-1.1 | Free |
| Research/Education | BSL-1.1 | Free |
| Open source projects | BSL-1.1 | Free |
| Commercial production | Commercial | Contact us |
| SaaS/Cloud services | Commercial | Contact us |

For commercial licensing: licensing@metamui.id
```

## NPM Package Metadata

### Package Keywords
Include license-related keywords:
```json
"keywords": [
  "bsl-license",
  "dual-license",
  "phantom-yun",
  "sovereign-wallet",
  // ... algorithm-specific keywords
]
```

### Package Classifiers
```json
"classifiers": [
  "License :: Other/Proprietary License",
  "License :: Free for non-commercial use"
]
```

## Attribution Requirements

All packages must maintain attribution to:
- **Author**: Phantom Seokgu Yun (@phantomcoco)
- **Organization**: Sovereign Wallet Co., Ltd.
- **Copyright**: Copyright (c) 2025 Sovereign Wallet Co., Ltd.

## Source Code Headers

All source files must include:
```typescript
/**
 * @packageName
 * Copyright (c) 2025 Sovereign Wallet Co., Ltd. All Rights Reserved.
 * 
 * Licensed under the Business Source License 1.1 (the "License");
 * you may not use this file except in compliance with the License.
 * 
 * Author: Phantom Seokgu Yun (@phantomcoco) <phantom@metamui.id>
 * Organization: Sovereign Wallet Co., Ltd.
 */
```

## Publishing Checklist

Before publishing each package:

- [ ] LICENSE-BSL file present with correct parameters
- [ ] LICENSE-COMMERCIAL file present
- [ ] LICENSE-FAQ.md file present
- [ ] Package.json has correct license fields
- [ ] README includes license section
- [ ] All source files have license headers
- [ ] Copyright notices are correct
- [ ] Attribution to Phantom Yun maintained

## Compliance Monitoring

1. **License Scanning**: Automated tools check license compliance
2. **Usage Tracking**: Anonymous telemetry for license enforcement
3. **Audit Trail**: Maintain records of commercial licenses issued
4. **Version Control**: Track license changes with each release

## Future Considerations

1. **MIT Conversion**: Prepare for automatic conversion after 4 years
2. **License Updates**: Process for updating license terms
3. **Contributor License Agreement**: CLA for external contributions
4. **Patent Grants**: Consider explicit patent licensing

## Contact

For licensing questions:
- **Email**: licensing@metamui.id
- **Technical**: phantom@metamui.id
- **Legal**: legal@metamui.id
- **Website**: https://pqc.metamui.id/licensing