eth-provider-types
Advanced tools
Comparing version 0.1.0 to 0.2.0-next.0
# eth-provider-types | ||
## 0.2.0-next.0 | ||
### Minor Changes | ||
- [#350](https://github.com/BitskiCo/bitski-js/pull/350) [`65de42b`](https://github.com/BitskiCo/bitski-js/commit/65de42be31f3c1da983637b760f927a3c22bc319) Thanks [@chronicIntrovert](https://github.com/chronicIntrovert)! - Add user operation methods as defined by ERC-4337 | ||
## 0.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -7,2 +7,3 @@ /** | ||
export declare enum EthMethod { | ||
alchemy_requestPaymasterAndData = "alchemy_requestPaymasterAndData", | ||
web3_clientVersion = "web3_clientVersion", | ||
@@ -65,2 +66,7 @@ web3_sha3 = "web3_sha3", | ||
eth_unsubscribe = "eth_unsubscribe", | ||
eth_estimateUserOperationGas = "eth_estimateUserOperationGas", | ||
eth_getUserOperationByHash = "eth_getUserOperationByHash", | ||
eth_getUserOperationReceipt = "eth_getUserOperationReceipt", | ||
eth_supportedEntryPoints = "eth_supportedEntryPoints", | ||
eth_sendUserOperation = "eth_sendUserOperation", | ||
wallet_addEthereumChain = "wallet_addEthereumChain", | ||
@@ -244,2 +250,28 @@ wallet_switchEthereumChain = "wallet_switchEthereumChain", | ||
} | ||
export interface UserOperation { | ||
sender: string; | ||
nonce: string; | ||
initCode?: string; | ||
callData: string; | ||
callGasLimit?: string; | ||
verificationGasLimit?: string; | ||
preVerificationGasLimit?: string; | ||
maxFeePerGas: string; | ||
maxPriorityFeePerGas: string; | ||
paymasterAndData?: string; | ||
signature?: string; | ||
} | ||
export interface UserOperationReceipt { | ||
userOpHash: string; | ||
entryPoint: string; | ||
sender: string; | ||
nonce: string; | ||
paymaster: string; | ||
actualGasCost: string; | ||
actualGasUsed: string; | ||
success: boolean; | ||
reason: string; | ||
logs: EthLog[]; | ||
receipt: EthTransactionReceipt; | ||
} | ||
export interface RequestedPermissions { | ||
@@ -249,2 +281,7 @@ [methodName: string]: {}; | ||
export declare type EthMethodParams = { | ||
[EthMethod.alchemy_requestPaymasterAndData]: [ | ||
policyId: string, | ||
entrypointAddress: string, | ||
userOperation: UserOperation | ||
]; | ||
[EthMethod.web3_clientVersion]: void; | ||
@@ -344,4 +381,13 @@ [EthMethod.web3_sha3]: void; | ||
[EthMethod.wallet_requestPermissions]: RequestedPermissions[]; | ||
[EthMethod.eth_estimateUserOperationGas]: [ | ||
userOperations: UserOperation[], | ||
entrypointAddress: string | ||
]; | ||
[EthMethod.eth_getUserOperationByHash]: [hash: string]; | ||
[EthMethod.eth_getUserOperationReceipt]: [hash: string]; | ||
[EthMethod.eth_supportedEntryPoints]: void; | ||
[EthMethod.eth_sendUserOperation]: [userOperations: UserOperation[], entrypointAddress: string]; | ||
}; | ||
export declare type EthMethodResults = { | ||
[EthMethod.alchemy_requestPaymasterAndData]: string; | ||
[EthMethod.web3_clientVersion]: string; | ||
@@ -435,2 +481,16 @@ [EthMethod.web3_sha3]: string; | ||
[EthMethod.wallet_requestPermissions]: Web3WalletPermission[]; | ||
[EthMethod.eth_estimateUserOperationGas]: [ | ||
preVerificationGas: string, | ||
verificationGasLimit: string, | ||
callGasLimit: string | ||
]; | ||
[EthMethod.eth_getUserOperationByHash]: (UserOperation & { | ||
entryPoint: string; | ||
blockNumber: string; | ||
blockHash: string; | ||
transactionHash: string; | ||
}) | null; | ||
[EthMethod.eth_getUserOperationReceipt]: UserOperation | null; | ||
[EthMethod.eth_supportedEntryPoints]: string[]; | ||
[EthMethod.eth_sendUserOperation]: string; | ||
}; | ||
@@ -437,0 +497,0 @@ /***** RPC Errors *****/ |
@@ -11,2 +11,3 @@ "use strict"; | ||
(function (EthMethod) { | ||
EthMethod["alchemy_requestPaymasterAndData"] = "alchemy_requestPaymasterAndData"; | ||
EthMethod["web3_clientVersion"] = "web3_clientVersion"; | ||
@@ -69,2 +70,7 @@ EthMethod["web3_sha3"] = "web3_sha3"; | ||
EthMethod["eth_unsubscribe"] = "eth_unsubscribe"; | ||
EthMethod["eth_estimateUserOperationGas"] = "eth_estimateUserOperationGas"; | ||
EthMethod["eth_getUserOperationByHash"] = "eth_getUserOperationByHash"; | ||
EthMethod["eth_getUserOperationReceipt"] = "eth_getUserOperationReceipt"; | ||
EthMethod["eth_supportedEntryPoints"] = "eth_supportedEntryPoints"; | ||
EthMethod["eth_sendUserOperation"] = "eth_sendUserOperation"; | ||
EthMethod["wallet_addEthereumChain"] = "wallet_addEthereumChain"; | ||
@@ -71,0 +77,0 @@ EthMethod["wallet_switchEthereumChain"] = "wallet_switchEthereumChain"; |
{ | ||
"name": "eth-provider-types", | ||
"version": "0.1.0", | ||
"version": "0.2.0-next.0", | ||
"description": "TypeScript types for Ethereum providers, with types for every RPC method", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37895
667