Socket
Socket
Sign inDemoInstall

arbundles

Package Overview
Dependencies
Maintainers
3
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arbundles - npm Package Compare versions

Comparing version 0.9.9 to 0.9.10

6

build/node/cjs/src/signing/chains/ethereumSigner.js

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

const secp256k1_1 = __importDefault(require("../keys/secp256k1"));
const secp256k1_2 = __importDefault(require("secp256k1"));
const secp256k1_2 = require("secp256k1");
const base64url_1 = __importDefault(require("base64url"));

@@ -30,3 +30,3 @@ const bytes_1 = require("@ethersproject/bytes");

const b = Buffer.from(key, "hex");
const pub = secp256k1_2.default.publicKeyCreate(b, false);
const pub = (0, secp256k1_2.publicKeyCreate)(b, false);
super(key, Buffer.from(pub));

@@ -46,3 +46,3 @@ }

// return ethers.utils.verifyMessage(message, signature) === address;
return secp256k1_2.default.ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, (0, bytes_1.arrayify)((0, hash_1.hashMessage)(message)), typeof pk === "string" ? base64url_1.default.toBuffer(pk) : pk);
return (0, secp256k1_2.ecdsaVerify)(signature.length === 65 ? signature.slice(0, -1) : signature, (0, bytes_1.arrayify)((0, hash_1.hashMessage)(message)), typeof pk === "string" ? base64url_1.default.toBuffer(pk) : pk);
});

@@ -49,0 +49,0 @@ }

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

return __awaiter(this, void 0, void 0, function* () {
this.address = (yield this.signer.getAddress()).toLowerCase();
this.address = (yield this.signer.getAddress()).toString().toLowerCase();
this.publicKey = Buffer.from(this.address); // pk *is* address

@@ -31,0 +31,0 @@ });

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

const base64url_1 = __importDefault(require("base64url"));
const secp256k1_1 = __importDefault(require("secp256k1"));
const secp256k1_1 = require("secp256k1");
const constants_1 = require("../../constants");

@@ -41,3 +41,3 @@ const keccak256_1 = __importDefault(require("../keccak256"));

try {
verified = secp256k1_1.default.ecdsaVerify(signature, (0, keccak256_1.default)(Buffer.from(message)), p);
verified = (0, secp256k1_1.ecdsaVerify)(signature, (0, keccak256_1.default)(Buffer.from(message)), p);
// eslint-disable-next-line no-empty

@@ -51,3 +51,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
return secp256k1_1.default.ecdsaSign((0, keccak256_1.default)(Buffer.from(message)), Buffer.from(this.key)).signature;
return (0, secp256k1_1.ecdsaSign)((0, keccak256_1.default)(Buffer.from(message)), Buffer.from(this.key)).signature;
});

@@ -54,0 +54,0 @@ }

/// <reference types="node" />
/// <reference types="bn.js" />
import * as arbundlesSrc from "./src";

@@ -28,3 +27,3 @@ import * as stream from "./src/stream";

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -97,3 +96,3 @@ intToBuffer: (i: number) => Buffer;

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -100,0 +99,0 @@ intToBuffer: (i: number) => Buffer;

import Secp256k1 from "../keys/secp256k1.js";
import secp256k1 from "secp256k1";
import { ecdsaVerify, publicKeyCreate } from "secp256k1";
import base64url from "base64url";

@@ -15,3 +15,3 @@ import { arrayify } from "@ethersproject/bytes";

const b = Buffer.from(key, "hex");
const pub = secp256k1.publicKeyCreate(b, false);
const pub = publicKeyCreate(b, false);
super(key, Buffer.from(pub));

@@ -28,5 +28,5 @@ }

// return ethers.utils.verifyMessage(message, signature) === address;
return secp256k1.ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, arrayify(hashMessage(message)), typeof pk === "string" ? base64url.toBuffer(pk) : pk);
return ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, arrayify(hashMessage(message)), typeof pk === "string" ? base64url.toBuffer(pk) : pk);
}
}
//# sourceMappingURL=ethereumSigner.js.map

