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

ripple-binary-codec

Package Overview
Dependencies
Maintainers
7
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripple-binary-codec - npm Package Compare versions

Comparing version 1.2.1-beta.0 to 1.2.1

10

dist/enums/utils-renumber.js

@@ -109,12 +109,12 @@ "use strict";

if (key.substring(0, 3) === 'tem') {
console.log(" \"" + key + "\": " + startingFromTemBADSENDXRPPATHS++ + ",");
console.log(" \"".concat(key, "\": ").concat(startingFromTemBADSENDXRPPATHS++, ","));
}
else if (key.substring(0, 3) === 'tef') {
console.log(" \"" + key + "\": " + startingFromTefFAILURE++ + ",");
console.log(" \"".concat(key, "\": ").concat(startingFromTefFAILURE++, ","));
}
else if (key.substring(0, 3) === 'ter') {
console.log(" \"" + key + "\": " + startingFromTerRETRY++ + ",");
console.log(" \"".concat(key, "\": ").concat(startingFromTerRETRY++, ","));
}
else if (key.substring(0, 3) === 'tes') {
console.log(" \"" + key + "\": " + tesSUCCESS + ",");
console.log(" \"".concat(key, "\": ").concat(tesSUCCESS, ","));
}

@@ -125,5 +125,5 @@ else if (key.substring(0, 3) === 'tec') {

}
console.log(" \"" + key + "\": " + startingFromTecCLAIM++ + ",");
console.log(" \"".concat(key, "\": ").concat(startingFromTecCLAIM++, ","));
}
});
//# sourceMappingURL=utils-renumber.js.map

@@ -23,3 +23,3 @@ "use strict";

var exponent = decimal.e - 15;
var qualityString = decimal.times("1e" + -exponent).abs().toString();
var qualityString = decimal.times("1e".concat(-exponent)).abs().toString();
var bytes = types_1.coreTypes.UInt64.from(bigInt(qualityString)).toBytes();

@@ -38,4 +38,4 @@ bytes[0] = exponent + 100;

var exponent = bytes[0] - 100;
var mantissa = new decimal_js_1.Decimal("0x" + bytes.slice(1).toString('hex'));
return mantissa.times("1e" + exponent);
var mantissa = new decimal_js_1.Decimal("0x".concat(bytes.slice(1).toString('hex')));
return mantissa.times("1e".concat(exponent));
};

@@ -42,0 +42,0 @@ return quality;

@@ -162,3 +162,3 @@ "use strict";

if (!type) {
throw new Error("unsupported: (" + field.name + ", " + field.type.name + ")");
throw new Error("unsupported: (".concat(field.name, ", ").concat(field.type.name, ")"));
}

@@ -170,3 +170,3 @@ var sizeHint = field.isVariableLengthEncoded

if (value === undefined) {
throw new Error("fromParser for (" + field.name + ", " + field.type.name + ") -> undefined ");
throw new Error("fromParser for (".concat(field.name, ", ").concat(field.type.name, ") -> undefined "));
}

@@ -173,0 +173,0 @@ return value;

@@ -143,4 +143,6 @@ "use strict";

var bytes = new BytesList();
if (!isUnlModifyWorkaround)
if (!isUnlModifyWorkaround) {
// this part doesn't happen for the Account field in a UNLModify transaction
value.toBytesSink(bytes);
}
this.put(this.encodeVariableLength(bytes.getLength()));

@@ -147,0 +149,0 @@ this.writeBytesList(bytes);

@@ -90,3 +90,3 @@ "use strict";

var integerNumberString = number
.times("1e" + -(number.e - 15))
.times("1e".concat(-(number.e - 15)))
.abs()

@@ -139,3 +139,3 @@ .toString();

var num = msb.shiftLeft(32).or(lsb);
return "" + sign + num.toString();
return "".concat(sign).concat(num.toString());
}

