Socket
Socket
Sign inDemoInstall

@ganache/ethereum-transaction

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ganache/ethereum-transaction - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

9

lib/src/eip1559-fee-market-transaction.js

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

this.type = utils_1.Quantity.from("0x2");
this.yParity = utils_1.Quantity.from("0x0");
if (Array.isArray(data)) {

@@ -31,3 +32,3 @@ this.chainId = utils_1.Quantity.from(data[0]);

this.accessListDataFee = accessListData.dataFeeEIP2930;
this.v = utils_1.Quantity.from(data[9]);
this.yParity = this.v = utils_1.Quantity.from(data[9]);
this.r = utils_1.Quantity.from(data[10]);

@@ -63,2 +64,3 @@ this.s = utils_1.Quantity.from(data[11]);

this.validateAndSetSignature(data);
this.yParity = this.v;
}

@@ -89,3 +91,4 @@ }

r: this.r,
s: this.s
s: this.s,
yParity: this.yParity
};

@@ -148,3 +151,3 @@ }

const sig = (0, utils_1.ecsign)(msgHash, privateKey);
this.v = utils_1.Quantity.from(sig.v);
this.yParity = this.v = utils_1.Quantity.from(sig.v);
this.r = utils_1.Quantity.from(sig.r);

@@ -151,0 +154,0 @@ this.s = utils_1.Quantity.from(sig.s);

@@ -16,2 +16,3 @@ "use strict";

this.type = utils_1.Quantity.from("0x1");
this.yParity = utils_1.Quantity.from("0x0");
if (Array.isArray(data)) {

@@ -29,3 +30,3 @@ this.chainId = utils_1.Quantity.from(data[0]);

this.accessListDataFee = accessListData.dataFeeEIP2930;
this.v = utils_1.Quantity.from(data[8]);
this.yParity = this.v = utils_1.Quantity.from(data[8]);
this.r = utils_1.Quantity.from(data[9]);

@@ -63,2 +64,3 @@ this.s = utils_1.Quantity.from(data[10]);

this.validateAndSetSignature(data);
this.yParity = this.v;
}

@@ -87,3 +89,4 @@ }

r: this.r,
s: this.s
s: this.s,
yParity: this.v
};

@@ -139,3 +142,3 @@ }

const sig = (0, utils_1.ecsign)(msgHash, privateKey);
this.v = utils_1.Quantity.from(sig.v);
this.yParity = this.v = utils_1.Quantity.from(sig.v);
this.r = utils_1.Quantity.from(sig.r);

@@ -142,0 +145,0 @@ this.s = utils_1.Quantity.from(sig.s);

@@ -11,3 +11,3 @@ "use strict";

TransactionType[TransactionType["EIP1559AccessList"] = 2] = "EIP1559AccessList";
})(TransactionType = exports.TransactionType || (exports.TransactionType = {}));
})(TransactionType || (exports.TransactionType = TransactionType = {}));
//# sourceMappingURL=rpc-transaction.js.map

@@ -6,6 +6,6 @@ {

},
"version": "0.9.0",
"version": "0.9.1",
"description": "",
"author": "David Murdoch",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/src/chains/ethereum/transaction#readme",
"homepage": "https://github.com/trufflesuite/ganache/tree/develop/packages/ethereum/transaction#readme",
"license": "MIT",

@@ -26,3 +26,3 @@ "main": "lib/index.js",

"url": "https://github.com/trufflesuite/ganache.git",
"directory": "src/chains/ethereum/transaction"
"directory": "packages/ethereum/transaction"
},

@@ -55,7 +55,7 @@ "scripts": {

"@ethereumjs/tx": "4.1.1",
"@ganache/ethereum-address": "0.9.0",
"@ganache/ethereum-utils": "0.9.0",
"@ganache/rlp": "0.9.0",
"@ganache/secp256k1": "0.5.0",
"@ganache/utils": "0.9.0",
"@ganache/ethereum-address": "0.9.1",
"@ganache/ethereum-utils": "0.9.1",
"@ganache/rlp": "0.9.1",
"@ganache/secp256k1": "0.5.1",
"@ganache/utils": "0.9.1",
"node-gyp-build": "4.5.0"

@@ -71,5 +71,5 @@ },

"ts-node": "10.9.1",
"typescript": "4.7.4"
"typescript": "5.1.6"
},
"gitHead": "cb66fef410b40d628acfd97f32e6b300e6f9f562"
"gitHead": "d4618893aaa38a41e2c4d51a603f7048b8635be1"
}

@@ -18,2 +18,3 @@ /// <reference types="node" />

type: Quantity;
yParity: Quantity;
constructor(data: EIP1559FeeMarketRawTransaction | EIP1559FeeMarketRpcTransaction, common: Common, extra?: GanacheRawExtraTx);

@@ -20,0 +21,0 @@ maxGasPrice(): Quantity;

@@ -17,2 +17,3 @@ /// <reference types="node" />

type: Quantity;
yParity: Quantity;
constructor(data: EIP2930AccessListRawTransaction | EIP2930AccessListRpcTransaction, common: Common, extra?: GanacheRawExtraTx);

@@ -19,0 +20,0 @@ maxGasPrice(): Quantity;

@@ -1,2 +0,2 @@

export declare type Hardfork = "constantinople" | "byzantium" | "petersburg" | "istanbul" | "muirGlacier" | "berlin" | "london" | "arrowGlacier" | "grayGlacier" | "merge" | "mergeForkIdTransition" | "shanghai";
export type Hardfork = "constantinople" | "byzantium" | "petersburg" | "istanbul" | "muirGlacier" | "berlin" | "london" | "arrowGlacier" | "grayGlacier" | "merge" | "mergeForkIdTransition" | "shanghai";
//# sourceMappingURL=hardfork.d.ts.map

@@ -6,5 +6,5 @@ /// <reference types="node" />

