xrpl 2.0.2 → 2.0.3

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.
@@ -1930,7 +1930,7 @@ eval("\nvar Buffer = (__webpack_require__(/*! buffer */ \"../../node_modules/buf
1930
1930
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1931
1931
 
1932
1932
  "use strict";
1933
- eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidXAddress = exports.decodeXAddress = exports.xAddressToClassicAddress = exports.encodeXAddress = exports.classicAddressToXAddress = exports.isValidClassicAddress = exports.decodeAccountPublic = exports.encodeAccountPublic = exports.decodeNodePublic = exports.encodeNodePublic = exports.decodeAccountID = exports.encodeAccountID = exports.decodeSeed = exports.encodeSeed = exports.codec = void 0;\nconst xrp_codec_1 = __webpack_require__(/*! ./xrp-codec */ \"../../node_modules/ripple-address-codec/dist/xrp-codec.js\");\nObject.defineProperty(exports, \"codec\", ({ enumerable: true, get: function () { return xrp_codec_1.codec; } }));\nObject.defineProperty(exports, \"encodeSeed\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeSeed; } }));\nObject.defineProperty(exports, \"decodeSeed\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeSeed; } }));\nObject.defineProperty(exports, \"encodeAccountID\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeAccountID; } }));\nObject.defineProperty(exports, \"decodeAccountID\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeAccountID; } }));\nObject.defineProperty(exports, \"encodeNodePublic\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeNodePublic; } }));\nObject.defineProperty(exports, \"decodeNodePublic\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeNodePublic; } }));\nObject.defineProperty(exports, \"encodeAccountPublic\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeAccountPublic; } }));\nObject.defineProperty(exports, \"decodeAccountPublic\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeAccountPublic; } }));\nObject.defineProperty(exports, \"isValidClassicAddress\", ({ enumerable: true, get: function () { return xrp_codec_1.isValidClassicAddress; } }));\nconst assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nconst PREFIX_BYTES = {\n MAIN: Buffer.from([0x05, 0x44]),\n TEST: Buffer.from([0x04, 0x93]), // 4, 147\n};\nfunction classicAddressToXAddress(classicAddress, tag, test) {\n const accountId = (0, xrp_codec_1.decodeAccountID)(classicAddress);\n return encodeXAddress(accountId, tag, test);\n}\nexports.classicAddressToXAddress = classicAddressToXAddress;\nfunction encodeXAddress(accountId, tag, test) {\n if (accountId.length !== 20) {\n // RIPEMD160 is 160 bits = 20 bytes\n throw new Error('Account ID must be 20 bytes');\n }\n const MAX_32_BIT_UNSIGNED_INT = 4294967295;\n const flag = tag === false ? 0 : tag <= MAX_32_BIT_UNSIGNED_INT ? 1 : 2;\n if (flag === 2) {\n throw new Error('Invalid tag');\n }\n if (tag === false) {\n tag = 0;\n }\n const bytes = Buffer.concat([\n test ? PREFIX_BYTES.TEST : PREFIX_BYTES.MAIN,\n accountId,\n Buffer.from([\n flag,\n tag & 0xff,\n (tag >> 8) & 0xff,\n (tag >> 16) & 0xff,\n (tag >> 24) & 0xff,\n 0,\n 0,\n 0,\n 0, // four zero bytes (reserved for 64-bit tags)\n ]),\n ]);\n const xAddress = xrp_codec_1.codec.encodeChecked(bytes);\n return xAddress;\n}\nexports.encodeXAddress = encodeXAddress;\nfunction xAddressToClassicAddress(xAddress) {\n const { accountId, tag, test } = decodeXAddress(xAddress);\n const classicAddress = (0, xrp_codec_1.encodeAccountID)(accountId);\n return {\n classicAddress,\n tag,\n test,\n };\n}\nexports.xAddressToClassicAddress = xAddressToClassicAddress;\nfunction decodeXAddress(xAddress) {\n const decoded = xrp_codec_1.codec.decodeChecked(xAddress);\n const test = isBufferForTestAddress(decoded);\n const accountId = decoded.slice(2, 22);\n const tag = tagFromBuffer(decoded);\n return {\n accountId,\n tag,\n test,\n };\n}\nexports.decodeXAddress = decodeXAddress;\nfunction isBufferForTestAddress(buf) {\n const decodedPrefix = buf.slice(0, 2);\n if (PREFIX_BYTES.MAIN.equals(decodedPrefix)) {\n return false;\n }\n else if (PREFIX_BYTES.TEST.equals(decodedPrefix)) {\n return true;\n }\n else {\n throw new Error('Invalid X-address: bad prefix');\n }\n}\nfunction tagFromBuffer(buf) {\n const flag = buf[22];\n if (flag >= 2) {\n // No support for 64-bit tags at this time\n throw new Error('Unsupported X-address');\n }\n if (flag === 1) {\n // Little-endian to big-endian\n return buf[23] + buf[24] * 0x100 + buf[25] * 0x10000 + buf[26] * 0x1000000;\n }\n assert.strictEqual(flag, 0, 'flag must be zero to indicate no tag');\n assert.ok(Buffer.from('0000000000000000', 'hex').equals(buf.slice(23, 23 + 8)), 'remaining bytes must be zero');\n return false;\n}\nfunction isValidXAddress(xAddress) {\n try {\n decodeXAddress(xAddress);\n }\n catch (e) {\n return false;\n }\n return true;\n}\nexports.isValidXAddress = isValidXAddress;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/index.js?");
1933
+ eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidXAddress = exports.decodeXAddress = exports.xAddressToClassicAddress = exports.encodeXAddress = exports.classicAddressToXAddress = exports.isValidClassicAddress = exports.decodeAccountPublic = exports.encodeAccountPublic = exports.decodeNodePublic = exports.encodeNodePublic = exports.decodeAccountID = exports.encodeAccountID = exports.decodeSeed = exports.encodeSeed = exports.codec = void 0;\nconst assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nconst xrp_codec_1 = __webpack_require__(/*! ./xrp-codec */ \"../../node_modules/ripple-address-codec/dist/xrp-codec.js\");\nObject.defineProperty(exports, \"codec\", ({ enumerable: true, get: function () { return xrp_codec_1.codec; } }));\nObject.defineProperty(exports, \"encodeSeed\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeSeed; } }));\nObject.defineProperty(exports, \"decodeSeed\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeSeed; } }));\nObject.defineProperty(exports, \"encodeAccountID\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeAccountID; } }));\nObject.defineProperty(exports, \"decodeAccountID\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeAccountID; } }));\nObject.defineProperty(exports, \"encodeNodePublic\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeNodePublic; } }));\nObject.defineProperty(exports, \"decodeNodePublic\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeNodePublic; } }));\nObject.defineProperty(exports, \"encodeAccountPublic\", ({ enumerable: true, get: function () { return xrp_codec_1.encodeAccountPublic; } }));\nObject.defineProperty(exports, \"decodeAccountPublic\", ({ enumerable: true, get: function () { return xrp_codec_1.decodeAccountPublic; } }));\nObject.defineProperty(exports, \"isValidClassicAddress\", ({ enumerable: true, get: function () { return xrp_codec_1.isValidClassicAddress; } }));\nconst PREFIX_BYTES = {\n // 5, 68\n MAIN: Buffer.from([0x05, 0x44]),\n // 4, 147\n TEST: Buffer.from([0x04, 0x93]),\n};\nconst MAX_32_BIT_UNSIGNED_INT = 4294967295;\nfunction classicAddressToXAddress(classicAddress, tag, test) {\n const accountId = (0, xrp_codec_1.decodeAccountID)(classicAddress);\n return encodeXAddress(accountId, tag, test);\n}\nexports.classicAddressToXAddress = classicAddressToXAddress;\nfunction encodeXAddress(accountId, tag, test) {\n if (accountId.length !== 20) {\n // RIPEMD160 is 160 bits = 20 bytes\n throw new Error('Account ID must be 20 bytes');\n }\n if (tag > MAX_32_BIT_UNSIGNED_INT) {\n throw new Error('Invalid tag');\n }\n const theTag = tag === false ? 0 : tag;\n const flag = tag === false ? 0 : 1;\n /* eslint-disable no-bitwise ---\n * need to use bitwise operations here */\n const bytes = Buffer.concat([\n test ? PREFIX_BYTES.TEST : PREFIX_BYTES.MAIN,\n accountId,\n Buffer.from([\n // 0x00 if no tag, 0x01 if 32-bit tag\n flag,\n // first byte\n theTag & 0xff,\n // second byte\n (theTag >> 8) & 0xff,\n // third byte\n (theTag >> 16) & 0xff,\n // fourth byte\n (theTag >> 24) & 0xff,\n 0,\n 0,\n 0,\n // four zero bytes (reserved for 64-bit tags)\n 0,\n ]),\n ]);\n /* eslint-enable no-bitwise */\n return xrp_codec_1.codec.encodeChecked(bytes);\n}\nexports.encodeXAddress = encodeXAddress;\nfunction xAddressToClassicAddress(xAddress) {\n const { accountId, tag, test } = decodeXAddress(xAddress);\n const classicAddress = (0, xrp_codec_1.encodeAccountID)(accountId);\n return {\n classicAddress,\n tag,\n test,\n };\n}\nexports.xAddressToClassicAddress = xAddressToClassicAddress;\nfunction decodeXAddress(xAddress) {\n const decoded = xrp_codec_1.codec.decodeChecked(xAddress);\n const test = isBufferForTestAddress(decoded);\n const accountId = decoded.slice(2, 22);\n const tag = tagFromBuffer(decoded);\n return {\n accountId,\n tag,\n test,\n };\n}\nexports.decodeXAddress = decodeXAddress;\nfunction isBufferForTestAddress(buf) {\n const decodedPrefix = buf.slice(0, 2);\n if (PREFIX_BYTES.MAIN.equals(decodedPrefix)) {\n return false;\n }\n if (PREFIX_BYTES.TEST.equals(decodedPrefix)) {\n return true;\n }\n throw new Error('Invalid X-address: bad prefix');\n}\nfunction tagFromBuffer(buf) {\n const flag = buf[22];\n if (flag >= 2) {\n // No support for 64-bit tags at this time\n throw new Error('Unsupported X-address');\n }\n if (flag === 1) {\n // Little-endian to big-endian\n return buf[23] + buf[24] * 0x100 + buf[25] * 0x10000 + buf[26] * 0x1000000;\n }\n assert.strictEqual(flag, 0, 'flag must be zero to indicate no tag');\n assert.ok(Buffer.from('0000000000000000', 'hex').equals(buf.slice(23, 23 + 8)), 'remaining bytes must be zero');\n return false;\n}\nfunction isValidXAddress(xAddress) {\n try {\n decodeXAddress(xAddress);\n }\n catch (_error) {\n return false;\n }\n return true;\n}\nexports.isValidXAddress = isValidXAddress;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/index.js?");
1934
1934
 
1935
1935
  /***/ }),
1936
1936
 
@@ -1941,7 +1941,7 @@ eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \
1941
1941
  /***/ ((__unused_webpack_module, exports) => {
1942
1942
 
1943
1943
  "use strict";
1944
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.concatArgs = exports.seqEqual = void 0;\n/**\n * Check whether two sequences (e.g. arrays of numbers) are equal.\n *\n * @param arr1 One of the arrays to compare.\n * @param arr2 The other array to compare.\n */\nfunction seqEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\nexports.seqEqual = seqEqual;\n/**\n * Check whether a value is a sequence (e.g. array of numbers).\n *\n * @param val The value to check.\n */\nfunction isSequence(val) {\n return val.length !== undefined;\n}\n/**\n * Concatenate all `arguments` into a single array. Each argument can be either\n * a single element or a sequence, which has a `length` property and supports\n * element retrieval via sequence[ix].\n *\n * > concatArgs(1, [2, 3], Buffer.from([4,5]), new Uint8Array([6, 7]));\n * [1,2,3,4,5,6,7]\n *\n * @returns {number[]} Array of concatenated arguments\n */\nfunction concatArgs(...args) {\n const ret = [];\n args.forEach(function (arg) {\n if (isSequence(arg)) {\n for (let j = 0; j < arg.length; j++) {\n ret.push(arg[j]);\n }\n }\n else {\n ret.push(arg);\n }\n });\n return ret;\n}\nexports.concatArgs = concatArgs;\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/utils.js?");
1944
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.concatArgs = exports.seqEqual = void 0;\n/**\n * Check whether two sequences (e.g. Arrays of numbers) are equal.\n *\n * @param arr1 - One of the arrays to compare.\n * @param arr2 - The other array to compare.\n */\nfunction seqEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\nexports.seqEqual = seqEqual;\n/**\n * Check whether a value is a sequence (e.g. Array of numbers).\n *\n * @param val - The value to check.\n */\nfunction isSequence(val) {\n return val.length !== undefined;\n}\n/**\n * Concatenate all `arguments` into a single array. Each argument can be either\n * a single element or a sequence, which has a `length` property and supports\n * element retrieval via sequence[ix].\n *\n * > concatArgs(1, [2, 3], Buffer.from([4,5]), new Uint8Array([6, 7]));\n * [1,2,3,4,5,6,7]\n *\n * @returns Array of concatenated arguments\n */\nfunction concatArgs(...args) {\n const ret = [];\n args.forEach((arg) => {\n if (isSequence(arg)) {\n for (const j of arg) {\n ret.push(j);\n }\n }\n else {\n ret.push(arg);\n }\n });\n return ret;\n}\nexports.concatArgs = concatArgs;\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/utils.js?");
1945
1945
 
1946
1946
  /***/ }),
1947
1947
 
@@ -1952,7 +1952,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
1952
1952
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1953
1953
 
1954
1954
  "use strict";
