Socket
Socket
Sign inDemoInstall

@hyperionbt/helios

Package Overview
Dependencies
0
Maintainers
2
Versions
160
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.13.15 to 0.13.16

2

package.json
{
"name": "@hyperionbt/helios",
"type": "module",
"version": "0.13.15",
"version": "0.13.16",
"description": "Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus. With this library you can compile Helios scripts and build Cardano transactions, all you need to build 100% client-side dApps for Cardano.",

@@ -6,0 +6,0 @@ "main": "helios.js",

@@ -35,16 +35,2 @@ //@ts-check

}
/**
* Rfc 4648 base32 alphabet
* @package
* @type {string}
*/
const DEFAULT_BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
/**
* Bech32 base32 alphabet
* @package
* @type {string}
*/
const BECH32_BASE32_ALPHABET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";

@@ -279,3 +265,3 @@ /**

* sha2_256, sha2_512, sha3 and blake2b hashing
* ed25519 pubkey generation, signing, and signature verification (NOTE: the current implementation is very slow)
* ed25519 pubkey generation, signing, and signature verification (NOTE: the current implementation is simple but slow)
*/

@@ -310,2 +296,18 @@ export class Crypto {

}
/**
* Rfc 4648 base32 alphabet
* @type {string}
*/
static get DEFAULT_BASE32_ALPHABET() {
return "abcdefghijklmnopqrstuvwxyz234567";
}
/**
* Bech32 base32 alphabet
* @type {string}
*/
static get BECH32_BASE32_ALPHABET() {
return "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
}

@@ -331,3 +333,3 @@ /**

*/
static encodeBase32(bytes, alphabet = DEFAULT_BASE32_ALPHABET) {
static encodeBase32(bytes, alphabet = Crypto.DEFAULT_BASE32_ALPHABET) {
return Crypto.encodeBase32Bytes(bytes).map(c => alphabet[c]).join("");

@@ -373,3 +375,3 @@ }

*/
static decodeBase32(encoded, alphabet = DEFAULT_BASE32_ALPHABET) {
static decodeBase32(encoded, alphabet = Crypto.DEFAULT_BASE32_ALPHABET) {
const writer = new BitWriter();

@@ -489,3 +491,3 @@

return hrp + "1" + data.concat(chkSum).map(i => BECH32_BASE32_ALPHABET[i]).join("");
return hrp + "1" + data.concat(chkSum).map(i => Crypto.BECH32_BASE32_ALPHABET[i]).join("");
}

@@ -513,3 +515,3 @@

const data = Crypto.decodeBase32(addr.slice(0, addr.length - 6), BECH32_BASE32_ALPHABET);
const data = Crypto.decodeBase32(addr.slice(0, addr.length - 6), Crypto.BECH32_BASE32_ALPHABET);

@@ -555,3 +557,3 @@ return [hrp, data];

for (let c of addr) {
const j = BECH32_BASE32_ALPHABET.indexOf(c);
const j = Crypto.BECH32_BASE32_ALPHABET.indexOf(c);
if (j == -1) {

@@ -1144,3 +1146,3 @@ return false;

/**
* Calculates blake2-256 (32 bytes) hash of a list of uint8 numbers.
* Calculates blake2b hash of a list of uint8 numbers (variable digest size).
* Result is also a list of uint8 number.

@@ -1154,3 +1156,3 @@ * Blake2b is a 64bit algorithm, so we need to be careful when replicating 64-bit operations with 2 32-bit numbers (low-word overflow must spill into high-word, and shifts must go over low/high boundary)

* @param {number[]} bytes
* @param {number} digestSize - 32 or 64
* @param {number} digestSize - at most 64
* @returns {number[]}

@@ -1309,3 +1311,3 @@ */

// extract lowest BLAKE2B_DIGEST_SIZE (32 or 64) bytes from h
// extract lowest BLAKE2B_DIGEST_SIZE bytes from h

@@ -1312,0 +1314,0 @@ /** @type {number[]} */

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc