ripple-binary-codec
Advanced tools
Comparing version 1.0.3 to 1.0.4-beta.0
@@ -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 @@ { |
{ | ||
"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, { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1080116
144
16567
1