micro-eth-signer
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -17,15 +17,15 @@ export declare const CHAIN_TYPES: { | ||
export declare function numberTo0xHex(num: number | bigint): string; | ||
declare type Chain = keyof typeof CHAIN_TYPES; | ||
declare type Type = keyof typeof TRANSACTION_TYPES; | ||
type Chain = keyof typeof CHAIN_TYPES; | ||
type Type = keyof typeof TRANSACTION_TYPES; | ||
declare const FIELDS: readonly ["nonce", "gasPrice", "gasLimit", "to", "value", "data", "v", "r", "s"]; | ||
declare const FIELDS2930: readonly ["chainId", "nonce", "gasPrice", "gasLimit", "to", "value", "data", "accessList", "yParity", "r", "s"]; | ||
declare const FIELDS1559: readonly ["chainId", "nonce", "maxPriorityFeePerGas", "maxFeePerGas", "gasLimit", "to", "value", "data", "accessList", "yParity", "r", "s"]; | ||
export declare type Field = typeof FIELDS[number] | typeof FIELDS2930[number] | typeof FIELDS1559[number] | 'address' | 'storageKey'; | ||
declare type str = string; | ||
export declare type AccessList = [str, str[]][]; | ||
export declare type RawTxLegacy = [str, str, str, str, str, str, str, str, str]; | ||
export declare type RawTx2930 = [str, str, str, str, str, str, AccessList, str, str, str]; | ||
export declare type RawTx1559 = [str, str, str, str, str, str, str, AccessList, str, str, str]; | ||
export declare type RawTx = RawTxLegacy | RawTx2930 | RawTx1559; | ||
export declare type RawTxMap = { | ||
export type Field = (typeof FIELDS)[number] | (typeof FIELDS2930)[number] | (typeof FIELDS1559)[number] | 'address' | 'storageKey'; | ||
type str = string; | ||
export type AccessList = [str, str[]][]; | ||
export type RawTxLegacy = [str, str, str, str, str, str, str, str, str]; | ||
export type RawTx2930 = [str, str, str, str, str, str, AccessList, str, str, str]; | ||
export type RawTx1559 = [str, str, str, str, str, str, str, AccessList, str, str, str]; | ||
export type RawTx = RawTxLegacy | RawTx2930 | RawTx1559; | ||
export type RawTxMap = { | ||
chainId?: string; | ||
@@ -32,0 +32,0 @@ nonce: string; |
@@ -267,3 +267,3 @@ import { keccak_256 } from '@noble/hashes/sha3'; | ||
}; | ||
export class Transaction { | ||
class Transaction { | ||
constructor(data, chain, hardfork = Transaction.DEFAULT_HARDFORK, type) { | ||
@@ -427,2 +427,3 @@ this.hardfork = hardfork; | ||
Transaction.DEFAULT_TYPE = 'eip1559'; | ||
export { Transaction }; | ||
//# sourceMappingURL=index.js.map |
@@ -94,5 +94,5 @@ /*! micro-eth-signer - MIT License (c) 2021 Paul Miller (paulmillr.com) */ | ||
export type Field = | ||
| typeof FIELDS[number] | ||
| typeof FIELDS2930[number] | ||
| typeof FIELDS1559[number] | ||
| (typeof FIELDS)[number] | ||
| (typeof FIELDS2930)[number] | ||
| (typeof FIELDS1559)[number] | ||
| 'address' | ||
@@ -99,0 +99,0 @@ | 'storageKey'; |
{ | ||
"name": "micro-eth-signer", | ||
"version": "0.6.0", | ||
"description": "Create, sign and validate Ethereum transactions & addresses with minimum deps. Supports EIP1559", | ||
"version": "0.6.1", | ||
"description": "Create, sign and validate Ethereum transactions & addresses with minimum deps", | ||
"type": "module", | ||
@@ -25,13 +25,10 @@ "main": "index.js", | ||
"@noble/hashes": "~1.3.0", | ||
"@noble/curves": "~0.8.3", | ||
"@noble/curves": "~1.0.0", | ||
"@ethereumjs/rlp": "4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "22.0.0", | ||
"@rollup/plugin-node-resolve": "13.3.0", | ||
"micro-bmark": "0.3.0", | ||
"micro-should": "0.4.0", | ||
"prettier": "2.6.2", | ||
"rollup": "2.75.5", | ||
"typescript": "4.7.3" | ||
"prettier": "2.8.4", | ||
"typescript": "5.0.2" | ||
}, | ||
@@ -67,3 +64,3 @@ "jest": { | ||
"build": "tsc", | ||
"build:release": "rollup -c rollup.config.js", | ||
"build:release": "cd build; npm run build:release", | ||
"bench": "node test/benchmark.js", | ||
@@ -70,0 +67,0 @@ "lint": "prettier --print-width 100 --single-quote --check index.ts", |
import { RawTxMap } from './index.js'; | ||
export declare type Unit = 'eth' | 'wei' | 'gwei'; | ||
declare type SNB = string | number | bigint; | ||
export declare type HumanizedTx = { | ||
export type Unit = 'eth' | 'wei' | 'gwei'; | ||
type SNB = string | number | bigint; | ||
export type HumanizedTx = { | ||
from?: string; | ||
@@ -29,3 +29,3 @@ to: string; | ||
}; | ||
declare type h2rf = keyof typeof h2r; | ||
type h2rf = keyof typeof h2r; | ||
export declare function createTxMapFromFields(fields: HumanizedTx): RawTxMap; | ||
@@ -32,0 +32,0 @@ export declare function validateField(field: h2rf, val: SNB, opts?: Partial<HumanizedTx>): string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
1675
78229
+ Added@noble/curves@1.0.0(transitive)
- Removed@noble/curves@0.8.3(transitive)
Updated@noble/curves@~1.0.0