Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

as-chain

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

as-chain - npm Package Compare versions

Comparing version 0.0.91 to 0.0.92

32

assembly/crypto.ts

@@ -539,4 +539,4 @@ import { check } from "./system";

pack(): u8[] {
const rawX = Utils.hexToBytes(this.x.toString(16).padStart(32, '0'));
const rawY = Utils.hexToBytes(this.y.toString(16).padStart(32, '0'));
const rawX = this.x.toBytes(true);
const rawY = this.y.toBytes(true)
return rawX.concat(rawY);

@@ -552,2 +552,9 @@ }

unpackLE(data: u8[]): usize {
let dec = new Decoder(data);
this.x = U256.fromBytesLE(dec.unpackBytes(32))
this.y = U256.fromBytesLE(dec.unpackBytes(32))
return dec.getPos();
}
getSize(): usize {

@@ -581,6 +588,6 @@ return 64;

pack(): u8[] {
const rawX1 = Utils.hexToBytes(this.x1.toString(16).padStart(32, '0'));
const rawX2 = Utils.hexToBytes(this.x2.toString(16).padStart(32, '0'));
const rawY1 = Utils.hexToBytes(this.y1.toString(16).padStart(32, '0'));
const rawY2 = Utils.hexToBytes(this.y2.toString(16).padStart(32, '0'));
const rawX1 = this.x1.toBytes(true);
const rawX2 = this.x2.toBytes(true);
const rawY1 = this.y1.toBytes(true);
const rawY2 = this.y2.toBytes(true);
return rawX1.concat(rawX2).concat(rawY1).concat(rawY2);

@@ -598,2 +605,11 @@ }

unpackLE(data: u8[]): usize {
let dec = new Decoder(data);
this.x1 = U256.fromBytesLE(dec.unpackBytes(32))
this.x2 = U256.fromBytesLE(dec.unpackBytes(32))
this.y1 = U256.fromBytesLE(dec.unpackBytes(32))
this.y2 = U256.fromBytesLE(dec.unpackBytes(32))
return dec.getPos();
}
getSize(): usize {

@@ -657,3 +673,3 @@ return 128;

const rawG1 = g1.pack();
const rawScalar = Utils.hexToBytes(scalar.toString(16).padStart(32, '0'));
const rawScalar = scalar.toBytes(true);
const rawResult = new Array<u8>(64);

@@ -664,3 +680,3 @@ const ret = env.alt_bn128_mul(rawG1.dataStart, rawG1.length, rawScalar.dataStart, rawScalar.length, rawResult.dataStart, rawResult.length)

result.unpack(rawResult);
return result;
return new AltBn128G1();
}

@@ -667,0 +683,0 @@

{
"name": "as-chain",
"version": "0.0.91",
"version": "0.0.92",
"description": "chain module for assemblyscript",

@@ -5,0 +5,0 @@ "main": "js/index.js",

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