Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmtp.chat updates #871

Merged
merged 9 commits into from
Mar 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update createSigner.ts
cameronvoell authored and rygine committed Mar 13, 2025

Verified

This commit was signed with the committer’s verified signature.
rygine Ry Racherbaumer
commit 9a5a4e21fd22864726b8841dd435b00dfd479c57
12 changes: 10 additions & 2 deletions apps/xmtp.chat/src/helpers/createSigner.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,11 @@ import { privateKeyToAccount } from "viem/accounts";
export const createEphemeralSigner = (privateKey: Hex): Signer => {
const account = privateKeyToAccount(privateKey);
return {
getAddress: () => account.address,
type: "EOA",
getIdentifier: () => ({
identifier: account.address,
identifierKind: "Ethereum",
}),
signMessage: async (message: string) => {
const signature = await account.signMessage({
message,
@@ -20,7 +24,11 @@ export const createSigner = (
walletClient: WalletClient,
): Signer => {
return {
getAddress: () => address,
type: "EOA",
getIdentifier: () => ({
identifier: address,
identifierKind: "Ethereum",
}),
signMessage: async (message: string) => {
const signature = await walletClient.signMessage({
account: address,