Expand description
§Tauri Plugin for LicenseSeat
This plugin provides LicenseSeat software licensing integration for Tauri apps.
§Features
- License activation, validation, and deactivation
- Machine-file-first offline validation with Ed25519 + AES-256-GCM
- Automatic re-validation in the background
- Entitlement checking for feature flags
- Event emission to the frontend
§Installation
Add the plugin to your Cargo.toml:
[dependencies]
tauri-plugin-licenseseat = "0.5.3"Register the plugin in your Tauri app:
ⓘ
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_licenseseat::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}§Configuration
Use a pk_* publishable API key in Tauri applications.
Keep sk_* secret keys server-side only.
Add configuration to tauri.conf.json:
{
"plugins": {
"licenseseat": {
"apiKey": "pk_live_xxx",
"productSlug": "your-product"
}
}
}§JavaScript API
import { activate, validate, deactivate, checkEntitlement } from '@licenseseat/tauri-plugin';
// Activate a license
const license = await activate('LICENSE-KEY');
// Check entitlements
const hasPro = await checkEntitlement('pro-features');Re-exports§
pub use licenseseat;
Structs§
- Plugin
Config - Plugin configuration read from tauri.conf.json.
Enums§
- Error
- Plugin error type that serializes to JSON for the frontend.
Functions§
- init
- Initialize the LicenseSeat plugin.
Type Aliases§
- Result
- Result type for plugin operations.