@transia/ripple-binary-codec 1.4.6-alpha.2 → 1.4.6-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enums/definitions.json +187 -1
- package/dist/enums/src/enums/definitions.json +187 -1
- package/package.json +2 -2
- package/test/binary-serializer.test.js +18 -0
- package/test/definitions.test.js +1 -1
- package/test/fixtures/unl-report-binary.json +1 -0
- package/test/fixtures/unl-report-meta-binary.json +1 -0
- package/test/fixtures/unl-report.json +89 -0
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"LedgerHashes": 104,
|
|
38
38
|
"Amendments": 102,
|
|
39
39
|
"FeeSettings": 115,
|
|
40
|
+
"ImportVlseq": 73,
|
|
40
41
|
"Escrow": 117,
|
|
41
42
|
"PayChannel": 120,
|
|
42
43
|
"Check": 67,
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"NFTokenPage": 80,
|
|
46
47
|
"NFTokenOffer": 55,
|
|
47
48
|
"URIToken": 85,
|
|
49
|
+
"UNLReport": 82,
|
|
48
50
|
"Any": -3,
|
|
49
51
|
"Child": -2,
|
|
50
52
|
"Nickname": 110,
|
|
@@ -796,6 +798,16 @@
|
|
|
796
798
|
"type": "UInt32"
|
|
797
799
|
}
|
|
798
800
|
],
|
|
801
|
+
[
|
|
802
|
+
"XahauActivationLgrSeq",
|
|
803
|
+
{
|
|
804
|
+
"nth": 96,
|
|
805
|
+
"isVLEncoded": false,
|
|
806
|
+
"isSerialized": true,
|
|
807
|
+
"isSigningField": true,
|
|
808
|
+
"type": "UInt32"
|
|
809
|
+
}
|
|
810
|
+
],
|
|
799
811
|
[
|
|
800
812
|
"ImportSequence",
|
|
801
813
|
{
|
|
@@ -806,6 +818,36 @@
|
|
|
806
818
|
"type": "UInt32"
|
|
807
819
|
}
|
|
808
820
|
],
|
|
821
|
+
[
|
|
822
|
+
"RewardTime",
|
|
823
|
+
{
|
|
824
|
+
"nth": 98,
|
|
825
|
+
"isVLEncoded": false,
|
|
826
|
+
"isSerialized": true,
|
|
827
|
+
"isSigningField": true,
|
|
828
|
+
"type": "UInt32"
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
[
|
|
832
|
+
"RewardLgrFirst",
|
|
833
|
+
{
|
|
834
|
+
"nth": 99,
|
|
835
|
+
"isVLEncoded": false,
|
|
836
|
+
"isSerialized": true,
|
|
837
|
+
"isSigningField": true,
|
|
838
|
+
"type": "UInt32"
|
|
839
|
+
}
|
|
840
|
+
],
|
|
841
|
+
[
|
|
842
|
+
"RewardLgrLast",
|
|
843
|
+
{
|
|
844
|
+
"nth": 100,
|
|
845
|
+
"isVLEncoded": false,
|
|
846
|
+
"isSerialized": true,
|
|
847
|
+
"isSigningField": true,
|
|
848
|
+
"type": "UInt32"
|
|
849
|
+
}
|
|
850
|
+
],
|
|
809
851
|
[
|
|
810
852
|
"IndexNext",
|
|
811
853
|
{
|
|
@@ -966,6 +1008,36 @@
|
|
|
966
1008
|
"type": "UInt64"
|
|
967
1009
|
}
|
|
968
1010
|
],
|
|
1011
|
+
[
|
|
1012
|
+
"AccountIndex",
|
|
1013
|
+
{
|
|
1014
|
+
"nth": 98,
|
|
1015
|
+
"isVLEncoded": false,
|
|
1016
|
+
"isSerialized": true,
|
|
1017
|
+
"isSigningField": true,
|
|
1018
|
+
"type": "UInt64"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
[
|
|
1022
|
+
"AccountCount",
|
|
1023
|
+
{
|
|
1024
|
+
"nth": 99,
|
|
1025
|
+
"isVLEncoded": false,
|
|
1026
|
+
"isSerialized": true,
|
|
1027
|
+
"isSigningField": true,
|
|
1028
|
+
"type": "UInt64"
|
|
1029
|
+
}
|
|
1030
|
+
],
|
|
1031
|
+
[
|
|
1032
|
+
"RewardAccumulator",
|
|
1033
|
+
{
|
|
1034
|
+
"nth": 100,
|
|
1035
|
+
"isVLEncoded": false,
|
|
1036
|
+
"isSerialized": true,
|
|
1037
|
+
"isSigningField": true,
|
|
1038
|
+
"type": "UInt64"
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
969
1041
|
[
|
|
970
1042
|
"EmailHash",
|
|
971
1043
|
{
|
|
@@ -1356,6 +1428,36 @@
|
|
|
1356
1428
|
"type": "Hash256"
|
|
1357
1429
|
}
|
|
1358
1430
|
],
|
|
1431
|
+
[
|
|
1432
|
+
"GovernanceFlags",
|
|
1433
|
+
{
|
|
1434
|
+
"nth": 99,
|
|
1435
|
+
"isVLEncoded": false,
|
|
1436
|
+
"isSerialized": true,
|
|
1437
|
+
"isSigningField": true,
|
|
1438
|
+
"type": "Hash256"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
[
|
|
1442
|
+
"GovernanceMarks",
|
|
1443
|
+
{
|
|
1444
|
+
"nth": 98,
|
|
1445
|
+
"isVLEncoded": false,
|
|
1446
|
+
"isSerialized": true,
|
|
1447
|
+
"isSigningField": true,
|
|
1448
|
+
"type": "Hash256"
|
|
1449
|
+
}
|
|
1450
|
+
],
|
|
1451
|
+
[
|
|
1452
|
+
"EmittedTxnID",
|
|
1453
|
+
{
|
|
1454
|
+
"nth": 97,
|
|
1455
|
+
"isVLEncoded": false,
|
|
1456
|
+
"isSerialized": true,
|
|
1457
|
+
"isSigningField": true,
|
|
1458
|
+
"type": "Hash256"
|
|
1459
|
+
}
|
|
1460
|
+
],
|
|
1359
1461
|
[
|
|
1360
1462
|
"Amount",
|
|
1361
1463
|
{
|
|
@@ -2166,6 +2268,46 @@
|
|
|
2166
2268
|
"type": "STObject"
|
|
2167
2269
|
}
|
|
2168
2270
|
],
|
|
2271
|
+
[
|
|
2272
|
+
"GenesisMint",
|
|
2273
|
+
{
|
|
2274
|
+
"nth": 96,
|
|
2275
|
+
"isVLEncoded": false,
|
|
2276
|
+
"isSerialized": true,
|
|
2277
|
+
"isSigningField": true,
|
|
2278
|
+
"type": "STObject"
|
|
2279
|
+
}
|
|
2280
|
+
],
|
|
2281
|
+
[
|
|
2282
|
+
"ActiveValidator",
|
|
2283
|
+
{
|
|
2284
|
+
"nth": 95,
|
|
2285
|
+
"isVLEncoded": false,
|
|
2286
|
+
"isSerialized": true,
|
|
2287
|
+
"isSigningField": true,
|
|
2288
|
+
"type": "STObject"
|
|
2289
|
+
}
|
|
2290
|
+
],
|
|
2291
|
+
[
|
|
2292
|
+
"ImportVLKey",
|
|
2293
|
+
{
|
|
2294
|
+
"nth": 94,
|
|
2295
|
+
"isVLEncoded": false,
|
|
2296
|
+
"isSerialized": true,
|
|
2297
|
+
"isSigningField": true,
|
|
2298
|
+
"type": "STObject"
|
|
2299
|
+
}
|
|
2300
|
+
],
|
|
2301
|
+
[
|
|
2302
|
+
"HookEmission",
|
|
2303
|
+
{
|
|
2304
|
+
"nth": 93,
|
|
2305
|
+
"isVLEncoded": false,
|
|
2306
|
+
"isSerialized": true,
|
|
2307
|
+
"isSigningField": true,
|
|
2308
|
+
"type": "STObject"
|
|
2309
|
+
}
|
|
2310
|
+
],
|
|
2169
2311
|
[
|
|
2170
2312
|
"Signers",
|
|
2171
2313
|
{
|
|
@@ -2305,6 +2447,46 @@
|
|
|
2305
2447
|
"isSigningField": true,
|
|
2306
2448
|
"type": "STArray"
|
|
2307
2449
|
}
|
|
2450
|
+
],
|
|
2451
|
+
[
|
|
2452
|
+
"GenesisMints",
|
|
2453
|
+
{
|
|
2454
|
+
"nth": 96,
|
|
2455
|
+
"isVLEncoded": false,
|
|
2456
|
+
"isSerialized": true,
|
|
2457
|
+
"isSigningField": true,
|
|
2458
|
+
"type": "STArray"
|
|
2459
|
+
}
|
|
2460
|
+
],
|
|
2461
|
+
[
|
|
2462
|
+
"ActiveValidators",
|
|
2463
|
+
{
|
|
2464
|
+
"nth": 95,
|
|
2465
|
+
"isVLEncoded": false,
|
|
2466
|
+
"isSerialized": true,
|
|
2467
|
+
"isSigningField": true,
|
|
2468
|
+
"type": "STArray"
|
|
2469
|
+
}
|
|
2470
|
+
],
|
|
2471
|
+
[
|
|
2472
|
+
"ImportVLKeys",
|
|
2473
|
+
{
|
|
2474
|
+
"nth": 94,
|
|
2475
|
+
"isVLEncoded": false,
|
|
2476
|
+
"isSerialized": true,
|
|
2477
|
+
"isSigningField": true,
|
|
2478
|
+
"type": "STArray"
|
|
2479
|
+
}
|
|
2480
|
+
],
|
|
2481
|
+
[
|
|
2482
|
+
"HookEmissions",
|
|
2483
|
+
{
|
|
2484
|
+
"nth": 93,
|
|
2485
|
+
"isVLEncoded": false,
|
|
2486
|
+
"isSerialized": true,
|
|
2487
|
+
"isSigningField": true,
|
|
2488
|
+
"type": "STArray"
|
|
2489
|
+
}
|
|
2308
2490
|
]
|
|
2309
2491
|
],
|
|
2310
2492
|
"TRANSACTION_RESULTS": {
|
|
@@ -2397,6 +2579,7 @@
|
|
|
2397
2579
|
"tefNO_TICKET": -180,
|
|
2398
2580
|
"tefNFTOKEN_IS_NOT_TRANSFERABLE": -179,
|
|
2399
2581
|
"tefPAST_IMPORT_SEQ": -178,
|
|
2582
|
+
"tefPAST_IMPORT_VL_SEQ": -177,
|
|
2400
2583
|
"terRETRY": -99,
|
|
2401
2584
|
"terFUNDS_SPENT": -98,
|
|
2402
2585
|
"terINSUF_FEE_B": -97,
|
|
@@ -2521,11 +2704,14 @@
|
|
|
2521
2704
|
"URITokenBuy": 47,
|
|
2522
2705
|
"URITokenCreateSellOffer": 48,
|
|
2523
2706
|
"URITokenCancelSellOffer": 49,
|
|
2707
|
+
"GenesisMint": 96,
|
|
2524
2708
|
"Import": 97,
|
|
2709
|
+
"ClaimReward": 98,
|
|
2525
2710
|
"Invoke": 99,
|
|
2526
2711
|
"EnableAmendment": 100,
|
|
2527
2712
|
"SetFee": 101,
|
|
2528
2713
|
"UNLModify": 102,
|
|
2529
|
-
"EmitFailure": 103
|
|
2714
|
+
"EmitFailure": 103,
|
|
2715
|
+
"UNLReport": 104
|
|
2530
2716
|
}
|
|
2531
2717
|
}
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"LedgerHashes": 104,
|
|
38
38
|
"Amendments": 102,
|
|
39
39
|
"FeeSettings": 115,
|
|
40
|
+
"ImportVlseq": 73,
|
|
40
41
|
"Escrow": 117,
|
|
41
42
|
"PayChannel": 120,
|
|
42
43
|
"Check": 67,
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"NFTokenPage": 80,
|
|
46
47
|
"NFTokenOffer": 55,
|
|
47
48
|
"URIToken": 85,
|
|
49
|
+
"UNLReport": 82,
|
|
48
50
|
"Any": -3,
|
|
49
51
|
"Child": -2,
|
|
50
52
|
"Nickname": 110,
|
|
@@ -796,6 +798,16 @@
|
|
|
796
798
|
"type": "UInt32"
|
|
797
799
|
}
|
|
798
800
|
],
|
|
801
|
+
[
|
|
802
|
+
"XahauActivationLgrSeq",
|
|
803
|
+
{
|
|
804
|
+
"nth": 96,
|
|
805
|
+
"isVLEncoded": false,
|
|
806
|
+
"isSerialized": true,
|
|
807
|
+
"isSigningField": true,
|
|
808
|
+
"type": "UInt32"
|
|
809
|
+
}
|
|
810
|
+
],
|
|
799
811
|
[
|
|
800
812
|
"ImportSequence",
|
|
801
813
|
{
|
|
@@ -806,6 +818,36 @@
|
|
|
806
818
|
"type": "UInt32"
|
|
807
819
|
}
|
|
808
820
|
],
|
|
821
|
+
[
|
|
822
|
+
"RewardTime",
|
|
823
|
+
{
|
|
824
|
+
"nth": 98,
|
|
825
|
+
"isVLEncoded": false,
|
|
826
|
+
"isSerialized": true,
|
|
827
|
+
"isSigningField": true,
|
|
828
|
+
"type": "UInt32"
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
[
|
|
832
|
+
"RewardLgrFirst",
|
|
833
|
+
{
|
|
834
|
+
"nth": 99,
|
|
835
|
+
"isVLEncoded": false,
|
|
836
|
+
"isSerialized": true,
|
|
837
|
+
"isSigningField": true,
|
|
838
|
+
"type": "UInt32"
|
|
839
|
+
}
|
|
840
|
+
],
|
|
841
|
+
[
|
|
842
|
+
"RewardLgrLast",
|
|
843
|
+
{
|
|
844
|
+
"nth": 100,
|
|
845
|
+
"isVLEncoded": false,
|
|
846
|
+
"isSerialized": true,
|
|
847
|
+
"isSigningField": true,
|
|
848
|
+
"type": "UInt32"
|
|
849
|
+
}
|
|
850
|
+
],
|
|
809
851
|
[
|
|
810
852
|
"IndexNext",
|
|
811
853
|
{
|
|
@@ -966,6 +1008,36 @@
|
|
|
966
1008
|
"type": "UInt64"
|
|
967
1009
|
}
|
|
968
1010
|
],
|
|
1011
|
+
[
|
|
1012
|
+
"AccountIndex",
|
|
1013
|
+
{
|
|
1014
|
+
"nth": 98,
|
|
1015
|
+
"isVLEncoded": false,
|
|
1016
|
+
"isSerialized": true,
|
|
1017
|
+
"isSigningField": true,
|
|
1018
|
+
"type": "UInt64"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
[
|
|
1022
|
+
"AccountCount",
|
|
1023
|
+
{
|
|
1024
|
+
"nth": 99,
|
|
1025
|
+
"isVLEncoded": false,
|
|
1026
|
+
"isSerialized": true,
|
|
1027
|
+
"isSigningField": true,
|
|
1028
|
+
"type": "UInt64"
|
|
1029
|
+
}
|
|
1030
|
+
],
|
|
1031
|
+
[
|
|
1032
|
+
"RewardAccumulator",
|
|
1033
|
+
{
|
|
1034
|
+
"nth": 100,
|
|
1035
|
+
"isVLEncoded": false,
|
|
1036
|
+
"isSerialized": true,
|
|
1037
|
+
"isSigningField": true,
|
|
1038
|
+
"type": "UInt64"
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
969
1041
|
[
|
|
970
1042
|
"EmailHash",
|
|
971
1043
|
{
|
|
@@ -1356,6 +1428,36 @@
|
|
|
1356
1428
|
"type": "Hash256"
|
|
1357
1429
|
}
|
|
1358
1430
|
],
|
|
1431
|
+
[
|
|
1432
|
+
"GovernanceFlags",
|
|
1433
|
+
{
|
|
1434
|
+
"nth": 99,
|
|
1435
|
+
"isVLEncoded": false,
|
|
1436
|
+
"isSerialized": true,
|
|
1437
|
+
"isSigningField": true,
|
|
1438
|
+
"type": "Hash256"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
[
|
|
1442
|
+
"GovernanceMarks",
|
|
1443
|
+
{
|
|
1444
|
+
"nth": 98,
|
|
1445
|
+
"isVLEncoded": false,
|
|
1446
|
+
"isSerialized": true,
|
|
1447
|
+
"isSigningField": true,
|
|
1448
|
+
"type": "Hash256"
|
|
1449
|
+
}
|
|
1450
|
+
],
|
|
1451
|
+
[
|
|
1452
|
+
"EmittedTxnID",
|
|
1453
|
+
{
|
|
1454
|
+
"nth": 97,
|
|
1455
|
+
"isVLEncoded": false,
|
|
1456
|
+
"isSerialized": true,
|
|
1457
|
+
"isSigningField": true,
|
|
1458
|
+
"type": "Hash256"
|
|
1459
|
+
}
|
|
1460
|
+
],
|
|
1359
1461
|
[
|
|
1360
1462
|
"Amount",
|
|
1361
1463
|
{
|
|
@@ -2166,6 +2268,46 @@
|
|
|
2166
2268
|
"type": "STObject"
|
|
2167
2269
|
}
|
|
2168
2270
|
],
|
|
2271
|
+
[
|
|
2272
|
+
"GenesisMint",
|
|
2273
|
+
{
|
|
2274
|
+
"nth": 96,
|
|
2275
|
+
"isVLEncoded": false,
|
|
2276
|
+
"isSerialized": true,
|
|
2277
|
+
"isSigningField": true,
|
|
2278
|
+
"type": "STObject"
|
|
2279
|
+
}
|
|
2280
|
+
],
|
|
2281
|
+
[
|
|
2282
|
+
"ActiveValidator",
|
|
2283
|
+
{
|
|
2284
|
+
"nth": 95,
|
|
2285
|
+
"isVLEncoded": false,
|
|
2286
|
+
"isSerialized": true,
|
|
2287
|
+
"isSigningField": true,
|
|
2288
|
+
"type": "STObject"
|
|
2289
|
+
}
|
|
2290
|
+
],
|
|
2291
|
+
[
|
|
2292
|
+
"ImportVLKey",
|
|
2293
|
+
{
|
|
2294
|
+
"nth": 94,
|
|
2295
|
+
"isVLEncoded": false,
|
|
2296
|
+
"isSerialized": true,
|
|
2297
|
+
"isSigningField": true,
|
|
2298
|
+
"type": "STObject"
|
|
2299
|
+
}
|
|
2300
|
+
],
|
|
2301
|
+
[
|
|
2302
|
+
"HookEmission",
|
|
2303
|
+
{
|
|
2304
|
+
"nth": 93,
|
|
2305
|
+
"isVLEncoded": false,
|
|
2306
|
+
"isSerialized": true,
|
|
2307
|
+
"isSigningField": true,
|
|
2308
|
+
"type": "STObject"
|
|
2309
|
+
}
|
|
2310
|
+
],
|
|
2169
2311
|
[
|
|
2170
2312
|
"Signers",
|
|
2171
2313
|
{
|
|
@@ -2305,6 +2447,46 @@
|
|
|
2305
2447
|
"isSigningField": true,
|
|
2306
2448
|
"type": "STArray"
|
|
2307
2449
|
}
|
|
2450
|
+
],
|
|
2451
|
+
[
|
|
2452
|
+
"GenesisMints",
|
|
2453
|
+
{
|
|
2454
|
+
"nth": 96,
|
|
2455
|
+
"isVLEncoded": false,
|
|
2456
|
+
"isSerialized": true,
|
|
2457
|
+
"isSigningField": true,
|
|
2458
|
+
"type": "STArray"
|
|
2459
|
+
}
|
|
2460
|
+
],
|
|
2461
|
+
[
|
|
2462
|
+
"ActiveValidators",
|
|
2463
|
+
{
|
|
2464
|
+
"nth": 95,
|
|
2465
|
+
"isVLEncoded": false,
|
|
2466
|
+
"isSerialized": true,
|
|
2467
|
+
"isSigningField": true,
|
|
2468
|
+
"type": "STArray"
|
|
2469
|
+
}
|
|
2470
|
+
],
|
|
2471
|
+
[
|
|
2472
|
+
"ImportVLKeys",
|
|
2473
|
+
{
|
|
2474
|
+
"nth": 94,
|
|
2475
|
+
"isVLEncoded": false,
|
|
2476
|
+
"isSerialized": true,
|
|
2477
|
+
"isSigningField": true,
|
|
2478
|
+
"type": "STArray"
|
|
2479
|
+
}
|
|
2480
|
+
],
|
|
2481
|
+
[
|
|
2482
|
+
"HookEmissions",
|
|
2483
|
+
{
|
|
2484
|
+
"nth": 93,
|
|
2485
|
+
"isVLEncoded": false,
|
|
2486
|
+
"isSerialized": true,
|
|
2487
|
+
"isSigningField": true,
|
|
2488
|
+
"type": "STArray"
|
|
2489
|
+
}
|
|
2308
2490
|
]
|
|
2309
2491
|
],
|
|
2310
2492
|
"TRANSACTION_RESULTS": {
|
|
@@ -2399,6 +2581,7 @@
|
|
|
2399
2581
|
"tefNO_TICKET": -180,
|
|
2400
2582
|
"tefNFTOKEN_IS_NOT_TRANSFERABLE": -179,
|
|
2401
2583
|
"tefPAST_IMPORT_SEQ": -178,
|
|
2584
|
+
"tefPAST_IMPORT_VL_SEQ": -177,
|
|
2402
2585
|
|
|
2403
2586
|
"terRETRY": -99,
|
|
2404
2587
|
"terFUNDS_SPENT": -98,
|
|
@@ -2526,11 +2709,14 @@
|
|
|
2526
2709
|
"URITokenBuy": 47,
|
|
2527
2710
|
"URITokenCreateSellOffer": 48,
|
|
2528
2711
|
"URITokenCancelSellOffer": 49,
|
|
2712
|
+
"GenesisMint": 96,
|
|
2529
2713
|
"Import": 97,
|
|
2714
|
+
"ClaimReward": 98,
|
|
2530
2715
|
"Invoke": 99,
|
|
2531
2716
|
"EnableAmendment": 100,
|
|
2532
2717
|
"SetFee": 101,
|
|
2533
2718
|
"UNLModify": 102,
|
|
2534
|
-
"EmitFailure": 103
|
|
2719
|
+
"EmitFailure": 103,
|
|
2720
|
+
"UNLReport": 104
|
|
2535
2721
|
}
|
|
2536
2722
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transia/ripple-binary-codec",
|
|
3
|
-
"version": "1.4.6-alpha.
|
|
3
|
+
"version": "1.4.6-alpha.4",
|
|
4
4
|
"description": "XRP Ledger binary codec",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">= 10"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e24cbccc2bcf3a64b09a19033718cae0d8c7b8a2"
|
|
44
44
|
}
|
|
@@ -105,6 +105,11 @@ let json_omitted = {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
const NegativeUNL = require('./fixtures/negative-unl.json')
|
|
108
|
+
const UNLReport = {
|
|
109
|
+
tx: require('./fixtures/unl-report.json'),
|
|
110
|
+
binary: require('./fixtures/unl-report-binary.json'),
|
|
111
|
+
meta: require('./fixtures/unl-report-meta-binary.json'),
|
|
112
|
+
}
|
|
108
113
|
|
|
109
114
|
function bytesListTest() {
|
|
110
115
|
const list = new BytesList()
|
|
@@ -229,6 +234,18 @@ function NegativeUNLTest() {
|
|
|
229
234
|
})
|
|
230
235
|
}
|
|
231
236
|
|
|
237
|
+
function UNLReportTest() {
|
|
238
|
+
test('can serialize UNLReport', () => {
|
|
239
|
+
expect(encode(UNLReport.tx)).toEqual(UNLReport.binary)
|
|
240
|
+
})
|
|
241
|
+
test('can serialize UNLReport metadata', () => {
|
|
242
|
+
expect(encode(UNLReport.tx.meta)).toEqual(UNLReport.meta)
|
|
243
|
+
})
|
|
244
|
+
test('can deserialize UNLReport metadata', () => {
|
|
245
|
+
expect(decode(UNLReport.meta)).toEqual(UNLReport.tx.meta)
|
|
246
|
+
})
|
|
247
|
+
}
|
|
248
|
+
|
|
232
249
|
function omitUndefinedTest() {
|
|
233
250
|
test('omits fields with undefined value', () => {
|
|
234
251
|
let encodedOmitted = encode(json_omitted)
|
|
@@ -286,4 +303,5 @@ describe('Binary Serialization', function () {
|
|
|
286
303
|
describe('OmitUndefined', omitUndefinedTest)
|
|
287
304
|
describe('TicketTest', ticketTest)
|
|
288
305
|
describe('NFToken', nfTokenTest)
|
|
306
|
+
describe('UNLReport', UNLReportTest)
|
|
289
307
|
})
|
package/test/definitions.test.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"120068240000000026006D2E00684000000000000000730081140000000000000000000000000000000000000000E05F7121ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655E1"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"201C00000000F8E51100525661E32E7A24A238F1C619D5F9DDCC41A94B33B66C0163F7EFCC8A19C9FD6F28DCE6F05FE05F7121ED3ABC6740983BFB13FFD9728EBCC365A2877877D368FC28990819522300C92A698114A53F8465478D79DC0C764F0FB2B67AE92465FD5EE1E05F7121ED49F82B2FFD537F224A1E0A10DEEFC3C25CE3882979E6B327C9F18603D21F0A2281142BF2A77E25382EC1DEF521D81D24BC0FDD35BC9BE1E05F7121ED79EB0F6A9F01A039235E536D19F812B55ACF540C9E22CF62C271E0D42BFF51748114C45147960400DB6B763110CBCE8D641E9365F24EE1E05F7121ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655811408BCFB092DEE1BF0F2662AECE4DCC62C4AECCB8AE1E05F7121ED96F581FED430E8CBE1F08B37408857001D4118D49FBB594B0BE007C2DBFFD3678114A4EF485B50A7D91DF45450A680FAC31C53367B2DE1E05F7121EDCF31B8F683345E1C49B4A1D85BF2731E55E7D6781F3D4BF45EE7ADF2D2FB340281144D854497B48F1A41EF04E09DB656A11AAD01A703E1E05F7121EDDF197FC59A7FAA09EB1AD60A4638BA6201DD51497B5C08A1745115098E229E0E811446550CBD2B655081662AE3159B0488DE27EC0592E1F1E1E72200000000F05EE05E7121ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860811478339DD5880A994A5CB6E56CB7ED13FEEF201928E1F1F05FE05F7121ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655811408BCFB092DEE1BF0F2662AECE4DCC62C4AECCB8AE1F1E1E1F1031000"
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Account": "",
|
|
3
|
+
"ActiveValidator": {
|
|
4
|
+
"PublicKey": "ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655"
|
|
5
|
+
},
|
|
6
|
+
"Fee": "0",
|
|
7
|
+
"LedgerSequence": 7155200,
|
|
8
|
+
"Sequence": 0,
|
|
9
|
+
"SigningPubKey": "",
|
|
10
|
+
"TransactionType": "UNLReport",
|
|
11
|
+
"hash": "0878863F758F74A5CBD35691CDAB625A3BCD35B21B440E20545C4757DDB0CA43",
|
|
12
|
+
"meta": {
|
|
13
|
+
"AffectedNodes": [
|
|
14
|
+
{
|
|
15
|
+
"ModifiedNode": {
|
|
16
|
+
"FinalFields": {
|
|
17
|
+
"ActiveValidators": [
|
|
18
|
+
{
|
|
19
|
+
"ActiveValidator": {
|
|
20
|
+
"Account": "roUo3ygV92bdhfE1v9LGpPETXvJv2kQv5",
|
|
21
|
+
"PublicKey": "ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"Flags": 0,
|
|
26
|
+
"ImportVLKeys": [
|
|
27
|
+
{
|
|
28
|
+
"ImportVLKey": {
|
|
29
|
+
"Account": "rBxZvQBY551DJ21g9AC1Qc9ASQowqcskbF",
|
|
30
|
+
"PublicKey": "ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"LedgerEntryType": "UNLReport",
|
|
36
|
+
"LedgerIndex": "61E32E7A24A238F1C619D5F9DDCC41A94B33B66C0163F7EFCC8A19C9FD6F28DC",
|
|
37
|
+
"PreviousFields": {
|
|
38
|
+
"ActiveValidators": [
|
|
39
|
+
{
|
|
40
|
+
"ActiveValidator": {
|
|
41
|
+
"Account": "rGhk2uLd8ShzX2Zrcgn8sQk1LWBG4jjEwf",
|
|
42
|
+
"PublicKey": "ED3ABC6740983BFB13FFD9728EBCC365A2877877D368FC28990819522300C92A69"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"ActiveValidator": {
|
|
47
|
+
"Account": "rnr4kwS1VkJhvjVRuq2fbWZtEdN2HbpVVu",
|
|
48
|
+
"PublicKey": "ED49F82B2FFD537F224A1E0A10DEEFC3C25CE3882979E6B327C9F18603D21F0A22"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"ActiveValidator": {
|
|
53
|
+
"Account": "rJupFrPPYgUNFBdoSqhMEJ22hiHKiZSHXQ",
|
|
54
|
+
"PublicKey": "ED79EB0F6A9F01A039235E536D19F812B55ACF540C9E22CF62C271E0D42BFF5174"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"ActiveValidator": {
|
|
59
|
+
"Account": "roUo3ygV92bdhfE1v9LGpPETXvJv2kQv5",
|
|
60
|
+
"PublicKey": "ED93B2BE467CAD2F9F56FB3A82BDFF17F84B09E34232DDE8FAF2FC72382F142655"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"ActiveValidator": {
|
|
65
|
+
"Account": "rGsa7f4arJ8JE9ok9LCht6jCu5xBKUKVMq",
|
|
66
|
+
"PublicKey": "ED96F581FED430E8CBE1F08B37408857001D4118D49FBB594B0BE007C2DBFFD367"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"ActiveValidator": {
|
|
71
|
+
"Account": "r3htgPchiR2r8kMGzPK3Wfv3WTrpaRKjtU",
|
|
72
|
+
"PublicKey": "EDCF31B8F683345E1C49B4A1D85BF2731E55E7D6781F3D4BF45EE7ADF2D2FB3402"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"ActiveValidator": {
|
|
77
|
+
"Account": "rfQtB8m51sdbWgcmddRX2mMjMpSxzX1AGr",
|
|
78
|
+
"PublicKey": "EDDF197FC59A7FAA09EB1AD60A4638BA6201DD51497B5C08A1745115098E229E0E"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"TransactionIndex": 0,
|
|
87
|
+
"TransactionResult": "tesSUCCESS"
|
|
88
|
+
}
|
|
89
|
+
}
|