Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethereumjs-tx-keyvault

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereumjs-tx-keyvault - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

readme.md

36

index.js

@@ -17,3 +17,3 @@ "use strict"

var makeCanonical = function(buffer) {
var makeCanonical = function (buffer) {
var r = new BN(buffer.slice(0, 32))

@@ -25,13 +25,5 @@ var s = new BN(buffer.slice(32, 64))

}
return Buffer.concat([ r.toBuffer(), s.toBuffer() ])
return Buffer.concat([r.toBuffer(), s.toBuffer()])
}
const txParams = {
nonce: '0x34f', // Replace by nonce for your account on geth node
gasPrice: '0x09184e72a000',
gasLimit: '0x27100',
to: '0x0d8e50b8849f59f25078bb9e2d9014b9a540dcab',
value: '0xde0b6b3a7640000'
};
var Extensions = function () {

@@ -41,11 +33,11 @@ function Extensions() {

/**
* Signs a transaction using azure key vault
* @param {EthereumTx} tx the transaction object to sign
* @param {KeyVault.KeyVaultClient} client the key vault client object
* @param {String} vaultUri the vault URI
* @param {String} keyName the name of the EC key
* @param {String} keyVersion the version of the key
* @return {Buffer} the signed transaction object
*/
/**
* Signs a transaction using azure key vault
* @param {EthereumTx} tx the transaction object to sign
* @param {KeyVault.KeyVaultClient} client the key vault client object
* @param {String} vaultUri the vault URI
* @param {String} keyName the name of the EC key
* @param {String} keyVersion the version of the key
* @return {Buffer} the signed transaction object
*/
Extensions.prototype.sign = function (tx, client, vaultUri, keyName, keyVersion) {

@@ -68,7 +60,7 @@ assert.equal(true, tx instanceof EthereumTx, "Transaction must be of type 'require(\"ethereumjs-tx\")'")

}
const pubKey = Buffer.concat([ Uint8Array.from([4]), getKeyBundle.key.x, getKeyBundle.key.y])
const pubKey = Buffer.concat([Uint8Array.from([4]), getKeyBundle.key.x, getKeyBundle.key.y])
const sig = makeCanonical(Buffer.from(signature.result))
var sigObj = {
r: sig.slice(0, 32),
var sigObj = {
r: sig.slice(0, 32),
s: sig.slice(32, 64)

@@ -75,0 +67,0 @@ }

{
"name": "ethereumjs-tx-keyvault",
"version": "1.0.1",
"version": "1.0.2",
"description": "Azure Key Vault extensions for ethereumjs-tx",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc