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

updating sign transaction function #29

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

Husienvora
Copy link
Member

Updated SignTransaction function to

async signTransaction(rawTx, privateKey) {
    const tx = new Tx(rawTx);

    const pkey = Buffer.from(privateKey, "hex");

    tx.sign(pkey);

    const signedTx = `0x${tx.serialize().toString("hex")}`;

    return signedTx;
  }

@Husienvora Husienvora requested a review from sshubhamagg August 20, 2024 07:02
@Husienvora Husienvora self-assigned this Aug 20, 2024
@Husienvora Husienvora linked an issue Aug 20, 2024 that may be closed by this pull request
@sshubhamagg sshubhamagg merged commit 7040b10 into dev Aug 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update sign transaction method
2 participants