@buoy-gg/license 7.0.36 → 7.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/lib/commonjs/LicenseManager.js +2 -2
- package/lib/commonjs/accountAccess.js +1 -0
- package/lib/commonjs/api.js +1 -1
- package/lib/commonjs/config.js +2 -2
- package/lib/commonjs/device-info.js +1 -1
- package/lib/commonjs/device-info.web.js +1 -1
- package/lib/commonjs/fingerprint.js +1 -1
- package/lib/commonjs/fingerprint.web.js +1 -1
- package/lib/commonjs/foreground.js +1 -0
- package/lib/commonjs/foreground.web.js +1 -0
- package/lib/commonjs/freeToken.js +6 -0
- package/lib/commonjs/headless.js +1 -0
- package/lib/commonjs/hooks.js +2 -2
- package/lib/commonjs/index.js +2 -2
- package/lib/commonjs/index.web.js +2 -2
- package/lib/commonjs/storage.js +1 -0
- package/lib/commonjs/storage.web.js +1 -0
- package/lib/commonjs/tier.js +2 -2
- package/lib/commonjs/weekendPro.js +2 -2
- package/lib/module/LicenseManager.js +1 -1
- package/lib/module/accountAccess.js +1 -0
- package/lib/module/api.js +1 -1
- package/lib/module/config.js +1 -1
- package/lib/module/device-info.js +1 -1
- package/lib/module/device-info.web.js +1 -1
- package/lib/module/fingerprint.js +1 -1
- package/lib/module/fingerprint.web.js +1 -1
- package/lib/module/foreground.js +1 -0
- package/lib/module/foreground.web.js +1 -0
- package/lib/module/freeToken.js +6 -0
- package/lib/module/headless.js +1 -0
- package/lib/module/hooks.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/storage.js +1 -0
- package/lib/module/storage.web.js +1 -0
- package/lib/module/tier.js +1 -1
- package/lib/module/weekendPro.js +1 -1
- package/lib/typescript/commonjs/LicenseManager.d.ts +59 -4
- package/lib/typescript/commonjs/LicenseManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/accountAccess.d.ts +16 -0
- package/lib/typescript/commonjs/accountAccess.d.ts.map +1 -0
- package/lib/typescript/commonjs/api.d.ts +36 -4
- package/lib/typescript/commonjs/api.d.ts.map +1 -1
- package/lib/typescript/commonjs/config.d.ts +58 -18
- package/lib/typescript/commonjs/config.d.ts.map +1 -1
- package/lib/typescript/commonjs/device-info.d.ts +16 -0
- package/lib/typescript/commonjs/device-info.d.ts.map +1 -1
- package/lib/typescript/commonjs/device-info.web.d.ts +7 -0
- package/lib/typescript/commonjs/device-info.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/fingerprint.d.ts +1 -1
- package/lib/typescript/commonjs/fingerprint.d.ts.map +1 -1
- package/lib/typescript/commonjs/fingerprint.web.d.ts +1 -1
- package/lib/typescript/commonjs/fingerprint.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/foreground.d.ts +3 -0
- package/lib/typescript/commonjs/foreground.d.ts.map +1 -0
- package/lib/typescript/commonjs/foreground.web.d.ts +2 -0
- package/lib/typescript/commonjs/foreground.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/freeToken.d.ts +34 -0
- package/lib/typescript/commonjs/freeToken.d.ts.map +1 -0
- package/lib/typescript/commonjs/headless.d.ts +10 -0
- package/lib/typescript/commonjs/headless.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks.d.ts +7 -3
- package/lib/typescript/commonjs/hooks.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +3 -10
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage.d.ts +12 -0
- package/lib/typescript/commonjs/storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage.web.d.ts +6 -0
- package/lib/typescript/commonjs/storage.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/tier.d.ts +10 -8
- package/lib/typescript/commonjs/tier.d.ts.map +1 -1
- package/lib/typescript/commonjs/types.d.ts +18 -9
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/weekendPro.d.ts +8 -12
- package/lib/typescript/commonjs/weekendPro.d.ts.map +1 -1
- package/lib/typescript/module/LicenseManager.d.ts +59 -4
- package/lib/typescript/module/LicenseManager.d.ts.map +1 -1
- package/lib/typescript/module/accountAccess.d.ts +16 -0
- package/lib/typescript/module/accountAccess.d.ts.map +1 -0
- package/lib/typescript/module/api.d.ts +36 -4
- package/lib/typescript/module/api.d.ts.map +1 -1
- package/lib/typescript/module/config.d.ts +58 -18
- package/lib/typescript/module/config.d.ts.map +1 -1
- package/lib/typescript/module/device-info.d.ts +16 -0
- package/lib/typescript/module/device-info.d.ts.map +1 -1
- package/lib/typescript/module/device-info.web.d.ts +7 -0
- package/lib/typescript/module/device-info.web.d.ts.map +1 -1
- package/lib/typescript/module/fingerprint.d.ts +1 -1
- package/lib/typescript/module/fingerprint.d.ts.map +1 -1
- package/lib/typescript/module/fingerprint.web.d.ts +1 -1
- package/lib/typescript/module/fingerprint.web.d.ts.map +1 -1
- package/lib/typescript/module/foreground.d.ts +3 -0
- package/lib/typescript/module/foreground.d.ts.map +1 -0
- package/lib/typescript/module/foreground.web.d.ts +2 -0
- package/lib/typescript/module/foreground.web.d.ts.map +1 -0
- package/lib/typescript/module/freeToken.d.ts +34 -0
- package/lib/typescript/module/freeToken.d.ts.map +1 -0
- package/lib/typescript/module/headless.d.ts +10 -0
- package/lib/typescript/module/headless.d.ts.map +1 -0
- package/lib/typescript/module/hooks.d.ts +7 -3
- package/lib/typescript/module/hooks.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +3 -10
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/storage.d.ts +12 -0
- package/lib/typescript/module/storage.d.ts.map +1 -0
- package/lib/typescript/module/storage.web.d.ts +6 -0
- package/lib/typescript/module/storage.web.d.ts.map +1 -0
- package/lib/typescript/module/tier.d.ts +10 -8
- package/lib/typescript/module/tier.d.ts.map +1 -1
- package/lib/typescript/module/types.d.ts +18 -9
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/lib/typescript/module/weekendPro.d.ts +8 -12
- package/lib/typescript/module/weekendPro.d.ts.map +1 -1
- package/package.json +33 -9
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* The fingerprint is a generated UUID that is stored alongside the license.
|
|
5
5
|
* It's created when the user registers their device and persists with the license data.
|
|
6
6
|
*/
|
|
7
|
-
export { generateUUID, isSimulator, getDeviceMetadata, getDefaultDeviceName, } from "./device-info";
|
|
7
|
+
export { generateUUID, isDevBundle, isSimulator, getDeviceMetadata, getDefaultDeviceName, } from "./device-info";
|
|
8
8
|
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../../src/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../../src/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* The fingerprint is a generated UUID that is stored alongside the license.
|
|
5
5
|
* It's created when the user registers their device and persists with the license data.
|
|
6
6
|
*/
|
|
7
|
-
export { generateUUID, isSimulator, getDeviceMetadata, getDefaultDeviceName, } from "./device-info.web";
|
|
7
|
+
export { generateUUID, isDevBundle, isSimulator, getDeviceMetadata, getDefaultDeviceName, } from "./device-info.web";
|
|
8
8
|
//# sourceMappingURL=fingerprint.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.web.d.ts","sourceRoot":"","sources":["../../../src/fingerprint.web.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"fingerprint.web.d.ts","sourceRoot":"","sources":["../../../src/fingerprint.web.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreground.d.ts","sourceRoot":"","sources":["../../../src/foreground.ts"],"names":[],"mappings":"AACA,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foreground.web.d.ts","sourceRoot":"","sources":["../../../src/foreground.web.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAMnE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* PROPRIETARY — Buoy Pro license enforcement. NOT open source.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Buoy. All rights reserved. Licensed under the Buoy EULA
|
|
5
|
+
* (https://buoy.gg/terms), not an OSS license.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FREE_TOKEN_PREFIX = "BUOY1";
|
|
8
|
+
export interface FreeTokenClaims {
|
|
9
|
+
tier: "free";
|
|
10
|
+
/** When the token was issued, ms since epoch. */
|
|
11
|
+
issuedAt: number;
|
|
12
|
+
/** Hex of the 16-byte account hash. */
|
|
13
|
+
accountHash: string;
|
|
14
|
+
}
|
|
15
|
+
/** Whether a key is a Buoy token rather than a Keygen license key. */
|
|
16
|
+
export declare function isBuoyToken(key: string): boolean;
|
|
17
|
+
/** First 16 bytes of sha512(account id): what the token carries instead of an email. */
|
|
18
|
+
export declare function accountHashFor(accountId: string): Uint8Array;
|
|
19
|
+
/**
|
|
20
|
+
* Issue a token. Server-side only: needs the private key (the 32-byte seed,
|
|
21
|
+
* hex). Deterministic for a given (account, issuedAt), so an account always
|
|
22
|
+
* sees the same token.
|
|
23
|
+
*/
|
|
24
|
+
export declare function mintFreeToken(accountId: string, issuedAtMs: number, privateKeyHex: string): string;
|
|
25
|
+
/** The public key for a private seed, hex. Used by tests and the keypair script. */
|
|
26
|
+
export declare function publicKeyFor(privateKeyHex: string): string;
|
|
27
|
+
/** @internal test seam — only free-tier claims ride on this key. */
|
|
28
|
+
export declare function __setFreeTokenPublicKeyForTests(hex: string | null): void;
|
|
29
|
+
/**
|
|
30
|
+
* Verify a token offline. Null for anything that is not a token this public
|
|
31
|
+
* key signed: wrong format, wrong version, wrong tier code, bad signature.
|
|
32
|
+
*/
|
|
33
|
+
export declare function verifyFreeToken(key: string, publicKeyHex?: string): FreeTokenClaims | null;
|
|
34
|
+
//# sourceMappingURL=freeToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeToken.d.ts","sourceRoot":"","sources":["../../../src/freeToken.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmCH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AASzC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEhD;AAqED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAE5D;AAeD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,MAAM,CAKR;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE1D;AAKD,oEAAoE;AACpE,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAExE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,MAAwB,GAAG,eAAe,GAAG,IAAI,CAe3G"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Platform-neutral licensing policy. Safe to import from plain Node. */
|
|
2
|
+
export { validateLicense, isAcceptedValidation, isTransientLicenseError, LicenseTransportError } from "./api";
|
|
3
|
+
export { resolveTier, isRecognizedAccount } from "./tier";
|
|
4
|
+
export { isBuoyToken, verifyFreeToken, mintFreeToken, accountHashFor, publicKeyFor, __setFreeTokenPublicKeyForTests } from "./freeToken";
|
|
5
|
+
export type { FreeTokenClaims } from "./freeToken";
|
|
6
|
+
export { resolveAccountAccess } from "./accountAccess";
|
|
7
|
+
export { signCache, verifyCacheSignature } from "./cacheSignature";
|
|
8
|
+
export { LICENSE_CACHE_DURATION, LICENSE_REVALIDATION_INTERVAL, LICENSE_LAUNCH_VALIDATION_TTL, LICENSE_TRANSIENT_RETRY_DELAYS, KEYGEN_CONFIG } from "./config";
|
|
9
|
+
export type { CachedLicense, BuoyTier, KeygenValidationResponse } from "./types";
|
|
10
|
+
//# sourceMappingURL=headless.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../../../src/headless.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC9G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AACzI,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC/J,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* including a free one (`npx buoy login`). Buy a key at
|
|
16
16
|
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
17
17
|
*/
|
|
18
|
+
import { LicenseManager } from "./LicenseManager";
|
|
18
19
|
import type { BuoyTier, LicenseState } from "./types";
|
|
19
20
|
/**
|
|
20
21
|
* Why the user currently has Pro access:
|
|
@@ -38,21 +39,24 @@ export type ProAccessReason = "licensed" | "weekend" | null;
|
|
|
38
39
|
* ```
|
|
39
40
|
*/
|
|
40
41
|
export declare function useLicense(): LicenseState & {
|
|
42
|
+
access: ReturnType<typeof LicenseManager.getAccountAccess>;
|
|
41
43
|
/** Validate and set a license key */
|
|
42
44
|
setLicenseKey: (key: string) => Promise<boolean>;
|
|
43
45
|
/** Clear the current license */
|
|
44
46
|
clearLicense: () => Promise<void>;
|
|
45
47
|
};
|
|
48
|
+
export declare function useAccountAccess(): import("./accountAccess").AccountAccess;
|
|
46
49
|
/**
|
|
47
|
-
* The current
|
|
50
|
+
* The current tier: "free" | "pro".
|
|
48
51
|
*
|
|
49
52
|
* This is the value tier-aware limits should read. It reports the tier the
|
|
50
53
|
* user's *credential* grants and deliberately ignores the Weekend Pass — a
|
|
51
54
|
* weekend unlock is temporary Pro *access*, not a change of tier, and callers
|
|
52
55
|
* that care about access should compose this with `useIsPro()`.
|
|
53
56
|
*
|
|
54
|
-
* Returns "
|
|
55
|
-
*
|
|
57
|
+
* Returns "free" until the manager has finished initializing, which matches
|
|
58
|
+
* how `useIsPro()` reports false over the same window. Whether the tools are
|
|
59
|
+
* usable at all is `useAccountAccess()`, not this.
|
|
56
60
|
*/
|
|
57
61
|
export declare function useTier(): BuoyTier;
|
|
58
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,IAAI,YAAY,GAAG;IAC3C,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC3D,qCAAqC;IACrC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,gCAAgC;IAChC,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACnC,CAmCA;AAED,wBAAgB,gBAAgB,4CAAkC;AAElE;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,IAAI,QAAQ,CAGlC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG;IACtD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;CACpB,CAWA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAQlC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI;IAC9B,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,+CAA+C;IAC/C,UAAU,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;CACzB,CAcA"}
|
|
@@ -30,8 +30,10 @@ export type { DeviceRegistrationInfo, DeviceRegistrationCallback, } from "./Lice
|
|
|
30
30
|
export { DeviceRegistrationModal } from "./DeviceRegistrationModal";
|
|
31
31
|
export { useLicense, useFeatureAccess, useIsPro, useProAccess, useTier } from "./hooks";
|
|
32
32
|
export type { ProAccessReason } from "./hooks";
|
|
33
|
-
export {
|
|
33
|
+
export { useAccountAccess } from "./hooks";
|
|
34
|
+
export { resolveAccountAccess, type AccountAccess } from "./accountAccess";
|
|
34
35
|
export { LicenseTransportError, isTransientLicenseError } from "./api";
|
|
36
|
+
export { isBuoyToken } from "./freeToken";
|
|
35
37
|
export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro";
|
|
36
38
|
export type { BuoyTier, TierSource, LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
|
|
37
39
|
export declare function setLicenseKey(key: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,sBAAsB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AAO,CAI/B;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpD"}
|
|
@@ -16,20 +16,13 @@
|
|
|
16
16
|
* including a free one (`npx buoy login`). Buy a key at
|
|
17
17
|
* https://buoy.gg or use it free on Saturday and Sunday.
|
|
18
18
|
*/
|
|
19
|
-
/**
|
|
20
|
-
* @buoy-gg/license (Web/Electron)
|
|
21
|
-
*
|
|
22
|
-
* License validation for React Buoy Pro features
|
|
23
|
-
*
|
|
24
|
-
* Simplified model: Validate license key, cache locally.
|
|
25
|
-
* No device registration or limits - we trust our customers.
|
|
26
|
-
* Keygen tracks validation calls for usage analytics.
|
|
27
|
-
*/
|
|
28
19
|
export { LicenseManager } from "./LicenseManager";
|
|
29
20
|
export { useLicense, useFeatureAccess, useIsPro, useProAccess, useTier } from "./hooks";
|
|
30
21
|
export type { ProAccessReason } from "./hooks";
|
|
31
|
-
export {
|
|
22
|
+
export { useAccountAccess } from "./hooks";
|
|
23
|
+
export { resolveAccountAccess, type AccountAccess } from "./accountAccess";
|
|
32
24
|
export { LicenseTransportError, isTransientLicenseError } from "./api";
|
|
25
|
+
export { isBuoyToken } from "./freeToken";
|
|
33
26
|
export { isWeekendFreePro, useWeekendFreePro } from "./weekendPro";
|
|
34
27
|
export type { BuoyTier, TierSource, LicenseState, LicenseEvent, LicenseListener, LicenseValidationResult, CachedLicense, } from "./types";
|
|
35
28
|
export declare function setLicenseKey(key: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAgBH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACxF,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAI3E,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGnE,YAAY,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjE;AAWD,wBAAgB,KAAK,IAAI,OAAO,CAG/B;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface LicenseStorage {
|
|
2
|
+
getItem(key: string): Promise<string | null>;
|
|
3
|
+
setItem(key: string, value: string): Promise<void>;
|
|
4
|
+
removeItem(key: string): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Get protected license storage (file system based, separate from devtools)
|
|
8
|
+
* This storage survives app cache clears AND devtools "Clear Settings"
|
|
9
|
+
*/
|
|
10
|
+
export declare function getLicenseStorage(): Promise<LicenseStorage>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/storage.ts"],"names":[],"mappings":"AAUA,UAAU,cAAc;IACtB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAgGD;;;GAGG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC,CAwHjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.web.d.ts","sourceRoot":"","sources":["../../../src/storage.web.ts"],"names":[],"mappings":"AAgBA,wBAAsB,iBAAiB;iBAblB,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;iBAI/B,MAAM,SAAS,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;oBAIlC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;GAKe"}
|
|
@@ -20,7 +20,7 @@ import type { BuoyTier, KeygenLicense } from "./types";
|
|
|
20
20
|
* Which tier a *validated* license grants.
|
|
21
21
|
*
|
|
22
22
|
* Only ever called with a license the server already accepted — an invalid or
|
|
23
|
-
* absent key never reaches here
|
|
23
|
+
* absent key never reaches here; upstream it leaves the account locked.
|
|
24
24
|
*
|
|
25
25
|
* The policy is the primary signal because Keygen sets it on every
|
|
26
26
|
* create/upgrade/downgrade, and free↔paid is implemented as a policy swap that
|
|
@@ -37,20 +37,22 @@ import type { BuoyTier, KeygenLicense } from "./types";
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function resolveTier(license: KeygenLicense): BuoyTier;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Whether a FATAL validation error still leaves the account admitted.
|
|
41
41
|
*
|
|
42
|
-
* `EXPIRED`
|
|
43
|
-
*
|
|
42
|
+
* `EXPIRED` keeps the account on **free**. An expired key still proves an
|
|
43
|
+
* account exists, and it is not even a stable state: the website's
|
|
44
44
|
* `subscription_expired` webhook calls `downgradeLicenseToFree()`, which swaps
|
|
45
45
|
* that very key onto the Free policy with a null expiry. So free is the steady
|
|
46
|
-
* state, and
|
|
47
|
-
* `/api/licenses` self-heal runs).
|
|
46
|
+
* state, and the lock would only cover the gap before the webhook lands (or
|
|
47
|
+
* before the `/api/licenses` self-heal runs). Locking someone out in that
|
|
48
48
|
* window would hit them at the exact moment they are deciding whether to
|
|
49
49
|
* re-subscribe.
|
|
50
50
|
*
|
|
51
51
|
* Every other fatal code means either "not our key" (`NOT_FOUND`,
|
|
52
52
|
* `PRODUCT_SCOPE_MISMATCH`) or a deliberate revocation (`SUSPENDED`, `BANNED`).
|
|
53
|
-
* Nothing about those proves an account, so they
|
|
53
|
+
* Nothing about those proves an account, so they lock (`null`).
|
|
54
54
|
*/
|
|
55
|
-
export declare function tierAfterFatalError(code: string): BuoyTier;
|
|
55
|
+
export declare function tierAfterFatalError(code: string): BuoyTier | null;
|
|
56
|
+
/** Product/policy identity is required before an expired key can prove an account. */
|
|
57
|
+
export declare function isRecognizedAccount(license: KeygenLicense | null | undefined): boolean;
|
|
56
58
|
//# sourceMappingURL=tier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../../src/tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAgB5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"tier.d.ts","sourceRoot":"","sources":["../../../src/tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAgB5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAEjE;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAMtF"}
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
* Simplified: No device/machine management - we trust our customers.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The two tiers.
|
|
8
8
|
*
|
|
9
|
-
* - "
|
|
10
|
-
*
|
|
11
|
-
* - "free" — a validated key on the Free policy. Today's free tier.
|
|
12
|
-
* - "pro" — a validated key on the Solo or Business policy.
|
|
9
|
+
* - "free" — a validated key on the Free policy.
|
|
10
|
+
* - "pro" — a validated key on the Solo or Business policy.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* There is no tier for "no credential". Whether the tools are usable at all is
|
|
13
|
+
* account admission (see `accountAccess.ts`), which is a separate question from
|
|
14
|
+
* which tier an admitted account is on. A manager with nothing validated
|
|
15
|
+
* reports "free" with `tierSource: "none"` and a locked `access`.
|
|
16
16
|
*/
|
|
17
|
-
export type BuoyTier = "
|
|
17
|
+
export type BuoyTier = "free" | "pro";
|
|
18
18
|
/**
|
|
19
19
|
* What granted the current tier.
|
|
20
20
|
*
|
|
@@ -23,7 +23,7 @@ export type BuoyTier = "anonymous" | "free" | "pro";
|
|
|
23
23
|
* NOT IMPLEMENTED YET; the type exists so every downstream layer
|
|
24
24
|
* reads `tier` instead of "does a key exist", which is what makes
|
|
25
25
|
* adding on-device login additive rather than a rewrite.
|
|
26
|
-
* - "none" —
|
|
26
|
+
* - "none" — nothing validated yet, or the last credential was rejected.
|
|
27
27
|
*/
|
|
28
28
|
export type TierSource = "key" | "session" | "none";
|
|
29
29
|
export interface LicenseValidationResult {
|
|
@@ -171,6 +171,15 @@ export interface CachedLicense {
|
|
|
171
171
|
fingerprint?: string;
|
|
172
172
|
/** Device name */
|
|
173
173
|
deviceName?: string;
|
|
174
|
+
/**
|
|
175
|
+
* This cache has nothing to learn from the server until it expires: a free
|
|
176
|
+
* key outside a development bundle, or a free key that is already on a
|
|
177
|
+
* fleet (see LICENSE_FLEET_MACHINE_THRESHOLD). Launch-time and daily
|
|
178
|
+
* revalidation both stand down; the 30-day expiry is the only clock. Never
|
|
179
|
+
* set for a paid key, whose expiry can move. Not covered by the checksum —
|
|
180
|
+
* it can only ever make the SDK ask LESS.
|
|
181
|
+
*/
|
|
182
|
+
quiet?: boolean;
|
|
174
183
|
/**
|
|
175
184
|
* Tamper-evident checksum over the licensing fields (see cacheSignature.ts).
|
|
176
185
|
* A blob whose checksum is missing or doesn't match is not trusted for Pro.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EACA,OAAO,GACP,WAAW,GACX,WAAW,GACX,SAAS,GACT,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;OAOG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,KAAK,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,IAAI,EAAE,QAAQ,CAAC;IACf,2BAA2B;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,SAAS,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,WAAW,GACX,OAAO,GACP,aAAa,CAAC;AAElB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC"}
|
|
@@ -25,19 +25,15 @@ export declare function isWeekendFreePro(now?: Date): boolean;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function useWeekendFreePro(): boolean;
|
|
27
27
|
/**
|
|
28
|
-
* Whether the Weekend Pass applies
|
|
28
|
+
* Whether the Weekend Pass applies right now.
|
|
29
29
|
*
|
|
30
|
-
* The pass is free Pro every Saturday and Sunday
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* The pass is free Pro every Saturday and Sunday for an admitted account, free
|
|
31
|
+
* or paid. It never applies to a locked manager: with nothing validated there
|
|
32
|
+
* is no account to give the weekend to, and Pro access on a locked manager
|
|
33
|
+
* would be the one thing that could turn a missing key into a working tool.
|
|
33
34
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* withdraws it from anonymous, which makes claiming a key worth something and
|
|
37
|
-
* leaves every paying customer exactly where they were.
|
|
38
|
-
*
|
|
39
|
-
* Takes the tier as an argument rather than reading it, so this module stays a
|
|
40
|
-
* pure calendar utility and `hooks.ts` can keep importing it without a cycle.
|
|
35
|
+
* Takes admission as an argument rather than reading it, so this module stays
|
|
36
|
+
* a pure calendar utility and `hooks.ts` can keep importing it without a cycle.
|
|
41
37
|
*/
|
|
42
|
-
export declare function weekendPassAppliesTo(
|
|
38
|
+
export declare function weekendPassAppliesTo(admitted: boolean, weekend: boolean): boolean;
|
|
43
39
|
//# sourceMappingURL=weekendPro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weekendPro.d.ts","sourceRoot":"","sources":["../../../src/weekendPro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"weekendPro.d.ts","sourceRoot":"","sources":["../../../src/weekendPro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAeH,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,IAAiB,GAAG,OAAO,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAY3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,GACf,OAAO,CAET"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/license",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.39",
|
|
4
4
|
"description": "License validation for React Buoy Pro features",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -11,23 +11,36 @@
|
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"react-native": "./lib/module/index.js",
|
|
14
|
+
"browser": {
|
|
15
|
+
"types": "./lib/typescript/module/index.web.d.ts",
|
|
16
|
+
"default": "./lib/module/index.web.js"
|
|
17
|
+
},
|
|
14
18
|
"import": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
19
|
+
"types": "./lib/typescript/module/index.d.ts",
|
|
20
|
+
"default": "./lib/module/index.js"
|
|
17
21
|
},
|
|
18
22
|
"require": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
23
|
+
"types": "./lib/typescript/commonjs/index.d.ts",
|
|
24
|
+
"default": "./lib/commonjs/index.js"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
|
-
"./package.json": "./package.json"
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
"./headless": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./lib/typescript/module/headless.d.ts",
|
|
31
|
+
"default": "./lib/module/headless.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./lib/typescript/commonjs/headless.d.ts",
|
|
35
|
+
"default": "./lib/commonjs/headless.js"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
24
38
|
},
|
|
25
39
|
"files": [
|
|
26
40
|
"lib",
|
|
27
41
|
"LICENSE"
|
|
28
42
|
],
|
|
29
43
|
"sideEffects": false,
|
|
30
|
-
"dependencies": {},
|
|
31
44
|
"peerDependencies": {
|
|
32
45
|
"react": "*",
|
|
33
46
|
"react-native": "*"
|
|
@@ -61,8 +74,8 @@
|
|
|
61
74
|
"devDependencies": {
|
|
62
75
|
"@types/react": "^19.1.0",
|
|
63
76
|
"@types/react-native": "^0.73.0",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
77
|
+
"esbuild": "^0.25.0",
|
|
78
|
+
"typescript": "~5.8.3"
|
|
66
79
|
},
|
|
67
80
|
"repository": {
|
|
68
81
|
"type": "git",
|
|
@@ -76,6 +89,17 @@
|
|
|
76
89
|
"access": "public",
|
|
77
90
|
"tag": "latest"
|
|
78
91
|
},
|
|
92
|
+
"browser": {
|
|
93
|
+
"./lib/module/fingerprint.js": "./lib/module/fingerprint.web.js",
|
|
94
|
+
"./lib/module/foreground.js": "./lib/module/foreground.web.js",
|
|
95
|
+
"./lib/commonjs/fingerprint.js": "./lib/commonjs/fingerprint.web.js",
|
|
96
|
+
"./lib/commonjs/foreground.js": "./lib/commonjs/foreground.web.js",
|
|
97
|
+
"./lib/module/storage.js": "./lib/module/storage.web.js",
|
|
98
|
+
"./lib/commonjs/storage.js": "./lib/commonjs/storage.web.js"
|
|
99
|
+
},
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"tweetnacl": "^1.0.3"
|
|
102
|
+
},
|
|
79
103
|
"scripts": {
|
|
80
104
|
"build": "bob build && node ./scripts/minify-lib.mjs",
|
|
81
105
|
"typecheck": "tsc --noEmit",
|