Skip to content

Commit

Permalink
added es2020 support v0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cf committed Aug 5, 2024
1 parent 0ac3305 commit 35a1410
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ An ultra lightweight (20kb gzipped) doge library for Node.js and the Browser wit
* Support for both P2PKH and P2SH transactions
* Built in Memory Wallet + Support for Hardware Wallets (ledger, trezor, etc.)
* Does not depend on bitcoinjs-lib (no need for a megabyte of nodejs polyfills and global scope pollution)
* Only has pinned one dependency, [@noble/secp256k1](https://github.com/paulmillr/noble-secp256k1) which is only 4kb, and has already been [audited](https://cure53.de/pentest-report_noble-lib.pdf).
* Only has pinned one dependency, [@qed-noble/secp256k1](https://github.com/QEDProtocol/noble-secp256k1) which is only 4kb, and has already been [audited](https://cure53.de/pentest-report_noble-lib.pdf).
* Compiler/Assembler for BASM and standard bitcoin assembly


Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = {
},
},
transform: {
"/node_modules/@noble/(secp256k1)?/(.+).js": "ts-jest",
"/node_modules/@qed-noble/(secp256k1)?/(.+).js": "ts-jest",
},
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!@noble)/",
"<rootDir>/node_modules/(?!@qed-noble)/",
],
preset: "ts-jest",
roots: ['<rootDir>/test'],
Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doge-sdk",
"version": "0.4.4",
"version": "0.4.5",
"description": "An ultra-lightweight, fully featured dogecoin library for the browser and node.js.",
"types": "dist/types/index.d.js",
"exports": {
Expand Down Expand Up @@ -58,7 +58,7 @@
"url": "https://github.com/QEDProtocol/doge-sdk/issues"
},
"dependencies": {
"@noble/secp256k1": "2.1.0"
"@qed-noble/secp256k1": "2.1.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/ecc/encoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { verify } from "@noble/secp256k1";
import { verify } from "@qed-noble/secp256k1";
import { hexToU8Array, u8ArrayToHex } from "../utils/data";

function normalizeSignatureFromDer(signatureHexDer: string) {
Expand Down
4 changes: 2 additions & 2 deletions src/ecc/memory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPublicKey, signAsync } from '@noble/secp256k1';
import { getPublicKey, signAsync } from '@qed-noble/secp256k1';
import { u8ArrayToHex } from '../utils/data';
import { IHashSigner, ISimpleSecp256K1Provider } from './types';
import { bigIntU256ToBytesBE, derEncodeSignature } from './encoding';
Expand Down Expand Up @@ -42,4 +42,4 @@ class MemorySecp256K1Provider implements ISimpleSecp256K1Provider {

export {
MemorySecp256K1Provider,
}
}
4 changes: 2 additions & 2 deletions src/wallet/memory/wallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPublicKey, sign, signAsync } from "@noble/secp256k1";
import { getPublicKey, sign, signAsync } from "@qed-noble/secp256k1";
import { DogeNetworkId, IDogeNetwork } from "../../networks/types";
import { hexToU8Array, u8ArrayToHex } from "../../utils/data";
import { getDogeNetworkById } from "../../networks";
Expand Down Expand Up @@ -94,4 +94,4 @@ export {
DogeMemoryWallet,
}

export const T55 = 0;
export const T55 = 0;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
// "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
Expand Down

0 comments on commit 35a1410

Please sign in to comment.