1955
- eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\n/**\n * Codec class\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidClassicAddress = exports.decodeAccountPublic = exports.encodeAccountPublic = exports.encodeNodePublic = exports.decodeNodePublic = exports.decodeAddress = exports.decodeAccountID = exports.encodeAddress = exports.encodeAccountID = exports.decodeSeed = exports.encodeSeed = exports.codec = void 0;\nconst baseCodec = __webpack_require__(/*! base-x */ \"../../node_modules/base-x/src/index.js\");\nconst utils_1 = __webpack_require__(/*! ./utils */ \"../../node_modules/ripple-address-codec/dist/utils.js\");\nclass Codec {\n constructor(options) {\n this.sha256 = options.sha256;\n this.alphabet = options.alphabet;\n this.codec = baseCodec(this.alphabet);\n this.base = this.alphabet.length;\n }\n /**\n * Encoder.\n *\n * @param bytes Buffer of data to encode.\n * @param opts Options object including the version bytes and the expected length of the data to encode.\n */\n encode(bytes, opts) {\n const versions = opts.versions;\n return this.encodeVersioned(bytes, versions, opts.expectedLength);\n }\n encodeVersioned(bytes, versions, expectedLength) {\n if (expectedLength && bytes.length !== expectedLength) {\n throw new Error('unexpected_payload_length: bytes.length does not match expectedLength.' +\n ' Ensure that the bytes are a Buffer.');\n }\n return this.encodeChecked(Buffer.from((0, utils_1.concatArgs)(versions, bytes)));\n }\n encodeChecked(buffer) {\n const check = this.sha256(this.sha256(buffer)).slice(0, 4);\n return this.encodeRaw(Buffer.from((0, utils_1.concatArgs)(buffer, check)));\n }\n encodeRaw(bytes) {\n return this.codec.encode(bytes);\n }\n /**\n * Decoder.\n *\n * @param base58string Base58Check-encoded string to decode.\n * @param opts Options object including the version byte(s) and the expected length of the data after decoding.\n */\n decode(base58string, opts) {\n const versions = opts.versions;\n const types = opts.versionTypes;\n const withoutSum = this.decodeChecked(base58string);\n if (versions.length > 1 && !opts.expectedLength) {\n throw new Error('expectedLength is required because there are >= 2 possible versions');\n }\n const versionLengthGuess = typeof versions[0] === 'number' ? 1 : versions[0].length;\n const payloadLength = opts.expectedLength || withoutSum.length - versionLengthGuess;\n const versionBytes = withoutSum.slice(0, -payloadLength);\n const payload = withoutSum.slice(-payloadLength);\n for (let i = 0; i < versions.length; i++) {\n const version = Array.isArray(versions[i])\n ? versions[i]\n : [versions[i]];\n if ((0, utils_1.seqEqual)(versionBytes, version)) {\n return {\n version,\n bytes: payload,\n type: types ? types[i] : null,\n };\n }\n }\n throw new Error('version_invalid: version bytes do not match any of the provided version(s)');\n }\n decodeChecked(base58string) {\n const buffer = this.decodeRaw(base58string);\n if (buffer.length < 5) {\n throw new Error('invalid_input_size: decoded data must have length >= 5');\n }\n if (!this.verifyCheckSum(buffer)) {\n throw new Error('checksum_invalid');\n }\n return buffer.slice(0, -4);\n }\n decodeRaw(base58string) {\n return this.codec.decode(base58string);\n }\n verifyCheckSum(bytes) {\n const computed = this.sha256(this.sha256(bytes.slice(0, -4))).slice(0, 4);\n const checksum = bytes.slice(-4);\n return (0, utils_1.seqEqual)(computed, checksum);\n }\n}\n/**\n * XRP codec\n */\n// Pure JavaScript hash functions in the browser, native hash functions in Node.js\nconst createHash = __webpack_require__(/*! create-hash */ \"../../node_modules/create-hash/browser.js\");\n// base58 encodings: https://xrpl.org/base58-encodings.html\nconst ACCOUNT_ID = 0; // Account address (20 bytes)\nconst ACCOUNT_PUBLIC_KEY = 0x23; // Account public key (33 bytes)\nconst FAMILY_SEED = 0x21; // 33; Seed value (for secret keys) (16 bytes)\nconst NODE_PUBLIC = 0x1c; // 28; Validation public key (33 bytes)\nconst ED25519_SEED = [0x01, 0xe1, 0x4b]; // [1, 225, 75]\nconst codecOptions = {\n sha256: function (bytes) {\n return createHash('sha256').update(Buffer.from(bytes)).digest();\n },\n alphabet: 'rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz',\n};\nconst codecWithXrpAlphabet = new Codec(codecOptions);\nexports.codec = codecWithXrpAlphabet;\n// entropy is a Buffer of size 16\n// type is 'ed25519' or 'secp256k1'\nfunction encodeSeed(entropy, type) {\n if (entropy.length !== 16) {\n throw new Error('entropy must have length 16');\n }\n const opts = {\n expectedLength: 16,\n // for secp256k1, use `FAMILY_SEED`\n versions: type === 'ed25519' ? ED25519_SEED : [FAMILY_SEED],\n };\n // prefixes entropy with version bytes\n return codecWithXrpAlphabet.encode(entropy, opts);\n}\nexports.encodeSeed = encodeSeed;\nfunction decodeSeed(seed, opts = {\n versionTypes: ['ed25519', 'secp256k1'],\n versions: [ED25519_SEED, FAMILY_SEED],\n expectedLength: 16,\n}) {\n return codecWithXrpAlphabet.decode(seed, opts);\n}\nexports.decodeSeed = decodeSeed;\nfunction encodeAccountID(bytes) {\n const opts = { versions: [ACCOUNT_ID], expectedLength: 20 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeAccountID = encodeAccountID;\nexports.encodeAddress = encodeAccountID;\nfunction decodeAccountID(accountId) {\n const opts = { versions: [ACCOUNT_ID], expectedLength: 20 };\n return codecWithXrpAlphabet.decode(accountId, opts).bytes;\n}\nexports.decodeAccountID = decodeAccountID;\nexports.decodeAddress = decodeAccountID;\nfunction decodeNodePublic(base58string) {\n const opts = { versions: [NODE_PUBLIC], expectedLength: 33 };\n return codecWithXrpAlphabet.decode(base58string, opts).bytes;\n}\nexports.decodeNodePublic = decodeNodePublic;\nfunction encodeNodePublic(bytes) {\n const opts = { versions: [NODE_PUBLIC], expectedLength: 33 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeNodePublic = encodeNodePublic;\nfunction encodeAccountPublic(bytes) {\n const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeAccountPublic = encodeAccountPublic;\nfunction decodeAccountPublic(base58string) {\n const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 };\n return codecWithXrpAlphabet.decode(base58string, opts).bytes;\n}\nexports.decodeAccountPublic = decodeAccountPublic;\nfunction isValidClassicAddress(address) {\n try {\n decodeAccountID(address);\n }\n catch (e) {\n return false;\n }\n return true;\n}\nexports.isValidClassicAddress = isValidClassicAddress;\n//# sourceMappingURL=xrp-codec.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/xrp-codec.js?");
1955
+ eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\n/**\n * Codec class\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidClassicAddress = exports.decodeAccountPublic = exports.encodeAccountPublic = exports.encodeNodePublic = exports.decodeNodePublic = exports.decodeAddress = exports.decodeAccountID = exports.encodeAddress = exports.encodeAccountID = exports.decodeSeed = exports.encodeSeed = exports.codec = void 0;\nconst baseCodec = __webpack_require__(/*! base-x */ \"../../node_modules/base-x/src/index.js\");\nconst createHash = __webpack_require__(/*! create-hash */ \"../../node_modules/create-hash/browser.js\");\nconst utils_1 = __webpack_require__(/*! ./utils */ \"../../node_modules/ripple-address-codec/dist/utils.js\");\nclass Codec {\n constructor(options) {\n this.sha256 = options.sha256;\n this.alphabet = options.alphabet;\n this.codec = baseCodec(this.alphabet);\n this.base = this.alphabet.length;\n }\n /**\n * Encoder.\n *\n * @param bytes - Buffer of data to encode.\n * @param opts - Options object including the version bytes and the expected length of the data to encode.\n */\n encode(bytes, opts) {\n const versions = opts.versions;\n return this.encodeVersioned(bytes, versions, opts.expectedLength);\n }\n encodeVersioned(bytes, versions, expectedLength) {\n if (expectedLength && bytes.length !== expectedLength) {\n throw new Error('unexpected_payload_length: bytes.length does not match expectedLength.' +\n ' Ensure that the bytes are a Buffer.');\n }\n return this.encodeChecked(Buffer.from((0, utils_1.concatArgs)(versions, bytes)));\n }\n encodeChecked(buffer) {\n const check = this.sha256(this.sha256(buffer)).slice(0, 4);\n return this.encodeRaw(Buffer.from((0, utils_1.concatArgs)(buffer, check)));\n }\n encodeRaw(bytes) {\n return this.codec.encode(bytes);\n }\n /**\n * Decoder.\n *\n * @param base58string - Base58Check-encoded string to decode.\n * @param opts - Options object including the version byte(s) and the expected length of the data after decoding.\n */\n /* eslint-disable max-lines-per-function --\n * TODO refactor */\n decode(base58string, opts) {\n const versions = opts.versions;\n const types = opts.versionTypes;\n const withoutSum = this.decodeChecked(base58string);\n if (versions.length > 1 && !opts.expectedLength) {\n throw new Error('expectedLength is required because there are >= 2 possible versions');\n }\n const versionLengthGuess = typeof versions[0] === 'number' ? 1 : versions[0].length;\n const payloadLength = opts.expectedLength || withoutSum.length - versionLengthGuess;\n const versionBytes = withoutSum.slice(0, -payloadLength);\n const payload = withoutSum.slice(-payloadLength);\n for (let i = 0; i < versions.length; i++) {\n const version = Array.isArray(versions[i])\n ? versions[i]\n : [versions[i]];\n if ((0, utils_1.seqEqual)(versionBytes, version)) {\n return {\n version,\n bytes: payload,\n type: types ? types[i] : null,\n };\n }\n }\n throw new Error('version_invalid: version bytes do not match any of the provided version(s)');\n }\n /* eslint-enable max-lines-per-function */\n decodeChecked(base58string) {\n const buffer = this.decodeRaw(base58string);\n if (buffer.length < 5) {\n throw new Error('invalid_input_size: decoded data must have length >= 5');\n }\n if (!this.verifyCheckSum(buffer)) {\n throw new Error('checksum_invalid');\n }\n return buffer.slice(0, -4);\n }\n decodeRaw(base58string) {\n return this.codec.decode(base58string);\n }\n verifyCheckSum(bytes) {\n const computed = this.sha256(this.sha256(bytes.slice(0, -4))).slice(0, 4);\n const checksum = bytes.slice(-4);\n return (0, utils_1.seqEqual)(computed, checksum);\n }\n}\n/**\n * XRP codec\n */\n// base58 encodings: https://xrpl.org/base58-encodings.html\n// Account address (20 bytes)\nconst ACCOUNT_ID = 0;\n// Account public key (33 bytes)\nconst ACCOUNT_PUBLIC_KEY = 0x23;\n// 33; Seed value (for secret keys) (16 bytes)\nconst FAMILY_SEED = 0x21;\n// 28; Validation public key (33 bytes)\nconst NODE_PUBLIC = 0x1c;\n// [1, 225, 75]\nconst ED25519_SEED = [0x01, 0xe1, 0x4b];\nconst codecOptions = {\n sha256(bytes) {\n return createHash('sha256').update(Buffer.from(bytes)).digest();\n },\n alphabet: 'rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz',\n};\nconst codecWithXrpAlphabet = new Codec(codecOptions);\nexports.codec = codecWithXrpAlphabet;\n// entropy is a Buffer of size 16\n// type is 'ed25519' or 'secp256k1'\nfunction encodeSeed(entropy, type) {\n if (entropy.length !== 16) {\n throw new Error('entropy must have length 16');\n }\n const opts = {\n expectedLength: 16,\n // for secp256k1, use `FAMILY_SEED`\n versions: type === 'ed25519' ? ED25519_SEED : [FAMILY_SEED],\n };\n // prefixes entropy with version bytes\n return codecWithXrpAlphabet.encode(entropy, opts);\n}\nexports.encodeSeed = encodeSeed;\nfunction decodeSeed(seed, opts = {\n versionTypes: ['ed25519', 'secp256k1'],\n versions: [ED25519_SEED, FAMILY_SEED],\n expectedLength: 16,\n}) {\n return codecWithXrpAlphabet.decode(seed, opts);\n}\nexports.decodeSeed = decodeSeed;\nfunction encodeAccountID(bytes) {\n const opts = { versions: [ACCOUNT_ID], expectedLength: 20 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeAccountID = encodeAccountID;\n/* eslint-disable import/no-unused-modules ---\n * unclear why this is aliased but we should keep it in case someone else is\n * importing it with the aliased name */\nexports.encodeAddress = encodeAccountID;\n/* eslint-enable import/no-unused-modules */\nfunction decodeAccountID(accountId) {\n const opts = { versions: [ACCOUNT_ID], expectedLength: 20 };\n return codecWithXrpAlphabet.decode(accountId, opts).bytes;\n}\nexports.decodeAccountID = decodeAccountID;\n/* eslint-disable import/no-unused-modules ---\n * unclear why this is aliased but we should keep it in case someone else is\n * importing it with the aliased name */\nexports.decodeAddress = decodeAccountID;\n/* eslint-enable import/no-unused-modules */\nfunction decodeNodePublic(base58string) {\n const opts = { versions: [NODE_PUBLIC], expectedLength: 33 };\n return codecWithXrpAlphabet.decode(base58string, opts).bytes;\n}\nexports.decodeNodePublic = decodeNodePublic;\nfunction encodeNodePublic(bytes) {\n const opts = { versions: [NODE_PUBLIC], expectedLength: 33 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeNodePublic = encodeNodePublic;\nfunction encodeAccountPublic(bytes) {\n const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 };\n return codecWithXrpAlphabet.encode(bytes, opts);\n}\nexports.encodeAccountPublic = encodeAccountPublic;\nfunction decodeAccountPublic(base58string) {\n const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 };\n return codecWithXrpAlphabet.decode(base58string, opts).bytes;\n}\nexports.decodeAccountPublic = decodeAccountPublic;\nfunction isValidClassicAddress(address) {\n try {\n decodeAccountID(address);\n }\n catch (_error) {\n return false;\n }\n return true;\n}\nexports.isValidClassicAddress = isValidClassicAddress;\n//# sourceMappingURL=xrp-codec.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-address-codec/dist/xrp-codec.js?");
1956
1956
 
1957
1957
  /***/ }),
1958
1958
 
@@ -1985,7 +1985,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
1985
1985
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1986
1986
 
1987
1987
  "use strict";
