xrpl 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/xrpl-latest.js
CHANGED
@@ -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 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
|
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 || 0;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Passing null is a common js mistake\n const flag = tag === false || tag == null ? 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 /* eslint-disable @typescript-eslint/naming-convention --\n * TODO 'test' should be something like 'isTest', do this later\n */\n const { accountId, tag, test } = decodeXAddress(xAddress);\n /* eslint-enable @typescript-eslint/naming-convention */\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 /* eslint-disable @typescript-eslint/naming-convention --\n * TODO 'test' should be something like 'isTest', do this later\n */\n const test = isBufferForTestAddress(decoded);\n /* eslint-enable @typescript-eslint/naming-convention */\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
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/common/index.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,MAAM,GAAG,CAAC,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAA;AAEvE,oBAAY,iBAAiB,GACzB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,iBAAiB,GACjB,aAAa,GACb,OAAO,CAAA;AAEX,UAAU,GAAG;IACX,QAAQ,EAAE,KAAK,CAAA;CAChB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,oBAAY,QAAQ,GAAG,cAAc,GAAG,GAAG,CAAA;AAE3C,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,KAAK,EAAE,MAAM,CAAA;CACd;AAED,oBAAY,MAAM,GAAG,oBAAoB,GAAG,MAAM,CAAA;AAElD,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,UAAU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
+
"version": "2.2.1",
|
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,7 +24,7 @@
|
|
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.
|
27
|
+
"ripple-address-codec": "^4.2.4",
|
28
28
|
"ripple-binary-codec": "^1.4.0",
|
29
29
|
"ripple-keypairs": "^1.1.3",
|
30
30
|
"ws": "^8.2.2"
|
@@ -66,5 +66,5 @@
|
|
66
66
|
"engines": {
|
67
67
|
"node": ">=10.13.0"
|
68
68
|
},
|
69
|
-
"gitHead": "
|
69
|
+
"gitHead": "fc6f85e4510073e9c8996a014aab66536b6f7233"
|
70
70
|
}
|