@buoy-gg/license 7.0.38 → 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/lib/commonjs/api.js +1 -1
- package/lib/commonjs/config.js +1 -1
- package/lib/module/api.js +1 -1
- package/lib/module/config.js +1 -1
- package/lib/typescript/commonjs/api.d.ts +4 -1
- package/lib/typescript/commonjs/api.d.ts.map +1 -1
- package/lib/typescript/commonjs/config.d.ts +12 -5
- package/lib/typescript/commonjs/config.d.ts.map +1 -1
- package/lib/typescript/module/api.d.ts +4 -1
- package/lib/typescript/module/api.d.ts.map +1 -1
- package/lib/typescript/module/config.d.ts +12 -5
- package/lib/typescript/module/config.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/commonjs/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.LicenseTransportError=void 0;exports.activateMachine=activateMachine;exports.backoffAfter=backoffAfter;exports.isAcceptedValidation=isAcceptedValidation;exports.isFatalLicenseError=isFatalLicenseError;exports.isRateLimited=isRateLimited;exports.isTransientLicenseError=isTransientLicenseError;exports.machineCount=machineCount;exports.parseValidationResult=parseValidationResult;exports.validateLicense=validateLicense;var _config=require("./config.js");const{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.LicenseTransportError=void 0;exports.activateMachine=activateMachine;exports.backoffAfter=backoffAfter;exports.isAcceptedValidation=isAcceptedValidation;exports.isFatalLicenseError=isFatalLicenseError;exports.isRateLimited=isRateLimited;exports.isTransientLicenseError=isTransientLicenseError;exports.machineCount=machineCount;exports.parseValidationResult=parseValidationResult;exports.validateLicense=validateLicense;var _config=require("./config.js");const{apiUrl}=_config.KEYGEN_CONFIG;class LicenseTransportError extends Error{isTransient=true;constructor(e,n,i=null){super(e);this.name="LicenseTransportError";this.status=n;this.retryAfterMs=i}}exports.LicenseTransportError=LicenseTransportError;function isRateLimited(t){const e=t?.status;return e===429||e===402}function backoffAfter(t,e,n){if(t.status===402)return e;return t.retryAfterMs??n}function readRetryAfter(t){const e=r=>{try{return t.headers?.get?.(r)??null}catch{return null}};const n=e("Retry-After");if(n){const r=Number(n);if(Number.isFinite(r)&&r>=0)return r*1e3;const a=Date.parse(n);if(Number.isFinite(a))return Math.max(0,a-Date.now())}const i=Number(e("X-RateLimit-Reset"));if(Number.isFinite(i)&&i>0)return Math.max(0,i*1e3-Date.now());return null}function isTransientLicenseError(t){if(t instanceof LicenseTransportError)return true;if(t instanceof TypeError)return true;return typeof t==="object"&&t!==null&&t.isTransient===true}async function describeFailure(t){try{const e=await t.json();return e.errors?.[0]?.detail||`HTTP ${t.status}`}catch{return`HTTP ${t.status}`}}function getBaseHeaders(){return{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"}}async function requestValidation(t,e){const n=`${apiUrl}/validate`;const i={meta:{key:t}};let r;try{r=await fetch(n,{signal:e,method:"POST",headers:getBaseHeaders(),body:JSON.stringify(i)})}catch(a){throw new LicenseTransportError(a instanceof Error?a.message:"Network request failed",null)}if(!r.ok){throw new LicenseTransportError(await describeFailure(r),r.status,r.status===429?readRetryAfter(r):null)}try{const a=await r.json();if(!a||typeof a!=="object"||typeof a.meta?.valid!=="boolean"||typeof a.meta?.code!=="string"||!a.meta.code)throw new Error("Missing license verdict");return a}catch{throw new LicenseTransportError("License server returned an unreadable response",r.status)}}async function validateLicense(t){const e=typeof AbortController==="function"?new AbortController:null;let n;try{return await Promise.race([requestValidation(t,e?.signal),new Promise((i,r)=>{n=setTimeout(()=>{r(new LicenseTransportError("License verification timed out. Please retry.",null));e?.abort()},15e3)})])}finally{if(n)clearTimeout(n)}}function isAcceptedValidation(t){if(!t.data)return false;const e=t.data.relationships?.product?.data?.id;if(e&&e!==_config.KEYGEN_CONFIG.productId)return false;if(t.meta.valid&&t.meta.code==="VALID")return true;return["OVERDUE","NO_MACHINE","NO_MACHINES","TOO_MANY_MACHINES","TOO_MANY_CORES","TOO_MANY_PROCESSES","FINGERPRINT_SCOPE_MISMATCH","HEARTBEAT_NOT_STARTED","HEARTBEAT_DEAD"].includes(t.meta.code)}function machineCount(t){const e=t.data?.relationships?.machines?.meta?.count;return typeof e==="number"&&Number.isFinite(e)?e:0}async function activateMachine(t,e,n,i,r){const a=`${apiUrl}/machines`;const s=await fetch(a,{method:"POST",headers:getBaseHeaders(),body:JSON.stringify({licenseId:t,licenseKey:e,fingerprint:n,name:i,metadata:r||{}})});if(!s.ok){const o=await s.json();const c=o.errors?.[0]?.code;if(c==="FINGERPRINT_TAKEN"){throw new Error("FINGERPRINT_TAKEN")}if(c==="MACHINE_LIMIT_EXCEEDED"){throw new Error("MACHINE_LIMIT_EXCEEDED")}const u=o.errors?.[0]?.detail||`HTTP ${s.status}`;throw new Error(u)}return s.json()}function parseValidationResult(t){const{meta:e,data:n}=t;return{valid:e.valid,code:e.code,detail:e.detail,metadata:n?.attributes?.metadata}}function isFatalLicenseError(t){return["NOT_FOUND","SUSPENDED","EXPIRED","BANNED","PRODUCT_SCOPE_MISMATCH"].includes(t)}
|
package/lib/commonjs/config.js
CHANGED
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* Pro is $9/mo, and is free every weekend for anyone holding a key —
|
|
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
|
-
*/const KEYGEN_CONFIG=exports.KEYGEN_CONFIG={accountId:"b0eba0e8-e904-4906-b644-38f9aab57bed",productId:"bf67cb43-eeef-40ca-b308-e6e1b22c0eaa",
|
|
17
|
+
*/const KEYGEN_CONFIG=exports.KEYGEN_CONFIG={accountId:"b0eba0e8-e904-4906-b644-38f9aab57bed",productId:"bf67cb43-eeef-40ca-b308-e6e1b22c0eaa",apiUrl:"https://buoy.gg/api/license"};const FREE_TOKEN_PUBLIC_KEY=exports.FREE_TOKEN_PUBLIC_KEY="3b546fc717a62683f3236c70167899a271bee3ffc04df6ec1eea60a394a2f1e9";const KEYGEN_POLICIES=exports.KEYGEN_POLICIES={free:"394e3351-1249-4f73-807a-703408604c0e",solo:"fa5d3c8f-5379-40f1-b63e-ab8a974b2f28",business:"690c2212-8e54-426f-b4b4-002ee1c0ae2b"};const LICENSE_CACHE_DURATION=exports.LICENSE_CACHE_DURATION=30*24*60*60*1e3;const LICENSE_REVALIDATION_INTERVAL=exports.LICENSE_REVALIDATION_INTERVAL=24*60*60*1e3;const LICENSE_STORAGE_KEY=exports.LICENSE_STORAGE_KEY="buoy-gg-license";const DEVICE_FINGERPRINT_STORAGE_KEY=exports.DEVICE_FINGERPRINT_STORAGE_KEY="buoy-gg-device-fingerprint";const LICENSE_LAUNCH_VALIDATION_TTL=exports.LICENSE_LAUNCH_VALIDATION_TTL=60*60*1e3;const LICENSE_TRANSIENT_RETRY_DELAYS=exports.LICENSE_TRANSIENT_RETRY_DELAYS=[5*1e3,20*1e3,60*1e3,5*60*1e3,15*60*1e3];const LICENSE_RATE_LIMIT_DEFAULT_WAIT=exports.LICENSE_RATE_LIMIT_DEFAULT_WAIT=60*1e3;const LICENSE_QUOTA_COOLDOWN=exports.LICENSE_QUOTA_COOLDOWN=60*60*1e3;const LICENSE_VERDICT_CACHE_DURATION=exports.LICENSE_VERDICT_CACHE_DURATION=24*60*60*1e3;const LICENSE_FLEET_MACHINE_THRESHOLD=exports.LICENSE_FLEET_MACHINE_THRESHOLD=50;const LICENSE_QUIET_VALIDATION_TTL=exports.LICENSE_QUIET_VALIDATION_TTL=LICENSE_CACHE_DURATION;const LICENSE_HOLD_STORAGE_KEY=exports.LICENSE_HOLD_STORAGE_KEY="buoy-gg-license-hold";
|
package/lib/module/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{KEYGEN_CONFIG as
|
|
1
|
+
"use strict";import{KEYGEN_CONFIG as u}from"./config.js";const{apiUrl:l}=u;export class LicenseTransportError extends Error{isTransient=true;constructor(e,n,o=null){super(e);this.name="LicenseTransportError";this.status=n;this.retryAfterMs=o}}export function isRateLimited(t){const e=t?.status;return e===429||e===402}export function backoffAfter(t,e,n){if(t.status===402)return e;return t.retryAfterMs??n}function E(t){const e=r=>{try{return t.headers?.get?.(r)??null}catch{return null}};const n=e("Retry-After");if(n){const r=Number(n);if(Number.isFinite(r)&&r>=0)return r*1e3;const a=Date.parse(n);if(Number.isFinite(a))return Math.max(0,a-Date.now())}const o=Number(e("X-RateLimit-Reset"));if(Number.isFinite(o)&&o>0)return Math.max(0,o*1e3-Date.now());return null}export function isTransientLicenseError(t){if(t instanceof LicenseTransportError)return true;if(t instanceof TypeError)return true;return typeof t==="object"&&t!==null&&t.isTransient===true}async function m(t){try{const e=await t.json();return e.errors?.[0]?.detail||`HTTP ${t.status}`}catch{return`HTTP ${t.status}`}}function d(){return{"Content-Type":"application/vnd.api+json",Accept:"application/vnd.api+json"}}async function T(t,e){const n=`${l}/validate`;const o={meta:{key:t}};let r;try{r=await fetch(n,{signal:e,method:"POST",headers:d(),body:JSON.stringify(o)})}catch(a){throw new LicenseTransportError(a instanceof Error?a.message:"Network request failed",null)}if(!r.ok){throw new LicenseTransportError(await m(r),r.status,r.status===429?E(r):null)}try{const a=await r.json();if(!a||typeof a!=="object"||typeof a.meta?.valid!=="boolean"||typeof a.meta?.code!=="string"||!a.meta.code)throw new Error("Missing license verdict");return a}catch{throw new LicenseTransportError("License server returned an unreadable response",r.status)}}export async function validateLicense(t){const e=typeof AbortController==="function"?new AbortController:null;let n;try{return await Promise.race([T(t,e?.signal),new Promise((o,r)=>{n=setTimeout(()=>{r(new LicenseTransportError("License verification timed out. Please retry.",null));e?.abort()},15e3)})])}finally{if(n)clearTimeout(n)}}export function isAcceptedValidation(t){if(!t.data)return false;const e=t.data.relationships?.product?.data?.id;if(e&&e!==u.productId)return false;if(t.meta.valid&&t.meta.code==="VALID")return true;return["OVERDUE","NO_MACHINE","NO_MACHINES","TOO_MANY_MACHINES","TOO_MANY_CORES","TOO_MANY_PROCESSES","FINGERPRINT_SCOPE_MISMATCH","HEARTBEAT_NOT_STARTED","HEARTBEAT_DEAD"].includes(t.meta.code)}export function machineCount(t){const e=t.data?.relationships?.machines?.meta?.count;return typeof e==="number"&&Number.isFinite(e)?e:0}export async function activateMachine(t,e,n,o,r){const a=`${l}/machines`;const i=await fetch(a,{method:"POST",headers:d(),body:JSON.stringify({licenseId:t,licenseKey:e,fingerprint:n,name:o,metadata:r||{}})});if(!i.ok){const s=await i.json();const c=s.errors?.[0]?.code;if(c==="FINGERPRINT_TAKEN"){throw new Error("FINGERPRINT_TAKEN")}if(c==="MACHINE_LIMIT_EXCEEDED"){throw new Error("MACHINE_LIMIT_EXCEEDED")}const f=s.errors?.[0]?.detail||`HTTP ${i.status}`;throw new Error(f)}return i.json()}export function parseValidationResult(t){const{meta:e,data:n}=t;return{valid:e.valid,code:e.code,detail:e.detail,metadata:n?.attributes?.metadata}}export function isFatalLicenseError(t){return["NOT_FOUND","SUSPENDED","EXPIRED","BANNED","PRODUCT_SCOPE_MISMATCH"].includes(t)}
|
package/lib/module/config.js
CHANGED
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* Pro is $9/mo, and is free every weekend for anyone holding a key —
|
|
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
|
-
*/export const KEYGEN_CONFIG={accountId:"b0eba0e8-e904-4906-b644-38f9aab57bed",productId:"bf67cb43-eeef-40ca-b308-e6e1b22c0eaa",
|
|
17
|
+
*/export const KEYGEN_CONFIG={accountId:"b0eba0e8-e904-4906-b644-38f9aab57bed",productId:"bf67cb43-eeef-40ca-b308-e6e1b22c0eaa",apiUrl:"https://buoy.gg/api/license"};export const FREE_TOKEN_PUBLIC_KEY="3b546fc717a62683f3236c70167899a271bee3ffc04df6ec1eea60a394a2f1e9";export const KEYGEN_POLICIES={free:"394e3351-1249-4f73-807a-703408604c0e",solo:"fa5d3c8f-5379-40f1-b63e-ab8a974b2f28",business:"690c2212-8e54-426f-b4b4-002ee1c0ae2b"};export const LICENSE_CACHE_DURATION=30*24*60*60*1e3;export const LICENSE_REVALIDATION_INTERVAL=24*60*60*1e3;export const LICENSE_STORAGE_KEY="buoy-gg-license";export const DEVICE_FINGERPRINT_STORAGE_KEY="buoy-gg-device-fingerprint";export const LICENSE_LAUNCH_VALIDATION_TTL=60*60*1e3;export const LICENSE_TRANSIENT_RETRY_DELAYS=[5*1e3,20*1e3,60*1e3,5*60*1e3,15*60*1e3];export const LICENSE_RATE_LIMIT_DEFAULT_WAIT=60*1e3;export const LICENSE_QUOTA_COOLDOWN=60*60*1e3;export const LICENSE_VERDICT_CACHE_DURATION=24*60*60*1e3;export const LICENSE_FLEET_MACHINE_THRESHOLD=50;export const LICENSE_QUIET_VALIDATION_TTL=LICENSE_CACHE_DURATION;export const LICENSE_HOLD_STORAGE_KEY="buoy-gg-license-hold";
|
|
@@ -69,7 +69,10 @@ export declare function isAcceptedValidation(response: KeygenValidationResponse)
|
|
|
69
69
|
*/
|
|
70
70
|
export declare function machineCount(response: KeygenValidationResponse): number;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Register this device for a license (for visibility, not enforcement).
|
|
73
|
+
*
|
|
74
|
+
* Goes through Buoy's endpoint, which holds the product token and forwards
|
|
75
|
+
* Keygen's answer unchanged, so the same error codes come back.
|
|
73
76
|
*/
|
|
74
77
|
export declare function activateMachine(licenseId: string, licenseKey: string, fingerprint: string, name: string, metadata?: Record<string, string>): Promise<KeygenMachineResponse>;
|
|
75
78
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EAErB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,8EAA8E;IA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G5E;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG7G;AAoBD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAS/D;AAiFD,2FAA2F;AAC3F,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAcpF;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,OAAO,CAQhF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,CAGvE;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,qBAAqB,CAAC,CA0BhC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,wBAAwB,GACjC,uBAAuB,CAUzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQzD"}
|
|
@@ -21,17 +21,24 @@
|
|
|
21
21
|
export declare const KEYGEN_CONFIG: {
|
|
22
22
|
readonly accountId: "b0eba0e8-e904-4906-b644-38f9aab57bed";
|
|
23
23
|
/**
|
|
24
|
-
* The Keygen PRODUCT id
|
|
25
|
-
*
|
|
24
|
+
* The Keygen PRODUCT id, used to check that a validated license belongs to
|
|
25
|
+
* Buoy (see `isAcceptedValidation`).
|
|
26
26
|
*
|
|
27
27
|
* Careful: this field previously held `1037431d-b2fe-48db-aca9-10c5e9c4d944`,
|
|
28
|
-
* which is not a product at all — it
|
|
28
|
+
* which is not a product at all — it was the ID of a product token.
|
|
29
29
|
* Verified against the Keygen dashboard (Aug 2026): the account has exactly
|
|
30
30
|
* one product, "Buoy", and this is its id.
|
|
31
31
|
*/
|
|
32
32
|
readonly productId: "bf67cb43-eeef-40ca-b308-e6e1b22c0eaa";
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Buoy's license endpoint. It sits in front of Keygen and answers from a
|
|
35
|
+
* cache, so the license server hears about a key about once an hour no
|
|
36
|
+
* matter how many devices hold it; Keygen's response body comes back
|
|
37
|
+
* unchanged. Device registration goes through it too, which is why no
|
|
38
|
+
* product token ships in this package any more: the token used to be
|
|
39
|
+
* embedded here, and anything embedded in an app is public.
|
|
40
|
+
*/
|
|
41
|
+
readonly apiUrl: "https://buoy.gg/api/license";
|
|
35
42
|
};
|
|
36
43
|
/**
|
|
37
44
|
* Ed25519 public key that free-tier tokens are verified against (see
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AAEH,eAAO,MAAM,aAAa;;IAExB;;;;;;;;OAQG
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AAEH,eAAO,MAAM,aAAa;;IAExB;;;;;;;;OAQG;;IAEH;;;;;;;OAOG;;CAEK,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,qEAAqE,CAAC;AAExG;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IAC1B,iEAAiE;;IAEjE,qEAAqE;;IAErE,oDAAoD;;CAE5C,CAAC;AAGX,eAAO,MAAM,sBAAsB,QAA2B,CAAC;AAI/D,eAAO,MAAM,6BAA6B,QAAsB,CAAC;AAIjE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAMrD,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAM3E,eAAO,MAAM,6BAA6B,QAAiB,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B,mDAMjC,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B,QAAY,CAAC;AACzD,eAAO,MAAM,sBAAsB,QAAiB,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,QAAsB,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAyB,CAAC;AAKnE,eAAO,MAAM,wBAAwB,yBAAyB,CAAC"}
|
|
@@ -69,7 +69,10 @@ export declare function isAcceptedValidation(response: KeygenValidationResponse)
|
|
|
69
69
|
*/
|
|
70
70
|
export declare function machineCount(response: KeygenValidationResponse): number;
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Register this device for a license (for visibility, not enforcement).
|
|
73
|
+
*
|
|
74
|
+
* Goes through Buoy's endpoint, which holds the product token and forwards
|
|
75
|
+
* Keygen's answer unchanged, so the same error codes come back.
|
|
73
76
|
*/
|
|
74
77
|
export declare function activateMachine(licenseId: string, licenseKey: string, fingerprint: string, name: string, metadata?: Record<string, string>): Promise<KeygenMachineResponse>;
|
|
75
78
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EAErB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,EAAG,IAAI,CAAU;IACrC,wE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K,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG7G;AAoBD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAS/D;AAiFD,2FAA2F;AAC3F,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAcpF;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,OAAO,CAQhF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,CAGvE;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,qBAAqB,CAAC,CA0BhC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,wBAAwB,GACjC,uBAAuB,CAUzB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQzD"}
|
|
@@ -21,17 +21,24 @@
|
|
|
21
21
|
export declare const KEYGEN_CONFIG: {
|
|
22
22
|
readonly accountId: "b0eba0e8-e904-4906-b644-38f9aab57bed";
|
|
23
23
|
/**
|
|
24
|
-
* The Keygen PRODUCT id
|
|
25
|
-
*
|
|
24
|
+
* The Keygen PRODUCT id, used to check that a validated license belongs to
|
|
25
|
+
* Buoy (see `isAcceptedValidation`).
|
|
26
26
|
*
|
|
27
27
|
* Careful: this field previously held `1037431d-b2fe-48db-aca9-10c5e9c4d944`,
|
|
28
|
-
* which is not a product at all — it
|
|
28
|
+
* which is not a product at all — it was the ID of a product token.
|
|
29
29
|
* Verified against the Keygen dashboard (Aug 2026): the account has exactly
|
|
30
30
|
* one product, "Buoy", and this is its id.
|
|
31
31
|
*/
|
|
32
32
|
readonly productId: "bf67cb43-eeef-40ca-b308-e6e1b22c0eaa";
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Buoy's license endpoint. It sits in front of Keygen and answers from a
|
|
35
|
+
* cache, so the license server hears about a key about once an hour no
|
|
36
|
+
* matter how many devices hold it; Keygen's response body comes back
|
|
37
|
+
* unchanged. Device registration goes through it too, which is why no
|
|
38
|
+
* product token ships in this package any more: the token used to be
|
|
39
|
+
* embedded here, and anything embedded in an app is public.
|
|
40
|
+
*/
|
|
41
|
+
readonly apiUrl: "https://buoy.gg/api/license";
|
|
35
42
|
};
|
|
36
43
|
/**
|
|
37
44
|
* Ed25519 public key that free-tier tokens are verified against (see
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AAEH,eAAO,MAAM,aAAa;;IAExB;;;;;;;;OAQG
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AAEH,eAAO,MAAM,aAAa;;IAExB;;;;;;;;OAQG;;IAEH;;;;;;;OAOG;;CAEK,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,qEAAqE,CAAC;AAExG;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;IAC1B,iEAAiE;;IAEjE,qEAAqE;;IAErE,oDAAoD;;CAE5C,CAAC;AAGX,eAAO,MAAM,sBAAsB,QAA2B,CAAC;AAI/D,eAAO,MAAM,6BAA6B,QAAsB,CAAC;AAIjE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAMrD,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAM3E,eAAO,MAAM,6BAA6B,QAAiB,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B,mDAMjC,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,+BAA+B,QAAY,CAAC;AACzD,eAAO,MAAM,sBAAsB,QAAiB,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,QAAsB,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAyB,CAAC;AAKnE,eAAO,MAAM,wBAAwB,yBAAyB,CAAC"}
|