@@ -154,3 +154,3 @@ else {

mantissa[1] &= 0x3f;
var value = new decimal_js_1.Decimal(sign + "0x" + mantissa.toString('hex')).times("1e" + exponent);
var value = new decimal_js_1.Decimal("".concat(sign, "0x").concat(mantissa.toString('hex'))).times("1e".concat(exponent));
Amount.assertIouIsValid(value);

@@ -172,3 +172,3 @@ return {

if (amount.indexOf('.') !== -1) {
throw new Error(amount.toString() + " is an illegal amount");
throw new Error("".concat(amount.toString(), " is an illegal amount"));
}

@@ -178,3 +178,3 @@ var decimal = new decimal_js_1.Decimal(amount);

if (decimal.lt(MIN_XRP) || decimal.gt(MAX_DROPS)) {
throw new Error(amount.toString() + " is an illegal amount");
throw new Error("".concat(amount.toString(), " is an illegal amount"));
}

@@ -210,3 +210,3 @@ }

var integerNumberString = decimal
.times("1e" + -(decimal.e - 15))
.times("1e".concat(-(decimal.e - 15)))
.abs()

@@ -213,0 +213,0 @@ .toString();

@@ -81,3 +81,3 @@ "use strict";

if (!isValidRepresentation(input)) {
throw new Error("Unsupported Currency representation: " + input);
throw new Error("Unsupported Currency representation: ".concat(input));
}

@@ -84,0 +84,0 @@ return input.length === 3 ? isoToBytes(input) : buffer_1.Buffer.from(input, 'hex');

@@ -29,3 +29,3 @@ "use strict";

if (_this.bytes.byteLength !== _this.constructor.width) {
throw new Error("Invalid Hash length " + _this.bytes.byteLength);
throw new Error("Invalid Hash length ".concat(_this.bytes.byteLength));
}

@@ -32,0 +32,0 @@ return _this;

@@ -113,3 +113,3 @@ "use strict";

Comparable.prototype.compareTo = function (other) {
throw new Error("cannot compare " + this.toString() + " and " + other.toString());
throw new Error("cannot compare ".concat(this.toString(), " and ").concat(other.toString()));
};

@@ -116,0 +116,0 @@ return Comparable;

@@ -47,3 +47,3 @@ "use strict";

else if (decoded.tag !== false)
throw new Error(field + " cannot have an associated tag");
throw new Error("".concat(field, " cannot have an associated tag"));
return decoded.tag !== false

@@ -135,4 +135,8 @@ ? (_a = {}, _a[field] = decoded.classicAddress, _a[tagName] = decoded.tag, _a) : (_b = {}, _b[field] = decoded.classicAddress, _b);

if (associatedValue.name === 'UNLModify') {
// triggered when the TransactionType field has a value of 'UNLModify'
isUnlModify = true;
}
// true when in the UNLModify pseudotransaction (after the transaction type has been processed) and working with the
// Account field
// The Account field must not be a part of the UNLModify pseudotransaction encoding, due to a bug in rippled
var isUnlModifyWorkaround = field.name == 'Account' && isUnlModify;

@@ -139,0 +143,0 @@ bytes.writeFieldAndValue(field, associatedValue, isUnlModifyWorkaround);

@@ -59,3 +59,3 @@ "use strict";

if (!HEX_REGEX.test(val)) {
throw new Error(val + " is not a valid hex-string");
throw new Error("".concat(val, " is not a valid hex-string"));
}

@@ -62,0 +62,0 @@ var strBuf = val.padStart(16, '0');

{
"name": "ripple-binary-codec",
"version": "1.2.1-beta.0",
"version": "1.2.1",
"description": "XRP Ledger binary codec",

@@ -20,3 +20,3 @@ "files": [

"decimal.js": "^10.2.0",
"ripple-address-codec": "^4.2.1-beta.0"
"ripple-address-codec": "^4.2.1"
},

@@ -44,5 +44,5 @@ "scripts": {

"engines": {
"node": ">=10.22.0",
"npm": ">=7.0.0"
}
"node": ">=10.22.0"
},
"gitHead": "7c6230b18ec2ed031c7e379ffb94e34b940b6542"
}

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

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

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

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