*/
declare type Concat<T extends unknown[], U extends unknown[]> = [...T, ...U];
declare type TxType = [type: Buffer];
export declare type LegacyRawTransaction = [
type Concat<T extends unknown[], U extends unknown[]> = [...T, ...U];
type TxType = [type: Buffer];
export type LegacyRawTransaction = [
nonce: Buffer,

@@ -20,3 +20,3 @@ gasPrice: Buffer,

];
export declare type EIP2930AccessListRawTransaction = [
export type EIP2930AccessListRawTransaction = [
chainId: Buffer,

@@ -34,3 +34,3 @@ nonce: Buffer,

];
export declare type EIP1559FeeMarketRawTransaction = [
export type EIP1559FeeMarketRawTransaction = [
chainId: Buffer,

@@ -49,6 +49,6 @@ nonce: Buffer,

];
export declare type EIP2930AccessListDatabaseTx = Concat<TxType, EIP2930AccessListRawTransaction>;
export declare type EIP1559FeeMarketDatabaseTx = Concat<TxType, EIP1559FeeMarketRawTransaction>;
export declare type TypedDatabaseTransaction = LegacyRawTransaction | EIP2930AccessListDatabaseTx | EIP1559FeeMarketDatabaseTx;
export declare type TypedRawTransaction = LegacyRawTransaction | EIP2930AccessListRawTransaction | EIP1559FeeMarketRawTransaction;
export type EIP2930AccessListDatabaseTx = Concat<TxType, EIP2930AccessListRawTransaction>;
export type EIP1559FeeMarketDatabaseTx = Concat<TxType, EIP1559FeeMarketRawTransaction>;
export type TypedDatabaseTransaction = LegacyRawTransaction | EIP2930AccessListDatabaseTx | EIP1559FeeMarketDatabaseTx;
export type TypedRawTransaction = LegacyRawTransaction | EIP2930AccessListRawTransaction | EIP1559FeeMarketRawTransaction;
/**

@@ -58,3 +58,3 @@ * Extra data Ganache stores as part of a transaction in order to support

*/
export declare type GanacheRawExtraTx = [
export type GanacheRawExtraTx = [
from: Buffer,

@@ -70,4 +70,4 @@ hash: Buffer,

*/
export declare type GanacheRawBlockTransactionMetaData = [from: Buffer, hash: Buffer];
export type GanacheRawBlockTransactionMetaData = [from: Buffer, hash: Buffer];
export {};
//# sourceMappingURL=raw.d.ts.map
import { AccessList } from "./access-lists";
declare type oneThroughSeven = "1" | "2" | "3" | "4" | "5" | "6" | "7";
declare type HexChar = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f";
declare type HexPair = `${oneThroughSeven}${HexChar}`;
declare type TxType = `0x${HexChar}` | `0x${HexPair}`;
export declare type Transaction = LegacyRpcTransaction | EIP2930AccessListRpcTransaction | EIP1559FeeMarketRpcTransaction;
type oneThroughSeven = "1" | "2" | "3" | "4" | "5" | "6" | "7";
type HexChar = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f";
type HexPair = `${oneThroughSeven}${HexChar}`;
type TxType = `0x${HexChar}` | `0x${HexPair}`;
export type Transaction = LegacyRpcTransaction | EIP2930AccessListRpcTransaction | EIP1559FeeMarketRpcTransaction;
export declare enum TransactionType {

@@ -12,6 +12,6 @@ Legacy = 0,

}
export declare type CallTransaction = Omit<Transaction, "from"> & {
export type CallTransaction = Omit<Transaction, "from"> & {
from?: string;
};
export declare type LegacyRpcTransaction = Readonly<RpcTransaction> & {
export type LegacyRpcTransaction = Readonly<RpcTransaction> & {
readonly gasPrice?: string;

@@ -23,3 +23,3 @@ readonly chainId?: never;

};
export declare type EIP2930AccessListRpcTransaction = Readonly<RpcTransaction> & {
export type EIP2930AccessListRpcTransaction = Readonly<RpcTransaction> & {
readonly type?: TxType;

@@ -32,3 +32,3 @@ readonly chainId?: string;

};
export declare type EIP1559FeeMarketRpcTransaction = Readonly<RpcTransaction> & {
export type EIP1559FeeMarketRpcTransaction = Readonly<RpcTransaction> & {
readonly type?: TxType;

@@ -41,3 +41,3 @@ readonly chainId?: string;

};
export declare type RpcTransaction = {
export type RpcTransaction = {
from: string;

@@ -44,0 +44,0 @@ nonce?: string;

@@ -18,3 +18,3 @@ /// <reference types="node" />

};
declare type TransactionFinalization = {
type TransactionFinalization = {
status: "confirmed";

@@ -21,0 +21,0 @@ error?: Error;

@@ -8,3 +8,3 @@ /// <reference types="node" />

import { TypedTransaction } from "./transaction-types";
declare type EthereumRawReceipt = [
type EthereumRawReceipt = [
status: Buffer,

@@ -11,0 +11,0 @@ cumulativeGasUsed: Buffer,

@@ -7,3 +7,3 @@ /// <reference types="node" />

export declare function serializeRpcForDb(tx: Transaction, blockHash: Data, blockNumber: Quantity, transactionIndex: Quantity): Buffer;
export declare type SerializableTransaction = {
export type SerializableTransaction = {
raw: TypedRawTransaction;

@@ -10,0 +10,0 @@ from: Address;

@@ -7,6 +7,6 @@ import { Data, Quantity } from "@ganache/utils";

import { AccessList } from "./access-lists";
export declare type TypedTransaction = LegacyTransaction | EIP2930AccessListTransaction | EIP1559FeeMarketTransaction;
export declare type Capability = 2718 | 2930 | 1559;
export declare type TypedTransactionJSON = LegacyTransactionJSON | EIP2930AccessListTransactionJSON | EIP1559FeeMarketTransactionJSON;
export declare type LegacyTransactionJSON = {
export type TypedTransaction = LegacyTransaction | EIP2930AccessListTransaction | EIP1559FeeMarketTransaction;
export type Capability = 2718 | 2930 | 1559;
export type TypedTransactionJSON = LegacyTransactionJSON | EIP2930AccessListTransactionJSON | EIP1559FeeMarketTransactionJSON;
export type LegacyTransactionJSON = {
hash: Data;

@@ -28,3 +28,3 @@ type?: Quantity;

};
export declare type EIP2930AccessListTransactionJSON = {
export type EIP2930AccessListTransactionJSON = {
hash: Data;

@@ -47,4 +47,5 @@ type: Quantity;

s: Quantity;
yParity: Quantity;
};
export declare type EIP1559FeeMarketTransactionJSON = {
export type EIP1559FeeMarketTransactionJSON = {
hash: Data;

@@ -69,3 +70,4 @@ type: Quantity;

s: Quantity;
yParity: Quantity;
};
//# sourceMappingURL=transaction-types.d.ts.map
/// <reference types="node" />
import { Address } from "@ethereumjs/util";
export declare type VmTransaction = {
export type VmTransaction = {
nonce: bigint;

@@ -5,0 +5,0 @@ gasPrice?: bigint;

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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