@worldcoin/minikit-js 1.10.0 → 1.11.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.
|
@@ -899,6 +899,9 @@ var SignTypedDataErrorMessage = {
|
|
|
899
899
|
};
|
|
900
900
|
function createSignTypedDataCommand(_ctx) {
|
|
901
901
|
return (payload) => {
|
|
902
|
+
console.warn(
|
|
903
|
+
"signTypedData is deprecated. Use signMessage or sendTransaction instead."
|
|
904
|
+
);
|
|
902
905
|
if (typeof window === "undefined" || !isCommandAvailable("sign-typed-data" /* SignTypedData */)) {
|
|
903
906
|
console.error(
|
|
904
907
|
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
|
|
@@ -1395,6 +1398,7 @@ function createCommands(ctx) {
|
|
|
1395
1398
|
walletAuth: createWalletAuthCommand(ctx),
|
|
1396
1399
|
sendTransaction: createSendTransactionCommand(ctx),
|
|
1397
1400
|
signMessage: createSignMessageCommand(ctx),
|
|
1401
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
1398
1402
|
signTypedData: createSignTypedDataCommand(ctx),
|
|
1399
1403
|
shareContacts: createShareContactsCommand(ctx),
|
|
1400
1404
|
requestPermission: createRequestPermissionCommand(ctx),
|
|
@@ -1416,6 +1420,7 @@ function createAsyncCommands(ctx, commands) {
|
|
|
1416
1420
|
commands.sendTransaction
|
|
1417
1421
|
),
|
|
1418
1422
|
signMessage: createSignMessageAsyncCommand(ctx, commands.signMessage),
|
|
1423
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
1419
1424
|
signTypedData: createSignTypedDataAsyncCommand(ctx, commands.signTypedData),
|
|
1420
1425
|
shareContacts: createShareContactsAsyncCommand(ctx, commands.shareContacts),
|
|
1421
1426
|
requestPermission: createRequestPermissionAsyncCommand(
|
package/build/index.cjs
CHANGED
|
@@ -1000,6 +1000,9 @@ var SignTypedDataErrorMessage = {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
function createSignTypedDataCommand(_ctx) {
|
|
1002
1002
|
return (payload) => {
|
|
1003
|
+
console.warn(
|
|
1004
|
+
"signTypedData is deprecated. Use signMessage or sendTransaction instead."
|
|
1005
|
+
);
|
|
1003
1006
|
if (typeof window === "undefined" || !isCommandAvailable("sign-typed-data" /* SignTypedData */)) {
|
|
1004
1007
|
console.error(
|
|
1005
1008
|
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
|
|
@@ -1490,6 +1493,7 @@ function createCommands(ctx) {
|
|
|
1490
1493
|
walletAuth: createWalletAuthCommand(ctx),
|
|
1491
1494
|
sendTransaction: createSendTransactionCommand(ctx),
|
|
1492
1495
|
signMessage: createSignMessageCommand(ctx),
|
|
1496
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
1493
1497
|
signTypedData: createSignTypedDataCommand(ctx),
|
|
1494
1498
|
shareContacts: createShareContactsCommand(ctx),
|
|
1495
1499
|
requestPermission: createRequestPermissionCommand(ctx),
|
|
@@ -1511,6 +1515,7 @@ function createAsyncCommands(ctx, commands) {
|
|
|
1511
1515
|
commands.sendTransaction
|
|
1512
1516
|
),
|
|
1513
1517
|
signMessage: createSignMessageAsyncCommand(ctx, commands.signMessage),
|
|
1518
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
1514
1519
|
signTypedData: createSignTypedDataAsyncCommand(ctx, commands.signTypedData),
|
|
1515
1520
|
shareContacts: createShareContactsAsyncCommand(ctx, commands.shareContacts),
|
|
1516
1521
|
requestPermission: createRequestPermissionAsyncCommand(
|
package/build/index.d.cts
CHANGED
|
@@ -357,6 +357,7 @@ type MiniAppShareContactsPayload = MiniAppShareContactsSuccessPayload | MiniAppS
|
|
|
357
357
|
declare function createShareContactsCommand(_ctx: CommandContext): (payload: ShareContactsPayload) => ShareContactsPayload | null;
|
|
358
358
|
declare function createShareContactsAsyncCommand(ctx: CommandContext, syncCommand: ReturnType<typeof createShareContactsCommand>): (payload: ShareContactsPayload) => AsyncHandlerReturn<ShareContactsPayload | null, MiniAppShareContactsPayload>;
|
|
359
359
|
|
|
360
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
360
361
|
type SignTypedDataInput = {
|
|
361
362
|
types: TypedData;
|
|
362
363
|
primaryType: string;
|
|
@@ -364,7 +365,9 @@ type SignTypedDataInput = {
|
|
|
364
365
|
domain?: TypedDataDomain;
|
|
365
366
|
chainId?: number;
|
|
366
367
|
};
|
|
368
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
367
369
|
type SignTypedDataPayload = SignTypedDataInput;
|
|
370
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
368
371
|
declare enum SignTypedDataErrorCodes {
|
|
369
372
|
InvalidOperation = "invalid_operation",
|
|
370
373
|
UserRejected = "user_rejected",
|
|
@@ -375,6 +378,7 @@ declare enum SignTypedDataErrorCodes {
|
|
|
375
378
|
InvalidContract = "invalid_contract",
|
|
376
379
|
MaliciousOperation = "malicious_operation"
|
|
377
380
|
}
|
|
381
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
378
382
|
declare const SignTypedDataErrorMessage: {
|
|
379
383
|
invalid_operation: string;
|
|
380
384
|
user_rejected: string;
|
|
@@ -385,13 +389,16 @@ declare const SignTypedDataErrorMessage: {
|
|
|
385
389
|
invalid_contract: string;
|
|
386
390
|
malicious_operation: string;
|
|
387
391
|
};
|
|
392
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
388
393
|
type MiniAppSignTypedDataSuccessPayload = MiniAppBaseSuccessPayload & {
|
|
389
394
|
signature: string;
|
|
390
395
|
address: string;
|
|
391
396
|
};
|
|
397
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
392
398
|
type MiniAppSignTypedDataErrorPayload = MiniAppBaseErrorPayload<SignTypedDataErrorCodes> & {
|
|
393
399
|
details?: Record<string, any>;
|
|
394
400
|
};
|
|
401
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
395
402
|
type MiniAppSignTypedDataPayload = MiniAppSignTypedDataSuccessPayload | MiniAppSignTypedDataErrorPayload;
|
|
396
403
|
declare function createSignTypedDataCommand(_ctx: CommandContext): (payload: SignTypedDataInput) => SignTypedDataPayload | null;
|
|
397
404
|
declare function createSignTypedDataAsyncCommand(ctx: CommandContext, syncCommand: ReturnType<typeof createSignTypedDataCommand>): (payload: SignTypedDataInput) => AsyncHandlerReturn<SignTypedDataPayload | null, MiniAppSignTypedDataPayload>;
|
|
@@ -592,6 +599,7 @@ declare function createCommands(ctx: CommandContext): {
|
|
|
592
599
|
walletAuth: (payload: WalletAuthInput) => WalletAuthPayload | null;
|
|
593
600
|
sendTransaction: (payload: SendTransactionInput) => SendTransactionPayload | null;
|
|
594
601
|
signMessage: (payload: SignMessageInput) => SignMessagePayload | null;
|
|
602
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
595
603
|
signTypedData: (payload: SignTypedDataInput) => SignTypedDataPayload | null;
|
|
596
604
|
shareContacts: (payload: ShareContactsPayload) => ShareContactsPayload | null;
|
|
597
605
|
requestPermission: (payload: RequestPermissionInput) => RequestPermissionPayload | null;
|
|
@@ -609,6 +617,7 @@ declare function createAsyncCommands(ctx: CommandContext, commands: Commands): {
|
|
|
609
617
|
walletAuth: (payload: WalletAuthInput) => AsyncHandlerReturn<WalletAuthPayload | null, MiniAppWalletAuthPayload>;
|
|
610
618
|
sendTransaction: (payload: SendTransactionInput) => AsyncHandlerReturn<SendTransactionPayload | null, MiniAppSendTransactionPayload>;
|
|
611
619
|
signMessage: (payload: SignMessageInput) => AsyncHandlerReturn<SignMessagePayload | null, MiniAppSignMessagePayload>;
|
|
620
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
612
621
|
signTypedData: (payload: SignTypedDataInput) => AsyncHandlerReturn<SignTypedDataPayload | null, MiniAppSignTypedDataPayload>;
|
|
613
622
|
shareContacts: (payload: ShareContactsPayload) => AsyncHandlerReturn<ShareContactsPayload | null, MiniAppShareContactsPayload>;
|
|
614
623
|
requestPermission: (payload: RequestPermissionInput) => AsyncHandlerReturn<RequestPermissionPayload | null, MiniAppRequestPermissionPayload>;
|
package/build/index.d.ts
CHANGED
|
@@ -357,6 +357,7 @@ type MiniAppShareContactsPayload = MiniAppShareContactsSuccessPayload | MiniAppS
|
|
|
357
357
|
declare function createShareContactsCommand(_ctx: CommandContext): (payload: ShareContactsPayload) => ShareContactsPayload | null;
|
|
358
358
|
declare function createShareContactsAsyncCommand(ctx: CommandContext, syncCommand: ReturnType<typeof createShareContactsCommand>): (payload: ShareContactsPayload) => AsyncHandlerReturn<ShareContactsPayload | null, MiniAppShareContactsPayload>;
|
|
359
359
|
|
|
360
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
360
361
|
type SignTypedDataInput = {
|
|
361
362
|
types: TypedData;
|
|
362
363
|
primaryType: string;
|
|
@@ -364,7 +365,9 @@ type SignTypedDataInput = {
|
|
|
364
365
|
domain?: TypedDataDomain;
|
|
365
366
|
chainId?: number;
|
|
366
367
|
};
|
|
368
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
367
369
|
type SignTypedDataPayload = SignTypedDataInput;
|
|
370
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
368
371
|
declare enum SignTypedDataErrorCodes {
|
|
369
372
|
InvalidOperation = "invalid_operation",
|
|
370
373
|
UserRejected = "user_rejected",
|
|
@@ -375,6 +378,7 @@ declare enum SignTypedDataErrorCodes {
|
|
|
375
378
|
InvalidContract = "invalid_contract",
|
|
376
379
|
MaliciousOperation = "malicious_operation"
|
|
377
380
|
}
|
|
381
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
378
382
|
declare const SignTypedDataErrorMessage: {
|
|
379
383
|
invalid_operation: string;
|
|
380
384
|
user_rejected: string;
|
|
@@ -385,13 +389,16 @@ declare const SignTypedDataErrorMessage: {
|
|
|
385
389
|
invalid_contract: string;
|
|
386
390
|
malicious_operation: string;
|
|
387
391
|
};
|
|
392
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
388
393
|
type MiniAppSignTypedDataSuccessPayload = MiniAppBaseSuccessPayload & {
|
|
389
394
|
signature: string;
|
|
390
395
|
address: string;
|
|
391
396
|
};
|
|
397
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
392
398
|
type MiniAppSignTypedDataErrorPayload = MiniAppBaseErrorPayload<SignTypedDataErrorCodes> & {
|
|
393
399
|
details?: Record<string, any>;
|
|
394
400
|
};
|
|
401
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
395
402
|
type MiniAppSignTypedDataPayload = MiniAppSignTypedDataSuccessPayload | MiniAppSignTypedDataErrorPayload;
|
|
396
403
|
declare function createSignTypedDataCommand(_ctx: CommandContext): (payload: SignTypedDataInput) => SignTypedDataPayload | null;
|
|
397
404
|
declare function createSignTypedDataAsyncCommand(ctx: CommandContext, syncCommand: ReturnType<typeof createSignTypedDataCommand>): (payload: SignTypedDataInput) => AsyncHandlerReturn<SignTypedDataPayload | null, MiniAppSignTypedDataPayload>;
|
|
@@ -592,6 +599,7 @@ declare function createCommands(ctx: CommandContext): {
|
|
|
592
599
|
walletAuth: (payload: WalletAuthInput) => WalletAuthPayload | null;
|
|
593
600
|
sendTransaction: (payload: SendTransactionInput) => SendTransactionPayload | null;
|
|
594
601
|
signMessage: (payload: SignMessageInput) => SignMessagePayload | null;
|
|
602
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
595
603
|
signTypedData: (payload: SignTypedDataInput) => SignTypedDataPayload | null;
|
|
596
604
|
shareContacts: (payload: ShareContactsPayload) => ShareContactsPayload | null;
|
|
597
605
|
requestPermission: (payload: RequestPermissionInput) => RequestPermissionPayload | null;
|
|
@@ -609,6 +617,7 @@ declare function createAsyncCommands(ctx: CommandContext, commands: Commands): {
|
|
|
609
617
|
walletAuth: (payload: WalletAuthInput) => AsyncHandlerReturn<WalletAuthPayload | null, MiniAppWalletAuthPayload>;
|
|
610
618
|
sendTransaction: (payload: SendTransactionInput) => AsyncHandlerReturn<SendTransactionPayload | null, MiniAppSendTransactionPayload>;
|
|
611
619
|
signMessage: (payload: SignMessageInput) => AsyncHandlerReturn<SignMessagePayload | null, MiniAppSignMessagePayload>;
|
|
620
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
612
621
|
signTypedData: (payload: SignTypedDataInput) => AsyncHandlerReturn<SignTypedDataPayload | null, MiniAppSignTypedDataPayload>;
|
|
613
622
|
shareContacts: (payload: ShareContactsPayload) => AsyncHandlerReturn<ShareContactsPayload | null, MiniAppShareContactsPayload>;
|
|
614
623
|
requestPermission: (payload: RequestPermissionInput) => AsyncHandlerReturn<RequestPermissionPayload | null, MiniAppRequestPermissionPayload>;
|
package/build/index.js
CHANGED
|
@@ -697,6 +697,9 @@ function createSignMessageAsyncCommand(ctx, syncCommand) {
|
|
|
697
697
|
// commands/sign-typed-data.ts
|
|
698
698
|
function createSignTypedDataCommand(_ctx) {
|
|
699
699
|
return (payload) => {
|
|
700
|
+
console.warn(
|
|
701
|
+
"signTypedData is deprecated. Use signMessage or sendTransaction instead."
|
|
702
|
+
);
|
|
700
703
|
if (typeof window === "undefined" || !isCommandAvailable("sign-typed-data" /* SignTypedData */)) {
|
|
701
704
|
console.error(
|
|
702
705
|
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
|
|
@@ -962,6 +965,7 @@ function createCommands(ctx) {
|
|
|
962
965
|
walletAuth: createWalletAuthCommand(ctx),
|
|
963
966
|
sendTransaction: createSendTransactionCommand(ctx),
|
|
964
967
|
signMessage: createSignMessageCommand(ctx),
|
|
968
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
965
969
|
signTypedData: createSignTypedDataCommand(ctx),
|
|
966
970
|
shareContacts: createShareContactsCommand(ctx),
|
|
967
971
|
requestPermission: createRequestPermissionCommand(ctx),
|
|
@@ -983,6 +987,7 @@ function createAsyncCommands(ctx, commands) {
|
|
|
983
987
|
commands.sendTransaction
|
|
984
988
|
),
|
|
985
989
|
signMessage: createSignMessageAsyncCommand(ctx, commands.signMessage),
|
|
990
|
+
/** @deprecated EIP-712 typed data signing is deprecated. Use signMessage or sendTransaction instead. */
|
|
986
991
|
signTypedData: createSignTypedDataAsyncCommand(ctx, commands.signTypedData),
|
|
987
992
|
shareContacts: createShareContactsAsyncCommand(ctx, commands.shareContacts),
|
|
988
993
|
requestPermission: createRequestPermissionAsyncCommand(
|