1988
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionType = exports.TransactionResult = exports.LedgerEntryType = exports.Type = exports.Field = void 0;\nvar enums = __webpack_require__(/*! ./definitions.json */ \"../../node_modules/ripple-binary-codec/dist/enums/definitions.json\");\nvar serialized_type_1 = __webpack_require__(/*! ../types/serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar TYPE_WIDTH = 2;\nvar LEDGER_ENTRY_WIDTH = 2;\nvar TRANSACTION_TYPE_WIDTH = 2;\nvar TRANSACTION_RESULT_WIDTH = 1;\n/*\n * @brief: Serialize a field based on type_code and Field.nth\n */\nfunction fieldHeader(type, nth) {\n var header = [];\n if (type < 16) {\n if (nth < 16) {\n header.push((type << 4) | nth);\n }\n else {\n header.push(type << 4, nth);\n }\n }\n else if (nth < 16) {\n header.push(nth, type);\n }\n else {\n header.push(0, type, nth);\n }\n return buffer_1.Buffer.from(header);\n}\n/*\n * @brief: Bytes, name, and ordinal representing one type, ledger_type, transaction type, or result\n */\nvar Bytes = /** @class */ (function () {\n function Bytes(name, ordinal, ordinalWidth) {\n this.name = name;\n this.ordinal = ordinal;\n this.ordinalWidth = ordinalWidth;\n this.bytes = buffer_1.Buffer.alloc(ordinalWidth);\n for (var i = 0; i < ordinalWidth; i++) {\n this.bytes[ordinalWidth - i - 1] = (ordinal >>> (i * 8)) & 0xff;\n }\n }\n Bytes.prototype.toJSON = function () {\n return this.name;\n };\n Bytes.prototype.toBytesSink = function (sink) {\n sink.put(this.bytes);\n };\n Bytes.prototype.toBytes = function () {\n return this.bytes;\n };\n return Bytes;\n}());\n/*\n * @brief: Collection of Bytes objects, mapping bidirectionally\n */\nvar BytesLookup = /** @class */ (function () {\n function BytesLookup(types, ordinalWidth) {\n var _this = this;\n this.ordinalWidth = ordinalWidth;\n Object.entries(types).forEach(function (_a) {\n var k = _a[0], v = _a[1];\n _this[k] = new Bytes(k, v, ordinalWidth);\n _this[v.toString()] = _this[k];\n });\n }\n BytesLookup.prototype.from = function (value) {\n return value instanceof Bytes ? value : this[value];\n };\n BytesLookup.prototype.fromParser = function (parser) {\n return this.from(parser.readUIntN(this.ordinalWidth).toString());\n };\n return BytesLookup;\n}());\nfunction buildField(_a) {\n var name = _a[0], info = _a[1];\n var typeOrdinal = enums.TYPES[info.type];\n var field = fieldHeader(typeOrdinal, info.nth);\n return {\n name: name,\n nth: info.nth,\n isVariableLengthEncoded: info.isVLEncoded,\n isSerialized: info.isSerialized,\n isSigningField: info.isSigningField,\n ordinal: (typeOrdinal << 16) | info.nth,\n type: new Bytes(info.type, typeOrdinal, TYPE_WIDTH),\n header: field,\n associatedType: serialized_type_1.SerializedType, // For later assignment in ./types/index.js\n };\n}\n/*\n * @brief: The collection of all fields as defined in definitions.json\n */\nvar FieldLookup = /** @class */ (function () {\n function FieldLookup(fields) {\n var _this = this;\n fields.forEach(function (_a) {\n var k = _a[0], v = _a[1];\n _this[k] = buildField([k, v]);\n _this[_this[k].ordinal.toString()] = _this[k];\n });\n }\n FieldLookup.prototype.fromString = function (value) {\n return this[value];\n };\n return FieldLookup;\n}());\nvar Type = new BytesLookup(enums.TYPES, TYPE_WIDTH);\nexports.Type = Type;\nvar LedgerEntryType = new BytesLookup(enums.LEDGER_ENTRY_TYPES, LEDGER_ENTRY_WIDTH);\nexports.LedgerEntryType = LedgerEntryType;\nvar TransactionType = new BytesLookup(enums.TRANSACTION_TYPES, TRANSACTION_TYPE_WIDTH);\nexports.TransactionType = TransactionType;\nvar TransactionResult = new BytesLookup(enums.TRANSACTION_RESULTS, TRANSACTION_RESULT_WIDTH);\nexports.TransactionResult = TransactionResult;\nvar Field = new FieldLookup(enums.FIELDS);\nexports.Field = Field;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/enums/index.js?");
1988
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TransactionType = exports.TransactionResult = exports.LedgerEntryType = exports.Type = exports.Field = exports.Bytes = void 0;\nvar enums = __webpack_require__(/*! ./definitions.json */ \"../../node_modules/ripple-binary-codec/dist/enums/definitions.json\");\nvar serialized_type_1 = __webpack_require__(/*! ../types/serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar TYPE_WIDTH = 2;\nvar LEDGER_ENTRY_WIDTH = 2;\nvar TRANSACTION_TYPE_WIDTH = 2;\nvar TRANSACTION_RESULT_WIDTH = 1;\n/*\n * @brief: Serialize a field based on type_code and Field.nth\n */\nfunction fieldHeader(type, nth) {\n var header = [];\n if (type < 16) {\n if (nth < 16) {\n header.push((type << 4) | nth);\n }\n else {\n header.push(type << 4, nth);\n }\n }\n else if (nth < 16) {\n header.push(nth, type);\n }\n else {\n header.push(0, type, nth);\n }\n return buffer_1.Buffer.from(header);\n}\n/*\n * @brief: Bytes, name, and ordinal representing one type, ledger_type, transaction type, or result\n */\nvar Bytes = /** @class */ (function () {\n function Bytes(name, ordinal, ordinalWidth) {\n this.name = name;\n this.ordinal = ordinal;\n this.ordinalWidth = ordinalWidth;\n this.bytes = buffer_1.Buffer.alloc(ordinalWidth);\n for (var i = 0; i < ordinalWidth; i++) {\n this.bytes[ordinalWidth - i - 1] = (ordinal >>> (i * 8)) & 0xff;\n }\n }\n Bytes.prototype.toJSON = function () {\n return this.name;\n };\n Bytes.prototype.toBytesSink = function (sink) {\n sink.put(this.bytes);\n };\n Bytes.prototype.toBytes = function () {\n return this.bytes;\n };\n return Bytes;\n}());\nexports.Bytes = Bytes;\n/*\n * @brief: Collection of Bytes objects, mapping bidirectionally\n */\nvar BytesLookup = /** @class */ (function () {\n function BytesLookup(types, ordinalWidth) {\n var _this = this;\n this.ordinalWidth = ordinalWidth;\n Object.entries(types).forEach(function (_a) {\n var k = _a[0], v = _a[1];\n _this[k] = new Bytes(k, v, ordinalWidth);\n _this[v.toString()] = _this[k];\n });\n }\n BytesLookup.prototype.from = function (value) {\n return value instanceof Bytes ? value : this[value];\n };\n BytesLookup.prototype.fromParser = function (parser) {\n return this.from(parser.readUIntN(this.ordinalWidth).toString());\n };\n return BytesLookup;\n}());\nfunction buildField(_a) {\n var name = _a[0], info = _a[1];\n var typeOrdinal = enums.TYPES[info.type];\n var field = fieldHeader(typeOrdinal, info.nth);\n return {\n name: name,\n nth: info.nth,\n isVariableLengthEncoded: info.isVLEncoded,\n isSerialized: info.isSerialized,\n isSigningField: info.isSigningField,\n ordinal: (typeOrdinal << 16) | info.nth,\n type: new Bytes(info.type, typeOrdinal, TYPE_WIDTH),\n header: field,\n associatedType: serialized_type_1.SerializedType, // For later assignment in ./types/index.js\n };\n}\n/*\n * @brief: The collection of all fields as defined in definitions.json\n */\nvar FieldLookup = /** @class */ (function () {\n function FieldLookup(fields) {\n var _this = this;\n fields.forEach(function (_a) {\n var k = _a[0], v = _a[1];\n _this[k] = buildField([k, v]);\n _this[_this[k].ordinal.toString()] = _this[k];\n });\n }\n FieldLookup.prototype.fromString = function (value) {\n return this[value];\n };\n return FieldLookup;\n}());\nvar Type = new BytesLookup(enums.TYPES, TYPE_WIDTH);\nexports.Type = Type;\nvar LedgerEntryType = new BytesLookup(enums.LEDGER_ENTRY_TYPES, LEDGER_ENTRY_WIDTH);\nexports.LedgerEntryType = LedgerEntryType;\nvar TransactionType = new BytesLookup(enums.TRANSACTION_TYPES, TRANSACTION_TYPE_WIDTH);\nexports.TransactionType = TransactionType;\nvar TransactionResult = new BytesLookup(enums.TRANSACTION_RESULTS, TRANSACTION_RESULT_WIDTH);\nexports.TransactionResult = TransactionResult;\nvar Field = new FieldLookup(enums.FIELDS);\nexports.Field = Field;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/enums/index.js?");
1989
1989
 
1990
1990
  /***/ }),
1991
1991
 
@@ -2007,7 +2007,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
2007
2007
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2008
2008
 
2009
2009
  "use strict";
2010
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.transactionID = exports.sha512Half = exports.Sha512Half = void 0;\nvar hash_prefixes_1 = __webpack_require__(/*! ./hash-prefixes */ \"../../node_modules/ripple-binary-codec/dist/hash-prefixes.js\");\nvar createHash = __webpack_require__(/*! create-hash */ \"../../node_modules/create-hash/browser.js\");\nvar hash_256_1 = __webpack_require__(/*! ./types/hash-256 */ \"../../node_modules/ripple-binary-codec/dist/types/hash-256.js\");\nvar binary_serializer_1 = __webpack_require__(/*! ./serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\n/**\n * Class for hashing with SHA512\n * @extends BytesList So SerializedTypes can write bytes to a Sha512Half\n */\nvar Sha512Half = /** @class */ (function (_super) {\n __extends(Sha512Half, _super);\n function Sha512Half() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hash = createHash('sha512');\n return _this;\n }\n /**\n * Construct a new Sha512Hash and write bytes this.hash\n *\n * @param bytes bytes to write to this.hash\n * @returns the new Sha512Hash object\n */\n Sha512Half.put = function (bytes) {\n return new Sha512Half().put(bytes);\n };\n /**\n * Write bytes to an existing Sha512Hash\n *\n * @param bytes bytes to write to object\n * @returns the Sha512 object\n */\n Sha512Half.prototype.put = function (bytes) {\n this.hash.update(bytes);\n return this;\n };\n /**\n * Compute SHA512 hash and slice in half\n *\n * @returns half of a SHA512 hash\n */\n Sha512Half.prototype.finish256 = function () {\n var bytes = this.hash.digest();\n return bytes.slice(0, 32);\n };\n /**\n * Constructs a Hash256 from the Sha512Half object\n *\n * @returns a Hash256 object\n */\n Sha512Half.prototype.finish = function () {\n return new hash_256_1.Hash256(this.finish256());\n };\n return Sha512Half;\n}(binary_serializer_1.BytesList));\nexports.Sha512Half = Sha512Half;\n/**\n * compute SHA512 hash of a list of bytes\n *\n * @param args zero or more arguments to hash\n * @returns the sha512half hash of the arguments.\n */\nfunction sha512Half() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var hash = new Sha512Half();\n args.forEach(function (a) { return hash.put(a); });\n return hash.finish256();\n}\nexports.sha512Half = sha512Half;\n/**\n * Construct a transactionID from a Serialized Transaction\n *\n * @param serialized bytes to hash\n * @returns a Hash256 object\n */\nfunction transactionID(serialized) {\n return new hash_256_1.Hash256(sha512Half(hash_prefixes_1.HashPrefix.transactionID, serialized));\n}\nexports.transactionID = transactionID;\n//# sourceMappingURL=hashes.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/hashes.js?");
2010
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.transactionID = exports.sha512Half = exports.Sha512Half = void 0;\nvar hash_prefixes_1 = __webpack_require__(/*! ./hash-prefixes */ \"../../node_modules/ripple-binary-codec/dist/hash-prefixes.js\");\nvar createHash = __webpack_require__(/*! create-hash */ \"../../node_modules/create-hash/browser.js\");\nvar hash_256_1 = __webpack_require__(/*! ./types/hash-256 */ \"../../node_modules/ripple-binary-codec/dist/types/hash-256.js\");\nvar binary_serializer_1 = __webpack_require__(/*! ./serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Class for hashing with SHA512\n * @extends BytesList So SerializedTypes can write bytes to a Sha512Half\n */\nvar Sha512Half = /** @class */ (function (_super) {\n __extends(Sha512Half, _super);\n function Sha512Half() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hash = createHash('sha512');\n return _this;\n }\n /**\n * Construct a new Sha512Hash and write bytes this.hash\n *\n * @param bytes bytes to write to this.hash\n * @returns the new Sha512Hash object\n */\n Sha512Half.put = function (bytes) {\n return new Sha512Half().put(bytes);\n };\n /**\n * Write bytes to an existing Sha512Hash\n *\n * @param bytes bytes to write to object\n * @returns the Sha512 object\n */\n Sha512Half.prototype.put = function (bytes) {\n this.hash.update(bytes);\n return this;\n };\n /**\n * Compute SHA512 hash and slice in half\n *\n * @returns half of a SHA512 hash\n */\n Sha512Half.prototype.finish256 = function () {\n return buffer_1.Buffer.from(this.hash.digest().slice(0, 32));\n };\n /**\n * Constructs a Hash256 from the Sha512Half object\n *\n * @returns a Hash256 object\n */\n Sha512Half.prototype.finish = function () {\n return new hash_256_1.Hash256(this.finish256());\n };\n return Sha512Half;\n}(binary_serializer_1.BytesList));\nexports.Sha512Half = Sha512Half;\n/**\n * compute SHA512 hash of a list of bytes\n *\n * @param args zero or more arguments to hash\n * @returns the sha512half hash of the arguments.\n */\nfunction sha512Half() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var hash = new Sha512Half();\n args.forEach(function (a) { return hash.put(a); });\n return hash.finish256();\n}\nexports.sha512Half = sha512Half;\n/**\n * Construct a transactionID from a Serialized Transaction\n *\n * @param serialized bytes to hash\n * @returns a Hash256 object\n */\nfunction transactionID(serialized) {\n return new hash_256_1.Hash256(sha512Half(hash_prefixes_1.HashPrefix.transactionID, serialized));\n}\nexports.transactionID = transactionID;\n//# sourceMappingURL=hashes.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/hashes.js?");
2011
2011
 
2012
2012
  /***/ }),
2013
2013
 
@@ -2040,7 +2040,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
2040
2040
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2041
2041
 
2042
2042
  "use strict";
2043
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.quality = void 0;\nvar types_1 = __webpack_require__(/*! ./types */ \"../../node_modules/ripple-binary-codec/dist/types/index.js\");\nvar decimal_js_1 = __webpack_require__(/*! decimal.js */ \"../../node_modules/decimal.js/decimal.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * class for encoding and decoding quality\n */\nvar quality = /** @class */ (function () {\n function quality() {\n }\n /**\n * Encode quality amount\n *\n * @param arg string representation of an amount\n * @returns Serialized quality\n */\n quality.encode = function (quality) {\n var decimal = new decimal_js_1.Decimal(quality);\n var exponent = decimal.e - 15;\n var qualityString = decimal.times(\"1e\" + -exponent).abs().toString();\n var bytes = types_1.coreTypes.UInt64.from(bigInt(qualityString)).toBytes();\n bytes[0] = exponent + 100;\n return bytes;\n };\n /**\n * Decode quality amount\n *\n * @param arg hex-string denoting serialized quality\n * @returns deserialized quality\n */\n quality.decode = function (quality) {\n var bytes = buffer_1.Buffer.from(quality, 'hex').slice(-8);\n var exponent = bytes[0] - 100;\n var mantissa = new decimal_js_1.Decimal(\"0x\" + bytes.slice(1).toString('hex'));\n return mantissa.times(\"1e\" + exponent);\n };\n return quality;\n}());\nexports.quality = quality;\n//# sourceMappingURL=quality.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/quality.js?");
2043
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.quality = void 0;\nvar types_1 = __webpack_require__(/*! ./types */ \"../../node_modules/ripple-binary-codec/dist/types/index.js\");\nvar decimal_js_1 = __webpack_require__(/*! decimal.js */ \"../../node_modules/decimal.js/decimal.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * class for encoding and decoding quality\n */\nvar quality = /** @class */ (function () {\n function quality() {\n }\n /**\n * Encode quality amount\n *\n * @param arg string representation of an amount\n * @returns Serialized quality\n */\n quality.encode = function (quality) {\n var decimal = new decimal_js_1.Decimal(quality);\n var exponent = decimal.e - 15;\n var qualityString = decimal.times(\"1e\".concat(-exponent)).abs().toString();\n var bytes = types_1.coreTypes.UInt64.from(bigInt(qualityString)).toBytes();\n bytes[0] = exponent + 100;\n return bytes;\n };\n /**\n * Decode quality amount\n *\n * @param arg hex-string denoting serialized quality\n * @returns deserialized quality\n */\n quality.decode = function (quality) {\n var bytes = buffer_1.Buffer.from(quality, 'hex').slice(-8);\n var exponent = bytes[0] - 100;\n var mantissa = new decimal_js_1.Decimal(\"0x\".concat(bytes.slice(1).toString('hex')));\n return mantissa.times(\"1e\".concat(exponent));\n };\n return quality;\n}());\nexports.quality = quality;\n//# sourceMappingURL=quality.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/quality.js?");
2044
2044
 
2045
2045
  /***/ }),
2046
2046
 
@@ -2051,7 +2051,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
2051
2051
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2052
2052
 
2053
2053
  "use strict";
