xrpl 4.2.0 → 4.3.0-smartescrow.1
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/build/xrpl-latest.js +541 -1277
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts +2 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +5 -0
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/models/ledger/Escrow.d.ts +2 -0
- package/dist/npm/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/models/ledger/FeeSettings.d.ts +2 -0
- package/dist/npm/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/models/methods/subscribe.d.ts +2 -1
- package/dist/npm/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.d.ts +2 -0
- package/dist/npm/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/models/transactions/escrowCreate.js +4 -2
- package/dist/npm/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/models/transactions/oracleSet.d.ts.map +1 -1
- package/dist/npm/models/transactions/oracleSet.js +17 -3
- package/dist/npm/models/transactions/oracleSet.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts +2 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +5 -0
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/models/ledger/Escrow.d.ts +2 -0
- package/dist/npm/src/models/ledger/Escrow.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/FeeSettings.d.ts +2 -0
- package/dist/npm/src/models/ledger/FeeSettings.d.ts.map +1 -1
- package/dist/npm/src/models/methods/subscribe.d.ts +2 -1
- package/dist/npm/src/models/methods/subscribe.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.d.ts +2 -0
- package/dist/npm/src/models/transactions/escrowCreate.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/escrowCreate.js +4 -2
- package/dist/npm/src/models/transactions/escrowCreate.js.map +1 -1
- package/dist/npm/src/models/transactions/oracleSet.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/oracleSet.js +17 -3
- package/dist/npm/src/models/transactions/oracleSet.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js +3 -0
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js +3 -0
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/package.json +4 -7
- package/src/Wallet/defaultFaucets.ts +6 -0
- package/src/models/ledger/Escrow.ts +4 -0
- package/src/models/ledger/FeeSettings.ts +4 -0
- package/src/models/methods/subscribe.ts +5 -1
- package/src/models/transactions/escrowCreate.ts +10 -2
- package/src/models/transactions/oracleSet.ts +30 -8
- package/src/sugar/autofill.ts +4 -0
- package/build/xrpl-latest-min.js +0 -3
- package/build/xrpl-latest-min.js.map +0 -1
package/build/xrpl-latest.js
CHANGED
@@ -13,11 +13,15 @@ var xrpl;
|
|
13
13
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
14
14
|
exports.getHash = getHash;
|
15
15
|
exports.createCurve = createCurve;
|
16
|
+
/**
|
17
|
+
* Utilities for short weierstrass curves, combined with noble-hashes.
|
18
|
+
* @module
|
19
|
+
*/
|
16
20
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
17
|
-
const hmac_1 = __webpack_require__(/*! @noble/hashes/hmac */ "../../node_modules/@noble/
|
18
|
-
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/
|
21
|
+
const hmac_1 = __webpack_require__(/*! @noble/hashes/hmac */ "../../node_modules/@noble/hashes/hmac.js");
|
22
|
+
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
19
23
|
const weierstrass_js_1 = __webpack_require__(/*! ./abstract/weierstrass.js */ "../../node_modules/@noble/curves/abstract/weierstrass.js");
|
20
|
-
|
24
|
+
/** connects noble-curves to noble-hashes */
|
21
25
|
function getHash(hash) {
|
22
26
|
return {
|
23
27
|
hash,
|
@@ -27,7 +31,7 @@ function getHash(hash) {
|
|
27
31
|
}
|
28
32
|
function createCurve(curveDef, defHash) {
|
29
33
|
const create = (hash) => (0, weierstrass_js_1.weierstrass)({ ...curveDef, ...getHash(hash) });
|
30
|
-
return
|
34
|
+
return { ...create(defHash), create };
|
31
35
|
}
|
32
36
|
|
33
37
|
|
@@ -46,8 +50,12 @@ exports.wNAF = wNAF;
|
|
46
50
|
exports.pippenger = pippenger;
|
47
51
|
exports.precomputeMSMUnsafe = precomputeMSMUnsafe;
|
48
52
|
exports.validateBasic = validateBasic;
|
53
|
+
/**
|
54
|
+
* Methods for elliptic curve multiplication by scalars.
|
55
|
+
* Contains wNAF, pippenger
|
56
|
+
* @module
|
57
|
+
*/
|
49
58
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
50
|
-
// Abelian group utilities
|
51
59
|
const modular_js_1 = __webpack_require__(/*! ./modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
52
60
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
53
61
|
const _0n = BigInt(0);
|
@@ -89,17 +97,20 @@ const pointWindowSizes = new WeakMap(); // This allows use make points immutable
|
|
89
97
|
function getW(P) {
|
90
98
|
return pointWindowSizes.get(P) || 1;
|
91
99
|
}
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
100
|
+
/**
|
101
|
+
* Elliptic curve multiplication of Point by scalar. Fragile.
|
102
|
+
* Scalars should always be less than curve order: this should be checked inside of a curve itself.
|
103
|
+
* Creates precomputation tables for fast multiplication:
|
104
|
+
* - private scalar is split by fixed size windows of W bits
|
105
|
+
* - every window point is collected from window's table & added to accumulator
|
106
|
+
* - since windows are different, same point inside tables won't be accessed more than once per calc
|
107
|
+
* - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)
|
108
|
+
* - +1 window is neccessary for wNAF
|
109
|
+
* - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication
|
110
|
+
*
|
111
|
+
* @todo Research returning 2d JS array of windows, instead of a single window.
|
112
|
+
* This would allow windows to be in different memory locations
|
113
|
+
*/
|
103
114
|
function wNAF(c, bits) {
|
104
115
|
return {
|
105
116
|
constTimeNegate,
|
@@ -426,8 +437,12 @@ function validateBasic(curve) {
|
|
426
437
|
|
427
438
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
428
439
|
exports.twistedEdwards = twistedEdwards;
|
440
|
+
/**
|
441
|
+
* Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y².
|
442
|
+
* For design rationale of types / exports, see weierstrass module documentation.
|
443
|
+
* @module
|
444
|
+
*/
|
429
445
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
430
|
-
// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²
|
431
446
|
const curve_js_1 = __webpack_require__(/*! ./curve.js */ "../../node_modules/@noble/curves/abstract/curve.js");
|
432
447
|
const modular_js_1 = __webpack_require__(/*! ./modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
433
448
|
const ut = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
@@ -916,8 +931,10 @@ function anum(item) {
|
|
916
931
|
if (!Number.isSafeInteger(item))
|
917
932
|
throw new Error('number expected');
|
918
933
|
}
|
919
|
-
|
920
|
-
|
934
|
+
/**
|
935
|
+
* Produces a uniformly random byte string using a cryptographic hash function H that outputs b bits.
|
936
|
+
* [RFC 9380 5.3.1](https://www.rfc-editor.org/rfc/rfc9380#section-5.3.1).
|
937
|
+
*/
|
921
938
|
function expand_message_xmd(msg, DST, lenInBytes, H) {
|
922
939
|
(0, utils_js_1.abytes)(msg);
|
923
940
|
(0, utils_js_1.abytes)(DST);
|
@@ -942,11 +959,13 @@ function expand_message_xmd(msg, DST, lenInBytes, H) {
|
|
942
959
|
const pseudo_random_bytes = (0, utils_js_1.concatBytes)(...b);
|
943
960
|
return pseudo_random_bytes.slice(0, lenInBytes);
|
944
961
|
}
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
962
|
+
/**
|
963
|
+
* Produces a uniformly random byte string using an extendable-output function (XOF) H.
|
964
|
+
* 1. The collision resistance of H MUST be at least k bits.
|
965
|
+
* 2. H MUST be an XOF that has been proved indifferentiable from
|
966
|
+
* a random oracle under a reasonable cryptographic assumption.
|
967
|
+
* [RFC 9380 5.3.2](https://www.rfc-editor.org/rfc/rfc9380#section-5.3.2).
|
968
|
+
*/
|
950
969
|
function expand_message_xof(msg, DST, lenInBytes, k, H) {
|
951
970
|
(0, utils_js_1.abytes)(msg);
|
952
971
|
(0, utils_js_1.abytes)(DST);
|
@@ -968,8 +987,8 @@ function expand_message_xof(msg, DST, lenInBytes, k, H) {
|
|
968
987
|
.digest());
|
969
988
|
}
|
970
989
|
/**
|
971
|
-
* Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F
|
972
|
-
* https://www.rfc-editor.org/rfc/rfc9380#section-5.2
|
990
|
+
* Hashes arbitrary-length byte strings to a list of one or more elements of a finite field F.
|
991
|
+
* [RFC 9380 5.2](https://www.rfc-editor.org/rfc/rfc9380#section-5.2).
|
973
992
|
* @param msg a byte string containing the message to hash
|
974
993
|
* @param count the number of elements of F to output
|
975
994
|
* @param options `{DST: string, p: bigint, m: number, k: number, expand: 'xmd' | 'xof', hash: H}`, see above
|
@@ -1023,9 +1042,10 @@ function isogenyMap(field, map) {
|
|
1023
1042
|
const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
|
1024
1043
|
x = field.div(xNum, xDen); // xNum / xDen
|
1025
1044
|
y = field.mul(y, field.div(yNum, yDen)); // y * (yNum / yDev)
|
1026
|
-
return { x, y };
|
1045
|
+
return { x: x, y: y };
|
1027
1046
|
};
|
1028
1047
|
}
|
1048
|
+
/** Creates hash-to-curve methods from EC Point and mapToCurve function. */
|
1029
1049
|
function createHasher(Point, mapToCurve, def) {
|
1030
1050
|
if (typeof mapToCurve !== 'function')
|
1031
1051
|
throw new Error('mapToCurve() must be defined');
|
@@ -1095,8 +1115,13 @@ exports.hashToPrivateScalar = hashToPrivateScalar;
|
|
1095
1115
|
exports.getFieldBytesLength = getFieldBytesLength;
|
1096
1116
|
exports.getMinHashLength = getMinHashLength;
|
1097
1117
|
exports.mapHashToField = mapHashToField;
|
1118
|
+
/**
|
1119
|
+
* Utils for modular division and finite fields.
|
1120
|
+
* A finite field over 11 is integer number operations `mod 11`.
|
1121
|
+
* There is no division: it is replaced by modular multiplicative inverse.
|
1122
|
+
* @module
|
1123
|
+
*/
|
1098
1124
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
1099
|
-
// Utilities for modular arithmetics and finite fields
|
1100
1125
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
1101
1126
|
// prettier-ignore
|
1102
1127
|
const _0n = BigInt(0), _1n = BigInt(1), _2n = /* @__PURE__ */ BigInt(2), _3n = /* @__PURE__ */ BigInt(3);
|
@@ -1112,10 +1137,10 @@ function mod(a, b) {
|
|
1112
1137
|
/**
|
1113
1138
|
* Efficiently raise num to power and do modular division.
|
1114
1139
|
* Unsafe in some contexts: uses ladder, so can expose bigint bits.
|
1140
|
+
* @todo use field version && remove
|
1115
1141
|
* @example
|
1116
1142
|
* pow(2n, 6n, 11n) // 64n % 11n == 9n
|
1117
1143
|
*/
|
1118
|
-
// TODO: use field version && remove
|
1119
1144
|
function pow(num, power, modulo) {
|
1120
1145
|
if (power < _0n)
|
1121
1146
|
throw new Error('invalid exponent, negatives unsupported');
|
@@ -1132,7 +1157,7 @@ function pow(num, power, modulo) {
|
|
1132
1157
|
}
|
1133
1158
|
return res;
|
1134
1159
|
}
|
1135
|
-
|
1160
|
+
/** Does `x^(2^power)` mod p. `pow2(30, 4)` == `30^(2^4)` */
|
1136
1161
|
function pow2(x, power, modulo) {
|
1137
1162
|
let res = x;
|
1138
1163
|
while (power-- > _0n) {
|
@@ -1141,13 +1166,15 @@ function pow2(x, power, modulo) {
|
|
1141
1166
|
}
|
1142
1167
|
return res;
|
1143
1168
|
}
|
1144
|
-
|
1169
|
+
/**
|
1170
|
+
* Inverses number over modulo.
|
1171
|
+
* Implemented using [Euclidean GCD](https://brilliant.org/wiki/extended-euclidean-algorithm/).
|
1172
|
+
*/
|
1145
1173
|
function invert(number, modulo) {
|
1146
1174
|
if (number === _0n)
|
1147
1175
|
throw new Error('invert: expected non-zero number');
|
1148
1176
|
if (modulo <= _0n)
|
1149
1177
|
throw new Error('invert: expected positive modulus, got ' + modulo);
|
1150
|
-
// Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/
|
1151
1178
|
// Fermat's little theorem "CT-like" version inv(n) = n^(m-2) mod m is 30x slower.
|
1152
1179
|
let a = mod(number, modulo);
|
1153
1180
|
let b = modulo;
|
@@ -1234,9 +1261,18 @@ function tonelliShanks(P) {
|
|
1234
1261
|
return x;
|
1235
1262
|
};
|
1236
1263
|
}
|
1264
|
+
/**
|
1265
|
+
* Square root for a finite field. It will try to check if optimizations are applicable and fall back to 4:
|
1266
|
+
*
|
1267
|
+
* 1. P ≡ 3 (mod 4)
|
1268
|
+
* 2. P ≡ 5 (mod 8)
|
1269
|
+
* 3. P ≡ 9 (mod 16)
|
1270
|
+
* 4. Tonelli-Shanks algorithm
|
1271
|
+
*
|
1272
|
+
* Different algorithms can give different roots, it is up to user to decide which one they want.
|
1273
|
+
* For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).
|
1274
|
+
*/
|
1237
1275
|
function FpSqrt(P) {
|
1238
|
-
// NOTE: different algorithms can give different roots, it is up to user to decide which one they want.
|
1239
|
-
// For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).
|
1240
1276
|
// P ≡ 3 (mod 4)
|
1241
1277
|
// √n = n^((P+1)/4)
|
1242
1278
|
if (P % _4n === _3n) {
|
@@ -1365,10 +1401,13 @@ function FpInvertBatch(f, nums) {
|
|
1365
1401
|
function FpDiv(f, lhs, rhs) {
|
1366
1402
|
return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));
|
1367
1403
|
}
|
1404
|
+
/**
|
1405
|
+
* Legendre symbol.
|
1406
|
+
* * (a | p) ≡ 1 if a is a square (mod p), quadratic residue
|
1407
|
+
* * (a | p) ≡ -1 if a is not a square (mod p), quadratic non residue
|
1408
|
+
* * (a | p) ≡ 0 if a ≡ 0 (mod p)
|
1409
|
+
*/
|
1368
1410
|
function FpLegendre(order) {
|
1369
|
-
// (a | p) ≡ 1 if a is a square (mod p), quadratic residue
|
1370
|
-
// (a | p) ≡ -1 if a is not a square (mod p), quadratic non residue
|
1371
|
-
// (a | p) ≡ 0 if a ≡ 0 (mod p)
|
1372
1411
|
const legendreConst = (order - _1n) / _2n; // Integer arithmetic
|
1373
1412
|
return (f, x) => f.pow(x, legendreConst);
|
1374
1413
|
}
|
@@ -1388,15 +1427,15 @@ function nLength(n, nBitLength) {
|
|
1388
1427
|
return { nBitLength: _nBitLength, nByteLength };
|
1389
1428
|
}
|
1390
1429
|
/**
|
1391
|
-
* Initializes a finite field over prime.
|
1392
|
-
* Do not init in loop: slow. Very fragile: always run a benchmark on a change.
|
1430
|
+
* Initializes a finite field over prime.
|
1393
1431
|
* Major performance optimizations:
|
1394
1432
|
* * a) denormalized operations like mulN instead of mul
|
1395
1433
|
* * b) same object shape: never add or remove keys
|
1396
1434
|
* * c) Object.freeze
|
1397
|
-
*
|
1435
|
+
* Fragile: always run a benchmark on a change.
|
1436
|
+
* Security note: operations don't check 'isValid' for all elements for performance reasons,
|
1398
1437
|
* it is caller responsibility to check this.
|
1399
|
-
* This is low-level code, please make sure you know what you doing.
|
1438
|
+
* This is low-level code, please make sure you know what you're doing.
|
1400
1439
|
* @param ORDER prime positive bigint
|
1401
1440
|
* @param bitLen how many bits the field consumes
|
1402
1441
|
* @param isLE (def: false) if encoding / decoding should be in little-endian
|
@@ -1411,6 +1450,7 @@ function Field(ORDER, bitLen, isLE = false, redef = {}) {
|
|
1411
1450
|
let sqrtP; // cached sqrtP
|
1412
1451
|
const f = Object.freeze({
|
1413
1452
|
ORDER,
|
1453
|
+
isLE,
|
1414
1454
|
BITS,
|
1415
1455
|
BYTES,
|
1416
1456
|
MASK: (0, utils_js_1.bitMask)(BITS),
|
@@ -1473,7 +1513,7 @@ function FpSqrtEven(Fp, elm) {
|
|
1473
1513
|
* "Constant-time" private key generation utility.
|
1474
1514
|
* Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).
|
1475
1515
|
* Which makes it slightly more biased, less secure.
|
1476
|
-
* @deprecated use mapKeyToField instead
|
1516
|
+
* @deprecated use `mapKeyToField` instead
|
1477
1517
|
*/
|
1478
1518
|
function hashToPrivateScalar(hash, groupOrder, isLE = false) {
|
1479
1519
|
hash = (0, utils_js_1.ensureBytes)('privateHash', hash);
|
@@ -1527,7 +1567,7 @@ function mapHashToField(key, fieldOrder, isLE = false) {
|
|
1527
1567
|
// No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.
|
1528
1568
|
if (len < 16 || len < minLen || len > 1024)
|
1529
1569
|
throw new Error('expected ' + minLen + '-1024 bytes of input, got ' + len);
|
1530
|
-
const num = isLE ? (0, utils_js_1.
|
1570
|
+
const num = isLE ? (0, utils_js_1.bytesToNumberLE)(key) : (0, utils_js_1.bytesToNumberBE)(key);
|
1531
1571
|
// `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0
|
1532
1572
|
const reduced = mod(num, fieldOrder - _1n) + _1n;
|
1533
1573
|
return isLE ? (0, utils_js_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_js_1.numberToBytesBE)(reduced, fieldLen);
|
@@ -1546,6 +1586,12 @@ function mapHashToField(key, fieldOrder, isLE = false) {
|
|
1546
1586
|
|
1547
1587
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1548
1588
|
exports.montgomery = montgomery;
|
1589
|
+
/**
|
1590
|
+
* Montgomery curve methods. It's not really whole montgomery curve,
|
1591
|
+
* just bunch of very specific methods for X25519 / X448 from
|
1592
|
+
* [RFC 7748](https://www.rfc-editor.org/rfc/rfc7748)
|
1593
|
+
* @module
|
1594
|
+
*/
|
1549
1595
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
1550
1596
|
const modular_js_1 = __webpack_require__(/*! ./modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
1551
1597
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
@@ -1565,7 +1611,6 @@ function validateOpts(curve) {
|
|
1565
1611
|
// Set defaults
|
1566
1612
|
return Object.freeze({ ...curve });
|
1567
1613
|
}
|
1568
|
-
// NOTE: not really montgomery curve, just bunch of very specific methods for X25519/X448 (RFC 7748, https://www.rfc-editor.org/rfc/rfc7748)
|
1569
1614
|
// Uses only one coordinate instead of two
|
1570
1615
|
function montgomery(curveDef) {
|
1571
1616
|
const CURVE = validateOpts(curveDef);
|
@@ -1709,6 +1754,11 @@ function montgomery(curveDef) {
|
|
1709
1754
|
|
1710
1755
|
"use strict";
|
1711
1756
|
|
1757
|
+
/**
|
1758
|
+
* Hex, bytes and number utilities.
|
1759
|
+
* @module
|
1760
|
+
*/
|
1761
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
1712
1762
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1713
1763
|
exports.notImplemented = exports.bitMask = void 0;
|
1714
1764
|
exports.isBytes = isBytes;
|
@@ -1735,7 +1785,6 @@ exports.bitSet = bitSet;
|
|
1735
1785
|
exports.createHmacDrbg = createHmacDrbg;
|
1736
1786
|
exports.validateObject = validateObject;
|
1737
1787
|
exports.memoized = memoized;
|
1738
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
1739
1788
|
// 100 lines of code in the file are duplicated from noble-hashes (utils).
|
1740
1789
|
// This is OK: `abstract` directory does not use noble-hashes.
|
1741
1790
|
// User may opt-in into using different hashing library. This way, noble-hashes
|
@@ -2080,15 +2129,40 @@ function memoized(fn) {
|
|
2080
2129
|
"use strict";
|
2081
2130
|
|
2082
2131
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
2083
|
-
exports.DER = void 0;
|
2132
|
+
exports.DER = exports.DERErr = void 0;
|
2084
2133
|
exports.weierstrassPoints = weierstrassPoints;
|
2085
2134
|
exports.weierstrass = weierstrass;
|
2086
2135
|
exports.SWUFpSqrtRatio = SWUFpSqrtRatio;
|
2087
2136
|
exports.mapToCurveSimpleSWU = mapToCurveSimpleSWU;
|
2137
|
+
/**
|
2138
|
+
* Short Weierstrass curve methods. The formula is: y² = x³ + ax + b.
|
2139
|
+
*
|
2140
|
+
* ### Design rationale for types
|
2141
|
+
*
|
2142
|
+
* * Interaction between classes from different curves should fail:
|
2143
|
+
* `k256.Point.BASE.add(p256.Point.BASE)`
|
2144
|
+
* * For this purpose we want to use `instanceof` operator, which is fast and works during runtime
|
2145
|
+
* * Different calls of `curve()` would return different classes -
|
2146
|
+
* `curve(params) !== curve(params)`: if somebody decided to monkey-patch their curve,
|
2147
|
+
* it won't affect others
|
2148
|
+
*
|
2149
|
+
* TypeScript can't infer types for classes created inside a function. Classes is one instance
|
2150
|
+
* of nominative types in TypeScript and interfaces only check for shape, so it's hard to create
|
2151
|
+
* unique type for every function call.
|
2152
|
+
*
|
2153
|
+
* We can use generic types via some param, like curve opts, but that would:
|
2154
|
+
* 1. Enable interaction between `curve(params)` and `curve(params)` (curves of same params)
|
2155
|
+
* which is hard to debug.
|
2156
|
+
* 2. Params can be generic and we can't enforce them to be constant value:
|
2157
|
+
* if somebody creates curve from non-constant params,
|
2158
|
+
* it would be allowed to interact with other curves with non-constant params
|
2159
|
+
*
|
2160
|
+
* @todo https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#unique-symbol
|
2161
|
+
* @module
|
2162
|
+
*/
|
2088
2163
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
2089
|
-
// Short Weierstrass curve. The formula is: y² = x³ + ax + b
|
2090
2164
|
const curve_js_1 = __webpack_require__(/*! ./curve.js */ "../../node_modules/@noble/curves/abstract/curve.js");
|
2091
|
-
const
|
2165
|
+
const modular_js_1 = __webpack_require__(/*! ./modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
2092
2166
|
const ut = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
2093
2167
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
2094
2168
|
function validateSigVerOpts(opts) {
|
@@ -2125,6 +2199,12 @@ function validatePointOpts(curve) {
|
|
2125
2199
|
return Object.freeze({ ...opts });
|
2126
2200
|
}
|
2127
2201
|
const { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;
|
2202
|
+
class DERErr extends Error {
|
2203
|
+
constructor(m = '') {
|
2204
|
+
super(m);
|
2205
|
+
}
|
2206
|
+
}
|
2207
|
+
exports.DERErr = DERErr;
|
2128
2208
|
/**
|
2129
2209
|
* ASN.1 DER encoding utilities. ASN is very complex & fragile. Format:
|
2130
2210
|
*
|
@@ -2134,11 +2214,7 @@ const { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;
|
|
2134
2214
|
*/
|
2135
2215
|
exports.DER = {
|
2136
2216
|
// asn.1 DER encoding utils
|
2137
|
-
Err:
|
2138
|
-
constructor(m = '') {
|
2139
|
-
super(m);
|
2140
|
-
}
|
2141
|
-
},
|
2217
|
+
Err: DERErr,
|
2142
2218
|
// Basic building block is TLV (Tag-Length-Value)
|
2143
2219
|
_tlv: {
|
2144
2220
|
encode: (tag, data) => {
|
@@ -2247,7 +2323,7 @@ const _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n =
|
|
2247
2323
|
function weierstrassPoints(opts) {
|
2248
2324
|
const CURVE = validatePointOpts(opts);
|
2249
2325
|
const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ
|
2250
|
-
const Fn =
|
2326
|
+
const Fn = (0, modular_js_1.Field)(CURVE.n, CURVE.nBitLength);
|
2251
2327
|
const toBytes = CURVE.toBytes ||
|
2252
2328
|
((_c, point, _isCompressed) => {
|
2253
2329
|
const a = point.toAffine();
|
@@ -2305,7 +2381,7 @@ function weierstrassPoints(opts) {
|
|
2305
2381
|
throw new Error('invalid private key, expected hex or ' + nByteLength + ' bytes, got ' + typeof key);
|
2306
2382
|
}
|
2307
2383
|
if (wrapPrivateKey)
|
2308
|
-
num =
|
2384
|
+
num = (0, modular_js_1.mod)(num, N); // disabled by default, enabled for BLS
|
2309
2385
|
ut.aInRange('private key', num, _1n, N); // num in range [1..N-1]
|
2310
2386
|
return num;
|
2311
2387
|
}
|
@@ -2712,10 +2788,10 @@ function weierstrass(curveDef) {
|
|
2712
2788
|
const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32
|
2713
2789
|
const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32
|
2714
2790
|
function modN(a) {
|
2715
|
-
return
|
2791
|
+
return (0, modular_js_1.mod)(a, CURVE_ORDER);
|
2716
2792
|
}
|
2717
2793
|
function invN(a) {
|
2718
|
-
return
|
2794
|
+
return (0, modular_js_1.invert)(a, CURVE_ORDER);
|
2719
2795
|
}
|
2720
2796
|
const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({
|
2721
2797
|
...CURVE,
|
@@ -2864,8 +2940,8 @@ function weierstrass(curveDef) {
|
|
2864
2940
|
* (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.
|
2865
2941
|
*/
|
2866
2942
|
randomPrivateKey: () => {
|
2867
|
-
const length =
|
2868
|
-
return
|
2943
|
+
const length = (0, modular_js_1.getMinHashLength)(CURVE.n);
|
2944
|
+
return (0, modular_js_1.mapHashToField)(CURVE.randomBytes(length), CURVE.n);
|
2869
2945
|
},
|
2870
2946
|
/**
|
2871
2947
|
* Creates precompute table for an arbitrary EC point. Makes point "cached".
|
@@ -3201,7 +3277,7 @@ function SWUFpSqrtRatio(Fp, Z) {
|
|
3201
3277
|
* https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2
|
3202
3278
|
*/
|
3203
3279
|
function mapToCurveSimpleSWU(Fp, opts) {
|
3204
|
-
|
3280
|
+
(0, modular_js_1.validateField)(Fp);
|
3205
3281
|
if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))
|
3206
3282
|
throw new Error('mapToCurveSimpleSWU: invalid opts');
|
3207
3283
|
const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);
|
@@ -3256,20 +3332,22 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3256
3332
|
exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = void 0;
|
3257
3333
|
exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
|
3258
3334
|
exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
|
3259
|
-
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
3260
|
-
const sha512_1 = __webpack_require__(/*! @noble/hashes/sha512 */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/sha512.js");
|
3261
|
-
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js");
|
3262
|
-
const edwards_js_1 = __webpack_require__(/*! ./abstract/edwards.js */ "../../node_modules/@noble/curves/abstract/edwards.js");
|
3263
|
-
const hash_to_curve_js_1 = __webpack_require__(/*! ./abstract/hash-to-curve.js */ "../../node_modules/@noble/curves/abstract/hash-to-curve.js");
|
3264
|
-
const modular_js_1 = __webpack_require__(/*! ./abstract/modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
3265
|
-
const montgomery_js_1 = __webpack_require__(/*! ./abstract/montgomery.js */ "../../node_modules/@noble/curves/abstract/montgomery.js");
|
3266
|
-
const utils_js_1 = __webpack_require__(/*! ./abstract/utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
3267
3335
|
/**
|
3268
3336
|
* ed25519 Twisted Edwards curve with following addons:
|
3269
3337
|
* - X25519 ECDH
|
3270
3338
|
* - Ristretto cofactor elimination
|
3271
3339
|
* - Elligator hash-to-group / point indistinguishability
|
3340
|
+
* @module
|
3272
3341
|
*/
|
3342
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
3343
|
+
const sha512_1 = __webpack_require__(/*! @noble/hashes/sha512 */ "../../node_modules/@noble/hashes/sha512.js");
|
3344
|
+
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
3345
|
+
const curve_js_1 = __webpack_require__(/*! ./abstract/curve.js */ "../../node_modules/@noble/curves/abstract/curve.js");
|
3346
|
+
const edwards_js_1 = __webpack_require__(/*! ./abstract/edwards.js */ "../../node_modules/@noble/curves/abstract/edwards.js");
|
3347
|
+
const hash_to_curve_js_1 = __webpack_require__(/*! ./abstract/hash-to-curve.js */ "../../node_modules/@noble/curves/abstract/hash-to-curve.js");
|
3348
|
+
const modular_js_1 = __webpack_require__(/*! ./abstract/modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
3349
|
+
const montgomery_js_1 = __webpack_require__(/*! ./abstract/montgomery.js */ "../../node_modules/@noble/curves/abstract/montgomery.js");
|
3350
|
+
const utils_js_1 = __webpack_require__(/*! ./abstract/utils.js */ "../../node_modules/@noble/curves/abstract/utils.js");
|
3273
3351
|
const ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');
|
3274
3352
|
// √(-1) aka √(a) aka 2^((p-1)/4)
|
3275
3353
|
const ED25519_SQRT_M1 = /* @__PURE__ */ BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');
|
@@ -3366,6 +3444,14 @@ const ed25519Defaults = /* @__PURE__ */ (() => ({
|
|
3366
3444
|
}))();
|
3367
3445
|
/**
|
3368
3446
|
* ed25519 curve with EdDSA signatures.
|
3447
|
+
* @example
|
3448
|
+
* import { ed25519 } from '@noble/curves/ed25519';
|
3449
|
+
* const priv = ed25519.utils.randomPrivateKey();
|
3450
|
+
* const pub = ed25519.getPublicKey(priv);
|
3451
|
+
* const msg = new TextEncoder().encode('hello');
|
3452
|
+
* const sig = ed25519.sign(msg, priv);
|
3453
|
+
* ed25519.verify(sig, msg, pub); // Default mode: follows ZIP215
|
3454
|
+
* ed25519.verify(sig, msg, pub, { zip215: false }); // RFC8032 / FIPS 186-5
|
3369
3455
|
*/
|
3370
3456
|
exports.ed25519 = (() => (0, edwards_js_1.twistedEdwards)(ed25519Defaults))();
|
3371
3457
|
function ed25519_domain(data, ctx, phflag) {
|
@@ -3381,6 +3467,16 @@ exports.ed25519ph = (() => (0, edwards_js_1.twistedEdwards)(Object.assign({}, ed
|
|
3381
3467
|
domain: ed25519_domain,
|
3382
3468
|
prehash: sha512_1.sha512,
|
3383
3469
|
})))();
|
3470
|
+
/**
|
3471
|
+
* ECDH using curve25519 aka x25519.
|
3472
|
+
* @example
|
3473
|
+
* import { x25519 } from '@noble/curves/ed25519';
|
3474
|
+
* const priv = 'a546e36bf0527c9d3b16154b82465edd62144c0ac1fc5a18506a2244ba449ac4';
|
3475
|
+
* const pub = 'e6db6867583030db3594c1a424b15f7c726624ec26b3353b10a903a6d0ab1c4c';
|
3476
|
+
* x25519.getSharedSecret(priv, pub) === x25519.scalarMult(priv, pub); // aliases
|
3477
|
+
* x25519.getPublicKey(priv) === x25519.scalarMultBase(priv);
|
3478
|
+
* x25519.getPublicKey(x25519.utils.randomPrivateKey());
|
3479
|
+
*/
|
3384
3480
|
exports.x25519 = (() => (0, montgomery_js_1.montgomery)({
|
3385
3481
|
P: ED25519_P,
|
3386
3482
|
a: BigInt(486662),
|
@@ -3610,6 +3706,10 @@ class RistPoint {
|
|
3610
3706
|
throw new Error(emsg);
|
3611
3707
|
return new RistPoint(new exports.ed25519.ExtendedPoint(x, y, _1n, t));
|
3612
3708
|
}
|
3709
|
+
static msm(points, scalars) {
|
3710
|
+
const Fn = (0, modular_js_1.Field)(exports.ed25519.CURVE.n, exports.ed25519.CURVE.nBitLength);
|
3711
|
+
return (0, curve_js_1.pippenger)(RistPoint, Fn, points, scalars);
|
3712
|
+
}
|
3613
3713
|
/**
|
3614
3714
|
* Encodes ristretto point to Uint8Array.
|
3615
3715
|
* https://ristretto.group/formulas/encoding.html
|
@@ -3647,1081 +3747,58 @@ class RistPoint {
|
|
3647
3747
|
toHex() {
|
3648
3748
|
return (0, utils_js_1.bytesToHex)(this.toRawBytes());
|
3649
3749
|
}
|
3650
|
-
toString() {
|
3651
|
-
return this.toHex();
|
3652
|
-
}
|
3653
|
-
// Compare one point to another.
|
3654
|
-
equals(other) {
|
3655
|
-
assertRstPoint(other);
|
3656
|
-
const { ex: X1, ey: Y1 } = this.ep;
|
3657
|
-
const { ex: X2, ey: Y2 } = other.ep;
|
3658
|
-
const mod = exports.ed25519.CURVE.Fp.create;
|
3659
|
-
// (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)
|
3660
|
-
const one = mod(X1 * Y2) === mod(Y1 * X2);
|
3661
|
-
const two = mod(Y1 * Y2) === mod(X1 * X2);
|
3662
|
-
return one || two;
|
3663
|
-
}
|
3664
|
-
add(other) {
|
3665
|
-
assertRstPoint(other);
|
3666
|
-
return new RistPoint(this.ep.add(other.ep));
|
3667
|
-
}
|
3668
|
-
subtract(other) {
|
3669
|
-
assertRstPoint(other);
|
3670
|
-
return new RistPoint(this.ep.subtract(other.ep));
|
3671
|
-
}
|
3672
|
-
multiply(scalar) {
|
3673
|
-
return new RistPoint(this.ep.multiply(scalar));
|
3674
|
-
}
|
3675
|
-
multiplyUnsafe(scalar) {
|
3676
|
-
return new RistPoint(this.ep.multiplyUnsafe(scalar));
|
3677
|
-
}
|
3678
|
-
double() {
|
3679
|
-
return new RistPoint(this.ep.double());
|
3680
|
-
}
|
3681
|
-
negate() {
|
3682
|
-
return new RistPoint(this.ep.negate());
|
3683
|
-
}
|
3684
|
-
}
|
3685
|
-
exports.RistrettoPoint = (() => {
|
3686
|
-
if (!RistPoint.BASE)
|
3687
|
-
RistPoint.BASE = new RistPoint(exports.ed25519.ExtendedPoint.BASE);
|
3688
|
-
if (!RistPoint.ZERO)
|
3689
|
-
RistPoint.ZERO = new RistPoint(exports.ed25519.ExtendedPoint.ZERO);
|
3690
|
-
return RistPoint;
|
3691
|
-
})();
|
3692
|
-
// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B
|
3693
|
-
const hashToRistretto255 = (msg, options) => {
|
3694
|
-
const d = options.DST;
|
3695
|
-
const DST = typeof d === 'string' ? (0, utils_1.utf8ToBytes)(d) : d;
|
3696
|
-
const uniform_bytes = (0, hash_to_curve_js_1.expand_message_xmd)(msg, DST, 64, sha512_1.sha512);
|
3697
|
-
const P = RistPoint.hashToCurve(uniform_bytes);
|
3698
|
-
return P;
|
3699
|
-
};
|
3700
|
-
exports.hashToRistretto255 = hashToRistretto255;
|
3701
|
-
exports.hash_to_ristretto255 = exports.hashToRistretto255; // legacy
|
3702
|
-
|
3703
|
-
|
3704
|
-
/***/ }),
|
3705
|
-
|
3706
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_assert.js":
|
3707
|
-
/*!******************************************************************************!*\
|
3708
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/_assert.js ***!
|
3709
|
-
\******************************************************************************/
|
3710
|
-
/***/ ((__unused_webpack_module, exports) => {
|
3711
|
-
|
3712
|
-
"use strict";
|
3713
|
-
|
3714
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3715
|
-
exports.anumber = anumber;
|
3716
|
-
exports.number = anumber;
|
3717
|
-
exports.abytes = abytes;
|
3718
|
-
exports.bytes = abytes;
|
3719
|
-
exports.ahash = ahash;
|
3720
|
-
exports.aexists = aexists;
|
3721
|
-
exports.aoutput = aoutput;
|
3722
|
-
function anumber(n) {
|
3723
|
-
if (!Number.isSafeInteger(n) || n < 0)
|
3724
|
-
throw new Error('positive integer expected, got ' + n);
|
3725
|
-
}
|
3726
|
-
// copied from utils
|
3727
|
-
function isBytes(a) {
|
3728
|
-
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
3729
|
-
}
|
3730
|
-
function abytes(b, ...lengths) {
|
3731
|
-
if (!isBytes(b))
|
3732
|
-
throw new Error('Uint8Array expected');
|
3733
|
-
if (lengths.length > 0 && !lengths.includes(b.length))
|
3734
|
-
throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);
|
3735
|
-
}
|
3736
|
-
function ahash(h) {
|
3737
|
-
if (typeof h !== 'function' || typeof h.create !== 'function')
|
3738
|
-
throw new Error('Hash should be wrapped by utils.wrapConstructor');
|
3739
|
-
anumber(h.outputLen);
|
3740
|
-
anumber(h.blockLen);
|
3741
|
-
}
|
3742
|
-
function aexists(instance, checkFinished = true) {
|
3743
|
-
if (instance.destroyed)
|
3744
|
-
throw new Error('Hash instance has been destroyed');
|
3745
|
-
if (checkFinished && instance.finished)
|
3746
|
-
throw new Error('Hash#digest() has already been called');
|
3747
|
-
}
|
3748
|
-
function aoutput(out, instance) {
|
3749
|
-
abytes(out);
|
3750
|
-
const min = instance.outputLen;
|
3751
|
-
if (out.length < min) {
|
3752
|
-
throw new Error('digestInto() expects output buffer of length at least ' + min);
|
3753
|
-
}
|
3754
|
-
}
|
3755
|
-
const assert = {
|
3756
|
-
number: anumber,
|
3757
|
-
bytes: abytes,
|
3758
|
-
hash: ahash,
|
3759
|
-
exists: aexists,
|
3760
|
-
output: aoutput,
|
3761
|
-
};
|
3762
|
-
exports["default"] = assert;
|
3763
|
-
|
3764
|
-
|
3765
|
-
/***/ }),
|
3766
|
-
|
3767
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_md.js":
|
3768
|
-
/*!**************************************************************************!*\
|
3769
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/_md.js ***!
|
3770
|
-
\**************************************************************************/
|
3771
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
3772
|
-
|
3773
|
-
"use strict";
|
3774
|
-
|
3775
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3776
|
-
exports.HashMD = exports.Maj = exports.Chi = void 0;
|
3777
|
-
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_assert.js");
|
3778
|
-
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js");
|
3779
|
-
/**
|
3780
|
-
* Polyfill for Safari 14
|
3781
|
-
*/
|
3782
|
-
function setBigUint64(view, byteOffset, value, isLE) {
|
3783
|
-
if (typeof view.setBigUint64 === 'function')
|
3784
|
-
return view.setBigUint64(byteOffset, value, isLE);
|
3785
|
-
const _32n = BigInt(32);
|
3786
|
-
const _u32_max = BigInt(0xffffffff);
|
3787
|
-
const wh = Number((value >> _32n) & _u32_max);
|
3788
|
-
const wl = Number(value & _u32_max);
|
3789
|
-
const h = isLE ? 4 : 0;
|
3790
|
-
const l = isLE ? 0 : 4;
|
3791
|
-
view.setUint32(byteOffset + h, wh, isLE);
|
3792
|
-
view.setUint32(byteOffset + l, wl, isLE);
|
3793
|
-
}
|
3794
|
-
/**
|
3795
|
-
* Choice: a ? b : c
|
3796
|
-
*/
|
3797
|
-
const Chi = (a, b, c) => (a & b) ^ (~a & c);
|
3798
|
-
exports.Chi = Chi;
|
3799
|
-
/**
|
3800
|
-
* Majority function, true if any two inputs is true
|
3801
|
-
*/
|
3802
|
-
const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);
|
3803
|
-
exports.Maj = Maj;
|
3804
|
-
/**
|
3805
|
-
* Merkle-Damgard hash construction base class.
|
3806
|
-
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
|
3807
|
-
*/
|
3808
|
-
class HashMD extends utils_js_1.Hash {
|
3809
|
-
constructor(blockLen, outputLen, padOffset, isLE) {
|
3810
|
-
super();
|
3811
|
-
this.blockLen = blockLen;
|
3812
|
-
this.outputLen = outputLen;
|
3813
|
-
this.padOffset = padOffset;
|
3814
|
-
this.isLE = isLE;
|
3815
|
-
this.finished = false;
|
3816
|
-
this.length = 0;
|
3817
|
-
this.pos = 0;
|
3818
|
-
this.destroyed = false;
|
3819
|
-
this.buffer = new Uint8Array(blockLen);
|
3820
|
-
this.view = (0, utils_js_1.createView)(this.buffer);
|
3821
|
-
}
|
3822
|
-
update(data) {
|
3823
|
-
(0, _assert_js_1.aexists)(this);
|
3824
|
-
const { view, buffer, blockLen } = this;
|
3825
|
-
data = (0, utils_js_1.toBytes)(data);
|
3826
|
-
const len = data.length;
|
3827
|
-
for (let pos = 0; pos < len;) {
|
3828
|
-
const take = Math.min(blockLen - this.pos, len - pos);
|
3829
|
-
// Fast path: we have at least one block in input, cast it to view and process
|
3830
|
-
if (take === blockLen) {
|
3831
|
-
const dataView = (0, utils_js_1.createView)(data);
|
3832
|
-
for (; blockLen <= len - pos; pos += blockLen)
|
3833
|
-
this.process(dataView, pos);
|
3834
|
-
continue;
|
3835
|
-
}
|
3836
|
-
buffer.set(data.subarray(pos, pos + take), this.pos);
|
3837
|
-
this.pos += take;
|
3838
|
-
pos += take;
|
3839
|
-
if (this.pos === blockLen) {
|
3840
|
-
this.process(view, 0);
|
3841
|
-
this.pos = 0;
|
3842
|
-
}
|
3843
|
-
}
|
3844
|
-
this.length += data.length;
|
3845
|
-
this.roundClean();
|
3846
|
-
return this;
|
3847
|
-
}
|
3848
|
-
digestInto(out) {
|
3849
|
-
(0, _assert_js_1.aexists)(this);
|
3850
|
-
(0, _assert_js_1.aoutput)(out, this);
|
3851
|
-
this.finished = true;
|
3852
|
-
// Padding
|
3853
|
-
// We can avoid allocation of buffer for padding completely if it
|
3854
|
-
// was previously not allocated here. But it won't change performance.
|
3855
|
-
const { buffer, view, blockLen, isLE } = this;
|
3856
|
-
let { pos } = this;
|
3857
|
-
// append the bit '1' to the message
|
3858
|
-
buffer[pos++] = 0b10000000;
|
3859
|
-
this.buffer.subarray(pos).fill(0);
|
3860
|
-
// we have less than padOffset left in buffer, so we cannot put length in
|
3861
|
-
// current block, need process it and pad again
|
3862
|
-
if (this.padOffset > blockLen - pos) {
|
3863
|
-
this.process(view, 0);
|
3864
|
-
pos = 0;
|
3865
|
-
}
|
3866
|
-
// Pad until full block byte with zeros
|
3867
|
-
for (let i = pos; i < blockLen; i++)
|
3868
|
-
buffer[i] = 0;
|
3869
|
-
// Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that
|
3870
|
-
// You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.
|
3871
|
-
// So we just write lowest 64 bits of that value.
|
3872
|
-
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
|
3873
|
-
this.process(view, 0);
|
3874
|
-
const oview = (0, utils_js_1.createView)(out);
|
3875
|
-
const len = this.outputLen;
|
3876
|
-
// NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT
|
3877
|
-
if (len % 4)
|
3878
|
-
throw new Error('_sha2: outputLen should be aligned to 32bit');
|
3879
|
-
const outLen = len / 4;
|
3880
|
-
const state = this.get();
|
3881
|
-
if (outLen > state.length)
|
3882
|
-
throw new Error('_sha2: outputLen bigger than state');
|
3883
|
-
for (let i = 0; i < outLen; i++)
|
3884
|
-
oview.setUint32(4 * i, state[i], isLE);
|
3885
|
-
}
|
3886
|
-
digest() {
|
3887
|
-
const { buffer, outputLen } = this;
|
3888
|
-
this.digestInto(buffer);
|
3889
|
-
const res = buffer.slice(0, outputLen);
|
3890
|
-
this.destroy();
|
3891
|
-
return res;
|
3892
|
-
}
|
3893
|
-
_cloneInto(to) {
|
3894
|
-
to || (to = new this.constructor());
|
3895
|
-
to.set(...this.get());
|
3896
|
-
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
3897
|
-
to.length = length;
|
3898
|
-
to.pos = pos;
|
3899
|
-
to.finished = finished;
|
3900
|
-
to.destroyed = destroyed;
|
3901
|
-
if (length % blockLen)
|
3902
|
-
to.buffer.set(buffer);
|
3903
|
-
return to;
|
3904
|
-
}
|
3905
|
-
}
|
3906
|
-
exports.HashMD = HashMD;
|
3907
|
-
|
3908
|
-
|
3909
|
-
/***/ }),
|
3910
|
-
|
3911
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_u64.js":
|
3912
|
-
/*!***************************************************************************!*\
|
3913
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/_u64.js ***!
|
3914
|
-
\***************************************************************************/
|
3915
|
-
/***/ ((__unused_webpack_module, exports) => {
|
3916
|
-
|
3917
|
-
"use strict";
|
3918
|
-
|
3919
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3920
|
-
exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = void 0;
|
3921
|
-
exports.fromBig = fromBig;
|
3922
|
-
exports.split = split;
|
3923
|
-
exports.add = add;
|
3924
|
-
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
3925
|
-
const _32n = /* @__PURE__ */ BigInt(32);
|
3926
|
-
// BigUint64Array is too slow as per 2024, so we implement it using Uint32Array.
|
3927
|
-
// TODO: re-check https://issues.chromium.org/issues/42212588
|
3928
|
-
function fromBig(n, le = false) {
|
3929
|
-
if (le)
|
3930
|
-
return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };
|
3931
|
-
return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
3932
|
-
}
|
3933
|
-
function split(lst, le = false) {
|
3934
|
-
let Ah = new Uint32Array(lst.length);
|
3935
|
-
let Al = new Uint32Array(lst.length);
|
3936
|
-
for (let i = 0; i < lst.length; i++) {
|
3937
|
-
const { h, l } = fromBig(lst[i], le);
|
3938
|
-
[Ah[i], Al[i]] = [h, l];
|
3939
|
-
}
|
3940
|
-
return [Ah, Al];
|
3941
|
-
}
|
3942
|
-
const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);
|
3943
|
-
exports.toBig = toBig;
|
3944
|
-
// for Shift in [0, 32)
|
3945
|
-
const shrSH = (h, _l, s) => h >>> s;
|
3946
|
-
exports.shrSH = shrSH;
|
3947
|
-
const shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
|
3948
|
-
exports.shrSL = shrSL;
|
3949
|
-
// Right rotate for Shift in [1, 32)
|
3950
|
-
const rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));
|
3951
|
-
exports.rotrSH = rotrSH;
|
3952
|
-
const rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
|
3953
|
-
exports.rotrSL = rotrSL;
|
3954
|
-
// Right rotate for Shift in (32, 64), NOTE: 32 is special case.
|
3955
|
-
const rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));
|
3956
|
-
exports.rotrBH = rotrBH;
|
3957
|
-
const rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));
|
3958
|
-
exports.rotrBL = rotrBL;
|
3959
|
-
// Right rotate for shift===32 (just swaps l&h)
|
3960
|
-
const rotr32H = (_h, l) => l;
|
3961
|
-
exports.rotr32H = rotr32H;
|
3962
|
-
const rotr32L = (h, _l) => h;
|
3963
|
-
exports.rotr32L = rotr32L;
|
3964
|
-
// Left rotate for Shift in [1, 32)
|
3965
|
-
const rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));
|
3966
|
-
exports.rotlSH = rotlSH;
|
3967
|
-
const rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));
|
3968
|
-
exports.rotlSL = rotlSL;
|
3969
|
-
// Left rotate for Shift in (32, 64), NOTE: 32 is special case.
|
3970
|
-
const rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));
|
3971
|
-
exports.rotlBH = rotlBH;
|
3972
|
-
const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));
|
3973
|
-
exports.rotlBL = rotlBL;
|
3974
|
-
// JS uses 32-bit signed integers for bitwise operations which means we cannot
|
3975
|
-
// simple take carry out of low bit sum by shift, we need to use division.
|
3976
|
-
function add(Ah, Al, Bh, Bl) {
|
3977
|
-
const l = (Al >>> 0) + (Bl >>> 0);
|
3978
|
-
return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };
|
3979
|
-
}
|
3980
|
-
// Addition with more than 2 elements
|
3981
|
-
const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
3982
|
-
exports.add3L = add3L;
|
3983
|
-
const add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;
|
3984
|
-
exports.add3H = add3H;
|
3985
|
-
const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
3986
|
-
exports.add4L = add4L;
|
3987
|
-
const add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;
|
3988
|
-
exports.add4H = add4H;
|
3989
|
-
const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
3990
|
-
exports.add5L = add5L;
|
3991
|
-
const add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;
|
3992
|
-
exports.add5H = add5H;
|
3993
|
-
// prettier-ignore
|
3994
|
-
const u64 = {
|
3995
|
-
fromBig, split, toBig,
|
3996
|
-
shrSH, shrSL,
|
3997
|
-
rotrSH, rotrSL, rotrBH, rotrBL,
|
3998
|
-
rotr32H, rotr32L,
|
3999
|
-
rotlSH, rotlSL, rotlBH, rotlBL,
|
4000
|
-
add, add3L, add3H, add4L, add4H, add5H, add5L,
|
4001
|
-
};
|
4002
|
-
exports["default"] = u64;
|
4003
|
-
|
4004
|
-
|
4005
|
-
/***/ }),
|
4006
|
-
|
4007
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/crypto.js":
|
4008
|
-
/*!*****************************************************************************!*\
|
4009
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/crypto.js ***!
|
4010
|
-
\*****************************************************************************/
|
4011
|
-
/***/ ((__unused_webpack_module, exports) => {
|
4012
|
-
|
4013
|
-
"use strict";
|
4014
|
-
|
4015
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4016
|
-
exports.crypto = void 0;
|
4017
|
-
exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
4018
|
-
|
4019
|
-
|
4020
|
-
/***/ }),
|
4021
|
-
|
4022
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/hmac.js":
|
4023
|
-
/*!***************************************************************************!*\
|
4024
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/hmac.js ***!
|
4025
|
-
\***************************************************************************/
|
4026
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
4027
|
-
|
4028
|
-
"use strict";
|
4029
|
-
|
4030
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4031
|
-
exports.hmac = exports.HMAC = void 0;
|
4032
|
-
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_assert.js");
|
4033
|
-
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js");
|
4034
|
-
// HMAC (RFC 2104)
|
4035
|
-
class HMAC extends utils_js_1.Hash {
|
4036
|
-
constructor(hash, _key) {
|
4037
|
-
super();
|
4038
|
-
this.finished = false;
|
4039
|
-
this.destroyed = false;
|
4040
|
-
(0, _assert_js_1.ahash)(hash);
|
4041
|
-
const key = (0, utils_js_1.toBytes)(_key);
|
4042
|
-
this.iHash = hash.create();
|
4043
|
-
if (typeof this.iHash.update !== 'function')
|
4044
|
-
throw new Error('Expected instance of class which extends utils.Hash');
|
4045
|
-
this.blockLen = this.iHash.blockLen;
|
4046
|
-
this.outputLen = this.iHash.outputLen;
|
4047
|
-
const blockLen = this.blockLen;
|
4048
|
-
const pad = new Uint8Array(blockLen);
|
4049
|
-
// blockLen can be bigger than outputLen
|
4050
|
-
pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
|
4051
|
-
for (let i = 0; i < pad.length; i++)
|
4052
|
-
pad[i] ^= 0x36;
|
4053
|
-
this.iHash.update(pad);
|
4054
|
-
// By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone
|
4055
|
-
this.oHash = hash.create();
|
4056
|
-
// Undo internal XOR && apply outer XOR
|
4057
|
-
for (let i = 0; i < pad.length; i++)
|
4058
|
-
pad[i] ^= 0x36 ^ 0x5c;
|
4059
|
-
this.oHash.update(pad);
|
4060
|
-
pad.fill(0);
|
4061
|
-
}
|
4062
|
-
update(buf) {
|
4063
|
-
(0, _assert_js_1.aexists)(this);
|
4064
|
-
this.iHash.update(buf);
|
4065
|
-
return this;
|
4066
|
-
}
|
4067
|
-
digestInto(out) {
|
4068
|
-
(0, _assert_js_1.aexists)(this);
|
4069
|
-
(0, _assert_js_1.abytes)(out, this.outputLen);
|
4070
|
-
this.finished = true;
|
4071
|
-
this.iHash.digestInto(out);
|
4072
|
-
this.oHash.update(out);
|
4073
|
-
this.oHash.digestInto(out);
|
4074
|
-
this.destroy();
|
4075
|
-
}
|
4076
|
-
digest() {
|
4077
|
-
const out = new Uint8Array(this.oHash.outputLen);
|
4078
|
-
this.digestInto(out);
|
4079
|
-
return out;
|
4080
|
-
}
|
4081
|
-
_cloneInto(to) {
|
4082
|
-
// Create new instance without calling constructor since key already in state and we don't know it.
|
4083
|
-
to || (to = Object.create(Object.getPrototypeOf(this), {}));
|
4084
|
-
const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
|
4085
|
-
to = to;
|
4086
|
-
to.finished = finished;
|
4087
|
-
to.destroyed = destroyed;
|
4088
|
-
to.blockLen = blockLen;
|
4089
|
-
to.outputLen = outputLen;
|
4090
|
-
to.oHash = oHash._cloneInto(to.oHash);
|
4091
|
-
to.iHash = iHash._cloneInto(to.iHash);
|
4092
|
-
return to;
|
4093
|
-
}
|
4094
|
-
destroy() {
|
4095
|
-
this.destroyed = true;
|
4096
|
-
this.oHash.destroy();
|
4097
|
-
this.iHash.destroy();
|
4098
|
-
}
|
4099
|
-
}
|
4100
|
-
exports.HMAC = HMAC;
|
4101
|
-
/**
|
4102
|
-
* HMAC: RFC2104 message authentication code.
|
4103
|
-
* @param hash - function that would be used e.g. sha256
|
4104
|
-
* @param key - message key
|
4105
|
-
* @param message - message data
|
4106
|
-
* @example
|
4107
|
-
* import { hmac } from '@noble/hashes/hmac';
|
4108
|
-
* import { sha256 } from '@noble/hashes/sha2';
|
4109
|
-
* const mac1 = hmac(sha256, 'key', 'message');
|
4110
|
-
*/
|
4111
|
-
const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
|
4112
|
-
exports.hmac = hmac;
|
4113
|
-
exports.hmac.create = (hash, key) => new HMAC(hash, key);
|
4114
|
-
|
4115
|
-
|
4116
|
-
/***/ }),
|
4117
|
-
|
4118
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/sha256.js":
|
4119
|
-
/*!*****************************************************************************!*\
|
4120
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/sha256.js ***!
|
4121
|
-
\*****************************************************************************/
|
4122
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
4123
|
-
|
4124
|
-
"use strict";
|
4125
|
-
|
4126
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4127
|
-
exports.sha224 = exports.sha256 = exports.SHA256 = void 0;
|
4128
|
-
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_md.js");
|
4129
|
-
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js");
|
4130
|
-
// SHA2-256 need to try 2^128 hashes to execute birthday attack.
|
4131
|
-
// BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per late 2024.
|
4132
|
-
// Round constants:
|
4133
|
-
// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)
|
4134
|
-
// prettier-ignore
|
4135
|
-
const SHA256_K = /* @__PURE__ */ new Uint32Array([
|
4136
|
-
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
4137
|
-
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
4138
|
-
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
4139
|
-
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
4140
|
-
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
4141
|
-
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
4142
|
-
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
4143
|
-
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
4144
|
-
]);
|
4145
|
-
// Initial state:
|
4146
|
-
// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19
|
4147
|
-
// prettier-ignore
|
4148
|
-
const SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
4149
|
-
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
4150
|
-
]);
|
4151
|
-
// Temporary buffer, not used to store anything between runs
|
4152
|
-
// Named this way because it matches specification.
|
4153
|
-
const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
4154
|
-
class SHA256 extends _md_js_1.HashMD {
|
4155
|
-
constructor() {
|
4156
|
-
super(64, 32, 8, false);
|
4157
|
-
// We cannot use array here since array allows indexing by variable
|
4158
|
-
// which means optimizer/compiler cannot use registers.
|
4159
|
-
this.A = SHA256_IV[0] | 0;
|
4160
|
-
this.B = SHA256_IV[1] | 0;
|
4161
|
-
this.C = SHA256_IV[2] | 0;
|
4162
|
-
this.D = SHA256_IV[3] | 0;
|
4163
|
-
this.E = SHA256_IV[4] | 0;
|
4164
|
-
this.F = SHA256_IV[5] | 0;
|
4165
|
-
this.G = SHA256_IV[6] | 0;
|
4166
|
-
this.H = SHA256_IV[7] | 0;
|
4167
|
-
}
|
4168
|
-
get() {
|
4169
|
-
const { A, B, C, D, E, F, G, H } = this;
|
4170
|
-
return [A, B, C, D, E, F, G, H];
|
4171
|
-
}
|
4172
|
-
// prettier-ignore
|
4173
|
-
set(A, B, C, D, E, F, G, H) {
|
4174
|
-
this.A = A | 0;
|
4175
|
-
this.B = B | 0;
|
4176
|
-
this.C = C | 0;
|
4177
|
-
this.D = D | 0;
|
4178
|
-
this.E = E | 0;
|
4179
|
-
this.F = F | 0;
|
4180
|
-
this.G = G | 0;
|
4181
|
-
this.H = H | 0;
|
4182
|
-
}
|
4183
|
-
process(view, offset) {
|
4184
|
-
// Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array
|
4185
|
-
for (let i = 0; i < 16; i++, offset += 4)
|
4186
|
-
SHA256_W[i] = view.getUint32(offset, false);
|
4187
|
-
for (let i = 16; i < 64; i++) {
|
4188
|
-
const W15 = SHA256_W[i - 15];
|
4189
|
-
const W2 = SHA256_W[i - 2];
|
4190
|
-
const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ (W15 >>> 3);
|
4191
|
-
const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ (W2 >>> 10);
|
4192
|
-
SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;
|
4193
|
-
}
|
4194
|
-
// Compression function main loop, 64 rounds
|
4195
|
-
let { A, B, C, D, E, F, G, H } = this;
|
4196
|
-
for (let i = 0; i < 64; i++) {
|
4197
|
-
const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);
|
4198
|
-
const T1 = (H + sigma1 + (0, _md_js_1.Chi)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
4199
|
-
const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);
|
4200
|
-
const T2 = (sigma0 + (0, _md_js_1.Maj)(A, B, C)) | 0;
|
4201
|
-
H = G;
|
4202
|
-
G = F;
|
4203
|
-
F = E;
|
4204
|
-
E = (D + T1) | 0;
|
4205
|
-
D = C;
|
4206
|
-
C = B;
|
4207
|
-
B = A;
|
4208
|
-
A = (T1 + T2) | 0;
|
4209
|
-
}
|
4210
|
-
// Add the compressed chunk to the current hash value
|
4211
|
-
A = (A + this.A) | 0;
|
4212
|
-
B = (B + this.B) | 0;
|
4213
|
-
C = (C + this.C) | 0;
|
4214
|
-
D = (D + this.D) | 0;
|
4215
|
-
E = (E + this.E) | 0;
|
4216
|
-
F = (F + this.F) | 0;
|
4217
|
-
G = (G + this.G) | 0;
|
4218
|
-
H = (H + this.H) | 0;
|
4219
|
-
this.set(A, B, C, D, E, F, G, H);
|
4220
|
-
}
|
4221
|
-
roundClean() {
|
4222
|
-
SHA256_W.fill(0);
|
4223
|
-
}
|
4224
|
-
destroy() {
|
4225
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
4226
|
-
this.buffer.fill(0);
|
4227
|
-
}
|
4228
|
-
}
|
4229
|
-
exports.SHA256 = SHA256;
|
4230
|
-
// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
|
4231
|
-
class SHA224 extends SHA256 {
|
4232
|
-
constructor() {
|
4233
|
-
super();
|
4234
|
-
this.A = 0xc1059ed8 | 0;
|
4235
|
-
this.B = 0x367cd507 | 0;
|
4236
|
-
this.C = 0x3070dd17 | 0;
|
4237
|
-
this.D = 0xf70e5939 | 0;
|
4238
|
-
this.E = 0xffc00b31 | 0;
|
4239
|
-
this.F = 0x68581511 | 0;
|
4240
|
-
this.G = 0x64f98fa7 | 0;
|
4241
|
-
this.H = 0xbefa4fa4 | 0;
|
4242
|
-
this.outputLen = 28;
|
4243
|
-
}
|
4244
|
-
}
|
4245
|
-
/**
|
4246
|
-
* SHA2-256 hash function
|
4247
|
-
* @param message - data that would be hashed
|
4248
|
-
*/
|
4249
|
-
exports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());
|
4250
|
-
/**
|
4251
|
-
* SHA2-224 hash function
|
4252
|
-
*/
|
4253
|
-
exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());
|
4254
|
-
|
4255
|
-
|
4256
|
-
/***/ }),
|
4257
|
-
|
4258
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/sha512.js":
|
4259
|
-
/*!*****************************************************************************!*\
|
4260
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/sha512.js ***!
|
4261
|
-
\*****************************************************************************/
|
4262
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
4263
|
-
|
4264
|
-
"use strict";
|
4265
|
-
|
4266
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4267
|
-
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = void 0;
|
4268
|
-
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_md.js");
|
4269
|
-
const _u64_js_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_u64.js");
|
4270
|
-
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js");
|
4271
|
-
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
|
4272
|
-
// prettier-ignore
|
4273
|
-
const [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_js_1.default.split([
|
4274
|
-
'0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
|
4275
|
-
'0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
|
4276
|
-
'0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
|
4277
|
-
'0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',
|
4278
|
-
'0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',
|
4279
|
-
'0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',
|
4280
|
-
'0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',
|
4281
|
-
'0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',
|
4282
|
-
'0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',
|
4283
|
-
'0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',
|
4284
|
-
'0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',
|
4285
|
-
'0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',
|
4286
|
-
'0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',
|
4287
|
-
'0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',
|
4288
|
-
'0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',
|
4289
|
-
'0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',
|
4290
|
-
'0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',
|
4291
|
-
'0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',
|
4292
|
-
'0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',
|
4293
|
-
'0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
|
4294
|
-
].map(n => BigInt(n))))();
|
4295
|
-
// Temporary buffer, not used to store anything between runs
|
4296
|
-
const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
|
4297
|
-
const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
|
4298
|
-
class SHA512 extends _md_js_1.HashMD {
|
4299
|
-
constructor() {
|
4300
|
-
super(128, 64, 16, false);
|
4301
|
-
// We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
|
4302
|
-
// Also looks cleaner and easier to verify with spec.
|
4303
|
-
// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
|
4304
|
-
// h -- high 32 bits, l -- low 32 bits
|
4305
|
-
this.Ah = 0x6a09e667 | 0;
|
4306
|
-
this.Al = 0xf3bcc908 | 0;
|
4307
|
-
this.Bh = 0xbb67ae85 | 0;
|
4308
|
-
this.Bl = 0x84caa73b | 0;
|
4309
|
-
this.Ch = 0x3c6ef372 | 0;
|
4310
|
-
this.Cl = 0xfe94f82b | 0;
|
4311
|
-
this.Dh = 0xa54ff53a | 0;
|
4312
|
-
this.Dl = 0x5f1d36f1 | 0;
|
4313
|
-
this.Eh = 0x510e527f | 0;
|
4314
|
-
this.El = 0xade682d1 | 0;
|
4315
|
-
this.Fh = 0x9b05688c | 0;
|
4316
|
-
this.Fl = 0x2b3e6c1f | 0;
|
4317
|
-
this.Gh = 0x1f83d9ab | 0;
|
4318
|
-
this.Gl = 0xfb41bd6b | 0;
|
4319
|
-
this.Hh = 0x5be0cd19 | 0;
|
4320
|
-
this.Hl = 0x137e2179 | 0;
|
4321
|
-
}
|
4322
|
-
// prettier-ignore
|
4323
|
-
get() {
|
4324
|
-
const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
4325
|
-
return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
|
4326
|
-
}
|
4327
|
-
// prettier-ignore
|
4328
|
-
set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
|
4329
|
-
this.Ah = Ah | 0;
|
4330
|
-
this.Al = Al | 0;
|
4331
|
-
this.Bh = Bh | 0;
|
4332
|
-
this.Bl = Bl | 0;
|
4333
|
-
this.Ch = Ch | 0;
|
4334
|
-
this.Cl = Cl | 0;
|
4335
|
-
this.Dh = Dh | 0;
|
4336
|
-
this.Dl = Dl | 0;
|
4337
|
-
this.Eh = Eh | 0;
|
4338
|
-
this.El = El | 0;
|
4339
|
-
this.Fh = Fh | 0;
|
4340
|
-
this.Fl = Fl | 0;
|
4341
|
-
this.Gh = Gh | 0;
|
4342
|
-
this.Gl = Gl | 0;
|
4343
|
-
this.Hh = Hh | 0;
|
4344
|
-
this.Hl = Hl | 0;
|
4345
|
-
}
|
4346
|
-
process(view, offset) {
|
4347
|
-
// Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
|
4348
|
-
for (let i = 0; i < 16; i++, offset += 4) {
|
4349
|
-
SHA512_W_H[i] = view.getUint32(offset);
|
4350
|
-
SHA512_W_L[i] = view.getUint32((offset += 4));
|
4351
|
-
}
|
4352
|
-
for (let i = 16; i < 80; i++) {
|
4353
|
-
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
|
4354
|
-
const W15h = SHA512_W_H[i - 15] | 0;
|
4355
|
-
const W15l = SHA512_W_L[i - 15] | 0;
|
4356
|
-
const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);
|
4357
|
-
const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);
|
4358
|
-
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
|
4359
|
-
const W2h = SHA512_W_H[i - 2] | 0;
|
4360
|
-
const W2l = SHA512_W_L[i - 2] | 0;
|
4361
|
-
const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);
|
4362
|
-
const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);
|
4363
|
-
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
|
4364
|
-
const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
4365
|
-
const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
4366
|
-
SHA512_W_H[i] = SUMh | 0;
|
4367
|
-
SHA512_W_L[i] = SUMl | 0;
|
4368
|
-
}
|
4369
|
-
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
4370
|
-
// Compression function main loop, 80 rounds
|
4371
|
-
for (let i = 0; i < 80; i++) {
|
4372
|
-
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
|
4373
|
-
const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);
|
4374
|
-
const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);
|
4375
|
-
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
4376
|
-
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
|
4377
|
-
const CHIl = (El & Fl) ^ (~El & Gl);
|
4378
|
-
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
|
4379
|
-
// prettier-ignore
|
4380
|
-
const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
4381
|
-
const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
4382
|
-
const T1l = T1ll | 0;
|
4383
|
-
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
|
4384
|
-
const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);
|
4385
|
-
const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);
|
4386
|
-
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
|
4387
|
-
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
|
4388
|
-
Hh = Gh | 0;
|
4389
|
-
Hl = Gl | 0;
|
4390
|
-
Gh = Fh | 0;
|
4391
|
-
Gl = Fl | 0;
|
4392
|
-
Fh = Eh | 0;
|
4393
|
-
Fl = El | 0;
|
4394
|
-
({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
4395
|
-
Dh = Ch | 0;
|
4396
|
-
Dl = Cl | 0;
|
4397
|
-
Ch = Bh | 0;
|
4398
|
-
Cl = Bl | 0;
|
4399
|
-
Bh = Ah | 0;
|
4400
|
-
Bl = Al | 0;
|
4401
|
-
const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);
|
4402
|
-
Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);
|
4403
|
-
Al = All | 0;
|
4404
|
-
}
|
4405
|
-
// Add the compressed chunk to the current hash value
|
4406
|
-
({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
4407
|
-
({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
4408
|
-
({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
4409
|
-
({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
4410
|
-
({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
4411
|
-
({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
4412
|
-
({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
4413
|
-
({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
4414
|
-
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
4415
|
-
}
|
4416
|
-
roundClean() {
|
4417
|
-
SHA512_W_H.fill(0);
|
4418
|
-
SHA512_W_L.fill(0);
|
4419
|
-
}
|
4420
|
-
destroy() {
|
4421
|
-
this.buffer.fill(0);
|
4422
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
4423
|
-
}
|
4424
|
-
}
|
4425
|
-
exports.SHA512 = SHA512;
|
4426
|
-
class SHA512_224 extends SHA512 {
|
4427
|
-
constructor() {
|
4428
|
-
super();
|
4429
|
-
// h -- high 32 bits, l -- low 32 bits
|
4430
|
-
this.Ah = 0x8c3d37c8 | 0;
|
4431
|
-
this.Al = 0x19544da2 | 0;
|
4432
|
-
this.Bh = 0x73e19966 | 0;
|
4433
|
-
this.Bl = 0x89dcd4d6 | 0;
|
4434
|
-
this.Ch = 0x1dfab7ae | 0;
|
4435
|
-
this.Cl = 0x32ff9c82 | 0;
|
4436
|
-
this.Dh = 0x679dd514 | 0;
|
4437
|
-
this.Dl = 0x582f9fcf | 0;
|
4438
|
-
this.Eh = 0x0f6d2b69 | 0;
|
4439
|
-
this.El = 0x7bd44da8 | 0;
|
4440
|
-
this.Fh = 0x77e36f73 | 0;
|
4441
|
-
this.Fl = 0x04c48942 | 0;
|
4442
|
-
this.Gh = 0x3f9d85a8 | 0;
|
4443
|
-
this.Gl = 0x6a1d36c8 | 0;
|
4444
|
-
this.Hh = 0x1112e6ad | 0;
|
4445
|
-
this.Hl = 0x91d692a1 | 0;
|
4446
|
-
this.outputLen = 28;
|
4447
|
-
}
|
4448
|
-
}
|
4449
|
-
exports.SHA512_224 = SHA512_224;
|
4450
|
-
class SHA512_256 extends SHA512 {
|
4451
|
-
constructor() {
|
4452
|
-
super();
|
4453
|
-
// h -- high 32 bits, l -- low 32 bits
|
4454
|
-
this.Ah = 0x22312194 | 0;
|
4455
|
-
this.Al = 0xfc2bf72c | 0;
|
4456
|
-
this.Bh = 0x9f555fa3 | 0;
|
4457
|
-
this.Bl = 0xc84c64c2 | 0;
|
4458
|
-
this.Ch = 0x2393b86b | 0;
|
4459
|
-
this.Cl = 0x6f53b151 | 0;
|
4460
|
-
this.Dh = 0x96387719 | 0;
|
4461
|
-
this.Dl = 0x5940eabd | 0;
|
4462
|
-
this.Eh = 0x96283ee2 | 0;
|
4463
|
-
this.El = 0xa88effe3 | 0;
|
4464
|
-
this.Fh = 0xbe5e1e25 | 0;
|
4465
|
-
this.Fl = 0x53863992 | 0;
|
4466
|
-
this.Gh = 0x2b0199fc | 0;
|
4467
|
-
this.Gl = 0x2c85b8aa | 0;
|
4468
|
-
this.Hh = 0x0eb72ddc | 0;
|
4469
|
-
this.Hl = 0x81c52ca2 | 0;
|
4470
|
-
this.outputLen = 32;
|
4471
|
-
}
|
4472
|
-
}
|
4473
|
-
exports.SHA512_256 = SHA512_256;
|
4474
|
-
class SHA384 extends SHA512 {
|
4475
|
-
constructor() {
|
4476
|
-
super();
|
4477
|
-
// h -- high 32 bits, l -- low 32 bits
|
4478
|
-
this.Ah = 0xcbbb9d5d | 0;
|
4479
|
-
this.Al = 0xc1059ed8 | 0;
|
4480
|
-
this.Bh = 0x629a292a | 0;
|
4481
|
-
this.Bl = 0x367cd507 | 0;
|
4482
|
-
this.Ch = 0x9159015a | 0;
|
4483
|
-
this.Cl = 0x3070dd17 | 0;
|
4484
|
-
this.Dh = 0x152fecd8 | 0;
|
4485
|
-
this.Dl = 0xf70e5939 | 0;
|
4486
|
-
this.Eh = 0x67332667 | 0;
|
4487
|
-
this.El = 0xffc00b31 | 0;
|
4488
|
-
this.Fh = 0x8eb44a87 | 0;
|
4489
|
-
this.Fl = 0x68581511 | 0;
|
4490
|
-
this.Gh = 0xdb0c2e0d | 0;
|
4491
|
-
this.Gl = 0x64f98fa7 | 0;
|
4492
|
-
this.Hh = 0x47b5481d | 0;
|
4493
|
-
this.Hl = 0xbefa4fa4 | 0;
|
4494
|
-
this.outputLen = 48;
|
4495
|
-
}
|
4496
|
-
}
|
4497
|
-
exports.SHA384 = SHA384;
|
4498
|
-
exports.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA512());
|
4499
|
-
exports.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());
|
4500
|
-
exports.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());
|
4501
|
-
exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());
|
4502
|
-
|
4503
|
-
|
4504
|
-
/***/ }),
|
4505
|
-
|
4506
|
-
/***/ "../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js":
|
4507
|
-
/*!****************************************************************************!*\
|
4508
|
-
!*** ../../node_modules/@noble/curves/node_modules/@noble/hashes/utils.js ***!
|
4509
|
-
\****************************************************************************/
|
4510
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
4511
|
-
|
4512
|
-
"use strict";
|
4513
|
-
|
4514
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4515
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4516
|
-
exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.byteSwap = exports.isLE = exports.rotl = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;
|
4517
|
-
exports.isBytes = isBytes;
|
4518
|
-
exports.byteSwap32 = byteSwap32;
|
4519
|
-
exports.bytesToHex = bytesToHex;
|
4520
|
-
exports.hexToBytes = hexToBytes;
|
4521
|
-
exports.asyncLoop = asyncLoop;
|
4522
|
-
exports.utf8ToBytes = utf8ToBytes;
|
4523
|
-
exports.toBytes = toBytes;
|
4524
|
-
exports.concatBytes = concatBytes;
|
4525
|
-
exports.checkOpts = checkOpts;
|
4526
|
-
exports.wrapConstructor = wrapConstructor;
|
4527
|
-
exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
|
4528
|
-
exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
|
4529
|
-
exports.randomBytes = randomBytes;
|
4530
|
-
// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.
|
4531
|
-
// node.js versions earlier than v19 don't declare it in global scope.
|
4532
|
-
// For node.js, package.json#exports field mapping rewrites import
|
4533
|
-
// from `crypto` to `cryptoNode`, which imports native module.
|
4534
|
-
// Makes the utils un-importable in browsers without a bundler.
|
4535
|
-
// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.
|
4536
|
-
const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/crypto.js");
|
4537
|
-
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/curves/node_modules/@noble/hashes/_assert.js");
|
4538
|
-
// export { isBytes } from './_assert.js';
|
4539
|
-
// We can't reuse isBytes from _assert, because somehow this causes huge perf issues
|
4540
|
-
function isBytes(a) {
|
4541
|
-
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
4542
|
-
}
|
4543
|
-
// Cast array to different type
|
4544
|
-
const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
4545
|
-
exports.u8 = u8;
|
4546
|
-
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
4547
|
-
exports.u32 = u32;
|
4548
|
-
// Cast array to view
|
4549
|
-
const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
4550
|
-
exports.createView = createView;
|
4551
|
-
// The rotate right (circular right shift) operation for uint32
|
4552
|
-
const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);
|
4553
|
-
exports.rotr = rotr;
|
4554
|
-
// The rotate left (circular left shift) operation for uint32
|
4555
|
-
const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);
|
4556
|
-
exports.rotl = rotl;
|
4557
|
-
exports.isLE = (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();
|
4558
|
-
// The byte swap operation for uint32
|
4559
|
-
const byteSwap = (word) => ((word << 24) & 0xff000000) |
|
4560
|
-
((word << 8) & 0xff0000) |
|
4561
|
-
((word >>> 8) & 0xff00) |
|
4562
|
-
((word >>> 24) & 0xff);
|
4563
|
-
exports.byteSwap = byteSwap;
|
4564
|
-
// Conditionally byte swap if on a big-endian platform
|
4565
|
-
exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => (0, exports.byteSwap)(n);
|
4566
|
-
// In place byte swap for Uint32Array
|
4567
|
-
function byteSwap32(arr) {
|
4568
|
-
for (let i = 0; i < arr.length; i++) {
|
4569
|
-
arr[i] = (0, exports.byteSwap)(arr[i]);
|
4570
|
-
}
|
4571
|
-
}
|
4572
|
-
// Array where index 0xf0 (240) is mapped to string 'f0'
|
4573
|
-
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
|
4574
|
-
/**
|
4575
|
-
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
4576
|
-
*/
|
4577
|
-
function bytesToHex(bytes) {
|
4578
|
-
(0, _assert_js_1.abytes)(bytes);
|
4579
|
-
// pre-caching improves the speed 6x
|
4580
|
-
let hex = '';
|
4581
|
-
for (let i = 0; i < bytes.length; i++) {
|
4582
|
-
hex += hexes[bytes[i]];
|
4583
|
-
}
|
4584
|
-
return hex;
|
4585
|
-
}
|
4586
|
-
// We use optimized technique to convert hex string to byte array
|
4587
|
-
const asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
4588
|
-
function asciiToBase16(ch) {
|
4589
|
-
if (ch >= asciis._0 && ch <= asciis._9)
|
4590
|
-
return ch - asciis._0; // '2' => 50-48
|
4591
|
-
if (ch >= asciis.A && ch <= asciis.F)
|
4592
|
-
return ch - (asciis.A - 10); // 'B' => 66-(65-10)
|
4593
|
-
if (ch >= asciis.a && ch <= asciis.f)
|
4594
|
-
return ch - (asciis.a - 10); // 'b' => 98-(97-10)
|
4595
|
-
return;
|
4596
|
-
}
|
4597
|
-
/**
|
4598
|
-
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
4599
|
-
*/
|
4600
|
-
function hexToBytes(hex) {
|
4601
|
-
if (typeof hex !== 'string')
|
4602
|
-
throw new Error('hex string expected, got ' + typeof hex);
|
4603
|
-
const hl = hex.length;
|
4604
|
-
const al = hl / 2;
|
4605
|
-
if (hl % 2)
|
4606
|
-
throw new Error('padded hex string expected, got unpadded hex of length ' + hl);
|
4607
|
-
const array = new Uint8Array(al);
|
4608
|
-
for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
|
4609
|
-
const n1 = asciiToBase16(hex.charCodeAt(hi));
|
4610
|
-
const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
|
4611
|
-
if (n1 === undefined || n2 === undefined) {
|
4612
|
-
const char = hex[hi] + hex[hi + 1];
|
4613
|
-
throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
|
4614
|
-
}
|
4615
|
-
array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163
|
4616
|
-
}
|
4617
|
-
return array;
|
4618
|
-
}
|
4619
|
-
// There is no setImmediate in browser and setTimeout is slow.
|
4620
|
-
// call of async fn will return Promise, which will be fullfiled only on
|
4621
|
-
// next scheduler queue processing step and this is exactly what we need.
|
4622
|
-
const nextTick = async () => { };
|
4623
|
-
exports.nextTick = nextTick;
|
4624
|
-
// Returns control to thread each 'tick' ms to avoid blocking
|
4625
|
-
async function asyncLoop(iters, tick, cb) {
|
4626
|
-
let ts = Date.now();
|
4627
|
-
for (let i = 0; i < iters; i++) {
|
4628
|
-
cb(i);
|
4629
|
-
// Date.now() is not monotonic, so in case if clock goes backwards we return return control too
|
4630
|
-
const diff = Date.now() - ts;
|
4631
|
-
if (diff >= 0 && diff < tick)
|
4632
|
-
continue;
|
4633
|
-
await (0, exports.nextTick)();
|
4634
|
-
ts += diff;
|
4635
|
-
}
|
4636
|
-
}
|
4637
|
-
/**
|
4638
|
-
* @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])
|
4639
|
-
*/
|
4640
|
-
function utf8ToBytes(str) {
|
4641
|
-
if (typeof str !== 'string')
|
4642
|
-
throw new Error('utf8ToBytes expected string, got ' + typeof str);
|
4643
|
-
return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809
|
4644
|
-
}
|
4645
|
-
/**
|
4646
|
-
* Normalizes (non-hex) string or Uint8Array to Uint8Array.
|
4647
|
-
* Warning: when Uint8Array is passed, it would NOT get copied.
|
4648
|
-
* Keep in mind for future mutable operations.
|
4649
|
-
*/
|
4650
|
-
function toBytes(data) {
|
4651
|
-
if (typeof data === 'string')
|
4652
|
-
data = utf8ToBytes(data);
|
4653
|
-
(0, _assert_js_1.abytes)(data);
|
4654
|
-
return data;
|
4655
|
-
}
|
4656
|
-
/**
|
4657
|
-
* Copies several Uint8Arrays into one.
|
4658
|
-
*/
|
4659
|
-
function concatBytes(...arrays) {
|
4660
|
-
let sum = 0;
|
4661
|
-
for (let i = 0; i < arrays.length; i++) {
|
4662
|
-
const a = arrays[i];
|
4663
|
-
(0, _assert_js_1.abytes)(a);
|
4664
|
-
sum += a.length;
|
3750
|
+
toString() {
|
3751
|
+
return this.toHex();
|
4665
3752
|
}
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
3753
|
+
// Compare one point to another.
|
3754
|
+
equals(other) {
|
3755
|
+
assertRstPoint(other);
|
3756
|
+
const { ex: X1, ey: Y1 } = this.ep;
|
3757
|
+
const { ex: X2, ey: Y2 } = other.ep;
|
3758
|
+
const mod = exports.ed25519.CURVE.Fp.create;
|
3759
|
+
// (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)
|
3760
|
+
const one = mod(X1 * Y2) === mod(Y1 * X2);
|
3761
|
+
const two = mod(Y1 * Y2) === mod(X1 * X2);
|
3762
|
+
return one || two;
|
4671
3763
|
}
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
class Hash {
|
4676
|
-
// Safe version that clones internal state
|
4677
|
-
clone() {
|
4678
|
-
return this._cloneInto();
|
3764
|
+
add(other) {
|
3765
|
+
assertRstPoint(other);
|
3766
|
+
return new RistPoint(this.ep.add(other.ep));
|
4679
3767
|
}
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')
|
4684
|
-
throw new Error('Options should be object or undefined');
|
4685
|
-
const merged = Object.assign(defaults, opts);
|
4686
|
-
return merged;
|
4687
|
-
}
|
4688
|
-
function wrapConstructor(hashCons) {
|
4689
|
-
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
4690
|
-
const tmp = hashCons();
|
4691
|
-
hashC.outputLen = tmp.outputLen;
|
4692
|
-
hashC.blockLen = tmp.blockLen;
|
4693
|
-
hashC.create = () => hashCons();
|
4694
|
-
return hashC;
|
4695
|
-
}
|
4696
|
-
function wrapConstructorWithOpts(hashCons) {
|
4697
|
-
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
4698
|
-
const tmp = hashCons({});
|
4699
|
-
hashC.outputLen = tmp.outputLen;
|
4700
|
-
hashC.blockLen = tmp.blockLen;
|
4701
|
-
hashC.create = (opts) => hashCons(opts);
|
4702
|
-
return hashC;
|
4703
|
-
}
|
4704
|
-
function wrapXOFConstructorWithOpts(hashCons) {
|
4705
|
-
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
4706
|
-
const tmp = hashCons({});
|
4707
|
-
hashC.outputLen = tmp.outputLen;
|
4708
|
-
hashC.blockLen = tmp.blockLen;
|
4709
|
-
hashC.create = (opts) => hashCons(opts);
|
4710
|
-
return hashC;
|
4711
|
-
}
|
4712
|
-
/**
|
4713
|
-
* Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.
|
4714
|
-
*/
|
4715
|
-
function randomBytes(bytesLength = 32) {
|
4716
|
-
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {
|
4717
|
-
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
3768
|
+
subtract(other) {
|
3769
|
+
assertRstPoint(other);
|
3770
|
+
return new RistPoint(this.ep.subtract(other.ep));
|
4718
3771
|
}
|
4719
|
-
|
4720
|
-
|
4721
|
-
|
3772
|
+
multiply(scalar) {
|
3773
|
+
return new RistPoint(this.ep.multiply(scalar));
|
3774
|
+
}
|
3775
|
+
multiplyUnsafe(scalar) {
|
3776
|
+
return new RistPoint(this.ep.multiplyUnsafe(scalar));
|
3777
|
+
}
|
3778
|
+
double() {
|
3779
|
+
return new RistPoint(this.ep.double());
|
3780
|
+
}
|
3781
|
+
negate() {
|
3782
|
+
return new RistPoint(this.ep.negate());
|
4722
3783
|
}
|
4723
|
-
throw new Error('crypto.getRandomValues must be defined');
|
4724
3784
|
}
|
3785
|
+
exports.RistrettoPoint = (() => {
|
3786
|
+
if (!RistPoint.BASE)
|
3787
|
+
RistPoint.BASE = new RistPoint(exports.ed25519.ExtendedPoint.BASE);
|
3788
|
+
if (!RistPoint.ZERO)
|
3789
|
+
RistPoint.ZERO = new RistPoint(exports.ed25519.ExtendedPoint.ZERO);
|
3790
|
+
return RistPoint;
|
3791
|
+
})();
|
3792
|
+
// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B
|
3793
|
+
const hashToRistretto255 = (msg, options) => {
|
3794
|
+
const d = options.DST;
|
3795
|
+
const DST = typeof d === 'string' ? (0, utils_1.utf8ToBytes)(d) : d;
|
3796
|
+
const uniform_bytes = (0, hash_to_curve_js_1.expand_message_xmd)(msg, DST, 64, sha512_1.sha512);
|
3797
|
+
const P = RistPoint.hashToCurve(uniform_bytes);
|
3798
|
+
return P;
|
3799
|
+
};
|
3800
|
+
exports.hashToRistretto255 = hashToRistretto255;
|
3801
|
+
exports.hash_to_ristretto255 = exports.hashToRistretto255; // legacy
|
4725
3802
|
|
4726
3803
|
|
4727
3804
|
/***/ }),
|
@@ -4736,9 +3813,21 @@ function randomBytes(bytesLength = 32) {
|
|
4736
3813
|
|
4737
3814
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4738
3815
|
exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = void 0;
|
3816
|
+
/**
|
3817
|
+
* NIST secp256k1. See [pdf](https://www.secg.org/sec2-v2.pdf).
|
3818
|
+
*
|
3819
|
+
* Seems to be rigid (not backdoored)
|
3820
|
+
* [as per discussion](https://bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975).
|
3821
|
+
*
|
3822
|
+
* secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.
|
3823
|
+
* Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.
|
3824
|
+
* For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.
|
3825
|
+
* [See explanation](https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066).
|
3826
|
+
* @module
|
3827
|
+
*/
|
4739
3828
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4740
|
-
const sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "../../node_modules/@noble/
|
4741
|
-
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/
|
3829
|
+
const sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "../../node_modules/@noble/hashes/sha256.js");
|
3830
|
+
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
4742
3831
|
const _shortw_utils_js_1 = __webpack_require__(/*! ./_shortw_utils.js */ "../../node_modules/@noble/curves/_shortw_utils.js");
|
4743
3832
|
const hash_to_curve_js_1 = __webpack_require__(/*! ./abstract/hash-to-curve.js */ "../../node_modules/@noble/curves/abstract/hash-to-curve.js");
|
4744
3833
|
const modular_js_1 = __webpack_require__(/*! ./abstract/modular.js */ "../../node_modules/@noble/curves/abstract/modular.js");
|
@@ -4780,10 +3869,19 @@ function sqrtMod(y) {
|
|
4780
3869
|
const Fpk1 = (0, modular_js_1.Field)(secp256k1P, undefined, undefined, { sqrt: sqrtMod });
|
4781
3870
|
/**
|
4782
3871
|
* secp256k1 short weierstrass curve and ECDSA signatures over it.
|
3872
|
+
*
|
3873
|
+
* @example
|
3874
|
+
* import { secp256k1 } from '@noble/curves/secp256k1';
|
3875
|
+
*
|
3876
|
+
* const priv = secp256k1.utils.randomPrivateKey();
|
3877
|
+
* const pub = secp256k1.getPublicKey(priv);
|
3878
|
+
* const msg = new Uint8Array(32).fill(1); // message hash (not message) in ecdsa
|
3879
|
+
* const sig = secp256k1.sign(msg, priv); // `{prehash: true}` option is available
|
3880
|
+
* const isValid = secp256k1.verify(sig, msg, pub) === true;
|
4783
3881
|
*/
|
4784
3882
|
exports.secp256k1 = (0, _shortw_utils_js_1.createCurve)({
|
4785
3883
|
a: BigInt(0), // equation params: a, b
|
4786
|
-
b: BigInt(7),
|
3884
|
+
b: BigInt(7),
|
4787
3885
|
Fp: Fpk1, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n
|
4788
3886
|
n: secp256k1N, // Curve order, total count of valid points in the field
|
4789
3887
|
// Base point (x, y) aka generator point
|
@@ -4791,13 +3889,8 @@ exports.secp256k1 = (0, _shortw_utils_js_1.createCurve)({
|
|
4791
3889
|
Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),
|
4792
3890
|
h: BigInt(1), // Cofactor
|
4793
3891
|
lowS: true, // Allow only low-S signatures by default in sign() and verify()
|
4794
|
-
/**
|
4795
|
-
* secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.
|
4796
|
-
* Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.
|
4797
|
-
* For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.
|
4798
|
-
* Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066
|
4799
|
-
*/
|
4800
3892
|
endo: {
|
3893
|
+
// Endomorphism, see above
|
4801
3894
|
beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),
|
4802
3895
|
splitScalar: (k) => {
|
4803
3896
|
const n = secp256k1N;
|
@@ -4930,6 +4023,14 @@ function schnorrVerify(signature, message, publicKey) {
|
|
4930
4023
|
}
|
4931
4024
|
/**
|
4932
4025
|
* Schnorr signatures over secp256k1.
|
4026
|
+
* https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
|
4027
|
+
* @example
|
4028
|
+
* import { schnorr } from '@noble/curves/secp256k1';
|
4029
|
+
* const priv = schnorr.utils.randomPrivateKey();
|
4030
|
+
* const pub = schnorr.getPublicKey(priv);
|
4031
|
+
* const msg = new TextEncoder().encode('hello');
|
4032
|
+
* const sig = schnorr.sign(msg, priv);
|
4033
|
+
* const isValid = schnorr.verify(sig, msg, pub);
|
4933
4034
|
*/
|
4934
4035
|
exports.schnorr = (() => ({
|
4935
4036
|
getPublicKey: schnorrGetPublicKey,
|
@@ -4991,7 +4092,9 @@ const htf = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.createHasher)(exports.
|
|
4991
4092
|
expand: 'xmd',
|
4992
4093
|
hash: sha256_1.sha256,
|
4993
4094
|
}))();
|
4095
|
+
/** secp256k1 hash-to-curve from [RFC 9380](https://www.rfc-editor.org/rfc/rfc9380). */
|
4994
4096
|
exports.hashToCurve = (() => htf.hashToCurve)();
|
4097
|
+
/** secp256k1 encode-to-curve from [RFC 9380](https://www.rfc-editor.org/rfc/rfc9380). */
|
4995
4098
|
exports.encodeToCurve = (() => htf.encodeToCurve)();
|
4996
4099
|
|
4997
4100
|
|
@@ -5005,40 +4108,47 @@ exports.encodeToCurve = (() => htf.encodeToCurve)();
|
|
5005
4108
|
|
5006
4109
|
"use strict";
|
5007
4110
|
|
4111
|
+
/**
|
4112
|
+
* Internal assertion helpers.
|
4113
|
+
* @module
|
4114
|
+
*/
|
5008
4115
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5009
4116
|
exports.anumber = anumber;
|
5010
|
-
exports.number = anumber;
|
5011
4117
|
exports.abytes = abytes;
|
5012
|
-
exports.bytes = abytes;
|
5013
4118
|
exports.ahash = ahash;
|
5014
4119
|
exports.aexists = aexists;
|
5015
4120
|
exports.aoutput = aoutput;
|
4121
|
+
/** Asserts something is positive integer. */
|
5016
4122
|
function anumber(n) {
|
5017
4123
|
if (!Number.isSafeInteger(n) || n < 0)
|
5018
4124
|
throw new Error('positive integer expected, got ' + n);
|
5019
4125
|
}
|
5020
|
-
|
4126
|
+
/** Is number an Uint8Array? Copied from utils for perf. */
|
5021
4127
|
function isBytes(a) {
|
5022
4128
|
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
5023
4129
|
}
|
4130
|
+
/** Asserts something is Uint8Array. */
|
5024
4131
|
function abytes(b, ...lengths) {
|
5025
4132
|
if (!isBytes(b))
|
5026
4133
|
throw new Error('Uint8Array expected');
|
5027
4134
|
if (lengths.length > 0 && !lengths.includes(b.length))
|
5028
4135
|
throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);
|
5029
4136
|
}
|
4137
|
+
/** Asserts something is hash */
|
5030
4138
|
function ahash(h) {
|
5031
4139
|
if (typeof h !== 'function' || typeof h.create !== 'function')
|
5032
4140
|
throw new Error('Hash should be wrapped by utils.wrapConstructor');
|
5033
4141
|
anumber(h.outputLen);
|
5034
4142
|
anumber(h.blockLen);
|
5035
4143
|
}
|
4144
|
+
/** Asserts a hash instance has not been destroyed / finished */
|
5036
4145
|
function aexists(instance, checkFinished = true) {
|
5037
4146
|
if (instance.destroyed)
|
5038
4147
|
throw new Error('Hash instance has been destroyed');
|
5039
4148
|
if (checkFinished && instance.finished)
|
5040
4149
|
throw new Error('Hash#digest() has already been called');
|
5041
4150
|
}
|
4151
|
+
/** Asserts output is properly-sized byte array */
|
5042
4152
|
function aoutput(out, instance) {
|
5043
4153
|
abytes(out);
|
5044
4154
|
const min = instance.outputLen;
|
@@ -5046,14 +4156,6 @@ function aoutput(out, instance) {
|
|
5046
4156
|
throw new Error('digestInto() expects output buffer of length at least ' + min);
|
5047
4157
|
}
|
5048
4158
|
}
|
5049
|
-
const assert = {
|
5050
|
-
number: anumber,
|
5051
|
-
bytes: abytes,
|
5052
|
-
hash: ahash,
|
5053
|
-
exists: aexists,
|
5054
|
-
output: aoutput,
|
5055
|
-
};
|
5056
|
-
exports["default"] = assert;
|
5057
4159
|
|
5058
4160
|
|
5059
4161
|
/***/ }),
|
@@ -5067,12 +4169,17 @@ exports["default"] = assert;
|
|
5067
4169
|
"use strict";
|
5068
4170
|
|
5069
4171
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5070
|
-
exports.HashMD =
|
5071
|
-
|
5072
|
-
|
4172
|
+
exports.HashMD = void 0;
|
4173
|
+
exports.setBigUint64 = setBigUint64;
|
4174
|
+
exports.Chi = Chi;
|
4175
|
+
exports.Maj = Maj;
|
5073
4176
|
/**
|
5074
|
-
*
|
4177
|
+
* Internal Merkle-Damgard hash utils.
|
4178
|
+
* @module
|
5075
4179
|
*/
|
4180
|
+
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
4181
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
4182
|
+
/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
|
5076
4183
|
function setBigUint64(view, byteOffset, value, isLE) {
|
5077
4184
|
if (typeof view.setBigUint64 === 'function')
|
5078
4185
|
return view.setBigUint64(byteOffset, value, isLE);
|
@@ -5085,16 +4192,14 @@ function setBigUint64(view, byteOffset, value, isLE) {
|
|
5085
4192
|
view.setUint32(byteOffset + h, wh, isLE);
|
5086
4193
|
view.setUint32(byteOffset + l, wl, isLE);
|
5087
4194
|
}
|
5088
|
-
/**
|
5089
|
-
|
5090
|
-
|
5091
|
-
|
5092
|
-
|
5093
|
-
|
5094
|
-
|
5095
|
-
|
5096
|
-
const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);
|
5097
|
-
exports.Maj = Maj;
|
4195
|
+
/** Choice: a ? b : c */
|
4196
|
+
function Chi(a, b, c) {
|
4197
|
+
return (a & b) ^ (~a & c);
|
4198
|
+
}
|
4199
|
+
/** Majority function, true if any two inputs is true. */
|
4200
|
+
function Maj(a, b, c) {
|
4201
|
+
return (a & b) ^ (a & c) ^ (b & c);
|
4202
|
+
}
|
5098
4203
|
/**
|
5099
4204
|
* Merkle-Damgard hash construction base class.
|
5100
4205
|
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
|
@@ -5215,10 +4320,13 @@ exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H =
|
|
5215
4320
|
exports.fromBig = fromBig;
|
5216
4321
|
exports.split = split;
|
5217
4322
|
exports.add = add;
|
4323
|
+
/**
|
4324
|
+
* Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
|
4325
|
+
* @todo re-check https://issues.chromium.org/issues/42212588
|
4326
|
+
* @module
|
4327
|
+
*/
|
5218
4328
|
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
5219
4329
|
const _32n = /* @__PURE__ */ BigInt(32);
|
5220
|
-
// BigUint64Array is too slow as per 2024, so we implement it using Uint32Array.
|
5221
|
-
// TODO: re-check https://issues.chromium.org/issues/42212588
|
5222
4330
|
function fromBig(n, le = false) {
|
5223
4331
|
if (le)
|
5224
4332
|
return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };
|
@@ -5323,9 +4431,12 @@ exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? glob
|
|
5323
4431
|
|
5324
4432
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5325
4433
|
exports.hmac = exports.HMAC = void 0;
|
4434
|
+
/**
|
4435
|
+
* HMAC: RFC2104 message authentication code.
|
4436
|
+
* @module
|
4437
|
+
*/
|
5326
4438
|
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
5327
4439
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
5328
|
-
// HMAC (RFC 2104)
|
5329
4440
|
class HMAC extends utils_js_1.Hash {
|
5330
4441
|
constructor(hash, _key) {
|
5331
4442
|
super();
|
@@ -5420,6 +4531,10 @@ exports.hmac.create = (hash, key) => new HMAC(hash, key);
|
|
5420
4531
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5421
4532
|
exports.pbkdf2 = pbkdf2;
|
5422
4533
|
exports.pbkdf2Async = pbkdf2Async;
|
4534
|
+
/**
|
4535
|
+
* PBKDF (RFC 2898). Can be used to create a key from password and salt.
|
4536
|
+
* @module
|
4537
|
+
*/
|
5423
4538
|
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
5424
4539
|
const hmac_js_1 = __webpack_require__(/*! ./hmac.js */ "../../node_modules/@noble/hashes/hmac.js");
|
5425
4540
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
@@ -5456,6 +4571,8 @@ function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
|
|
5456
4571
|
* @param password - password from which a derived key is generated
|
5457
4572
|
* @param salt - cryptographic salt
|
5458
4573
|
* @param opts - {c, dkLen} where c is work factor and dkLen is output message size
|
4574
|
+
* @example
|
4575
|
+
* const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: 2 ** 18 });
|
5459
4576
|
*/
|
5460
4577
|
function pbkdf2(hash, password, salt, opts) {
|
5461
4578
|
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
@@ -5481,6 +4598,11 @@ function pbkdf2(hash, password, salt, opts) {
|
|
5481
4598
|
}
|
5482
4599
|
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
5483
4600
|
}
|
4601
|
+
/**
|
4602
|
+
* PBKDF2-HMAC: RFC 2898 key derivation function. Async version.
|
4603
|
+
* @example
|
4604
|
+
* await pbkdf2Async(sha256, 'password', 'salt', { dkLen: 32, c: 500_000 });
|
4605
|
+
*/
|
5484
4606
|
async function pbkdf2Async(hash, password, salt, opts) {
|
5485
4607
|
const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
5486
4608
|
let prfW; // Working copy
|
@@ -5519,10 +4641,14 @@ async function pbkdf2Async(hash, password, salt, opts) {
|
|
5519
4641
|
|
5520
4642
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5521
4643
|
exports.ripemd160 = exports.RIPEMD160 = void 0;
|
4644
|
+
/**
|
4645
|
+
* RIPEMD-160 legacy hash function.
|
4646
|
+
* https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
4647
|
+
* https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
|
4648
|
+
* @module
|
4649
|
+
*/
|
5522
4650
|
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
5523
4651
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
5524
|
-
// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
5525
|
-
// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
|
5526
4652
|
const Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);
|
5527
4653
|
const Id = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((_, i) => i));
|
5528
4654
|
const Pi = /* @__PURE__ */ Id.map((i) => (9 * i + 5) % 16);
|
@@ -5616,10 +4742,7 @@ class RIPEMD160 extends _md_js_1.HashMD {
|
|
5616
4742
|
}
|
5617
4743
|
}
|
5618
4744
|
exports.RIPEMD160 = RIPEMD160;
|
5619
|
-
/**
|
5620
|
-
* RIPEMD-160 - a hash function from 1990s.
|
5621
|
-
* @param message - msg that would be hashed
|
5622
|
-
*/
|
4745
|
+
/** RIPEMD-160 - a legacy hash function from 1990s. */
|
5623
4746
|
exports.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD160());
|
5624
4747
|
|
5625
4748
|
|
@@ -5635,12 +4758,18 @@ exports.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD160());
|
|
5635
4758
|
|
5636
4759
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5637
4760
|
exports.sha224 = exports.sha256 = exports.SHA256 = void 0;
|
4761
|
+
/**
|
4762
|
+
* SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.
|
4763
|
+
*
|
4764
|
+
* To break sha256 using birthday attack, attackers need to try 2^128 hashes.
|
4765
|
+
* BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
|
4766
|
+
*
|
4767
|
+
* Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
|
4768
|
+
* @module
|
4769
|
+
*/
|
5638
4770
|
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
5639
4771
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
5640
|
-
|
5641
|
-
// BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per late 2024.
|
5642
|
-
// Round constants:
|
5643
|
-
// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)
|
4772
|
+
/** Round constants: first 32 bits of fractional parts of the cube roots of the first 64 primes 2..311). */
|
5644
4773
|
// prettier-ignore
|
5645
4774
|
const SHA256_K = /* @__PURE__ */ new Uint32Array([
|
5646
4775
|
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
@@ -5652,14 +4781,15 @@ const SHA256_K = /* @__PURE__ */ new Uint32Array([
|
|
5652
4781
|
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
5653
4782
|
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
5654
4783
|
]);
|
5655
|
-
|
5656
|
-
// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19
|
4784
|
+
/** Initial state: first 32 bits of fractional parts of the square roots of the first 8 primes 2..19. */
|
5657
4785
|
// prettier-ignore
|
5658
4786
|
const SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
5659
4787
|
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
5660
4788
|
]);
|
5661
|
-
|
5662
|
-
|
4789
|
+
/**
|
4790
|
+
* Temporary buffer, not used to store anything between runs.
|
4791
|
+
* Named this way because it matches specification.
|
4792
|
+
*/
|
5663
4793
|
const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
5664
4794
|
class SHA256 extends _md_js_1.HashMD {
|
5665
4795
|
constructor() {
|
@@ -5737,7 +4867,9 @@ class SHA256 extends _md_js_1.HashMD {
|
|
5737
4867
|
}
|
5738
4868
|
}
|
5739
4869
|
exports.SHA256 = SHA256;
|
5740
|
-
|
4870
|
+
/**
|
4871
|
+
* Constants taken from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf.
|
4872
|
+
*/
|
5741
4873
|
class SHA224 extends SHA256 {
|
5742
4874
|
constructor() {
|
5743
4875
|
super();
|
@@ -5752,14 +4884,9 @@ class SHA224 extends SHA256 {
|
|
5752
4884
|
this.outputLen = 28;
|
5753
4885
|
}
|
5754
4886
|
}
|
5755
|
-
/**
|
5756
|
-
* SHA2-256 hash function
|
5757
|
-
* @param message - data that would be hashed
|
5758
|
-
*/
|
4887
|
+
/** SHA2-256 hash function */
|
5759
4888
|
exports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());
|
5760
|
-
/**
|
5761
|
-
* SHA2-224 hash function
|
5762
|
-
*/
|
4889
|
+
/** SHA2-224 hash function */
|
5763
4890
|
exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());
|
5764
4891
|
|
5765
4892
|
|
@@ -5775,6 +4902,13 @@ exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());
|
|
5775
4902
|
|
5776
4903
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5777
4904
|
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = void 0;
|
4905
|
+
/**
|
4906
|
+
* SHA2-512 a.k.a. sha512 and sha384. It is slower than sha256 in js because u64 operations are slow.
|
4907
|
+
*
|
4908
|
+
* Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
|
4909
|
+
* [the paper on truncated SHA512/256](https://eprint.iacr.org/2010/548.pdf).
|
4910
|
+
* @module
|
4911
|
+
*/
|
5778
4912
|
const _md_js_1 = __webpack_require__(/*! ./_md.js */ "../../node_modules/@noble/hashes/_md.js");
|
5779
4913
|
const _u64_js_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@noble/hashes/_u64.js");
|
5780
4914
|
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
@@ -6005,9 +5139,13 @@ class SHA384 extends SHA512 {
|
|
6005
5139
|
}
|
6006
5140
|
}
|
6007
5141
|
exports.SHA384 = SHA384;
|
5142
|
+
/** SHA2-512 hash function. */
|
6008
5143
|
exports.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA512());
|
5144
|
+
/** SHA2-512/224 "truncated" hash function, with improved resistance to length extension attacks. */
|
6009
5145
|
exports.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());
|
5146
|
+
/** SHA2-512/256 "truncated" hash function, with improved resistance to length extension attacks. */
|
6010
5147
|
exports.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());
|
5148
|
+
/** SHA2-384 hash function. */
|
6011
5149
|
exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());
|
6012
5150
|
|
6013
5151
|
|
@@ -6021,10 +5159,20 @@ exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());
|
|
6021
5159
|
|
6022
5160
|
"use strict";
|
6023
5161
|
|
5162
|
+
/**
|
5163
|
+
* Utilities for hex, bytes, CSPRNG.
|
5164
|
+
* @module
|
5165
|
+
*/
|
6024
5166
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
6025
5167
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
6026
|
-
exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.
|
5168
|
+
exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = void 0;
|
6027
5169
|
exports.isBytes = isBytes;
|
5170
|
+
exports.u8 = u8;
|
5171
|
+
exports.u32 = u32;
|
5172
|
+
exports.createView = createView;
|
5173
|
+
exports.rotr = rotr;
|
5174
|
+
exports.rotl = rotl;
|
5175
|
+
exports.byteSwap = byteSwap;
|
6028
5176
|
exports.byteSwap32 = byteSwap32;
|
6029
5177
|
exports.bytesToHex = bytesToHex;
|
6030
5178
|
exports.hexToBytes = hexToBytes;
|
@@ -6051,37 +5199,47 @@ function isBytes(a) {
|
|
6051
5199
|
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
6052
5200
|
}
|
6053
5201
|
// Cast array to different type
|
6054
|
-
|
6055
|
-
|
6056
|
-
|
6057
|
-
|
5202
|
+
function u8(arr) {
|
5203
|
+
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
5204
|
+
}
|
5205
|
+
function u32(arr) {
|
5206
|
+
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
5207
|
+
}
|
6058
5208
|
// Cast array to view
|
6059
|
-
|
6060
|
-
|
6061
|
-
|
6062
|
-
|
6063
|
-
|
6064
|
-
|
6065
|
-
|
6066
|
-
|
5209
|
+
function createView(arr) {
|
5210
|
+
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
5211
|
+
}
|
5212
|
+
/** The rotate right (circular right shift) operation for uint32 */
|
5213
|
+
function rotr(word, shift) {
|
5214
|
+
return (word << (32 - shift)) | (word >>> shift);
|
5215
|
+
}
|
5216
|
+
/** The rotate left (circular left shift) operation for uint32 */
|
5217
|
+
function rotl(word, shift) {
|
5218
|
+
return (word << shift) | ((word >>> (32 - shift)) >>> 0);
|
5219
|
+
}
|
5220
|
+
/** Is current platform little-endian? Most are. Big-Endian platform: IBM */
|
6067
5221
|
exports.isLE = (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();
|
6068
5222
|
// The byte swap operation for uint32
|
6069
|
-
|
6070
|
-
((word <<
|
6071
|
-
|
6072
|
-
|
6073
|
-
|
6074
|
-
|
6075
|
-
|
6076
|
-
|
5223
|
+
function byteSwap(word) {
|
5224
|
+
return (((word << 24) & 0xff000000) |
|
5225
|
+
((word << 8) & 0xff0000) |
|
5226
|
+
((word >>> 8) & 0xff00) |
|
5227
|
+
((word >>> 24) & 0xff));
|
5228
|
+
}
|
5229
|
+
/** Conditionally byte swap if on a big-endian platform */
|
5230
|
+
exports.byteSwapIfBE = exports.isLE
|
5231
|
+
? (n) => n
|
5232
|
+
: (n) => byteSwap(n);
|
5233
|
+
/** In place byte swap for Uint32Array */
|
6077
5234
|
function byteSwap32(arr) {
|
6078
5235
|
for (let i = 0; i < arr.length; i++) {
|
6079
|
-
arr[i] =
|
5236
|
+
arr[i] = byteSwap(arr[i]);
|
6080
5237
|
}
|
6081
5238
|
}
|
6082
5239
|
// Array where index 0xf0 (240) is mapped to string 'f0'
|
6083
5240
|
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
|
6084
5241
|
/**
|
5242
|
+
* Convert byte array to hex string.
|
6085
5243
|
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
6086
5244
|
*/
|
6087
5245
|
function bytesToHex(bytes) {
|
@@ -6105,6 +5263,7 @@ function asciiToBase16(ch) {
|
|
6105
5263
|
return;
|
6106
5264
|
}
|
6107
5265
|
/**
|
5266
|
+
* Convert hex string to byte array.
|
6108
5267
|
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
6109
5268
|
*/
|
6110
5269
|
function hexToBytes(hex) {
|
@@ -6126,12 +5285,14 @@ function hexToBytes(hex) {
|
|
6126
5285
|
}
|
6127
5286
|
return array;
|
6128
5287
|
}
|
6129
|
-
|
6130
|
-
|
6131
|
-
|
5288
|
+
/**
|
5289
|
+
* There is no setImmediate in browser and setTimeout is slow.
|
5290
|
+
* Call of async fn will return Promise, which will be fullfiled only on
|
5291
|
+
* next scheduler queue processing step and this is exactly what we need.
|
5292
|
+
*/
|
6132
5293
|
const nextTick = async () => { };
|
6133
5294
|
exports.nextTick = nextTick;
|
6134
|
-
|
5295
|
+
/** Returns control to thread each 'tick' ms to avoid blocking. */
|
6135
5296
|
async function asyncLoop(iters, tick, cb) {
|
6136
5297
|
let ts = Date.now();
|
6137
5298
|
for (let i = 0; i < iters; i++) {
|
@@ -6145,6 +5306,7 @@ async function asyncLoop(iters, tick, cb) {
|
|
6145
5306
|
}
|
6146
5307
|
}
|
6147
5308
|
/**
|
5309
|
+
* Convert JS string to byte array.
|
6148
5310
|
* @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])
|
6149
5311
|
*/
|
6150
5312
|
function utf8ToBytes(str) {
|
@@ -6181,7 +5343,7 @@ function concatBytes(...arrays) {
|
|
6181
5343
|
}
|
6182
5344
|
return res;
|
6183
5345
|
}
|
6184
|
-
|
5346
|
+
/** For runtime check if class implements interface */
|
6185
5347
|
class Hash {
|
6186
5348
|
// Safe version that clones internal state
|
6187
5349
|
clone() {
|
@@ -6195,6 +5357,7 @@ function checkOpts(defaults, opts) {
|
|
6195
5357
|
const merged = Object.assign(defaults, opts);
|
6196
5358
|
return merged;
|
6197
5359
|
}
|
5360
|
+
/** Wraps hash function, creating an interface on top of it */
|
6198
5361
|
function wrapConstructor(hashCons) {
|
6199
5362
|
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
6200
5363
|
const tmp = hashCons();
|
@@ -6219,9 +5382,7 @@ function wrapXOFConstructorWithOpts(hashCons) {
|
|
6219
5382
|
hashC.create = (opts) => hashCons(opts);
|
6220
5383
|
return hashC;
|
6221
5384
|
}
|
6222
|
-
/**
|
6223
|
-
* Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.
|
6224
|
-
*/
|
5385
|
+
/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */
|
6225
5386
|
function randomBytes(bytesLength = 32) {
|
6226
5387
|
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {
|
6227
5388
|
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
@@ -6801,6 +5962,23 @@ exports.bytes = exports.stringToBytes;
|
|
6801
5962
|
|
6802
5963
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
6803
5964
|
exports.HDKey = exports.HARDENED_OFFSET = void 0;
|
5965
|
+
/**
|
5966
|
+
* @module BIP32 hierarchical deterministic (HD) wallets over secp256k1.
|
5967
|
+
* @example
|
5968
|
+
* ```js
|
5969
|
+
* import { HDKey } from "@scure/bip32";
|
5970
|
+
* const hdkey1 = HDKey.fromMasterSeed(seed);
|
5971
|
+
* const hdkey2 = HDKey.fromExtendedKey(base58key);
|
5972
|
+
* const hdkey3 = HDKey.fromJSON({ xpriv: string });
|
5973
|
+
*
|
5974
|
+
* // props
|
5975
|
+
* [hdkey1.depth, hdkey1.index, hdkey1.chainCode];
|
5976
|
+
* console.log(hdkey2.privateKey, hdkey2.publicKey);
|
5977
|
+
* console.log(hdkey3.derive("m/0/2147483647'/1"));
|
5978
|
+
* const sig = hdkey3.sign(hash);
|
5979
|
+
* hdkey3.verify(hash, sig);
|
5980
|
+
* ```
|
5981
|
+
*/
|
6804
5982
|
/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
|
6805
5983
|
const hmac_1 = __webpack_require__(/*! @noble/hashes/hmac */ "../../node_modules/@noble/hashes/hmac.js");
|
6806
5984
|
const ripemd160_1 = __webpack_require__(/*! @noble/hashes/ripemd160 */ "../../node_modules/@noble/hashes/ripemd160.js");
|
@@ -7086,6 +6264,35 @@ exports.HDKey = HDKey;
|
|
7086
6264
|
|
7087
6265
|
"use strict";
|
7088
6266
|
|
6267
|
+
/**
|
6268
|
+
* Audited & minimal JS implementation of
|
6269
|
+
* [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).
|
6270
|
+
* @module
|
6271
|
+
* @example
|
6272
|
+
```js
|
6273
|
+
import * as bip39 from '@scure/bip39';
|
6274
|
+
import { wordlist } from '@scure/bip39/wordlists/english';
|
6275
|
+
const mn = bip39.generateMnemonic(wordlist);
|
6276
|
+
console.log(mn);
|
6277
|
+
const ent = bip39.mnemonicToEntropy(mn, wordlist)
|
6278
|
+
bip39.entropyToMnemonic(ent, wordlist);
|
6279
|
+
bip39.validateMnemonic(mn, wordlist);
|
6280
|
+
await bip39.mnemonicToSeed(mn, 'password');
|
6281
|
+
bip39.mnemonicToSeedSync(mn, 'password');
|
6282
|
+
|
6283
|
+
// Wordlists
|
6284
|
+
import { wordlist as czech } from '@scure/bip39/wordlists/czech';
|
6285
|
+
import { wordlist as english } from '@scure/bip39/wordlists/english';
|
6286
|
+
import { wordlist as french } from '@scure/bip39/wordlists/french';
|
6287
|
+
import { wordlist as italian } from '@scure/bip39/wordlists/italian';
|
6288
|
+
import { wordlist as japanese } from '@scure/bip39/wordlists/japanese';
|
6289
|
+
import { wordlist as korean } from '@scure/bip39/wordlists/korean';
|
6290
|
+
import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese';
|
6291
|
+
import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese';
|
6292
|
+
import { wordlist as spanish } from '@scure/bip39/wordlists/spanish';
|
6293
|
+
import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese';
|
6294
|
+
```
|
6295
|
+
*/
|
7089
6296
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7090
6297
|
exports.generateMnemonic = generateMnemonic;
|
7091
6298
|
exports.mnemonicToEntropy = mnemonicToEntropy;
|
@@ -7118,8 +6325,8 @@ function normalize(str) {
|
|
7118
6325
|
throw new Error('Invalid mnemonic');
|
7119
6326
|
return { nfkd: norm, words };
|
7120
6327
|
}
|
7121
|
-
function
|
7122
|
-
(0, _assert_1.abytes)(
|
6328
|
+
function aentropy(ent) {
|
6329
|
+
(0, _assert_1.abytes)(ent, 16, 20, 24, 28, 32);
|
7123
6330
|
}
|
7124
6331
|
/**
|
7125
6332
|
* Generate x random words. Uses Cryptographically-Secure Random Number Generator.
|
@@ -7167,7 +6374,7 @@ function getCoder(wordlist) {
|
|
7167
6374
|
function mnemonicToEntropy(mnemonic, wordlist) {
|
7168
6375
|
const { words } = normalize(mnemonic);
|
7169
6376
|
const entropy = getCoder(wordlist).decode(words);
|
7170
|
-
|
6377
|
+
aentropy(entropy);
|
7171
6378
|
return entropy;
|
7172
6379
|
}
|
7173
6380
|
/**
|
@@ -7184,7 +6391,7 @@ function mnemonicToEntropy(mnemonic, wordlist) {
|
|
7184
6391
|
* // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
|
7185
6392
|
*/
|
7186
6393
|
function entropyToMnemonic(entropy, wordlist) {
|
7187
|
-
|
6394
|
+
aentropy(entropy);
|
7188
6395
|
const words = getCoder(wordlist).encode(entropy);
|
7189
6396
|
return words.join(isJapanese(wordlist) ? '\u3000' : ' ');
|
7190
6397
|
}
|
@@ -7200,7 +6407,7 @@ function validateMnemonic(mnemonic, wordlist) {
|
|
7200
6407
|
}
|
7201
6408
|
return true;
|
7202
6409
|
}
|
7203
|
-
const
|
6410
|
+
const psalt = (passphrase) => nfkd('mnemonic' + passphrase);
|
7204
6411
|
/**
|
7205
6412
|
* Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
|
7206
6413
|
* @param mnemonic 12-24 words
|
@@ -7212,7 +6419,7 @@ const salt = (passphrase) => nfkd('mnemonic' + passphrase);
|
|
7212
6419
|
* // new Uint8Array([...64 bytes])
|
7213
6420
|
*/
|
7214
6421
|
function mnemonicToSeed(mnemonic, passphrase = '') {
|
7215
|
-
return (0, pbkdf2_1.pbkdf2Async)(sha512_1.sha512, normalize(mnemonic).nfkd,
|
6422
|
+
return (0, pbkdf2_1.pbkdf2Async)(sha512_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
|
7216
6423
|
}
|
7217
6424
|
/**
|
7218
6425
|
* Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
|
@@ -7225,7 +6432,7 @@ function mnemonicToSeed(mnemonic, passphrase = '') {
|
|
7225
6432
|
* // new Uint8Array([...64 bytes])
|
7226
6433
|
*/
|
7227
6434
|
function mnemonicToSeedSync(mnemonic, passphrase = '') {
|
7228
|
-
return (0, pbkdf2_1.pbkdf2)(sha512_1.sha512, normalize(mnemonic).nfkd,
|
6435
|
+
return (0, pbkdf2_1.pbkdf2)(sha512_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
|
7229
6436
|
}
|
7230
6437
|
|
7231
6438
|
|
@@ -13762,6 +12969,17 @@ exports.TRANSACTION_TYPE_WIDTH = 2;
|
|
13762
12969
|
exports.TRANSACTION_RESULT_WIDTH = 1;
|
13763
12970
|
|
13764
12971
|
|
12972
|
+
/***/ }),
|
12973
|
+
|
12974
|
+
/***/ "../../node_modules/ripple-binary-codec/dist/enums/definitions.json":
|
12975
|
+
/*!**************************************************************************!*\
|
12976
|
+
!*** ../../node_modules/ripple-binary-codec/dist/enums/definitions.json ***!
|
12977
|
+
\**************************************************************************/
|
12978
|
+
/***/ ((module) => {
|
12979
|
+
|
12980
|
+
"use strict";
|
12981
|
+
module.exports = /*#__PURE__*/JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["ExtensionComputeLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":52,"type":"UInt32"}],["ExtensionSizeLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":53,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt64"}],["SubjectNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":31,"type":"Blob"}],["FinishFunction",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":32,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"AccountID"}],["Number",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Number"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STArray"}],["UnauthorizeCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STArray"}],["AcceptedCredentials",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"Credential":129,"DID":73,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecHOOK_REJECTED":153,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecWASM_REJECTED":194,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialAccept":59,"CredentialCreate":58,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainDelete":63,"PermissionedDomainSet":62,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"Number":9,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}');
|
12982
|
+
|
13765
12983
|
/***/ }),
|
13766
12984
|
|
13767
12985
|
/***/ "../../node_modules/ripple-binary-codec/dist/enums/field.js":
|
@@ -15865,15 +15083,16 @@ const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../.
|
|
15865
15083
|
const account_id_1 = __webpack_require__(/*! ./account-id */ "../../node_modules/ripple-binary-codec/dist/types/account-id.js");
|
15866
15084
|
const currency_1 = __webpack_require__(/*! ./currency */ "../../node_modules/ripple-binary-codec/dist/types/currency.js");
|
15867
15085
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
15086
|
+
const hash_192_1 = __webpack_require__(/*! ./hash-192 */ "../../node_modules/ripple-binary-codec/dist/types/hash-192.js");
|
15868
15087
|
/**
|
15869
|
-
* Type guard for
|
15088
|
+
* Type guard for Issue Object
|
15870
15089
|
*/
|
15871
15090
|
function isIssueObject(arg) {
|
15872
15091
|
const keys = Object.keys(arg).sort();
|
15873
|
-
|
15874
|
-
|
15875
|
-
|
15876
|
-
return
|
15092
|
+
const isXRP = keys.length === 1 && keys[0] === 'currency';
|
15093
|
+
const isIOU = keys.length === 2 && keys[0] === 'currency' && keys[1] === 'issuer';
|
15094
|
+
const isMPT = keys.length === 1 && keys[0] === 'mpt_issuance_id';
|
15095
|
+
return isXRP || isIOU || isMPT;
|
15877
15096
|
}
|
15878
15097
|
/**
|
15879
15098
|
* Class for serializing/Deserializing Amounts
|
@@ -15885,21 +15104,30 @@ class Issue extends serialized_type_1.SerializedType {
|
|
15885
15104
|
/**
|
15886
15105
|
* Construct an amount from an IOU or string amount
|
15887
15106
|
*
|
15888
|
-
* @param value An Amount, object representing an IOU, or a string
|
15107
|
+
* @param value An Amount, object representing an IOU, MPTAmount, or a string
|
15889
15108
|
* representing an integer amount
|
15890
|
-
* @returns An
|
15109
|
+
* @returns An Issue object
|
15891
15110
|
*/
|
15892
15111
|
static from(value) {
|
15893
15112
|
if (value instanceof Issue) {
|
15894
15113
|
return value;
|
15895
15114
|
}
|
15896
15115
|
if (isIssueObject(value)) {
|
15897
|
-
|
15898
|
-
|
15116
|
+
if (value.currency) {
|
15117
|
+
const currency = currency_1.Currency.from(value.currency.toString()).toBytes();
|
15118
|
+
//IOU case
|
15119
|
+
if (value.issuer) {
|
15120
|
+
const issuer = account_id_1.AccountID.from(value.issuer.toString()).toBytes();
|
15121
|
+
return new Issue((0, utils_1.concat)([currency, issuer]));
|
15122
|
+
}
|
15123
|
+
//XRP case
|
15899
15124
|
return new Issue(currency);
|
15900
15125
|
}
|
15901
|
-
|
15902
|
-
|
15126
|
+
// MPT case
|
15127
|
+
if (value.mpt_issuance_id) {
|
15128
|
+
const mptIssuanceIdBytes = hash_192_1.Hash192.from(value.mpt_issuance_id.toString()).toBytes();
|
15129
|
+
return new Issue(mptIssuanceIdBytes);
|
15130
|
+
}
|
15903
15131
|
}
|
15904
15132
|
throw new Error('Invalid type to construct an Amount');
|
15905
15133
|
}
|
@@ -15907,9 +15135,16 @@ class Issue extends serialized_type_1.SerializedType {
|
|
15907
15135
|
* Read an amount from a BinaryParser
|
15908
15136
|
*
|
15909
15137
|
* @param parser BinaryParser to read the Amount from
|
15910
|
-
* @
|
15138
|
+
* @param hint The number of bytes to consume from the parser.
|
15139
|
+
* For an MPT amount, pass 24 (the fixed length for Hash192).
|
15140
|
+
*
|
15141
|
+
* @returns An Issue object
|
15911
15142
|
*/
|
15912
|
-
static fromParser(parser) {
|
15143
|
+
static fromParser(parser, hint) {
|
15144
|
+
if (hint === hash_192_1.Hash192.width) {
|
15145
|
+
const mptBytes = parser.read(hash_192_1.Hash192.width);
|
15146
|
+
return new Issue(mptBytes);
|
15147
|
+
}
|
15913
15148
|
const currency = parser.read(20);
|
15914
15149
|
if (new currency_1.Currency(currency).toJSON() === 'XRP') {
|
15915
15150
|
return new Issue(currency);
|
@@ -15923,6 +15158,12 @@ class Issue extends serialized_type_1.SerializedType {
|
|
15923
15158
|
* @returns the JSON interpretation of this.bytes
|
15924
15159
|
*/
|
15925
15160
|
toJSON() {
|
15161
|
+
// If the buffer is exactly 24 bytes, treat it as an MPT amount.
|
15162
|
+
if (this.toBytes().length === hash_192_1.Hash192.width) {
|
15163
|
+
return {
|
15164
|
+
mpt_issuance_id: this.toHex().toUpperCase(),
|
15165
|
+
};
|
15166
|
+
}
|
15926
15167
|
const parser = new binary_parser_1.BinaryParser(this.toString());
|
15927
15168
|
const currency = currency_1.Currency.fromParser(parser);
|
15928
15169
|
if (currency.toJSON() === 'XRP') {
|
@@ -16500,11 +15741,21 @@ class STObject extends serialized_type_1.SerializedType {
|
|
16500
15741
|
}
|
16501
15742
|
return Object.assign(acc, handled !== null && handled !== void 0 ? handled : { [key]: val });
|
16502
15743
|
}, {});
|
15744
|
+
function isValidFieldInstance(f) {
|
15745
|
+
return (f !== undefined &&
|
15746
|
+
xAddressDecoded[f.name] !== undefined &&
|
15747
|
+
f.isSerialized);
|
15748
|
+
}
|
16503
15749
|
let sorted = Object.keys(xAddressDecoded)
|
16504
|
-
.map((f) =>
|
16505
|
-
|
16506
|
-
|
16507
|
-
|
15750
|
+
.map((f) => {
|
15751
|
+
if (!(f in definitions.field)) {
|
15752
|
+
if (f[0] === f[0].toLowerCase())
|
15753
|
+
return undefined;
|
15754
|
+
throw new Error(`Field ${f} is not defined in the definitions`);
|
15755
|
+
}
|
15756
|
+
return definitions.field[f];
|
15757
|
+
})
|
15758
|
+
.filter(isValidFieldInstance)
|
16508
15759
|
.sort((a, b) => {
|
16509
15760
|
return a.ordinal - b.ordinal;
|
16510
15761
|
});
|
@@ -17724,10 +16975,12 @@ var FaucetNetwork;
|
|
17724
16975
|
(function (FaucetNetwork) {
|
17725
16976
|
FaucetNetwork["Testnet"] = "faucet.altnet.rippletest.net";
|
17726
16977
|
FaucetNetwork["Devnet"] = "faucet.devnet.rippletest.net";
|
16978
|
+
FaucetNetwork["WasmDevnet"] = "wasmfaucet.devnet.rippletest.net";
|
17727
16979
|
})(FaucetNetwork || (exports.FaucetNetwork = FaucetNetwork = {}));
|
17728
16980
|
exports.FaucetNetworkPaths = {
|
17729
16981
|
[FaucetNetwork.Testnet]: '/accounts',
|
17730
16982
|
[FaucetNetwork.Devnet]: '/accounts',
|
16983
|
+
[FaucetNetwork.WasmDevnet]: '/accounts',
|
17731
16984
|
};
|
17732
16985
|
function getFaucetHost(client) {
|
17733
16986
|
const connectionUrl = client.url;
|
@@ -17737,6 +16990,9 @@ function getFaucetHost(client) {
|
|
17737
16990
|
if (connectionUrl.includes('sidechain-net2')) {
|
17738
16991
|
throw new errors_1.XRPLFaucetError('Cannot fund an account on an issuing chain. Accounts must be created via the bridge.');
|
17739
16992
|
}
|
16993
|
+
if (connectionUrl.includes('wasm')) {
|
16994
|
+
return FaucetNetwork.WasmDevnet;
|
16995
|
+
}
|
17740
16996
|
if (connectionUrl.includes('devnet')) {
|
17741
16997
|
return FaucetNetwork.Devnet;
|
17742
16998
|
}
|
@@ -18218,6 +17474,17 @@ function swap128(arr) {
|
|
18218
17474
|
}
|
18219
17475
|
|
18220
17476
|
|
17477
|
+
/***/ }),
|
17478
|
+
|
17479
|
+
/***/ "./dist/npm/Wallet/rfc1751Words.json":
|
17480
|
+
/*!*******************************************!*\
|
17481
|
+
!*** ./dist/npm/Wallet/rfc1751Words.json ***!
|
17482
|
+
\*******************************************/
|
17483
|
+
/***/ ((module) => {
|
17484
|
+
|
17485
|
+
"use strict";
|
17486
|
+
module.exports = /*#__PURE__*/JSON.parse('["A","ABE","ACE","ACT","AD","ADA","ADD","AGO","AID","AIM","AIR","ALL","ALP","AM","AMY","AN","ANA","AND","ANN","ANT","ANY","APE","APS","APT","ARC","ARE","ARK","ARM","ART","AS","ASH","ASK","AT","ATE","AUG","AUK","AVE","AWE","AWK","AWL","AWN","AX","AYE","BAD","BAG","BAH","BAM","BAN","BAR","BAT","BAY","BE","BED","BEE","BEG","BEN","BET","BEY","BIB","BID","BIG","BIN","BIT","BOB","BOG","BON","BOO","BOP","BOW","BOY","BUB","BUD","BUG","BUM","BUN","BUS","BUT","BUY","BY","BYE","CAB","CAL","CAM","CAN","CAP","CAR","CAT","CAW","COD","COG","COL","CON","COO","COP","COT","COW","COY","CRY","CUB","CUE","CUP","CUR","CUT","DAB","DAD","DAM","DAN","DAR","DAY","DEE","DEL","DEN","DES","DEW","DID","DIE","DIG","DIN","DIP","DO","DOE","DOG","DON","DOT","DOW","DRY","DUB","DUD","DUE","DUG","DUN","EAR","EAT","ED","EEL","EGG","EGO","ELI","ELK","ELM","ELY","EM","END","EST","ETC","EVA","EVE","EWE","EYE","FAD","FAN","FAR","FAT","FAY","FED","FEE","FEW","FIB","FIG","FIN","FIR","FIT","FLO","FLY","FOE","FOG","FOR","FRY","FUM","FUN","FUR","GAB","GAD","GAG","GAL","GAM","GAP","GAS","GAY","GEE","GEL","GEM","GET","GIG","GIL","GIN","GO","GOT","GUM","GUN","GUS","GUT","GUY","GYM","GYP","HA","HAD","HAL","HAM","HAN","HAP","HAS","HAT","HAW","HAY","HE","HEM","HEN","HER","HEW","HEY","HI","HID","HIM","HIP","HIS","HIT","HO","HOB","HOC","HOE","HOG","HOP","HOT","HOW","HUB","HUE","HUG","HUH","HUM","HUT","I","ICY","IDA","IF","IKE","ILL","INK","INN","IO","ION","IQ","IRA","IRE","IRK","IS","IT","ITS","IVY","JAB","JAG","JAM","JAN","JAR","JAW","JAY","JET","JIG","JIM","JO","JOB","JOE","JOG","JOT","JOY","JUG","JUT","KAY","KEG","KEN","KEY","KID","KIM","KIN","KIT","LA","LAB","LAC","LAD","LAG","LAM","LAP","LAW","LAY","LEA","LED","LEE","LEG","LEN","LEO","LET","LEW","LID","LIE","LIN","LIP","LIT","LO","LOB","LOG","LOP","LOS","LOT","LOU","LOW","LOY","LUG","LYE","MA","MAC","MAD","MAE","MAN","MAO","MAP","MAT","MAW","MAY","ME","MEG","MEL","MEN","MET","MEW","MID","MIN","MIT","MOB","MOD","MOE","MOO","MOP","MOS","MOT","MOW","MUD","MUG","MUM","MY","NAB","NAG","NAN","NAP","NAT","NAY","NE","NED","NEE","NET","NEW","NIB","NIL","NIP","NIT","NO","NOB","NOD","NON","NOR","NOT","NOV","NOW","NU","NUN","NUT","O","OAF","OAK","OAR","OAT","ODD","ODE","OF","OFF","OFT","OH","OIL","OK","OLD","ON","ONE","OR","ORB","ORE","ORR","OS","OTT","OUR","OUT","OVA","OW","OWE","OWL","OWN","OX","PA","PAD","PAL","PAM","PAN","PAP","PAR","PAT","PAW","PAY","PEA","PEG","PEN","PEP","PER","PET","PEW","PHI","PI","PIE","PIN","PIT","PLY","PO","POD","POE","POP","POT","POW","PRO","PRY","PUB","PUG","PUN","PUP","PUT","QUO","RAG","RAM","RAN","RAP","RAT","RAW","RAY","REB","RED","REP","RET","RIB","RID","RIG","RIM","RIO","RIP","ROB","ROD","ROE","RON","ROT","ROW","ROY","RUB","RUE","RUG","RUM","RUN","RYE","SAC","SAD","SAG","SAL","SAM","SAN","SAP","SAT","SAW","SAY","SEA","SEC","SEE","SEN","SET","SEW","SHE","SHY","SIN","SIP","SIR","SIS","SIT","SKI","SKY","SLY","SO","SOB","SOD","SON","SOP","SOW","SOY","SPA","SPY","SUB","SUD","SUE","SUM","SUN","SUP","TAB","TAD","TAG","TAN","TAP","TAR","TEA","TED","TEE","TEN","THE","THY","TIC","TIE","TIM","TIN","TIP","TO","TOE","TOG","TOM","TON","TOO","TOP","TOW","TOY","TRY","TUB","TUG","TUM","TUN","TWO","UN","UP","US","USE","VAN","VAT","VET","VIE","WAD","WAG","WAR","WAS","WAY","WE","WEB","WED","WEE","WET","WHO","WHY","WIN","WIT","WOK","WON","WOO","WOW","WRY","WU","YAM","YAP","YAW","YE","YEA","YES","YET","YOU","ABED","ABEL","ABET","ABLE","ABUT","ACHE","ACID","ACME","ACRE","ACTA","ACTS","ADAM","ADDS","ADEN","AFAR","AFRO","AGEE","AHEM","AHOY","AIDA","AIDE","AIDS","AIRY","AJAR","AKIN","ALAN","ALEC","ALGA","ALIA","ALLY","ALMA","ALOE","ALSO","ALTO","ALUM","ALVA","AMEN","AMES","AMID","AMMO","AMOK","AMOS","AMRA","ANDY","ANEW","ANNA","ANNE","ANTE","ANTI","AQUA","ARAB","ARCH","AREA","ARGO","ARID","ARMY","ARTS","ARTY","ASIA","ASKS","ATOM","AUNT","AURA","AUTO","AVER","AVID","AVIS","AVON","AVOW","AWAY","AWRY","BABE","BABY","BACH","BACK","BADE","BAIL","BAIT","BAKE","BALD","BALE","BALI","BALK","BALL","BALM","BAND","BANE","BANG","BANK","BARB","BARD","BARE","BARK","BARN","BARR","BASE","BASH","BASK","BASS","BATE","BATH","BAWD","BAWL","BEAD","BEAK","BEAM","BEAN","BEAR","BEAT","BEAU","BECK","BEEF","BEEN","BEER","BEET","BELA","BELL","BELT","BEND","BENT","BERG","BERN","BERT","BESS","BEST","BETA","BETH","BHOY","BIAS","BIDE","BIEN","BILE","BILK","BILL","BIND","BING","BIRD","BITE","BITS","BLAB","BLAT","BLED","BLEW","BLOB","BLOC","BLOT","BLOW","BLUE","BLUM","BLUR","BOAR","BOAT","BOCA","BOCK","BODE","BODY","BOGY","BOHR","BOIL","BOLD","BOLO","BOLT","BOMB","BONA","BOND","BONE","BONG","BONN","BONY","BOOK","BOOM","BOON","BOOT","BORE","BORG","BORN","BOSE","BOSS","BOTH","BOUT","BOWL","BOYD","BRAD","BRAE","BRAG","BRAN","BRAY","BRED","BREW","BRIG","BRIM","BROW","BUCK","BUDD","BUFF","BULB","BULK","BULL","BUNK","BUNT","BUOY","BURG","BURL","BURN","BURR","BURT","BURY","BUSH","BUSS","BUST","BUSY","BYTE","CADY","CAFE","CAGE","CAIN","CAKE","CALF","CALL","CALM","CAME","CANE","CANT","CARD","CARE","CARL","CARR","CART","CASE","CASH","CASK","CAST","CAVE","CEIL","CELL","CENT","CERN","CHAD","CHAR","CHAT","CHAW","CHEF","CHEN","CHEW","CHIC","CHIN","CHOU","CHOW","CHUB","CHUG","CHUM","CITE","CITY","CLAD","CLAM","CLAN","CLAW","CLAY","CLOD","CLOG","CLOT","CLUB","CLUE","COAL","COAT","COCA","COCK","COCO","CODA","CODE","CODY","COED","COIL","COIN","COKE","COLA","COLD","COLT","COMA","COMB","COME","COOK","COOL","COON","COOT","CORD","CORE","CORK","CORN","COST","COVE","COWL","CRAB","CRAG","CRAM","CRAY","CREW","CRIB","CROW","CRUD","CUBA","CUBE","CUFF","CULL","CULT","CUNY","CURB","CURD","CURE","CURL","CURT","CUTS","DADE","DALE","DAME","DANA","DANE","DANG","DANK","DARE","DARK","DARN","DART","DASH","DATA","DATE","DAVE","DAVY","DAWN","DAYS","DEAD","DEAF","DEAL","DEAN","DEAR","DEBT","DECK","DEED","DEEM","DEER","DEFT","DEFY","DELL","DENT","DENY","DESK","DIAL","DICE","DIED","DIET","DIME","DINE","DING","DINT","DIRE","DIRT","DISC","DISH","DISK","DIVE","DOCK","DOES","DOLE","DOLL","DOLT","DOME","DONE","DOOM","DOOR","DORA","DOSE","DOTE","DOUG","DOUR","DOVE","DOWN","DRAB","DRAG","DRAM","DRAW","DREW","DRUB","DRUG","DRUM","DUAL","DUCK","DUCT","DUEL","DUET","DUKE","DULL","DUMB","DUNE","DUNK","DUSK","DUST","DUTY","EACH","EARL","EARN","EASE","EAST","EASY","EBEN","ECHO","EDDY","EDEN","EDGE","EDGY","EDIT","EDNA","EGAN","ELAN","ELBA","ELLA","ELSE","EMIL","EMIT","EMMA","ENDS","ERIC","EROS","EVEN","EVER","EVIL","EYED","FACE","FACT","FADE","FAIL","FAIN","FAIR","FAKE","FALL","FAME","FANG","FARM","FAST","FATE","FAWN","FEAR","FEAT","FEED","FEEL","FEET","FELL","FELT","FEND","FERN","FEST","FEUD","FIEF","FIGS","FILE","FILL","FILM","FIND","FINE","FINK","FIRE","FIRM","FISH","FISK","FIST","FITS","FIVE","FLAG","FLAK","FLAM","FLAT","FLAW","FLEA","FLED","FLEW","FLIT","FLOC","FLOG","FLOW","FLUB","FLUE","FOAL","FOAM","FOGY","FOIL","FOLD","FOLK","FOND","FONT","FOOD","FOOL","FOOT","FORD","FORE","FORK","FORM","FORT","FOSS","FOUL","FOUR","FOWL","FRAU","FRAY","FRED","FREE","FRET","FREY","FROG","FROM","FUEL","FULL","FUME","FUND","FUNK","FURY","FUSE","FUSS","GAFF","GAGE","GAIL","GAIN","GAIT","GALA","GALE","GALL","GALT","GAME","GANG","GARB","GARY","GASH","GATE","GAUL","GAUR","GAVE","GAWK","GEAR","GELD","GENE","GENT","GERM","GETS","GIBE","GIFT","GILD","GILL","GILT","GINA","GIRD","GIRL","GIST","GIVE","GLAD","GLEE","GLEN","GLIB","GLOB","GLOM","GLOW","GLUE","GLUM","GLUT","GOAD","GOAL","GOAT","GOER","GOES","GOLD","GOLF","GONE","GONG","GOOD","GOOF","GORE","GORY","GOSH","GOUT","GOWN","GRAB","GRAD","GRAY","GREG","GREW","GREY","GRID","GRIM","GRIN","GRIT","GROW","GRUB","GULF","GULL","GUNK","GURU","GUSH","GUST","GWEN","GWYN","HAAG","HAAS","HACK","HAIL","HAIR","HALE","HALF","HALL","HALO","HALT","HAND","HANG","HANK","HANS","HARD","HARK","HARM","HART","HASH","HAST","HATE","HATH","HAUL","HAVE","HAWK","HAYS","HEAD","HEAL","HEAR","HEAT","HEBE","HECK","HEED","HEEL","HEFT","HELD","HELL","HELM","HERB","HERD","HERE","HERO","HERS","HESS","HEWN","HICK","HIDE","HIGH","HIKE","HILL","HILT","HIND","HINT","HIRE","HISS","HIVE","HOBO","HOCK","HOFF","HOLD","HOLE","HOLM","HOLT","HOME","HONE","HONK","HOOD","HOOF","HOOK","HOOT","HORN","HOSE","HOST","HOUR","HOVE","HOWE","HOWL","HOYT","HUCK","HUED","HUFF","HUGE","HUGH","HUGO","HULK","HULL","HUNK","HUNT","HURD","HURL","HURT","HUSH","HYDE","HYMN","IBIS","ICON","IDEA","IDLE","IFFY","INCA","INCH","INTO","IONS","IOTA","IOWA","IRIS","IRMA","IRON","ISLE","ITCH","ITEM","IVAN","JACK","JADE","JAIL","JAKE","JANE","JAVA","JEAN","JEFF","JERK","JESS","JEST","JIBE","JILL","JILT","JIVE","JOAN","JOBS","JOCK","JOEL","JOEY","JOHN","JOIN","JOKE","JOLT","JOVE","JUDD","JUDE","JUDO","JUDY","JUJU","JUKE","JULY","JUNE","JUNK","JUNO","JURY","JUST","JUTE","KAHN","KALE","KANE","KANT","KARL","KATE","KEEL","KEEN","KENO","KENT","KERN","KERR","KEYS","KICK","KILL","KIND","KING","KIRK","KISS","KITE","KLAN","KNEE","KNEW","KNIT","KNOB","KNOT","KNOW","KOCH","KONG","KUDO","KURD","KURT","KYLE","LACE","LACK","LACY","LADY","LAID","LAIN","LAIR","LAKE","LAMB","LAME","LAND","LANE","LANG","LARD","LARK","LASS","LAST","LATE","LAUD","LAVA","LAWN","LAWS","LAYS","LEAD","LEAF","LEAK","LEAN","LEAR","LEEK","LEER","LEFT","LEND","LENS","LENT","LEON","LESK","LESS","LEST","LETS","LIAR","LICE","LICK","LIED","LIEN","LIES","LIEU","LIFE","LIFT","LIKE","LILA","LILT","LILY","LIMA","LIMB","LIME","LIND","LINE","LINK","LINT","LION","LISA","LIST","LIVE","LOAD","LOAF","LOAM","LOAN","LOCK","LOFT","LOGE","LOIS","LOLA","LONE","LONG","LOOK","LOON","LOOT","LORD","LORE","LOSE","LOSS","LOST","LOUD","LOVE","LOWE","LUCK","LUCY","LUGE","LUKE","LULU","LUND","LUNG","LURA","LURE","LURK","LUSH","LUST","LYLE","LYNN","LYON","LYRA","MACE","MADE","MAGI","MAID","MAIL","MAIN","MAKE","MALE","MALI","MALL","MALT","MANA","MANN","MANY","MARC","MARE","MARK","MARS","MART","MARY","MASH","MASK","MASS","MAST","MATE","MATH","MAUL","MAYO","MEAD","MEAL","MEAN","MEAT","MEEK","MEET","MELD","MELT","MEMO","MEND","MENU","MERT","MESH","MESS","MICE","MIKE","MILD","MILE","MILK","MILL","MILT","MIMI","MIND","MINE","MINI","MINK","MINT","MIRE","MISS","MIST","MITE","MITT","MOAN","MOAT","MOCK","MODE","MOLD","MOLE","MOLL","MOLT","MONA","MONK","MONT","MOOD","MOON","MOOR","MOOT","MORE","MORN","MORT","MOSS","MOST","MOTH","MOVE","MUCH","MUCK","MUDD","MUFF","MULE","MULL","MURK","MUSH","MUST","MUTE","MUTT","MYRA","MYTH","NAGY","NAIL","NAIR","NAME","NARY","NASH","NAVE","NAVY","NEAL","NEAR","NEAT","NECK","NEED","NEIL","NELL","NEON","NERO","NESS","NEST","NEWS","NEWT","NIBS","NICE","NICK","NILE","NINA","NINE","NOAH","NODE","NOEL","NOLL","NONE","NOOK","NOON","NORM","NOSE","NOTE","NOUN","NOVA","NUDE","NULL","NUMB","OATH","OBEY","OBOE","ODIN","OHIO","OILY","OINT","OKAY","OLAF","OLDY","OLGA","OLIN","OMAN","OMEN","OMIT","ONCE","ONES","ONLY","ONTO","ONUS","ORAL","ORGY","OSLO","OTIS","OTTO","OUCH","OUST","OUTS","OVAL","OVEN","OVER","OWLY","OWNS","QUAD","QUIT","QUOD","RACE","RACK","RACY","RAFT","RAGE","RAID","RAIL","RAIN","RAKE","RANK","RANT","RARE","RASH","RATE","RAVE","RAYS","READ","REAL","REAM","REAR","RECK","REED","REEF","REEK","REEL","REID","REIN","RENA","REND","RENT","REST","RICE","RICH","RICK","RIDE","RIFT","RILL","RIME","RING","RINK","RISE","RISK","RITE","ROAD","ROAM","ROAR","ROBE","ROCK","RODE","ROIL","ROLL","ROME","ROOD","ROOF","ROOK","ROOM","ROOT","ROSA","ROSE","ROSS","ROSY","ROTH","ROUT","ROVE","ROWE","ROWS","RUBE","RUBY","RUDE","RUDY","RUIN","RULE","RUNG","RUNS","RUNT","RUSE","RUSH","RUSK","RUSS","RUST","RUTH","SACK","SAFE","SAGE","SAID","SAIL","SALE","SALK","SALT","SAME","SAND","SANE","SANG","SANK","SARA","SAUL","SAVE","SAYS","SCAN","SCAR","SCAT","SCOT","SEAL","SEAM","SEAR","SEAT","SEED","SEEK","SEEM","SEEN","SEES","SELF","SELL","SEND","SENT","SETS","SEWN","SHAG","SHAM","SHAW","SHAY","SHED","SHIM","SHIN","SHOD","SHOE","SHOT","SHOW","SHUN","SHUT","SICK","SIDE","SIFT","SIGH","SIGN","SILK","SILL","SILO","SILT","SINE","SING","SINK","SIRE","SITE","SITS","SITU","SKAT","SKEW","SKID","SKIM","SKIN","SKIT","SLAB","SLAM","SLAT","SLAY","SLED","SLEW","SLID","SLIM","SLIT","SLOB","SLOG","SLOT","SLOW","SLUG","SLUM","SLUR","SMOG","SMUG","SNAG","SNOB","SNOW","SNUB","SNUG","SOAK","SOAR","SOCK","SODA","SOFA","SOFT","SOIL","SOLD","SOME","SONG","SOON","SOOT","SORE","SORT","SOUL","SOUR","SOWN","STAB","STAG","STAN","STAR","STAY","STEM","STEW","STIR","STOW","STUB","STUN","SUCH","SUDS","SUIT","SULK","SUMS","SUNG","SUNK","SURE","SURF","SWAB","SWAG","SWAM","SWAN","SWAT","SWAY","SWIM","SWUM","TACK","TACT","TAIL","TAKE","TALE","TALK","TALL","TANK","TASK","TATE","TAUT","TEAL","TEAM","TEAR","TECH","TEEM","TEEN","TEET","TELL","TEND","TENT","TERM","TERN","TESS","TEST","THAN","THAT","THEE","THEM","THEN","THEY","THIN","THIS","THUD","THUG","TICK","TIDE","TIDY","TIED","TIER","TILE","TILL","TILT","TIME","TINA","TINE","TINT","TINY","TIRE","TOAD","TOGO","TOIL","TOLD","TOLL","TONE","TONG","TONY","TOOK","TOOL","TOOT","TORE","TORN","TOTE","TOUR","TOUT","TOWN","TRAG","TRAM","TRAY","TREE","TREK","TRIG","TRIM","TRIO","TROD","TROT","TROY","TRUE","TUBA","TUBE","TUCK","TUFT","TUNA","TUNE","TUNG","TURF","TURN","TUSK","TWIG","TWIN","TWIT","ULAN","UNIT","URGE","USED","USER","USES","UTAH","VAIL","VAIN","VALE","VARY","VASE","VAST","VEAL","VEDA","VEIL","VEIN","VEND","VENT","VERB","VERY","VETO","VICE","VIEW","VINE","VISE","VOID","VOLT","VOTE","WACK","WADE","WAGE","WAIL","WAIT","WAKE","WALE","WALK","WALL","WALT","WAND","WANE","WANG","WANT","WARD","WARM","WARN","WART","WASH","WAST","WATS","WATT","WAVE","WAVY","WAYS","WEAK","WEAL","WEAN","WEAR","WEED","WEEK","WEIR","WELD","WELL","WELT","WENT","WERE","WERT","WEST","WHAM","WHAT","WHEE","WHEN","WHET","WHOA","WHOM","WICK","WIFE","WILD","WILL","WIND","WINE","WING","WINK","WINO","WIRE","WISE","WISH","WITH","WOLF","WONT","WOOD","WOOL","WORD","WORE","WORK","WORM","WORN","WOVE","WRIT","WYNN","YALE","YANG","YANK","YARD","YARN","YAWL","YAWN","YEAH","YEAR","YELL","YOGA","YOKE"]');
|
17487
|
+
|
18221
17488
|
/***/ }),
|
18222
17489
|
|
18223
17490
|
/***/ "./dist/npm/Wallet/signer.js":
|
@@ -21381,8 +20648,10 @@ function validateEscrowCreate(tx) {
|
|
21381
20648
|
if (tx.CancelAfter === undefined && tx.FinishAfter === undefined) {
|
21382
20649
|
throw new errors_1.ValidationError('EscrowCreate: Either CancelAfter or FinishAfter must be specified');
|
21383
20650
|
}
|
21384
|
-
if (tx.FinishAfter === undefined &&
|
21385
|
-
|
20651
|
+
if (tx.FinishAfter === undefined &&
|
20652
|
+
tx.Condition === undefined &&
|
20653
|
+
tx.FinishFunction === undefined) {
|
20654
|
+
throw new errors_1.ValidationError('EscrowCreate: Either FinishAfter, Condition, or FinishFunction must be specified');
|
21386
20655
|
}
|
21387
20656
|
if (tx.CancelAfter !== undefined && typeof tx.CancelAfter !== 'number') {
|
21388
20657
|
throw new errors_1.ValidationError('EscrowCreate: CancelAfter must be a number');
|
@@ -21629,9 +20898,12 @@ exports.validateOracleDelete = validateOracleDelete;
|
|
21629
20898
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
21630
20899
|
exports.validateOracleSet = void 0;
|
21631
20900
|
const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
|
20901
|
+
const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/index.js");
|
21632
20902
|
const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
|
21633
20903
|
const PRICE_DATA_SERIES_MAX_LENGTH = 10;
|
21634
20904
|
const SCALE_MAX = 10;
|
20905
|
+
const MINIMUM_ASSET_PRICE_LENGTH = 1;
|
20906
|
+
const MAXIMUM_ASSET_PRICE_LENGTH = 16;
|
21635
20907
|
function validateOracleSet(tx) {
|
21636
20908
|
(0, common_1.validateBaseTransaction)(tx);
|
21637
20909
|
(0, common_1.validateRequiredField)(tx, 'OracleDocumentID', common_1.isNumber);
|
@@ -21666,9 +20938,20 @@ function validateOracleSet(tx) {
|
|
21666
20938
|
(priceData.PriceData.Scale == null)) {
|
21667
20939
|
throw new errors_1.ValidationError('OracleSet: PriceDataSeries must have both `AssetPrice` and `Scale` if any are present');
|
21668
20940
|
}
|
21669
|
-
if ('AssetPrice' in priceData.PriceData
|
21670
|
-
!(0, common_1.isNumber)(priceData.PriceData.AssetPrice)) {
|
21671
|
-
|
20941
|
+
if ('AssetPrice' in priceData.PriceData) {
|
20942
|
+
if (!(0, common_1.isNumber)(priceData.PriceData.AssetPrice)) {
|
20943
|
+
if (typeof priceData.PriceData.AssetPrice !== 'string') {
|
20944
|
+
throw new errors_1.ValidationError('OracleSet: Field AssetPrice must be a string or a number');
|
20945
|
+
}
|
20946
|
+
if (!(0, utils_1.isHex)(priceData.PriceData.AssetPrice)) {
|
20947
|
+
throw new errors_1.ValidationError('OracleSet: Field AssetPrice must be a valid hex string');
|
20948
|
+
}
|
20949
|
+
if (priceData.PriceData.AssetPrice.length <
|
20950
|
+
MINIMUM_ASSET_PRICE_LENGTH ||
|
20951
|
+
priceData.PriceData.AssetPrice.length > MAXIMUM_ASSET_PRICE_LENGTH) {
|
20952
|
+
throw new errors_1.ValidationError(`OracleSet: Length of AssetPrice field must be between ${MINIMUM_ASSET_PRICE_LENGTH} and ${MAXIMUM_ASSET_PRICE_LENGTH} characters long`);
|
20953
|
+
}
|
20954
|
+
}
|
21672
20955
|
}
|
21673
20956
|
if ('Scale' in priceData.PriceData &&
|
21674
20957
|
!(0, common_1.isNumber)(priceData.PriceData.Scale)) {
|
@@ -22686,6 +21969,9 @@ function calculateFeePerTransactionType(client, tx, signersCount = 0) {
|
|
22686
21969
|
const product = new bignumber_js_1.default(scaleValue(netFeeDrops, 33 + fulfillmentBytesSize / 16));
|
22687
21970
|
baseFee = product.dp(0, bignumber_js_1.default.ROUND_CEIL);
|
22688
21971
|
}
|
21972
|
+
if (tx.TransactionType === 'EscrowCreate' && tx.FinishFunction != null) {
|
21973
|
+
baseFee = bignumber_js_1.default.sum(baseFee, 1000);
|
21974
|
+
}
|
22689
21975
|
if (tx.TransactionType === 'AccountDelete' ||
|
22690
21976
|
tx.TransactionType === 'AMMCreate') {
|
22691
21977
|
baseFee = yield fetchAccountDeleteFee(client);
|
@@ -24387,28 +23673,6 @@ function xrpToDrops(xrpToConvert) {
|
|
24387
23673
|
exports.xrpToDrops = xrpToDrops;
|
24388
23674
|
|
24389
23675
|
|
24390
|
-
/***/ }),
|
24391
|
-
|
24392
|
-
/***/ "../../node_modules/ripple-binary-codec/dist/enums/definitions.json":
|
24393
|
-
/*!**************************************************************************!*\
|
24394
|
-
!*** ../../node_modules/ripple-binary-codec/dist/enums/definitions.json ***!
|
24395
|
-
\**************************************************************************/
|
24396
|
-
/***/ ((module) => {
|
24397
|
-
|
24398
|
-
"use strict";
|
24399
|
-
module.exports = /*#__PURE__*/JSON.parse('{"FIELDS":[["Generic",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":0,"type":"Unknown"}],["Invalid",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":-1,"type":"Unknown"}],["ObjectEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STObject"}],["ArrayEndMarker",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"STArray"}],["taker_gets_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Amount"}],["taker_pays_funded",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":259,"type":"Amount"}],["LedgerEntryType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt16"}],["TransactionType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt16"}],["SignerWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt16"}],["TransferFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt16"}],["TradingFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt16"}],["DiscountedFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt16"}],["Version",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt16"}],["HookStateChangeCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt16"}],["HookEmitCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt16"}],["HookExecutionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt16"}],["HookApiVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt16"}],["LedgerFixType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt16"}],["NetworkID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt32"}],["Flags",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt32"}],["SourceTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt32"}],["Sequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt32"}],["PreviousTxnLgrSeq",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt32"}],["LedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt32"}],["CloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt32"}],["ParentCloseTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt32"}],["SigningTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt32"}],["Expiration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt32"}],["TransferRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt32"}],["WalletSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt32"}],["OwnerCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt32"}],["DestinationTag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"UInt32"}],["LastUpdateTime",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":15,"type":"UInt32"}],["HighQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt32"}],["HighQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt32"}],["LowQualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt32"}],["LowQualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt32"}],["QualityIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt32"}],["QualityOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt32"}],["StampEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt32"}],["BondAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt32"}],["LoadFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt32"}],["OfferSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt32"}],["FirstLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt32"}],["LastLedgerSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"UInt32"}],["TransactionIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"UInt32"}],["OperationLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"UInt32"}],["ReferenceFeeUnits",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"UInt32"}],["ReserveBase",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"UInt32"}],["ReserveIncrement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"UInt32"}],["SetFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"UInt32"}],["ClearFlag",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":34,"type":"UInt32"}],["SignerQuorum",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":35,"type":"UInt32"}],["CancelAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":36,"type":"UInt32"}],["FinishAfter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":37,"type":"UInt32"}],["SignerListID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":38,"type":"UInt32"}],["SettleDelay",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":39,"type":"UInt32"}],["TicketCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":40,"type":"UInt32"}],["TicketSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":41,"type":"UInt32"}],["NFTokenTaxon",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":42,"type":"UInt32"}],["MintedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":43,"type":"UInt32"}],["BurnedNFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":44,"type":"UInt32"}],["HookStateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":45,"type":"UInt32"}],["EmitGeneration",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":46,"type":"UInt32"}],["VoteWeight",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":48,"type":"UInt32"}],["FirstNFTokenSequence",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":50,"type":"UInt32"}],["OracleDocumentID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":51,"type":"UInt32"}],["IndexNext",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt64"}],["IndexPrevious",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt64"}],["BookNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt64"}],["OwnerNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt64"}],["BaseFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt64"}],["ExchangeRate",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"UInt64"}],["LowNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"UInt64"}],["HighNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"UInt64"}],["DestinationNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"UInt64"}],["Cookie",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"UInt64"}],["ServerVersion",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"UInt64"}],["NFTokenOfferNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"UInt64"}],["EmitBurden",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"UInt64"}],["HookOn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt64"}],["HookInstructionCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt64"}],["HookReturnCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt64"}],["ReferenceCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt64"}],["XChainClaimID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"UInt64"}],["XChainAccountCreateCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"UInt64"}],["XChainAccountClaimCount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"UInt64"}],["AssetPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"UInt64"}],["MaximumAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"UInt64"}],["OutstandingAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"UInt64"}],["MPTAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"UInt64"}],["IssuerNode",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["SubjectNode",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash128"}],["LedgerHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash256"}],["ParentHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash256"}],["TransactionHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash256"}],["AccountHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash256"}],["PreviousTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Hash256"}],["LedgerIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Hash256"}],["WalletLocator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Hash256"}],["RootIndex",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Hash256"}],["AccountTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Hash256"}],["NFTokenID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Hash256"}],["EmitParentTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Hash256"}],["EmitNonce",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Hash256"}],["EmitHookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Hash256"}],["AMMID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"Hash256"}],["BookDirectory",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Hash256"}],["InvoiceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Hash256"}],["Nickname",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Hash256"}],["Amendment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Hash256"}],["Digest",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"Hash256"}],["Channel",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Hash256"}],["ConsensusHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Hash256"}],["CheckID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Hash256"}],["ValidatedHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Hash256"}],["PreviousPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Hash256"}],["NextPageMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Hash256"}],["NFTokenBuyOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Hash256"}],["NFTokenSellOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Hash256"}],["HookStateKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Hash256"}],["HookHash",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Hash256"}],["HookNamespace",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"Hash256"}],["HookSetTxnID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":33,"type":"Hash256"}],["DomainID",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["hash",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Hash256"}],["index",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":258,"type":"Hash256"}],["Amount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Amount"}],["Balance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Amount"}],["LimitAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Amount"}],["TakerPays",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Amount"}],["TakerGets",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"Amount"}],["LowLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"Amount"}],["HighLimit",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"Amount"}],["Fee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"Amount"}],["SendMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"Amount"}],["DeliverMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"Amount"}],["Amount2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"Amount"}],["BidMin",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"Amount"}],["BidMax",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"Amount"}],["MinimumOffer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"Amount"}],["RippleEscrow",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"Amount"}],["DeliveredAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"Amount"}],["NFTokenBrokerFee",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"Amount"}],["BaseFeeDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"Amount"}],["ReserveBaseDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"Amount"}],["ReserveIncrementDrops",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"Amount"}],["LPTokenOut",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"Amount"}],["LPTokenIn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"Amount"}],["EPrice",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"Amount"}],["Price",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"Amount"}],["SignatureReward",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"Amount"}],["MinAccountCreateAmount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"Amount"}],["LPTokenBalance",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"Amount"}],["PublicKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Blob"}],["MessageKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Blob"}],["SigningPubKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Blob"}],["TxnSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":4,"type":"Blob"}],["URI",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"Blob"}],["Signature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":6,"type":"Blob"}],["Domain",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":7,"type":"Blob"}],["FundCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"Blob"}],["RemoveCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"Blob"}],["ExpireCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"Blob"}],["CreateCode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"Blob"}],["MemoType",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":12,"type":"Blob"}],["MemoData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":13,"type":"Blob"}],["MemoFormat",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":14,"type":"Blob"}],["Fulfillment",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"Blob"}],["Condition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":17,"type":"Blob"}],["MasterSignature",{"isSerialized":true,"isSigningField":false,"isVLEncoded":true,"nth":18,"type":"Blob"}],["UNLModifyValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"Blob"}],["ValidatorToDisable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"Blob"}],["ValidatorToReEnable",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"Blob"}],["HookStateData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"Blob"}],["HookReturnString",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"Blob"}],["HookParameterName",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":24,"type":"Blob"}],["HookParameterValue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":25,"type":"Blob"}],["DIDDocument",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":26,"type":"Blob"}],["Data",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":27,"type":"Blob"}],["AssetClass",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":28,"type":"Blob"}],["Provider",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":29,"type":"Blob"}],["MPTokenMetadata",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":30,"type":"Blob"}],["CredentialType",{"nth":31,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"AccountID"}],["Owner",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"AccountID"}],["Destination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"AccountID"}],["Issuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"AccountID"}],["Authorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":5,"type":"AccountID"}],["Unauthorize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":6,"type":"AccountID"}],["RegularKey",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":8,"type":"AccountID"}],["NFTokenMinter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":9,"type":"AccountID"}],["EmitCallback",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":10,"type":"AccountID"}],["Holder",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":11,"type":"AccountID"}],["HookAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":16,"type":"AccountID"}],["OtherChainSource",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":18,"type":"AccountID"}],["OtherChainDestination",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":19,"type":"AccountID"}],["AttestationSignerAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":20,"type":"AccountID"}],["AttestationRewardAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":21,"type":"AccountID"}],["LockingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":22,"type":"AccountID"}],["IssuingChainDoor",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":23,"type":"AccountID"}],["Subject",{"nth":24,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["TransactionMetaData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"STObject"}],["CreatedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"STObject"}],["DeletedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STObject"}],["ModifiedNode",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STObject"}],["PreviousFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STObject"}],["FinalFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STObject"}],["NewFields",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STObject"}],["TemplateEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STObject"}],["Memo",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STObject"}],["SignerEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STObject"}],["NFToken",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STObject"}],["EmitDetails",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":13,"type":"STObject"}],["Hook",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":14,"type":"STObject"}],["Signer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STObject"}],["Majority",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STObject"}],["DisabledValidator",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STObject"}],["EmittedTxn",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STObject"}],["HookExecution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STObject"}],["HookDefinition",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STObject"}],["HookParameter",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":23,"type":"STObject"}],["HookGrant",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STObject"}],["VoteEntry",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STObject"}],["AuctionSlot",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":26,"type":"STObject"}],["AuthAccount",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":27,"type":"STObject"}],["XChainClaimProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":28,"type":"STObject"}],["XChainCreateAccountProofSig",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":29,"type":"STObject"}],["XChainClaimAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":30,"type":"STObject"}],["XChainCreateAccountAttestationCollectionElement",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":31,"type":"STObject"}],["PriceData",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":32,"type":"STObject"}],["Credential",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signers",{"isSerialized":true,"isSigningField":false,"isVLEncoded":false,"nth":3,"type":"STArray"}],["SignerEntries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"STArray"}],["Template",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"STArray"}],["Necessary",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":6,"type":"STArray"}],["Sufficient",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":7,"type":"STArray"}],["AffectedNodes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":8,"type":"STArray"}],["Memos",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":9,"type":"STArray"}],["NFTokens",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":10,"type":"STArray"}],["Hooks",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":11,"type":"STArray"}],["VoteSlots",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":12,"type":"STArray"}],["Majorities",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"STArray"}],["DisabledValidators",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"STArray"}],["HookExecutions",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"STArray"}],["HookParameters",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"STArray"}],["HookGrants",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":20,"type":"STArray"}],["XChainClaimAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":21,"type":"STArray"}],["XChainCreateAccountAttestations",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":22,"type":"STArray"}],["PriceDataSeries",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":24,"type":"STArray"}],["AuthAccounts",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":25,"type":"STArray"}],["AuthorizeCredentials",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["UnauthorizeCredentials",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AcceptedCredentials",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["CloseResolution",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"UInt8"}],["Method",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"UInt8"}],["TransactionResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"UInt8"}],["Scale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"UInt8"}],["AssetScale",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":5,"type":"UInt8"}],["TickSize",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":16,"type":"UInt8"}],["UNLModifyDisabling",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":17,"type":"UInt8"}],["HookResult",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":18,"type":"UInt8"}],["WasLockingChainSend",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":19,"type":"UInt8"}],["TakerPaysCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash160"}],["TakerPaysIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Hash160"}],["TakerGetsCurrency",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Hash160"}],["TakerGetsIssuer",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Hash160"}],["Paths",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"PathSet"}],["Indexes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":1,"type":"Vector256"}],["Hashes",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":2,"type":"Vector256"}],["Amendments",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":3,"type":"Vector256"}],["NFTokenOffers",{"isSerialized":true,"isSigningField":true,"isVLEncoded":true,"nth":4,"type":"Vector256"}],["CredentialIDs",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["MPTokenIssuanceID",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Hash192"}],["LockingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Issue"}],["IssuingChainIssue",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Issue"}],["Asset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":3,"type":"Issue"}],["Asset2",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":4,"type":"Issue"}],["XChainBridge",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"XChainBridge"}],["BaseAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":1,"type":"Currency"}],["QuoteAsset",{"isSerialized":true,"isSigningField":true,"isVLEncoded":false,"nth":2,"type":"Currency"}],["Transaction",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Transaction"}],["LedgerEntry",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"LedgerEntry"}],["Validation",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Validation"}],["Metadata",{"isSerialized":false,"isSigningField":false,"isVLEncoded":false,"nth":257,"type":"Metadata"}]],"LEDGER_ENTRY_TYPES":{"AMM":121,"AccountRoot":97,"Amendments":102,"Bridge":105,"Check":67,"DID":73,"DepositPreauth":112,"DirectoryNode":100,"Escrow":117,"FeeSettings":115,"Invalid":-1,"LedgerHashes":104,"MPToken":127,"MPTokenIssuance":126,"NFTokenOffer":55,"NFTokenPage":80,"NegativeUNL":78,"Offer":111,"Oracle":128,"Credential":129,"PayChannel":120,"PermissionedDomain":130,"RippleState":114,"SignerList":83,"Ticket":84,"XChainOwnedClaimID":113,"XChainOwnedCreateAccountClaimID":116},"TRANSACTION_RESULTS":{"tecAMM_ACCOUNT":168,"tecAMM_BALANCE":163,"tecAMM_EMPTY":166,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecAMM_NOT_EMPTY":167,"tecARRAY_EMPTY":190,"tecARRAY_TOO_LARGE":191,"tecBAD_CREDENTIALS":193,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecCLAIM":100,"tecCRYPTOCONDITION_ERROR":146,"tecDIR_FULL":121,"tecDST_TAG_NEEDED":143,"tecDUPLICATE":149,"tecEMPTY_DID":187,"tecEXPIRED":148,"tecFAILED_PROCESSING":105,"tecFROZEN":137,"tecHAS_OBLIGATIONS":151,"tecINCOMPLETE":169,"tecINSUFFICIENT_FUNDS":159,"tecINSUFFICIENT_PAYMENT":161,"tecINSUFFICIENT_RESERVE":141,"tecINSUFF_FEE":136,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecINTERNAL":144,"tecINVALID_UPDATE_TIME":188,"tecINVARIANT_FAILED":147,"tecKILLED":150,"tecLOCKED":192,"tecMAX_SEQUENCE_REACHED":154,"tecNEED_MASTER_KEY":142,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecNO_ALTERNATIVE_KEY":130,"tecNO_AUTH":134,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_ENTRY":140,"tecNO_ISSUER":133,"tecNO_LINE":135,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecNO_PERMISSION":139,"tecNO_REGULAR_KEY":131,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNO_TARGET":138,"tecOBJECT_NOT_FOUND":160,"tecOVERSIZE":145,"tecOWNERS":132,"tecPATH_DRY":128,"tecPATH_PARTIAL":101,"tecTOKEN_PAIR_NOT_FOUND":189,"tecTOO_SOON":152,"tecUNFUNDED":129,"tecUNFUNDED_ADD":102,"tecUNFUNDED_AMM":162,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecXCHAIN_ACCOUNT_CREATE_PAST":181,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":182,"tecXCHAIN_BAD_CLAIM_ID":172,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":185,"tecXCHAIN_BAD_TRANSFER_ISSUE":170,"tecXCHAIN_CLAIM_NO_QUORUM":173,"tecXCHAIN_CREATE_ACCOUNT_DISABLED":186,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":175,"tecXCHAIN_INSUFF_CREATE_AMOUNT":180,"tecXCHAIN_NO_CLAIM_ID":171,"tecXCHAIN_NO_SIGNERS_LIST":178,"tecXCHAIN_PAYMENT_FAILED":183,"tecXCHAIN_PROOF_UNKNOWN_KEY":174,"tecXCHAIN_REWARD_MISMATCH":177,"tecXCHAIN_SELF_COMMIT":184,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":179,"tecXCHAIN_WRONG_CHAIN":176,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_AUTH_MASTER":-183,"tefBAD_LEDGER":-195,"tefBAD_QUORUM":-185,"tefBAD_SIGNATURE":-186,"tefCREATED":-194,"tefEXCEPTION":-193,"tefFAILURE":-199,"tefINTERNAL":-192,"tefINVALID_LEDGER_FIX_TYPE":-178,"tefINVARIANT_FAILED":-182,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"tefNOT_MULTI_SIGNING":-184,"tefNO_AUTH_REQUIRED":-191,"tefNO_TICKET":-180,"tefPAST_SEQ":-190,"tefTOO_BIG":-181,"tefWRONG_PRIOR":-189,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telENV_RPC_FAILED":-383,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telLOCAL_ERROR":-399,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"telNO_DST_PARTIAL":-393,"telREQUIRES_NETWORK_ID":-385,"telWRONG_NETWORK":-386,"temARRAY_EMPTY":-253,"temARRAY_TOO_LARGE":-252,"temBAD_AMM_TOKENS":-261,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_QUORUM":-271,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SIGNER":-272,"temBAD_SRC_ACCOUNT":-281,"temBAD_TICK_SIZE":-269,"temBAD_TRANSFER_FEE":-251,"temBAD_TRANSFER_RATE":-280,"temBAD_WEIGHT":-270,"temCANNOT_PREAUTH_SELF":-267,"temDISABLED":-273,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temEMPTY_DID":-254,"temINVALID":-277,"temINVALID_ACCOUNT_ID":-268,"temINVALID_COUNT":-266,"temINVALID_FLAG":-276,"temMALFORMED":-299,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temSEQ_AND_TICKET":-263,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temXCHAIN_BAD_PROOF":-259,"temXCHAIN_BRIDGE_BAD_ISSUES":-258,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-256,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-255,"temXCHAIN_BRIDGE_NONDOOR_OWNER":-257,"temXCHAIN_EQUAL_DOOR_ACCOUNTS":-260,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terLAST":-91,"terNO_ACCOUNT":-96,"terNO_AMM":-87,"terNO_AUTH":-95,"terNO_LINE":-94,"terNO_RIPPLE":-90,"terOWNERS":-93,"terPRE_SEQ":-92,"terPRE_TICKET":-88,"terQUEUED":-89,"terRETRY":-99,"tesSUCCESS":0},"TRANSACTION_TYPES":{"AMMBid":39,"AMMClawback":31,"AMMCreate":35,"AMMDelete":40,"AMMDeposit":36,"AMMVote":38,"AMMWithdraw":37,"AccountDelete":21,"AccountSet":3,"CheckCancel":18,"CheckCash":17,"CheckCreate":16,"Clawback":30,"CredentialCreate":58,"CredentialAccept":59,"CredentialDelete":60,"DIDDelete":50,"DIDSet":49,"DepositPreauth":19,"EnableAmendment":100,"EscrowCancel":4,"EscrowCreate":1,"EscrowFinish":2,"Invalid":-1,"LedgerStateFix":53,"MPTokenAuthorize":57,"MPTokenIssuanceCreate":54,"MPTokenIssuanceDestroy":55,"MPTokenIssuanceSet":56,"NFTokenAcceptOffer":29,"NFTokenBurn":26,"NFTokenCancelOffer":28,"NFTokenCreateOffer":27,"NFTokenMint":25,"NFTokenModify":61,"OfferCancel":8,"OfferCreate":7,"OracleDelete":52,"OracleSet":51,"Payment":0,"PaymentChannelClaim":15,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PermissionedDomainSet":62,"PermissionedDomainDelete":63,"SetFee":101,"SetRegularKey":5,"SignerListSet":12,"TicketCreate":10,"TrustSet":20,"UNLModify":102,"XChainAccountCreateCommit":44,"XChainAddAccountCreateAttestation":46,"XChainAddClaimAttestation":45,"XChainClaim":43,"XChainCommit":42,"XChainCreateBridge":48,"XChainCreateClaimID":41,"XChainModifyBridge":47},"TYPES":{"AccountID":8,"Amount":6,"Blob":7,"Currency":26,"Done":-1,"Hash128":4,"Hash160":17,"Hash192":21,"Hash256":5,"Issue":24,"LedgerEntry":10002,"Metadata":10004,"NotPresent":0,"PathSet":18,"STArray":15,"STObject":14,"Transaction":10001,"UInt16":1,"UInt32":2,"UInt384":22,"UInt512":23,"UInt64":3,"UInt8":16,"UInt96":20,"Unknown":-2,"Validation":10003,"Vector256":19,"XChainBridge":25}}');
|
24400
|
-
|
24401
|
-
/***/ }),
|
24402
|
-
|
24403
|
-
/***/ "./dist/npm/Wallet/rfc1751Words.json":
|
24404
|
-
/*!*******************************************!*\
|
24405
|
-
!*** ./dist/npm/Wallet/rfc1751Words.json ***!
|
24406
|
-
\*******************************************/
|
24407
|
-
/***/ ((module) => {
|
24408
|
-
|
24409
|
-
"use strict";
|
24410
|
-
module.exports = /*#__PURE__*/JSON.parse('["A","ABE","ACE","ACT","AD","ADA","ADD","AGO","AID","AIM","AIR","ALL","ALP","AM","AMY","AN","ANA","AND","ANN","ANT","ANY","APE","APS","APT","ARC","ARE","ARK","ARM","ART","AS","ASH","ASK","AT","ATE","AUG","AUK","AVE","AWE","AWK","AWL","AWN","AX","AYE","BAD","BAG","BAH","BAM","BAN","BAR","BAT","BAY","BE","BED","BEE","BEG","BEN","BET","BEY","BIB","BID","BIG","BIN","BIT","BOB","BOG","BON","BOO","BOP","BOW","BOY","BUB","BUD","BUG","BUM","BUN","BUS","BUT","BUY","BY","BYE","CAB","CAL","CAM","CAN","CAP","CAR","CAT","CAW","COD","COG","COL","CON","COO","COP","COT","COW","COY","CRY","CUB","CUE","CUP","CUR","CUT","DAB","DAD","DAM","DAN","DAR","DAY","DEE","DEL","DEN","DES","DEW","DID","DIE","DIG","DIN","DIP","DO","DOE","DOG","DON","DOT","DOW","DRY","DUB","DUD","DUE","DUG","DUN","EAR","EAT","ED","EEL","EGG","EGO","ELI","ELK","ELM","ELY","EM","END","EST","ETC","EVA","EVE","EWE","EYE","FAD","FAN","FAR","FAT","FAY","FED","FEE","FEW","FIB","FIG","FIN","FIR","FIT","FLO","FLY","FOE","FOG","FOR","FRY","FUM","FUN","FUR","GAB","GAD","GAG","GAL","GAM","GAP","GAS","GAY","GEE","GEL","GEM","GET","GIG","GIL","GIN","GO","GOT","GUM","GUN","GUS","GUT","GUY","GYM","GYP","HA","HAD","HAL","HAM","HAN","HAP","HAS","HAT","HAW","HAY","HE","HEM","HEN","HER","HEW","HEY","HI","HID","HIM","HIP","HIS","HIT","HO","HOB","HOC","HOE","HOG","HOP","HOT","HOW","HUB","HUE","HUG","HUH","HUM","HUT","I","ICY","IDA","IF","IKE","ILL","INK","INN","IO","ION","IQ","IRA","IRE","IRK","IS","IT","ITS","IVY","JAB","JAG","JAM","JAN","JAR","JAW","JAY","JET","JIG","JIM","JO","JOB","JOE","JOG","JOT","JOY","JUG","JUT","KAY","KEG","KEN","KEY","KID","KIM","KIN","KIT","LA","LAB","LAC","LAD","LAG","LAM","LAP","LAW","LAY","LEA","LED","LEE","LEG","LEN","LEO","LET","LEW","LID","LIE","LIN","LIP","LIT","LO","LOB","LOG","LOP","LOS","LOT","LOU","LOW","LOY","LUG","LYE","MA","MAC","MAD","MAE","MAN","MAO","MAP","MAT","MAW","MAY","ME","MEG","MEL","MEN","MET","MEW","MID","MIN","MIT","MOB","MOD","MOE","MOO","MOP","MOS","MOT","MOW","MUD","MUG","MUM","MY","NAB","NAG","NAN","NAP","NAT","NAY","NE","NED","NEE","NET","NEW","NIB","NIL","NIP","NIT","NO","NOB","NOD","NON","NOR","NOT","NOV","NOW","NU","NUN","NUT","O","OAF","OAK","OAR","OAT","ODD","ODE","OF","OFF","OFT","OH","OIL","OK","OLD","ON","ONE","OR","ORB","ORE","ORR","OS","OTT","OUR","OUT","OVA","OW","OWE","OWL","OWN","OX","PA","PAD","PAL","PAM","PAN","PAP","PAR","PAT","PAW","PAY","PEA","PEG","PEN","PEP","PER","PET","PEW","PHI","PI","PIE","PIN","PIT","PLY","PO","POD","POE","POP","POT","POW","PRO","PRY","PUB","PUG","PUN","PUP","PUT","QUO","RAG","RAM","RAN","RAP","RAT","RAW","RAY","REB","RED","REP","RET","RIB","RID","RIG","RIM","RIO","RIP","ROB","ROD","ROE","RON","ROT","ROW","ROY","RUB","RUE","RUG","RUM","RUN","RYE","SAC","SAD","SAG","SAL","SAM","SAN","SAP","SAT","SAW","SAY","SEA","SEC","SEE","SEN","SET","SEW","SHE","SHY","SIN","SIP","SIR","SIS","SIT","SKI","SKY","SLY","SO","SOB","SOD","SON","SOP","SOW","SOY","SPA","SPY","SUB","SUD","SUE","SUM","SUN","SUP","TAB","TAD","TAG","TAN","TAP","TAR","TEA","TED","TEE","TEN","THE","THY","TIC","TIE","TIM","TIN","TIP","TO","TOE","TOG","TOM","TON","TOO","TOP","TOW","TOY","TRY","TUB","TUG","TUM","TUN","TWO","UN","UP","US","USE","VAN","VAT","VET","VIE","WAD","WAG","WAR","WAS","WAY","WE","WEB","WED","WEE","WET","WHO","WHY","WIN","WIT","WOK","WON","WOO","WOW","WRY","WU","YAM","YAP","YAW","YE","YEA","YES","YET","YOU","ABED","ABEL","ABET","ABLE","ABUT","ACHE","ACID","ACME","ACRE","ACTA","ACTS","ADAM","ADDS","ADEN","AFAR","AFRO","AGEE","AHEM","AHOY","AIDA","AIDE","AIDS","AIRY","AJAR","AKIN","ALAN","ALEC","ALGA","ALIA","ALLY","ALMA","ALOE","ALSO","ALTO","ALUM","ALVA","AMEN","AMES","AMID","AMMO","AMOK","AMOS","AMRA","ANDY","ANEW","ANNA","ANNE","ANTE","ANTI","AQUA","ARAB","ARCH","AREA","ARGO","ARID","ARMY","ARTS","ARTY","ASIA","ASKS","ATOM","AUNT","AURA","AUTO","AVER","AVID","AVIS","AVON","AVOW","AWAY","AWRY","BABE","BABY","BACH","BACK","BADE","BAIL","BAIT","BAKE","BALD","BALE","BALI","BALK","BALL","BALM","BAND","BANE","BANG","BANK","BARB","BARD","BARE","BARK","BARN","BARR","BASE","BASH","BASK","BASS","BATE","BATH","BAWD","BAWL","BEAD","BEAK","BEAM","BEAN","BEAR","BEAT","BEAU","BECK","BEEF","BEEN","BEER","BEET","BELA","BELL","BELT","BEND","BENT","BERG","BERN","BERT","BESS","BEST","BETA","BETH","BHOY","BIAS","BIDE","BIEN","BILE","BILK","BILL","BIND","BING","BIRD","BITE","BITS","BLAB","BLAT","BLED","BLEW","BLOB","BLOC","BLOT","BLOW","BLUE","BLUM","BLUR","BOAR","BOAT","BOCA","BOCK","BODE","BODY","BOGY","BOHR","BOIL","BOLD","BOLO","BOLT","BOMB","BONA","BOND","BONE","BONG","BONN","BONY","BOOK","BOOM","BOON","BOOT","BORE","BORG","BORN","BOSE","BOSS","BOTH","BOUT","BOWL","BOYD","BRAD","BRAE","BRAG","BRAN","BRAY","BRED","BREW","BRIG","BRIM","BROW","BUCK","BUDD","BUFF","BULB","BULK","BULL","BUNK","BUNT","BUOY","BURG","BURL","BURN","BURR","BURT","BURY","BUSH","BUSS","BUST","BUSY","BYTE","CADY","CAFE","CAGE","CAIN","CAKE","CALF","CALL","CALM","CAME","CANE","CANT","CARD","CARE","CARL","CARR","CART","CASE","CASH","CASK","CAST","CAVE","CEIL","CELL","CENT","CERN","CHAD","CHAR","CHAT","CHAW","CHEF","CHEN","CHEW","CHIC","CHIN","CHOU","CHOW","CHUB","CHUG","CHUM","CITE","CITY","CLAD","CLAM","CLAN","CLAW","CLAY","CLOD","CLOG","CLOT","CLUB","CLUE","COAL","COAT","COCA","COCK","COCO","CODA","CODE","CODY","COED","COIL","COIN","COKE","COLA","COLD","COLT","COMA","COMB","COME","COOK","COOL","COON","COOT","CORD","CORE","CORK","CORN","COST","COVE","COWL","CRAB","CRAG","CRAM","CRAY","CREW","CRIB","CROW","CRUD","CUBA","CUBE","CUFF","CULL","CULT","CUNY","CURB","CURD","CURE","CURL","CURT","CUTS","DADE","DALE","DAME","DANA","DANE","DANG","DANK","DARE","DARK","DARN","DART","DASH","DATA","DATE","DAVE","DAVY","DAWN","DAYS","DEAD","DEAF","DEAL","DEAN","DEAR","DEBT","DECK","DEED","DEEM","DEER","DEFT","DEFY","DELL","DENT","DENY","DESK","DIAL","DICE","DIED","DIET","DIME","DINE","DING","DINT","DIRE","DIRT","DISC","DISH","DISK","DIVE","DOCK","DOES","DOLE","DOLL","DOLT","DOME","DONE","DOOM","DOOR","DORA","DOSE","DOTE","DOUG","DOUR","DOVE","DOWN","DRAB","DRAG","DRAM","DRAW","DREW","DRUB","DRUG","DRUM","DUAL","DUCK","DUCT","DUEL","DUET","DUKE","DULL","DUMB","DUNE","DUNK","DUSK","DUST","DUTY","EACH","EARL","EARN","EASE","EAST","EASY","EBEN","ECHO","EDDY","EDEN","EDGE","EDGY","EDIT","EDNA","EGAN","ELAN","ELBA","ELLA","ELSE","EMIL","EMIT","EMMA","ENDS","ERIC","EROS","EVEN","EVER","EVIL","EYED","FACE","FACT","FADE","FAIL","FAIN","FAIR","FAKE","FALL","FAME","FANG","FARM","FAST","FATE","FAWN","FEAR","FEAT","FEED","FEEL","FEET","FELL","FELT","FEND","FERN","FEST","FEUD","FIEF","FIGS","FILE","FILL","FILM","FIND","FINE","FINK","FIRE","FIRM","FISH","FISK","FIST","FITS","FIVE","FLAG","FLAK","FLAM","FLAT","FLAW","FLEA","FLED","FLEW","FLIT","FLOC","FLOG","FLOW","FLUB","FLUE","FOAL","FOAM","FOGY","FOIL","FOLD","FOLK","FOND","FONT","FOOD","FOOL","FOOT","FORD","FORE","FORK","FORM","FORT","FOSS","FOUL","FOUR","FOWL","FRAU","FRAY","FRED","FREE","FRET","FREY","FROG","FROM","FUEL","FULL","FUME","FUND","FUNK","FURY","FUSE","FUSS","GAFF","GAGE","GAIL","GAIN","GAIT","GALA","GALE","GALL","GALT","GAME","GANG","GARB","GARY","GASH","GATE","GAUL","GAUR","GAVE","GAWK","GEAR","GELD","GENE","GENT","GERM","GETS","GIBE","GIFT","GILD","GILL","GILT","GINA","GIRD","GIRL","GIST","GIVE","GLAD","GLEE","GLEN","GLIB","GLOB","GLOM","GLOW","GLUE","GLUM","GLUT","GOAD","GOAL","GOAT","GOER","GOES","GOLD","GOLF","GONE","GONG","GOOD","GOOF","GORE","GORY","GOSH","GOUT","GOWN","GRAB","GRAD","GRAY","GREG","GREW","GREY","GRID","GRIM","GRIN","GRIT","GROW","GRUB","GULF","GULL","GUNK","GURU","GUSH","GUST","GWEN","GWYN","HAAG","HAAS","HACK","HAIL","HAIR","HALE","HALF","HALL","HALO","HALT","HAND","HANG","HANK","HANS","HARD","HARK","HARM","HART","HASH","HAST","HATE","HATH","HAUL","HAVE","HAWK","HAYS","HEAD","HEAL","HEAR","HEAT","HEBE","HECK","HEED","HEEL","HEFT","HELD","HELL","HELM","HERB","HERD","HERE","HERO","HERS","HESS","HEWN","HICK","HIDE","HIGH","HIKE","HILL","HILT","HIND","HINT","HIRE","HISS","HIVE","HOBO","HOCK","HOFF","HOLD","HOLE","HOLM","HOLT","HOME","HONE","HONK","HOOD","HOOF","HOOK","HOOT","HORN","HOSE","HOST","HOUR","HOVE","HOWE","HOWL","HOYT","HUCK","HUED","HUFF","HUGE","HUGH","HUGO","HULK","HULL","HUNK","HUNT","HURD","HURL","HURT","HUSH","HYDE","HYMN","IBIS","ICON","IDEA","IDLE","IFFY","INCA","INCH","INTO","IONS","IOTA","IOWA","IRIS","IRMA","IRON","ISLE","ITCH","ITEM","IVAN","JACK","JADE","JAIL","JAKE","JANE","JAVA","JEAN","JEFF","JERK","JESS","JEST","JIBE","JILL","JILT","JIVE","JOAN","JOBS","JOCK","JOEL","JOEY","JOHN","JOIN","JOKE","JOLT","JOVE","JUDD","JUDE","JUDO","JUDY","JUJU","JUKE","JULY","JUNE","JUNK","JUNO","JURY","JUST","JUTE","KAHN","KALE","KANE","KANT","KARL","KATE","KEEL","KEEN","KENO","KENT","KERN","KERR","KEYS","KICK","KILL","KIND","KING","KIRK","KISS","KITE","KLAN","KNEE","KNEW","KNIT","KNOB","KNOT","KNOW","KOCH","KONG","KUDO","KURD","KURT","KYLE","LACE","LACK","LACY","LADY","LAID","LAIN","LAIR","LAKE","LAMB","LAME","LAND","LANE","LANG","LARD","LARK","LASS","LAST","LATE","LAUD","LAVA","LAWN","LAWS","LAYS","LEAD","LEAF","LEAK","LEAN","LEAR","LEEK","LEER","LEFT","LEND","LENS","LENT","LEON","LESK","LESS","LEST","LETS","LIAR","LICE","LICK","LIED","LIEN","LIES","LIEU","LIFE","LIFT","LIKE","LILA","LILT","LILY","LIMA","LIMB","LIME","LIND","LINE","LINK","LINT","LION","LISA","LIST","LIVE","LOAD","LOAF","LOAM","LOAN","LOCK","LOFT","LOGE","LOIS","LOLA","LONE","LONG","LOOK","LOON","LOOT","LORD","LORE","LOSE","LOSS","LOST","LOUD","LOVE","LOWE","LUCK","LUCY","LUGE","LUKE","LULU","LUND","LUNG","LURA","LURE","LURK","LUSH","LUST","LYLE","LYNN","LYON","LYRA","MACE","MADE","MAGI","MAID","MAIL","MAIN","MAKE","MALE","MALI","MALL","MALT","MANA","MANN","MANY","MARC","MARE","MARK","MARS","MART","MARY","MASH","MASK","MASS","MAST","MATE","MATH","MAUL","MAYO","MEAD","MEAL","MEAN","MEAT","MEEK","MEET","MELD","MELT","MEMO","MEND","MENU","MERT","MESH","MESS","MICE","MIKE","MILD","MILE","MILK","MILL","MILT","MIMI","MIND","MINE","MINI","MINK","MINT","MIRE","MISS","MIST","MITE","MITT","MOAN","MOAT","MOCK","MODE","MOLD","MOLE","MOLL","MOLT","MONA","MONK","MONT","MOOD","MOON","MOOR","MOOT","MORE","MORN","MORT","MOSS","MOST","MOTH","MOVE","MUCH","MUCK","MUDD","MUFF","MULE","MULL","MURK","MUSH","MUST","MUTE","MUTT","MYRA","MYTH","NAGY","NAIL","NAIR","NAME","NARY","NASH","NAVE","NAVY","NEAL","NEAR","NEAT","NECK","NEED","NEIL","NELL","NEON","NERO","NESS","NEST","NEWS","NEWT","NIBS","NICE","NICK","NILE","NINA","NINE","NOAH","NODE","NOEL","NOLL","NONE","NOOK","NOON","NORM","NOSE","NOTE","NOUN","NOVA","NUDE","NULL","NUMB","OATH","OBEY","OBOE","ODIN","OHIO","OILY","OINT","OKAY","OLAF","OLDY","OLGA","OLIN","OMAN","OMEN","OMIT","ONCE","ONES","ONLY","ONTO","ONUS","ORAL","ORGY","OSLO","OTIS","OTTO","OUCH","OUST","OUTS","OVAL","OVEN","OVER","OWLY","OWNS","QUAD","QUIT","QUOD","RACE","RACK","RACY","RAFT","RAGE","RAID","RAIL","RAIN","RAKE","RANK","RANT","RARE","RASH","RATE","RAVE","RAYS","READ","REAL","REAM","REAR","RECK","REED","REEF","REEK","REEL","REID","REIN","RENA","REND","RENT","REST","RICE","RICH","RICK","RIDE","RIFT","RILL","RIME","RING","RINK","RISE","RISK","RITE","ROAD","ROAM","ROAR","ROBE","ROCK","RODE","ROIL","ROLL","ROME","ROOD","ROOF","ROOK","ROOM","ROOT","ROSA","ROSE","ROSS","ROSY","ROTH","ROUT","ROVE","ROWE","ROWS","RUBE","RUBY","RUDE","RUDY","RUIN","RULE","RUNG","RUNS","RUNT","RUSE","RUSH","RUSK","RUSS","RUST","RUTH","SACK","SAFE","SAGE","SAID","SAIL","SALE","SALK","SALT","SAME","SAND","SANE","SANG","SANK","SARA","SAUL","SAVE","SAYS","SCAN","SCAR","SCAT","SCOT","SEAL","SEAM","SEAR","SEAT","SEED","SEEK","SEEM","SEEN","SEES","SELF","SELL","SEND","SENT","SETS","SEWN","SHAG","SHAM","SHAW","SHAY","SHED","SHIM","SHIN","SHOD","SHOE","SHOT","SHOW","SHUN","SHUT","SICK","SIDE","SIFT","SIGH","SIGN","SILK","SILL","SILO","SILT","SINE","SING","SINK","SIRE","SITE","SITS","SITU","SKAT","SKEW","SKID","SKIM","SKIN","SKIT","SLAB","SLAM","SLAT","SLAY","SLED","SLEW","SLID","SLIM","SLIT","SLOB","SLOG","SLOT","SLOW","SLUG","SLUM","SLUR","SMOG","SMUG","SNAG","SNOB","SNOW","SNUB","SNUG","SOAK","SOAR","SOCK","SODA","SOFA","SOFT","SOIL","SOLD","SOME","SONG","SOON","SOOT","SORE","SORT","SOUL","SOUR","SOWN","STAB","STAG","STAN","STAR","STAY","STEM","STEW","STIR","STOW","STUB","STUN","SUCH","SUDS","SUIT","SULK","SUMS","SUNG","SUNK","SURE","SURF","SWAB","SWAG","SWAM","SWAN","SWAT","SWAY","SWIM","SWUM","TACK","TACT","TAIL","TAKE","TALE","TALK","TALL","TANK","TASK","TATE","TAUT","TEAL","TEAM","TEAR","TECH","TEEM","TEEN","TEET","TELL","TEND","TENT","TERM","TERN","TESS","TEST","THAN","THAT","THEE","THEM","THEN","THEY","THIN","THIS","THUD","THUG","TICK","TIDE","TIDY","TIED","TIER","TILE","TILL","TILT","TIME","TINA","TINE","TINT","TINY","TIRE","TOAD","TOGO","TOIL","TOLD","TOLL","TONE","TONG","TONY","TOOK","TOOL","TOOT","TORE","TORN","TOTE","TOUR","TOUT","TOWN","TRAG","TRAM","TRAY","TREE","TREK","TRIG","TRIM","TRIO","TROD","TROT","TROY","TRUE","TUBA","TUBE","TUCK","TUFT","TUNA","TUNE","TUNG","TURF","TURN","TUSK","TWIG","TWIN","TWIT","ULAN","UNIT","URGE","USED","USER","USES","UTAH","VAIL","VAIN","VALE","VARY","VASE","VAST","VEAL","VEDA","VEIL","VEIN","VEND","VENT","VERB","VERY","VETO","VICE","VIEW","VINE","VISE","VOID","VOLT","VOTE","WACK","WADE","WAGE","WAIL","WAIT","WAKE","WALE","WALK","WALL","WALT","WAND","WANE","WANG","WANT","WARD","WARM","WARN","WART","WASH","WAST","WATS","WATT","WAVE","WAVY","WAYS","WEAK","WEAL","WEAN","WEAR","WEED","WEEK","WEIR","WELD","WELL","WELT","WENT","WERE","WERT","WEST","WHAM","WHAT","WHEE","WHEN","WHET","WHOA","WHOM","WICK","WIFE","WILD","WILL","WIND","WINE","WING","WINK","WINO","WIRE","WISE","WISH","WITH","WOLF","WONT","WOOD","WOOL","WORD","WORE","WORK","WORM","WORN","WOVE","WRIT","WYNN","YALE","YANG","YANK","YARD","YARN","YAWL","YAWN","YEAH","YEAR","YELL","YOGA","YOKE"]');
|
24411
|
-
|
24412
23676
|
/***/ })
|
24413
23677
|
|
24414
23678
|
/******/ });
|