feat: add signMessage utility with multi-chain support - #34
Conversation
Hi @0binna-oss , this looks good! But can you follow the same pattern as the existing method? Please put the sign for Solana in |
|
Good day @iamnotstatic , will look into it as soon as possible. |
|
Good day @iamnotstatic , I've restructured the code as requested. Please review |
| } | ||
| ``` | ||
|
|
||
| ### Signing Message |
There was a problem hiding this comment.
Hi @0binna-oss, this readme is not following the existing structure Can you update it ?
| const solanaSignature = await signMessage("hello", solanaKey, "solana"); | ||
|
|
||
|
|
||
| ### Updated Implementation |
There was a problem hiding this comment.
i beleive this was suppose to be a commit message not for the documentation
| import { ethers } from "ethers"; | ||
| import { Keypair } from "@solana/web3.js"; | ||
|
|
||
| export async function signMessage(message, privateKey, chainType = "evm") { |
There was a problem hiding this comment.
We don't need this, it should reference the src/services/wallet/index.ts just like every other function
| @@ -0,0 +1,21 @@ | |||
| import { signEvmMessage } from "../src/common/helpers/ethereumHelper"; | |||
There was a problem hiding this comment.
Let the test be directly in the dedicated test file for everything chain
wallet.ethereum.test.ts
wallet.solana.test.ts
Thanks for the update @0binna-oss, dropped some comments |
|
Good day @iamnotstatic, made updates as requested. |
Description
Adds a
signMessageutility to sign messages with a private key (EVM supported) .Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change/Updated Implementation:
ethereumHelper.tsandsolanaHelper.tsas requestedsignMessage.tsChecklist:
npm run testand my test cases cover all the lines and branches of the added code.npm run buildwith success.