@invonetwork/web-sdk 3.33.0 → 3.34.0

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.
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
297
297
  * Not retryable until INVO resumes payments; show a neutral "purchases are
298
298
  * unavailable right now" message. */
299
299
  get isPaymentsPaused(): boolean;
300
+ /** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
301
+ * additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
302
+ * (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
303
+ * you are calling, or point the SDK at the environment the key is for. The code is
304
+ * matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
305
+ * `error_code` / `code`), since the 401 may carry a different `code`. */
306
+ get isKeyForOtherEnvironment(): boolean;
300
307
  /** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
301
308
  * the buyer is unknown here or their balance is short. One answer on purpose; the
302
309
  * balance is never disclosed. Offer another way to pay. */
@@ -985,7 +992,14 @@ interface InvoConfig {
985
992
  hooks?: InvoHooks;
986
993
  }
987
994
  interface ServerConfig extends InvoConfig {
988
- /** The game secret. Server-side ONLY — never ship this to a browser. */
995
+ /**
996
+ * The game secret. Server-side ONLY: never ship this to a browser.
997
+ *
998
+ * Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
999
+ * `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
1000
+ * throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
1001
+ * an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
1002
+ */
989
1003
  gameSecret: string;
990
1004
  /**
991
1005
  * The per-game **sandbox clock key** (`ivclk_...`) from the sandbox console (Game
@@ -297,6 +297,13 @@ declare class InvoError extends Error {
297
297
  * Not retryable until INVO resumes payments; show a neutral "purchases are
298
298
  * unavailable right now" message. */
299
299
  get isPaymentsPaused(): boolean;
300
+ /** The key belongs to the other INVO environment (`KEY_FOR_OTHER_ENVIRONMENT`, 401;
301
+ * additive, 3.34.0): a test key (`ivsdk_test_`) sent to production, or a live key
302
+ * (`ivsdk_live_`) sent to the sandbox. Never retried. Use the key for the environment
303
+ * you are calling, or point the SDK at the environment the key is for. The code is
304
+ * matched on any code field (`code`, `rawCode`, `publicCode`, or the body's
305
+ * `error_code` / `code`), since the 401 may carry a different `code`. */
306
+ get isKeyForOtherEnvironment(): boolean;
300
307
  /** A buyer-approved balance purchase cannot start (`BALANCE_UNAVAILABLE`, 400; 3.33.0):
301
308
  * the buyer is unknown here or their balance is short. One answer on purpose; the
302
309
  * balance is never disclosed. Offer another way to pay. */
@@ -985,7 +992,14 @@ interface InvoConfig {
985
992
  hooks?: InvoHooks;
986
993
  }
987
994
  interface ServerConfig extends InvoConfig {
988
- /** The game secret. Server-side ONLY — never ship this to a browser. */
995
+ /**
996
+ * The game secret. Server-side ONLY: never ship this to a browser.
997
+ *
998
+ * Keys made from 3.34.0 on name their environment: `ivsdk_live_...` is production and
999
+ * `ivsdk_test_...` is the sandbox. Pairing one with a `baseUrl` on the other INVO host
1000
+ * throws `KeyEnvironmentMismatchError` here, before any request. A `baseUrl` that is not
1001
+ * an INVO host (your own proxy) is not checked, nor is an older unprefixed `ivsdk_...` key.
1002
+ */
989
1003
  gameSecret: string;
990
1004
  /**
991
1005
  * The per-game **sandbox clock key** (`ivclk_...`) from the sandbox console (Game
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.33.0";
6
+ declare const SDK_VERSION = "3.34.0";
7
7
 
8
8
  export { SDK_VERSION as S };
@@ -3,6 +3,6 @@
3
3
  * `package.json` so it cannot drift silently (it did: the UA read 3.0.0 through 3.7.0).
4
4
  * Bump it with the changeset flow.
5
5
  */
6
- declare const SDK_VERSION = "3.33.0";
6
+ declare const SDK_VERSION = "3.34.0";
7
7
 
8
8
  export { SDK_VERSION as S };
package/package.json CHANGED
@@ -1,91 +1,91 @@
1
- {
2
- "name": "@invonetwork/web-sdk",
3
- "version": "3.33.0",
4
- "description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
5
- "license": "SEE LICENSE IN LICENSE",
6
- "private": false,
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/Invo-Technologies/invo-web-sdk.git"
10
- },
11
- "homepage": "https://docs.invo.network",
12
- "bugs": {
13
- "url": "https://github.com/Invo-Technologies/invo-web-sdk/issues"
14
- },
15
- "type": "module",
16
- "engines": {
17
- "node": ">=18"
18
- },
19
- "sideEffects": false,
20
- "files": [
21
- "dist",
22
- "!dist/**/*.map",
23
- "README.md",
24
- "LICENSE",
25
- "CHANGELOG.md"
26
- ],
27
- "exports": {
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/index.js",
31
- "require": "./dist/index.cjs"
32
- },
33
- "./server": {
34
- "types": "./dist/server.d.ts",
35
- "import": "./dist/server.js",
36
- "require": "./dist/server.cjs"
37
- },
38
- "./game": {
39
- "types": "./dist/game.d.ts",
40
- "import": "./dist/game.js",
41
- "require": "./dist/game.cjs"
42
- },
43
- "./game-server": {
44
- "types": "./dist/game-server.d.ts",
45
- "import": "./dist/game-server.js",
46
- "require": "./dist/game-server.cjs"
47
- }
48
- },
49
- "main": "./dist/index.cjs",
50
- "module": "./dist/index.js",
51
- "types": "./dist/index.d.ts",
52
- "scripts": {
53
- "build": "tsup",
54
- "dev": "tsup --watch",
55
- "typecheck": "tsc --noEmit",
56
- "lint": "eslint .",
57
- "test": "vitest run",
58
- "test:watch": "vitest",
59
- "clean": "rimraf dist",
60
- "changeset": "changeset",
61
- "version-packages": "changeset version",
62
- "release": "npm run build && changeset publish",
63
- "prepublishOnly": "npm run clean && npm run build"
64
- },
65
- "keywords": [
66
- "invo",
67
- "webauthn",
68
- "passkey",
69
- "payments",
70
- "game-currency",
71
- "sdk",
72
- "game",
73
- "game-economy",
74
- "browser-game",
75
- "loyalty"
76
- ],
77
- "publishConfig": {
78
- "access": "public"
79
- },
80
- "devDependencies": {
81
- "@changesets/cli": "^2.31.0",
82
- "@eslint/js": "^10.0.1",
83
- "eslint": "^10.6.0",
84
- "happy-dom": "^15.11.7",
85
- "rimraf": "^5.0.5",
86
- "tsup": "^8.0.1",
87
- "typescript": "^5.4.5",
88
- "typescript-eslint": "^8.62.1",
89
- "vitest": "^1.5.0"
90
- }
91
- }
1
+ {
2
+ "name": "@invonetwork/web-sdk",
3
+ "version": "3.34.0",
4
+ "description": "INVO Web SDK — currency purchase, passkey (WebAuthn) verification, loyalty, and a drop-in game economy layer (wallet, shop, hosted checkout) for partner web platforms and browser games.",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "private": false,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Invo-Technologies/invo-web-sdk.git"
10
+ },
11
+ "homepage": "https://docs.invo.network",
12
+ "bugs": {
13
+ "url": "https://github.com/Invo-Technologies/invo-web-sdk/issues"
14
+ },
15
+ "type": "module",
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
19
+ "sideEffects": false,
20
+ "files": [
21
+ "dist",
22
+ "!dist/**/*.map",
23
+ "README.md",
24
+ "LICENSE",
25
+ "CHANGELOG.md"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js",
31
+ "require": "./dist/index.cjs"
32
+ },
33
+ "./server": {
34
+ "types": "./dist/server.d.ts",
35
+ "import": "./dist/server.js",
36
+ "require": "./dist/server.cjs"
37
+ },
38
+ "./game": {
39
+ "types": "./dist/game.d.ts",
40
+ "import": "./dist/game.js",
41
+ "require": "./dist/game.cjs"
42
+ },
43
+ "./game-server": {
44
+ "types": "./dist/game-server.d.ts",
45
+ "import": "./dist/game-server.js",
46
+ "require": "./dist/game-server.cjs"
47
+ }
48
+ },
49
+ "main": "./dist/index.cjs",
50
+ "module": "./dist/index.js",
51
+ "types": "./dist/index.d.ts",
52
+ "scripts": {
53
+ "build": "tsup",
54
+ "dev": "tsup --watch",
55
+ "typecheck": "tsc --noEmit",
56
+ "lint": "eslint .",
57
+ "test": "vitest run",
58
+ "test:watch": "vitest",
59
+ "clean": "rimraf dist",
60
+ "changeset": "changeset",
61
+ "version-packages": "changeset version",
62
+ "release": "npm run build && changeset publish",
63
+ "prepublishOnly": "npm run clean && npm run build"
64
+ },
65
+ "keywords": [
66
+ "invo",
67
+ "webauthn",
68
+ "passkey",
69
+ "payments",
70
+ "game-currency",
71
+ "sdk",
72
+ "game",
73
+ "game-economy",
74
+ "browser-game",
75
+ "loyalty"
76
+ ],
77
+ "publishConfig": {
78
+ "access": "public"
79
+ },
80
+ "devDependencies": {
81
+ "@changesets/cli": "^2.31.0",
82
+ "@eslint/js": "^10.0.1",
83
+ "eslint": "^10.6.0",
84
+ "happy-dom": "^15.11.7",
85
+ "rimraf": "^5.0.5",
86
+ "tsup": "^8.0.1",
87
+ "typescript": "^5.4.5",
88
+ "typescript-eslint": "^8.62.1",
89
+ "vitest": "^1.5.0"
90
+ }
91
+ }
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var SDK_VERSION = "3.33.0";
3
-
4
- export { SDK_VERSION };
5
- //# sourceMappingURL=chunk-VWUFSA6U.js.map
6
- //# sourceMappingURL=chunk-VWUFSA6U.js.map