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
96
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.40 to 0.1.41

2

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

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

@@ -7,3 +7,9 @@ import {

} from "@helios-lang/cbor"
import { ByteStream, bytesToHex, toBytes } from "@helios-lang/codec-utils"
import {
ByteStream,
bytesToHex,
compareBytes,
equalsBytes,
toBytes
} from "@helios-lang/codec-utils"
import { blake2b, encodeBech32 } from "@helios-lang/crypto"

@@ -154,2 +160,37 @@ import { ByteArrayData, ConstrData, decodeUplcData } from "@helios-lang/uplc"

/**
*
* @param {AssetClass} a
* @param {AssetClass} b
*/
static compare(a, b) {
const i = MintingPolicyHash.compare(a.mph, b.mph)
if (i != 0) {
return i
}
return compareBytes(a.tokenName, b.tokenName)
}
/**
* @param {AssetClass} other
* @returns {boolean}
*/
isEqual(other) {
return (
this.mph.isEqual(other.mph) &&
equalsBytes(this.tokenName, other.tokenName)
)
}
/**
*
* @param {AssetClass} other
* @returns {boolean}
*/
isGreaterThan(other) {
return AssetClass.compare(this, other) > 0
}
/**
* Converts an `AssetClass` instance into its CBOR representation.

@@ -156,0 +197,0 @@ * @returns {number[]}

@@ -63,2 +63,8 @@ /**

/**
*
* @param {AssetClass} a
* @param {AssetClass} b
*/
static compare(a: AssetClass, b: AssetClass): number;
/**
* @param {MintingPolicyHash<C>} mph - policy with optional context

@@ -82,2 +88,13 @@ * @param {ByteArrayLike} tokenName

/**
* @param {AssetClass} other
* @returns {boolean}
*/
isEqual(other: AssetClass): boolean;
/**
*
* @param {AssetClass} other
* @returns {boolean}
*/
isGreaterThan(other: AssetClass): boolean;
/**
* Converts an `AssetClass` instance into its CBOR representation.

@@ -84,0 +101,0 @@ * @returns {number[]}

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