@transia/ripple-binary-codec 1.4.6-alpha.1 → 1.4.6-alpha.10

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/binary.d.ts CHANGED
@@ -5,6 +5,7 @@ import { sha512Half, transactionID } from './hashes';
5
5
  import { type XrplDefinitionsBase } from './enums';
6
6
  import { JsonObject } from './types/serialized-type';
7
7
  import { Buffer } from 'buffer/';
8
+ import { AmountObject } from './types/amount';
8
9
  /**
9
10
  * Construct a BinaryParser
10
11
  *
@@ -67,7 +68,7 @@ declare function signingData(transaction: JsonObject, prefix?: Buffer, opts?: {
67
68
  */
68
69
  interface ClaimObject extends JsonObject {
69
70
  channel: string;
70
- amount: string | number;
71
+ amount: AmountObject;
71
72
  }
72
73
  /**
73
74
  * Serialize a signingClaim
package/dist/binary.js CHANGED
@@ -93,14 +93,20 @@ exports.signingData = signingData;
93
93
  * @returns the serialized object with appropriate prefix
94
94
  */
95
95
  function signingClaimData(claim) {
96
- const num = bigInt(String(claim.amount));
97
96
  const prefix = hash_prefixes_1.HashPrefix.paymentChannelClaim;
98
97
  const channel = types_1.coreTypes.Hash256.from(claim.channel).toBytes();
99
- const amount = types_1.coreTypes.UInt64.from(num).toBytes();
100
98
  const bytesList = new binary_serializer_1.BytesList();
101
99
  bytesList.put(prefix);
102
100
  bytesList.put(channel);
103
- bytesList.put(amount);
101
+ if (typeof claim.amount === 'string') {
102
+ const num = bigInt(String(claim.amount));
103
+ const amount = types_1.coreTypes.UInt64.from(num).toBytes();
104
+ bytesList.put(amount);
105
+ }
106
+ else {
107
+ const amount = types_1.coreTypes.Amount.from(claim.amount).toBytes();
108
+ bytesList.put(amount);
109
+ }
104
110
  return bytesList.toBytes();
105
111
  }
106
112
  exports.signingClaimData = signingClaimData;
@@ -1 +1 @@
1
- {"version":3,"file":"binary.js","sourceRoot":"","sources":["../src/binary.ts"],"names":[],"mappings":";AAAA,+BAA+B;;;AAE/B,mCAAmC;A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AG,CAAC,MAAM,CAAC,CAAA;IACrB,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,EAAE;QACpC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;QACxC,MAAM,MAAM,GAAG,iBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAA;QACnD,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;KACtB;SAAM;QACL,MAAM,MAAM,GAAG,iBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;QAC5D,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;KACtB;IACD,OAAO,SAAS,CAAC,OAAO,EAAE,CAAA;AAC5B,CAAC;AAqCC,4CAAgB;AAnClB;;;;;;;GAOG;AACH,SAAS,gBAAgB,CACvB,WAAuB,EACvB,cAAkC,EAClC,OAA6C;IAC3C,WAAW,EAAE,2BAAmB;CACjC;IAED,MAAM,MAAM,GAAG,0BAAU,CAAC,mBAAmB,CAAA;IAC7C,MAAM,MAAM,GAAG,iBAAS,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE,CAAA;IACjE,OAAO,eAAe,CAAC,WAAW,EAAE;QAClC,MAAM;QACN,MAAM;QACN,iBAAiB,EAAE,IAAI;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;KAC9B,CAAC,CAAA;AACJ,CAAC;AAUC,4CAAgB"}
@@ -37,6 +37,7 @@
37
37
  "LedgerHashes": 104,
38
38
  "Amendments": 102,
39
39
  "FeeSettings": 115,
40
+ "ImportVLSequence": 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,
@@ -139,40 +141,40 @@
139
141
  [
140
142
  "LedgerEntry",
141
143
  {
142
- "nth": 1,
144
+ "nth": 257,
143
145
  "isVLEncoded": false,
144
146
  "isSerialized": false,
145
- "isSigningField": true,
147
+ "isSigningField": false,
146
148
  "type": "LedgerEntry"
147
149
  }
148
150
  ],
149
151
  [
150
152
  "Transaction",
151
153
  {
152
- "nth": 1,
154
+ "nth": 257,
153
155
  "isVLEncoded": false,
154
156
  "isSerialized": false,
155
- "isSigningField": true,
157
+ "isSigningField": false,
156
158
  "type": "Transaction"
157
159
  }
158
160
  ],
159
161
  [
160
162
  "Validation",
161
163
  {
162
- "nth": 1,
164
+ "nth": 257,
163
165
  "isVLEncoded": false,
164
166
  "isSerialized": false,
165
- "isSigningField": true,
167
+ "isSigningField": false,
166
168
  "type": "Validation"
167
169
  }
168
170
  ],
169
171
  [
170
172
  "Metadata",
171
173
  {
172
- "nth": 1,
174
+ "nth": 257,
173
175
  "isVLEncoded": false,
174
- "isSerialized": true,
175
- "isSigningField": true,
176
+ "isSerialized": false,
177
+ "isSigningField": false,
176
178
  "type": "Metadata"
177
179
  }
178
180
  ],
@@ -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
  {
@@ -1896,6 +1998,16 @@
1896
1998
  "type": "AccountID"
1897
1999
  }
1898
2000
  ],
2001
+ [
2002
+ "Inform",
2003
+ {
2004
+ "nth": 99,
2005
+ "isVLEncoded": true,
2006
+ "isSerialized": true,
2007
+ "isSigningField": true,
2008
+ "type": "AccountID"
2009
+ }
2010
+ ],
1899
2011
  [
1900
2012
  "Indexes",
1901
2013
  {
@@ -1946,6 +2058,16 @@
1946
2058
  "type": "Vector256"
1947
2059
  }
1948
2060
  ],
2061
+ [
2062
+ "URITokenIDs",
2063
+ {
2064
+ "nth": 99,
2065
+ "isVLEncoded": true,
2066
+ "isSerialized": true,
2067
+ "isSigningField": true,
2068
+ "type": "Vector256"
2069
+ }
2070
+ ],
1949
2071
  [
1950
2072
  "Paths",
1951
2073
  {
@@ -2166,6 +2288,66 @@
2166
2288
  "type": "STObject"
2167
2289
  }
2168
2290
  ],
2291
+ [
2292
+ "GenesisMint",
2293
+ {
2294
+ "nth": 96,
2295
+ "isVLEncoded": false,
2296
+ "isSerialized": true,
2297
+ "isSigningField": true,
2298
+ "type": "STObject"
2299
+ }
2300
+ ],
2301
+ [
2302
+ "ActiveValidator",
2303
+ {
2304
+ "nth": 95,
2305
+ "isVLEncoded": false,
2306
+ "isSerialized": true,
2307
+ "isSigningField": true,
2308
+ "type": "STObject"
2309
+ }
2310
+ ],
2311
+ [
2312
+ "ImportVLKey",
2313
+ {
2314
+ "nth": 94,
2315
+ "isVLEncoded": false,
2316
+ "isSerialized": true,
2317
+ "isSigningField": true,
2318
+ "type": "STObject"
2319
+ }
2320
+ ],
2321
+ [
2322
+ "HookEmission",
2323
+ {
2324
+ "nth": 93,
2325
+ "isVLEncoded": false,
2326
+ "isSerialized": true,
2327
+ "isSigningField": true,
2328
+ "type": "STObject"
2329
+ }
2330
+ ],
2331
+ [
2332
+ "MintURIToken",
2333
+ {
2334
+ "nth": 92,
2335
+ "isVLEncoded": false,
2336
+ "isSerialized": true,
2337
+ "isSigningField": true,
2338
+ "type": "STObject"
2339
+ }
2340
+ ],
2341
+ [
2342
+ "AmountEntry",
2343
+ {
2344
+ "nth": 91,
2345
+ "isVLEncoded": false,
2346
+ "isSerialized": true,
2347
+ "isSigningField": true,
2348
+ "type": "STObject"
2349
+ }
2350
+ ],
2169
2351
  [
2170
2352
  "Signers",
2171
2353
  {
@@ -2305,6 +2487,56 @@
2305
2487
  "isSigningField": true,
2306
2488
  "type": "STArray"
2307
2489
  }
2490
+ ],
2491
+ [
2492
+ "GenesisMints",
2493
+ {
2494
+ "nth": 96,
2495
+ "isVLEncoded": false,
2496
+ "isSerialized": true,
2497
+ "isSigningField": true,
2498
+ "type": "STArray"
2499
+ }
2500
+ ],
2501
+ [
2502
+ "ActiveValidators",
2503
+ {
2504
+ "nth": 95,
2505
+ "isVLEncoded": false,
2506
+ "isSerialized": true,
2507
+ "isSigningField": true,
2508
+ "type": "STArray"
2509
+ }
2510
+ ],
2511
+ [
2512
+ "ImportVLKeys",
2513
+ {
2514
+ "nth": 94,
2515
+ "isVLEncoded": false,
2516
+ "isSerialized": true,
2517
+ "isSigningField": true,
2518
+ "type": "STArray"
2519
+ }
2520
+ ],
2521
+ [
2522
+ "HookEmissions",
2523
+ {
2524
+ "nth": 93,
2525
+ "isVLEncoded": false,
2526
+ "isSerialized": true,
2527
+ "isSigningField": true,
2528
+ "type": "STArray"
2529
+ }
2530
+ ],
2531
+ [
2532
+ "Amounts",
2533
+ {
2534
+ "nth": 92,
2535
+ "isVLEncoded": false,
2536
+ "isSerialized": true,
2537
+ "isSigningField": true,
2538
+ "type": "STArray"
2539
+ }
2308
2540
  ]
2309
2541
  ],
