mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
add support for SignerListID and bump version to 0.1.4
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ripple-binary-codec",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "ripple binary codec",
|
||||
"files": [
|
||||
"distrib/npm/*",
|
||||
|
||||
@@ -1416,6 +1416,16 @@
|
||||
"isSigningField": false,
|
||||
"type": "Validation"
|
||||
}
|
||||
],
|
||||
[
|
||||
"SignerListID",
|
||||
{
|
||||
"nth": 38,
|
||||
"isVLEncoded": false,
|
||||
"isSerialized": true,
|
||||
"isSigningField": true,
|
||||
"type": "UInt32"
|
||||
}
|
||||
]
|
||||
],
|
||||
"TRANSACTION_RESULTS": {
|
||||
|
||||
@@ -10,6 +10,11 @@ const {loadFixture} = require('./utils');
|
||||
const fixtures = loadFixture('data-driven-tests.json');
|
||||
const deliverMinTx = require('./fixtures/delivermin-tx.json');
|
||||
const deliverMinTxBinary = require('./fixtures/delivermin-tx-binary.json');
|
||||
const SignerListSet = {
|
||||
tx: require('./fixtures/signerlistset-tx.json'),
|
||||
binary: require('./fixtures/signerlistset-tx-binary.json'),
|
||||
meta: require('./fixtures/signerlistset-tx-meta-binary.json')
|
||||
};
|
||||
|
||||
function bytesListTest() {
|
||||
const list = new BytesList().put([0]).put([2, 3]).put([4, 5]);
|
||||
@@ -92,10 +97,20 @@ function deliverMinTest() {
|
||||
});
|
||||
}
|
||||
|
||||
function SignerListSetTest() {
|
||||
it('can serialize SignerListSet', () => {
|
||||
assert.strictEqual(encode(SignerListSet.tx), SignerListSet.binary);
|
||||
});
|
||||
it('can serialize SignerListSet metadata', () => {
|
||||
assert.strictEqual(encode(SignerListSet.tx.meta), SignerListSet.meta);
|
||||
});
|
||||
}
|
||||
|
||||
describe('Binary Serialization', function() {
|
||||
describe.skip('parseLedger4320278', parseLedger4320278);
|
||||
describe('nestedObjectTests', nestedObjectTests);
|
||||
describe('UIntTest', UIntTest);
|
||||
describe('BytesList', bytesListTest);
|
||||
describe('DeliverMin', deliverMinTest);
|
||||
describe('SignerListSet', SignerListSetTest);
|
||||
});
|
||||
|
||||
1
packages/ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json
vendored
Normal file
1
packages/ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"12000C22800000002400003B49201B01724E3520230000000368400000000000000B73210315B15964B3704B171E860DE1FC914D283395EE825C8546AEEBF0D24A5802BBC574463044022069FC98D0BC32F510D4F94ECC726613E957D290050E428DD86EDA2C2515A1732D02207064EF085437B3F12A744AC6528D9E0C59FAA5A9FE903DF3639D2F09B522175F81144901F90028CEAD8AF389AC6FA0F83643DB67E95BF4EB1300018114EA97C2F7C88AE5735A59811F6F89E825B478982FE1EB1300018114B4AC72AF6C0EE5A1B8C94A3C20BE09599BBB57EEE1EB1300018114FA7420343B9EA7C9B294C3AF802AE80103F0B11BE1F1"
|
||||
1
packages/ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json
vendored
Normal file
1
packages/ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"201C00000008F8E51100612501724363554CD30C2526418A76ABED74713DF144B19F1B29BD8F7BC9EADCF16D33D7EC83D8560DAF42BEE40F0EEFCFD8D54E81ECACD9371D281CDD9B77384FCDAF0E16560A44E62400003B4962400000010F99515AE1E722000000002400003B4A2D0000001962400000010F99514F81144901F90028CEAD8AF389AC6FA0F83643DB67E95B8814CAA26A38FC8F4E5D6D142432B0D7D94A2880DDDFE1E1E51100535616F6AEEC6B85C9658B4BF604671677B7A7B2FAAFDB2FA5A0B72CBB49CAE80924E72200000000202300000003202600000000340000000000000000F4EB1300018114B4AC72AF6C0EE5A1B8C94A3C20BE09599BBB57EEE1EB1300018114EA97C2F7C88AE5735A59811F6F89E825B478982FE1EB1300018114FA7420343B9EA7C9B294C3AF802AE80103F0B11BE1F1E1E1F1031000"
|
||||
94
packages/ripple-binary-codec/test/fixtures/signerlistset-tx.json
vendored
Normal file
94
packages/ripple-binary-codec/test/fixtures/signerlistset-tx.json
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"Account": "rfCp6hiUS4qqN1i4hTyX4ogA49MEbXgCau",
|
||||
"Fee": "11",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 24268341,
|
||||
"Sequence": 15177,
|
||||
"SignerEntries": [
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "r4PQv7BCpp4SAJx3isNpQM8T2BuGrMQs5U",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "rH7KDR67MZR7LDV7gesmEMXtaqU3FaK7Lr",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "rPqHsX34XApKSfE4UxKbqVXb3WRmmgMY2u",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"SignerQuorum": 3,
|
||||
"SigningPubKey": "0315B15964B3704B171E860DE1FC914D283395EE825C8546AEEBF0D24A5802BBC5",
|
||||
"TransactionType": "SignerListSet",
|
||||
"TxnSignature": "3044022069FC98D0BC32F510D4F94ECC726613E957D290050E428DD86EDA2C2515A1732D02207064EF085437B3F12A744AC6528D9E0C59FAA5A9FE903DF3639D2F09B522175F",
|
||||
"date": 527847001,
|
||||
"hash": "98C33CABFAE9F830CE842C260E34C25B0F987EE691941C0C9225AD476871B73D",
|
||||
"inLedger": 24268339,
|
||||
"ledger_index": 24268339,
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rfCp6hiUS4qqN1i4hTyX4ogA49MEbXgCau",
|
||||
"Balance": "4556673359",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 25,
|
||||
"RegularKey": "rK7ShY9CeDMBHLNFSMtTrSAUd9uzwcymcL",
|
||||
"Sequence": 15178
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "0DAF42BEE40F0EEFCFD8D54E81ECACD9371D281CDD9B77384FCDAF0E16560A44",
|
||||
"PreviousFields": {
|
||||
"Balance": "4556673370",
|
||||
"Sequence": 15177
|
||||
},
|
||||
"PreviousTxnID": "4CD30C2526418A76ABED74713DF144B19F1B29BD8F7BC9EADCF16D33D7EC83D8",
|
||||
"PreviousTxnLgrSeq": 24265571
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"OwnerNode": "0000000000000000",
|
||||
"SignerEntries": [
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "rH7KDR67MZR7LDV7gesmEMXtaqU3FaK7Lr",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "r4PQv7BCpp4SAJx3isNpQM8T2BuGrMQs5U",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"SignerEntry": {
|
||||
"Account": "rPqHsX34XApKSfE4UxKbqVXb3WRmmgMY2u",
|
||||
"SignerWeight": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"SignerListID": 0,
|
||||
"SignerQuorum": 3
|
||||
},
|
||||
"LedgerEntryType": "SignerList",
|
||||
"LedgerIndex": "16F6AEEC6B85C9658B4BF604671677B7A7B2FAAFDB2FA5A0B72CBB49CAE80924"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 8,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
Reference in New Issue
Block a user