@alchemy/aa-ethers
Advanced tools
Comparing version 0.1.0-alpha.21 to 0.1.0-alpha.22
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertWalletToAccountSigner = exports.EthersProviderAdapter = exports.AccountSigner = void 0; | ||
exports.convertWalletToAccountSigner = exports.convertEthersSignerToAccountSigner = exports.EthersProviderAdapter = exports.AccountSigner = void 0; | ||
var account_signer_js_1 = require("./account-signer.js"); | ||
@@ -9,3 +9,4 @@ Object.defineProperty(exports, "AccountSigner", { enumerable: true, get: function () { return account_signer_js_1.AccountSigner; } }); | ||
var utils_js_1 = require("./utils.js"); | ||
Object.defineProperty(exports, "convertEthersSignerToAccountSigner", { enumerable: true, get: function () { return utils_js_1.convertEthersSignerToAccountSigner; } }); | ||
Object.defineProperty(exports, "convertWalletToAccountSigner", { enumerable: true, get: function () { return utils_js_1.convertWalletToAccountSigner; } }); | ||
//# sourceMappingURL=index.js.map |
export { AccountSigner } from "./account-signer.js"; | ||
export { EthersProviderAdapter } from "./provider-adapter.js"; | ||
export { convertWalletToAccountSigner } from "./utils.js"; | ||
export { convertEthersSignerToAccountSigner, convertWalletToAccountSigner, } from "./utils.js"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertWalletToAccountSigner = exports.EthersProviderAdapter = exports.AccountSigner = void 0; | ||
exports.convertWalletToAccountSigner = exports.convertEthersSignerToAccountSigner = exports.EthersProviderAdapter = exports.AccountSigner = void 0; | ||
var account_signer_js_1 = require("./account-signer.js"); | ||
@@ -9,3 +9,4 @@ Object.defineProperty(exports, "AccountSigner", { enumerable: true, get: function () { return account_signer_js_1.AccountSigner; } }); | ||
var utils_js_1 = require("./utils.js"); | ||
Object.defineProperty(exports, "convertEthersSignerToAccountSigner", { enumerable: true, get: function () { return utils_js_1.convertEthersSignerToAccountSigner; } }); | ||
Object.defineProperty(exports, "convertWalletToAccountSigner", { enumerable: true, get: function () { return utils_js_1.convertWalletToAccountSigner; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,5 @@ | ||
import type { SimpleSmartAccountOwner } from "@alchemy/aa-core"; | ||
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
import type { Signer } from "@ethersproject/abstract-signer"; | ||
import { Wallet } from "@ethersproject/wallet"; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SimpleSmartAccountOwner; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SmartAccountSigner; | ||
export declare const convertEthersSignerToAccountSigner: (signer: Signer) => SmartAccountSigner; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertWalletToAccountSigner = void 0; | ||
exports.convertEthersSignerToAccountSigner = exports.convertWalletToAccountSigner = void 0; | ||
const convertWalletToAccountSigner = (wallet) => { | ||
@@ -14,2 +14,12 @@ return { | ||
exports.convertWalletToAccountSigner = convertWalletToAccountSigner; | ||
const convertEthersSignerToAccountSigner = (signer) => { | ||
return { | ||
getAddress: async () => signer.getAddress(), | ||
signMessage: async (msg) => (await signer.signMessage(msg)), | ||
signTypedData: async (_params) => { | ||
throw new Error("signTypedData is not supported for ethers signers; use Wallet"); | ||
}, | ||
}; | ||
}; | ||
exports.convertEthersSignerToAccountSigner = convertEthersSignerToAccountSigner; | ||
//# sourceMappingURL=utils.js.map |
export { AccountSigner } from "./account-signer.js"; | ||
export { EthersProviderAdapter } from "./provider-adapter.js"; | ||
export { convertWalletToAccountSigner } from "./utils.js"; | ||
export { convertEthersSignerToAccountSigner, convertWalletToAccountSigner, } from "./utils.js"; |
export { AccountSigner } from "./account-signer.js"; | ||
export { EthersProviderAdapter } from "./provider-adapter.js"; | ||
export { convertWalletToAccountSigner } from "./utils.js"; | ||
export { convertEthersSignerToAccountSigner, convertWalletToAccountSigner, } from "./utils.js"; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,5 @@ | ||
import type { SimpleSmartAccountOwner } from "@alchemy/aa-core"; | ||
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
import type { Signer } from "@ethersproject/abstract-signer"; | ||
import { Wallet } from "@ethersproject/wallet"; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SimpleSmartAccountOwner; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SmartAccountSigner; | ||
export declare const convertEthersSignerToAccountSigner: (signer: Signer) => SmartAccountSigner; |
@@ -11,2 +11,11 @@ import { Wallet } from "@ethersproject/wallet"; | ||
}; | ||
export const convertEthersSignerToAccountSigner = (signer) => { | ||
return { | ||
getAddress: async () => signer.getAddress(), | ||
signMessage: async (msg) => (await signer.signMessage(msg)), | ||
signTypedData: async (_params) => { | ||
throw new Error("signTypedData is not supported for ethers signers; use Wallet"); | ||
}, | ||
}; | ||
}; | ||
//# sourceMappingURL=utils.js.map |
export { AccountSigner } from "./account-signer.js"; | ||
export { EthersProviderAdapter } from "./provider-adapter.js"; | ||
export { convertWalletToAccountSigner } from "./utils.js"; | ||
export { convertEthersSignerToAccountSigner, convertWalletToAccountSigner, } from "./utils.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,4 +0,6 @@ | ||
import type { SimpleSmartAccountOwner } from "@alchemy/aa-core"; | ||
import type { SmartAccountSigner } from "@alchemy/aa-core"; | ||
import type { Signer } from "@ethersproject/abstract-signer"; | ||
import { Wallet } from "@ethersproject/wallet"; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SimpleSmartAccountOwner; | ||
export declare const convertWalletToAccountSigner: (wallet: Wallet) => SmartAccountSigner; | ||
export declare const convertEthersSignerToAccountSigner: (signer: Signer) => SmartAccountSigner; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@alchemy/aa-ethers", | ||
"license": "MIT", | ||
"version": "0.1.0-alpha.21", | ||
"version": "0.1.0-alpha.22", | ||
"description": "Ethers.js wrapper for @alchemy/aa-core", | ||
@@ -45,3 +45,3 @@ "author": "Alchemy", | ||
"devDependencies": { | ||
"@alchemy/aa-core": "^0.1.0-alpha.21", | ||
"@alchemy/aa-core": "^0.1.0-alpha.22", | ||
"alchemy-sdk": "^2.8.3", | ||
@@ -74,3 +74,3 @@ "dotenv": "^16.0.3", | ||
}, | ||
"gitHead": "1561d7f815ddb22a80e73a7c75640ffda04ccdf8" | ||
"gitHead": "cdb0f012e4de46cd18dd018f5e9ca1b400fe18ab" | ||
} |
export { AccountSigner } from "./account-signer.js"; | ||
export { EthersProviderAdapter } from "./provider-adapter.js"; | ||
export { convertWalletToAccountSigner } from "./utils.js"; | ||
export { | ||
convertEthersSignerToAccountSigner, | ||
convertWalletToAccountSigner, | ||
} from "./utils.js"; |
@@ -1,2 +0,3 @@ | ||
import type { SimpleSmartAccountOwner } from "@alchemy/aa-core"; | ||
import type { Address, SmartAccountSigner } from "@alchemy/aa-core"; | ||
import type { Signer } from "@ethersproject/abstract-signer"; | ||
import { Wallet } from "@ethersproject/wallet"; | ||
@@ -7,3 +8,3 @@ import type { SignTypedDataParameters } from "viem/accounts"; | ||
wallet: Wallet | ||
): SimpleSmartAccountOwner => { | ||
): SmartAccountSigner => { | ||
return { | ||
@@ -25,1 +26,18 @@ getAddress: async () => Promise.resolve(wallet.address as `0x${string}`), | ||
}; | ||
export const convertEthersSignerToAccountSigner = ( | ||
signer: Signer | ||
): SmartAccountSigner => { | ||
return { | ||
getAddress: async () => signer.getAddress() as Promise<Address>, | ||
signMessage: async (msg: Uint8Array | string) => | ||
(await signer.signMessage(msg)) as `0x${string}`, | ||
signTypedData: async ( | ||
_params: Omit<SignTypedDataParameters, "privateKey"> | ||
) => { | ||
throw new Error( | ||
"signTypedData is not supported for ethers signers; use Wallet" | ||
); | ||
}, | ||
}; | ||
}; |
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
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
71910
856