@exodus/web3-ethereum-utils 1.0.0 → 1.1.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.
- package/lib/signatures.d.ts +2 -2
- package/lib/types.d.ts +21 -1
- package/package.json +2 -2
package/lib/signatures.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { MessageTypes, SignTypedDataVersion, TypedDataV1, TypedMessage } from '@metamask/eth-sig-util';
|
|
3
|
-
import {
|
|
3
|
+
import { EthTransactionParams } from './types.js';
|
|
4
4
|
export declare function signMessage(message: string, privateKey: Buffer): string;
|
|
5
5
|
export declare function signTypedData(typedData: TypedDataV1 | TypedMessage<MessageTypes>, privateKey: Buffer, version?: SignTypedDataVersion): string;
|
|
6
|
-
export declare function signTransaction(transactionParams:
|
|
6
|
+
export declare function signTransaction(transactionParams: EthTransactionParams, privateKey: Buffer): string;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface EthSwitchEthereumChainParam {
|
|
2
|
+
chainId: string;
|
|
3
|
+
}
|
|
4
|
+
export interface EthTransactionParams {
|
|
2
5
|
chainId: string;
|
|
3
6
|
from: string;
|
|
4
7
|
to?: string;
|
|
@@ -10,3 +13,20 @@ export interface TransactionParams {
|
|
|
10
13
|
maxPriorityFeePerGas?: string;
|
|
11
14
|
maxFeePerGas?: string;
|
|
12
15
|
}
|
|
16
|
+
export interface EthTransaction {
|
|
17
|
+
chainId?: string;
|
|
18
|
+
from: string;
|
|
19
|
+
to?: string;
|
|
20
|
+
gas?: string;
|
|
21
|
+
gasPrice?: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
data: string;
|
|
24
|
+
nonce?: string;
|
|
25
|
+
maxPriorityFeePerGas?: string;
|
|
26
|
+
maxFeePerGas?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare type EthTransactionHash = string;
|
|
29
|
+
export declare type EthParentCapability = 'eth_accounts';
|
|
30
|
+
export interface EthWalletPermission {
|
|
31
|
+
parentCapability: EthParentCapability;
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/web3-ethereum-utils",
|
|
3
3
|
"description": "Web3 Ethereum utils.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@exodus/ethereumjs-tx": "^3.3.0-exodus.6",
|
|
31
31
|
"@metamask/eth-sig-util": "^4.0.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "bf86bb48d4f63d3ce63c6f17d9fa5bb3bc12034e"
|
|
34
34
|
}
|