@worldcoin/minikit-js 0.0.36-internal-alpha → 0.0.37-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 +7 -6
- package/build/index.d.cts +3 -3
- package/build/index.d.ts +3 -3
- package/build/index.js +4 -3
- package/package.json +4 -4
package/build/index.cjs
CHANGED
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var core_exports = {};
|
|
22
|
+
__export(core_exports, {
|
|
23
23
|
Command: () => Command,
|
|
24
24
|
MiniKit: () => MiniKit,
|
|
25
25
|
MiniKitInstallErrorCodes: () => MiniKitInstallErrorCodes,
|
|
@@ -48,7 +48,7 @@ __export(src_exports, {
|
|
|
48
48
|
verifyCloudProof: () => import_backend.verifyCloudProof,
|
|
49
49
|
verifySiweMessage: () => verifySiweMessage
|
|
50
50
|
});
|
|
51
|
-
module.exports = __toCommonJS(
|
|
51
|
+
module.exports = __toCommonJS(core_exports);
|
|
52
52
|
|
|
53
53
|
// helpers/send-webview-event.ts
|
|
54
54
|
var sendWebviewEvent = (payload) => {
|
|
@@ -214,6 +214,7 @@ var MiniKitInstallErrorMessage = {
|
|
|
214
214
|
|
|
215
215
|
// minikit.ts
|
|
216
216
|
var import_idkit_core3 = require("@worldcoin/idkit-core");
|
|
217
|
+
var import_hashing = require("@worldcoin/idkit-core/hashing");
|
|
217
218
|
|
|
218
219
|
// helpers/siwe/validate-wallet-auth-command-input.ts
|
|
219
220
|
var validateWalletAuthCommandInput = (params) => {
|
|
@@ -583,8 +584,8 @@ _MiniKit.commands = {
|
|
|
583
584
|
}
|
|
584
585
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
585
586
|
const eventPayload = {
|
|
586
|
-
|
|
587
|
-
signal: payload.signal
|
|
587
|
+
action: (0, import_hashing.encodeAction)(payload.action),
|
|
588
|
+
signal: (0, import_hashing.generateSignal)(payload.signal).digest,
|
|
588
589
|
verification_level: payload.verification_level || import_idkit_core3.VerificationLevel.Orb,
|
|
589
590
|
timestamp
|
|
590
591
|
};
|
|
@@ -605,7 +606,7 @@ _MiniKit.commands = {
|
|
|
605
606
|
if (!validatePaymentPayload(payload)) {
|
|
606
607
|
return null;
|
|
607
608
|
}
|
|
608
|
-
const network = "
|
|
609
|
+
const network = "worldchain" /* WorldChain */;
|
|
609
610
|
const eventPayload = {
|
|
610
611
|
...payload,
|
|
611
612
|
network
|
package/build/index.d.cts
CHANGED
|
@@ -261,7 +261,7 @@ type MiniAppSendTransactionSuccessPayload = {
|
|
|
261
261
|
type MiniAppSendTransactionErrorPayload = {
|
|
262
262
|
status: "error";
|
|
263
263
|
error_code: SendTransactionErrorCodes;
|
|
264
|
-
|
|
264
|
+
details?: Record<string, any>;
|
|
265
265
|
version: number;
|
|
266
266
|
};
|
|
267
267
|
type MiniAppSendTransactionPayload = MiniAppSendTransactionSuccessPayload | MiniAppSendTransactionErrorPayload;
|
|
@@ -274,7 +274,7 @@ type MiniAppSignMessageSuccessPayload = {
|
|
|
274
274
|
type MiniAppSignMessageErrorPayload = {
|
|
275
275
|
status: "error";
|
|
276
276
|
error_code: SignMessageErrorCodes;
|
|
277
|
-
|
|
277
|
+
details?: Record<string, any>;
|
|
278
278
|
version: number;
|
|
279
279
|
};
|
|
280
280
|
type MiniAppSignMessagePayload = MiniAppSignMessageSuccessPayload | MiniAppSignMessageErrorPayload;
|
|
@@ -287,7 +287,7 @@ type MiniAppSignTypedDataSuccessPayload = {
|
|
|
287
287
|
type MiniAppSignTypedDataErrorPayload = {
|
|
288
288
|
status: "error";
|
|
289
289
|
error_code: SignTypedDataErrorCodes;
|
|
290
|
-
|
|
290
|
+
details?: Record<string, any>;
|
|
291
291
|
version: number;
|
|
292
292
|
};
|
|
293
293
|
type MiniAppSignTypedDataPayload = MiniAppSignTypedDataSuccessPayload | MiniAppSignTypedDataErrorPayload;
|
package/build/index.d.ts
CHANGED
|
@@ -261,7 +261,7 @@ type MiniAppSendTransactionSuccessPayload = {
|
|
|
261
261
|
type MiniAppSendTransactionErrorPayload = {
|
|
262
262
|
status: "error";
|
|
263
263
|
error_code: SendTransactionErrorCodes;
|
|
264
|
-
|
|
264
|
+
details?: Record<string, any>;
|
|
265
265
|
version: number;
|
|
266
266
|
};
|
|
267
267
|
type MiniAppSendTransactionPayload = MiniAppSendTransactionSuccessPayload | MiniAppSendTransactionErrorPayload;
|
|
@@ -274,7 +274,7 @@ type MiniAppSignMessageSuccessPayload = {
|
|
|
274
274
|
type MiniAppSignMessageErrorPayload = {
|
|
275
275
|
status: "error";
|
|
276
276
|
error_code: SignMessageErrorCodes;
|
|
277
|
-
|
|
277
|
+
details?: Record<string, any>;
|
|
278
278
|
version: number;
|
|
279
279
|
};
|
|
280
280
|
type MiniAppSignMessagePayload = MiniAppSignMessageSuccessPayload | MiniAppSignMessageErrorPayload;
|
|
@@ -287,7 +287,7 @@ type MiniAppSignTypedDataSuccessPayload = {
|
|
|
287
287
|
type MiniAppSignTypedDataErrorPayload = {
|
|
288
288
|
status: "error";
|
|
289
289
|
error_code: SignTypedDataErrorCodes;
|
|
290
|
-
|
|
290
|
+
details?: Record<string, any>;
|
|
291
291
|
version: number;
|
|
292
292
|
};
|
|
293
293
|
type MiniAppSignTypedDataPayload = MiniAppSignTypedDataSuccessPayload | MiniAppSignTypedDataErrorPayload;
|
package/build/index.js
CHANGED
|
@@ -162,6 +162,7 @@ var MiniKitInstallErrorMessage = {
|
|
|
162
162
|
|
|
163
163
|
// minikit.ts
|
|
164
164
|
import { VerificationLevel } from "@worldcoin/idkit-core";
|
|
165
|
+
import { generateSignal, encodeAction } from "@worldcoin/idkit-core/hashing";
|
|
165
166
|
|
|
166
167
|
// helpers/siwe/validate-wallet-auth-command-input.ts
|
|
167
168
|
var validateWalletAuthCommandInput = (params) => {
|
|
@@ -536,8 +537,8 @@ _MiniKit.commands = {
|
|
|
536
537
|
}
|
|
537
538
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
538
539
|
const eventPayload = {
|
|
539
|
-
|
|
540
|
-
signal: payload.signal
|
|
540
|
+
action: encodeAction(payload.action),
|
|
541
|
+
signal: generateSignal(payload.signal).digest,
|
|
541
542
|
verification_level: payload.verification_level || VerificationLevel.Orb,
|
|
542
543
|
timestamp
|
|
543
544
|
};
|
|
@@ -558,7 +559,7 @@ _MiniKit.commands = {
|
|
|
558
559
|
if (!validatePaymentPayload(payload)) {
|
|
559
560
|
return null;
|
|
560
561
|
}
|
|
561
|
-
const network = "
|
|
562
|
+
const network = "worldchain" /* WorldChain */;
|
|
562
563
|
const eventPayload = {
|
|
563
564
|
...payload,
|
|
564
565
|
network
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worldcoin/minikit-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37-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",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@worldcoin/idkit-core": "^1.3.0",
|
|
44
|
-
"abitype": "^1.0.6"
|
|
45
|
-
"turbo": "^2.1.1"
|
|
44
|
+
"abitype": "^1.0.6"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@types/node": "^20",
|
|
@@ -51,7 +50,8 @@
|
|
|
51
50
|
"prettier": "^3.2.5",
|
|
52
51
|
"prettier-plugin-sort-imports-desc": "^1.0.0",
|
|
53
52
|
"tsup": "^8.0.2",
|
|
54
|
-
"typescript": "^5.4.5"
|
|
53
|
+
"typescript": "^5.4.5",
|
|
54
|
+
"viem": "^2.21.18"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"viem": "^2.0.0"
|