2310
2542
  "TRANSACTION_RESULTS": {
@@ -2338,11 +2570,11 @@
2338
2570
  "temBAD_PATH": -291,
2339
2571
  "temBAD_PATH_LOOP": -290,
2340
2572
  "temBAD_REGKEY": -289,
2341
- "temBAD_SEND_XRP_LIMIT": -288,
2342
- "temBAD_SEND_XRP_MAX": -287,
2343
- "temBAD_SEND_XRP_NO_DIRECT": -286,
2344
- "temBAD_SEND_XRP_PARTIAL": -285,
2345
- "temBAD_SEND_XRP_PATHS": -284,
2573
+ "temBAD_SEND_NATIVE_LIMIT": -288,
2574
+ "temBAD_SEND_NATIVE_MAX": -287,
2575
+ "temBAD_SEND_NATIVE_NO_DIRECT": -286,
2576
+ "temBAD_SEND_NATIVE_PARTIAL": -285,
2577
+ "temBAD_SEND_NATIVE_PATHS": -284,
2346
2578
  "temBAD_SEQUENCE": -283,
2347
2579
  "temBAD_SIGNATURE": -282,
2348
2580
  "temBAD_SRC_ACCOUNT": -281,
@@ -2374,7 +2606,6 @@
2374
2606
  "temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
2375
2607
  "temXCHAIN_TOO_MANY_ATTESTATIONS": -254,
2376
2608
  "temHOOK_DATA_TOO_LARGE": -253,
2377
- "temHOOK_REJECTED": -252,
2378
2609
  "tefFAILURE": -199,
2379
2610
  "tefALREADY": -198,
2380
2611
  "tefBAD_ADD_AUTH": -197,
@@ -2397,6 +2628,8 @@
2397
2628
  "tefNO_TICKET": -180,
2398
2629
  "tefNFTOKEN_IS_NOT_TRANSFERABLE": -179,
2399
2630
  "tefPAST_IMPORT_SEQ": -178,
2631
+ "tefPAST_IMPORT_VL_SEQ": -177,
2632
+ "tefNONDIR_EMIT": -176,
2400
2633
  "terRETRY": -99,
2401
2634
  "terFUNDS_SPENT": -98,
2402
2635
  "terINSUF_FEE_B": -97,
@@ -2412,6 +2645,7 @@
2412
2645
  "terNO_AMM": -87,
2413
2646
  "terNO_HOOK": -86,
2414
2647
  "tesSUCCESS": 0,
2648
+ "tesPARTIAL": 1,
2415
2649
  "tecCLAIM": 100,
2416
2650
  "tecPATH_PARTIAL": 101,
2417
2651
  "tecUNFUNDED_ADD": 102,
@@ -2422,7 +2656,7 @@
2422
2656
  "tecINSUF_RESERVE_LINE": 122,
2423
2657
  "tecINSUF_RESERVE_OFFER": 123,
2424
2658
  "tecNO_DST": 124,
2425
- "tecNO_DST_INSUF_XRP": 125,
2659
+ "tecNO_DST_INSUF_NATIVE": 125,
2426
2660
  "tecNO_LINE_INSUF_RESERVE": 126,
2427
2661
  "tecNO_LINE_REDUNDANT": 127,
2428
2662
  "tecPATH_DRY": 128,
@@ -2484,6 +2718,7 @@
2484
2718
  "tecXCHAIN_PAYMENT_FAILED": 184,
2485
2719
  "tecXCHAIN_SELF_COMMIT": 185,
2486
2720
  "tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR": 186,
2721
+ "tecINSUF_RESERVE_SELLER": 187,
2487
2722
  "tecLAST_POSSIBLE_ENTRY": 255
2488
2723
  },
2489
2724
  "TRANSACTION_TYPES": {
@@ -2521,11 +2756,15 @@
2521
2756
  "URITokenBuy": 47,
2522
2757
  "URITokenCreateSellOffer": 48,
2523
2758
  "URITokenCancelSellOffer": 49,
2759
+ "Remit": 95,
2760
+ "GenesisMint": 96,
2524
2761
  "Import": 97,
2762
+ "ClaimReward": 98,
2525
2763
  "Invoke": 99,
2526
2764
  "EnableAmendment": 100,
2527
2765
  "SetFee": 101,
2528
2766
  "UNLModify": 102,
2529
- "EmitFailure": 103
2767
+ "EmitFailure": 103,
2768
+ "UNLReport": 104
2530
2769
  }
2531
2770
  }
@@ -37,6 +37,7 @@
37
37
  "LedgerHashes": 104,
38
38
  "Amendments": 102,
39
39
  "FeeSettings": 115,
40
+ "ImportVLSequence": 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,
@@ -139,40 +141,40 @@
139
141
  [
140
142
  "LedgerEntry",
141
143
  {
142
- "nth": 1,
144
+ "nth": 257,
143
145
  "isVLEncoded": false,
144
146
  "isSerialized": false,
145
- "isSigningField": true,
147
+ "isSigningField": false,
146
148
  "type": "LedgerEntry"
147
149
  }
148
150
  ],