2054
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BinaryParser = void 0;\nvar assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nvar enums_1 = __webpack_require__(/*! ../enums */ \"../../node_modules/ripple-binary-codec/dist/enums/index.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * BinaryParser is used to compute fields and values from a HexString\n */\nvar BinaryParser = /** @class */ (function () {\n /**\n * Initialize bytes to a hex string\n *\n * @param hexBytes a hex string\n */\n function BinaryParser(hexBytes) {\n this.bytes = buffer_1.Buffer.from(hexBytes, 'hex');\n }\n /**\n * Peek the first byte of the BinaryParser\n *\n * @returns The first byte of the BinaryParser\n */\n BinaryParser.prototype.peek = function () {\n assert.ok(this.bytes.byteLength !== 0);\n return this.bytes[0];\n };\n /**\n * Consume the first n bytes of the BinaryParser\n *\n * @param n the number of bytes to skip\n */\n BinaryParser.prototype.skip = function (n) {\n assert.ok(n <= this.bytes.byteLength);\n this.bytes = this.bytes.slice(n);\n };\n /**\n * read the first n bytes from the BinaryParser\n *\n * @param n The number of bytes to read\n * @return The bytes\n */\n BinaryParser.prototype.read = function (n) {\n assert.ok(n <= this.bytes.byteLength);\n var slice = this.bytes.slice(0, n);\n this.skip(n);\n return slice;\n };\n /**\n * Read an integer of given size\n *\n * @param n The number of bytes to read\n * @return The number represented by those bytes\n */\n BinaryParser.prototype.readUIntN = function (n) {\n assert.ok(0 < n && n <= 4, 'invalid n');\n return this.read(n).reduce(function (a, b) { return (a << 8) | b; }) >>> 0;\n };\n BinaryParser.prototype.readUInt8 = function () {\n return this.readUIntN(1);\n };\n BinaryParser.prototype.readUInt16 = function () {\n return this.readUIntN(2);\n };\n BinaryParser.prototype.readUInt32 = function () {\n return this.readUIntN(4);\n };\n BinaryParser.prototype.size = function () {\n return this.bytes.byteLength;\n };\n BinaryParser.prototype.end = function (customEnd) {\n var length = this.bytes.byteLength;\n return length === 0 || (customEnd !== undefined && length <= customEnd);\n };\n /**\n * Reads variable length encoded bytes\n *\n * @return The variable length bytes\n */\n BinaryParser.prototype.readVariableLength = function () {\n return this.read(this.readVariableLengthLength());\n };\n /**\n * Reads the length of the variable length encoded bytes\n *\n * @return The length of the variable length encoded bytes\n */\n BinaryParser.prototype.readVariableLengthLength = function () {\n var b1 = this.readUInt8();\n if (b1 <= 192) {\n return b1;\n }\n else if (b1 <= 240) {\n var b2 = this.readUInt8();\n return 193 + (b1 - 193) * 256 + b2;\n }\n else if (b1 <= 254) {\n var b2 = this.readUInt8();\n var b3 = this.readUInt8();\n return 12481 + (b1 - 241) * 65536 + b2 * 256 + b3;\n }\n throw new Error('Invalid variable length indicator');\n };\n /**\n * Reads the field ordinal from the BinaryParser\n *\n * @return Field ordinal\n */\n BinaryParser.prototype.readFieldOrdinal = function () {\n var type = this.readUInt8();\n var nth = type & 15;\n type >>= 4;\n if (type === 0) {\n type = this.readUInt8();\n if (type === 0 || type < 16) {\n throw new Error('Cannot read FieldOrdinal, type_code out of range');\n }\n }\n if (nth === 0) {\n nth = this.readUInt8();\n if (nth === 0 || nth < 16) {\n throw new Error('Cannot read FieldOrdinal, field_code out of range');\n }\n }\n return (type << 16) | nth;\n };\n /**\n * Read the field from the BinaryParser\n *\n * @return The field represented by the bytes at the head of the BinaryParser\n */\n BinaryParser.prototype.readField = function () {\n return enums_1.Field.fromString(this.readFieldOrdinal().toString());\n };\n /**\n * Read a given type from the BinaryParser\n *\n * @param type The type that you want to read from the BinaryParser\n * @return The instance of that type read from the BinaryParser\n */\n BinaryParser.prototype.readType = function (type) {\n return type.fromParser(this);\n };\n /**\n * Get the type associated with a given field\n *\n * @param field The field that you wan to get the type of\n * @return The type associated with the given field\n */\n BinaryParser.prototype.typeForField = function (field) {\n return field.associatedType;\n };\n /**\n * Read value of the type specified by field from the BinaryParser\n *\n * @param field The field that you want to get the associated value for\n * @return The value associated with the given field\n */\n BinaryParser.prototype.readFieldValue = function (field) {\n var type = this.typeForField(field);\n if (!type) {\n throw new Error(\"unsupported: (\" + field.name + \", \" + field.type.name + \")\");\n }\n var sizeHint = field.isVariableLengthEncoded\n ? this.readVariableLengthLength()\n : undefined;\n var value = type.fromParser(this, sizeHint);\n if (value === undefined) {\n throw new Error(\"fromParser for (\" + field.name + \", \" + field.type.name + \") -> undefined \");\n }\n return value;\n };\n /**\n * Get the next field and value from the BinaryParser\n *\n * @return The field and value\n */\n BinaryParser.prototype.readFieldAndValue = function () {\n var field = this.readField();\n return [field, this.readFieldValue(field)];\n };\n return BinaryParser;\n}());\nexports.BinaryParser = BinaryParser;\n//# sourceMappingURL=binary-parser.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js?");
2054
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BinaryParser = void 0;\nvar assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nvar enums_1 = __webpack_require__(/*! ../enums */ \"../../node_modules/ripple-binary-codec/dist/enums/index.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * BinaryParser is used to compute fields and values from a HexString\n */\nvar BinaryParser = /** @class */ (function () {\n /**\n * Initialize bytes to a hex string\n *\n * @param hexBytes a hex string\n */\n function BinaryParser(hexBytes) {\n this.bytes = buffer_1.Buffer.from(hexBytes, 'hex');\n }\n /**\n * Peek the first byte of the BinaryParser\n *\n * @returns The first byte of the BinaryParser\n */\n BinaryParser.prototype.peek = function () {\n assert.ok(this.bytes.byteLength !== 0);\n return this.bytes[0];\n };\n /**\n * Consume the first n bytes of the BinaryParser\n *\n * @param n the number of bytes to skip\n */\n BinaryParser.prototype.skip = function (n) {\n assert.ok(n <= this.bytes.byteLength);\n this.bytes = this.bytes.slice(n);\n };\n /**\n * read the first n bytes from the BinaryParser\n *\n * @param n The number of bytes to read\n * @return The bytes\n */\n BinaryParser.prototype.read = function (n) {\n assert.ok(n <= this.bytes.byteLength);\n var slice = this.bytes.slice(0, n);\n this.skip(n);\n return slice;\n };\n /**\n * Read an integer of given size\n *\n * @param n The number of bytes to read\n * @return The number represented by those bytes\n */\n BinaryParser.prototype.readUIntN = function (n) {\n assert.ok(0 < n && n <= 4, 'invalid n');\n return this.read(n).reduce(function (a, b) { return (a << 8) | b; }) >>> 0;\n };\n BinaryParser.prototype.readUInt8 = function () {\n return this.readUIntN(1);\n };\n BinaryParser.prototype.readUInt16 = function () {\n return this.readUIntN(2);\n };\n BinaryParser.prototype.readUInt32 = function () {\n return this.readUIntN(4);\n };\n BinaryParser.prototype.size = function () {\n return this.bytes.byteLength;\n };\n BinaryParser.prototype.end = function (customEnd) {\n var length = this.bytes.byteLength;\n return length === 0 || (customEnd !== undefined && length <= customEnd);\n };\n /**\n * Reads variable length encoded bytes\n *\n * @return The variable length bytes\n */\n BinaryParser.prototype.readVariableLength = function () {\n return this.read(this.readVariableLengthLength());\n };\n /**\n * Reads the length of the variable length encoded bytes\n *\n * @return The length of the variable length encoded bytes\n */\n BinaryParser.prototype.readVariableLengthLength = function () {\n var b1 = this.readUInt8();\n if (b1 <= 192) {\n return b1;\n }\n else if (b1 <= 240) {\n var b2 = this.readUInt8();\n return 193 + (b1 - 193) * 256 + b2;\n }\n else if (b1 <= 254) {\n var b2 = this.readUInt8();\n var b3 = this.readUInt8();\n return 12481 + (b1 - 241) * 65536 + b2 * 256 + b3;\n }\n throw new Error('Invalid variable length indicator');\n };\n /**\n * Reads the field ordinal from the BinaryParser\n *\n * @return Field ordinal\n */\n BinaryParser.prototype.readFieldOrdinal = function () {\n var type = this.readUInt8();\n var nth = type & 15;\n type >>= 4;\n if (type === 0) {\n type = this.readUInt8();\n if (type === 0 || type < 16) {\n throw new Error('Cannot read FieldOrdinal, type_code out of range');\n }\n }\n if (nth === 0) {\n nth = this.readUInt8();\n if (nth === 0 || nth < 16) {\n throw new Error('Cannot read FieldOrdinal, field_code out of range');\n }\n }\n return (type << 16) | nth;\n };\n /**\n * Read the field from the BinaryParser\n *\n * @return The field represented by the bytes at the head of the BinaryParser\n */\n BinaryParser.prototype.readField = function () {\n return enums_1.Field.fromString(this.readFieldOrdinal().toString());\n };\n /**\n * Read a given type from the BinaryParser\n *\n * @param type The type that you want to read from the BinaryParser\n * @return The instance of that type read from the BinaryParser\n */\n BinaryParser.prototype.readType = function (type) {\n return type.fromParser(this);\n };\n /**\n * Get the type associated with a given field\n *\n * @param field The field that you wan to get the type of\n * @return The type associated with the given field\n */\n BinaryParser.prototype.typeForField = function (field) {\n return field.associatedType;\n };\n /**\n * Read value of the type specified by field from the BinaryParser\n *\n * @param field The field that you want to get the associated value for\n * @return The value associated with the given field\n */\n BinaryParser.prototype.readFieldValue = function (field) {\n var type = this.typeForField(field);\n if (!type) {\n throw new Error(\"unsupported: (\".concat(field.name, \", \").concat(field.type.name, \")\"));\n }\n var sizeHint = field.isVariableLengthEncoded\n ? this.readVariableLengthLength()\n : undefined;\n var value = type.fromParser(this, sizeHint);\n if (value === undefined) {\n throw new Error(\"fromParser for (\".concat(field.name, \", \").concat(field.type.name, \") -> undefined \"));\n }\n return value;\n };\n /**\n * Get the next field and value from the BinaryParser\n *\n * @return The field and value\n */\n BinaryParser.prototype.readFieldAndValue = function () {\n var field = this.readField();\n return [field, this.readFieldValue(field)];\n };\n return BinaryParser;\n}());\nexports.BinaryParser = BinaryParser;\n//# sourceMappingURL=binary-parser.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js?");
2055
2055
 
2056
2056
  /***/ }),
2057
2057
 
@@ -2062,7 +2062,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
2062
2062
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2063
2063
 
2064
2064
  "use strict";
