@worldcoin/minikit-js 0.0.35-internal-alpha-temp-fix → 0.0.36-internal-alpha
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 +23 -0
- package/build/index.js +23 -0
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -523,6 +523,11 @@ 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
|
+
};
|
|
526
531
|
}
|
|
527
532
|
return { success: true };
|
|
528
533
|
}
|
|
@@ -657,6 +662,12 @@ _MiniKit.commands = {
|
|
|
657
662
|
return walletAuthPayload;
|
|
658
663
|
},
|
|
659
664
|
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
|
+
}
|
|
660
671
|
sendMiniKitEvent({
|
|
661
672
|
command: "send-transaction" /* SendTransaction */,
|
|
662
673
|
version: 1,
|
|
@@ -665,6 +676,12 @@ _MiniKit.commands = {
|
|
|
665
676
|
return payload;
|
|
666
677
|
},
|
|
667
678
|
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
|
+
}
|
|
668
685
|
sendMiniKitEvent({
|
|
669
686
|
command: "sign-message" /* SignMessage */,
|
|
670
687
|
version: 1,
|
|
@@ -673,6 +690,12 @@ _MiniKit.commands = {
|
|
|
673
690
|
return payload;
|
|
674
691
|
},
|
|
675
692
|
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
|
+
}
|
|
676
699
|
sendMiniKitEvent({
|
|
677
700
|
command: "sign-typed-data" /* SignTypedData */,
|
|
678
701
|
version: 1,
|
package/build/index.js
CHANGED
|
@@ -476,6 +476,11 @@ 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
|
+
};
|
|
479
484
|
}
|
|
480
485
|
return { success: true };
|
|
481
486
|
}
|
|
@@ -610,6 +615,12 @@ _MiniKit.commands = {
|
|
|
610
615
|
return walletAuthPayload;
|
|
611
616
|
},
|
|
612
617
|
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
|
+
}
|
|
613
624
|
sendMiniKitEvent({
|
|
614
625
|
command: "send-transaction" /* SendTransaction */,
|
|
615
626
|
version: 1,
|
|
@@ -618,6 +629,12 @@ _MiniKit.commands = {
|
|
|
618
629
|
return payload;
|
|
619
630
|
},
|
|
620
631
|
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
|
+
}
|
|
621
638
|
sendMiniKitEvent({
|
|
622
639
|
command: "sign-message" /* SignMessage */,
|
|
623
640
|
version: 1,
|
|
@@ -626,6 +643,12 @@ _MiniKit.commands = {
|
|
|
626
643
|
return payload;
|
|
627
644
|
},
|
|
628
645
|
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
|
+
}
|
|
629
652
|
sendMiniKitEvent({
|
|
630
653
|
command: "sign-typed-data" /* SignTypedData */,
|
|
631
654
|
version: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldcoin/minikit-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36-internal-alpha",
|
|
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",
|