@worldcoin/minikit-js 0.0.33-internal-alpha → 0.0.35-internal-alpha-temp-fix
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/build/index.cjs +0 -23
- package/build/index.js +0 -23
- package/index.ts +27 -0
- package/package.json +12 -2
package/build/index.cjs
CHANGED
|
@@ -523,11 +523,6 @@ var _MiniKit = class _MiniKit {
|
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
525
|
if (!this.commandsValid(window.WorldApp.supported_commands)) {
|
|
526
|
-
return {
|
|
527
|
-
success: false,
|
|
528
|
-
errorCode: "app_out_of_date" /* AppOutOfDate */,
|
|
529
|
-
errorMessage: MiniKitInstallErrorMessage["app_out_of_date" /* AppOutOfDate */]
|
|
530
|
-
};
|
|
531
526
|
}
|
|
532
527
|
return { success: true };
|
|
533
528
|
}
|
|
@@ -662,12 +657,6 @@ _MiniKit.commands = {
|
|
|
662
657
|
return walletAuthPayload;
|
|
663
658
|
},
|
|
664
659
|
sendTransaction: (payload) => {
|
|
665
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["send-transaction" /* SendTransaction */]) {
|
|
666
|
-
console.error(
|
|
667
|
-
"'sendTransaction' command is unavailable. Check MiniKit.install() or update the app version"
|
|
668
|
-
);
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
671
660
|
sendMiniKitEvent({
|
|
672
661
|
command: "send-transaction" /* SendTransaction */,
|
|
673
662
|
version: 1,
|
|
@@ -676,12 +665,6 @@ _MiniKit.commands = {
|
|
|
676
665
|
return payload;
|
|
677
666
|
},
|
|
678
667
|
signMessage: (payload) => {
|
|
679
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["sign-message" /* SignMessage */]) {
|
|
680
|
-
console.error(
|
|
681
|
-
"'signMessage' command is unavailable. Check MiniKit.install() or update the app version"
|
|
682
|
-
);
|
|
683
|
-
return null;
|
|
684
|
-
}
|
|
685
668
|
sendMiniKitEvent({
|
|
686
669
|
command: "sign-message" /* SignMessage */,
|
|
687
670
|
version: 1,
|
|
@@ -690,12 +673,6 @@ _MiniKit.commands = {
|
|
|
690
673
|
return payload;
|
|
691
674
|
},
|
|
692
675
|
signTypedData: (payload) => {
|
|
693
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["sign-typed-data" /* SignTypedData */]) {
|
|
694
|
-
console.error(
|
|
695
|
-
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
|
|
696
|
-
);
|
|
697
|
-
return null;
|
|
698
|
-
}
|
|
699
676
|
sendMiniKitEvent({
|
|
700
677
|
command: "sign-typed-data" /* SignTypedData */,
|
|
701
678
|
version: 1,
|
package/build/index.js
CHANGED
|
@@ -476,11 +476,6 @@ var _MiniKit = class _MiniKit {
|
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
if (!this.commandsValid(window.WorldApp.supported_commands)) {
|
|
479
|
-
return {
|
|
480
|
-
success: false,
|
|
481
|
-
errorCode: "app_out_of_date" /* AppOutOfDate */,
|
|
482
|
-
errorMessage: MiniKitInstallErrorMessage["app_out_of_date" /* AppOutOfDate */]
|
|
483
|
-
};
|
|
484
479
|
}
|
|
485
480
|
return { success: true };
|
|
486
481
|
}
|
|
@@ -615,12 +610,6 @@ _MiniKit.commands = {
|
|
|
615
610
|
return walletAuthPayload;
|
|
616
611
|
},
|
|
617
612
|
sendTransaction: (payload) => {
|
|
618
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["send-transaction" /* SendTransaction */]) {
|
|
619
|
-
console.error(
|
|
620
|
-
"'sendTransaction' command is unavailable. Check MiniKit.install() or update the app version"
|
|
621
|
-
);
|
|
622
|
-
return null;
|
|
623
|
-
}
|
|
624
613
|
sendMiniKitEvent({
|
|
625
614
|
command: "send-transaction" /* SendTransaction */,
|
|
626
615
|
version: 1,
|
|
@@ -629,12 +618,6 @@ _MiniKit.commands = {
|
|
|
629
618
|
return payload;
|
|
630
619
|
},
|
|
631
620
|
signMessage: (payload) => {
|
|
632
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["sign-message" /* SignMessage */]) {
|
|
633
|
-
console.error(
|
|
634
|
-
"'signMessage' command is unavailable. Check MiniKit.install() or update the app version"
|
|
635
|
-
);
|
|
636
|
-
return null;
|
|
637
|
-
}
|
|
638
621
|
sendMiniKitEvent({
|
|
639
622
|
command: "sign-message" /* SignMessage */,
|
|
640
623
|
version: 1,
|
|
@@ -643,12 +626,6 @@ _MiniKit.commands = {
|
|
|
643
626
|
return payload;
|
|
644
627
|
},
|
|
645
628
|
signTypedData: (payload) => {
|
|
646
|
-
if (typeof window === "undefined" || !_MiniKit.isCommandAvailable["sign-typed-data" /* SignTypedData */]) {
|
|
647
|
-
console.error(
|
|
648
|
-
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
|
|
649
|
-
);
|
|
650
|
-
return null;
|
|
651
|
-
}
|
|
652
629
|
sendMiniKitEvent({
|
|
653
630
|
command: "sign-typed-data" /* SignTypedData */,
|
|
654
631
|
version: 1,
|
package/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { MiniKit } from "./minikit";
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
VerifyCommandInput,
|
|
5
|
+
PayCommandInput,
|
|
6
|
+
Command,
|
|
7
|
+
SiweMessage,
|
|
8
|
+
} from "./types";
|
|
9
|
+
|
|
10
|
+
export * from "./types/responses";
|
|
11
|
+
export * from "./types/commands";
|
|
12
|
+
export * from "./types/errors";
|
|
13
|
+
|
|
14
|
+
export { Tokens, Network, TokenDecimals } from "./types/payment";
|
|
15
|
+
export { tokenToDecimals } from "helpers/payment/client";
|
|
16
|
+
|
|
17
|
+
export { VerificationLevel, type ISuccessResult } from "@worldcoin/idkit-core";
|
|
18
|
+
export {
|
|
19
|
+
verifyCloudProof,
|
|
20
|
+
type IVerifyResponse,
|
|
21
|
+
} from "@worldcoin/idkit-core/backend";
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
parseSiweMessage,
|
|
25
|
+
SAFE_CONTRACT_ABI,
|
|
26
|
+
verifySiweMessage,
|
|
27
|
+
} from "helpers/siwe/siwe";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldcoin/minikit-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35-internal-alpha-temp-fix",
|
|
4
4
|
"homepage": "https://docs.worldcoin.org/id/minikit",
|
|
5
5
|
"description": "Internal Alpha: Mini-kit JS is a lightweight sdk for building mini-apps compatible with World App",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,8 +18,18 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
+
"typesVersions": {
|
|
22
|
+
"*": {
|
|
23
|
+
"*": [
|
|
24
|
+
"./build/*/index.d.ts",
|
|
25
|
+
"./build/index.d.ts"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "index.ts",
|
|
30
|
+
"types": "index.ts",
|
|
21
31
|
"engines": {
|
|
22
|
-
"node": ">=16"
|
|
32
|
+
"node": ">= 16"
|
|
23
33
|
},
|
|
24
34
|
"files": [
|
|
25
35
|
"./build/**",
|