2065
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BinarySerializer = exports.BytesList = void 0;\nvar assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Bytes list is a collection of buffer objects\n */\nvar BytesList = /** @class */ (function () {\n function BytesList() {\n this.bytesArray = [];\n }\n /**\n * Get the total number of bytes in the BytesList\n *\n * @return the number of bytes\n */\n BytesList.prototype.getLength = function () {\n return buffer_1.Buffer.concat(this.bytesArray).byteLength;\n };\n /**\n * Put bytes in the BytesList\n *\n * @param bytesArg A Buffer\n * @return this BytesList\n */\n BytesList.prototype.put = function (bytesArg) {\n var bytes = buffer_1.Buffer.from(bytesArg); // Temporary, to catch instances of Uint8Array being passed in\n this.bytesArray.push(bytes);\n return this;\n };\n /**\n * Write this BytesList to the back of another bytes list\n *\n * @param list The BytesList to write to\n */\n BytesList.prototype.toBytesSink = function (list) {\n list.put(this.toBytes());\n };\n BytesList.prototype.toBytes = function () {\n return buffer_1.Buffer.concat(this.bytesArray);\n };\n BytesList.prototype.toHex = function () {\n return this.toBytes().toString('hex').toUpperCase();\n };\n return BytesList;\n}());\nexports.BytesList = BytesList;\n/**\n * BinarySerializer is used to write fields and values to buffers\n */\nvar BinarySerializer = /** @class */ (function () {\n function BinarySerializer(sink) {\n this.sink = new BytesList();\n this.sink = sink;\n }\n /**\n * Write a value to this BinarySerializer\n *\n * @param value a SerializedType value\n */\n BinarySerializer.prototype.write = function (value) {\n value.toBytesSink(this.sink);\n };\n /**\n * Write bytes to this BinarySerializer\n *\n * @param bytes the bytes to write\n */\n BinarySerializer.prototype.put = function (bytes) {\n this.sink.put(bytes);\n };\n /**\n * Write a value of a given type to this BinarySerializer\n *\n * @param type the type to write\n * @param value a value of that type\n */\n BinarySerializer.prototype.writeType = function (type, value) {\n this.write(type.from(value));\n };\n /**\n * Write BytesList to this BinarySerializer\n *\n * @param bl BytesList to write to BinarySerializer\n */\n BinarySerializer.prototype.writeBytesList = function (bl) {\n bl.toBytesSink(this.sink);\n };\n /**\n * Calculate the header of Variable Length encoded bytes\n *\n * @param length the length of the bytes\n */\n BinarySerializer.prototype.encodeVariableLength = function (length) {\n var lenBytes = buffer_1.Buffer.alloc(3);\n if (length <= 192) {\n lenBytes[0] = length;\n return lenBytes.slice(0, 1);\n }\n else if (length <= 12480) {\n length -= 193;\n lenBytes[0] = 193 + (length >>> 8);\n lenBytes[1] = length & 0xff;\n return lenBytes.slice(0, 2);\n }\n else if (length <= 918744) {\n length -= 12481;\n lenBytes[0] = 241 + (length >>> 16);\n lenBytes[1] = (length >> 8) & 0xff;\n lenBytes[2] = length & 0xff;\n return lenBytes.slice(0, 3);\n }\n throw new Error('Overflow error');\n };\n /**\n * Write field and value to BinarySerializer\n *\n * @param field field to write to BinarySerializer\n * @param value value to write to BinarySerializer\n */\n BinarySerializer.prototype.writeFieldAndValue = function (field, value) {\n var associatedValue = field.associatedType.from(value);\n assert.ok(associatedValue.toBytesSink !== undefined);\n assert.ok(field.name !== undefined);\n this.sink.put(field.header);\n if (field.isVariableLengthEncoded) {\n this.writeLengthEncoded(associatedValue);\n }\n else {\n associatedValue.toBytesSink(this.sink);\n }\n };\n /**\n * Write a variable length encoded value to the BinarySerializer\n *\n * @param value length encoded value to write to BytesList\n */\n BinarySerializer.prototype.writeLengthEncoded = function (value) {\n var bytes = new BytesList();\n value.toBytesSink(bytes);\n this.put(this.encodeVariableLength(bytes.getLength()));\n this.writeBytesList(bytes);\n };\n return BinarySerializer;\n}());\nexports.BinarySerializer = BinarySerializer;\n//# sourceMappingURL=binary-serializer.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js?");
2065
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BinarySerializer = exports.BytesList = void 0;\nvar assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Bytes list is a collection of buffer objects\n */\nvar BytesList = /** @class */ (function () {\n function BytesList() {\n this.bytesArray = [];\n }\n /**\n * Get the total number of bytes in the BytesList\n *\n * @return the number of bytes\n */\n BytesList.prototype.getLength = function () {\n return buffer_1.Buffer.concat(this.bytesArray).byteLength;\n };\n /**\n * Put bytes in the BytesList\n *\n * @param bytesArg A Buffer\n * @return this BytesList\n */\n BytesList.prototype.put = function (bytesArg) {\n var bytes = buffer_1.Buffer.from(bytesArg); // Temporary, to catch instances of Uint8Array being passed in\n this.bytesArray.push(bytes);\n return this;\n };\n /**\n * Write this BytesList to the back of another bytes list\n *\n * @param list The BytesList to write to\n */\n BytesList.prototype.toBytesSink = function (list) {\n list.put(this.toBytes());\n };\n BytesList.prototype.toBytes = function () {\n return buffer_1.Buffer.concat(this.bytesArray);\n };\n BytesList.prototype.toHex = function () {\n return this.toBytes().toString('hex').toUpperCase();\n };\n return BytesList;\n}());\nexports.BytesList = BytesList;\n/**\n * BinarySerializer is used to write fields and values to buffers\n */\nvar BinarySerializer = /** @class */ (function () {\n function BinarySerializer(sink) {\n this.sink = new BytesList();\n this.sink = sink;\n }\n /**\n * Write a value to this BinarySerializer\n *\n * @param value a SerializedType value\n */\n BinarySerializer.prototype.write = function (value) {\n value.toBytesSink(this.sink);\n };\n /**\n * Write bytes to this BinarySerializer\n *\n * @param bytes the bytes to write\n */\n BinarySerializer.prototype.put = function (bytes) {\n this.sink.put(bytes);\n };\n /**\n * Write a value of a given type to this BinarySerializer\n *\n * @param type the type to write\n * @param value a value of that type\n */\n BinarySerializer.prototype.writeType = function (type, value) {\n this.write(type.from(value));\n };\n /**\n * Write BytesList to this BinarySerializer\n *\n * @param bl BytesList to write to BinarySerializer\n */\n BinarySerializer.prototype.writeBytesList = function (bl) {\n bl.toBytesSink(this.sink);\n };\n /**\n * Calculate the header of Variable Length encoded bytes\n *\n * @param length the length of the bytes\n */\n BinarySerializer.prototype.encodeVariableLength = function (length) {\n var lenBytes = buffer_1.Buffer.alloc(3);\n if (length <= 192) {\n lenBytes[0] = length;\n return lenBytes.slice(0, 1);\n }\n else if (length <= 12480) {\n length -= 193;\n lenBytes[0] = 193 + (length >>> 8);\n lenBytes[1] = length & 0xff;\n return lenBytes.slice(0, 2);\n }\n else if (length <= 918744) {\n length -= 12481;\n lenBytes[0] = 241 + (length >>> 16);\n lenBytes[1] = (length >> 8) & 0xff;\n lenBytes[2] = length & 0xff;\n return lenBytes.slice(0, 3);\n }\n throw new Error('Overflow error');\n };\n /**\n * Write field and value to BinarySerializer\n *\n * @param field field to write to BinarySerializer\n * @param value value to write to BinarySerializer\n */\n BinarySerializer.prototype.writeFieldAndValue = function (field, value, isUnlModifyWorkaround) {\n if (isUnlModifyWorkaround === void 0) { isUnlModifyWorkaround = false; }\n var associatedValue = field.associatedType.from(value);\n assert.ok(associatedValue.toBytesSink !== undefined);\n assert.ok(field.name !== undefined);\n this.sink.put(field.header);\n if (field.isVariableLengthEncoded) {\n this.writeLengthEncoded(associatedValue, isUnlModifyWorkaround);\n }\n else {\n associatedValue.toBytesSink(this.sink);\n }\n };\n /**\n * Write a variable length encoded value to the BinarySerializer\n *\n * @param value length encoded value to write to BytesList\n */\n BinarySerializer.prototype.writeLengthEncoded = function (value, isUnlModifyWorkaround) {\n if (isUnlModifyWorkaround === void 0) { isUnlModifyWorkaround = false; }\n var bytes = new BytesList();\n if (!isUnlModifyWorkaround) {\n // this part doesn't happen for the Account field in a UNLModify transaction\n value.toBytesSink(bytes);\n }\n this.put(this.encodeVariableLength(bytes.getLength()));\n this.writeBytesList(bytes);\n };\n return BinarySerializer;\n}());\nexports.BinarySerializer = BinarySerializer;\n//# sourceMappingURL=binary-serializer.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js?");
2066
2066
 
2067
2067
  /***/ }),
2068
2068
 
@@ -2095,7 +2095,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2095
2095
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2096
2096
 
2097
2097
  "use strict";
2098
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Amount = void 0;\nvar decimal_js_1 = __webpack_require__(/*! decimal.js */ \"../../node_modules/decimal.js/decimal.js\");\nvar binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js\");\nvar account_id_1 = __webpack_require__(/*! ./account-id */ \"../../node_modules/ripple-binary-codec/dist/types/account-id.js\");\nvar currency_1 = __webpack_require__(/*! ./currency */ \"../../node_modules/ripple-binary-codec/dist/types/currency.js\");\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Constants for validating amounts\n */\nvar MIN_IOU_EXPONENT = -96;\nvar MAX_IOU_EXPONENT = 80;\nvar MAX_IOU_PRECISION = 16;\nvar MAX_DROPS = new decimal_js_1.Decimal('1e17');\nvar MIN_XRP = new decimal_js_1.Decimal('1e-6');\nvar mask = bigInt(0x00000000ffffffff);\n/**\n * decimal.js configuration for Amount IOUs\n */\ndecimal_js_1.Decimal.config({\n toExpPos: MAX_IOU_EXPONENT + MAX_IOU_PRECISION,\n toExpNeg: MIN_IOU_EXPONENT - MAX_IOU_PRECISION,\n});\n/**\n * Type guard for AmountObject\n */\nfunction isAmountObject(arg) {\n var keys = Object.keys(arg).sort();\n return (keys.length === 3 &&\n keys[0] === 'currency' &&\n keys[1] === 'issuer' &&\n keys[2] === 'value');\n}\n/**\n * Class for serializing/Deserializing Amounts\n */\nvar Amount = /** @class */ (function (_super) {\n __extends(Amount, _super);\n function Amount(bytes) {\n return _super.call(this, bytes !== null && bytes !== void 0 ? bytes : Amount.defaultAmount.bytes) || this;\n }\n /**\n * Construct an amount from an IOU or string amount\n *\n * @param value An Amount, object representing an IOU, or a string\n * representing an integer amount\n * @returns An Amount object\n */\n Amount.from = function (value) {\n if (value instanceof Amount) {\n return value;\n }\n var amount = buffer_1.Buffer.alloc(8);\n if (typeof value === 'string') {\n Amount.assertXrpIsValid(value);\n var number = bigInt(value);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(number.and(mask)), 0);\n amount = buffer_1.Buffer.concat(intBuf);\n amount[0] |= 0x40;\n return new Amount(amount);\n }\n if (isAmountObject(value)) {\n var number = new decimal_js_1.Decimal(value.value);\n Amount.assertIouIsValid(number);\n if (number.isZero()) {\n amount[0] |= 0x80;\n }\n else {\n var integerNumberString = number\n .times(\"1e\" + -(number.e - 15))\n .abs()\n .toString();\n var num = bigInt(integerNumberString);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(num.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(num.and(mask)), 0);\n amount = buffer_1.Buffer.concat(intBuf);\n amount[0] |= 0x80;\n if (number.gt(new decimal_js_1.Decimal(0))) {\n amount[0] |= 0x40;\n }\n var exponent = number.e - 15;\n var exponentByte = 97 + exponent;\n amount[0] |= exponentByte >>> 2;\n amount[1] |= (exponentByte & 0x03) << 6;\n }\n var currency = currency_1.Currency.from(value.currency).toBytes();\n var issuer = account_id_1.AccountID.from(value.issuer).toBytes();\n return new Amount(buffer_1.Buffer.concat([amount, currency, issuer]));\n }\n throw new Error('Invalid type to construct an Amount');\n };\n /**\n * Read an amount from a BinaryParser\n *\n * @param parser BinaryParser to read the Amount from\n * @returns An Amount object\n */\n Amount.fromParser = function (parser) {\n var isXRP = parser.peek() & 0x80;\n var numBytes = isXRP ? 48 : 8;\n return new Amount(parser.read(numBytes));\n };\n /**\n * Get the JSON representation of this Amount\n *\n * @returns the JSON interpretation of this.bytes\n */\n Amount.prototype.toJSON = function () {\n if (this.isNative()) {\n var bytes = this.bytes;\n var isPositive = bytes[0] & 0x40;\n var sign = isPositive ? '' : '-';\n bytes[0] &= 0x3f;\n var msb = bigInt(bytes.slice(0, 4).readUInt32BE(0));\n var lsb = bigInt(bytes.slice(4).readUInt32BE(0));\n var num = msb.shiftLeft(32).or(lsb);\n return \"\" + sign + num.toString();\n }\n else {\n var parser = new binary_parser_1.BinaryParser(this.toString());\n var mantissa = parser.read(8);\n var currency = currency_1.Currency.fromParser(parser);\n var issuer = account_id_1.AccountID.fromParser(parser);\n var b1 = mantissa[0];\n var b2 = mantissa[1];\n var isPositive = b1 & 0x40;\n var sign = isPositive ? '' : '-';\n var exponent = ((b1 & 0x3f) << 2) + ((b2 & 0xff) >> 6) - 97;\n mantissa[0] = 0;\n mantissa[1] &= 0x3f;\n var value = new decimal_js_1.Decimal(sign + \"0x\" + mantissa.toString('hex')).times(\"1e\" + exponent);\n Amount.assertIouIsValid(value);\n return {\n value: value.toString(),\n currency: currency.toJSON(),\n issuer: issuer.toJSON(),\n };\n }\n };\n /**\n * Validate XRP amount\n *\n * @param amount String representing XRP amount\n * @returns void, but will throw if invalid amount\n */\n Amount.assertXrpIsValid = function (amount) {\n if (amount.indexOf('.') !== -1) {\n throw new Error(amount.toString() + \" is an illegal amount\");\n }\n var decimal = new decimal_js_1.Decimal(amount);\n if (!decimal.isZero()) {\n if (decimal.lt(MIN_XRP) || decimal.gt(MAX_DROPS)) {\n throw new Error(amount.toString() + \" is an illegal amount\");\n }\n }\n };\n /**\n * Validate IOU.value amount\n *\n * @param decimal Decimal.js object representing IOU.value\n * @returns void, but will throw if invalid amount\n */\n Amount.assertIouIsValid = function (decimal) {\n if (!decimal.isZero()) {\n var p = decimal.precision();\n var e = decimal.e - 15;\n if (p > MAX_IOU_PRECISION ||\n e > MAX_IOU_EXPONENT ||\n e < MIN_IOU_EXPONENT) {\n throw new Error('Decimal precision out of range');\n }\n this.verifyNoDecimal(decimal);\n }\n };\n /**\n * Ensure that the value after being multiplied by the exponent does not\n * contain a decimal.\n *\n * @param decimal a Decimal object\n * @returns a string of the object without a decimal\n */\n Amount.verifyNoDecimal = function (decimal) {\n var integerNumberString = decimal\n .times(\"1e\" + -(decimal.e - 15))\n .abs()\n .toString();\n if (integerNumberString.indexOf('.') !== -1) {\n throw new Error('Decimal place found in integerNumberString');\n }\n };\n /**\n * Test if this amount is in units of Native Currency(XRP)\n *\n * @returns true if Native (XRP)\n */\n Amount.prototype.isNative = function () {\n return (this.bytes[0] & 0x80) === 0;\n };\n Amount.defaultAmount = new Amount(buffer_1.Buffer.from('4000000000000000', 'hex'));\n return Amount;\n}(serialized_type_1.SerializedType));\nexports.Amount = Amount;\n//# sourceMappingURL=amount.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/amount.js?");
2098
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Amount = void 0;\nvar decimal_js_1 = __webpack_require__(/*! decimal.js */ \"../../node_modules/decimal.js/decimal.js\");\nvar binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js\");\nvar account_id_1 = __webpack_require__(/*! ./account-id */ \"../../node_modules/ripple-binary-codec/dist/types/account-id.js\");\nvar currency_1 = __webpack_require__(/*! ./currency */ \"../../node_modules/ripple-binary-codec/dist/types/currency.js\");\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Constants for validating amounts\n */\nvar MIN_IOU_EXPONENT = -96;\nvar MAX_IOU_EXPONENT = 80;\nvar MAX_IOU_PRECISION = 16;\nvar MAX_DROPS = new decimal_js_1.Decimal('1e17');\nvar MIN_XRP = new decimal_js_1.Decimal('1e-6');\nvar mask = bigInt(0x00000000ffffffff);\n/**\n * decimal.js configuration for Amount IOUs\n */\ndecimal_js_1.Decimal.config({\n toExpPos: MAX_IOU_EXPONENT + MAX_IOU_PRECISION,\n toExpNeg: MIN_IOU_EXPONENT - MAX_IOU_PRECISION,\n});\n/**\n * Type guard for AmountObject\n */\nfunction isAmountObject(arg) {\n var keys = Object.keys(arg).sort();\n return (keys.length === 3 &&\n keys[0] === 'currency' &&\n keys[1] === 'issuer' &&\n keys[2] === 'value');\n}\n/**\n * Class for serializing/Deserializing Amounts\n */\nvar Amount = /** @class */ (function (_super) {\n __extends(Amount, _super);\n function Amount(bytes) {\n return _super.call(this, bytes !== null && bytes !== void 0 ? bytes : Amount.defaultAmount.bytes) || this;\n }\n /**\n * Construct an amount from an IOU or string amount\n *\n * @param value An Amount, object representing an IOU, or a string\n * representing an integer amount\n * @returns An Amount object\n */\n Amount.from = function (value) {\n if (value instanceof Amount) {\n return value;\n }\n var amount = buffer_1.Buffer.alloc(8);\n if (typeof value === 'string') {\n Amount.assertXrpIsValid(value);\n var number = bigInt(value);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(number.and(mask)), 0);\n amount = buffer_1.Buffer.concat(intBuf);\n amount[0] |= 0x40;\n return new Amount(amount);\n }\n if (isAmountObject(value)) {\n var number = new decimal_js_1.Decimal(value.value);\n Amount.assertIouIsValid(number);\n if (number.isZero()) {\n amount[0] |= 0x80;\n }\n else {\n var integerNumberString = number\n .times(\"1e\".concat(-(number.e - 15)))\n .abs()\n .toString();\n var num = bigInt(integerNumberString);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(num.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(num.and(mask)), 0);\n amount = buffer_1.Buffer.concat(intBuf);\n amount[0] |= 0x80;\n if (number.gt(new decimal_js_1.Decimal(0))) {\n amount[0] |= 0x40;\n }\n var exponent = number.e - 15;\n var exponentByte = 97 + exponent;\n amount[0] |= exponentByte >>> 2;\n amount[1] |= (exponentByte & 0x03) << 6;\n }\n var currency = currency_1.Currency.from(value.currency).toBytes();\n var issuer = account_id_1.AccountID.from(value.issuer).toBytes();\n return new Amount(buffer_1.Buffer.concat([amount, currency, issuer]));\n }\n throw new Error('Invalid type to construct an Amount');\n };\n /**\n * Read an amount from a BinaryParser\n *\n * @param parser BinaryParser to read the Amount from\n * @returns An Amount object\n */\n Amount.fromParser = function (parser) {\n var isXRP = parser.peek() & 0x80;\n var numBytes = isXRP ? 48 : 8;\n return new Amount(parser.read(numBytes));\n };\n /**\n * Get the JSON representation of this Amount\n *\n * @returns the JSON interpretation of this.bytes\n */\n Amount.prototype.toJSON = function () {\n if (this.isNative()) {\n var bytes = this.bytes;\n var isPositive = bytes[0] & 0x40;\n var sign = isPositive ? '' : '-';\n bytes[0] &= 0x3f;\n var msb = bigInt(bytes.slice(0, 4).readUInt32BE(0));\n var lsb = bigInt(bytes.slice(4).readUInt32BE(0));\n var num = msb.shiftLeft(32).or(lsb);\n return \"\".concat(sign).concat(num.toString());\n }\n else {\n var parser = new binary_parser_1.BinaryParser(this.toString());\n var mantissa = parser.read(8);\n var currency = currency_1.Currency.fromParser(parser);\n var issuer = account_id_1.AccountID.fromParser(parser);\n var b1 = mantissa[0];\n var b2 = mantissa[1];\n var isPositive = b1 & 0x40;\n var sign = isPositive ? '' : '-';\n var exponent = ((b1 & 0x3f) << 2) + ((b2 & 0xff) >> 6) - 97;\n mantissa[0] = 0;\n mantissa[1] &= 0x3f;\n var value = new decimal_js_1.Decimal(\"\".concat(sign, \"0x\").concat(mantissa.toString('hex'))).times(\"1e\".concat(exponent));\n Amount.assertIouIsValid(value);\n return {\n value: value.toString(),\n currency: currency.toJSON(),\n issuer: issuer.toJSON(),\n };\n }\n };\n /**\n * Validate XRP amount\n *\n * @param amount String representing XRP amount\n * @returns void, but will throw if invalid amount\n */\n Amount.assertXrpIsValid = function (amount) {\n if (amount.indexOf('.') !== -1) {\n throw new Error(\"\".concat(amount.toString(), \" is an illegal amount\"));\n }\n var decimal = new decimal_js_1.Decimal(amount);\n if (!decimal.isZero()) {\n if (decimal.lt(MIN_XRP) || decimal.gt(MAX_DROPS)) {\n throw new Error(\"\".concat(amount.toString(), \" is an illegal amount\"));\n }\n }\n };\n /**\n * Validate IOU.value amount\n *\n * @param decimal Decimal.js object representing IOU.value\n * @returns void, but will throw if invalid amount\n */\n Amount.assertIouIsValid = function (decimal) {\n if (!decimal.isZero()) {\n var p = decimal.precision();\n var e = decimal.e - 15;\n if (p > MAX_IOU_PRECISION ||\n e > MAX_IOU_EXPONENT ||\n e < MIN_IOU_EXPONENT) {\n throw new Error('Decimal precision out of range');\n }\n this.verifyNoDecimal(decimal);\n }\n };\n /**\n * Ensure that the value after being multiplied by the exponent does not\n * contain a decimal.\n *\n * @param decimal a Decimal object\n * @returns a string of the object without a decimal\n */\n Amount.verifyNoDecimal = function (decimal) {\n var integerNumberString = decimal\n .times(\"1e\".concat(-(decimal.e - 15)))\n .abs()\n .toString();\n if (integerNumberString.indexOf('.') !== -1) {\n throw new Error('Decimal place found in integerNumberString');\n }\n };\n /**\n * Test if this amount is in units of Native Currency(XRP)\n *\n * @returns true if Native (XRP)\n */\n Amount.prototype.isNative = function () {\n return (this.bytes[0] & 0x80) === 0;\n };\n Amount.defaultAmount = new Amount(buffer_1.Buffer.from('4000000000000000', 'hex'));\n return Amount;\n}(serialized_type_1.SerializedType));\nexports.Amount = Amount;\n//# sourceMappingURL=amount.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/amount.js?");
2099
2099
 
2100
2100
  /***/ }),
2101
2101
 
@@ -2117,7 +2117,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2117
2117
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2118
2118
 
2119
2119
  "use strict";
2120
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Currency = void 0;\nvar hash_160_1 = __webpack_require__(/*! ./hash-160 */ \"../../node_modules/ripple-binary-codec/dist/types/hash-160.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar ISO_REGEX = /^[A-Z0-9]{3}$/;\nvar HEX_REGEX = /^[A-F0-9]{40}$/;\n/**\n * Convert an ISO code to a currency bytes representation\n */\nfunction isoToBytes(iso) {\n var bytes = buffer_1.Buffer.alloc(20);\n if (iso !== 'XRP') {\n var isoBytes = iso.split('').map(function (c) { return c.charCodeAt(0); });\n bytes.set(isoBytes, 12);\n }\n return bytes;\n}\n/**\n * Tests if ISO is a valid iso code\n */\nfunction isIsoCode(iso) {\n return ISO_REGEX.test(iso);\n}\nfunction isoCodeFromHex(code) {\n var iso = code.toString();\n if (iso === 'XRP') {\n throw new Error('Disallowed currency code: to indicate the currency XRP you must use 20 bytes of 0s');\n }\n if (isIsoCode(iso)) {\n return iso;\n }\n return null;\n}\n/**\n * Tests if hex is a valid hex-string\n */\nfunction isHex(hex) {\n return HEX_REGEX.test(hex);\n}\n/**\n * Tests if a string is a valid representation of a currency\n */\nfunction isStringRepresentation(input) {\n return input.length === 3 || isHex(input);\n}\n/**\n * Tests if a Buffer is a valid representation of a currency\n */\nfunction isBytesArray(bytes) {\n return bytes.byteLength === 20;\n}\n/**\n * Ensures that a value is a valid representation of a currency\n */\nfunction isValidRepresentation(input) {\n return input instanceof buffer_1.Buffer\n ? isBytesArray(input)\n : isStringRepresentation(input);\n}\n/**\n * Generate bytes from a string or buffer representation of a currency\n */\nfunction bytesFromRepresentation(input) {\n if (!isValidRepresentation(input)) {\n throw new Error(\"Unsupported Currency representation: \" + input);\n }\n return input.length === 3 ? isoToBytes(input) : buffer_1.Buffer.from(input, 'hex');\n}\n/**\n * Class defining how to encode and decode Currencies\n */\nvar Currency = /** @class */ (function (_super) {\n __extends(Currency, _super);\n function Currency(byteBuf) {\n var _this = _super.call(this, byteBuf !== null && byteBuf !== void 0 ? byteBuf : Currency.XRP.bytes) || this;\n var code = _this.bytes.slice(12, 15);\n if (_this.bytes[0] !== 0) {\n _this._iso = null;\n }\n else if (code.toString('hex') === '000000') {\n _this._iso = 'XRP';\n }\n else {\n _this._iso = isoCodeFromHex(code);\n }\n return _this;\n }\n /**\n * Return the ISO code of this currency\n *\n * @returns ISO code if it exists, else null\n */\n Currency.prototype.iso = function () {\n return this._iso;\n };\n /**\n * Constructs a Currency object\n *\n * @param val Currency object or a string representation of a currency\n */\n Currency.from = function (value) {\n if (value instanceof Currency) {\n return value;\n }\n if (typeof value === 'string') {\n return new Currency(bytesFromRepresentation(value));\n }\n throw new Error('Cannot construct Currency from value given');\n };\n /**\n * Gets the JSON representation of a currency\n *\n * @returns JSON representation\n */\n Currency.prototype.toJSON = function () {\n var iso = this.iso();\n if (iso !== null) {\n return iso;\n }\n return this.bytes.toString('hex').toUpperCase();\n };\n Currency.XRP = new Currency(buffer_1.Buffer.alloc(20));\n return Currency;\n}(hash_160_1.Hash160));\nexports.Currency = Currency;\n//# sourceMappingURL=currency.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/currency.js?");
2120
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Currency = void 0;\nvar hash_160_1 = __webpack_require__(/*! ./hash-160 */ \"../../node_modules/ripple-binary-codec/dist/types/hash-160.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar ISO_REGEX = /^[A-Z0-9]{3}$/;\nvar HEX_REGEX = /^[A-F0-9]{40}$/;\n/**\n * Convert an ISO code to a currency bytes representation\n */\nfunction isoToBytes(iso) {\n var bytes = buffer_1.Buffer.alloc(20);\n if (iso !== 'XRP') {\n var isoBytes = iso.split('').map(function (c) { return c.charCodeAt(0); });\n bytes.set(isoBytes, 12);\n }\n return bytes;\n}\n/**\n * Tests if ISO is a valid iso code\n */\nfunction isIsoCode(iso) {\n return ISO_REGEX.test(iso);\n}\nfunction isoCodeFromHex(code) {\n var iso = code.toString();\n if (iso === 'XRP') {\n throw new Error('Disallowed currency code: to indicate the currency XRP you must use 20 bytes of 0s');\n }\n if (isIsoCode(iso)) {\n return iso;\n }\n return null;\n}\n/**\n * Tests if hex is a valid hex-string\n */\nfunction isHex(hex) {\n return HEX_REGEX.test(hex);\n}\n/**\n * Tests if a string is a valid representation of a currency\n */\nfunction isStringRepresentation(input) {\n return input.length === 3 || isHex(input);\n}\n/**\n * Tests if a Buffer is a valid representation of a currency\n */\nfunction isBytesArray(bytes) {\n return bytes.byteLength === 20;\n}\n/**\n * Ensures that a value is a valid representation of a currency\n */\nfunction isValidRepresentation(input) {\n return input instanceof buffer_1.Buffer\n ? isBytesArray(input)\n : isStringRepresentation(input);\n}\n/**\n * Generate bytes from a string or buffer representation of a currency\n */\nfunction bytesFromRepresentation(input) {\n if (!isValidRepresentation(input)) {\n throw new Error(\"Unsupported Currency representation: \".concat(input));\n }\n return input.length === 3 ? isoToBytes(input) : buffer_1.Buffer.from(input, 'hex');\n}\n/**\n * Class defining how to encode and decode Currencies\n */\nvar Currency = /** @class */ (function (_super) {\n __extends(Currency, _super);\n function Currency(byteBuf) {\n var _this = _super.call(this, byteBuf !== null && byteBuf !== void 0 ? byteBuf : Currency.XRP.bytes) || this;\n var code = _this.bytes.slice(12, 15);\n if (_this.bytes[0] !== 0) {\n _this._iso = null;\n }\n else if (code.toString('hex') === '000000') {\n _this._iso = 'XRP';\n }\n else {\n _this._iso = isoCodeFromHex(code);\n }\n return _this;\n }\n /**\n * Return the ISO code of this currency\n *\n * @returns ISO code if it exists, else null\n */\n Currency.prototype.iso = function () {\n return this._iso;\n };\n /**\n * Constructs a Currency object\n *\n * @param val Currency object or a string representation of a currency\n */\n Currency.from = function (value) {\n if (value instanceof Currency) {\n return value;\n }\n if (typeof value === 'string') {\n return new Currency(bytesFromRepresentation(value));\n }\n throw new Error('Cannot construct Currency from value given');\n };\n /**\n * Gets the JSON representation of a currency\n *\n * @returns JSON representation\n */\n Currency.prototype.toJSON = function () {\n var iso = this.iso();\n if (iso !== null) {\n return iso;\n }\n return this.bytes.toString('hex').toUpperCase();\n };\n Currency.XRP = new Currency(buffer_1.Buffer.alloc(20));\n return Currency;\n}(hash_160_1.Hash160));\nexports.Currency = Currency;\n//# sourceMappingURL=currency.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/currency.js?");
2121
2121
 
2122
2122
  /***/ }),
