eip-1193 0.7.3 → 0.7.4
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/index.d.ts +5 -17
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -583,26 +583,13 @@ export type EIP1193TypedData = {
|
|
|
583
583
|
};
|
|
584
584
|
|
|
585
585
|
/**
|
|
586
|
-
* The typed-data parameter of `eth_signTypedData_v3`
|
|
586
|
+
* The typed-data parameter of `eth_signTypedData`, `eth_signTypedData_v3` and `eth_signTypedData_v4`.
|
|
587
587
|
*
|
|
588
588
|
* MetaMask's canonical form is a JSON STRING (`JSON.stringify(typedData)`); other wallets and
|
|
589
589
|
* most libraries accept the object directly. Both are allowed here.
|
|
590
590
|
*/
|
|
591
591
|
export type EIP1193TypedSignatureParam = EIP1193TypedData | string;
|
|
592
592
|
|
|
593
|
-
/** A single field of the legacy V1 `eth_signTypedData` payload. */
|
|
594
|
-
export type EIP1193TypedDataV1Field = {
|
|
595
|
-
name: string;
|
|
596
|
-
type: string;
|
|
597
|
-
value: any;
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* The legacy V1 `eth_signTypedData` payload: a flat ARRAY of fields, not an EIP-712 object.
|
|
602
|
-
* Note that V1 also takes its parameters in the opposite order to v3/v4.
|
|
603
|
-
*/
|
|
604
|
-
export type EIP1193TypedDataV1 = EIP1193TypedDataV1Field[];
|
|
605
|
-
|
|
606
593
|
// ------------------------------------------------------------------------------------------------
|
|
607
594
|
// WALLET METHOD PARAMS (EIP-3085 / 3326 / 747 / 2255 / 5792)
|
|
608
595
|
// ------------------------------------------------------------------------------------------------
|
|
@@ -1013,12 +1000,13 @@ export type SignerMethods = {
|
|
|
1013
1000
|
personal_ecRecover: {params: [EIP1193DATA, EIP1193DATA]; result: EIP1193Account};
|
|
1014
1001
|
|
|
1015
1002
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1003
|
+
* Typed like v4: `[address, typedData]`. The legacy V1 payload (a flat field array, with the
|
|
1004
|
+
* parameters in the reverse order) is deliberately not modelled: nothing in use sends it, and
|
|
1005
|
+
* viem only ever sends `eth_signTypedData_v4`.
|
|
1018
1006
|
*
|
|
1019
1007
|
* @deprecated Use `eth_signTypedData_v4`.
|
|
1020
1008
|
*/
|
|
1021
|
-
eth_signTypedData: {params: [
|
|
1009
|
+
eth_signTypedData: {params: [EIP1193Account, EIP1193TypedSignatureParam]; result: EIP1193DATA};
|
|
1022
1010
|
/** @deprecated Does not handle arrays or nested structs correctly. Use `eth_signTypedData_v4`. */
|
|
1023
1011
|
eth_signTypedData_v3: {params: [EIP1193Account, EIP1193TypedSignatureParam]; result: EIP1193DATA};
|
|
1024
1012
|
eth_signTypedData_v4: {params: [EIP1193Account, EIP1193TypedSignatureParam]; result: EIP1193DATA};
|