149
151
  [
150
152
  "Transaction",
151
153
  {
152
- "nth": 1,
154
+ "nth": 257,
153
155
  "isVLEncoded": false,
154
156
  "isSerialized": false,
155
- "isSigningField": true,
157
+ "isSigningField": false,
156
158
  "type": "Transaction"
157
159
  }
158
160
  ],
159
161
  [
160
162
  "Validation",
161
163
  {
162
- "nth": 1,
164
+ "nth": 257,
163
165
  "isVLEncoded": false,
164
166
  "isSerialized": false,
165
- "isSigningField": true,
167
+ "isSigningField": false,
166
168
  "type": "Validation"
167
169
  }
168
170
  ],
169
171
  [
170
172
  "Metadata",
171
173
  {
172
- "nth": 1,
174
+ "nth": 257,
173
175
  "isVLEncoded": false,
174
- "isSerialized": true,
175
- "isSigningField": true,
176
+ "isSerialized": false,
177
+ "isSigningField": false,
176
178
  "type": "Metadata"
177
179
  }
178
180
  ],
@@ -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
  {
@@ -1896,6 +1998,16 @@
1896
1998
  "type": "AccountID"
1897
1999
  }
1898
2000
  ],
2001
+ [
2002
+ "Inform",
2003
+ {
2004
+ "nth": 99,
2005
+ "isVLEncoded": true,
2006
+ "isSerialized": true,
2007
+ "isSigningField": true,
2008
+ "type": "AccountID"
2009
+ }
2010
+ ],
1899
2011
  [
1900
2012
  "Indexes",
1901
2013
  {
@@ -1946,6 +2058,16 @@
1946
2058
  "type": "Vector256"
1947
2059
  }
1948
2060
  ],
2061
+ [
2062
+ "URITokenIDs",
2063
+ {
2064
+ "nth": 99,
2065
+ "isVLEncoded": true,
2066
+ "isSerialized": true,
2067
+ "isSigningField": true,
2068
+ "type": "Vector256"
2069
+ }
2070
+ ],
1949
2071
  [
1950
2072
  "Paths",
1951
2073
  {
@@ -2166,6 +2288,66 @@
2166
2288
  "type": "STObject"
2167
2289
  }
2168
2290
  ],
2291
+ [
2292
+ "GenesisMint",
2293
+ {
2294
+ "nth": 96,
2295
+ "isVLEncoded": false,
2296
+ "isSerialized": true,
2297
+ "isSigningField": true,
2298
+ "type": "STObject"
2299
+ }
2300
+ ],
2301
+ [
2302
+ "ActiveValidator",
2303
+ {
2304
+ "nth": 95,
2305
+ "isVLEncoded": false,
2306
+ "isSerialized": true,
2307
+ "isSigningField": true,
2308
+ "type": "STObject"
2309
+ }
2310
+ ],
2311
+ [
2312
+ "ImportVLKey",
2313
+ {
2314
+ "nth": 94,
2315
+ "isVLEncoded": false,
2316
+ "isSerialized": true,
2317
+ "isSigningField": true,
2318
+ "type": "STObject"
2319
+ }
2320
+ ],
2321
+ [
2322
+ "HookEmission",
2323
+ {
2324
+ "nth": 93,
2325
+ "isVLEncoded": false,
2326
+ "isSerialized": true,
2327
+ "isSigningField": true,
2328
+ "type": "STObject"
2329
+ }
2330
+ ],
2331
+ [
2332
+ "MintURIToken",
2333
+ {
2334
+ "nth": 92,
2335
+ "isVLEncoded": false,
2336
+ "isSerialized": true,
2337
+ "isSigningField": true,
2338
+ "type": "STObject"
2339
+ }
2340
+ ],
2341
+ [
2342
+ "AmountEntry",
2343
+ {
2344
+ "nth": 91,
2345
+ "isVLEncoded": false,
2346
+ "isSerialized": true,
2347
+ "isSigningField": true,
2348
+ "type": "STObject"
2349
+ }
2350
+ ],
2169
2351
  [
2170
2352
  "Signers",
2171
2353
  {
@@ -2305,6 +2487,56 @@
2305
2487
  "isSigningField": true,
2306
2488
  "type": "STArray"
2307
2489
  }
2490
+ ],
2491
+ [
2492
+ "GenesisMints",
2493
+ {
2494
+ "nth": 96,
2495
+ "isVLEncoded": false,
2496
+ "isSerialized": true,
2497
+ "isSigningField": true,
2498
+ "type": "STArray"
2499
+ }
2500
+ ],
2501
+ [
2502
+ "ActiveValidators",
2503
+ {
2504
+ "nth": 95,
2505
+ "isVLEncoded": false,
2506
+ "isSerialized": true,
2507
+ "isSigningField": true,
2508
+ "type": "STArray"
2509
+ }
2510
+ ],
2511
+ [
2512
+ "ImportVLKeys",
2513
+ {
2514
+ "nth": 94,
2515
+ "isVLEncoded": false,
2516
+ "isSerialized": true,
2517
+ "isSigningField": true,
2518
+ "type": "STArray"
2519
+ }
2520
+ ],
2521
+ [
2522
+ "HookEmissions",
2523
+ {
2524
+ "nth": 93,
2525
+ "isVLEncoded": false,
2526
+ "isSerialized": true,
2527
+ "isSigningField": true,
2528
+ "type": "STArray"
2529
+ }
2530
+ ],
2531
+ [
2532
+ "Amounts",
2533
+ {
2534
+ "nth": 92,
2535
+ "isVLEncoded": false,
2536
+ "isSerialized": true,
2537
+ "isSigningField": true,
2538
+ "type": "STArray"
2539
+ }
2308
2540
  ]