2123
2123
 
@@ -2161,7 +2161,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2161
2161
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2162
2162
 
2163
2163
  "use strict";
2164
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Hash = void 0;\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Base class defining how to encode and decode hashes\n */\nvar Hash = /** @class */ (function (_super) {\n __extends(Hash, _super);\n function Hash(bytes) {\n var _this = _super.call(this, bytes) || this;\n if (_this.bytes.byteLength !== _this.constructor.width) {\n throw new Error(\"Invalid Hash length \" + _this.bytes.byteLength);\n }\n return _this;\n }\n /**\n * Construct a Hash object from an existing Hash object or a hex-string\n *\n * @param value A hash object or hex-string of a hash\n */\n Hash.from = function (value) {\n if (value instanceof this) {\n return value;\n }\n if (typeof value === 'string') {\n return new this(buffer_1.Buffer.from(value, 'hex'));\n }\n throw new Error('Cannot construct Hash from given value');\n };\n /**\n * Read a Hash object from a BinaryParser\n *\n * @param parser BinaryParser to read the hash from\n * @param hint length of the bytes to read, optional\n */\n Hash.fromParser = function (parser, hint) {\n return new this(parser.read(hint !== null && hint !== void 0 ? hint : this.width));\n };\n /**\n * Overloaded operator for comparing two hash objects\n *\n * @param other The Hash to compare this to\n */\n Hash.prototype.compareTo = function (other) {\n return this.bytes.compare(this.constructor.from(other).bytes);\n };\n /**\n * @returns the hex-string representation of this Hash\n */\n Hash.prototype.toString = function () {\n return this.toHex();\n };\n /**\n * Returns four bits at the specified depth within a hash\n *\n * @param depth The depth of the four bits\n * @returns The number represented by the four bits\n */\n Hash.prototype.nibblet = function (depth) {\n var byteIx = depth > 0 ? (depth / 2) | 0 : 0;\n var b = this.bytes[byteIx];\n if (depth % 2 === 0) {\n b = (b & 0xf0) >>> 4;\n }\n else {\n b = b & 0x0f;\n }\n return b;\n };\n return Hash;\n}(serialized_type_1.Comparable));\nexports.Hash = Hash;\n//# sourceMappingURL=hash.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/hash.js?");
2164
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Hash = void 0;\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * Base class defining how to encode and decode hashes\n */\nvar Hash = /** @class */ (function (_super) {\n __extends(Hash, _super);\n function Hash(bytes) {\n var _this = _super.call(this, bytes) || this;\n if (_this.bytes.byteLength !== _this.constructor.width) {\n throw new Error(\"Invalid Hash length \".concat(_this.bytes.byteLength));\n }\n return _this;\n }\n /**\n * Construct a Hash object from an existing Hash object or a hex-string\n *\n * @param value A hash object or hex-string of a hash\n */\n Hash.from = function (value) {\n if (value instanceof this) {\n return value;\n }\n if (typeof value === 'string') {\n return new this(buffer_1.Buffer.from(value, 'hex'));\n }\n throw new Error('Cannot construct Hash from given value');\n };\n /**\n * Read a Hash object from a BinaryParser\n *\n * @param parser BinaryParser to read the hash from\n * @param hint length of the bytes to read, optional\n */\n Hash.fromParser = function (parser, hint) {\n return new this(parser.read(hint !== null && hint !== void 0 ? hint : this.width));\n };\n /**\n * Overloaded operator for comparing two hash objects\n *\n * @param other The Hash to compare this to\n */\n Hash.prototype.compareTo = function (other) {\n return this.bytes.compare(this.constructor.from(other).bytes);\n };\n /**\n * @returns the hex-string representation of this Hash\n */\n Hash.prototype.toString = function () {\n return this.toHex();\n };\n /**\n * Returns four bits at the specified depth within a hash\n *\n * @param depth The depth of the four bits\n * @returns The number represented by the four bits\n */\n Hash.prototype.nibblet = function (depth) {\n var byteIx = depth > 0 ? (depth / 2) | 0 : 0;\n var b = this.bytes[byteIx];\n if (depth % 2 === 0) {\n b = (b & 0xf0) >>> 4;\n }\n else {\n b = b & 0x0f;\n }\n return b;\n };\n return Hash;\n}(serialized_type_1.Comparable));\nexports.Hash = Hash;\n//# sourceMappingURL=hash.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/hash.js?");
2165
2165
 
2166
2166
  /***/ }),
2167
2167
 
@@ -2194,7 +2194,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2194
2194
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2195
2195
 
2196
2196
  "use strict";
2197
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Comparable = exports.SerializedType = void 0;\nvar binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * The base class for all binary-codec types\n */\nvar SerializedType = /** @class */ (function () {\n function SerializedType(bytes) {\n this.bytes = buffer_1.Buffer.alloc(0);\n this.bytes = bytes !== null && bytes !== void 0 ? bytes : buffer_1.Buffer.alloc(0);\n }\n SerializedType.fromParser = function (parser, hint) {\n throw new Error('fromParser not implemented');\n return this.fromParser(parser, hint);\n };\n SerializedType.from = function (value) {\n throw new Error('from not implemented');\n return this.from(value);\n };\n /**\n * Write the bytes representation of a SerializedType to a BytesList\n *\n * @param list The BytesList to write SerializedType bytes to\n */\n SerializedType.prototype.toBytesSink = function (list) {\n list.put(this.bytes);\n };\n /**\n * Get the hex representation of a SerializedType's bytes\n *\n * @returns hex String of this.bytes\n */\n SerializedType.prototype.toHex = function () {\n return this.toBytes().toString('hex').toUpperCase();\n };\n /**\n * Get the bytes representation of a SerializedType\n *\n * @returns A buffer of the bytes\n */\n SerializedType.prototype.toBytes = function () {\n if (this.bytes) {\n return this.bytes;\n }\n var bytes = new binary_serializer_1.BytesList();\n this.toBytesSink(bytes);\n return bytes.toBytes();\n };\n /**\n * Return the JSON representation of a SerializedType\n *\n * @returns any type, if not overloaded returns hexString representation of bytes\n */\n SerializedType.prototype.toJSON = function () {\n return this.toHex();\n };\n /**\n * @returns hexString representation of this.bytes\n */\n SerializedType.prototype.toString = function () {\n return this.toHex();\n };\n return SerializedType;\n}());\nexports.SerializedType = SerializedType;\n/**\n * Base class for SerializedTypes that are comparable\n */\nvar Comparable = /** @class */ (function (_super) {\n __extends(Comparable, _super);\n function Comparable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Comparable.prototype.lt = function (other) {\n return this.compareTo(other) < 0;\n };\n Comparable.prototype.eq = function (other) {\n return this.compareTo(other) === 0;\n };\n Comparable.prototype.gt = function (other) {\n return this.compareTo(other) > 0;\n };\n Comparable.prototype.gte = function (other) {\n return this.compareTo(other) > -1;\n };\n Comparable.prototype.lte = function (other) {\n return this.compareTo(other) < 1;\n };\n /**\n * Overload this method to define how two Comparable SerializedTypes are compared\n *\n * @param other The comparable object to compare this to\n * @returns A number denoting the relationship of this and other\n */\n Comparable.prototype.compareTo = function (other) {\n throw new Error(\"cannot compare \" + this.toString() + \" and \" + other.toString());\n };\n return Comparable;\n}(SerializedType));\nexports.Comparable = Comparable;\n//# sourceMappingURL=serialized-type.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/serialized-type.js?");
2197
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Comparable = exports.SerializedType = void 0;\nvar binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\n/**\n * The base class for all binary-codec types\n */\nvar SerializedType = /** @class */ (function () {\n function SerializedType(bytes) {\n this.bytes = buffer_1.Buffer.alloc(0);\n this.bytes = bytes !== null && bytes !== void 0 ? bytes : buffer_1.Buffer.alloc(0);\n }\n SerializedType.fromParser = function (parser, hint) {\n throw new Error('fromParser not implemented');\n return this.fromParser(parser, hint);\n };\n SerializedType.from = function (value) {\n throw new Error('from not implemented');\n return this.from(value);\n };\n /**\n * Write the bytes representation of a SerializedType to a BytesList\n *\n * @param list The BytesList to write SerializedType bytes to\n */\n SerializedType.prototype.toBytesSink = function (list) {\n list.put(this.bytes);\n };\n /**\n * Get the hex representation of a SerializedType's bytes\n *\n * @returns hex String of this.bytes\n */\n SerializedType.prototype.toHex = function () {\n return this.toBytes().toString('hex').toUpperCase();\n };\n /**\n * Get the bytes representation of a SerializedType\n *\n * @returns A buffer of the bytes\n */\n SerializedType.prototype.toBytes = function () {\n if (this.bytes) {\n return this.bytes;\n }\n var bytes = new binary_serializer_1.BytesList();\n this.toBytesSink(bytes);\n return bytes.toBytes();\n };\n /**\n * Return the JSON representation of a SerializedType\n *\n * @returns any type, if not overloaded returns hexString representation of bytes\n */\n SerializedType.prototype.toJSON = function () {\n return this.toHex();\n };\n /**\n * @returns hexString representation of this.bytes\n */\n SerializedType.prototype.toString = function () {\n return this.toHex();\n };\n return SerializedType;\n}());\nexports.SerializedType = SerializedType;\n/**\n * Base class for SerializedTypes that are comparable\n */\nvar Comparable = /** @class */ (function (_super) {\n __extends(Comparable, _super);\n function Comparable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Comparable.prototype.lt = function (other) {\n return this.compareTo(other) < 0;\n };\n Comparable.prototype.eq = function (other) {\n return this.compareTo(other) === 0;\n };\n Comparable.prototype.gt = function (other) {\n return this.compareTo(other) > 0;\n };\n Comparable.prototype.gte = function (other) {\n return this.compareTo(other) > -1;\n };\n Comparable.prototype.lte = function (other) {\n return this.compareTo(other) < 1;\n };\n /**\n * Overload this method to define how two Comparable SerializedTypes are compared\n *\n * @param other The comparable object to compare this to\n * @returns A number denoting the relationship of this and other\n */\n Comparable.prototype.compareTo = function (other) {\n throw new Error(\"cannot compare \".concat(this.toString(), \" and \").concat(other.toString()));\n };\n return Comparable;\n}(SerializedType));\nexports.Comparable = Comparable;\n//# sourceMappingURL=serialized-type.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/serialized-type.js?");
2198
2198
 
2199
2199
  /***/ }),
2200
2200
 
@@ -2216,7 +2216,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2216
2216
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2217
2217
 
2218
2218
  "use strict";
2219
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.STObject = void 0;\nvar enums_1 = __webpack_require__(/*! ../enums */ \"../../node_modules/ripple-binary-codec/dist/enums/index.js\");\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ \"../../node_modules/ripple-address-codec/dist/index.js\");\nvar binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js\");\nvar binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar OBJECT_END_MARKER_BYTE = buffer_1.Buffer.from([0xe1]);\nvar OBJECT_END_MARKER = 'ObjectEndMarker';\nvar ST_OBJECT = 'STObject';\nvar DESTINATION = 'Destination';\nvar ACCOUNT = 'Account';\nvar SOURCE_TAG = 'SourceTag';\nvar DEST_TAG = 'DestinationTag';\n/**\n * Break down an X-Address into an account and a tag\n *\n * @param field Name of field\n * @param xAddress X-Address corresponding to the field\n */\nfunction handleXAddress(field, xAddress) {\n var _a, _b;\n var decoded = (0, ripple_address_codec_1.xAddressToClassicAddress)(xAddress);\n var tagName;\n if (field === DESTINATION)\n tagName = DEST_TAG;\n else if (field === ACCOUNT)\n tagName = SOURCE_TAG;\n else if (decoded.tag !== false)\n throw new Error(field + \" cannot have an associated tag\");\n return decoded.tag !== false\n ? (_a = {}, _a[field] = decoded.classicAddress, _a[tagName] = decoded.tag, _a) : (_b = {}, _b[field] = decoded.classicAddress, _b);\n}\n/**\n * Validate that two objects don't both have the same tag fields\n *\n * @param obj1 First object to check for tags\n * @param obj2 Second object to check for tags\n * @throws When both objects have SourceTag or DestinationTag\n */\nfunction checkForDuplicateTags(obj1, obj2) {\n if (!(obj1[SOURCE_TAG] === undefined || obj2[SOURCE_TAG] === undefined))\n throw new Error('Cannot have Account X-Address and SourceTag');\n if (!(obj1[DEST_TAG] === undefined || obj2[DEST_TAG] === undefined))\n throw new Error('Cannot have Destination X-Address and DestinationTag');\n}\n/**\n * Class for Serializing/Deserializing objects\n */\nvar STObject = /** @class */ (function (_super) {\n __extends(STObject, _super);\n function STObject() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Construct a STObject from a BinaryParser\n *\n * @param parser BinaryParser to read STObject from\n * @returns A STObject object\n */\n STObject.fromParser = function (parser) {\n var list = new binary_serializer_1.BytesList();\n var bytes = new binary_serializer_1.BinarySerializer(list);\n while (!parser.end()) {\n var field = parser.readField();\n if (field.name === OBJECT_END_MARKER) {\n break;\n }\n var associatedValue = parser.readFieldValue(field);\n bytes.writeFieldAndValue(field, associatedValue);\n if (field.type.name === ST_OBJECT) {\n bytes.put(OBJECT_END_MARKER_BYTE);\n }\n }\n return new STObject(list.toBytes());\n };\n /**\n * Construct a STObject from a JSON object\n *\n * @param value An object to include\n * @param filter optional, denote which field to include in serialized object\n * @returns a STObject object\n */\n STObject.from = function (value, filter) {\n if (value instanceof STObject) {\n return value;\n }\n var list = new binary_serializer_1.BytesList();\n var bytes = new binary_serializer_1.BinarySerializer(list);\n var xAddressDecoded = Object.entries(value).reduce(function (acc, _a) {\n var _b;\n var key = _a[0], val = _a[1];\n var handled = undefined;\n if (val && (0, ripple_address_codec_1.isValidXAddress)(val.toString())) {\n handled = handleXAddress(key, val.toString());\n checkForDuplicateTags(handled, value);\n }\n return Object.assign(acc, handled !== null && handled !== void 0 ? handled : (_b = {}, _b[key] = val, _b));\n }, {});\n var sorted = Object.keys(xAddressDecoded)\n .map(function (f) { return enums_1.Field[f]; })\n .filter(function (f) {\n return f !== undefined &&\n xAddressDecoded[f.name] !== undefined &&\n f.isSerialized;\n })\n .sort(function (a, b) {\n return a.ordinal - b.ordinal;\n });\n if (filter !== undefined) {\n sorted = sorted.filter(filter);\n }\n sorted.forEach(function (field) {\n var associatedValue = field.associatedType.from(xAddressDecoded[field.name]);\n bytes.writeFieldAndValue(field, associatedValue);\n if (field.type.name === ST_OBJECT) {\n bytes.put(OBJECT_END_MARKER_BYTE);\n }\n });\n return new STObject(list.toBytes());\n };\n /**\n * Get the JSON interpretation of this.bytes\n *\n * @returns a JSON object\n */\n STObject.prototype.toJSON = function () {\n var objectParser = new binary_parser_1.BinaryParser(this.toString());\n var accumulator = {};\n while (!objectParser.end()) {\n var field = objectParser.readField();\n if (field.name === OBJECT_END_MARKER) {\n break;\n }\n accumulator[field.name] = objectParser.readFieldValue(field).toJSON();\n }\n return accumulator;\n };\n return STObject;\n}(serialized_type_1.SerializedType));\nexports.STObject = STObject;\n//# sourceMappingURL=st-object.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/st-object.js?");
2219
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.STObject = void 0;\nvar enums_1 = __webpack_require__(/*! ../enums */ \"../../node_modules/ripple-binary-codec/dist/enums/index.js\");\nvar serialized_type_1 = __webpack_require__(/*! ./serialized-type */ \"../../node_modules/ripple-binary-codec/dist/types/serialized-type.js\");\nvar ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ \"../../node_modules/ripple-address-codec/dist/index.js\");\nvar binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js\");\nvar binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ \"../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar OBJECT_END_MARKER_BYTE = buffer_1.Buffer.from([0xe1]);\nvar OBJECT_END_MARKER = 'ObjectEndMarker';\nvar ST_OBJECT = 'STObject';\nvar DESTINATION = 'Destination';\nvar ACCOUNT = 'Account';\nvar SOURCE_TAG = 'SourceTag';\nvar DEST_TAG = 'DestinationTag';\n/**\n * Break down an X-Address into an account and a tag\n *\n * @param field Name of field\n * @param xAddress X-Address corresponding to the field\n */\nfunction handleXAddress(field, xAddress) {\n var _a, _b;\n var decoded = (0, ripple_address_codec_1.xAddressToClassicAddress)(xAddress);\n var tagName;\n if (field === DESTINATION)\n tagName = DEST_TAG;\n else if (field === ACCOUNT)\n tagName = SOURCE_TAG;\n else if (decoded.tag !== false)\n throw new Error(\"\".concat(field, \" cannot have an associated tag\"));\n return decoded.tag !== false\n ? (_a = {}, _a[field] = decoded.classicAddress, _a[tagName] = decoded.tag, _a) : (_b = {}, _b[field] = decoded.classicAddress, _b);\n}\n/**\n * Validate that two objects don't both have the same tag fields\n *\n * @param obj1 First object to check for tags\n * @param obj2 Second object to check for tags\n * @throws When both objects have SourceTag or DestinationTag\n */\nfunction checkForDuplicateTags(obj1, obj2) {\n if (!(obj1[SOURCE_TAG] === undefined || obj2[SOURCE_TAG] === undefined))\n throw new Error('Cannot have Account X-Address and SourceTag');\n if (!(obj1[DEST_TAG] === undefined || obj2[DEST_TAG] === undefined))\n throw new Error('Cannot have Destination X-Address and DestinationTag');\n}\n/**\n * Class for Serializing/Deserializing objects\n */\nvar STObject = /** @class */ (function (_super) {\n __extends(STObject, _super);\n function STObject() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Construct a STObject from a BinaryParser\n *\n * @param parser BinaryParser to read STObject from\n * @returns A STObject object\n */\n STObject.fromParser = function (parser) {\n var list = new binary_serializer_1.BytesList();\n var bytes = new binary_serializer_1.BinarySerializer(list);\n while (!parser.end()) {\n var field = parser.readField();\n if (field.name === OBJECT_END_MARKER) {\n break;\n }\n var associatedValue = parser.readFieldValue(field);\n bytes.writeFieldAndValue(field, associatedValue);\n if (field.type.name === ST_OBJECT) {\n bytes.put(OBJECT_END_MARKER_BYTE);\n }\n }\n return new STObject(list.toBytes());\n };\n /**\n * Construct a STObject from a JSON object\n *\n * @param value An object to include\n * @param filter optional, denote which field to include in serialized object\n * @returns a STObject object\n */\n STObject.from = function (value, filter) {\n if (value instanceof STObject) {\n return value;\n }\n var list = new binary_serializer_1.BytesList();\n var bytes = new binary_serializer_1.BinarySerializer(list);\n var isUnlModify = false;\n var xAddressDecoded = Object.entries(value).reduce(function (acc, _a) {\n var _b;\n var key = _a[0], val = _a[1];\n var handled = undefined;\n if (val && (0, ripple_address_codec_1.isValidXAddress)(val.toString())) {\n handled = handleXAddress(key, val.toString());\n checkForDuplicateTags(handled, value);\n }\n return Object.assign(acc, handled !== null && handled !== void 0 ? handled : (_b = {}, _b[key] = val, _b));\n }, {});\n var sorted = Object.keys(xAddressDecoded)\n .map(function (f) { return enums_1.Field[f]; })\n .filter(function (f) {\n return f !== undefined &&\n xAddressDecoded[f.name] !== undefined &&\n f.isSerialized;\n })\n .sort(function (a, b) {\n return a.ordinal - b.ordinal;\n });\n if (filter !== undefined) {\n sorted = sorted.filter(filter);\n }\n sorted.forEach(function (field) {\n var associatedValue = field.associatedType.from(xAddressDecoded[field.name]);\n if (associatedValue.name === 'UNLModify') {\n // triggered when the TransactionType field has a value of 'UNLModify'\n isUnlModify = true;\n }\n // true when in the UNLModify pseudotransaction (after the transaction type has been processed) and working with the\n // Account field\n // The Account field must not be a part of the UNLModify pseudotransaction encoding, due to a bug in rippled\n var isUnlModifyWorkaround = field.name == 'Account' && isUnlModify;\n bytes.writeFieldAndValue(field, associatedValue, isUnlModifyWorkaround);\n if (field.type.name === ST_OBJECT) {\n bytes.put(OBJECT_END_MARKER_BYTE);\n }\n });\n return new STObject(list.toBytes());\n };\n /**\n * Get the JSON interpretation of this.bytes\n *\n * @returns a JSON object\n */\n STObject.prototype.toJSON = function () {\n var objectParser = new binary_parser_1.BinaryParser(this.toString());\n var accumulator = {};\n while (!objectParser.end()) {\n var field = objectParser.readField();\n if (field.name === OBJECT_END_MARKER) {\n break;\n }\n accumulator[field.name] = objectParser.readFieldValue(field).toJSON();\n }\n return accumulator;\n };\n return STObject;\n}(serialized_type_1.SerializedType));\nexports.STObject = STObject;\n//# sourceMappingURL=st-object.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/st-object.js?");
2220
2220
 
2221
2221
  /***/ }),
2222
2222
 
@@ -2249,7 +2249,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
2249
2249
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2250
2250
 
2251
2251
  "use strict";
2252
- eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.UInt64 = void 0;\nvar uint_1 = __webpack_require__(/*! ./uint */ \"../../node_modules/ripple-binary-codec/dist/types/uint.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar big_integer_1 = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar HEX_REGEX = /^[a-fA-F0-9]{1,16}$/;\nvar mask = bigInt(0x00000000ffffffff);\n/**\n * Derived UInt class for serializing/deserializing 64 bit UInt\n */\nvar UInt64 = /** @class */ (function (_super) {\n __extends(UInt64, _super);\n function UInt64(bytes) {\n return _super.call(this, bytes !== null && bytes !== void 0 ? bytes : UInt64.defaultUInt64.bytes) || this;\n }\n UInt64.fromParser = function (parser) {\n return new UInt64(parser.read(UInt64.width));\n };\n /**\n * Construct a UInt64 object\n *\n * @param val A UInt64, hex-string, bigInt, or number\n * @returns A UInt64 object\n */\n UInt64.from = function (val) {\n if (val instanceof UInt64) {\n return val;\n }\n var buf = buffer_1.Buffer.alloc(UInt64.width);\n if (typeof val === 'number') {\n if (val < 0) {\n throw new Error('value must be an unsigned integer');\n }\n var number = bigInt(val);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(number.and(mask)), 0);\n return new UInt64(buffer_1.Buffer.concat(intBuf));\n }\n if (typeof val === 'string') {\n if (!HEX_REGEX.test(val)) {\n throw new Error(val + \" is not a valid hex-string\");\n }\n var strBuf = val.padStart(16, '0');\n buf = buffer_1.Buffer.from(strBuf, 'hex');\n return new UInt64(buf);\n }\n if ((0, big_integer_1.isInstance)(val)) {\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(val.shiftRight(bigInt(32))), 0);\n intBuf[1].writeUInt32BE(Number(val.and(mask)), 0);\n return new UInt64(buffer_1.Buffer.concat(intBuf));\n }\n throw new Error('Cannot construct UInt64 from given value');\n };\n /**\n * The JSON representation of a UInt64 object\n *\n * @returns a hex-string\n */\n UInt64.prototype.toJSON = function () {\n return this.bytes.toString('hex').toUpperCase();\n };\n /**\n * Get the value of the UInt64\n *\n * @returns the number represented buy this.bytes\n */\n UInt64.prototype.valueOf = function () {\n var msb = bigInt(this.bytes.slice(0, 4).readUInt32BE(0));\n var lsb = bigInt(this.bytes.slice(4).readUInt32BE(0));\n return msb.shiftLeft(bigInt(32)).or(lsb);\n };\n /**\n * Get the bytes representation of the UInt64 object\n *\n * @returns 8 bytes representing the UInt64\n */\n UInt64.prototype.toBytes = function () {\n return this.bytes;\n };\n UInt64.width = 64 / 8; // 8\n UInt64.defaultUInt64 = new UInt64(buffer_1.Buffer.alloc(UInt64.width));\n return UInt64;\n}(uint_1.UInt));\nexports.UInt64 = UInt64;\n//# sourceMappingURL=uint-64.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/uint-64.js?");
2252
+ eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.UInt64 = void 0;\nvar uint_1 = __webpack_require__(/*! ./uint */ \"../../node_modules/ripple-binary-codec/dist/types/uint.js\");\nvar bigInt = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar big_integer_1 = __webpack_require__(/*! big-integer */ \"../../node_modules/big-integer/BigInteger.js\");\nvar buffer_1 = __webpack_require__(/*! buffer/ */ \"../../node_modules/ripple-binary-codec/node_modules/buffer/index.js\");\nvar HEX_REGEX = /^[a-fA-F0-9]{1,16}$/;\nvar mask = bigInt(0x00000000ffffffff);\n/**\n * Derived UInt class for serializing/deserializing 64 bit UInt\n */\nvar UInt64 = /** @class */ (function (_super) {\n __extends(UInt64, _super);\n function UInt64(bytes) {\n return _super.call(this, bytes !== null && bytes !== void 0 ? bytes : UInt64.defaultUInt64.bytes) || this;\n }\n UInt64.fromParser = function (parser) {\n return new UInt64(parser.read(UInt64.width));\n };\n /**\n * Construct a UInt64 object\n *\n * @param val A UInt64, hex-string, bigInt, or number\n * @returns A UInt64 object\n */\n UInt64.from = function (val) {\n if (val instanceof UInt64) {\n return val;\n }\n var buf = buffer_1.Buffer.alloc(UInt64.width);\n if (typeof val === 'number') {\n if (val < 0) {\n throw new Error('value must be an unsigned integer');\n }\n var number = bigInt(val);\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0);\n intBuf[1].writeUInt32BE(Number(number.and(mask)), 0);\n return new UInt64(buffer_1.Buffer.concat(intBuf));\n }\n if (typeof val === 'string') {\n if (!HEX_REGEX.test(val)) {\n throw new Error(\"\".concat(val, \" is not a valid hex-string\"));\n }\n var strBuf = val.padStart(16, '0');\n buf = buffer_1.Buffer.from(strBuf, 'hex');\n return new UInt64(buf);\n }\n if ((0, big_integer_1.isInstance)(val)) {\n var intBuf = [buffer_1.Buffer.alloc(4), buffer_1.Buffer.alloc(4)];\n intBuf[0].writeUInt32BE(Number(val.shiftRight(bigInt(32))), 0);\n intBuf[1].writeUInt32BE(Number(val.and(mask)), 0);\n return new UInt64(buffer_1.Buffer.concat(intBuf));\n }\n throw new Error('Cannot construct UInt64 from given value');\n };\n /**\n * The JSON representation of a UInt64 object\n *\n * @returns a hex-string\n */\n UInt64.prototype.toJSON = function () {\n return this.bytes.toString('hex').toUpperCase();\n };\n /**\n * Get the value of the UInt64\n *\n * @returns the number represented buy this.bytes\n */\n UInt64.prototype.valueOf = function () {\n var msb = bigInt(this.bytes.slice(0, 4).readUInt32BE(0));\n var lsb = bigInt(this.bytes.slice(4).readUInt32BE(0));\n return msb.shiftLeft(bigInt(32)).or(lsb);\n };\n /**\n * Get the bytes representation of the UInt64 object\n *\n * @returns 8 bytes representing the UInt64\n */\n UInt64.prototype.toBytes = function () {\n return this.bytes;\n };\n UInt64.width = 64 / 8; // 8\n UInt64.defaultUInt64 = new UInt64(buffer_1.Buffer.alloc(UInt64.width));\n return UInt64;\n}(uint_1.UInt));\nexports.UInt64 = UInt64;\n//# sourceMappingURL=uint-64.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-binary-codec/dist/types/uint-64.js?");
2253
2253
 
2254
2254
  /***/ }),
2255
2255
 
@@ -2315,7 +2315,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n/* e
2315
2315
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2316
2316
 
2317
2317
  "use strict";
2318
- eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\nconst assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nconst brorand = __webpack_require__(/*! brorand */ \"../../node_modules/brorand/index.js\");\nconst hashjs = __webpack_require__(/*! hash.js */ \"../../node_modules/hash.js/lib/hash.js\");\nconst elliptic = __webpack_require__(/*! elliptic */ \"../../node_modules/elliptic/lib/elliptic.js\");\nconst addressCodec = __webpack_require__(/*! ripple-address-codec */ \"../../node_modules/ripple-address-codec/dist/index.js\");\nconst secp256k1_1 = __webpack_require__(/*! ./secp256k1 */ \"../../node_modules/ripple-keypairs/dist/secp256k1.js\");\nconst utils = __webpack_require__(/*! ./utils */ \"../../node_modules/ripple-keypairs/dist/utils.js\");\nconst Ed25519 = elliptic.eddsa('ed25519');\nconst Secp256k1 = elliptic.ec('secp256k1');\nconst { hexToBytes } = utils;\nconst { bytesToHex } = utils;\nfunction generateSeed(options = {}) {\n assert.ok(!options.entropy || options.entropy.length >= 16, 'entropy too short');\n const entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);\n const type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';\n return addressCodec.encodeSeed(entropy, type);\n}\nfunction hash(message) {\n return hashjs.sha512().update(message).digest().slice(0, 32);\n}\nconst secp256k1 = {\n deriveKeypair(entropy, options) {\n const prefix = '00';\n const privateKey = prefix + (0, secp256k1_1.derivePrivateKey)(entropy, options).toString(16, 64).toUpperCase();\n const publicKey = bytesToHex(Secp256k1.keyFromPrivate(privateKey.slice(2))\n .getPublic()\n .encodeCompressed());\n return { privateKey, publicKey };\n },\n sign(message, privateKey) {\n return bytesToHex(Secp256k1.sign(hash(message), hexToBytes(privateKey), {\n canonical: true,\n }).toDER());\n },\n verify(message, signature, publicKey) {\n return Secp256k1.verify(hash(message), signature, hexToBytes(publicKey));\n },\n};\nconst ed25519 = {\n deriveKeypair(entropy) {\n const prefix = 'ED';\n const rawPrivateKey = hash(entropy);\n const privateKey = prefix + bytesToHex(rawPrivateKey);\n const publicKey = prefix + bytesToHex(Ed25519.keyFromSecret(rawPrivateKey).pubBytes());\n return { privateKey, publicKey };\n },\n sign(message, privateKey) {\n // caution: Ed25519.sign interprets all strings as hex, stripping\n // any non-hex characters without warning\n assert.ok(Array.isArray(message), 'message must be array of octets');\n return bytesToHex(Ed25519.sign(message, hexToBytes(privateKey).slice(1)).toBytes());\n },\n verify(message, signature, publicKey) {\n return Ed25519.verify(message, hexToBytes(signature), hexToBytes(publicKey).slice(1));\n },\n};\nfunction select(algorithm) {\n const methods = { 'ecdsa-secp256k1': secp256k1, ed25519 };\n return methods[algorithm];\n}\nfunction deriveKeypair(seed, options) {\n const decoded = addressCodec.decodeSeed(seed);\n const algorithm = decoded.type === 'ed25519' ? 'ed25519' : 'ecdsa-secp256k1';\n const method = select(algorithm);\n const keypair = method.deriveKeypair(decoded.bytes, options);\n const messageToVerify = hash('This test message should verify.');\n const signature = method.sign(messageToVerify, keypair.privateKey);\n /* istanbul ignore if */\n if (method.verify(messageToVerify, signature, keypair.publicKey) !== true) {\n throw new Error('derived keypair did not generate verifiable signature');\n }\n return keypair;\n}\nfunction getAlgorithmFromKey(key) {\n const bytes = hexToBytes(key);\n return bytes.length === 33 && bytes[0] === 0xed\n ? 'ed25519'\n : 'ecdsa-secp256k1';\n}\nfunction sign(messageHex, privateKey) {\n const algorithm = getAlgorithmFromKey(privateKey);\n return select(algorithm).sign(hexToBytes(messageHex), privateKey);\n}\nfunction verify(messageHex, signature, publicKey) {\n const algorithm = getAlgorithmFromKey(publicKey);\n return select(algorithm).verify(hexToBytes(messageHex), signature, publicKey);\n}\nfunction deriveAddressFromBytes(publicKeyBytes) {\n return addressCodec.encodeAccountID(utils.computePublicKeyHash(publicKeyBytes));\n}\nfunction deriveAddress(publicKey) {\n return deriveAddressFromBytes(Buffer.from(hexToBytes(publicKey)));\n}\nfunction deriveNodeAddress(publicKey) {\n const generatorBytes = addressCodec.decodeNodePublic(publicKey);\n const accountPublicBytes = (0, secp256k1_1.accountPublicFromPublicGenerator)(generatorBytes);\n return deriveAddressFromBytes(accountPublicBytes);\n}\nconst { decodeSeed } = addressCodec;\nmodule.exports = {\n generateSeed,\n deriveKeypair,\n sign,\n verify,\n deriveAddress,\n deriveNodeAddress,\n decodeSeed,\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-keypairs/dist/index.js?");
2318
+ eval("/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"../../node_modules/buffer/index.js\")[\"Buffer\"];\n\nconst assert = __webpack_require__(/*! assert */ \"../../node_modules/assert/build/assert.js\");\nconst brorand = __webpack_require__(/*! brorand */ \"../../node_modules/brorand/index.js\");\nconst hashjs = __webpack_require__(/*! hash.js */ \"../../node_modules/hash.js/lib/hash.js\");\nconst elliptic = __webpack_require__(/*! elliptic */ \"../../node_modules/elliptic/lib/elliptic.js\");\nconst addressCodec = __webpack_require__(/*! ripple-address-codec */ \"../../node_modules/ripple-address-codec/dist/index.js\");\nconst secp256k1_1 = __webpack_require__(/*! ./secp256k1 */ \"../../node_modules/ripple-keypairs/dist/secp256k1.js\");\nconst utils = __webpack_require__(/*! ./utils */ \"../../node_modules/ripple-keypairs/dist/utils.js\");\nconst Ed25519 = elliptic.eddsa('ed25519');\nconst Secp256k1 = elliptic.ec('secp256k1');\nconst { hexToBytes } = utils;\nconst { bytesToHex } = utils;\nfunction generateSeed(options = {}) {\n assert.ok(!options.entropy || options.entropy.length >= 16, 'entropy too short');\n const entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);\n const type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';\n return addressCodec.encodeSeed(Buffer.from(entropy), type);\n}\nfunction hash(message) {\n return hashjs.sha512().update(message).digest().slice(0, 32);\n}\nconst secp256k1 = {\n deriveKeypair(entropy, options) {\n const prefix = '00';\n const privateKey = prefix + (0, secp256k1_1.derivePrivateKey)(entropy, options).toString(16, 64).toUpperCase();\n const publicKey = bytesToHex(Secp256k1.keyFromPrivate(privateKey.slice(2))\n .getPublic()\n .encodeCompressed());\n return { privateKey, publicKey };\n },\n sign(message, privateKey) {\n return bytesToHex(Secp256k1.sign(hash(message), hexToBytes(privateKey), {\n canonical: true,\n }).toDER());\n },\n verify(message, signature, publicKey) {\n return Secp256k1.verify(hash(message), signature, hexToBytes(publicKey));\n },\n};\nconst ed25519 = {\n deriveKeypair(entropy) {\n const prefix = 'ED';\n const rawPrivateKey = hash(entropy);\n const privateKey = prefix + bytesToHex(rawPrivateKey);\n const publicKey = prefix + bytesToHex(Ed25519.keyFromSecret(rawPrivateKey).pubBytes());\n return { privateKey, publicKey };\n },\n sign(message, privateKey) {\n // caution: Ed25519.sign interprets all strings as hex, stripping\n // any non-hex characters without warning\n assert.ok(Array.isArray(message), 'message must be array of octets');\n return bytesToHex(Ed25519.sign(message, hexToBytes(privateKey).slice(1)).toBytes());\n },\n verify(message, signature, publicKey) {\n return Ed25519.verify(message, hexToBytes(signature), hexToBytes(publicKey).slice(1));\n },\n};\nfunction select(algorithm) {\n const methods = { 'ecdsa-secp256k1': secp256k1, ed25519 };\n return methods[algorithm];\n}\nfunction deriveKeypair(seed, options) {\n const decoded = addressCodec.decodeSeed(seed);\n const algorithm = decoded.type === 'ed25519' ? 'ed25519' : 'ecdsa-secp256k1';\n const method = select(algorithm);\n const keypair = method.deriveKeypair(decoded.bytes, options);\n const messageToVerify = hash('This test message should verify.');\n const signature = method.sign(messageToVerify, keypair.privateKey);\n /* istanbul ignore if */\n if (method.verify(messageToVerify, signature, keypair.publicKey) !== true) {\n throw new Error('derived keypair did not generate verifiable signature');\n }\n return keypair;\n}\nfunction getAlgorithmFromKey(key) {\n const bytes = hexToBytes(key);\n return bytes.length === 33 && bytes[0] === 0xed\n ? 'ed25519'\n : 'ecdsa-secp256k1';\n}\nfunction sign(messageHex, privateKey) {\n const algorithm = getAlgorithmFromKey(privateKey);\n return select(algorithm).sign(hexToBytes(messageHex), privateKey);\n}\nfunction verify(messageHex, signature, publicKey) {\n const algorithm = getAlgorithmFromKey(publicKey);\n return select(algorithm).verify(hexToBytes(messageHex), signature, publicKey);\n}\nfunction deriveAddressFromBytes(publicKeyBytes) {\n return addressCodec.encodeAccountID(utils.computePublicKeyHash(publicKeyBytes));\n}\nfunction deriveAddress(publicKey) {\n return deriveAddressFromBytes(Buffer.from(hexToBytes(publicKey)));\n}\nfunction deriveNodeAddress(publicKey) {\n const generatorBytes = addressCodec.decodeNodePublic(publicKey);\n const accountPublicBytes = (0, secp256k1_1.accountPublicFromPublicGenerator)(generatorBytes);\n return deriveAddressFromBytes(accountPublicBytes);\n}\nconst { decodeSeed } = addressCodec;\nmodule.exports = {\n generateSeed,\n deriveKeypair,\n sign,\n verify,\n deriveAddress,\n deriveNodeAddress,\n decodeSeed,\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://xrpl/../../node_modules/ripple-keypairs/dist/index.js?");
2319
2319
 
2320
2320
  /***/ }),
2321
2321
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrpl",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "license": "ISC",
5
5
  "description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
6
6
  "files": [
@@ -24,11 +24,14 @@
24
24
  "bip39": "^3.0.4",
25
25
  "https-proxy-agent": "^5.0.0",
26
26
  "lodash": "^4.17.4",
27
- "ripple-address-codec": "^4.2.0",
28
- "ripple-binary-codec": "^1.2.0",
29
- "ripple-keypairs": "^1.1.0",
27
+ "ripple-address-codec": "^4.2.1",
28
+ "ripple-binary-codec": "^1.2.1",
29
+ "ripple-keypairs": "^1.1.1",
30
30
  "ws": "^8.2.2"
31
31
  },
32
+ "devDependencies": {
33
+ "xrpl-local": "file:./src"
34
+ },
32
35
  "resolutions": {
33
36
  "elliptic": "^6.5.4"
34
37
  },
@@ -61,7 +64,7 @@
61
64
  },
62
65
  "readmeFilename": "README.md",
63
66
  "engines": {
64
- "node": ">=10.13.0",
65
- "npm": ">=7.14.0 <8.0.0"
66
- }
67
+ "node": ">=10.13.0"
68
+ },
69
+ "gitHead": "7c6230b18ec2ed031c7e379ffb94e34b940b6542"
67
70
  }