@invonetwork/web-sdk 3.22.0 → 3.24.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.
- package/CHANGELOG.md +1326 -1311
- package/README.md +4 -4
- package/dist/{chunk-BOD4WOWO.js → chunk-7BYAUHTA.js} +42 -9
- package/dist/index.cjs +40 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/server.cjs +45 -8
- package/dist/server.d.cts +43 -4
- package/dist/server.d.ts +43 -4
- package/dist/server.js +7 -3
- package/dist/{types-C7vpPqsF.d.cts → types-DKiV5V0B.d.cts} +41 -5
- package/dist/{types-C7vpPqsF.d.ts → types-DKiV5V0B.d.ts} +41 -5
- package/package.json +77 -77
|
@@ -189,9 +189,16 @@ declare class InvoError extends Error {
|
|
|
189
189
|
* (spend game currency) or `createCheckout`/`purchaseCurrency` (buy currency) instead.
|
|
190
190
|
*/
|
|
191
191
|
get isNotPlatformTenant(): boolean;
|
|
192
|
-
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
192
|
+
/**
|
|
193
|
+
* True on `AMOUNT_BELOW_MINIMUM` (400), which three calls answer:
|
|
194
|
+
* - a Platform Commerce purchase, or a `purchaseItem` spend, too small for the fee to
|
|
195
|
+
* round above zero: raise the amount (`purchaseItem` rounds `totalPrice` to cents
|
|
196
|
+
* before this check);
|
|
197
|
+
* - initiate-send / initiate-transfer below the sending title's minimum (backend
|
|
198
|
+
* 2026-10-12): the limit is on {@link minimumAmount}, in the title's own currency
|
|
199
|
+
* ({@link limitCurrencyName}). On the wallet transfer route {@link code} stays
|
|
200
|
+
* `INVALID_AMOUNT`; this predicate reads `error_code` too.
|
|
201
|
+
*/
|
|
195
202
|
get isAmountBelowMinimum(): boolean;
|
|
196
203
|
/**
|
|
197
204
|
* True if the `rail` you sent disagrees with the storefront key you
|
|
@@ -730,11 +737,26 @@ declare class InvoError extends Error {
|
|
|
730
737
|
*/
|
|
731
738
|
get isDeviceSignalRejected(): boolean;
|
|
732
739
|
/**
|
|
733
|
-
* True when
|
|
734
|
-
*
|
|
740
|
+
* True when the phone you supplied is not the one on file for that player
|
|
741
|
+
* (`PHONE_MISMATCH`). Two places answer it:
|
|
742
|
+
* - `registerPlayer` (409): the player is already in your game with a different
|
|
743
|
+
* phone. Nothing changed; use `updatePlayerPhone` to change it.
|
|
744
|
+
* - initiate-send / initiate-transfer (400, since backend 2026-10-12): the sender
|
|
745
|
+
* phone does not match. Change the number first with `requestPhoneChange`.
|
|
735
746
|
* (`mintPlayerToken` reports the same situation as `phoneMismatch: true` on success.)
|
|
736
747
|
*/
|
|
737
748
|
get isPhoneMismatch(): boolean;
|
|
749
|
+
/**
|
|
750
|
+
* True when a send or transfer amount is above the sending title's maximum or the
|
|
751
|
+
* network ceiling for one move (`AMOUNT_ABOVE_MAXIMUM`, 400). See {@link maximumAmount}.
|
|
752
|
+
*/
|
|
753
|
+
get isAmountAboveMaximum(): boolean;
|
|
754
|
+
/** The minimum amount (decimal string) on an `AMOUNT_BELOW_MINIMUM` refusal. */
|
|
755
|
+
get minimumAmount(): string | undefined;
|
|
756
|
+
/** The maximum amount (decimal string) on an `AMOUNT_ABOVE_MAXIMUM` refusal. */
|
|
757
|
+
get maximumAmount(): string | undefined;
|
|
758
|
+
/** The sending title's currency name on an amount-limit refusal, when it has one. */
|
|
759
|
+
get limitCurrencyName(): string | undefined;
|
|
738
760
|
/**
|
|
739
761
|
* True when the phone you supplied belongs to another email
|
|
740
762
|
* (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
|
|
@@ -1600,6 +1622,20 @@ interface PlayerActivityEntry {
|
|
|
1600
1622
|
createdAt: string | null;
|
|
1601
1623
|
completedAt: string | null;
|
|
1602
1624
|
orderId: string | null;
|
|
1625
|
+
/**
|
|
1626
|
+
* Sends and transfers only (absent on purchases). The sender pays the whole fee out of
|
|
1627
|
+
* the amount sent; the recipient pays nothing. On the sender's entry (`"out"` /
|
|
1628
|
+
* `"self"`) `amount` is the gross sent and `feeAmount` / `netAmount` (what the
|
|
1629
|
+
* recipient gets) are set. On the recipient's entry (`"in"`) `amount` is what arrived
|
|
1630
|
+
* and `grossAmount` / `feeAmount` are set. While a send waits to be collected these
|
|
1631
|
+
* show the fee that will apply; `null` when it ended without being collected, and on
|
|
1632
|
+
* the recipient side of a transfer that converted between currencies.
|
|
1633
|
+
*/
|
|
1634
|
+
feeAmount?: string | null;
|
|
1635
|
+
/** Sender side: what the recipient receives (gross minus fee). See {@link feeAmount}. */
|
|
1636
|
+
netAmount?: string | null;
|
|
1637
|
+
/** Recipient side: what the sender sent before the fee. See {@link feeAmount}. */
|
|
1638
|
+
grossAmount?: string | null;
|
|
1603
1639
|
raw: Record<string, unknown>;
|
|
1604
1640
|
}
|
|
1605
1641
|
/** One page of `getPlayerActivity`. */
|
|
@@ -189,9 +189,16 @@ declare class InvoError extends Error {
|
|
|
189
189
|
* (spend game currency) or `createCheckout`/`purchaseCurrency` (buy currency) instead.
|
|
190
190
|
*/
|
|
191
191
|
get isNotPlatformTenant(): boolean;
|
|
192
|
-
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
192
|
+
/**
|
|
193
|
+
* True on `AMOUNT_BELOW_MINIMUM` (400), which three calls answer:
|
|
194
|
+
* - a Platform Commerce purchase, or a `purchaseItem` spend, too small for the fee to
|
|
195
|
+
* round above zero: raise the amount (`purchaseItem` rounds `totalPrice` to cents
|
|
196
|
+
* before this check);
|
|
197
|
+
* - initiate-send / initiate-transfer below the sending title's minimum (backend
|
|
198
|
+
* 2026-10-12): the limit is on {@link minimumAmount}, in the title's own currency
|
|
199
|
+
* ({@link limitCurrencyName}). On the wallet transfer route {@link code} stays
|
|
200
|
+
* `INVALID_AMOUNT`; this predicate reads `error_code` too.
|
|
201
|
+
*/
|
|
195
202
|
get isAmountBelowMinimum(): boolean;
|
|
196
203
|
/**
|
|
197
204
|
* True if the `rail` you sent disagrees with the storefront key you
|
|
@@ -730,11 +737,26 @@ declare class InvoError extends Error {
|
|
|
730
737
|
*/
|
|
731
738
|
get isDeviceSignalRejected(): boolean;
|
|
732
739
|
/**
|
|
733
|
-
* True when
|
|
734
|
-
*
|
|
740
|
+
* True when the phone you supplied is not the one on file for that player
|
|
741
|
+
* (`PHONE_MISMATCH`). Two places answer it:
|
|
742
|
+
* - `registerPlayer` (409): the player is already in your game with a different
|
|
743
|
+
* phone. Nothing changed; use `updatePlayerPhone` to change it.
|
|
744
|
+
* - initiate-send / initiate-transfer (400, since backend 2026-10-12): the sender
|
|
745
|
+
* phone does not match. Change the number first with `requestPhoneChange`.
|
|
735
746
|
* (`mintPlayerToken` reports the same situation as `phoneMismatch: true` on success.)
|
|
736
747
|
*/
|
|
737
748
|
get isPhoneMismatch(): boolean;
|
|
749
|
+
/**
|
|
750
|
+
* True when a send or transfer amount is above the sending title's maximum or the
|
|
751
|
+
* network ceiling for one move (`AMOUNT_ABOVE_MAXIMUM`, 400). See {@link maximumAmount}.
|
|
752
|
+
*/
|
|
753
|
+
get isAmountAboveMaximum(): boolean;
|
|
754
|
+
/** The minimum amount (decimal string) on an `AMOUNT_BELOW_MINIMUM` refusal. */
|
|
755
|
+
get minimumAmount(): string | undefined;
|
|
756
|
+
/** The maximum amount (decimal string) on an `AMOUNT_ABOVE_MAXIMUM` refusal. */
|
|
757
|
+
get maximumAmount(): string | undefined;
|
|
758
|
+
/** The sending title's currency name on an amount-limit refusal, when it has one. */
|
|
759
|
+
get limitCurrencyName(): string | undefined;
|
|
738
760
|
/**
|
|
739
761
|
* True when the phone you supplied belongs to another email
|
|
740
762
|
* (`PHONE_SHARE_APPROVAL_REQUIRED`, 409) on `mintPlayerToken`, `registerPlayer` or
|
|
@@ -1600,6 +1622,20 @@ interface PlayerActivityEntry {
|
|
|
1600
1622
|
createdAt: string | null;
|
|
1601
1623
|
completedAt: string | null;
|
|
1602
1624
|
orderId: string | null;
|
|
1625
|
+
/**
|
|
1626
|
+
* Sends and transfers only (absent on purchases). The sender pays the whole fee out of
|
|
1627
|
+
* the amount sent; the recipient pays nothing. On the sender's entry (`"out"` /
|
|
1628
|
+
* `"self"`) `amount` is the gross sent and `feeAmount` / `netAmount` (what the
|
|
1629
|
+
* recipient gets) are set. On the recipient's entry (`"in"`) `amount` is what arrived
|
|
1630
|
+
* and `grossAmount` / `feeAmount` are set. While a send waits to be collected these
|
|
1631
|
+
* show the fee that will apply; `null` when it ended without being collected, and on
|
|
1632
|
+
* the recipient side of a transfer that converted between currencies.
|
|
1633
|
+
*/
|
|
1634
|
+
feeAmount?: string | null;
|
|
1635
|
+
/** Sender side: what the recipient receives (gross minus fee). See {@link feeAmount}. */
|
|
1636
|
+
netAmount?: string | null;
|
|
1637
|
+
/** Recipient side: what the sender sent before the fee. See {@link feeAmount}. */
|
|
1638
|
+
grossAmount?: string | null;
|
|
1603
1639
|
raw: Record<string, unknown>;
|
|
1604
1640
|
}
|
|
1605
1641
|
/** One page of `getPlayerActivity`. */
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@invonetwork/web-sdk",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "INVO Web SDK — currency purchase + passkey (WebAuthn) verification for partner web platforms.",
|
|
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
|
-
},
|
|
39
|
-
"main": "./dist/index.cjs",
|
|
40
|
-
"module": "./dist/index.js",
|
|
41
|
-
"types": "./dist/index.d.ts",
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "tsup",
|
|
44
|
-
"dev": "tsup --watch",
|
|
45
|
-
"typecheck": "tsc --noEmit",
|
|
46
|
-
"lint": "eslint .",
|
|
47
|
-
"test": "vitest run",
|
|
48
|
-
"test:watch": "vitest",
|
|
49
|
-
"clean": "rimraf dist",
|
|
50
|
-
"changeset": "changeset",
|
|
51
|
-
"version-packages": "changeset version",
|
|
52
|
-
"release": "npm run build && changeset publish",
|
|
53
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
54
|
-
},
|
|
55
|
-
"keywords": [
|
|
56
|
-
"invo",
|
|
57
|
-
"webauthn",
|
|
58
|
-
"passkey",
|
|
59
|
-
"payments",
|
|
60
|
-
"game-currency",
|
|
61
|
-
"sdk"
|
|
62
|
-
],
|
|
63
|
-
"publishConfig": {
|
|
64
|
-
"access": "public"
|
|
65
|
-
},
|
|
66
|
-
"devDependencies": {
|
|
67
|
-
"@changesets/cli": "^2.31.0",
|
|
68
|
-
"@eslint/js": "^10.0.1",
|
|
69
|
-
"eslint": "^10.6.0",
|
|
70
|
-
"happy-dom": "^15.11.7",
|
|
71
|
-
"rimraf": "^5.0.5",
|
|
72
|
-
"tsup": "^8.0.1",
|
|
73
|
-
"typescript": "^5.4.5",
|
|
74
|
-
"typescript-eslint": "^8.62.1",
|
|
75
|
-
"vitest": "^1.5.0"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@invonetwork/web-sdk",
|
|
3
|
+
"version": "3.24.0",
|
|
4
|
+
"description": "INVO Web SDK — currency purchase + passkey (WebAuthn) verification for partner web platforms.",
|
|
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
|
+
},
|
|
39
|
+
"main": "./dist/index.cjs",
|
|
40
|
+
"module": "./dist/index.js",
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup",
|
|
44
|
+
"dev": "tsup --watch",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"lint": "eslint .",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"test:watch": "vitest",
|
|
49
|
+
"clean": "rimraf dist",
|
|
50
|
+
"changeset": "changeset",
|
|
51
|
+
"version-packages": "changeset version",
|
|
52
|
+
"release": "npm run build && changeset publish",
|
|
53
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"invo",
|
|
57
|
+
"webauthn",
|
|
58
|
+
"passkey",
|
|
59
|
+
"payments",
|
|
60
|
+
"game-currency",
|
|
61
|
+
"sdk"
|
|
62
|
+
],
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@changesets/cli": "^2.31.0",
|
|
68
|
+
"@eslint/js": "^10.0.1",
|
|
69
|
+
"eslint": "^10.6.0",
|
|
70
|
+
"happy-dom": "^15.11.7",
|
|
71
|
+
"rimraf": "^5.0.5",
|
|
72
|
+
"tsup": "^8.0.1",
|
|
73
|
+
"typescript": "^5.4.5",
|
|
74
|
+
"typescript-eslint": "^8.62.1",
|
|
75
|
+
"vitest": "^1.5.0"
|
|
76
|
+
}
|
|
77
|
+
}
|