2309
2541
  ],
2310
2542
  "TRANSACTION_RESULTS": {
@@ -2339,11 +2571,11 @@
2339
2571
  "temBAD_PATH": -291,
2340
2572
  "temBAD_PATH_LOOP": -290,
2341
2573
  "temBAD_REGKEY": -289,
2342
- "temBAD_SEND_XRP_LIMIT": -288,
2343
- "temBAD_SEND_XRP_MAX": -287,
2344
- "temBAD_SEND_XRP_NO_DIRECT": -286,
2345
- "temBAD_SEND_XRP_PARTIAL": -285,
2346
- "temBAD_SEND_XRP_PATHS": -284,
2574
+ "temBAD_SEND_NATIVE_LIMIT": -288,
2575
+ "temBAD_SEND_NATIVE_MAX": -287,
2576
+ "temBAD_SEND_NATIVE_NO_DIRECT": -286,
2577
+ "temBAD_SEND_NATIVE_PARTIAL": -285,
2578
+ "temBAD_SEND_NATIVE_PATHS": -284,
2347
2579
  "temBAD_SEQUENCE": -283,
2348
2580
  "temBAD_SIGNATURE": -282,
2349
2581
  "temBAD_SRC_ACCOUNT": -281,
@@ -2375,7 +2607,6 @@
2375
2607
  "temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
2376
2608
  "temXCHAIN_TOO_MANY_ATTESTATIONS": -254,
2377
2609
  "temHOOK_DATA_TOO_LARGE": -253,
2378
- "temHOOK_REJECTED": -252,
2379
2610
 
2380
2611
  "tefFAILURE": -199,
2381
2612
  "tefALREADY": -198,
@@ -2399,6 +2630,8 @@
2399
2630
  "tefNO_TICKET": -180,
2400
2631
  "tefNFTOKEN_IS_NOT_TRANSFERABLE": -179,
2401
2632
  "tefPAST_IMPORT_SEQ": -178,
2633
+ "tefPAST_IMPORT_VL_SEQ": -177,
2634
+ "tefNONDIR_EMIT": -176,
2402
2635
 
2403
2636
  "terRETRY": -99,
2404
2637
  "terFUNDS_SPENT": -98,
@@ -2416,6 +2649,7 @@
2416
2649
  "terNO_HOOK": -86,
2417
2650
 
2418
2651
  "tesSUCCESS": 0,
2652
+ "tesPARTIAL": 1,
2419
2653
 
2420
2654
  "tecCLAIM": 100,
2421
2655
  "tecPATH_PARTIAL": 101,
@@ -2427,7 +2661,7 @@
2427
2661
  "tecINSUF_RESERVE_LINE": 122,
2428
2662
  "tecINSUF_RESERVE_OFFER": 123,
2429
2663
  "tecNO_DST": 124,
2430
- "tecNO_DST_INSUF_XRP": 125,
2664
+ "tecNO_DST_INSUF_NATIVE": 125,
2431
2665
  "tecNO_LINE_INSUF_RESERVE": 126,
2432
2666
  "tecNO_LINE_REDUNDANT": 127,
2433
2667
  "tecPATH_DRY": 128,
@@ -2489,6 +2723,7 @@
2489
2723
  "tecXCHAIN_PAYMENT_FAILED": 184,
2490
2724
  "tecXCHAIN_SELF_COMMIT": 185,
2491
2725
  "tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR": 186,
2726
+ "tecINSUF_RESERVE_SELLER": 187,
2492
2727
  "tecLAST_POSSIBLE_ENTRY": 255
2493
2728
  },
2494
2729
  "TRANSACTION_TYPES": {
@@ -2526,11 +2761,15 @@
2526
2761
  "URITokenBuy": 47,
2527
2762
  "URITokenCreateSellOffer": 48,
2528
2763
  "URITokenCancelSellOffer": 49,
2764
+ "Remit": 95,
2765
+ "GenesisMint": 96,
2529
2766
  "Import": 97,
2767
+ "ClaimReward": 98,
2530
2768
  "Invoke": 99,
2531
2769
  "EnableAmendment": 100,
2532
2770
  "SetFee": 101,
2533
2771
  "UNLModify": 102,
2534
- "EmitFailure": 103
2772
+ "EmitFailure": 103,
2773
+ "UNLReport": 104
2535
2774
  }
