@alchemy/aa-ethers
Advanced tools
Comparing version 0.1.0-alpha.19 to 0.1.0-alpha.20
@@ -8,2 +8,5 @@ "use strict"; | ||
signMessage: async (msg) => (await wallet.signMessage(msg)), | ||
signTypedData: async (params) => { | ||
return (await wallet._signTypedData(params.domain ?? {}, params.types, params.message)); | ||
}, | ||
}; | ||
@@ -10,0 +13,0 @@ }; |
@@ -6,4 +6,7 @@ import { Wallet } from "@ethersproject/wallet"; | ||
signMessage: async (msg) => (await wallet.signMessage(msg)), | ||
signTypedData: async (params) => { | ||
return (await wallet._signTypedData(params.domain ?? {}, params.types, params.message)); | ||
}, | ||
}; | ||
}; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@alchemy/aa-ethers", | ||
"license": "MIT", | ||
"version": "0.1.0-alpha.19", | ||
"version": "0.1.0-alpha.20", | ||
"description": "Ethers.js wrapper for @alchemy/aa-core", | ||
@@ -45,3 +45,3 @@ "author": "Alchemy", | ||
"devDependencies": { | ||
"@alchemy/aa-core": "^0.1.0-alpha.19", | ||
"@alchemy/aa-core": "^0.1.0-alpha.20", | ||
"alchemy-sdk": "^2.8.3", | ||
@@ -64,3 +64,4 @@ "dotenv": "^16.0.3", | ||
"@ethersproject/providers": "^5.7.2", | ||
"@ethersproject/wallet": "^5.7.0" | ||
"@ethersproject/wallet": "^5.7.0", | ||
"viem": "^1.5.3" | ||
}, | ||
@@ -74,3 +75,3 @@ "repository": { | ||
}, | ||
"gitHead": "721d3969174175f2549fa1cb5e56472590f2e68c" | ||
"gitHead": "f3592acfa87dca8f446957e30aeb628d2c8d75b8" | ||
} |
import type { SimpleSmartAccountOwner } from "@alchemy/aa-core"; | ||
import { Wallet } from "@ethersproject/wallet"; | ||
import type { SignTypedDataParameters } from "viem/accounts"; | ||
@@ -11,3 +12,13 @@ export const convertWalletToAccountSigner = ( | ||
(await wallet.signMessage(msg)) as `0x${string}`, | ||
signTypedData: async ( | ||
params: Omit<SignTypedDataParameters, "privateKey"> | ||
) => { | ||
return (await wallet._signTypedData( | ||
params.domain ?? {}, | ||
// @ts-expect-error: these params should line up due to the spec for this function | ||
params.types, | ||
params.message | ||
)) as `0x${string}`; | ||
}, | ||
}; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
67353
809
10
+ Addedviem@^1.5.3