@@ -11,3 +11,3 @@ import { SignatureConfig, SIG_CONFIG } from "../../constants.js";

async ready() {
this.address = (await this.signer.getAddress()).toLowerCase();
this.address = (await this.signer.getAddress()).toString().toLowerCase();
this.publicKey = Buffer.from(this.address); // pk *is* address

@@ -14,0 +14,0 @@ }

import base64url from "base64url";
import secp256k1 from "secp256k1";
import { ecdsaSign, ecdsaVerify } from "secp256k1";
import { SignatureConfig, SIG_CONFIG } from "../../constants.js";

@@ -27,3 +27,3 @@ import keccak256 from "../keccak256.js";

try {
verified = secp256k1.ecdsaVerify(signature, keccak256(Buffer.from(message)), p);
verified = ecdsaVerify(signature, keccak256(Buffer.from(message)), p);
// eslint-disable-next-line no-empty

@@ -35,5 +35,5 @@ }

async sign(message) {
return secp256k1.ecdsaSign(keccak256(Buffer.from(message)), Buffer.from(this.key)).signature;
return ecdsaSign(keccak256(Buffer.from(message)), Buffer.from(this.key)).signature;
}
}
//# sourceMappingURL=secp256k1.js.map
/// <reference types="node" />
/// <reference types="bn.js" />
import * as arbundlesSrc from "./src/index.js";

@@ -28,3 +27,3 @@ import * as stream from "./src/stream/index.js";

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -97,3 +96,3 @@ intToBuffer: (i: number) => Buffer;

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -100,0 +99,0 @@ intToBuffer: (i: number) => Buffer;

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

const secp256k1_1 = __importDefault(require("../keys/secp256k1"));
const secp256k1_2 = __importDefault(require("secp256k1"));
const secp256k1_2 = require("secp256k1");
const base64url_1 = __importDefault(require("base64url"));

@@ -30,3 +30,3 @@ const bytes_1 = require("@ethersproject/bytes");

const b = Buffer.from(key, "hex");
const pub = secp256k1_2.default.publicKeyCreate(b, false);
const pub = (0, secp256k1_2.publicKeyCreate)(b, false);
super(key, Buffer.from(pub));

@@ -46,3 +46,3 @@ }

// return ethers.utils.verifyMessage(message, signature) === address;
return secp256k1_2.default.ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, (0, bytes_1.arrayify)((0, hash_1.hashMessage)(message)), typeof pk === "string" ? base64url_1.default.toBuffer(pk) : pk);
return (0, secp256k1_2.ecdsaVerify)(signature.length === 65 ? signature.slice(0, -1) : signature, (0, bytes_1.arrayify)((0, hash_1.hashMessage)(message)), typeof pk === "string" ? base64url_1.default.toBuffer(pk) : pk);
});

@@ -49,0 +49,0 @@ }

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

return __awaiter(this, void 0, void 0, function* () {
this.address = (yield this.signer.getAddress()).toLowerCase();
this.address = (yield this.signer.getAddress()).toString().toLowerCase();
this.publicKey = Buffer.from(this.address); // pk *is* address

@@ -31,0 +31,0 @@ });

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

const base64url_1 = __importDefault(require("base64url"));
const secp256k1_1 = __importDefault(require("secp256k1"));
const secp256k1_1 = require("secp256k1");
const constants_1 = require("../../constants");

@@ -41,3 +41,3 @@ const keccak256_1 = __importDefault(require("../keccak256"));

try {
verified = secp256k1_1.default.ecdsaVerify(signature, (0, keccak256_1.default)(Buffer.from(message)), p);
verified = (0, secp256k1_1.ecdsaVerify)(signature, (0, keccak256_1.default)(Buffer.from(message)), p);
// eslint-disable-next-line no-empty

@@ -51,3 +51,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
return secp256k1_1.default.ecdsaSign((0, keccak256_1.default)(Buffer.from(message)), Buffer.from(this.key)).signature;
return (0, secp256k1_1.ecdsaSign)((0, keccak256_1.default)(Buffer.from(message)), Buffer.from(this.key)).signature;
});

@@ -54,0 +54,0 @@ }

/// <reference types="node" />
/// <reference types="bn.js" />
import * as arbundlesSrc from "./src";

@@ -28,3 +27,3 @@ import * as stream from "./src/stream";

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -97,3 +96,3 @@ intToBuffer: (i: number) => Buffer;

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -100,0 +99,0 @@ intToBuffer: (i: number) => Buffer;

import Secp256k1 from "../keys/secp256k1.js";
import secp256k1 from "secp256k1";
import { ecdsaVerify, publicKeyCreate } from "secp256k1";
import base64url from "base64url";

@@ -15,3 +15,3 @@ import { arrayify } from "@ethersproject/bytes";

const b = Buffer.from(key, "hex");
const pub = secp256k1.publicKeyCreate(b, false);
const pub = publicKeyCreate(b, false);
super(key, Buffer.from(pub));

@@ -28,5 +28,5 @@ }

// return ethers.utils.verifyMessage(message, signature) === address;
return secp256k1.ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, arrayify(hashMessage(message)), typeof pk === "string" ? base64url.toBuffer(pk) : pk);
return ecdsaVerify(signature.length === 65 ? signature.slice(0, -1) : signature, arrayify(hashMessage(message)), typeof pk === "string" ? base64url.toBuffer(pk) : pk);
}
}
//# sourceMappingURL=ethereumSigner.js.map

@@ -11,3 +11,3 @@ import { SignatureConfig, SIG_CONFIG } from "../../constants.js";

async ready() {
this.address = (await this.signer.getAddress()).toLowerCase();
this.address = (await this.signer.getAddress()).toString().toLowerCase();
this.publicKey = Buffer.from(this.address); // pk *is* address

@@ -14,0 +14,0 @@ }

import base64url from "base64url";
import secp256k1 from "secp256k1";
import { ecdsaSign, ecdsaVerify } from "secp256k1";
import { SignatureConfig, SIG_CONFIG } from "../../constants.js";

@@ -27,3 +27,3 @@ import keccak256 from "../keccak256.js";

try {
verified = secp256k1.ecdsaVerify(signature, keccak256(Buffer.from(message)), p);
verified = ecdsaVerify(signature, keccak256(Buffer.from(message)), p);
// eslint-disable-next-line no-empty

@@ -35,5 +35,5 @@ }

async sign(message) {
return secp256k1.ecdsaSign(keccak256(Buffer.from(message)), Buffer.from(this.key)).signature;
return ecdsaSign(keccak256(Buffer.from(message)), Buffer.from(this.key)).signature;
}
}
//# sourceMappingURL=secp256k1.js.map
/// <reference types="node" />
/// <reference types="bn.js" />
import * as arbundlesSrc from "./src/index.js";

@@ -28,3 +27,3 @@ import * as stream from "./src/stream/index.js";

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -96,3 +95,3 @@ intToBuffer: (i: number) => Buffer;

ArconnectSigner: typeof arbundlesSrc.ArconnectSigner;
keccak256(value: string | number | Buffer | import("bn.js")): any;
keccak256(value: any): any;
exportForTesting: {

@@ -99,0 +98,0 @@ intToBuffer: (i: number) => Buffer;

{
"name": "arbundles",
"version": "0.9.9",
"version": "0.9.10",
"description": "Arweave bundling library",

@@ -89,3 +89,3 @@ "author": "Josh Benaron <joshbenaron@gmail.com>",

"devDependencies": {
"@solana/wallet-adapter-base": "^0.9.2",
"@solana/wallet-adapter-base": "^0.9.23",
"@types/bs58": "^4.0.1",

@@ -146,3 +146,3 @@ "@types/jest": "^29.2.5",

"keccak": "^3.0.2",
"secp256k1": "^4.0.2"
"secp256k1": "^5.0.0"
},

@@ -149,0 +149,0 @@ "optionalDependencies": {

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 too big to display

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