@worldcoin/minikit-js 0.0.23-internal-alpha → 0.0.25-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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ ### Minikit JS
2
+
3
+ Minikit is still in pre-release. If you're interested in integrating Minikit into your project, please contact us at [andy@toolsforhumanity.com](mailto:andy@toolsforhumanity.com).
package/build/index.cjs CHANGED
@@ -37,7 +37,6 @@ __export(src_exports, {
37
37
  VerificationLevel: () => import_idkit_core4.VerificationLevel,
38
38
  WalletAuthErrorCodes: () => WalletAuthErrorCodes,
39
39
  WalletAuthErrorMessage: () => WalletAuthErrorMessage,
40
- generateNonce: () => generateNonce,
41
40
  parseSiweMessage: () => parseSiweMessage,
42
41
  tokenToDecimals: () => tokenToDecimals,
43
42
  verifyCloudProof: () => import_backend.verifyCloudProof,
@@ -47,7 +46,6 @@ module.exports = __toCommonJS(src_exports);
47
46
 
48
47
  // helpers/siwe/siwe.ts
49
48
  var import_ethers = require("ethers");
50
- var import_crypto = require("crypto");
51
49
  var PREAMBLE = " wants you to sign in with your Ethereum account:";
52
50
  var URI_TAG = "URI: ";
53
51
  var VERSION_TAG = "Version: ";
@@ -216,13 +214,6 @@ var verifySiweMessage = async (payload, nonce, statement, requestId, userProvide
216
214
  }
217
215
  return { isValid: true, siweMessageData };
218
216
  };
219
- var generateNonce = () => {
220
- const nonce = (0, import_crypto.randomBytes)(12).toString("hex");
221
- if (!nonce || nonce.length < 8) {
222
- throw new Error("Error during nonce creation.");
223
- }
224
- return nonce;
225
- };
226
217
 
227
218
  // types/errors.ts
228
219
  var import_idkit_core = require("@worldcoin/idkit-core");
@@ -583,7 +574,6 @@ var import_backend = require("@worldcoin/idkit-core/backend");
583
574
  VerificationLevel,
584
575
  WalletAuthErrorCodes,
585
576
  WalletAuthErrorMessage,
586
- generateNonce,
587
577
  parseSiweMessage,
588
578
  tokenToDecimals,
589
579
  verifyCloudProof,
package/build/index.d.cts CHANGED
@@ -138,7 +138,6 @@ declare const verifySiweMessage: (payload: MiniAppWalletAuthSuccessPayload, nonc
138
138
  isValid: boolean;
139
139
  siweMessageData: SiweMessage;
140
140
  }>;
141
- declare const generateNonce: () => string;
142
141
 
143
142
  declare enum Command {
144
143
  Verify = "verify",
@@ -206,4 +205,4 @@ declare class MiniKit {
206
205
 
207
206
  declare const tokenToDecimals: (amount: number, token: Tokens) => number;
208
207
 
209
- export { Command, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessEventPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCode, MiniKitInstallErrorMessage, Network, type PayCommandInput, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, ResponseEvent, SAFE_CONTRACT_ABI, type SiweMessage, TokenDecimals, Tokens, VerificationErrorMessage, type VerifyCommandInput, WalletAuthErrorCodes, WalletAuthErrorMessage, generateNonce, parseSiweMessage, tokenToDecimals, verifySiweMessage };
208
+ export { Command, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessEventPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCode, MiniKitInstallErrorMessage, Network, type PayCommandInput, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, ResponseEvent, SAFE_CONTRACT_ABI, type SiweMessage, TokenDecimals, Tokens, VerificationErrorMessage, type VerifyCommandInput, WalletAuthErrorCodes, WalletAuthErrorMessage, parseSiweMessage, tokenToDecimals, verifySiweMessage };
package/build/index.d.ts CHANGED
@@ -138,7 +138,6 @@ declare const verifySiweMessage: (payload: MiniAppWalletAuthSuccessPayload, nonc
138
138
  isValid: boolean;
139
139
  siweMessageData: SiweMessage;
140
140
  }>;
141
- declare const generateNonce: () => string;
142
141
 
143
142
  declare enum Command {
144
143
  Verify = "verify",
@@ -206,4 +205,4 @@ declare class MiniKit {
206
205
 
207
206
  declare const tokenToDecimals: (amount: number, token: Tokens) => number;
208
207
 
209
- export { Command, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessEventPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCode, MiniKitInstallErrorMessage, Network, type PayCommandInput, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, ResponseEvent, SAFE_CONTRACT_ABI, type SiweMessage, TokenDecimals, Tokens, VerificationErrorMessage, type VerifyCommandInput, WalletAuthErrorCodes, WalletAuthErrorMessage, generateNonce, parseSiweMessage, tokenToDecimals, verifySiweMessage };
208
+ export { Command, type MiniAppPaymentErrorPayload, type MiniAppPaymentPayload, type MiniAppPaymentSuccessEventPayload, type MiniAppVerifyActionErrorPayload, type MiniAppVerifyActionPayload, type MiniAppVerifyActionSuccessPayload, type MiniAppWalletAuthErrorPayload, type MiniAppWalletAuthSuccessPayload, MiniKit, MiniKitInstallErrorCode, MiniKitInstallErrorMessage, Network, type PayCommandInput, PaymentErrorCodes, PaymentErrorMessage, PaymentValidationErrors, ResponseEvent, SAFE_CONTRACT_ABI, type SiweMessage, TokenDecimals, Tokens, VerificationErrorMessage, type VerifyCommandInput, WalletAuthErrorCodes, WalletAuthErrorMessage, parseSiweMessage, tokenToDecimals, verifySiweMessage };
package/build/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  // helpers/siwe/siwe.ts
2
2
  import { ethers } from "ethers";
3
- import { randomBytes } from "crypto";
4
3
  var PREAMBLE = " wants you to sign in with your Ethereum account:";
5
4
  var URI_TAG = "URI: ";
6
5
  var VERSION_TAG = "Version: ";
@@ -169,13 +168,6 @@ var verifySiweMessage = async (payload, nonce, statement, requestId, userProvide
169
168
  }
170
169
  return { isValid: true, siweMessageData };
171
170
  };
172
- var generateNonce = () => {
173
- const nonce = randomBytes(12).toString("hex");
174
- if (!nonce || nonce.length < 8) {
175
- throw new Error("Error during nonce creation.");
176
- }
177
- return nonce;
178
- };
179
171
 
180
172
  // types/errors.ts
181
173
  import { AppErrorCodes } from "@worldcoin/idkit-core";
@@ -537,7 +529,6 @@ export {
537
529
  VerificationLevel2 as VerificationLevel,
538
530
  WalletAuthErrorCodes,
539
531
  WalletAuthErrorMessage,
540
- generateNonce,
541
532
  parseSiweMessage,
542
533
  tokenToDecimals,
543
534
  verifyCloudProof,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worldcoin/minikit-js",
3
- "version": "0.0.23-internal-alpha",
3
+ "version": "0.0.25-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",
@@ -24,15 +24,8 @@
24
24
  "minikit",
25
25
  "miniapps"
26
26
  ],
27
- "scripts": {
28
- "build": "tsup",
29
- "dev": "tsup --watch",
30
- "lint": "eslint ./ --ext .ts",
31
- "prepublishOnly": "npm run build",
32
- "typecheck": "tsc --noEmit"
33
- },
34
27
  "dependencies": {
35
- "@worldcoin/idkit-core": "^1.2.0"
28
+ "@worldcoin/idkit-core": "^1.2.2"
36
29
  },
37
30
  "devDependencies": {
38
31
  "@typescript-eslint/eslint-plugin": "^7.7.0",
@@ -45,5 +38,11 @@
45
38
  },
46
39
  "peerDependencies": {
47
40
  "ethers": "^6.0.8"
41
+ },
42
+ "scripts": {
43
+ "build": "tsup",
44
+ "dev": "tsup --watch",
45
+ "lint": "eslint ./ --ext .ts",
46
+ "typecheck": "tsc --noEmit"
48
47
  }
49
- }
48
+ }