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

ripple-binary-codec

Package Overview
Dependencies
Maintainers
4
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.0.3 to 1.0.4-beta.0

test/fixtures/ticket-create-binary.json

20

dist/enums/definitions.json

@@ -448,2 +448,22 @@ {

[
"TicketCount",
{
"nth": 41,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"TicketSequence",
{
"nth": 42,
"isVLEncoded": false,
"isSerialized": true,
"isSigningField": true,
"type": "UInt32"
}
],
[
"IndexNext",

@@ -450,0 +470,0 @@ {

2

package.json
{
"name": "ripple-binary-codec",
"version": "1.0.3",
"version": "1.0.4-beta.0",
"description": "XRP Ledger binary codec",

@@ -5,0 +5,0 @@ "files": [

@@ -54,2 +54,9 @@ /* eslint-disable func-style */

const Ticket = {
create: {
tx: require("./fixtures/ticket-create-tx.json"),
binary: require("./fixtures/ticket-create-binary.json"),
},
};
let json_undefined = {

@@ -240,2 +247,8 @@ TakerPays: "223174650",

function ticketTest() {
test("can serialize TicketCreate", () => {
expect(encode(Ticket.create.tx)).toEqual(Ticket.create.binary);
});
}
describe("Binary Serialization", function () {

@@ -251,2 +264,3 @@ describe("nestedObjectTests", () => nestedObjectTests());

describe("OmitUndefined", () => omitUndefinedTest());
describe("TicketTest", () => ticketTest());
});

@@ -36,2 +36,19 @@ const { encode, decode } = require("../dist");

});
test("can encode tx_json with TicketCount", function () {
const my_tx = Object.assign({}, tx_json, {
TicketCount: 2,
});
const encoded = encode(my_tx);
const decoded = decode(encoded);
expect(my_tx).toEqual(decoded);
});
test("can encode tx_json with TicketSequence", function () {
const my_tx = Object.assign({}, tx_json, {
Sequence: 0,
TicketSequence: 2,
});
const encoded = encode(my_tx);
const decoded = decode(encoded);
expect(my_tx).toEqual(decoded);
});
test("throws when Amount is invalid", function () {

@@ -38,0 +55,0 @@ const my_tx = Object.assign({}, tx_json, {

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