2536
2775
  }
@@ -13,7 +13,7 @@ const STANDARD_FORMAT_HEX_REGEX = /^0{24}[\x00-\x7F]{6}0{10}$/;
13
13
  */
14
14
  function isoToBytes(iso) {
15
15
  const bytes = buffer_1.Buffer.alloc(20);
16
- if (iso !== 'XRP') {
16
+ if (iso !== 'XAH') {
17
17
  const isoBytes = iso.split('').map((c) => c.charCodeAt(0));
18
18
  bytes.set(isoBytes, 12);
19
19
  }
@@ -27,7 +27,7 @@ function isIsoCode(iso) {
27
27
  }
28
28
  function isoCodeFromHex(code) {
29
29
  const iso = code.toString();
30
- if (iso === 'XRP') {
30
+ if (iso === 'XAH') {
31
31
  return null;
32
32
  }
33
33
  if (isIsoCode(iso)) {
@@ -78,7 +78,7 @@ class Currency extends hash_160_1.Hash160 {
78
78
  super(byteBuf !== null && byteBuf !== void 0 ? byteBuf : Currency.XRP.bytes);
79
79
  const hex = this.bytes.toString('hex');
80
80
  if (XRP_HEX_REGEX.test(hex)) {
81
- this._iso = 'XRP';
81
+ this._iso = 'XAH';
82
82
  }
83
83
  else if (STANDARD_FORMAT_HEX_REGEX.test(hex)) {
84
84
  this._iso = isoCodeFromHex(this.bytes.slice(12, 15));
@@ -1 +1 @@
1
- {"version":3,"file":"st-object.js","sourceRoot":"","sources":["../../src/types/st-object.ts"],"names":[],"mappings":";;;AAAA,oCAKiB;AACjB,uDAA8D;AAC9D,wEAAyF;AACzF,2DAAsD;AACtD,mEAAyE;AACzE,oCAAgC;AAEhC,MAAM,sBAAsB,GAAG,eAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAClD,MAAM,iBAAiB,GAAG,iBAAiB,CAAA;AAC3C,MAAM,SAAS,GAAG,UAAU,CAAA;AAC5B,MAAM,WAAW,GAAG,aAAa,CAAA;AACjC,MAAM,OAAO,GAAG,SAAS,CAAA;AACzB,MAAM,UAAU,GAAG,WAAW,CAAA;AAC9B,MAAM,QAAQ,GAAG,gBAAgB,CAAA;AAEjC;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAa,EAAE,QAAgB;IACrD,MAAM,OAAO,GAAG,IAAA,+CAAwB,EAAC,QAAQ,CAAC,CAAA;IAElD,IAAI,OAAO,CAAA;IACX,IAAI,KAAK,KAAK,WAAW;QAAE,OAAO,GAAG,QAAQ,CAAA;SACxC,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,GAAG,UAAU,CAAA;SAC3C,IAAI,OAAO,CAAC,GAAG,KAAK,KAAK;QAC5B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,gCAAgC,CAAC,CAAA;IAE3D,OAAO,OAAO,CAAC,GAAG,KAAK,KAAK;QAC1B,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE;QAC7D,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,cAAc,EAAE,CAAA;AAC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,EAAE,CAAA;YACtC,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE;gBACpC,MAAK;aACN;YACD,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAA;SACtE;QAED,OAAO,WAAW,CAAA;IACpB,CAAC;CACF;AAEQ,4BAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transia/ripple-binary-codec",
3
- "version": "1.4.6-alpha.1",
3
+ "version": "1.4.6-alpha.10",
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": "29b718b52e9b21c4089f48e9e61b399004d7ae7e"
43
+ "gitHead": "d98d2e5fdbe8d196ef396209ab1cd115f05bda62"
44
44
  }
@@ -369,7 +369,7 @@ function pathSetBinaryTests() {
369
369
  currency: 'BTC',
370
370
  issuer: 'r3AWbdp2jQLXLywJypdoNwVSvr81xs3uhn',
371
371
  },
372
- { currency: 'XRP' },
372
+ { currency: 'XAH' },
373
373
  {
374
374
  currency: 'USD',
375
375
  issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
@@ -105,6 +105,16 @@ 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
+ }
113
+
114
+ const Remit = {
115
+ tx: require('./fixtures/remit-tx.json'),
116
+ binary: require('./fixtures/remit-binary.json'),
117
+ }
108
118
 
109
119
  function bytesListTest() {
110
120
  const list = new BytesList()
@@ -229,6 +239,18 @@ function NegativeUNLTest() {
229
239
  })
230
240
  }
231
241
 
242
+ function UNLReportTest() {
243
+ test('can serialize UNLReport', () => {
244
+ expect(encode(UNLReport.tx)).toEqual(UNLReport.binary)
245
+ })
246
+ test('can serialize UNLReport metadata', () => {
247
+ expect(encode(UNLReport.tx.meta)).toEqual(UNLReport.meta)
248
+ })
249
+ test('can deserialize UNLReport metadata', () => {
250
+ expect(decode(UNLReport.meta)).toEqual(UNLReport.tx.meta)
251
+ })
252
+ }
253
+
232
254
  function omitUndefinedTest() {
233
255
  test('omits fields with undefined value', () => {
234
256
  let encodedOmitted = encode(json_omitted)
@@ -274,6 +296,12 @@ function nfTokenTest() {
274
296
  }
275
297
  }
276
298
 
299
+ function RemitTest() {
300
+ test('can serialize Remit', () => {
301
+ expect(encode(Remit.tx)).toEqual(Remit.binary)
302
+ })
303
+ }
304
+
277
305
  describe('Binary Serialization', function () {
278
306
  describe('nestedObjectTests', nestedObjectTests)
279
307
  describe('BytesList', bytesListTest)
@@ -286,4 +314,6 @@ describe('Binary Serialization', function () {
286
314
  describe('OmitUndefined', omitUndefinedTest)
287
315
  describe('TicketTest', ticketTest)
288
316
  describe('NFToken', nfTokenTest)
317
+ describe('UNLReport', UNLReportTest)
318
+ describe('Remit', RemitTest)
289
319
  })
@@ -44,7 +44,7 @@ describe('encode and decode using new types as a parameter', function () {
44
44
  definitions.FIELDS.push([
45
45
  'NewFieldDefinition',
46
46
  {
47
- nth: 100,
47
+ nth: 101,
48
48
  isVLEncoded: false,
49
49
  isSerialized: true,
50
50
  isSigningField: true,
@@ -2904,7 +2904,7 @@
2904
2904
  "type_id": 6,
2905
2905
  "is_native": true,
2906
2906
  "type": "Amount",
2907
- "error": "1000000000000 absolute XRP is bigger than max native value 100000000000.0",
2907
+ "error": "1000000000000 absolute XAH is bigger than max native value 100000000000.0",
2908
2908
  "is_negative": false
2909
2909
  },
2910
2910
  {
@@ -2912,7 +2912,7 @@
2912
2912
  "type_id": 6,
2913
2913
  "is_native": true,
2914
2914
  "type": "Amount",
2915
- "error": "10000000000000000000 absolute XRP is bigger than max native value 100000000000.0",
2915
+ "error": "10000000000000000000 absolute XAH is bigger than max native value 100000000000.0",
2916
2916
  "is_negative": true
2917
2917
  }
2918
2918
  ]
@@ -0,0 +1 @@
1
+ "12005F22000000002403EDEB4A2E00000001201B03EE5D3150116F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B68400000000000000C732102F9E33F16DF9507705EC954E3F94EB5F10D1FC4A354606DBE6297DBB1096FE65474473045022100E3FAE0EDEC3D6A8FF6D81BC9CF8288A61B7EEDE8071E90FF9314CB4621058D10022043545CF631706D700CEE65A1DB83EFDD185413808292D9D90F14D87D3DC2D8CB701A04DEADBEEF81147990EC5D1D8DF69E070A968D4B186986FDF06ED0831449FF0C73CA6AF9733DA805F76CA2C37776B7C46B806314757C4A9ED08284D61F3D8807280795F858BAB61DE05C220000000150156F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B7504DEADBEEFE1F05CE05B6140000000000003E8E1E05B61D4838D7EA4C68000000000000000000000000000555344000000000006B80F0F1D98AEDA846ED981F741C398FB2C4FD1E1F100136320AED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AE"
@@ -0,0 +1,39 @@
1
+ {
2
+ "TransactionType": "Remit",
3
+ "Account": "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
4
+ "Destination": "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
5
+ "DestinationTag": 1,
6
+ "Fee": "12",
7
+ "Flags": 0,
8
+ "LastLedgerSequence": 65953073,
9
+ "Sequence": 65923914,
10
+ "SigningPubKey": "02F9E33F16DF9507705EC954E3F94EB5F10D1FC4A354606DBE6297DBB1096FE654",
11
+ "TxnSignature": "3045022100E3FAE0EDEC3D6A8FF6D81BC9CF8288A61B7EEDE8071E90FF9314CB4621058D10022043545CF631706D700CEE65A1DB83EFDD185413808292D9D90F14D87D3DC2D8CB",
12
+ "Amounts": [
13
+ {
14
+ "AmountEntry": {
15
+ "Amount": "1000"
16
+ }
17
+ },
18
+ {
19
+ "AmountEntry": {
20
+ "Amount": {
21
+ "currency": "USD",
22
+ "issuer": "rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX",
23
+ "value": "1"
24
+ }
25
+ }
26
+ }
27
+ ],
28
+ "MintURIToken": {
29
+ "URI": "DEADBEEF",
30
+ "Digest": "6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B",
31
+ "Flags": 1
32
+ },
33
+ "URITokenIDs": [
34
+ "AED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AE"
35
+ ],
36
+ "InvoiceID": "6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B",
37
+ "Blob": "DEADBEEF",
38
+ "Inform": "rB5Ux4Lv2nRx6eeoAAsZmtctnBQ2LiACnk"
39
+ }
@@ -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
+ }
package/test/hash.test.js CHANGED
@@ -77,7 +77,7 @@ describe('Hash256', function () {
77
77
 
78
78
  describe('Currency', function () {
79
79
  test('Decoding allows dodgy XRP without throwing', function () {
80
- const currencyCode = '0000000000000000000000005852500000000000'
80
+ const currencyCode = '0000000000000000000000005841480000000000'
81
81
  expect(Currency.from(currencyCode).toJSON()).toBe(currencyCode)
82
82
  })
83
83
  test('Currency code with lowercase letters decodes to ISO code', () => {
@@ -113,7 +113,7 @@ describe('Currency', function () {
113
113
 
114
114
  test('can be constructed from a Buffer', function () {
115
115
  const xrp = new Currency(Buffer.alloc(20))
116
- expect(xrp.iso()).toBe('XRP')
116
+ expect(xrp.iso()).toBe('XAH')
117
117
  })
118
118
  test('Can handle non-standard currency codes', () => {
119
119
  const currency = '015841551A748AD2C1F76FF6ECB0CCCD00000000'
@@ -170,62 +170,31 @@ describe('Signing data', function () {
170
170
  ].join(''),
171
171
  )
172
172
  })
173
-
174
- test('can create multi signing blobs with custom definitions', function () {
175
- const customPaymentDefinitions = JSON.parse(
176
- JSON.stringify(normalDefinitions),
177
- )
178
- customPaymentDefinitions.TRANSACTION_TYPES.Payment = 31
179
-
180
- const newDefs = new XrplDefinitions(customPaymentDefinitions)
181
- const signingAccount = 'rJZdUusLDtY9NEsGea7ijqhVrXv98rYBYN'
182
- const signingJson = { ...tx_json, SigningPubKey: '' }
183
- const actual = encodeForMultisigning(signingJson, signingAccount, newDefs)
173
+ test('can create native claim blob', function () {
174
+ const channel =
175
+ '43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1'
176
+ const amount = '1000'
177
+ const json = { channel, amount }
178
+ const actual = encodeForSigningClaim(json)
184
179
  expect(actual).toBe(
185
180
  [
186
- '534D5400', // signingPrefix
187
- // TransactionType
188
- '12',
189
- '001F',
190
- // Flags
191
- '22',
192
- '80000000',
193
- // Sequence
194
- '24',
195
- '00000001',
196
- // Amount
197
- '61',
198
- // native amount
199
- '40000000000003E8',
200
- // Fee
201
- '68',
202
- // native amount
203
- '400000000000000A',
204
- // SigningPubKey
205
- '73',
206
- // VLLength
207
- '00',
208
- // '',
209
- // Account
210
- '81',
211
- // VLLength
212
- '14',
213
- '5B812C9D57731E27A2DA8B1830195F88EF32A3B6',
214
- // Destination
215
- '83',
216
- // VLLength
217
- '14',
218
- 'B5F762798A53D543A014CAF8B297CFF8F2F937E8',
219
- // signingAccount suffix
220
- 'C0A5ABEF242802EFED4B041E8F2D4A8CC86AE3D1',
181
+ // hash prefix
182
+ '434C4D00',
183
+ // channel ID
184
+ '43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1',
185
+ // amount as a uint64
186
+ '00000000000003E8',
221
187
  ].join(''),
222
188
  )
223
189
  })
224
-
225
- test('can create claim blob', function () {
190
+ test('can create ic claim blob', function () {
226
191
  const channel =
227
192
  '43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1'
228
- const amount = '1000'
193
+ const amount = {
194
+ issuer: 'rJZdUusLDtY9NEsGea7ijqhVrXv98rYBYN',
195
+ currency: 'USD',
196
+ value: '10',
197
+ }
229
198
  const json = { channel, amount }
230
199
  const actual = encodeForSigningClaim(json)
231
200
  expect(actual).toBe(
@@ -235,7 +204,9 @@ describe('Signing data', function () {
235
204
  // channel ID
236
205
  '43904CBFCDCEC530B4037871F86EE90BF799DF8D2E0EA564BC8A3F332E4F5FB1',
237
206
  // amount as a uint64
238
- '00000000000003E8',
207
+ 'D4C38D7EA4C680000000000000000000000000005553440000000000C0A5ABEF',
208
+ // amount as a uint64
209
+ '242802EFED4B041E8F2D4A8CC86AE3D1',
239
210
  ].join(''),
240
211
  )
241
212
  })
@@ -58,7 +58,7 @@ describe('encoding and decoding tx_json', function () {
58
58
  Sequence: 19,
59
59
  LimitAmount: {
60
60
  value: '200',
61
- currency: '0000000000000000000000005852500000000000',
61
+ currency: '0000000000000000000000005841480000000000',
62
62
  issuer: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
63
63
  },
64
64
  Fee: '10',