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

@helios-lang/ledger

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helios-lang/ledger - npm Package Compare versions

Comparing version 0.1.28 to 0.1.29

2

package.json
{
"name": "@helios-lang/ledger",
"version": "0.1.28",
"version": "0.1.29",
"description": "Ledger types (eg. for building transactions)",

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

@@ -10,3 +10,3 @@ import {

import { Assets } from "./Assets.js"
import { ByteStream } from "@helios-lang/codec-utils"
import { ByteStream, hexToBytes } from "@helios-lang/codec-utils"
import {

@@ -101,2 +101,23 @@ ByteArrayData,

/**
* Blockfrost has a special format for Value
* @param {{unit: string, quantity: string}[]} list
* @returns {Value}
*/
static fromBlockfrost(list) {
return list.reduce((sum, { unit, quantity }) => {
const qty = BigInt(quantity)
if (unit == "lovelace") {
return sum.add(new Value(qty))
} else {
const mph = unit.substring(0, 56)
const tokenName = unit.substring(56)
return sum.add(
new Value(0n, new Assets([[mph, [[tokenName, qty]]]]))
)
}
}, new Value())
}
/**
* @param {ByteArrayLike} bytes

@@ -103,0 +124,0 @@ * @returns {Value}

@@ -34,2 +34,11 @@ /**

/**
* Blockfrost has a special format for Value
* @param {{unit: string, quantity: string}[]} list
* @returns {Value}
*/
static fromBlockfrost(list: {
unit: string;
quantity: string;
}[]): Value;
/**
* @param {ByteArrayLike} bytes

@@ -36,0 +45,0 @@ * @returns {Value}

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