New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rustbn-wasm

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rustbn-wasm - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

dist/esm/wasm.d.ts

4

CHANGELOG.md

@@ -8,2 +8,6 @@ # Changelog

## 0.3.0 - 2024-02-14
- Improved (older version) ESM support (❤️ to @roninjin10 for the contribution), PR [#7](https://github.com/ethereumjs/rustbn-wasm/pull/7)
## 0.2.0 - 2023-07-04

@@ -10,0 +14,0 @@

2

dist/esm/rustbn.js
import { base64 } from '@scure/base';
import wasmB64 from './wasm.json' assert { "type": "JSON" };
import wasmB64 from './wasm.js';
const imports = {};

@@ -4,0 +4,0 @@ let wasm;

{
"name": "rustbn-wasm",
"version": "0.2.0",
"version": "0.3.0",
"description": "Javascript bindings for https://github.com/paritytech/bn (using WASM)",

@@ -25,2 +25,3 @@ "keywords": [

"build": "npm run build-node && npm run wasm2b64 && npm run build-esm",
"test": "vitest run test/*",
"wasm2b64": "node scripts/wasmToB64.js"

@@ -31,3 +32,3 @@ },

"dependencies": {
"@scure/base": "^1.1.1"
"@scure/base": "^1.1.5"
},

@@ -37,4 +38,5 @@ "devDependencies": {

"copy-webpack-plugin": "^5.0.3",
"typescript": "^5.1.5"
"typescript": "^5.1.5",
"vitest": "^1.2.2"
}
}
import { base64 } from '@scure/base'
import wasmB64 from './wasm.json' assert { "type": "JSON" }
import wasmB64 from './wasm.js'
const imports = {}

@@ -22,13 +22,13 @@

typeof cachedTextEncoder.encodeInto === 'function'
? function (arg: any, view: any) {
return cachedTextEncoder.encodeInto(arg, view)
? function(arg: any, view: any) {
return cachedTextEncoder.encodeInto(arg, view)
}
: function(arg: any, view: any) {
const buf = cachedTextEncoder.encode(arg)
view.set(buf)
return {
read: arg.length,
written: buf.length,
}
: function (arg: any, view: any) {
const buf = cachedTextEncoder.encode(arg)
view.set(buf)
return {
read: arg.length,
written: buf.length,
}
}
}

@@ -95,3 +95,3 @@ function passStringToWasm0(arg: string, malloc: any, realloc: any) {

*/
export const ec_mul = function (input_hex: string) {
export const ec_mul = function(input_hex: string) {
let deferred2_0

@@ -119,3 +119,3 @@ let deferred2_1

*/
export const ec_add = function (input_str: string) {
export const ec_add = function(input_str: string) {
let deferred2_0

@@ -143,3 +143,3 @@ let deferred2_1

*/
export const ec_pairing = function (input_str: string): string {
export const ec_pairing = function(input_str: string): string {
let deferred2_0

@@ -146,0 +146,0 @@ let deferred2_1

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