xrpl 2.8.0-beta.1 → 2.9.0-beta.0
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-min.js +1 -1
- package/build/xrpl-latest-min.js.map +1 -1
- package/build/xrpl-latest.js +1376 -2234
- package/build/xrpl-latest.js.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts +2 -1
- package/dist/npm/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/Wallet/defaultFaucets.js +12 -4
- package/dist/npm/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/Wallet/index.d.ts +0 -1
- package/dist/npm/Wallet/index.d.ts.map +1 -1
- package/dist/npm/Wallet/index.js +5 -81
- package/dist/npm/Wallet/index.js.map +1 -1
- package/dist/npm/client/index.d.ts +3 -1
- package/dist/npm/client/index.d.ts.map +1 -1
- package/dist/npm/client/index.js.map +1 -1
- package/dist/npm/models/common/index.d.ts +12 -0
- package/dist/npm/models/common/index.d.ts.map +1 -1
- package/dist/npm/models/index.d.ts +1 -0
- package/dist/npm/models/index.d.ts.map +1 -1
- package/dist/npm/models/index.js +1 -0
- package/dist/npm/models/index.js.map +1 -1
- package/dist/npm/models/ledger/AMM.d.ts +39 -0
- package/dist/npm/models/ledger/AMM.d.ts.map +1 -0
- package/dist/npm/{src/models/methods/federatorInfo.js → models/ledger/AMM.js} +1 -1
- package/dist/npm/models/ledger/AMM.js.map +1 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts +2 -0
- package/dist/npm/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/models/ledger/AccountRoot.js +1 -0
- package/dist/npm/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts +5 -1
- package/dist/npm/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/accountInfo.d.ts +3 -2
- package/dist/npm/models/methods/accountInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/models/methods/ammInfo.d.ts +2 -2
- package/dist/npm/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/models/methods/index.d.ts +5 -4
- package/dist/npm/models/methods/index.d.ts.map +1 -1
- package/dist/npm/models/methods/ledgerEntry.d.ts +10 -0
- package/dist/npm/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/models/methods/nftHistory.d.ts +35 -0
- package/dist/npm/models/methods/nftHistory.d.ts.map +1 -0
- package/dist/npm/models/methods/{federatorInfo.js → nftHistory.js} +1 -1
- package/dist/npm/models/methods/nftHistory.js.map +1 -0
- package/dist/npm/models/methods/nftInfo.d.ts +12 -0
- package/dist/npm/models/methods/nftInfo.d.ts.map +1 -0
- package/dist/npm/models/methods/nftInfo.js +3 -0
- package/dist/npm/models/methods/nftInfo.js.map +1 -0
- package/dist/npm/models/methods/tx.d.ts +3 -2
- package/dist/npm/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts +1 -1
- package/dist/npm/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js +2 -1
- package/dist/npm/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js +2 -1
- package/dist/npm/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/models/transactions/transaction.js +38 -0
- package/dist/npm/models/transactions/transaction.js.map +1 -1
- package/dist/npm/snippets/tsconfig.tsbuildinfo +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts +2 -1
- package/dist/npm/src/Wallet/defaultFaucets.d.ts.map +1 -1
- package/dist/npm/src/Wallet/defaultFaucets.js +12 -4
- package/dist/npm/src/Wallet/defaultFaucets.js.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.d.ts.map +1 -1
- package/dist/npm/src/Wallet/fundWallet.js.map +1 -1
- package/dist/npm/src/Wallet/index.d.ts +0 -1
- package/dist/npm/src/Wallet/index.d.ts.map +1 -1
- package/dist/npm/src/Wallet/index.js +5 -81
- package/dist/npm/src/Wallet/index.js.map +1 -1
- package/dist/npm/src/client/index.d.ts +3 -1
- package/dist/npm/src/client/index.d.ts.map +1 -1
- package/dist/npm/src/client/index.js.map +1 -1
- package/dist/npm/src/models/common/index.d.ts +12 -0
- package/dist/npm/src/models/common/index.d.ts.map +1 -1
- package/dist/npm/src/models/index.d.ts +1 -0
- package/dist/npm/src/models/index.d.ts.map +1 -1
- package/dist/npm/src/models/index.js +1 -0
- package/dist/npm/src/models/index.js.map +1 -1
- package/dist/npm/src/models/ledger/AMM.d.ts +39 -0
- package/dist/npm/src/models/ledger/AMM.d.ts.map +1 -0
- package/dist/npm/src/models/ledger/AMM.js +3 -0
- package/dist/npm/src/models/ledger/AMM.js.map +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts +2 -0
- package/dist/npm/src/models/ledger/AccountRoot.d.ts.map +1 -1
- package/dist/npm/src/models/ledger/AccountRoot.js +1 -0
- package/dist/npm/src/models/ledger/AccountRoot.js.map +1 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts +5 -1
- package/dist/npm/src/models/ledger/LedgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/accountInfo.d.ts +3 -2
- package/dist/npm/src/models/methods/accountInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/accountObjects.d.ts +3 -3
- package/dist/npm/src/models/methods/accountObjects.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ammInfo.d.ts +2 -2
- package/dist/npm/src/models/methods/ammInfo.d.ts.map +1 -1
- package/dist/npm/src/models/methods/index.d.ts +5 -4
- package/dist/npm/src/models/methods/index.d.ts.map +1 -1
- package/dist/npm/src/models/methods/ledgerEntry.d.ts +10 -0
- package/dist/npm/src/models/methods/ledgerEntry.d.ts.map +1 -1
- package/dist/npm/src/models/methods/nftHistory.d.ts +35 -0
- package/dist/npm/src/models/methods/nftHistory.d.ts.map +1 -0
- package/dist/npm/src/models/methods/nftHistory.js +3 -0
- package/dist/npm/src/models/methods/nftHistory.js.map +1 -0
- package/dist/npm/src/models/methods/nftInfo.d.ts +12 -0
- package/dist/npm/src/models/methods/nftInfo.d.ts.map +1 -0
- package/dist/npm/src/models/methods/nftInfo.js +3 -0
- package/dist/npm/src/models/methods/nftInfo.js.map +1 -0
- package/dist/npm/src/models/methods/tx.d.ts +3 -2
- package/dist/npm/src/models/methods/tx.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts +1 -1
- package/dist/npm/src/models/transactions/XChainAccountCreateCommit.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js +2 -1
- package/dist/npm/src/models/transactions/XChainAddAccountCreateAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js +2 -1
- package/dist/npm/src/models/transactions/XChainAddClaimAttestation.js.map +1 -1
- package/dist/npm/src/models/transactions/transaction.d.ts.map +1 -1
- package/dist/npm/src/models/transactions/transaction.js +38 -0
- package/dist/npm/src/models/transactions/transaction.js.map +1 -1
- package/dist/npm/src/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/src/sugar/autofill.js.map +1 -1
- package/dist/npm/src/sugar/getOrderbook.d.ts +1 -1
- package/dist/npm/src/sugar/getOrderbook.js +5 -5
- package/dist/npm/src/sugar/submit.d.ts +2 -2
- package/dist/npm/src/sugar/submit.d.ts.map +1 -1
- package/dist/npm/src/sugar/submit.js +14 -2
- package/dist/npm/src/sugar/submit.js.map +1 -1
- package/dist/npm/src/utils/index.d.ts +1 -2
- package/dist/npm/src/utils/index.d.ts.map +1 -1
- package/dist/npm/src/utils/index.js +1 -3
- package/dist/npm/src/utils/index.js.map +1 -1
- package/dist/npm/sugar/autofill.d.ts.map +1 -1
- package/dist/npm/sugar/autofill.js.map +1 -1
- package/dist/npm/sugar/getOrderbook.d.ts +1 -1
- package/dist/npm/sugar/getOrderbook.js +5 -5
- package/dist/npm/sugar/submit.d.ts +2 -2
- package/dist/npm/sugar/submit.d.ts.map +1 -1
- package/dist/npm/sugar/submit.js +14 -2
- package/dist/npm/sugar/submit.js.map +1 -1
- package/dist/npm/utils/index.d.ts +1 -2
- package/dist/npm/utils/index.d.ts.map +1 -1
- package/dist/npm/utils/index.js +1 -3
- package/dist/npm/utils/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/npm/models/methods/federatorInfo.d.ts +0 -64
- package/dist/npm/models/methods/federatorInfo.d.ts.map +0 -1
- package/dist/npm/models/methods/federatorInfo.js.map +0 -1
- package/dist/npm/src/models/methods/federatorInfo.d.ts +0 -64
- package/dist/npm/src/models/methods/federatorInfo.d.ts.map +0 -1
- package/dist/npm/src/models/methods/federatorInfo.js.map +0 -1
- package/dist/npm/src/utils/createCrossChainPayment.d.ts +0 -3
- package/dist/npm/src/utils/createCrossChainPayment.d.ts.map +0 -1
- package/dist/npm/src/utils/createCrossChainPayment.js +0 -19
- package/dist/npm/src/utils/createCrossChainPayment.js.map +0 -1
- package/dist/npm/utils/createCrossChainPayment.d.ts +0 -3
- package/dist/npm/utils/createCrossChainPayment.d.ts.map +0 -1
- package/dist/npm/utils/createCrossChainPayment.js +0 -19
- package/dist/npm/utils/createCrossChainPayment.js.map +0 -1
package/build/xrpl-latest.js
CHANGED
@@ -2,6 +2,1034 @@ var xrpl;
|
|
2
2
|
/******/ (() => { // webpackBootstrap
|
3
3
|
/******/ var __webpack_modules__ = ({
|
4
4
|
|
5
|
+
/***/ "../../node_modules/@noble/hashes/_assert.js":
|
6
|
+
/*!***************************************************!*\
|
7
|
+
!*** ../../node_modules/@noble/hashes/_assert.js ***!
|
8
|
+
\***************************************************/
|
9
|
+
/***/ ((__unused_webpack_module, exports) => {
|
10
|
+
|
11
|
+
"use strict";
|
12
|
+
|
13
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
14
|
+
exports.output = exports.exists = exports.hash = exports.bytes = exports.bool = exports.number = void 0;
|
15
|
+
function number(n) {
|
16
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
17
|
+
throw new Error(`Wrong positive integer: ${n}`);
|
18
|
+
}
|
19
|
+
exports.number = number;
|
20
|
+
function bool(b) {
|
21
|
+
if (typeof b !== 'boolean')
|
22
|
+
throw new Error(`Expected boolean, not ${b}`);
|
23
|
+
}
|
24
|
+
exports.bool = bool;
|
25
|
+
function bytes(b, ...lengths) {
|
26
|
+
if (!(b instanceof Uint8Array))
|
27
|
+
throw new TypeError('Expected Uint8Array');
|
28
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
29
|
+
throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
|
30
|
+
}
|
31
|
+
exports.bytes = bytes;
|
32
|
+
function hash(hash) {
|
33
|
+
if (typeof hash !== 'function' || typeof hash.create !== 'function')
|
34
|
+
throw new Error('Hash should be wrapped by utils.wrapConstructor');
|
35
|
+
number(hash.outputLen);
|
36
|
+
number(hash.blockLen);
|
37
|
+
}
|
38
|
+
exports.hash = hash;
|
39
|
+
function exists(instance, checkFinished = true) {
|
40
|
+
if (instance.destroyed)
|
41
|
+
throw new Error('Hash instance has been destroyed');
|
42
|
+
if (checkFinished && instance.finished)
|
43
|
+
throw new Error('Hash#digest() has already been called');
|
44
|
+
}
|
45
|
+
exports.exists = exists;
|
46
|
+
function output(out, instance) {
|
47
|
+
bytes(out);
|
48
|
+
const min = instance.outputLen;
|
49
|
+
if (out.length < min) {
|
50
|
+
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
exports.output = output;
|
54
|
+
const assert = {
|
55
|
+
number,
|
56
|
+
bool,
|
57
|
+
bytes,
|
58
|
+
hash,
|
59
|
+
exists,
|
60
|
+
output,
|
61
|
+
};
|
62
|
+
exports["default"] = assert;
|
63
|
+
|
64
|
+
|
65
|
+
/***/ }),
|
66
|
+
|
67
|
+
/***/ "../../node_modules/@noble/hashes/_sha2.js":
|
68
|
+
/*!*************************************************!*\
|
69
|
+
!*** ../../node_modules/@noble/hashes/_sha2.js ***!
|
70
|
+
\*************************************************/
|
71
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
72
|
+
|
73
|
+
"use strict";
|
74
|
+
|
75
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
76
|
+
exports.SHA2 = void 0;
|
77
|
+
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
78
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
79
|
+
// Polyfill for Safari 14
|
80
|
+
function setBigUint64(view, byteOffset, value, isLE) {
|
81
|
+
if (typeof view.setBigUint64 === 'function')
|
82
|
+
return view.setBigUint64(byteOffset, value, isLE);
|
83
|
+
const _32n = BigInt(32);
|
84
|
+
const _u32_max = BigInt(0xffffffff);
|
85
|
+
const wh = Number((value >> _32n) & _u32_max);
|
86
|
+
const wl = Number(value & _u32_max);
|
87
|
+
const h = isLE ? 4 : 0;
|
88
|
+
const l = isLE ? 0 : 4;
|
89
|
+
view.setUint32(byteOffset + h, wh, isLE);
|
90
|
+
view.setUint32(byteOffset + l, wl, isLE);
|
91
|
+
}
|
92
|
+
// Base SHA2 class (RFC 6234)
|
93
|
+
class SHA2 extends utils_js_1.Hash {
|
94
|
+
constructor(blockLen, outputLen, padOffset, isLE) {
|
95
|
+
super();
|
96
|
+
this.blockLen = blockLen;
|
97
|
+
this.outputLen = outputLen;
|
98
|
+
this.padOffset = padOffset;
|
99
|
+
this.isLE = isLE;
|
100
|
+
this.finished = false;
|
101
|
+
this.length = 0;
|
102
|
+
this.pos = 0;
|
103
|
+
this.destroyed = false;
|
104
|
+
this.buffer = new Uint8Array(blockLen);
|
105
|
+
this.view = (0, utils_js_1.createView)(this.buffer);
|
106
|
+
}
|
107
|
+
update(data) {
|
108
|
+
_assert_js_1.default.exists(this);
|
109
|
+
const { view, buffer, blockLen } = this;
|
110
|
+
data = (0, utils_js_1.toBytes)(data);
|
111
|
+
const len = data.length;
|
112
|
+
for (let pos = 0; pos < len;) {
|
113
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
114
|
+
// Fast path: we have at least one block in input, cast it to view and process
|
115
|
+
if (take === blockLen) {
|
116
|
+
const dataView = (0, utils_js_1.createView)(data);
|
117
|
+
for (; blockLen <= len - pos; pos += blockLen)
|
118
|
+
this.process(dataView, pos);
|
119
|
+
continue;
|
120
|
+
}
|
121
|
+
buffer.set(data.subarray(pos, pos + take), this.pos);
|
122
|
+
this.pos += take;
|
123
|
+
pos += take;
|
124
|
+
if (this.pos === blockLen) {
|
125
|
+
this.process(view, 0);
|
126
|
+
this.pos = 0;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
this.length += data.length;
|
130
|
+
this.roundClean();
|
131
|
+
return this;
|
132
|
+
}
|
133
|
+
digestInto(out) {
|
134
|
+
_assert_js_1.default.exists(this);
|
135
|
+
_assert_js_1.default.output(out, this);
|
136
|
+
this.finished = true;
|
137
|
+
// Padding
|
138
|
+
// We can avoid allocation of buffer for padding completely if it
|
139
|
+
// was previously not allocated here. But it won't change performance.
|
140
|
+
const { buffer, view, blockLen, isLE } = this;
|
141
|
+
let { pos } = this;
|
142
|
+
// append the bit '1' to the message
|
143
|
+
buffer[pos++] = 0b10000000;
|
144
|
+
this.buffer.subarray(pos).fill(0);
|
145
|
+
// we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again
|
146
|
+
if (this.padOffset > blockLen - pos) {
|
147
|
+
this.process(view, 0);
|
148
|
+
pos = 0;
|
149
|
+
}
|
150
|
+
// Pad until full block byte with zeros
|
151
|
+
for (let i = pos; i < blockLen; i++)
|
152
|
+
buffer[i] = 0;
|
153
|
+
// Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that
|
154
|
+
// You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.
|
155
|
+
// So we just write lowest 64 bits of that value.
|
156
|
+
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
|
157
|
+
this.process(view, 0);
|
158
|
+
const oview = (0, utils_js_1.createView)(out);
|
159
|
+
const len = this.outputLen;
|
160
|
+
// NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT
|
161
|
+
if (len % 4)
|
162
|
+
throw new Error('_sha2: outputLen should be aligned to 32bit');
|
163
|
+
const outLen = len / 4;
|
164
|
+
const state = this.get();
|
165
|
+
if (outLen > state.length)
|
166
|
+
throw new Error('_sha2: outputLen bigger than state');
|
167
|
+
for (let i = 0; i < outLen; i++)
|
168
|
+
oview.setUint32(4 * i, state[i], isLE);
|
169
|
+
}
|
170
|
+
digest() {
|
171
|
+
const { buffer, outputLen } = this;
|
172
|
+
this.digestInto(buffer);
|
173
|
+
const res = buffer.slice(0, outputLen);
|
174
|
+
this.destroy();
|
175
|
+
return res;
|
176
|
+
}
|
177
|
+
_cloneInto(to) {
|
178
|
+
to || (to = new this.constructor());
|
179
|
+
to.set(...this.get());
|
180
|
+
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
181
|
+
to.length = length;
|
182
|
+
to.pos = pos;
|
183
|
+
to.finished = finished;
|
184
|
+
to.destroyed = destroyed;
|
185
|
+
if (length % blockLen)
|
186
|
+
to.buffer.set(buffer);
|
187
|
+
return to;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
exports.SHA2 = SHA2;
|
191
|
+
|
192
|
+
|
193
|
+
/***/ }),
|
194
|
+
|
195
|
+
/***/ "../../node_modules/@noble/hashes/_u64.js":
|
196
|
+
/*!************************************************!*\
|
197
|
+
!*** ../../node_modules/@noble/hashes/_u64.js ***!
|
198
|
+
\************************************************/
|
199
|
+
/***/ ((__unused_webpack_module, exports) => {
|
200
|
+
|
201
|
+
"use strict";
|
202
|
+
|
203
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
204
|
+
exports.add = exports.toBig = exports.split = exports.fromBig = void 0;
|
205
|
+
const U32_MASK64 = BigInt(2 ** 32 - 1);
|
206
|
+
const _32n = BigInt(32);
|
207
|
+
// We are not using BigUint64Array, because they are extremely slow as per 2022
|
208
|
+
function fromBig(n, le = false) {
|
209
|
+
if (le)
|
210
|
+
return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };
|
211
|
+
return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
212
|
+
}
|
213
|
+
exports.fromBig = fromBig;
|
214
|
+
function split(lst, le = false) {
|
215
|
+
let Ah = new Uint32Array(lst.length);
|
216
|
+
let Al = new Uint32Array(lst.length);
|
217
|
+
for (let i = 0; i < lst.length; i++) {
|
218
|
+
const { h, l } = fromBig(lst[i], le);
|
219
|
+
[Ah[i], Al[i]] = [h, l];
|
220
|
+
}
|
221
|
+
return [Ah, Al];
|
222
|
+
}
|
223
|
+
exports.split = split;
|
224
|
+
const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);
|
225
|
+
exports.toBig = toBig;
|
226
|
+
// for Shift in [0, 32)
|
227
|
+
const shrSH = (h, l, s) => h >>> s;
|
228
|
+
const shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
|
229
|
+
// Right rotate for Shift in [1, 32)
|
230
|
+
const rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));
|
231
|
+
const rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);
|
232
|
+
// Right rotate for Shift in (32, 64), NOTE: 32 is special case.
|
233
|
+
const rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));
|
234
|
+
const rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));
|
235
|
+
// Right rotate for shift===32 (just swaps l&h)
|
236
|
+
const rotr32H = (h, l) => l;
|
237
|
+
const rotr32L = (h, l) => h;
|
238
|
+
// Left rotate for Shift in [1, 32)
|
239
|
+
const rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));
|
240
|
+
const rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));
|
241
|
+
// Left rotate for Shift in (32, 64), NOTE: 32 is special case.
|
242
|
+
const rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));
|
243
|
+
const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));
|
244
|
+
// JS uses 32-bit signed integers for bitwise operations which means we cannot
|
245
|
+
// simple take carry out of low bit sum by shift, we need to use division.
|
246
|
+
// Removing "export" has 5% perf penalty -_-
|
247
|
+
function add(Ah, Al, Bh, Bl) {
|
248
|
+
const l = (Al >>> 0) + (Bl >>> 0);
|
249
|
+
return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };
|
250
|
+
}
|
251
|
+
exports.add = add;
|
252
|
+
// Addition with more than 2 elements
|
253
|
+
const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
254
|
+
const add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;
|
255
|
+
const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
256
|
+
const add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;
|
257
|
+
const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
258
|
+
const add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;
|
259
|
+
// prettier-ignore
|
260
|
+
const u64 = {
|
261
|
+
fromBig, split, toBig: exports.toBig,
|
262
|
+
shrSH, shrSL,
|
263
|
+
rotrSH, rotrSL, rotrBH, rotrBL,
|
264
|
+
rotr32H, rotr32L,
|
265
|
+
rotlSH, rotlSL, rotlBH, rotlBL,
|
266
|
+
add, add3L, add3H, add4L, add4H, add5H, add5L,
|
267
|
+
};
|
268
|
+
exports["default"] = u64;
|
269
|
+
|
270
|
+
|
271
|
+
/***/ }),
|
272
|
+
|
273
|
+
/***/ "../../node_modules/@noble/hashes/crypto.js":
|
274
|
+
/*!**************************************************!*\
|
275
|
+
!*** ../../node_modules/@noble/hashes/crypto.js ***!
|
276
|
+
\**************************************************/
|
277
|
+
/***/ ((__unused_webpack_module, exports) => {
|
278
|
+
|
279
|
+
"use strict";
|
280
|
+
|
281
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
282
|
+
exports.crypto = void 0;
|
283
|
+
exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
284
|
+
|
285
|
+
|
286
|
+
/***/ }),
|
287
|
+
|
288
|
+
/***/ "../../node_modules/@noble/hashes/hmac.js":
|
289
|
+
/*!************************************************!*\
|
290
|
+
!*** ../../node_modules/@noble/hashes/hmac.js ***!
|
291
|
+
\************************************************/
|
292
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
293
|
+
|
294
|
+
"use strict";
|
295
|
+
|
296
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
297
|
+
exports.hmac = void 0;
|
298
|
+
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
299
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
300
|
+
// HMAC (RFC 2104)
|
301
|
+
class HMAC extends utils_js_1.Hash {
|
302
|
+
constructor(hash, _key) {
|
303
|
+
super();
|
304
|
+
this.finished = false;
|
305
|
+
this.destroyed = false;
|
306
|
+
_assert_js_1.default.hash(hash);
|
307
|
+
const key = (0, utils_js_1.toBytes)(_key);
|
308
|
+
this.iHash = hash.create();
|
309
|
+
if (typeof this.iHash.update !== 'function')
|
310
|
+
throw new TypeError('Expected instance of class which extends utils.Hash');
|
311
|
+
this.blockLen = this.iHash.blockLen;
|
312
|
+
this.outputLen = this.iHash.outputLen;
|
313
|
+
const blockLen = this.blockLen;
|
314
|
+
const pad = new Uint8Array(blockLen);
|
315
|
+
// blockLen can be bigger than outputLen
|
316
|
+
pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
|
317
|
+
for (let i = 0; i < pad.length; i++)
|
318
|
+
pad[i] ^= 0x36;
|
319
|
+
this.iHash.update(pad);
|
320
|
+
// By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone
|
321
|
+
this.oHash = hash.create();
|
322
|
+
// Undo internal XOR && apply outer XOR
|
323
|
+
for (let i = 0; i < pad.length; i++)
|
324
|
+
pad[i] ^= 0x36 ^ 0x5c;
|
325
|
+
this.oHash.update(pad);
|
326
|
+
pad.fill(0);
|
327
|
+
}
|
328
|
+
update(buf) {
|
329
|
+
_assert_js_1.default.exists(this);
|
330
|
+
this.iHash.update(buf);
|
331
|
+
return this;
|
332
|
+
}
|
333
|
+
digestInto(out) {
|
334
|
+
_assert_js_1.default.exists(this);
|
335
|
+
_assert_js_1.default.bytes(out, this.outputLen);
|
336
|
+
this.finished = true;
|
337
|
+
this.iHash.digestInto(out);
|
338
|
+
this.oHash.update(out);
|
339
|
+
this.oHash.digestInto(out);
|
340
|
+
this.destroy();
|
341
|
+
}
|
342
|
+
digest() {
|
343
|
+
const out = new Uint8Array(this.oHash.outputLen);
|
344
|
+
this.digestInto(out);
|
345
|
+
return out;
|
346
|
+
}
|
347
|
+
_cloneInto(to) {
|
348
|
+
// Create new instance without calling constructor since key already in state and we don't know it.
|
349
|
+
to || (to = Object.create(Object.getPrototypeOf(this), {}));
|
350
|
+
const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
|
351
|
+
to = to;
|
352
|
+
to.finished = finished;
|
353
|
+
to.destroyed = destroyed;
|
354
|
+
to.blockLen = blockLen;
|
355
|
+
to.outputLen = outputLen;
|
356
|
+
to.oHash = oHash._cloneInto(to.oHash);
|
357
|
+
to.iHash = iHash._cloneInto(to.iHash);
|
358
|
+
return to;
|
359
|
+
}
|
360
|
+
destroy() {
|
361
|
+
this.destroyed = true;
|
362
|
+
this.oHash.destroy();
|
363
|
+
this.iHash.destroy();
|
364
|
+
}
|
365
|
+
}
|
366
|
+
/**
|
367
|
+
* HMAC: RFC2104 message authentication code.
|
368
|
+
* @param hash - function that would be used e.g. sha256
|
369
|
+
* @param key - message key
|
370
|
+
* @param message - message data
|
371
|
+
*/
|
372
|
+
const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
|
373
|
+
exports.hmac = hmac;
|
374
|
+
exports.hmac.create = (hash, key) => new HMAC(hash, key);
|
375
|
+
|
376
|
+
|
377
|
+
/***/ }),
|
378
|
+
|
379
|
+
/***/ "../../node_modules/@noble/hashes/pbkdf2.js":
|
380
|
+
/*!**************************************************!*\
|
381
|
+
!*** ../../node_modules/@noble/hashes/pbkdf2.js ***!
|
382
|
+
\**************************************************/
|
383
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
384
|
+
|
385
|
+
"use strict";
|
386
|
+
|
387
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
388
|
+
exports.pbkdf2Async = exports.pbkdf2 = void 0;
|
389
|
+
const _assert_js_1 = __webpack_require__(/*! ./_assert.js */ "../../node_modules/@noble/hashes/_assert.js");
|
390
|
+
const hmac_js_1 = __webpack_require__(/*! ./hmac.js */ "../../node_modules/@noble/hashes/hmac.js");
|
391
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
392
|
+
// Common prologue and epilogue for sync/async functions
|
393
|
+
function pbkdf2Init(hash, _password, _salt, _opts) {
|
394
|
+
_assert_js_1.default.hash(hash);
|
395
|
+
const opts = (0, utils_js_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);
|
396
|
+
const { c, dkLen, asyncTick } = opts;
|
397
|
+
_assert_js_1.default.number(c);
|
398
|
+
_assert_js_1.default.number(dkLen);
|
399
|
+
_assert_js_1.default.number(asyncTick);
|
400
|
+
if (c < 1)
|
401
|
+
throw new Error('PBKDF2: iterations (c) should be >= 1');
|
402
|
+
const password = (0, utils_js_1.toBytes)(_password);
|
403
|
+
const salt = (0, utils_js_1.toBytes)(_salt);
|
404
|
+
// DK = PBKDF2(PRF, Password, Salt, c, dkLen);
|
405
|
+
const DK = new Uint8Array(dkLen);
|
406
|
+
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
407
|
+
const PRF = hmac_js_1.hmac.create(hash, password);
|
408
|
+
const PRFSalt = PRF._cloneInto().update(salt);
|
409
|
+
return { c, dkLen, asyncTick, DK, PRF, PRFSalt };
|
410
|
+
}
|
411
|
+
function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
|
412
|
+
PRF.destroy();
|
413
|
+
PRFSalt.destroy();
|
414
|
+
if (prfW)
|
415
|
+
prfW.destroy();
|
416
|
+
u.fill(0);
|
417
|
+
return DK;
|
418
|
+
}
|
419
|
+
/**
|
420
|
+
* PBKDF2-HMAC: RFC 2898 key derivation function
|
421
|
+
* @param hash - hash function that would be used e.g. sha256
|
422
|
+
* @param password - password from which a derived key is generated
|
423
|
+
* @param salt - cryptographic salt
|
424
|
+
* @param opts - {c, dkLen} where c is work factor and dkLen is output message size
|
425
|
+
*/
|
426
|
+
function pbkdf2(hash, password, salt, opts) {
|
427
|
+
const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
428
|
+
let prfW; // Working copy
|
429
|
+
const arr = new Uint8Array(4);
|
430
|
+
const view = (0, utils_js_1.createView)(arr);
|
431
|
+
const u = new Uint8Array(PRF.outputLen);
|
432
|
+
// DK = T1 + T2 + ⋯ + Tdklen/hlen
|
433
|
+
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
|
434
|
+
// Ti = F(Password, Salt, c, i)
|
435
|
+
const Ti = DK.subarray(pos, pos + PRF.outputLen);
|
436
|
+
view.setInt32(0, ti, false);
|
437
|
+
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
|
438
|
+
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
439
|
+
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
|
440
|
+
Ti.set(u.subarray(0, Ti.length));
|
441
|
+
for (let ui = 1; ui < c; ui++) {
|
442
|
+
// Uc = PRF(Password, Uc−1)
|
443
|
+
PRF._cloneInto(prfW).update(u).digestInto(u);
|
444
|
+
for (let i = 0; i < Ti.length; i++)
|
445
|
+
Ti[i] ^= u[i];
|
446
|
+
}
|
447
|
+
}
|
448
|
+
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
449
|
+
}
|
450
|
+
exports.pbkdf2 = pbkdf2;
|
451
|
+
async function pbkdf2Async(hash, password, salt, opts) {
|
452
|
+
const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
|
453
|
+
let prfW; // Working copy
|
454
|
+
const arr = new Uint8Array(4);
|
455
|
+
const view = (0, utils_js_1.createView)(arr);
|
456
|
+
const u = new Uint8Array(PRF.outputLen);
|
457
|
+
// DK = T1 + T2 + ⋯ + Tdklen/hlen
|
458
|
+
for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
|
459
|
+
// Ti = F(Password, Salt, c, i)
|
460
|
+
const Ti = DK.subarray(pos, pos + PRF.outputLen);
|
461
|
+
view.setInt32(0, ti, false);
|
462
|
+
// F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc
|
463
|
+
// U1 = PRF(Password, Salt + INT_32_BE(i))
|
464
|
+
(prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
|
465
|
+
Ti.set(u.subarray(0, Ti.length));
|
466
|
+
await (0, utils_js_1.asyncLoop)(c - 1, asyncTick, (i) => {
|
467
|
+
// Uc = PRF(Password, Uc−1)
|
468
|
+
PRF._cloneInto(prfW).update(u).digestInto(u);
|
469
|
+
for (let i = 0; i < Ti.length; i++)
|
470
|
+
Ti[i] ^= u[i];
|
471
|
+
});
|
472
|
+
}
|
473
|
+
return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
|
474
|
+
}
|
475
|
+
exports.pbkdf2Async = pbkdf2Async;
|
476
|
+
|
477
|
+
|
478
|
+
/***/ }),
|
479
|
+
|
480
|
+
/***/ "../../node_modules/@noble/hashes/sha256.js":
|
481
|
+
/*!**************************************************!*\
|
482
|
+
!*** ../../node_modules/@noble/hashes/sha256.js ***!
|
483
|
+
\**************************************************/
|
484
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
485
|
+
|
486
|
+
"use strict";
|
487
|
+
|
488
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
489
|
+
exports.sha224 = exports.sha256 = void 0;
|
490
|
+
const _sha2_js_1 = __webpack_require__(/*! ./_sha2.js */ "../../node_modules/@noble/hashes/_sha2.js");
|
491
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
492
|
+
// Choice: a ? b : c
|
493
|
+
const Chi = (a, b, c) => (a & b) ^ (~a & c);
|
494
|
+
// Majority function, true if any two inpust is true
|
495
|
+
const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);
|
496
|
+
// Round constants:
|
497
|
+
// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)
|
498
|
+
// prettier-ignore
|
499
|
+
const SHA256_K = new Uint32Array([
|
500
|
+
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
501
|
+
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
502
|
+
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
503
|
+
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
504
|
+
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
505
|
+
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
506
|
+
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
507
|
+
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
508
|
+
]);
|
509
|
+
// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
|
510
|
+
// prettier-ignore
|
511
|
+
const IV = new Uint32Array([
|
512
|
+
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
513
|
+
]);
|
514
|
+
// Temporary buffer, not used to store anything between runs
|
515
|
+
// Named this way because it matches specification.
|
516
|
+
const SHA256_W = new Uint32Array(64);
|
517
|
+
class SHA256 extends _sha2_js_1.SHA2 {
|
518
|
+
constructor() {
|
519
|
+
super(64, 32, 8, false);
|
520
|
+
// We cannot use array here since array allows indexing by variable
|
521
|
+
// which means optimizer/compiler cannot use registers.
|
522
|
+
this.A = IV[0] | 0;
|
523
|
+
this.B = IV[1] | 0;
|
524
|
+
this.C = IV[2] | 0;
|
525
|
+
this.D = IV[3] | 0;
|
526
|
+
this.E = IV[4] | 0;
|
527
|
+
this.F = IV[5] | 0;
|
528
|
+
this.G = IV[6] | 0;
|
529
|
+
this.H = IV[7] | 0;
|
530
|
+
}
|
531
|
+
get() {
|
532
|
+
const { A, B, C, D, E, F, G, H } = this;
|
533
|
+
return [A, B, C, D, E, F, G, H];
|
534
|
+
}
|
535
|
+
// prettier-ignore
|
536
|
+
set(A, B, C, D, E, F, G, H) {
|
537
|
+
this.A = A | 0;
|
538
|
+
this.B = B | 0;
|
539
|
+
this.C = C | 0;
|
540
|
+
this.D = D | 0;
|
541
|
+
this.E = E | 0;
|
542
|
+
this.F = F | 0;
|
543
|
+
this.G = G | 0;
|
544
|
+
this.H = H | 0;
|
545
|
+
}
|
546
|
+
process(view, offset) {
|
547
|
+
// Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array
|
548
|
+
for (let i = 0; i < 16; i++, offset += 4)
|
549
|
+
SHA256_W[i] = view.getUint32(offset, false);
|
550
|
+
for (let i = 16; i < 64; i++) {
|
551
|
+
const W15 = SHA256_W[i - 15];
|
552
|
+
const W2 = SHA256_W[i - 2];
|
553
|
+
const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ (W15 >>> 3);
|
554
|
+
const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ (W2 >>> 10);
|
555
|
+
SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;
|
556
|
+
}
|
557
|
+
// Compression function main loop, 64 rounds
|
558
|
+
let { A, B, C, D, E, F, G, H } = this;
|
559
|
+
for (let i = 0; i < 64; i++) {
|
560
|
+
const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);
|
561
|
+
const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
562
|
+
const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);
|
563
|
+
const T2 = (sigma0 + Maj(A, B, C)) | 0;
|
564
|
+
H = G;
|
565
|
+
G = F;
|
566
|
+
F = E;
|
567
|
+
E = (D + T1) | 0;
|
568
|
+
D = C;
|
569
|
+
C = B;
|
570
|
+
B = A;
|
571
|
+
A = (T1 + T2) | 0;
|
572
|
+
}
|
573
|
+
// Add the compressed chunk to the current hash value
|
574
|
+
A = (A + this.A) | 0;
|
575
|
+
B = (B + this.B) | 0;
|
576
|
+
C = (C + this.C) | 0;
|
577
|
+
D = (D + this.D) | 0;
|
578
|
+
E = (E + this.E) | 0;
|
579
|
+
F = (F + this.F) | 0;
|
580
|
+
G = (G + this.G) | 0;
|
581
|
+
H = (H + this.H) | 0;
|
582
|
+
this.set(A, B, C, D, E, F, G, H);
|
583
|
+
}
|
584
|
+
roundClean() {
|
585
|
+
SHA256_W.fill(0);
|
586
|
+
}
|
587
|
+
destroy() {
|
588
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
589
|
+
this.buffer.fill(0);
|
590
|
+
}
|
591
|
+
}
|
592
|
+
// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
|
593
|
+
class SHA224 extends SHA256 {
|
594
|
+
constructor() {
|
595
|
+
super();
|
596
|
+
this.A = 0xc1059ed8 | 0;
|
597
|
+
this.B = 0x367cd507 | 0;
|
598
|
+
this.C = 0x3070dd17 | 0;
|
599
|
+
this.D = 0xf70e5939 | 0;
|
600
|
+
this.E = 0xffc00b31 | 0;
|
601
|
+
this.F = 0x68581511 | 0;
|
602
|
+
this.G = 0x64f98fa7 | 0;
|
603
|
+
this.H = 0xbefa4fa4 | 0;
|
604
|
+
this.outputLen = 28;
|
605
|
+
}
|
606
|
+
}
|
607
|
+
/**
|
608
|
+
* SHA2-256 hash function
|
609
|
+
* @param message - data that would be hashed
|
610
|
+
*/
|
611
|
+
exports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());
|
612
|
+
exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());
|
613
|
+
|
614
|
+
|
615
|
+
/***/ }),
|
616
|
+
|
617
|
+
/***/ "../../node_modules/@noble/hashes/sha512.js":
|
618
|
+
/*!**************************************************!*\
|
619
|
+
!*** ../../node_modules/@noble/hashes/sha512.js ***!
|
620
|
+
\**************************************************/
|
621
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
622
|
+
|
623
|
+
"use strict";
|
624
|
+
|
625
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
626
|
+
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA512 = void 0;
|
627
|
+
const _sha2_js_1 = __webpack_require__(/*! ./_sha2.js */ "../../node_modules/@noble/hashes/_sha2.js");
|
628
|
+
const _u64_js_1 = __webpack_require__(/*! ./_u64.js */ "../../node_modules/@noble/hashes/_u64.js");
|
629
|
+
const utils_js_1 = __webpack_require__(/*! ./utils.js */ "../../node_modules/@noble/hashes/utils.js");
|
630
|
+
// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):
|
631
|
+
// prettier-ignore
|
632
|
+
const [SHA512_Kh, SHA512_Kl] = _u64_js_1.default.split([
|
633
|
+
'0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',
|
634
|
+
'0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',
|
635
|
+
'0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',
|
636
|
+
'0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',
|
637
|
+
'0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',
|
638
|
+
'0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',
|
639
|
+
'0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',
|
640
|
+
'0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',
|
641
|
+
'0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',
|
642
|
+
'0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',
|
643
|
+
'0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',
|
644
|
+
'0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',
|
645
|
+
'0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',
|
646
|
+
'0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',
|
647
|
+
'0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',
|
648
|
+
'0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',
|
649
|
+
'0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',
|
650
|
+
'0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',
|
651
|
+
'0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',
|
652
|
+
'0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'
|
653
|
+
].map(n => BigInt(n)));
|
654
|
+
// Temporary buffer, not used to store anything between runs
|
655
|
+
const SHA512_W_H = new Uint32Array(80);
|
656
|
+
const SHA512_W_L = new Uint32Array(80);
|
657
|
+
class SHA512 extends _sha2_js_1.SHA2 {
|
658
|
+
constructor() {
|
659
|
+
super(128, 64, 16, false);
|
660
|
+
// We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.
|
661
|
+
// Also looks cleaner and easier to verify with spec.
|
662
|
+
// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):
|
663
|
+
// h -- high 32 bits, l -- low 32 bits
|
664
|
+
this.Ah = 0x6a09e667 | 0;
|
665
|
+
this.Al = 0xf3bcc908 | 0;
|
666
|
+
this.Bh = 0xbb67ae85 | 0;
|
667
|
+
this.Bl = 0x84caa73b | 0;
|
668
|
+
this.Ch = 0x3c6ef372 | 0;
|
669
|
+
this.Cl = 0xfe94f82b | 0;
|
670
|
+
this.Dh = 0xa54ff53a | 0;
|
671
|
+
this.Dl = 0x5f1d36f1 | 0;
|
672
|
+
this.Eh = 0x510e527f | 0;
|
673
|
+
this.El = 0xade682d1 | 0;
|
674
|
+
this.Fh = 0x9b05688c | 0;
|
675
|
+
this.Fl = 0x2b3e6c1f | 0;
|
676
|
+
this.Gh = 0x1f83d9ab | 0;
|
677
|
+
this.Gl = 0xfb41bd6b | 0;
|
678
|
+
this.Hh = 0x5be0cd19 | 0;
|
679
|
+
this.Hl = 0x137e2179 | 0;
|
680
|
+
}
|
681
|
+
// prettier-ignore
|
682
|
+
get() {
|
683
|
+
const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
684
|
+
return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];
|
685
|
+
}
|
686
|
+
// prettier-ignore
|
687
|
+
set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
|
688
|
+
this.Ah = Ah | 0;
|
689
|
+
this.Al = Al | 0;
|
690
|
+
this.Bh = Bh | 0;
|
691
|
+
this.Bl = Bl | 0;
|
692
|
+
this.Ch = Ch | 0;
|
693
|
+
this.Cl = Cl | 0;
|
694
|
+
this.Dh = Dh | 0;
|
695
|
+
this.Dl = Dl | 0;
|
696
|
+
this.Eh = Eh | 0;
|
697
|
+
this.El = El | 0;
|
698
|
+
this.Fh = Fh | 0;
|
699
|
+
this.Fl = Fl | 0;
|
700
|
+
this.Gh = Gh | 0;
|
701
|
+
this.Gl = Gl | 0;
|
702
|
+
this.Hh = Hh | 0;
|
703
|
+
this.Hl = Hl | 0;
|
704
|
+
}
|
705
|
+
process(view, offset) {
|
706
|
+
// Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array
|
707
|
+
for (let i = 0; i < 16; i++, offset += 4) {
|
708
|
+
SHA512_W_H[i] = view.getUint32(offset);
|
709
|
+
SHA512_W_L[i] = view.getUint32((offset += 4));
|
710
|
+
}
|
711
|
+
for (let i = 16; i < 80; i++) {
|
712
|
+
// s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)
|
713
|
+
const W15h = SHA512_W_H[i - 15] | 0;
|
714
|
+
const W15l = SHA512_W_L[i - 15] | 0;
|
715
|
+
const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);
|
716
|
+
const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);
|
717
|
+
// s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)
|
718
|
+
const W2h = SHA512_W_H[i - 2] | 0;
|
719
|
+
const W2l = SHA512_W_L[i - 2] | 0;
|
720
|
+
const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);
|
721
|
+
const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);
|
722
|
+
// SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];
|
723
|
+
const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
724
|
+
const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
725
|
+
SHA512_W_H[i] = SUMh | 0;
|
726
|
+
SHA512_W_L[i] = SUMl | 0;
|
727
|
+
}
|
728
|
+
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
729
|
+
// Compression function main loop, 80 rounds
|
730
|
+
for (let i = 0; i < 80; i++) {
|
731
|
+
// S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)
|
732
|
+
const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);
|
733
|
+
const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);
|
734
|
+
//const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;
|
735
|
+
const CHIh = (Eh & Fh) ^ (~Eh & Gh);
|
736
|
+
const CHIl = (El & Fl) ^ (~El & Gl);
|
737
|
+
// T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]
|
738
|
+
// prettier-ignore
|
739
|
+
const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
740
|
+
const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
741
|
+
const T1l = T1ll | 0;
|
742
|
+
// S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)
|
743
|
+
const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);
|
744
|
+
const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);
|
745
|
+
const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);
|
746
|
+
const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);
|
747
|
+
Hh = Gh | 0;
|
748
|
+
Hl = Gl | 0;
|
749
|
+
Gh = Fh | 0;
|
750
|
+
Gl = Fl | 0;
|
751
|
+
Fh = Eh | 0;
|
752
|
+
Fl = El | 0;
|
753
|
+
({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
754
|
+
Dh = Ch | 0;
|
755
|
+
Dl = Cl | 0;
|
756
|
+
Ch = Bh | 0;
|
757
|
+
Cl = Bl | 0;
|
758
|
+
Bh = Ah | 0;
|
759
|
+
Bl = Al | 0;
|
760
|
+
const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);
|
761
|
+
Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);
|
762
|
+
Al = All | 0;
|
763
|
+
}
|
764
|
+
// Add the compressed chunk to the current hash value
|
765
|
+
({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
766
|
+
({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
767
|
+
({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
768
|
+
({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
769
|
+
({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
770
|
+
({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
771
|
+
({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
772
|
+
({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
773
|
+
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
774
|
+
}
|
775
|
+
roundClean() {
|
776
|
+
SHA512_W_H.fill(0);
|
777
|
+
SHA512_W_L.fill(0);
|
778
|
+
}
|
779
|
+
destroy() {
|
780
|
+
this.buffer.fill(0);
|
781
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
782
|
+
}
|
783
|
+
}
|
784
|
+
exports.SHA512 = SHA512;
|
785
|
+
class SHA512_224 extends SHA512 {
|
786
|
+
constructor() {
|
787
|
+
super();
|
788
|
+
// h -- high 32 bits, l -- low 32 bits
|
789
|
+
this.Ah = 0x8c3d37c8 | 0;
|
790
|
+
this.Al = 0x19544da2 | 0;
|
791
|
+
this.Bh = 0x73e19966 | 0;
|
792
|
+
this.Bl = 0x89dcd4d6 | 0;
|
793
|
+
this.Ch = 0x1dfab7ae | 0;
|
794
|
+
this.Cl = 0x32ff9c82 | 0;
|
795
|
+
this.Dh = 0x679dd514 | 0;
|
796
|
+
this.Dl = 0x582f9fcf | 0;
|
797
|
+
this.Eh = 0x0f6d2b69 | 0;
|
798
|
+
this.El = 0x7bd44da8 | 0;
|
799
|
+
this.Fh = 0x77e36f73 | 0;
|
800
|
+
this.Fl = 0x04c48942 | 0;
|
801
|
+
this.Gh = 0x3f9d85a8 | 0;
|
802
|
+
this.Gl = 0x6a1d36c8 | 0;
|
803
|
+
this.Hh = 0x1112e6ad | 0;
|
804
|
+
this.Hl = 0x91d692a1 | 0;
|
805
|
+
this.outputLen = 28;
|
806
|
+
}
|
807
|
+
}
|
808
|
+
class SHA512_256 extends SHA512 {
|
809
|
+
constructor() {
|
810
|
+
super();
|
811
|
+
// h -- high 32 bits, l -- low 32 bits
|
812
|
+
this.Ah = 0x22312194 | 0;
|
813
|
+
this.Al = 0xfc2bf72c | 0;
|
814
|
+
this.Bh = 0x9f555fa3 | 0;
|
815
|
+
this.Bl = 0xc84c64c2 | 0;
|
816
|
+
this.Ch = 0x2393b86b | 0;
|
817
|
+
this.Cl = 0x6f53b151 | 0;
|
818
|
+
this.Dh = 0x96387719 | 0;
|
819
|
+
this.Dl = 0x5940eabd | 0;
|
820
|
+
this.Eh = 0x96283ee2 | 0;
|
821
|
+
this.El = 0xa88effe3 | 0;
|
822
|
+
this.Fh = 0xbe5e1e25 | 0;
|
823
|
+
this.Fl = 0x53863992 | 0;
|
824
|
+
this.Gh = 0x2b0199fc | 0;
|
825
|
+
this.Gl = 0x2c85b8aa | 0;
|
826
|
+
this.Hh = 0x0eb72ddc | 0;
|
827
|
+
this.Hl = 0x81c52ca2 | 0;
|
828
|
+
this.outputLen = 32;
|
829
|
+
}
|
830
|
+
}
|
831
|
+
class SHA384 extends SHA512 {
|
832
|
+
constructor() {
|
833
|
+
super();
|
834
|
+
// h -- high 32 bits, l -- low 32 bits
|
835
|
+
this.Ah = 0xcbbb9d5d | 0;
|
836
|
+
this.Al = 0xc1059ed8 | 0;
|
837
|
+
this.Bh = 0x629a292a | 0;
|
838
|
+
this.Bl = 0x367cd507 | 0;
|
839
|
+
this.Ch = 0x9159015a | 0;
|
840
|
+
this.Cl = 0x3070dd17 | 0;
|
841
|
+
this.Dh = 0x152fecd8 | 0;
|
842
|
+
this.Dl = 0xf70e5939 | 0;
|
843
|
+
this.Eh = 0x67332667 | 0;
|
844
|
+
this.El = 0xffc00b31 | 0;
|
845
|
+
this.Fh = 0x8eb44a87 | 0;
|
846
|
+
this.Fl = 0x68581511 | 0;
|
847
|
+
this.Gh = 0xdb0c2e0d | 0;
|
848
|
+
this.Gl = 0x64f98fa7 | 0;
|
849
|
+
this.Hh = 0x47b5481d | 0;
|
850
|
+
this.Hl = 0xbefa4fa4 | 0;
|
851
|
+
this.outputLen = 48;
|
852
|
+
}
|
853
|
+
}
|
854
|
+
exports.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA512());
|
855
|
+
exports.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());
|
856
|
+
exports.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());
|
857
|
+
exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());
|
858
|
+
|
859
|
+
|
860
|
+
/***/ }),
|
861
|
+
|
862
|
+
/***/ "../../node_modules/@noble/hashes/utils.js":
|
863
|
+
/*!*************************************************!*\
|
864
|
+
!*** ../../node_modules/@noble/hashes/utils.js ***!
|
865
|
+
\*************************************************/
|
866
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
867
|
+
|
868
|
+
"use strict";
|
869
|
+
|
870
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
871
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
872
|
+
exports.randomBytes = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.checkOpts = exports.Hash = exports.concatBytes = exports.toBytes = exports.utf8ToBytes = exports.asyncLoop = exports.nextTick = exports.hexToBytes = exports.bytesToHex = exports.isLE = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;
|
873
|
+
// We use `globalThis.crypto`, but node.js versions earlier than v19 don't
|
874
|
+
// declare it in global scope. For node.js, package.json#exports field mapping
|
875
|
+
// rewrites import from `crypto` to `cryptoNode`, which imports native module.
|
876
|
+
// Makes the utils un-importable in browsers without a bundler.
|
877
|
+
// Once node.js 18 is deprecated, we can just drop the import.
|
878
|
+
const crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ "../../node_modules/@noble/hashes/crypto.js");
|
879
|
+
// Cast array to different type
|
880
|
+
const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
881
|
+
exports.u8 = u8;
|
882
|
+
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
883
|
+
exports.u32 = u32;
|
884
|
+
// Cast array to view
|
885
|
+
const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
886
|
+
exports.createView = createView;
|
887
|
+
// The rotate right (circular right shift) operation for uint32
|
888
|
+
const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);
|
889
|
+
exports.rotr = rotr;
|
890
|
+
// big-endian hardware is rare. Just in case someone still decides to run hashes:
|
891
|
+
// early-throw an error because we don't support BE yet.
|
892
|
+
exports.isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;
|
893
|
+
if (!exports.isLE)
|
894
|
+
throw new Error('Non little-endian hardware is not supported');
|
895
|
+
const hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));
|
896
|
+
/**
|
897
|
+
* @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'
|
898
|
+
*/
|
899
|
+
function bytesToHex(uint8a) {
|
900
|
+
// pre-caching improves the speed 6x
|
901
|
+
if (!(uint8a instanceof Uint8Array))
|
902
|
+
throw new Error('Uint8Array expected');
|
903
|
+
let hex = '';
|
904
|
+
for (let i = 0; i < uint8a.length; i++) {
|
905
|
+
hex += hexes[uint8a[i]];
|
906
|
+
}
|
907
|
+
return hex;
|
908
|
+
}
|
909
|
+
exports.bytesToHex = bytesToHex;
|
910
|
+
/**
|
911
|
+
* @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])
|
912
|
+
*/
|
913
|
+
function hexToBytes(hex) {
|
914
|
+
if (typeof hex !== 'string') {
|
915
|
+
throw new TypeError('hexToBytes: expected string, got ' + typeof hex);
|
916
|
+
}
|
917
|
+
if (hex.length % 2)
|
918
|
+
throw new Error('hexToBytes: received invalid unpadded hex');
|
919
|
+
const array = new Uint8Array(hex.length / 2);
|
920
|
+
for (let i = 0; i < array.length; i++) {
|
921
|
+
const j = i * 2;
|
922
|
+
const hexByte = hex.slice(j, j + 2);
|
923
|
+
const byte = Number.parseInt(hexByte, 16);
|
924
|
+
if (Number.isNaN(byte) || byte < 0)
|
925
|
+
throw new Error('Invalid byte sequence');
|
926
|
+
array[i] = byte;
|
927
|
+
}
|
928
|
+
return array;
|
929
|
+
}
|
930
|
+
exports.hexToBytes = hexToBytes;
|
931
|
+
// There is no setImmediate in browser and setTimeout is slow.
|
932
|
+
// call of async fn will return Promise, which will be fullfiled only on
|
933
|
+
// next scheduler queue processing step and this is exactly what we need.
|
934
|
+
const nextTick = async () => { };
|
935
|
+
exports.nextTick = nextTick;
|
936
|
+
// Returns control to thread each 'tick' ms to avoid blocking
|
937
|
+
async function asyncLoop(iters, tick, cb) {
|
938
|
+
let ts = Date.now();
|
939
|
+
for (let i = 0; i < iters; i++) {
|
940
|
+
cb(i);
|
941
|
+
// Date.now() is not monotonic, so in case if clock goes backwards we return return control too
|
942
|
+
const diff = Date.now() - ts;
|
943
|
+
if (diff >= 0 && diff < tick)
|
944
|
+
continue;
|
945
|
+
await (0, exports.nextTick)();
|
946
|
+
ts += diff;
|
947
|
+
}
|
948
|
+
}
|
949
|
+
exports.asyncLoop = asyncLoop;
|
950
|
+
function utf8ToBytes(str) {
|
951
|
+
if (typeof str !== 'string') {
|
952
|
+
throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);
|
953
|
+
}
|
954
|
+
return new TextEncoder().encode(str);
|
955
|
+
}
|
956
|
+
exports.utf8ToBytes = utf8ToBytes;
|
957
|
+
function toBytes(data) {
|
958
|
+
if (typeof data === 'string')
|
959
|
+
data = utf8ToBytes(data);
|
960
|
+
if (!(data instanceof Uint8Array))
|
961
|
+
throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);
|
962
|
+
return data;
|
963
|
+
}
|
964
|
+
exports.toBytes = toBytes;
|
965
|
+
/**
|
966
|
+
* Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`
|
967
|
+
* @example concatBytes(buf1, buf2)
|
968
|
+
*/
|
969
|
+
function concatBytes(...arrays) {
|
970
|
+
if (!arrays.every((a) => a instanceof Uint8Array))
|
971
|
+
throw new Error('Uint8Array list expected');
|
972
|
+
if (arrays.length === 1)
|
973
|
+
return arrays[0];
|
974
|
+
const length = arrays.reduce((a, arr) => a + arr.length, 0);
|
975
|
+
const result = new Uint8Array(length);
|
976
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
977
|
+
const arr = arrays[i];
|
978
|
+
result.set(arr, pad);
|
979
|
+
pad += arr.length;
|
980
|
+
}
|
981
|
+
return result;
|
982
|
+
}
|
983
|
+
exports.concatBytes = concatBytes;
|
984
|
+
// For runtime check if class implements interface
|
985
|
+
class Hash {
|
986
|
+
// Safe version that clones internal state
|
987
|
+
clone() {
|
988
|
+
return this._cloneInto();
|
989
|
+
}
|
990
|
+
}
|
991
|
+
exports.Hash = Hash;
|
992
|
+
// Check if object doens't have custom constructor (like Uint8Array/Array)
|
993
|
+
const isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;
|
994
|
+
function checkOpts(defaults, opts) {
|
995
|
+
if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))
|
996
|
+
throw new TypeError('Options should be object or undefined');
|
997
|
+
const merged = Object.assign(defaults, opts);
|
998
|
+
return merged;
|
999
|
+
}
|
1000
|
+
exports.checkOpts = checkOpts;
|
1001
|
+
function wrapConstructor(hashConstructor) {
|
1002
|
+
const hashC = (message) => hashConstructor().update(toBytes(message)).digest();
|
1003
|
+
const tmp = hashConstructor();
|
1004
|
+
hashC.outputLen = tmp.outputLen;
|
1005
|
+
hashC.blockLen = tmp.blockLen;
|
1006
|
+
hashC.create = () => hashConstructor();
|
1007
|
+
return hashC;
|
1008
|
+
}
|
1009
|
+
exports.wrapConstructor = wrapConstructor;
|
1010
|
+
function wrapConstructorWithOpts(hashCons) {
|
1011
|
+
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
1012
|
+
const tmp = hashCons({});
|
1013
|
+
hashC.outputLen = tmp.outputLen;
|
1014
|
+
hashC.blockLen = tmp.blockLen;
|
1015
|
+
hashC.create = (opts) => hashCons(opts);
|
1016
|
+
return hashC;
|
1017
|
+
}
|
1018
|
+
exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
|
1019
|
+
/**
|
1020
|
+
* Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.
|
1021
|
+
*/
|
1022
|
+
function randomBytes(bytesLength = 32) {
|
1023
|
+
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {
|
1024
|
+
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
1025
|
+
}
|
1026
|
+
throw new Error('crypto.getRandomValues must be defined');
|
1027
|
+
}
|
1028
|
+
exports.randomBytes = randomBytes;
|
1029
|
+
|
1030
|
+
|
1031
|
+
/***/ }),
|
1032
|
+
|
5
1033
|
/***/ "../../node_modules/asn1.js/lib/asn1.js":
|
6
1034
|
/*!**********************************************!*\
|
7
1035
|
!*** ../../node_modules/asn1.js/lib/asn1.js ***!
|
@@ -9127,9 +10155,10 @@ catch (err) { }
|
|
9127
10155
|
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "../../node_modules/buffer/index.js")["Buffer"];
|
9128
10156
|
|
9129
10157
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
9130
|
-
const
|
9131
|
-
const
|
9132
|
-
const
|
10158
|
+
const sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "../../node_modules/@noble/hashes/sha256.js");
|
10159
|
+
const sha512_1 = __webpack_require__(/*! @noble/hashes/sha512 */ "../../node_modules/@noble/hashes/sha512.js");
|
10160
|
+
const pbkdf2_1 = __webpack_require__(/*! @noble/hashes/pbkdf2 */ "../../node_modules/@noble/hashes/pbkdf2.js");
|
10161
|
+
const utils_1 = __webpack_require__(/*! @noble/hashes/utils */ "../../node_modules/@noble/hashes/utils.js");
|
9133
10162
|
const _wordlists_1 = __webpack_require__(/*! ./_wordlists */ "../../node_modules/bip39/src/_wordlists.js");
|
9134
10163
|
let DEFAULT_WORDLIST = _wordlists_1._default;
|
9135
10164
|
const INVALID_MNEMONIC = 'Invalid mnemonic';
|
@@ -9137,19 +10166,6 @@ const INVALID_ENTROPY = 'Invalid entropy';
|
|
9137
10166
|
const INVALID_CHECKSUM = 'Invalid mnemonic checksum';
|
9138
10167
|
const WORDLIST_REQUIRED = 'A wordlist is required but a default could not be found.\n' +
|
9139
10168
|
'Please pass a 2048 word array explicitly.';
|
9140
|
-
function pbkdf2Promise(password, saltMixin, iterations, keylen, digest) {
|
9141
|
-
return Promise.resolve().then(() => new Promise((resolve, reject) => {
|
9142
|
-
const callback = (err, derivedKey) => {
|
9143
|
-
if (err) {
|
9144
|
-
return reject(err);
|
9145
|
-
}
|
9146
|
-
else {
|
9147
|
-
return resolve(derivedKey);
|
9148
|
-
}
|
9149
|
-
};
|
9150
|
-
pbkdf2_1.pbkdf2(password, saltMixin, iterations, keylen, digest, callback);
|
9151
|
-
}));
|
9152
|
-
}
|
9153
10169
|
function normalize(str) {
|
9154
10170
|
return (str || '').normalize('NFKD');
|
9155
10171
|
}
|
@@ -9168,26 +10184,29 @@ function bytesToBinary(bytes) {
|
|
9168
10184
|
function deriveChecksumBits(entropyBuffer) {
|
9169
10185
|
const ENT = entropyBuffer.length * 8;
|
9170
10186
|
const CS = ENT / 32;
|
9171
|
-
const hash =
|
9172
|
-
.update(entropyBuffer)
|
9173
|
-
.digest();
|
10187
|
+
const hash = sha256_1.sha256(Uint8Array.from(entropyBuffer));
|
9174
10188
|
return bytesToBinary(Array.from(hash)).slice(0, CS);
|
9175
10189
|
}
|
9176
10190
|
function salt(password) {
|
9177
10191
|
return 'mnemonic' + (password || '');
|
9178
10192
|
}
|
9179
10193
|
function mnemonicToSeedSync(mnemonic, password) {
|
9180
|
-
const mnemonicBuffer = Buffer.from(normalize(mnemonic), 'utf8');
|
9181
|
-
const saltBuffer = Buffer.from(salt(normalize(password)), 'utf8');
|
9182
|
-
|
10194
|
+
const mnemonicBuffer = Uint8Array.from(Buffer.from(normalize(mnemonic), 'utf8'));
|
10195
|
+
const saltBuffer = Uint8Array.from(Buffer.from(salt(normalize(password)), 'utf8'));
|
10196
|
+
const res = pbkdf2_1.pbkdf2(sha512_1.sha512, mnemonicBuffer, saltBuffer, {
|
10197
|
+
c: 2048,
|
10198
|
+
dkLen: 64,
|
10199
|
+
});
|
10200
|
+
return Buffer.from(res);
|
9183
10201
|
}
|
9184
10202
|
exports.mnemonicToSeedSync = mnemonicToSeedSync;
|
9185
10203
|
function mnemonicToSeed(mnemonic, password) {
|
9186
|
-
|
9187
|
-
|
9188
|
-
|
9189
|
-
|
9190
|
-
|
10204
|
+
const mnemonicBuffer = Uint8Array.from(Buffer.from(normalize(mnemonic), 'utf8'));
|
10205
|
+
const saltBuffer = Uint8Array.from(Buffer.from(salt(normalize(password)), 'utf8'));
|
10206
|
+
return pbkdf2_1.pbkdf2Async(sha512_1.sha512, mnemonicBuffer, saltBuffer, {
|
10207
|
+
c: 2048,
|
10208
|
+
dkLen: 64,
|
10209
|
+
}).then((res) => Buffer.from(res));
|
9191
10210
|
}
|
9192
10211
|
exports.mnemonicToSeed = mnemonicToSeed;
|
9193
10212
|
function mnemonicToEntropy(mnemonic, wordlist) {
|
@@ -9268,7 +10287,7 @@ function generateMnemonic(strength, rng, wordlist) {
|
|
9268
10287
|
if (strength % 32 !== 0) {
|
9269
10288
|
throw new TypeError(INVALID_ENTROPY);
|
9270
10289
|
}
|
9271
|
-
rng = rng || randomBytes;
|
10290
|
+
rng = rng || ((size) => Buffer.from(utils_1.randomBytes(size)));
|
9272
10291
|
return entropyToMnemonic(rng(strength / 8), wordlist);
|
9273
10292
|
}
|
9274
10293
|
exports.generateMnemonic = generateMnemonic;
|
@@ -22477,8 +23496,14 @@ var hasPropertyDescriptors = __webpack_require__(/*! has-property-descriptors */
|
|
22477
23496
|
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
22478
23497
|
|
22479
23498
|
var defineProperty = function (object, name, value, predicate) {
|
22480
|
-
if (name in object
|
22481
|
-
|
23499
|
+
if (name in object) {
|
23500
|
+
if (predicate === true) {
|
23501
|
+
if (object[name] === value) {
|
23502
|
+
return;
|
23503
|
+
}
|
23504
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
23505
|
+
return;
|
23506
|
+
}
|
22482
23507
|
}
|
22483
23508
|
if (supportsDescriptors) {
|
22484
23509
|
origDefineProperty(object, name, {
|
@@ -38951,51 +39976,6 @@ var isBuffer = nativeIsBuffer || stubFalse;
|
|
38951
39976
|
module.exports = isBuffer;
|
38952
39977
|
|
38953
39978
|
|
38954
|
-
/***/ }),
|
38955
|
-
|
38956
|
-
/***/ "../../node_modules/lodash/isEqual.js":
|
38957
|
-
/*!********************************************!*\
|
38958
|
-
!*** ../../node_modules/lodash/isEqual.js ***!
|
38959
|
-
\********************************************/
|
38960
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
38961
|
-
|
38962
|
-
var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "../../node_modules/lodash/_baseIsEqual.js");
|
38963
|
-
|
38964
|
-
/**
|
38965
|
-
* Performs a deep comparison between two values to determine if they are
|
38966
|
-
* equivalent.
|
38967
|
-
*
|
38968
|
-
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
38969
|
-
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
38970
|
-
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
38971
|
-
* by their own, not inherited, enumerable properties. Functions and DOM
|
38972
|
-
* nodes are compared by strict equality, i.e. `===`.
|
38973
|
-
*
|
38974
|
-
* @static
|
38975
|
-
* @memberOf _
|
38976
|
-
* @since 0.1.0
|
38977
|
-
* @category Lang
|
38978
|
-
* @param {*} value The value to compare.
|
38979
|
-
* @param {*} other The other value to compare.
|
38980
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
38981
|
-
* @example
|
38982
|
-
*
|
38983
|
-
* var object = { 'a': 1 };
|
38984
|
-
* var other = { 'a': 1 };
|
38985
|
-
*
|
38986
|
-
* _.isEqual(object, other);
|
38987
|
-
* // => true
|
38988
|
-
*
|
38989
|
-
* object === other;
|
38990
|
-
* // => false
|
38991
|
-
*/
|
38992
|
-
function isEqual(value, other) {
|
38993
|
-
return baseIsEqual(value, other);
|
38994
|
-
}
|
38995
|
-
|
38996
|
-
module.exports = isEqual;
|
38997
|
-
|
38998
|
-
|
38999
39979
|
/***/ }),
|
39000
39980
|
|
39001
39981
|
/***/ "../../node_modules/lodash/isFunction.js":
|
@@ -63293,7 +64273,7 @@ Object.defineProperty(exports, "HashPrefix", ({ enumerable: true, get: function
|
|
63293
64273
|
|
63294
64274
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
63295
64275
|
exports.BytesLookup = exports.Bytes = void 0;
|
63296
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
64276
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
63297
64277
|
/*
|
63298
64278
|
* @brief: Bytes, name, and ordinal representing one type, ledger_type, transaction type, or result
|
63299
64279
|
*/
|
@@ -63388,7 +64368,7 @@ exports.FieldLookup = void 0;
|
|
63388
64368
|
const bytes_1 = __webpack_require__(/*! ./bytes */ "../../node_modules/ripple-binary-codec/dist/enums/bytes.js");
|
63389
64369
|
const serialized_type_1 = __webpack_require__(/*! ../types/serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
63390
64370
|
const constants_1 = __webpack_require__(/*! ./constants */ "../../node_modules/ripple-binary-codec/dist/enums/constants.js");
|
63391
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
64371
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
63392
64372
|
/*
|
63393
64373
|
* @brief: Serialize a field based on type_code and Field.nth
|
63394
64374
|
*/
|
@@ -63623,7 +64603,7 @@ exports.XrplDefinitions = XrplDefinitions;
|
|
63623
64603
|
|
63624
64604
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
63625
64605
|
exports.HashPrefix = void 0;
|
63626
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
64606
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
63627
64607
|
/**
|
63628
64608
|
* Write a 32 bit integer to a Buffer
|
63629
64609
|
*
|
@@ -63678,7 +64658,7 @@ const hash_prefixes_1 = __webpack_require__(/*! ./hash-prefixes */ "../../node_m
|
|
63678
64658
|
const createHash = __webpack_require__(/*! create-hash */ "../../node_modules/create-hash/browser.js");
|
63679
64659
|
const hash_256_1 = __webpack_require__(/*! ./types/hash-256 */ "../../node_modules/ripple-binary-codec/dist/types/hash-256.js");
|
63680
64660
|
const binary_serializer_1 = __webpack_require__(/*! ./serdes/binary-serializer */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js");
|
63681
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
64661
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
63682
64662
|
/**
|
63683
64663
|
* Class for hashing with SHA512
|
63684
64664
|
* @extends BytesList So SerializedTypes can write bytes to a Sha512Half
|
@@ -64082,7 +65062,7 @@ exports.quality = void 0;
|
|
64082
65062
|
const types_1 = __webpack_require__(/*! ./types */ "../../node_modules/ripple-binary-codec/dist/types/index.js");
|
64083
65063
|
const decimal_js_1 = __webpack_require__(/*! decimal.js */ "../../node_modules/decimal.js/decimal.js");
|
64084
65064
|
const bigInt = __webpack_require__(/*! big-integer */ "../../node_modules/big-integer/BigInteger.js");
|
64085
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65065
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64086
65066
|
/**
|
64087
65067
|
* class for encoding and decoding quality
|
64088
65068
|
*/
|
@@ -64154,7 +65134,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64154
65134
|
exports.BinaryParser = void 0;
|
64155
65135
|
const assert = __importStar(__webpack_require__(/*! assert */ "../../node_modules/assert/build/assert.js"));
|
64156
65136
|
const enums_1 = __webpack_require__(/*! ../enums */ "../../node_modules/ripple-binary-codec/dist/enums/index.js");
|
64157
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65137
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64158
65138
|
/**
|
64159
65139
|
* BinaryParser is used to compute fields and values from a HexString
|
64160
65140
|
*/
|
@@ -64373,7 +65353,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
64373
65353
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
64374
65354
|
exports.BinarySerializer = exports.BytesList = void 0;
|
64375
65355
|
const assert = __importStar(__webpack_require__(/*! assert */ "../../node_modules/assert/build/assert.js"));
|
64376
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65356
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64377
65357
|
/**
|
64378
65358
|
* Bytes list is a collection of buffer objects
|
64379
65359
|
*/
|
@@ -64535,7 +65515,7 @@ const assert_1 = __webpack_require__(/*! assert */ "../../node_modules/assert/bu
|
|
64535
65515
|
const types_1 = __webpack_require__(/*! ./types */ "../../node_modules/ripple-binary-codec/dist/types/index.js");
|
64536
65516
|
const hash_prefixes_1 = __webpack_require__(/*! ./hash-prefixes */ "../../node_modules/ripple-binary-codec/dist/hash-prefixes.js");
|
64537
65517
|
const hashes_1 = __webpack_require__(/*! ./hashes */ "../../node_modules/ripple-binary-codec/dist/hashes.js");
|
64538
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65518
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64539
65519
|
/**
|
64540
65520
|
* Abstract class describing a SHAMapNode
|
64541
65521
|
*/
|
@@ -64715,7 +65695,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64715
65695
|
exports.AccountID = void 0;
|
64716
65696
|
const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
|
64717
65697
|
const hash_160_1 = __webpack_require__(/*! ./hash-160 */ "../../node_modules/ripple-binary-codec/dist/types/hash-160.js");
|
64718
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65698
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64719
65699
|
const HEX_REGEX = /^[A-F0-9]{40}$/;
|
64720
65700
|
/**
|
64721
65701
|
* Class defining how to encode and decode an AccountID
|
@@ -64800,7 +65780,7 @@ const account_id_1 = __webpack_require__(/*! ./account-id */ "../../node_modules
|
|
64800
65780
|
const currency_1 = __webpack_require__(/*! ./currency */ "../../node_modules/ripple-binary-codec/dist/types/currency.js");
|
64801
65781
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
64802
65782
|
const bigInt = __webpack_require__(/*! big-integer */ "../../node_modules/big-integer/BigInteger.js");
|
64803
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65783
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
64804
65784
|
/**
|
64805
65785
|
* Constants for validating amounts
|
64806
65786
|
*/
|
@@ -65012,7 +65992,7 @@ Amount.defaultAmount = new Amount(buffer_1.Buffer.from('4000000000000000', 'hex'
|
|
65012
65992
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65013
65993
|
exports.Blob = void 0;
|
65014
65994
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
65015
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
65995
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65016
65996
|
/**
|
65017
65997
|
* Variable length encoded type
|
65018
65998
|
*/
|
@@ -65062,7 +66042,7 @@ exports.Blob = Blob;
|
|
65062
66042
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65063
66043
|
exports.Currency = void 0;
|
65064
66044
|
const hash_160_1 = __webpack_require__(/*! ./hash-160 */ "../../node_modules/ripple-binary-codec/dist/types/hash-160.js");
|
65065
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66045
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65066
66046
|
const XRP_HEX_REGEX = /^0{40}$/;
|
65067
66047
|
const ISO_REGEX = /^[A-Z0-9a-z?!@#$%^&*(){}[\]|]{3}$/;
|
65068
66048
|
const HEX_REGEX = /^[A-F0-9]{40}$/;
|
@@ -65199,7 +66179,7 @@ Currency.XRP = new Currency(buffer_1.Buffer.alloc(20));
|
|
65199
66179
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65200
66180
|
exports.Hash128 = void 0;
|
65201
66181
|
const hash_1 = __webpack_require__(/*! ./hash */ "../../node_modules/ripple-binary-codec/dist/types/hash.js");
|
65202
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66182
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65203
66183
|
/**
|
65204
66184
|
* Hash with a width of 128 bits
|
65205
66185
|
*/
|
@@ -65241,7 +66221,7 @@ Hash128.ZERO_128 = new Hash128(buffer_1.Buffer.alloc(Hash128.width));
|
|
65241
66221
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65242
66222
|
exports.Hash160 = void 0;
|
65243
66223
|
const hash_1 = __webpack_require__(/*! ./hash */ "../../node_modules/ripple-binary-codec/dist/types/hash.js");
|
65244
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66224
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65245
66225
|
/**
|
65246
66226
|
* Hash with a width of 160 bits
|
65247
66227
|
*/
|
@@ -65271,7 +66251,7 @@ Hash160.ZERO_160 = new Hash160(buffer_1.Buffer.alloc(Hash160.width));
|
|
65271
66251
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65272
66252
|
exports.Hash256 = void 0;
|
65273
66253
|
const hash_1 = __webpack_require__(/*! ./hash */ "../../node_modules/ripple-binary-codec/dist/types/hash.js");
|
65274
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66254
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65275
66255
|
/**
|
65276
66256
|
* Hash with a width of 256 bits
|
65277
66257
|
*/
|
@@ -65298,7 +66278,7 @@ Hash256.ZERO_256 = new Hash256(buffer_1.Buffer.alloc(Hash256.width));
|
|
65298
66278
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65299
66279
|
exports.Hash = void 0;
|
65300
66280
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
65301
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66281
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65302
66282
|
/**
|
65303
66283
|
* Base class defining how to encode and decode hashes
|
65304
66284
|
*/
|
@@ -65454,7 +66434,7 @@ const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../.
|
|
65454
66434
|
const account_id_1 = __webpack_require__(/*! ./account-id */ "../../node_modules/ripple-binary-codec/dist/types/account-id.js");
|
65455
66435
|
const currency_1 = __webpack_require__(/*! ./currency */ "../../node_modules/ripple-binary-codec/dist/types/currency.js");
|
65456
66436
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
65457
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66437
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65458
66438
|
/**
|
65459
66439
|
* Type guard for AmountObject
|
65460
66440
|
*/
|
@@ -65545,7 +66525,7 @@ const account_id_1 = __webpack_require__(/*! ./account-id */ "../../node_modules
|
|
65545
66525
|
const currency_1 = __webpack_require__(/*! ./currency */ "../../node_modules/ripple-binary-codec/dist/types/currency.js");
|
65546
66526
|
const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js");
|
65547
66527
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
65548
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66528
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65549
66529
|
/**
|
65550
66530
|
* Constants for separating Paths in a PathSet
|
65551
66531
|
*/
|
@@ -65785,7 +66765,7 @@ exports.PathSet = PathSet;
|
|
65785
66765
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
65786
66766
|
exports.Comparable = exports.SerializedType = void 0;
|
65787
66767
|
const binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js");
|
65788
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66768
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65789
66769
|
/**
|
65790
66770
|
* The base class for all binary-codec types
|
65791
66771
|
*/
|
@@ -65894,7 +66874,7 @@ exports.STArray = void 0;
|
|
65894
66874
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
65895
66875
|
const st_object_1 = __webpack_require__(/*! ./st-object */ "../../node_modules/ripple-binary-codec/dist/types/st-object.js");
|
65896
66876
|
const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js");
|
65897
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66877
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65898
66878
|
const ARRAY_END_MARKER = buffer_1.Buffer.from([0xf1]);
|
65899
66879
|
const ARRAY_END_MARKER_NAME = 'ArrayEndMarker';
|
65900
66880
|
const OBJECT_END_MARKER = buffer_1.Buffer.from([0xe1]);
|
@@ -65986,7 +66966,7 @@ const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../no
|
|
65986
66966
|
const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
|
65987
66967
|
const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js");
|
65988
66968
|
const binary_serializer_1 = __webpack_require__(/*! ../serdes/binary-serializer */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-serializer.js");
|
65989
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
66969
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
65990
66970
|
const OBJECT_END_MARKER_BYTE = buffer_1.Buffer.from([0xe1]);
|
65991
66971
|
const OBJECT_END_MARKER = 'ObjectEndMarker';
|
65992
66972
|
const ST_OBJECT = 'STObject';
|
@@ -66141,7 +67121,7 @@ exports.STObject = STObject;
|
|
66141
67121
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
66142
67122
|
exports.UInt16 = void 0;
|
66143
67123
|
const uint_1 = __webpack_require__(/*! ./uint */ "../../node_modules/ripple-binary-codec/dist/types/uint.js");
|
66144
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
67124
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
66145
67125
|
/**
|
66146
67126
|
* Derived UInt class for serializing/deserializing 16 bit UInt
|
66147
67127
|
*/
|
@@ -66195,7 +67175,7 @@ UInt16.defaultUInt16 = new UInt16(buffer_1.Buffer.alloc(UInt16.width));
|
|
66195
67175
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
66196
67176
|
exports.UInt32 = void 0;
|
66197
67177
|
const uint_1 = __webpack_require__(/*! ./uint */ "../../node_modules/ripple-binary-codec/dist/types/uint.js");
|
66198
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
67178
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
66199
67179
|
/**
|
66200
67180
|
* Derived UInt class for serializing/deserializing 32 bit UInt
|
66201
67181
|
*/
|
@@ -66256,7 +67236,7 @@ exports.UInt64 = void 0;
|
|
66256
67236
|
const uint_1 = __webpack_require__(/*! ./uint */ "../../node_modules/ripple-binary-codec/dist/types/uint.js");
|
66257
67237
|
const bigInt = __webpack_require__(/*! big-integer */ "../../node_modules/big-integer/BigInteger.js");
|
66258
67238
|
const big_integer_1 = __webpack_require__(/*! big-integer */ "../../node_modules/big-integer/BigInteger.js");
|
66259
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
67239
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
66260
67240
|
const HEX_REGEX = /^[a-fA-F0-9]{1,16}$/;
|
66261
67241
|
const mask = bigInt(0x00000000ffffffff);
|
66262
67242
|
/**
|
@@ -66351,7 +67331,7 @@ UInt64.defaultUInt64 = new UInt64(buffer_1.Buffer.alloc(UInt64.width));
|
|
66351
67331
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
66352
67332
|
exports.UInt8 = void 0;
|
66353
67333
|
const uint_1 = __webpack_require__(/*! ./uint */ "../../node_modules/ripple-binary-codec/dist/types/uint.js");
|
66354
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
67334
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
66355
67335
|
/**
|
66356
67336
|
* Derived UInt class for serializing/deserializing 8 bit UInt
|
66357
67337
|
*/
|
@@ -66544,7 +67524,7 @@ exports.XChainBridge = void 0;
|
|
66544
67524
|
const binary_parser_1 = __webpack_require__(/*! ../serdes/binary-parser */ "../../node_modules/ripple-binary-codec/dist/serdes/binary-parser.js");
|
66545
67525
|
const account_id_1 = __webpack_require__(/*! ./account-id */ "../../node_modules/ripple-binary-codec/dist/types/account-id.js");
|
66546
67526
|
const serialized_type_1 = __webpack_require__(/*! ./serialized-type */ "../../node_modules/ripple-binary-codec/dist/types/serialized-type.js");
|
66547
|
-
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/
|
67527
|
+
const buffer_1 = __webpack_require__(/*! buffer/ */ "../../node_modules/buffer/index.js");
|
66548
67528
|
const issue_1 = __webpack_require__(/*! ./issue */ "../../node_modules/ripple-binary-codec/dist/types/issue.js");
|
66549
67529
|
/**
|
66550
67530
|
* Type guard for XChainBridgeObject
|
@@ -66643,2027 +67623,222 @@ XChainBridge.TYPE_ORDER = [
|
|
66643
67623
|
|
66644
67624
|
/***/ }),
|
66645
67625
|
|
66646
|
-
/***/ "../../node_modules/ripple-
|
66647
|
-
|
66648
|
-
!*** ../../node_modules/ripple-
|
66649
|
-
|
66650
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
67626
|
+
/***/ "../../node_modules/ripple-keypairs/dist/Sha512.js":
|
67627
|
+
/*!*********************************************************!*\
|
67628
|
+
!*** ../../node_modules/ripple-keypairs/dist/Sha512.js ***!
|
67629
|
+
\*********************************************************/
|
67630
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
66651
67631
|
|
66652
67632
|
"use strict";
|
66653
|
-
/*!
|
66654
|
-
* The buffer module from node.js, for the browser.
|
66655
|
-
*
|
66656
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
66657
|
-
* @license MIT
|
66658
|
-
*/
|
66659
|
-
/* eslint-disable no-proto */
|
66660
|
-
|
66661
67633
|
|
67634
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
67635
|
+
if (k2 === undefined) k2 = k;
|
67636
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
67637
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
67638
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
67639
|
+
}
|
67640
|
+
Object.defineProperty(o, k2, desc);
|
67641
|
+
}) : (function(o, m, k, k2) {
|
67642
|
+
if (k2 === undefined) k2 = k;
|
67643
|
+
o[k2] = m[k];
|
67644
|
+
}));
|
67645
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
67646
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
67647
|
+
}) : function(o, v) {
|
67648
|
+
o["default"] = v;
|
67649
|
+
});
|
67650
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
67651
|
+
if (mod && mod.__esModule) return mod;
|
67652
|
+
var result = {};
|
67653
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
67654
|
+
__setModuleDefault(result, mod);
|
67655
|
+
return result;
|
67656
|
+
};
|
67657
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
67658
|
+
/* eslint-disable no-bitwise --
|
67659
|
+
* lots of bitwise operators necessary for this */
|
67660
|
+
const hashjs = __importStar(__webpack_require__(/*! hash.js */ "../../node_modules/hash.js/lib/hash.js"));
|
67661
|
+
const BigNum = __webpack_require__(/*! bn.js */ "../../node_modules/bn.js/lib/bn.js");
|
67662
|
+
class Sha512 {
|
67663
|
+
constructor() {
|
67664
|
+
this.hash = hashjs.sha512();
|
67665
|
+
}
|
67666
|
+
add(bytes) {
|
67667
|
+
this.hash.update(bytes);
|
67668
|
+
return this;
|
67669
|
+
}
|
67670
|
+
addU32(i) {
|
67671
|
+
return this.add([
|
67672
|
+
(i >>> 24) & 0xff,
|
67673
|
+
(i >>> 16) & 0xff,
|
67674
|
+
(i >>> 8) & 0xff,
|
67675
|
+
i & 0xff,
|
67676
|
+
]);
|
67677
|
+
}
|
67678
|
+
finish() {
|
67679
|
+
return this.hash.digest();
|
67680
|
+
}
|
67681
|
+
first256() {
|
67682
|
+
return this.finish().slice(0, 32);
|
67683
|
+
}
|
67684
|
+
first256BN() {
|
67685
|
+
return new BigNum(this.first256());
|
67686
|
+
}
|
67687
|
+
}
|
67688
|
+
exports["default"] = Sha512;
|
66662
67689
|
|
66663
|
-
var base64 = __webpack_require__(/*! base64-js */ "../../node_modules/base64-js/index.js")
|
66664
|
-
var ieee754 = __webpack_require__(/*! ieee754 */ "../../node_modules/ieee754/index.js")
|
66665
|
-
var customInspectSymbol =
|
66666
|
-
(typeof Symbol === 'function' && typeof Symbol.for === 'function')
|
66667
|
-
? Symbol.for('nodejs.util.inspect.custom')
|
66668
|
-
: null
|
66669
67690
|
|
66670
|
-
|
66671
|
-
exports.SlowBuffer = SlowBuffer
|
66672
|
-
exports.INSPECT_MAX_BYTES = 50
|
67691
|
+
/***/ }),
|
66673
67692
|
|
66674
|
-
|
66675
|
-
|
67693
|
+
/***/ "../../node_modules/ripple-keypairs/dist/index.js":
|
67694
|
+
/*!********************************************************!*\
|
67695
|
+
!*** ../../node_modules/ripple-keypairs/dist/index.js ***!
|
67696
|
+
\********************************************************/
|
67697
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
66676
67698
|
|
66677
|
-
|
66678
|
-
|
66679
|
-
* === true Use Uint8Array implementation (fastest)
|
66680
|
-
* === false Print warning and recommend using `buffer` v4.x which has an Object
|
66681
|
-
* implementation (most compatible, even IE6)
|
66682
|
-
*
|
66683
|
-
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
66684
|
-
* Opera 11.6+, iOS 4.2+.
|
66685
|
-
*
|
66686
|
-
* We report that the browser does not support typed arrays if the are not subclassable
|
66687
|
-
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
|
66688
|
-
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
|
66689
|
-
* for __proto__ and has a buggy typed array implementation.
|
66690
|
-
*/
|
66691
|
-
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
|
67699
|
+
"use strict";
|
67700
|
+
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "../../node_modules/buffer/index.js")["Buffer"];
|
66692
67701
|
|
66693
|
-
|
66694
|
-
|
66695
|
-
|
66696
|
-
|
66697
|
-
|
66698
|
-
|
67702
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
67703
|
+
if (k2 === undefined) k2 = k;
|
67704
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
67705
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
67706
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
67707
|
+
}
|
67708
|
+
Object.defineProperty(o, k2, desc);
|
67709
|
+
}) : (function(o, m, k, k2) {
|
67710
|
+
if (k2 === undefined) k2 = k;
|
67711
|
+
o[k2] = m[k];
|
67712
|
+
}));
|
67713
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
67714
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
67715
|
+
}) : function(o, v) {
|
67716
|
+
o["default"] = v;
|
67717
|
+
});
|
67718
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
67719
|
+
if (mod && mod.__esModule) return mod;
|
67720
|
+
var result = {};
|
67721
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
67722
|
+
__setModuleDefault(result, mod);
|
67723
|
+
return result;
|
67724
|
+
};
|
67725
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
67726
|
+
exports.decodeSeed = exports.deriveNodeAddress = exports.deriveAddress = exports.verify = exports.sign = exports.deriveKeypair = exports.generateSeed = void 0;
|
67727
|
+
const assert = __importStar(__webpack_require__(/*! assert */ "../../node_modules/assert/build/assert.js"));
|
67728
|
+
const brorand = __webpack_require__(/*! brorand */ "../../node_modules/brorand/index.js");
|
67729
|
+
const hashjs = __importStar(__webpack_require__(/*! hash.js */ "../../node_modules/hash.js/lib/hash.js"));
|
67730
|
+
const elliptic = __importStar(__webpack_require__(/*! elliptic */ "../../node_modules/elliptic/lib/elliptic.js"));
|
67731
|
+
const addressCodec = __importStar(__webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js"));
|
67732
|
+
const secp256k1_1 = __webpack_require__(/*! ./secp256k1 */ "../../node_modules/ripple-keypairs/dist/secp256k1.js");
|
67733
|
+
const utils = __importStar(__webpack_require__(/*! ./utils */ "../../node_modules/ripple-keypairs/dist/utils.js"));
|
67734
|
+
const Ed25519 = elliptic.eddsa('ed25519');
|
67735
|
+
const Secp256k1 = elliptic.ec('secp256k1');
|
67736
|
+
const { hexToBytes } = utils;
|
67737
|
+
const { bytesToHex } = utils;
|
67738
|
+
function generateSeed(options = {}) {
|
67739
|
+
assert.ok(!options.entropy || options.entropy.length >= 16, 'entropy too short');
|
67740
|
+
const entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);
|
67741
|
+
const type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';
|
67742
|
+
return addressCodec.encodeSeed(Buffer.from(entropy), type);
|
66699
67743
|
}
|
66700
|
-
|
66701
|
-
function
|
66702
|
-
|
66703
|
-
try {
|
66704
|
-
var arr = new Uint8Array(1)
|
66705
|
-
var proto = { foo: function () { return 42 } }
|
66706
|
-
Object.setPrototypeOf(proto, Uint8Array.prototype)
|
66707
|
-
Object.setPrototypeOf(arr, proto)
|
66708
|
-
return arr.foo() === 42
|
66709
|
-
} catch (e) {
|
66710
|
-
return false
|
66711
|
-
}
|
67744
|
+
exports.generateSeed = generateSeed;
|
67745
|
+
function hash(message) {
|
67746
|
+
return hashjs.sha512().update(message).digest().slice(0, 32);
|
66712
67747
|
}
|
66713
|
-
|
66714
|
-
|
66715
|
-
|
66716
|
-
|
66717
|
-
|
66718
|
-
|
66719
|
-
|
66720
|
-
}
|
66721
|
-
|
66722
|
-
|
66723
|
-
|
66724
|
-
|
66725
|
-
|
66726
|
-
|
66727
|
-
|
66728
|
-
|
66729
|
-
|
66730
|
-
|
66731
|
-
|
66732
|
-
|
66733
|
-
|
66734
|
-
|
66735
|
-
|
66736
|
-
|
66737
|
-
|
67748
|
+
const secp256k1 = {
|
67749
|
+
deriveKeypair(entropy, options) {
|
67750
|
+
const prefix = '00';
|
67751
|
+
const privateKey = prefix + (0, secp256k1_1.derivePrivateKey)(entropy, options).toString(16, 64).toUpperCase();
|
67752
|
+
const publicKey = bytesToHex(Secp256k1.keyFromPrivate(privateKey.slice(2))
|
67753
|
+
.getPublic()
|
67754
|
+
.encodeCompressed());
|
67755
|
+
return { privateKey, publicKey };
|
67756
|
+
},
|
67757
|
+
sign(message, privateKey) {
|
67758
|
+
return bytesToHex(Secp256k1.sign(hash(message), hexToBytes(privateKey), {
|
67759
|
+
canonical: true,
|
67760
|
+
}).toDER());
|
67761
|
+
},
|
67762
|
+
verify(message, signature, publicKey) {
|
67763
|
+
return Secp256k1.verify(hash(message), signature, hexToBytes(publicKey));
|
67764
|
+
},
|
67765
|
+
};
|
67766
|
+
const ed25519 = {
|
67767
|
+
deriveKeypair(entropy) {
|
67768
|
+
const prefix = 'ED';
|
67769
|
+
const rawPrivateKey = hash(entropy);
|
67770
|
+
const privateKey = prefix + bytesToHex(rawPrivateKey);
|
67771
|
+
const publicKey = prefix + bytesToHex(Ed25519.keyFromSecret(rawPrivateKey).pubBytes());
|
67772
|
+
return { privateKey, publicKey };
|
67773
|
+
},
|
67774
|
+
sign(message, privateKey) {
|
67775
|
+
// caution: Ed25519.sign interprets all strings as hex, stripping
|
67776
|
+
// any non-hex characters without warning
|
67777
|
+
assert.ok(Array.isArray(message), 'message must be array of octets');
|
67778
|
+
return bytesToHex(Ed25519.sign(message, hexToBytes(privateKey).slice(1)).toBytes());
|
67779
|
+
},
|
67780
|
+
verify(message, signature, publicKey) {
|
67781
|
+
return Ed25519.verify(message, hexToBytes(signature), hexToBytes(publicKey).slice(1));
|
67782
|
+
},
|
67783
|
+
};
|
67784
|
+
function select(algorithm) {
|
67785
|
+
const methods = { 'ecdsa-secp256k1': secp256k1, ed25519 };
|
67786
|
+
return methods[algorithm];
|
66738
67787
|
}
|
66739
|
-
|
66740
|
-
|
66741
|
-
|
66742
|
-
|
66743
|
-
|
66744
|
-
|
66745
|
-
|
66746
|
-
|
66747
|
-
|
66748
|
-
|
66749
|
-
|
66750
|
-
function Buffer (arg, encodingOrOffset, length) {
|
66751
|
-
// Common case.
|
66752
|
-
if (typeof arg === 'number') {
|
66753
|
-
if (typeof encodingOrOffset === 'string') {
|
66754
|
-
throw new TypeError(
|
66755
|
-
'The "string" argument must be of type string. Received type number'
|
66756
|
-
)
|
67788
|
+
function deriveKeypair(seed, options) {
|
67789
|
+
const decoded = addressCodec.decodeSeed(seed);
|
67790
|
+
const algorithm = decoded.type === 'ed25519' ? 'ed25519' : 'ecdsa-secp256k1';
|
67791
|
+
const method = select(algorithm);
|
67792
|
+
const keypair = method.deriveKeypair(decoded.bytes, options);
|
67793
|
+
const messageToVerify = hash('This test message should verify.');
|
67794
|
+
const signature = method.sign(messageToVerify, keypair.privateKey);
|
67795
|
+
/* istanbul ignore if */
|
67796
|
+
if (method.verify(messageToVerify, signature, keypair.publicKey) !== true) {
|
67797
|
+
throw new Error('derived keypair did not generate verifiable signature');
|
66757
67798
|
}
|
66758
|
-
return
|
66759
|
-
|
66760
|
-
|
67799
|
+
return keypair;
|
67800
|
+
}
|
67801
|
+
exports.deriveKeypair = deriveKeypair;
|
67802
|
+
function getAlgorithmFromKey(key) {
|
67803
|
+
const bytes = hexToBytes(key);
|
67804
|
+
return bytes.length === 33 && bytes[0] === 0xed
|
67805
|
+
? 'ed25519'
|
67806
|
+
: 'ecdsa-secp256k1';
|
67807
|
+
}
|
67808
|
+
function sign(messageHex, privateKey) {
|
67809
|
+
const algorithm = getAlgorithmFromKey(privateKey);
|
67810
|
+
return select(algorithm).sign(hexToBytes(messageHex), privateKey);
|
67811
|
+
}
|
67812
|
+
exports.sign = sign;
|
67813
|
+
function verify(messageHex, signature, publicKey) {
|
67814
|
+
const algorithm = getAlgorithmFromKey(publicKey);
|
67815
|
+
return select(algorithm).verify(hexToBytes(messageHex), signature, publicKey);
|
67816
|
+
}
|
67817
|
+
exports.verify = verify;
|
67818
|
+
function deriveAddressFromBytes(publicKeyBytes) {
|
67819
|
+
return addressCodec.encodeAccountID(utils.computePublicKeyHash(publicKeyBytes));
|
67820
|
+
}
|
67821
|
+
function deriveAddress(publicKey) {
|
67822
|
+
return deriveAddressFromBytes(Buffer.from(hexToBytes(publicKey)));
|
67823
|
+
}
|
67824
|
+
exports.deriveAddress = deriveAddress;
|
67825
|
+
function deriveNodeAddress(publicKey) {
|
67826
|
+
const generatorBytes = addressCodec.decodeNodePublic(publicKey);
|
67827
|
+
const accountPublicBytes = (0, secp256k1_1.accountPublicFromPublicGenerator)(generatorBytes);
|
67828
|
+
return deriveAddressFromBytes(accountPublicBytes);
|
66761
67829
|
}
|
67830
|
+
exports.deriveNodeAddress = deriveNodeAddress;
|
67831
|
+
const { decodeSeed } = addressCodec;
|
67832
|
+
exports.decodeSeed = decodeSeed;
|
66762
67833
|
|
66763
|
-
Buffer.poolSize = 8192 // not used by this implementation
|
66764
67834
|
|
66765
|
-
|
66766
|
-
if (typeof value === 'string') {
|
66767
|
-
return fromString(value, encodingOrOffset)
|
66768
|
-
}
|
67835
|
+
/***/ }),
|
66769
67836
|
|
66770
|
-
|
66771
|
-
|
66772
|
-
|
66773
|
-
|
66774
|
-
|
66775
|
-
throw new TypeError(
|
66776
|
-
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
66777
|
-
'or Array-like Object. Received type ' + (typeof value)
|
66778
|
-
)
|
66779
|
-
}
|
66780
|
-
|
66781
|
-
if (isInstance(value, ArrayBuffer) ||
|
66782
|
-
(value && isInstance(value.buffer, ArrayBuffer))) {
|
66783
|
-
return fromArrayBuffer(value, encodingOrOffset, length)
|
66784
|
-
}
|
66785
|
-
|
66786
|
-
if (typeof SharedArrayBuffer !== 'undefined' &&
|
66787
|
-
(isInstance(value, SharedArrayBuffer) ||
|
66788
|
-
(value && isInstance(value.buffer, SharedArrayBuffer)))) {
|
66789
|
-
return fromArrayBuffer(value, encodingOrOffset, length)
|
66790
|
-
}
|
66791
|
-
|
66792
|
-
if (typeof value === 'number') {
|
66793
|
-
throw new TypeError(
|
66794
|
-
'The "value" argument must not be of type number. Received type number'
|
66795
|
-
)
|
66796
|
-
}
|
66797
|
-
|
66798
|
-
var valueOf = value.valueOf && value.valueOf()
|
66799
|
-
if (valueOf != null && valueOf !== value) {
|
66800
|
-
return Buffer.from(valueOf, encodingOrOffset, length)
|
66801
|
-
}
|
66802
|
-
|
66803
|
-
var b = fromObject(value)
|
66804
|
-
if (b) return b
|
66805
|
-
|
66806
|
-
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
|
66807
|
-
typeof value[Symbol.toPrimitive] === 'function') {
|
66808
|
-
return Buffer.from(
|
66809
|
-
value[Symbol.toPrimitive]('string'), encodingOrOffset, length
|
66810
|
-
)
|
66811
|
-
}
|
66812
|
-
|
66813
|
-
throw new TypeError(
|
66814
|
-
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
66815
|
-
'or Array-like Object. Received type ' + (typeof value)
|
66816
|
-
)
|
66817
|
-
}
|
66818
|
-
|
66819
|
-
/**
|
66820
|
-
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
66821
|
-
* if value is a number.
|
66822
|
-
* Buffer.from(str[, encoding])
|
66823
|
-
* Buffer.from(array)
|
66824
|
-
* Buffer.from(buffer)
|
66825
|
-
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
66826
|
-
**/
|
66827
|
-
Buffer.from = function (value, encodingOrOffset, length) {
|
66828
|
-
return from(value, encodingOrOffset, length)
|
66829
|
-
}
|
66830
|
-
|
66831
|
-
// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
|
66832
|
-
// https://github.com/feross/buffer/pull/148
|
66833
|
-
Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
|
66834
|
-
Object.setPrototypeOf(Buffer, Uint8Array)
|
66835
|
-
|
66836
|
-
function assertSize (size) {
|
66837
|
-
if (typeof size !== 'number') {
|
66838
|
-
throw new TypeError('"size" argument must be of type number')
|
66839
|
-
} else if (size < 0) {
|
66840
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"')
|
66841
|
-
}
|
66842
|
-
}
|
66843
|
-
|
66844
|
-
function alloc (size, fill, encoding) {
|
66845
|
-
assertSize(size)
|
66846
|
-
if (size <= 0) {
|
66847
|
-
return createBuffer(size)
|
66848
|
-
}
|
66849
|
-
if (fill !== undefined) {
|
66850
|
-
// Only pay attention to encoding if it's a string. This
|
66851
|
-
// prevents accidentally sending in a number that would
|
66852
|
-
// be interpretted as a start offset.
|
66853
|
-
return typeof encoding === 'string'
|
66854
|
-
? createBuffer(size).fill(fill, encoding)
|
66855
|
-
: createBuffer(size).fill(fill)
|
66856
|
-
}
|
66857
|
-
return createBuffer(size)
|
66858
|
-
}
|
66859
|
-
|
66860
|
-
/**
|
66861
|
-
* Creates a new filled Buffer instance.
|
66862
|
-
* alloc(size[, fill[, encoding]])
|
66863
|
-
**/
|
66864
|
-
Buffer.alloc = function (size, fill, encoding) {
|
66865
|
-
return alloc(size, fill, encoding)
|
66866
|
-
}
|
66867
|
-
|
66868
|
-
function allocUnsafe (size) {
|
66869
|
-
assertSize(size)
|
66870
|
-
return createBuffer(size < 0 ? 0 : checked(size) | 0)
|
66871
|
-
}
|
66872
|
-
|
66873
|
-
/**
|
66874
|
-
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
66875
|
-
* */
|
66876
|
-
Buffer.allocUnsafe = function (size) {
|
66877
|
-
return allocUnsafe(size)
|
66878
|
-
}
|
66879
|
-
/**
|
66880
|
-
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
66881
|
-
*/
|
66882
|
-
Buffer.allocUnsafeSlow = function (size) {
|
66883
|
-
return allocUnsafe(size)
|
66884
|
-
}
|
66885
|
-
|
66886
|
-
function fromString (string, encoding) {
|
66887
|
-
if (typeof encoding !== 'string' || encoding === '') {
|
66888
|
-
encoding = 'utf8'
|
66889
|
-
}
|
66890
|
-
|
66891
|
-
if (!Buffer.isEncoding(encoding)) {
|
66892
|
-
throw new TypeError('Unknown encoding: ' + encoding)
|
66893
|
-
}
|
66894
|
-
|
66895
|
-
var length = byteLength(string, encoding) | 0
|
66896
|
-
var buf = createBuffer(length)
|
66897
|
-
|
66898
|
-
var actual = buf.write(string, encoding)
|
66899
|
-
|
66900
|
-
if (actual !== length) {
|
66901
|
-
// Writing a hex string, for example, that contains invalid characters will
|
66902
|
-
// cause everything after the first invalid character to be ignored. (e.g.
|
66903
|
-
// 'abxxcd' will be treated as 'ab')
|
66904
|
-
buf = buf.slice(0, actual)
|
66905
|
-
}
|
66906
|
-
|
66907
|
-
return buf
|
66908
|
-
}
|
66909
|
-
|
66910
|
-
function fromArrayLike (array) {
|
66911
|
-
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
66912
|
-
var buf = createBuffer(length)
|
66913
|
-
for (var i = 0; i < length; i += 1) {
|
66914
|
-
buf[i] = array[i] & 255
|
66915
|
-
}
|
66916
|
-
return buf
|
66917
|
-
}
|
66918
|
-
|
66919
|
-
function fromArrayBuffer (array, byteOffset, length) {
|
66920
|
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
66921
|
-
throw new RangeError('"offset" is outside of buffer bounds')
|
66922
|
-
}
|
66923
|
-
|
66924
|
-
if (array.byteLength < byteOffset + (length || 0)) {
|
66925
|
-
throw new RangeError('"length" is outside of buffer bounds')
|
66926
|
-
}
|
66927
|
-
|
66928
|
-
var buf
|
66929
|
-
if (byteOffset === undefined && length === undefined) {
|
66930
|
-
buf = new Uint8Array(array)
|
66931
|
-
} else if (length === undefined) {
|
66932
|
-
buf = new Uint8Array(array, byteOffset)
|
66933
|
-
} else {
|
66934
|
-
buf = new Uint8Array(array, byteOffset, length)
|
66935
|
-
}
|
66936
|
-
|
66937
|
-
// Return an augmented `Uint8Array` instance
|
66938
|
-
Object.setPrototypeOf(buf, Buffer.prototype)
|
66939
|
-
|
66940
|
-
return buf
|
66941
|
-
}
|
66942
|
-
|
66943
|
-
function fromObject (obj) {
|
66944
|
-
if (Buffer.isBuffer(obj)) {
|
66945
|
-
var len = checked(obj.length) | 0
|
66946
|
-
var buf = createBuffer(len)
|
66947
|
-
|
66948
|
-
if (buf.length === 0) {
|
66949
|
-
return buf
|
66950
|
-
}
|
66951
|
-
|
66952
|
-
obj.copy(buf, 0, 0, len)
|
66953
|
-
return buf
|
66954
|
-
}
|
66955
|
-
|
66956
|
-
if (obj.length !== undefined) {
|
66957
|
-
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
|
66958
|
-
return createBuffer(0)
|
66959
|
-
}
|
66960
|
-
return fromArrayLike(obj)
|
66961
|
-
}
|
66962
|
-
|
66963
|
-
if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
|
66964
|
-
return fromArrayLike(obj.data)
|
66965
|
-
}
|
66966
|
-
}
|
66967
|
-
|
66968
|
-
function checked (length) {
|
66969
|
-
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when
|
66970
|
-
// length is NaN (which is otherwise coerced to zero.)
|
66971
|
-
if (length >= K_MAX_LENGTH) {
|
66972
|
-
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
66973
|
-
'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
|
66974
|
-
}
|
66975
|
-
return length | 0
|
66976
|
-
}
|
66977
|
-
|
66978
|
-
function SlowBuffer (length) {
|
66979
|
-
if (+length != length) { // eslint-disable-line eqeqeq
|
66980
|
-
length = 0
|
66981
|
-
}
|
66982
|
-
return Buffer.alloc(+length)
|
66983
|
-
}
|
66984
|
-
|
66985
|
-
Buffer.isBuffer = function isBuffer (b) {
|
66986
|
-
return b != null && b._isBuffer === true &&
|
66987
|
-
b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
|
66988
|
-
}
|
66989
|
-
|
66990
|
-
Buffer.compare = function compare (a, b) {
|
66991
|
-
if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
|
66992
|
-
if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
|
66993
|
-
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
66994
|
-
throw new TypeError(
|
66995
|
-
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
66996
|
-
)
|
66997
|
-
}
|
66998
|
-
|
66999
|
-
if (a === b) return 0
|
67000
|
-
|
67001
|
-
var x = a.length
|
67002
|
-
var y = b.length
|
67003
|
-
|
67004
|
-
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
67005
|
-
if (a[i] !== b[i]) {
|
67006
|
-
x = a[i]
|
67007
|
-
y = b[i]
|
67008
|
-
break
|
67009
|
-
}
|
67010
|
-
}
|
67011
|
-
|
67012
|
-
if (x < y) return -1
|
67013
|
-
if (y < x) return 1
|
67014
|
-
return 0
|
67015
|
-
}
|
67016
|
-
|
67017
|
-
Buffer.isEncoding = function isEncoding (encoding) {
|
67018
|
-
switch (String(encoding).toLowerCase()) {
|
67019
|
-
case 'hex':
|
67020
|
-
case 'utf8':
|
67021
|
-
case 'utf-8':
|
67022
|
-
case 'ascii':
|
67023
|
-
case 'latin1':
|
67024
|
-
case 'binary':
|
67025
|
-
case 'base64':
|
67026
|
-
case 'ucs2':
|
67027
|
-
case 'ucs-2':
|
67028
|
-
case 'utf16le':
|
67029
|
-
case 'utf-16le':
|
67030
|
-
return true
|
67031
|
-
default:
|
67032
|
-
return false
|
67033
|
-
}
|
67034
|
-
}
|
67035
|
-
|
67036
|
-
Buffer.concat = function concat (list, length) {
|
67037
|
-
if (!Array.isArray(list)) {
|
67038
|
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
67039
|
-
}
|
67040
|
-
|
67041
|
-
if (list.length === 0) {
|
67042
|
-
return Buffer.alloc(0)
|
67043
|
-
}
|
67044
|
-
|
67045
|
-
var i
|
67046
|
-
if (length === undefined) {
|
67047
|
-
length = 0
|
67048
|
-
for (i = 0; i < list.length; ++i) {
|
67049
|
-
length += list[i].length
|
67050
|
-
}
|
67051
|
-
}
|
67052
|
-
|
67053
|
-
var buffer = Buffer.allocUnsafe(length)
|
67054
|
-
var pos = 0
|
67055
|
-
for (i = 0; i < list.length; ++i) {
|
67056
|
-
var buf = list[i]
|
67057
|
-
if (isInstance(buf, Uint8Array)) {
|
67058
|
-
buf = Buffer.from(buf)
|
67059
|
-
}
|
67060
|
-
if (!Buffer.isBuffer(buf)) {
|
67061
|
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
67062
|
-
}
|
67063
|
-
buf.copy(buffer, pos)
|
67064
|
-
pos += buf.length
|
67065
|
-
}
|
67066
|
-
return buffer
|
67067
|
-
}
|
67068
|
-
|
67069
|
-
function byteLength (string, encoding) {
|
67070
|
-
if (Buffer.isBuffer(string)) {
|
67071
|
-
return string.length
|
67072
|
-
}
|
67073
|
-
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
67074
|
-
return string.byteLength
|
67075
|
-
}
|
67076
|
-
if (typeof string !== 'string') {
|
67077
|
-
throw new TypeError(
|
67078
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
|
67079
|
-
'Received type ' + typeof string
|
67080
|
-
)
|
67081
|
-
}
|
67082
|
-
|
67083
|
-
var len = string.length
|
67084
|
-
var mustMatch = (arguments.length > 2 && arguments[2] === true)
|
67085
|
-
if (!mustMatch && len === 0) return 0
|
67086
|
-
|
67087
|
-
// Use a for loop to avoid recursion
|
67088
|
-
var loweredCase = false
|
67089
|
-
for (;;) {
|
67090
|
-
switch (encoding) {
|
67091
|
-
case 'ascii':
|
67092
|
-
case 'latin1':
|
67093
|
-
case 'binary':
|
67094
|
-
return len
|
67095
|
-
case 'utf8':
|
67096
|
-
case 'utf-8':
|
67097
|
-
return utf8ToBytes(string).length
|
67098
|
-
case 'ucs2':
|
67099
|
-
case 'ucs-2':
|
67100
|
-
case 'utf16le':
|
67101
|
-
case 'utf-16le':
|
67102
|
-
return len * 2
|
67103
|
-
case 'hex':
|
67104
|
-
return len >>> 1
|
67105
|
-
case 'base64':
|
67106
|
-
return base64ToBytes(string).length
|
67107
|
-
default:
|
67108
|
-
if (loweredCase) {
|
67109
|
-
return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
|
67110
|
-
}
|
67111
|
-
encoding = ('' + encoding).toLowerCase()
|
67112
|
-
loweredCase = true
|
67113
|
-
}
|
67114
|
-
}
|
67115
|
-
}
|
67116
|
-
Buffer.byteLength = byteLength
|
67117
|
-
|
67118
|
-
function slowToString (encoding, start, end) {
|
67119
|
-
var loweredCase = false
|
67120
|
-
|
67121
|
-
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
67122
|
-
// property of a typed array.
|
67123
|
-
|
67124
|
-
// This behaves neither like String nor Uint8Array in that we set start/end
|
67125
|
-
// to their upper/lower bounds if the value passed is out of range.
|
67126
|
-
// undefined is handled specially as per ECMA-262 6th Edition,
|
67127
|
-
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
67128
|
-
if (start === undefined || start < 0) {
|
67129
|
-
start = 0
|
67130
|
-
}
|
67131
|
-
// Return early if start > this.length. Done here to prevent potential uint32
|
67132
|
-
// coercion fail below.
|
67133
|
-
if (start > this.length) {
|
67134
|
-
return ''
|
67135
|
-
}
|
67136
|
-
|
67137
|
-
if (end === undefined || end > this.length) {
|
67138
|
-
end = this.length
|
67139
|
-
}
|
67140
|
-
|
67141
|
-
if (end <= 0) {
|
67142
|
-
return ''
|
67143
|
-
}
|
67144
|
-
|
67145
|
-
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
67146
|
-
end >>>= 0
|
67147
|
-
start >>>= 0
|
67148
|
-
|
67149
|
-
if (end <= start) {
|
67150
|
-
return ''
|
67151
|
-
}
|
67152
|
-
|
67153
|
-
if (!encoding) encoding = 'utf8'
|
67154
|
-
|
67155
|
-
while (true) {
|
67156
|
-
switch (encoding) {
|
67157
|
-
case 'hex':
|
67158
|
-
return hexSlice(this, start, end)
|
67159
|
-
|
67160
|
-
case 'utf8':
|
67161
|
-
case 'utf-8':
|
67162
|
-
return utf8Slice(this, start, end)
|
67163
|
-
|
67164
|
-
case 'ascii':
|
67165
|
-
return asciiSlice(this, start, end)
|
67166
|
-
|
67167
|
-
case 'latin1':
|
67168
|
-
case 'binary':
|
67169
|
-
return latin1Slice(this, start, end)
|
67170
|
-
|
67171
|
-
case 'base64':
|
67172
|
-
return base64Slice(this, start, end)
|
67173
|
-
|
67174
|
-
case 'ucs2':
|
67175
|
-
case 'ucs-2':
|
67176
|
-
case 'utf16le':
|
67177
|
-
case 'utf-16le':
|
67178
|
-
return utf16leSlice(this, start, end)
|
67179
|
-
|
67180
|
-
default:
|
67181
|
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
67182
|
-
encoding = (encoding + '').toLowerCase()
|
67183
|
-
loweredCase = true
|
67184
|
-
}
|
67185
|
-
}
|
67186
|
-
}
|
67187
|
-
|
67188
|
-
// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
|
67189
|
-
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
|
67190
|
-
// reliably in a browserify context because there could be multiple different
|
67191
|
-
// copies of the 'buffer' package in use. This method works even for Buffer
|
67192
|
-
// instances that were created from another copy of the `buffer` package.
|
67193
|
-
// See: https://github.com/feross/buffer/issues/154
|
67194
|
-
Buffer.prototype._isBuffer = true
|
67195
|
-
|
67196
|
-
function swap (b, n, m) {
|
67197
|
-
var i = b[n]
|
67198
|
-
b[n] = b[m]
|
67199
|
-
b[m] = i
|
67200
|
-
}
|
67201
|
-
|
67202
|
-
Buffer.prototype.swap16 = function swap16 () {
|
67203
|
-
var len = this.length
|
67204
|
-
if (len % 2 !== 0) {
|
67205
|
-
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
67206
|
-
}
|
67207
|
-
for (var i = 0; i < len; i += 2) {
|
67208
|
-
swap(this, i, i + 1)
|
67209
|
-
}
|
67210
|
-
return this
|
67211
|
-
}
|
67212
|
-
|
67213
|
-
Buffer.prototype.swap32 = function swap32 () {
|
67214
|
-
var len = this.length
|
67215
|
-
if (len % 4 !== 0) {
|
67216
|
-
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
67217
|
-
}
|
67218
|
-
for (var i = 0; i < len; i += 4) {
|
67219
|
-
swap(this, i, i + 3)
|
67220
|
-
swap(this, i + 1, i + 2)
|
67221
|
-
}
|
67222
|
-
return this
|
67223
|
-
}
|
67224
|
-
|
67225
|
-
Buffer.prototype.swap64 = function swap64 () {
|
67226
|
-
var len = this.length
|
67227
|
-
if (len % 8 !== 0) {
|
67228
|
-
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
67229
|
-
}
|
67230
|
-
for (var i = 0; i < len; i += 8) {
|
67231
|
-
swap(this, i, i + 7)
|
67232
|
-
swap(this, i + 1, i + 6)
|
67233
|
-
swap(this, i + 2, i + 5)
|
67234
|
-
swap(this, i + 3, i + 4)
|
67235
|
-
}
|
67236
|
-
return this
|
67237
|
-
}
|
67238
|
-
|
67239
|
-
Buffer.prototype.toString = function toString () {
|
67240
|
-
var length = this.length
|
67241
|
-
if (length === 0) return ''
|
67242
|
-
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
67243
|
-
return slowToString.apply(this, arguments)
|
67244
|
-
}
|
67245
|
-
|
67246
|
-
Buffer.prototype.toLocaleString = Buffer.prototype.toString
|
67247
|
-
|
67248
|
-
Buffer.prototype.equals = function equals (b) {
|
67249
|
-
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
67250
|
-
if (this === b) return true
|
67251
|
-
return Buffer.compare(this, b) === 0
|
67252
|
-
}
|
67253
|
-
|
67254
|
-
Buffer.prototype.inspect = function inspect () {
|
67255
|
-
var str = ''
|
67256
|
-
var max = exports.INSPECT_MAX_BYTES
|
67257
|
-
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
|
67258
|
-
if (this.length > max) str += ' ... '
|
67259
|
-
return '<Buffer ' + str + '>'
|
67260
|
-
}
|
67261
|
-
if (customInspectSymbol) {
|
67262
|
-
Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
|
67263
|
-
}
|
67264
|
-
|
67265
|
-
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
67266
|
-
if (isInstance(target, Uint8Array)) {
|
67267
|
-
target = Buffer.from(target, target.offset, target.byteLength)
|
67268
|
-
}
|
67269
|
-
if (!Buffer.isBuffer(target)) {
|
67270
|
-
throw new TypeError(
|
67271
|
-
'The "target" argument must be one of type Buffer or Uint8Array. ' +
|
67272
|
-
'Received type ' + (typeof target)
|
67273
|
-
)
|
67274
|
-
}
|
67275
|
-
|
67276
|
-
if (start === undefined) {
|
67277
|
-
start = 0
|
67278
|
-
}
|
67279
|
-
if (end === undefined) {
|
67280
|
-
end = target ? target.length : 0
|
67281
|
-
}
|
67282
|
-
if (thisStart === undefined) {
|
67283
|
-
thisStart = 0
|
67284
|
-
}
|
67285
|
-
if (thisEnd === undefined) {
|
67286
|
-
thisEnd = this.length
|
67287
|
-
}
|
67288
|
-
|
67289
|
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
67290
|
-
throw new RangeError('out of range index')
|
67291
|
-
}
|
67292
|
-
|
67293
|
-
if (thisStart >= thisEnd && start >= end) {
|
67294
|
-
return 0
|
67295
|
-
}
|
67296
|
-
if (thisStart >= thisEnd) {
|
67297
|
-
return -1
|
67298
|
-
}
|
67299
|
-
if (start >= end) {
|
67300
|
-
return 1
|
67301
|
-
}
|
67302
|
-
|
67303
|
-
start >>>= 0
|
67304
|
-
end >>>= 0
|
67305
|
-
thisStart >>>= 0
|
67306
|
-
thisEnd >>>= 0
|
67307
|
-
|
67308
|
-
if (this === target) return 0
|
67309
|
-
|
67310
|
-
var x = thisEnd - thisStart
|
67311
|
-
var y = end - start
|
67312
|
-
var len = Math.min(x, y)
|
67313
|
-
|
67314
|
-
var thisCopy = this.slice(thisStart, thisEnd)
|
67315
|
-
var targetCopy = target.slice(start, end)
|
67316
|
-
|
67317
|
-
for (var i = 0; i < len; ++i) {
|
67318
|
-
if (thisCopy[i] !== targetCopy[i]) {
|
67319
|
-
x = thisCopy[i]
|
67320
|
-
y = targetCopy[i]
|
67321
|
-
break
|
67322
|
-
}
|
67323
|
-
}
|
67324
|
-
|
67325
|
-
if (x < y) return -1
|
67326
|
-
if (y < x) return 1
|
67327
|
-
return 0
|
67328
|
-
}
|
67329
|
-
|
67330
|
-
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
67331
|
-
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
67332
|
-
//
|
67333
|
-
// Arguments:
|
67334
|
-
// - buffer - a Buffer to search
|
67335
|
-
// - val - a string, Buffer, or number
|
67336
|
-
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
67337
|
-
// - encoding - an optional encoding, relevant is val is a string
|
67338
|
-
// - dir - true for indexOf, false for lastIndexOf
|
67339
|
-
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
67340
|
-
// Empty buffer means no match
|
67341
|
-
if (buffer.length === 0) return -1
|
67342
|
-
|
67343
|
-
// Normalize byteOffset
|
67344
|
-
if (typeof byteOffset === 'string') {
|
67345
|
-
encoding = byteOffset
|
67346
|
-
byteOffset = 0
|
67347
|
-
} else if (byteOffset > 0x7fffffff) {
|
67348
|
-
byteOffset = 0x7fffffff
|
67349
|
-
} else if (byteOffset < -0x80000000) {
|
67350
|
-
byteOffset = -0x80000000
|
67351
|
-
}
|
67352
|
-
byteOffset = +byteOffset // Coerce to Number.
|
67353
|
-
if (numberIsNaN(byteOffset)) {
|
67354
|
-
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
67355
|
-
byteOffset = dir ? 0 : (buffer.length - 1)
|
67356
|
-
}
|
67357
|
-
|
67358
|
-
// Normalize byteOffset: negative offsets start from the end of the buffer
|
67359
|
-
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
67360
|
-
if (byteOffset >= buffer.length) {
|
67361
|
-
if (dir) return -1
|
67362
|
-
else byteOffset = buffer.length - 1
|
67363
|
-
} else if (byteOffset < 0) {
|
67364
|
-
if (dir) byteOffset = 0
|
67365
|
-
else return -1
|
67366
|
-
}
|
67367
|
-
|
67368
|
-
// Normalize val
|
67369
|
-
if (typeof val === 'string') {
|
67370
|
-
val = Buffer.from(val, encoding)
|
67371
|
-
}
|
67372
|
-
|
67373
|
-
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
67374
|
-
if (Buffer.isBuffer(val)) {
|
67375
|
-
// Special case: looking for empty string/buffer always fails
|
67376
|
-
if (val.length === 0) {
|
67377
|
-
return -1
|
67378
|
-
}
|
67379
|
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
67380
|
-
} else if (typeof val === 'number') {
|
67381
|
-
val = val & 0xFF // Search for a byte value [0-255]
|
67382
|
-
if (typeof Uint8Array.prototype.indexOf === 'function') {
|
67383
|
-
if (dir) {
|
67384
|
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
67385
|
-
} else {
|
67386
|
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
67387
|
-
}
|
67388
|
-
}
|
67389
|
-
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
|
67390
|
-
}
|
67391
|
-
|
67392
|
-
throw new TypeError('val must be string, number or Buffer')
|
67393
|
-
}
|
67394
|
-
|
67395
|
-
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
67396
|
-
var indexSize = 1
|
67397
|
-
var arrLength = arr.length
|
67398
|
-
var valLength = val.length
|
67399
|
-
|
67400
|
-
if (encoding !== undefined) {
|
67401
|
-
encoding = String(encoding).toLowerCase()
|
67402
|
-
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
67403
|
-
encoding === 'utf16le' || encoding === 'utf-16le') {
|
67404
|
-
if (arr.length < 2 || val.length < 2) {
|
67405
|
-
return -1
|
67406
|
-
}
|
67407
|
-
indexSize = 2
|
67408
|
-
arrLength /= 2
|
67409
|
-
valLength /= 2
|
67410
|
-
byteOffset /= 2
|
67411
|
-
}
|
67412
|
-
}
|
67413
|
-
|
67414
|
-
function read (buf, i) {
|
67415
|
-
if (indexSize === 1) {
|
67416
|
-
return buf[i]
|
67417
|
-
} else {
|
67418
|
-
return buf.readUInt16BE(i * indexSize)
|
67419
|
-
}
|
67420
|
-
}
|
67421
|
-
|
67422
|
-
var i
|
67423
|
-
if (dir) {
|
67424
|
-
var foundIndex = -1
|
67425
|
-
for (i = byteOffset; i < arrLength; i++) {
|
67426
|
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
67427
|
-
if (foundIndex === -1) foundIndex = i
|
67428
|
-
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
67429
|
-
} else {
|
67430
|
-
if (foundIndex !== -1) i -= i - foundIndex
|
67431
|
-
foundIndex = -1
|
67432
|
-
}
|
67433
|
-
}
|
67434
|
-
} else {
|
67435
|
-
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
67436
|
-
for (i = byteOffset; i >= 0; i--) {
|
67437
|
-
var found = true
|
67438
|
-
for (var j = 0; j < valLength; j++) {
|
67439
|
-
if (read(arr, i + j) !== read(val, j)) {
|
67440
|
-
found = false
|
67441
|
-
break
|
67442
|
-
}
|
67443
|
-
}
|
67444
|
-
if (found) return i
|
67445
|
-
}
|
67446
|
-
}
|
67447
|
-
|
67448
|
-
return -1
|
67449
|
-
}
|
67450
|
-
|
67451
|
-
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
67452
|
-
return this.indexOf(val, byteOffset, encoding) !== -1
|
67453
|
-
}
|
67454
|
-
|
67455
|
-
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
67456
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
67457
|
-
}
|
67458
|
-
|
67459
|
-
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
67460
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
67461
|
-
}
|
67462
|
-
|
67463
|
-
function hexWrite (buf, string, offset, length) {
|
67464
|
-
offset = Number(offset) || 0
|
67465
|
-
var remaining = buf.length - offset
|
67466
|
-
if (!length) {
|
67467
|
-
length = remaining
|
67468
|
-
} else {
|
67469
|
-
length = Number(length)
|
67470
|
-
if (length > remaining) {
|
67471
|
-
length = remaining
|
67472
|
-
}
|
67473
|
-
}
|
67474
|
-
|
67475
|
-
var strLen = string.length
|
67476
|
-
|
67477
|
-
if (length > strLen / 2) {
|
67478
|
-
length = strLen / 2
|
67479
|
-
}
|
67480
|
-
for (var i = 0; i < length; ++i) {
|
67481
|
-
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
67482
|
-
if (numberIsNaN(parsed)) return i
|
67483
|
-
buf[offset + i] = parsed
|
67484
|
-
}
|
67485
|
-
return i
|
67486
|
-
}
|
67487
|
-
|
67488
|
-
function utf8Write (buf, string, offset, length) {
|
67489
|
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
67490
|
-
}
|
67491
|
-
|
67492
|
-
function asciiWrite (buf, string, offset, length) {
|
67493
|
-
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
67494
|
-
}
|
67495
|
-
|
67496
|
-
function latin1Write (buf, string, offset, length) {
|
67497
|
-
return asciiWrite(buf, string, offset, length)
|
67498
|
-
}
|
67499
|
-
|
67500
|
-
function base64Write (buf, string, offset, length) {
|
67501
|
-
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
67502
|
-
}
|
67503
|
-
|
67504
|
-
function ucs2Write (buf, string, offset, length) {
|
67505
|
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
67506
|
-
}
|
67507
|
-
|
67508
|
-
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
67509
|
-
// Buffer#write(string)
|
67510
|
-
if (offset === undefined) {
|
67511
|
-
encoding = 'utf8'
|
67512
|
-
length = this.length
|
67513
|
-
offset = 0
|
67514
|
-
// Buffer#write(string, encoding)
|
67515
|
-
} else if (length === undefined && typeof offset === 'string') {
|
67516
|
-
encoding = offset
|
67517
|
-
length = this.length
|
67518
|
-
offset = 0
|
67519
|
-
// Buffer#write(string, offset[, length][, encoding])
|
67520
|
-
} else if (isFinite(offset)) {
|
67521
|
-
offset = offset >>> 0
|
67522
|
-
if (isFinite(length)) {
|
67523
|
-
length = length >>> 0
|
67524
|
-
if (encoding === undefined) encoding = 'utf8'
|
67525
|
-
} else {
|
67526
|
-
encoding = length
|
67527
|
-
length = undefined
|
67528
|
-
}
|
67529
|
-
} else {
|
67530
|
-
throw new Error(
|
67531
|
-
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
67532
|
-
)
|
67533
|
-
}
|
67534
|
-
|
67535
|
-
var remaining = this.length - offset
|
67536
|
-
if (length === undefined || length > remaining) length = remaining
|
67537
|
-
|
67538
|
-
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
67539
|
-
throw new RangeError('Attempt to write outside buffer bounds')
|
67540
|
-
}
|
67541
|
-
|
67542
|
-
if (!encoding) encoding = 'utf8'
|
67543
|
-
|
67544
|
-
var loweredCase = false
|
67545
|
-
for (;;) {
|
67546
|
-
switch (encoding) {
|
67547
|
-
case 'hex':
|
67548
|
-
return hexWrite(this, string, offset, length)
|
67549
|
-
|
67550
|
-
case 'utf8':
|
67551
|
-
case 'utf-8':
|
67552
|
-
return utf8Write(this, string, offset, length)
|
67553
|
-
|
67554
|
-
case 'ascii':
|
67555
|
-
return asciiWrite(this, string, offset, length)
|
67556
|
-
|
67557
|
-
case 'latin1':
|
67558
|
-
case 'binary':
|
67559
|
-
return latin1Write(this, string, offset, length)
|
67560
|
-
|
67561
|
-
case 'base64':
|
67562
|
-
// Warning: maxLength not taken into account in base64Write
|
67563
|
-
return base64Write(this, string, offset, length)
|
67564
|
-
|
67565
|
-
case 'ucs2':
|
67566
|
-
case 'ucs-2':
|
67567
|
-
case 'utf16le':
|
67568
|
-
case 'utf-16le':
|
67569
|
-
return ucs2Write(this, string, offset, length)
|
67570
|
-
|
67571
|
-
default:
|
67572
|
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
67573
|
-
encoding = ('' + encoding).toLowerCase()
|
67574
|
-
loweredCase = true
|
67575
|
-
}
|
67576
|
-
}
|
67577
|
-
}
|
67578
|
-
|
67579
|
-
Buffer.prototype.toJSON = function toJSON () {
|
67580
|
-
return {
|
67581
|
-
type: 'Buffer',
|
67582
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
67583
|
-
}
|
67584
|
-
}
|
67585
|
-
|
67586
|
-
function base64Slice (buf, start, end) {
|
67587
|
-
if (start === 0 && end === buf.length) {
|
67588
|
-
return base64.fromByteArray(buf)
|
67589
|
-
} else {
|
67590
|
-
return base64.fromByteArray(buf.slice(start, end))
|
67591
|
-
}
|
67592
|
-
}
|
67593
|
-
|
67594
|
-
function utf8Slice (buf, start, end) {
|
67595
|
-
end = Math.min(buf.length, end)
|
67596
|
-
var res = []
|
67597
|
-
|
67598
|
-
var i = start
|
67599
|
-
while (i < end) {
|
67600
|
-
var firstByte = buf[i]
|
67601
|
-
var codePoint = null
|
67602
|
-
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
67603
|
-
: (firstByte > 0xDF) ? 3
|
67604
|
-
: (firstByte > 0xBF) ? 2
|
67605
|
-
: 1
|
67606
|
-
|
67607
|
-
if (i + bytesPerSequence <= end) {
|
67608
|
-
var secondByte, thirdByte, fourthByte, tempCodePoint
|
67609
|
-
|
67610
|
-
switch (bytesPerSequence) {
|
67611
|
-
case 1:
|
67612
|
-
if (firstByte < 0x80) {
|
67613
|
-
codePoint = firstByte
|
67614
|
-
}
|
67615
|
-
break
|
67616
|
-
case 2:
|
67617
|
-
secondByte = buf[i + 1]
|
67618
|
-
if ((secondByte & 0xC0) === 0x80) {
|
67619
|
-
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
67620
|
-
if (tempCodePoint > 0x7F) {
|
67621
|
-
codePoint = tempCodePoint
|
67622
|
-
}
|
67623
|
-
}
|
67624
|
-
break
|
67625
|
-
case 3:
|
67626
|
-
secondByte = buf[i + 1]
|
67627
|
-
thirdByte = buf[i + 2]
|
67628
|
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
67629
|
-
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
67630
|
-
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
67631
|
-
codePoint = tempCodePoint
|
67632
|
-
}
|
67633
|
-
}
|
67634
|
-
break
|
67635
|
-
case 4:
|
67636
|
-
secondByte = buf[i + 1]
|
67637
|
-
thirdByte = buf[i + 2]
|
67638
|
-
fourthByte = buf[i + 3]
|
67639
|
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
67640
|
-
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
67641
|
-
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
67642
|
-
codePoint = tempCodePoint
|
67643
|
-
}
|
67644
|
-
}
|
67645
|
-
}
|
67646
|
-
}
|
67647
|
-
|
67648
|
-
if (codePoint === null) {
|
67649
|
-
// we did not generate a valid codePoint so insert a
|
67650
|
-
// replacement char (U+FFFD) and advance only 1 byte
|
67651
|
-
codePoint = 0xFFFD
|
67652
|
-
bytesPerSequence = 1
|
67653
|
-
} else if (codePoint > 0xFFFF) {
|
67654
|
-
// encode to utf16 (surrogate pair dance)
|
67655
|
-
codePoint -= 0x10000
|
67656
|
-
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
67657
|
-
codePoint = 0xDC00 | codePoint & 0x3FF
|
67658
|
-
}
|
67659
|
-
|
67660
|
-
res.push(codePoint)
|
67661
|
-
i += bytesPerSequence
|
67662
|
-
}
|
67663
|
-
|
67664
|
-
return decodeCodePointsArray(res)
|
67665
|
-
}
|
67666
|
-
|
67667
|
-
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
67668
|
-
// the lowest limit is Chrome, with 0x10000 args.
|
67669
|
-
// We go 1 magnitude less, for safety
|
67670
|
-
var MAX_ARGUMENTS_LENGTH = 0x1000
|
67671
|
-
|
67672
|
-
function decodeCodePointsArray (codePoints) {
|
67673
|
-
var len = codePoints.length
|
67674
|
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
67675
|
-
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
67676
|
-
}
|
67677
|
-
|
67678
|
-
// Decode in chunks to avoid "call stack size exceeded".
|
67679
|
-
var res = ''
|
67680
|
-
var i = 0
|
67681
|
-
while (i < len) {
|
67682
|
-
res += String.fromCharCode.apply(
|
67683
|
-
String,
|
67684
|
-
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
67685
|
-
)
|
67686
|
-
}
|
67687
|
-
return res
|
67688
|
-
}
|
67689
|
-
|
67690
|
-
function asciiSlice (buf, start, end) {
|
67691
|
-
var ret = ''
|
67692
|
-
end = Math.min(buf.length, end)
|
67693
|
-
|
67694
|
-
for (var i = start; i < end; ++i) {
|
67695
|
-
ret += String.fromCharCode(buf[i] & 0x7F)
|
67696
|
-
}
|
67697
|
-
return ret
|
67698
|
-
}
|
67699
|
-
|
67700
|
-
function latin1Slice (buf, start, end) {
|
67701
|
-
var ret = ''
|
67702
|
-
end = Math.min(buf.length, end)
|
67703
|
-
|
67704
|
-
for (var i = start; i < end; ++i) {
|
67705
|
-
ret += String.fromCharCode(buf[i])
|
67706
|
-
}
|
67707
|
-
return ret
|
67708
|
-
}
|
67709
|
-
|
67710
|
-
function hexSlice (buf, start, end) {
|
67711
|
-
var len = buf.length
|
67712
|
-
|
67713
|
-
if (!start || start < 0) start = 0
|
67714
|
-
if (!end || end < 0 || end > len) end = len
|
67715
|
-
|
67716
|
-
var out = ''
|
67717
|
-
for (var i = start; i < end; ++i) {
|
67718
|
-
out += hexSliceLookupTable[buf[i]]
|
67719
|
-
}
|
67720
|
-
return out
|
67721
|
-
}
|
67722
|
-
|
67723
|
-
function utf16leSlice (buf, start, end) {
|
67724
|
-
var bytes = buf.slice(start, end)
|
67725
|
-
var res = ''
|
67726
|
-
for (var i = 0; i < bytes.length; i += 2) {
|
67727
|
-
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
|
67728
|
-
}
|
67729
|
-
return res
|
67730
|
-
}
|
67731
|
-
|
67732
|
-
Buffer.prototype.slice = function slice (start, end) {
|
67733
|
-
var len = this.length
|
67734
|
-
start = ~~start
|
67735
|
-
end = end === undefined ? len : ~~end
|
67736
|
-
|
67737
|
-
if (start < 0) {
|
67738
|
-
start += len
|
67739
|
-
if (start < 0) start = 0
|
67740
|
-
} else if (start > len) {
|
67741
|
-
start = len
|
67742
|
-
}
|
67743
|
-
|
67744
|
-
if (end < 0) {
|
67745
|
-
end += len
|
67746
|
-
if (end < 0) end = 0
|
67747
|
-
} else if (end > len) {
|
67748
|
-
end = len
|
67749
|
-
}
|
67750
|
-
|
67751
|
-
if (end < start) end = start
|
67752
|
-
|
67753
|
-
var newBuf = this.subarray(start, end)
|
67754
|
-
// Return an augmented `Uint8Array` instance
|
67755
|
-
Object.setPrototypeOf(newBuf, Buffer.prototype)
|
67756
|
-
|
67757
|
-
return newBuf
|
67758
|
-
}
|
67759
|
-
|
67760
|
-
/*
|
67761
|
-
* Need to make sure that buffer isn't trying to write out of bounds.
|
67762
|
-
*/
|
67763
|
-
function checkOffset (offset, ext, length) {
|
67764
|
-
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
67765
|
-
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
67766
|
-
}
|
67767
|
-
|
67768
|
-
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
67769
|
-
offset = offset >>> 0
|
67770
|
-
byteLength = byteLength >>> 0
|
67771
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
67772
|
-
|
67773
|
-
var val = this[offset]
|
67774
|
-
var mul = 1
|
67775
|
-
var i = 0
|
67776
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
67777
|
-
val += this[offset + i] * mul
|
67778
|
-
}
|
67779
|
-
|
67780
|
-
return val
|
67781
|
-
}
|
67782
|
-
|
67783
|
-
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
67784
|
-
offset = offset >>> 0
|
67785
|
-
byteLength = byteLength >>> 0
|
67786
|
-
if (!noAssert) {
|
67787
|
-
checkOffset(offset, byteLength, this.length)
|
67788
|
-
}
|
67789
|
-
|
67790
|
-
var val = this[offset + --byteLength]
|
67791
|
-
var mul = 1
|
67792
|
-
while (byteLength > 0 && (mul *= 0x100)) {
|
67793
|
-
val += this[offset + --byteLength] * mul
|
67794
|
-
}
|
67795
|
-
|
67796
|
-
return val
|
67797
|
-
}
|
67798
|
-
|
67799
|
-
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
67800
|
-
offset = offset >>> 0
|
67801
|
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
67802
|
-
return this[offset]
|
67803
|
-
}
|
67804
|
-
|
67805
|
-
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
67806
|
-
offset = offset >>> 0
|
67807
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
67808
|
-
return this[offset] | (this[offset + 1] << 8)
|
67809
|
-
}
|
67810
|
-
|
67811
|
-
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
67812
|
-
offset = offset >>> 0
|
67813
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
67814
|
-
return (this[offset] << 8) | this[offset + 1]
|
67815
|
-
}
|
67816
|
-
|
67817
|
-
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
67818
|
-
offset = offset >>> 0
|
67819
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67820
|
-
|
67821
|
-
return ((this[offset]) |
|
67822
|
-
(this[offset + 1] << 8) |
|
67823
|
-
(this[offset + 2] << 16)) +
|
67824
|
-
(this[offset + 3] * 0x1000000)
|
67825
|
-
}
|
67826
|
-
|
67827
|
-
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
67828
|
-
offset = offset >>> 0
|
67829
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67830
|
-
|
67831
|
-
return (this[offset] * 0x1000000) +
|
67832
|
-
((this[offset + 1] << 16) |
|
67833
|
-
(this[offset + 2] << 8) |
|
67834
|
-
this[offset + 3])
|
67835
|
-
}
|
67836
|
-
|
67837
|
-
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
67838
|
-
offset = offset >>> 0
|
67839
|
-
byteLength = byteLength >>> 0
|
67840
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
67841
|
-
|
67842
|
-
var val = this[offset]
|
67843
|
-
var mul = 1
|
67844
|
-
var i = 0
|
67845
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
67846
|
-
val += this[offset + i] * mul
|
67847
|
-
}
|
67848
|
-
mul *= 0x80
|
67849
|
-
|
67850
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
67851
|
-
|
67852
|
-
return val
|
67853
|
-
}
|
67854
|
-
|
67855
|
-
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
67856
|
-
offset = offset >>> 0
|
67857
|
-
byteLength = byteLength >>> 0
|
67858
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
67859
|
-
|
67860
|
-
var i = byteLength
|
67861
|
-
var mul = 1
|
67862
|
-
var val = this[offset + --i]
|
67863
|
-
while (i > 0 && (mul *= 0x100)) {
|
67864
|
-
val += this[offset + --i] * mul
|
67865
|
-
}
|
67866
|
-
mul *= 0x80
|
67867
|
-
|
67868
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
67869
|
-
|
67870
|
-
return val
|
67871
|
-
}
|
67872
|
-
|
67873
|
-
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
67874
|
-
offset = offset >>> 0
|
67875
|
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
67876
|
-
if (!(this[offset] & 0x80)) return (this[offset])
|
67877
|
-
return ((0xff - this[offset] + 1) * -1)
|
67878
|
-
}
|
67879
|
-
|
67880
|
-
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
67881
|
-
offset = offset >>> 0
|
67882
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
67883
|
-
var val = this[offset] | (this[offset + 1] << 8)
|
67884
|
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
67885
|
-
}
|
67886
|
-
|
67887
|
-
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
67888
|
-
offset = offset >>> 0
|
67889
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
67890
|
-
var val = this[offset + 1] | (this[offset] << 8)
|
67891
|
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
67892
|
-
}
|
67893
|
-
|
67894
|
-
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
67895
|
-
offset = offset >>> 0
|
67896
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67897
|
-
|
67898
|
-
return (this[offset]) |
|
67899
|
-
(this[offset + 1] << 8) |
|
67900
|
-
(this[offset + 2] << 16) |
|
67901
|
-
(this[offset + 3] << 24)
|
67902
|
-
}
|
67903
|
-
|
67904
|
-
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
67905
|
-
offset = offset >>> 0
|
67906
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67907
|
-
|
67908
|
-
return (this[offset] << 24) |
|
67909
|
-
(this[offset + 1] << 16) |
|
67910
|
-
(this[offset + 2] << 8) |
|
67911
|
-
(this[offset + 3])
|
67912
|
-
}
|
67913
|
-
|
67914
|
-
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
67915
|
-
offset = offset >>> 0
|
67916
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67917
|
-
return ieee754.read(this, offset, true, 23, 4)
|
67918
|
-
}
|
67919
|
-
|
67920
|
-
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
67921
|
-
offset = offset >>> 0
|
67922
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
67923
|
-
return ieee754.read(this, offset, false, 23, 4)
|
67924
|
-
}
|
67925
|
-
|
67926
|
-
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
67927
|
-
offset = offset >>> 0
|
67928
|
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
67929
|
-
return ieee754.read(this, offset, true, 52, 8)
|
67930
|
-
}
|
67931
|
-
|
67932
|
-
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
67933
|
-
offset = offset >>> 0
|
67934
|
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
67935
|
-
return ieee754.read(this, offset, false, 52, 8)
|
67936
|
-
}
|
67937
|
-
|
67938
|
-
function checkInt (buf, value, offset, ext, max, min) {
|
67939
|
-
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
67940
|
-
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
67941
|
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
67942
|
-
}
|
67943
|
-
|
67944
|
-
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
67945
|
-
value = +value
|
67946
|
-
offset = offset >>> 0
|
67947
|
-
byteLength = byteLength >>> 0
|
67948
|
-
if (!noAssert) {
|
67949
|
-
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
67950
|
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
67951
|
-
}
|
67952
|
-
|
67953
|
-
var mul = 1
|
67954
|
-
var i = 0
|
67955
|
-
this[offset] = value & 0xFF
|
67956
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
67957
|
-
this[offset + i] = (value / mul) & 0xFF
|
67958
|
-
}
|
67959
|
-
|
67960
|
-
return offset + byteLength
|
67961
|
-
}
|
67962
|
-
|
67963
|
-
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
67964
|
-
value = +value
|
67965
|
-
offset = offset >>> 0
|
67966
|
-
byteLength = byteLength >>> 0
|
67967
|
-
if (!noAssert) {
|
67968
|
-
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
67969
|
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
67970
|
-
}
|
67971
|
-
|
67972
|
-
var i = byteLength - 1
|
67973
|
-
var mul = 1
|
67974
|
-
this[offset + i] = value & 0xFF
|
67975
|
-
while (--i >= 0 && (mul *= 0x100)) {
|
67976
|
-
this[offset + i] = (value / mul) & 0xFF
|
67977
|
-
}
|
67978
|
-
|
67979
|
-
return offset + byteLength
|
67980
|
-
}
|
67981
|
-
|
67982
|
-
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
67983
|
-
value = +value
|
67984
|
-
offset = offset >>> 0
|
67985
|
-
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
67986
|
-
this[offset] = (value & 0xff)
|
67987
|
-
return offset + 1
|
67988
|
-
}
|
67989
|
-
|
67990
|
-
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
67991
|
-
value = +value
|
67992
|
-
offset = offset >>> 0
|
67993
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
67994
|
-
this[offset] = (value & 0xff)
|
67995
|
-
this[offset + 1] = (value >>> 8)
|
67996
|
-
return offset + 2
|
67997
|
-
}
|
67998
|
-
|
67999
|
-
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
68000
|
-
value = +value
|
68001
|
-
offset = offset >>> 0
|
68002
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
68003
|
-
this[offset] = (value >>> 8)
|
68004
|
-
this[offset + 1] = (value & 0xff)
|
68005
|
-
return offset + 2
|
68006
|
-
}
|
68007
|
-
|
68008
|
-
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
68009
|
-
value = +value
|
68010
|
-
offset = offset >>> 0
|
68011
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
68012
|
-
this[offset + 3] = (value >>> 24)
|
68013
|
-
this[offset + 2] = (value >>> 16)
|
68014
|
-
this[offset + 1] = (value >>> 8)
|
68015
|
-
this[offset] = (value & 0xff)
|
68016
|
-
return offset + 4
|
68017
|
-
}
|
68018
|
-
|
68019
|
-
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
68020
|
-
value = +value
|
68021
|
-
offset = offset >>> 0
|
68022
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
68023
|
-
this[offset] = (value >>> 24)
|
68024
|
-
this[offset + 1] = (value >>> 16)
|
68025
|
-
this[offset + 2] = (value >>> 8)
|
68026
|
-
this[offset + 3] = (value & 0xff)
|
68027
|
-
return offset + 4
|
68028
|
-
}
|
68029
|
-
|
68030
|
-
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
68031
|
-
value = +value
|
68032
|
-
offset = offset >>> 0
|
68033
|
-
if (!noAssert) {
|
68034
|
-
var limit = Math.pow(2, (8 * byteLength) - 1)
|
68035
|
-
|
68036
|
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
68037
|
-
}
|
68038
|
-
|
68039
|
-
var i = 0
|
68040
|
-
var mul = 1
|
68041
|
-
var sub = 0
|
68042
|
-
this[offset] = value & 0xFF
|
68043
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
68044
|
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
68045
|
-
sub = 1
|
68046
|
-
}
|
68047
|
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
68048
|
-
}
|
68049
|
-
|
68050
|
-
return offset + byteLength
|
68051
|
-
}
|
68052
|
-
|
68053
|
-
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
68054
|
-
value = +value
|
68055
|
-
offset = offset >>> 0
|
68056
|
-
if (!noAssert) {
|
68057
|
-
var limit = Math.pow(2, (8 * byteLength) - 1)
|
68058
|
-
|
68059
|
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
68060
|
-
}
|
68061
|
-
|
68062
|
-
var i = byteLength - 1
|
68063
|
-
var mul = 1
|
68064
|
-
var sub = 0
|
68065
|
-
this[offset + i] = value & 0xFF
|
68066
|
-
while (--i >= 0 && (mul *= 0x100)) {
|
68067
|
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
68068
|
-
sub = 1
|
68069
|
-
}
|
68070
|
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
68071
|
-
}
|
68072
|
-
|
68073
|
-
return offset + byteLength
|
68074
|
-
}
|
68075
|
-
|
68076
|
-
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
68077
|
-
value = +value
|
68078
|
-
offset = offset >>> 0
|
68079
|
-
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
68080
|
-
if (value < 0) value = 0xff + value + 1
|
68081
|
-
this[offset] = (value & 0xff)
|
68082
|
-
return offset + 1
|
68083
|
-
}
|
68084
|
-
|
68085
|
-
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
68086
|
-
value = +value
|
68087
|
-
offset = offset >>> 0
|
68088
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
68089
|
-
this[offset] = (value & 0xff)
|
68090
|
-
this[offset + 1] = (value >>> 8)
|
68091
|
-
return offset + 2
|
68092
|
-
}
|
68093
|
-
|
68094
|
-
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
68095
|
-
value = +value
|
68096
|
-
offset = offset >>> 0
|
68097
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
68098
|
-
this[offset] = (value >>> 8)
|
68099
|
-
this[offset + 1] = (value & 0xff)
|
68100
|
-
return offset + 2
|
68101
|
-
}
|
68102
|
-
|
68103
|
-
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
68104
|
-
value = +value
|
68105
|
-
offset = offset >>> 0
|
68106
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
68107
|
-
this[offset] = (value & 0xff)
|
68108
|
-
this[offset + 1] = (value >>> 8)
|
68109
|
-
this[offset + 2] = (value >>> 16)
|
68110
|
-
this[offset + 3] = (value >>> 24)
|
68111
|
-
return offset + 4
|
68112
|
-
}
|
68113
|
-
|
68114
|
-
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
68115
|
-
value = +value
|
68116
|
-
offset = offset >>> 0
|
68117
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
68118
|
-
if (value < 0) value = 0xffffffff + value + 1
|
68119
|
-
this[offset] = (value >>> 24)
|
68120
|
-
this[offset + 1] = (value >>> 16)
|
68121
|
-
this[offset + 2] = (value >>> 8)
|
68122
|
-
this[offset + 3] = (value & 0xff)
|
68123
|
-
return offset + 4
|
68124
|
-
}
|
68125
|
-
|
68126
|
-
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
68127
|
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
68128
|
-
if (offset < 0) throw new RangeError('Index out of range')
|
68129
|
-
}
|
68130
|
-
|
68131
|
-
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
68132
|
-
value = +value
|
68133
|
-
offset = offset >>> 0
|
68134
|
-
if (!noAssert) {
|
68135
|
-
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
68136
|
-
}
|
68137
|
-
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
68138
|
-
return offset + 4
|
68139
|
-
}
|
68140
|
-
|
68141
|
-
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
68142
|
-
return writeFloat(this, value, offset, true, noAssert)
|
68143
|
-
}
|
68144
|
-
|
68145
|
-
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
68146
|
-
return writeFloat(this, value, offset, false, noAssert)
|
68147
|
-
}
|
68148
|
-
|
68149
|
-
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
68150
|
-
value = +value
|
68151
|
-
offset = offset >>> 0
|
68152
|
-
if (!noAssert) {
|
68153
|
-
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
68154
|
-
}
|
68155
|
-
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
68156
|
-
return offset + 8
|
68157
|
-
}
|
68158
|
-
|
68159
|
-
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
68160
|
-
return writeDouble(this, value, offset, true, noAssert)
|
68161
|
-
}
|
68162
|
-
|
68163
|
-
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
68164
|
-
return writeDouble(this, value, offset, false, noAssert)
|
68165
|
-
}
|
68166
|
-
|
68167
|
-
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
68168
|
-
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
68169
|
-
if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
|
68170
|
-
if (!start) start = 0
|
68171
|
-
if (!end && end !== 0) end = this.length
|
68172
|
-
if (targetStart >= target.length) targetStart = target.length
|
68173
|
-
if (!targetStart) targetStart = 0
|
68174
|
-
if (end > 0 && end < start) end = start
|
68175
|
-
|
68176
|
-
// Copy 0 bytes; we're done
|
68177
|
-
if (end === start) return 0
|
68178
|
-
if (target.length === 0 || this.length === 0) return 0
|
68179
|
-
|
68180
|
-
// Fatal error conditions
|
68181
|
-
if (targetStart < 0) {
|
68182
|
-
throw new RangeError('targetStart out of bounds')
|
68183
|
-
}
|
68184
|
-
if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
|
68185
|
-
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
68186
|
-
|
68187
|
-
// Are we oob?
|
68188
|
-
if (end > this.length) end = this.length
|
68189
|
-
if (target.length - targetStart < end - start) {
|
68190
|
-
end = target.length - targetStart + start
|
68191
|
-
}
|
68192
|
-
|
68193
|
-
var len = end - start
|
68194
|
-
|
68195
|
-
if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
|
68196
|
-
// Use built-in when available, missing from IE11
|
68197
|
-
this.copyWithin(targetStart, start, end)
|
68198
|
-
} else if (this === target && start < targetStart && targetStart < end) {
|
68199
|
-
// descending copy from end
|
68200
|
-
for (var i = len - 1; i >= 0; --i) {
|
68201
|
-
target[i + targetStart] = this[i + start]
|
68202
|
-
}
|
68203
|
-
} else {
|
68204
|
-
Uint8Array.prototype.set.call(
|
68205
|
-
target,
|
68206
|
-
this.subarray(start, end),
|
68207
|
-
targetStart
|
68208
|
-
)
|
68209
|
-
}
|
68210
|
-
|
68211
|
-
return len
|
68212
|
-
}
|
68213
|
-
|
68214
|
-
// Usage:
|
68215
|
-
// buffer.fill(number[, offset[, end]])
|
68216
|
-
// buffer.fill(buffer[, offset[, end]])
|
68217
|
-
// buffer.fill(string[, offset[, end]][, encoding])
|
68218
|
-
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
68219
|
-
// Handle string cases:
|
68220
|
-
if (typeof val === 'string') {
|
68221
|
-
if (typeof start === 'string') {
|
68222
|
-
encoding = start
|
68223
|
-
start = 0
|
68224
|
-
end = this.length
|
68225
|
-
} else if (typeof end === 'string') {
|
68226
|
-
encoding = end
|
68227
|
-
end = this.length
|
68228
|
-
}
|
68229
|
-
if (encoding !== undefined && typeof encoding !== 'string') {
|
68230
|
-
throw new TypeError('encoding must be a string')
|
68231
|
-
}
|
68232
|
-
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
68233
|
-
throw new TypeError('Unknown encoding: ' + encoding)
|
68234
|
-
}
|
68235
|
-
if (val.length === 1) {
|
68236
|
-
var code = val.charCodeAt(0)
|
68237
|
-
if ((encoding === 'utf8' && code < 128) ||
|
68238
|
-
encoding === 'latin1') {
|
68239
|
-
// Fast path: If `val` fits into a single byte, use that numeric value.
|
68240
|
-
val = code
|
68241
|
-
}
|
68242
|
-
}
|
68243
|
-
} else if (typeof val === 'number') {
|
68244
|
-
val = val & 255
|
68245
|
-
} else if (typeof val === 'boolean') {
|
68246
|
-
val = Number(val)
|
68247
|
-
}
|
68248
|
-
|
68249
|
-
// Invalid ranges are not set to a default, so can range check early.
|
68250
|
-
if (start < 0 || this.length < start || this.length < end) {
|
68251
|
-
throw new RangeError('Out of range index')
|
68252
|
-
}
|
68253
|
-
|
68254
|
-
if (end <= start) {
|
68255
|
-
return this
|
68256
|
-
}
|
68257
|
-
|
68258
|
-
start = start >>> 0
|
68259
|
-
end = end === undefined ? this.length : end >>> 0
|
68260
|
-
|
68261
|
-
if (!val) val = 0
|
68262
|
-
|
68263
|
-
var i
|
68264
|
-
if (typeof val === 'number') {
|
68265
|
-
for (i = start; i < end; ++i) {
|
68266
|
-
this[i] = val
|
68267
|
-
}
|
68268
|
-
} else {
|
68269
|
-
var bytes = Buffer.isBuffer(val)
|
68270
|
-
? val
|
68271
|
-
: Buffer.from(val, encoding)
|
68272
|
-
var len = bytes.length
|
68273
|
-
if (len === 0) {
|
68274
|
-
throw new TypeError('The value "' + val +
|
68275
|
-
'" is invalid for argument "value"')
|
68276
|
-
}
|
68277
|
-
for (i = 0; i < end - start; ++i) {
|
68278
|
-
this[i + start] = bytes[i % len]
|
68279
|
-
}
|
68280
|
-
}
|
68281
|
-
|
68282
|
-
return this
|
68283
|
-
}
|
68284
|
-
|
68285
|
-
// HELPER FUNCTIONS
|
68286
|
-
// ================
|
68287
|
-
|
68288
|
-
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
|
68289
|
-
|
68290
|
-
function base64clean (str) {
|
68291
|
-
// Node takes equal signs as end of the Base64 encoding
|
68292
|
-
str = str.split('=')[0]
|
68293
|
-
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
68294
|
-
str = str.trim().replace(INVALID_BASE64_RE, '')
|
68295
|
-
// Node converts strings with length < 2 to ''
|
68296
|
-
if (str.length < 2) return ''
|
68297
|
-
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
68298
|
-
while (str.length % 4 !== 0) {
|
68299
|
-
str = str + '='
|
68300
|
-
}
|
68301
|
-
return str
|
68302
|
-
}
|
68303
|
-
|
68304
|
-
function utf8ToBytes (string, units) {
|
68305
|
-
units = units || Infinity
|
68306
|
-
var codePoint
|
68307
|
-
var length = string.length
|
68308
|
-
var leadSurrogate = null
|
68309
|
-
var bytes = []
|
68310
|
-
|
68311
|
-
for (var i = 0; i < length; ++i) {
|
68312
|
-
codePoint = string.charCodeAt(i)
|
68313
|
-
|
68314
|
-
// is surrogate component
|
68315
|
-
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
68316
|
-
// last char was a lead
|
68317
|
-
if (!leadSurrogate) {
|
68318
|
-
// no lead yet
|
68319
|
-
if (codePoint > 0xDBFF) {
|
68320
|
-
// unexpected trail
|
68321
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
68322
|
-
continue
|
68323
|
-
} else if (i + 1 === length) {
|
68324
|
-
// unpaired lead
|
68325
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
68326
|
-
continue
|
68327
|
-
}
|
68328
|
-
|
68329
|
-
// valid lead
|
68330
|
-
leadSurrogate = codePoint
|
68331
|
-
|
68332
|
-
continue
|
68333
|
-
}
|
68334
|
-
|
68335
|
-
// 2 leads in a row
|
68336
|
-
if (codePoint < 0xDC00) {
|
68337
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
68338
|
-
leadSurrogate = codePoint
|
68339
|
-
continue
|
68340
|
-
}
|
68341
|
-
|
68342
|
-
// valid surrogate pair
|
68343
|
-
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
68344
|
-
} else if (leadSurrogate) {
|
68345
|
-
// valid bmp char, but last char was a lead
|
68346
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
68347
|
-
}
|
68348
|
-
|
68349
|
-
leadSurrogate = null
|
68350
|
-
|
68351
|
-
// encode utf8
|
68352
|
-
if (codePoint < 0x80) {
|
68353
|
-
if ((units -= 1) < 0) break
|
68354
|
-
bytes.push(codePoint)
|
68355
|
-
} else if (codePoint < 0x800) {
|
68356
|
-
if ((units -= 2) < 0) break
|
68357
|
-
bytes.push(
|
68358
|
-
codePoint >> 0x6 | 0xC0,
|
68359
|
-
codePoint & 0x3F | 0x80
|
68360
|
-
)
|
68361
|
-
} else if (codePoint < 0x10000) {
|
68362
|
-
if ((units -= 3) < 0) break
|
68363
|
-
bytes.push(
|
68364
|
-
codePoint >> 0xC | 0xE0,
|
68365
|
-
codePoint >> 0x6 & 0x3F | 0x80,
|
68366
|
-
codePoint & 0x3F | 0x80
|
68367
|
-
)
|
68368
|
-
} else if (codePoint < 0x110000) {
|
68369
|
-
if ((units -= 4) < 0) break
|
68370
|
-
bytes.push(
|
68371
|
-
codePoint >> 0x12 | 0xF0,
|
68372
|
-
codePoint >> 0xC & 0x3F | 0x80,
|
68373
|
-
codePoint >> 0x6 & 0x3F | 0x80,
|
68374
|
-
codePoint & 0x3F | 0x80
|
68375
|
-
)
|
68376
|
-
} else {
|
68377
|
-
throw new Error('Invalid code point')
|
68378
|
-
}
|
68379
|
-
}
|
68380
|
-
|
68381
|
-
return bytes
|
68382
|
-
}
|
68383
|
-
|
68384
|
-
function asciiToBytes (str) {
|
68385
|
-
var byteArray = []
|
68386
|
-
for (var i = 0; i < str.length; ++i) {
|
68387
|
-
// Node's code seems to be doing this and not & 0x7F..
|
68388
|
-
byteArray.push(str.charCodeAt(i) & 0xFF)
|
68389
|
-
}
|
68390
|
-
return byteArray
|
68391
|
-
}
|
68392
|
-
|
68393
|
-
function utf16leToBytes (str, units) {
|
68394
|
-
var c, hi, lo
|
68395
|
-
var byteArray = []
|
68396
|
-
for (var i = 0; i < str.length; ++i) {
|
68397
|
-
if ((units -= 2) < 0) break
|
68398
|
-
|
68399
|
-
c = str.charCodeAt(i)
|
68400
|
-
hi = c >> 8
|
68401
|
-
lo = c % 256
|
68402
|
-
byteArray.push(lo)
|
68403
|
-
byteArray.push(hi)
|
68404
|
-
}
|
68405
|
-
|
68406
|
-
return byteArray
|
68407
|
-
}
|
68408
|
-
|
68409
|
-
function base64ToBytes (str) {
|
68410
|
-
return base64.toByteArray(base64clean(str))
|
68411
|
-
}
|
68412
|
-
|
68413
|
-
function blitBuffer (src, dst, offset, length) {
|
68414
|
-
for (var i = 0; i < length; ++i) {
|
68415
|
-
if ((i + offset >= dst.length) || (i >= src.length)) break
|
68416
|
-
dst[i + offset] = src[i]
|
68417
|
-
}
|
68418
|
-
return i
|
68419
|
-
}
|
68420
|
-
|
68421
|
-
// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
|
68422
|
-
// the `instanceof` check but they should be treated as of that type.
|
68423
|
-
// See: https://github.com/feross/buffer/issues/166
|
68424
|
-
function isInstance (obj, type) {
|
68425
|
-
return obj instanceof type ||
|
68426
|
-
(obj != null && obj.constructor != null && obj.constructor.name != null &&
|
68427
|
-
obj.constructor.name === type.name)
|
68428
|
-
}
|
68429
|
-
function numberIsNaN (obj) {
|
68430
|
-
// For IE11 support
|
68431
|
-
return obj !== obj // eslint-disable-line no-self-compare
|
68432
|
-
}
|
68433
|
-
|
68434
|
-
// Create lookup table for `toString('hex')`
|
68435
|
-
// See: https://github.com/feross/buffer/issues/219
|
68436
|
-
var hexSliceLookupTable = (function () {
|
68437
|
-
var alphabet = '0123456789abcdef'
|
68438
|
-
var table = new Array(256)
|
68439
|
-
for (var i = 0; i < 16; ++i) {
|
68440
|
-
var i16 = i * 16
|
68441
|
-
for (var j = 0; j < 16; ++j) {
|
68442
|
-
table[i16 + j] = alphabet[i] + alphabet[j]
|
68443
|
-
}
|
68444
|
-
}
|
68445
|
-
return table
|
68446
|
-
})()
|
68447
|
-
|
68448
|
-
|
68449
|
-
/***/ }),
|
68450
|
-
|
68451
|
-
/***/ "../../node_modules/ripple-keypairs/dist/Sha512.js":
|
68452
|
-
/*!*********************************************************!*\
|
68453
|
-
!*** ../../node_modules/ripple-keypairs/dist/Sha512.js ***!
|
68454
|
-
\*********************************************************/
|
68455
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
68456
|
-
|
68457
|
-
"use strict";
|
68458
|
-
|
68459
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
68460
|
-
if (k2 === undefined) k2 = k;
|
68461
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
68462
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
68463
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
68464
|
-
}
|
68465
|
-
Object.defineProperty(o, k2, desc);
|
68466
|
-
}) : (function(o, m, k, k2) {
|
68467
|
-
if (k2 === undefined) k2 = k;
|
68468
|
-
o[k2] = m[k];
|
68469
|
-
}));
|
68470
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
68471
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
68472
|
-
}) : function(o, v) {
|
68473
|
-
o["default"] = v;
|
68474
|
-
});
|
68475
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
68476
|
-
if (mod && mod.__esModule) return mod;
|
68477
|
-
var result = {};
|
68478
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
68479
|
-
__setModuleDefault(result, mod);
|
68480
|
-
return result;
|
68481
|
-
};
|
68482
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
68483
|
-
/* eslint-disable no-bitwise --
|
68484
|
-
* lots of bitwise operators necessary for this */
|
68485
|
-
const hashjs = __importStar(__webpack_require__(/*! hash.js */ "../../node_modules/hash.js/lib/hash.js"));
|
68486
|
-
const BigNum = __webpack_require__(/*! bn.js */ "../../node_modules/bn.js/lib/bn.js");
|
68487
|
-
class Sha512 {
|
68488
|
-
constructor() {
|
68489
|
-
this.hash = hashjs.sha512();
|
68490
|
-
}
|
68491
|
-
add(bytes) {
|
68492
|
-
this.hash.update(bytes);
|
68493
|
-
return this;
|
68494
|
-
}
|
68495
|
-
addU32(i) {
|
68496
|
-
return this.add([
|
68497
|
-
(i >>> 24) & 0xff,
|
68498
|
-
(i >>> 16) & 0xff,
|
68499
|
-
(i >>> 8) & 0xff,
|
68500
|
-
i & 0xff,
|
68501
|
-
]);
|
68502
|
-
}
|
68503
|
-
finish() {
|
68504
|
-
return this.hash.digest();
|
68505
|
-
}
|
68506
|
-
first256() {
|
68507
|
-
return this.finish().slice(0, 32);
|
68508
|
-
}
|
68509
|
-
first256BN() {
|
68510
|
-
return new BigNum(this.first256());
|
68511
|
-
}
|
68512
|
-
}
|
68513
|
-
exports["default"] = Sha512;
|
68514
|
-
|
68515
|
-
|
68516
|
-
/***/ }),
|
68517
|
-
|
68518
|
-
/***/ "../../node_modules/ripple-keypairs/dist/index.js":
|
68519
|
-
/*!********************************************************!*\
|
68520
|
-
!*** ../../node_modules/ripple-keypairs/dist/index.js ***!
|
68521
|
-
\********************************************************/
|
68522
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
68523
|
-
|
68524
|
-
"use strict";
|
68525
|
-
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "../../node_modules/buffer/index.js")["Buffer"];
|
68526
|
-
|
68527
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
68528
|
-
if (k2 === undefined) k2 = k;
|
68529
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
68530
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
68531
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
68532
|
-
}
|
68533
|
-
Object.defineProperty(o, k2, desc);
|
68534
|
-
}) : (function(o, m, k, k2) {
|
68535
|
-
if (k2 === undefined) k2 = k;
|
68536
|
-
o[k2] = m[k];
|
68537
|
-
}));
|
68538
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
68539
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
68540
|
-
}) : function(o, v) {
|
68541
|
-
o["default"] = v;
|
68542
|
-
});
|
68543
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
68544
|
-
if (mod && mod.__esModule) return mod;
|
68545
|
-
var result = {};
|
68546
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
68547
|
-
__setModuleDefault(result, mod);
|
68548
|
-
return result;
|
68549
|
-
};
|
68550
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
68551
|
-
exports.decodeSeed = exports.deriveNodeAddress = exports.deriveAddress = exports.verify = exports.sign = exports.deriveKeypair = exports.generateSeed = void 0;
|
68552
|
-
const assert = __importStar(__webpack_require__(/*! assert */ "../../node_modules/assert/build/assert.js"));
|
68553
|
-
const brorand = __webpack_require__(/*! brorand */ "../../node_modules/brorand/index.js");
|
68554
|
-
const hashjs = __importStar(__webpack_require__(/*! hash.js */ "../../node_modules/hash.js/lib/hash.js"));
|
68555
|
-
const elliptic = __importStar(__webpack_require__(/*! elliptic */ "../../node_modules/elliptic/lib/elliptic.js"));
|
68556
|
-
const addressCodec = __importStar(__webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js"));
|
68557
|
-
const secp256k1_1 = __webpack_require__(/*! ./secp256k1 */ "../../node_modules/ripple-keypairs/dist/secp256k1.js");
|
68558
|
-
const utils = __importStar(__webpack_require__(/*! ./utils */ "../../node_modules/ripple-keypairs/dist/utils.js"));
|
68559
|
-
const Ed25519 = elliptic.eddsa('ed25519');
|
68560
|
-
const Secp256k1 = elliptic.ec('secp256k1');
|
68561
|
-
const { hexToBytes } = utils;
|
68562
|
-
const { bytesToHex } = utils;
|
68563
|
-
function generateSeed(options = {}) {
|
68564
|
-
assert.ok(!options.entropy || options.entropy.length >= 16, 'entropy too short');
|
68565
|
-
const entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);
|
68566
|
-
const type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';
|
68567
|
-
return addressCodec.encodeSeed(Buffer.from(entropy), type);
|
68568
|
-
}
|
68569
|
-
exports.generateSeed = generateSeed;
|
68570
|
-
function hash(message) {
|
68571
|
-
return hashjs.sha512().update(message).digest().slice(0, 32);
|
68572
|
-
}
|
68573
|
-
const secp256k1 = {
|
68574
|
-
deriveKeypair(entropy, options) {
|
68575
|
-
const prefix = '00';
|
68576
|
-
const privateKey = prefix + (0, secp256k1_1.derivePrivateKey)(entropy, options).toString(16, 64).toUpperCase();
|
68577
|
-
const publicKey = bytesToHex(Secp256k1.keyFromPrivate(privateKey.slice(2))
|
68578
|
-
.getPublic()
|
68579
|
-
.encodeCompressed());
|
68580
|
-
return { privateKey, publicKey };
|
68581
|
-
},
|
68582
|
-
sign(message, privateKey) {
|
68583
|
-
return bytesToHex(Secp256k1.sign(hash(message), hexToBytes(privateKey), {
|
68584
|
-
canonical: true,
|
68585
|
-
}).toDER());
|
68586
|
-
},
|
68587
|
-
verify(message, signature, publicKey) {
|
68588
|
-
return Secp256k1.verify(hash(message), signature, hexToBytes(publicKey));
|
68589
|
-
},
|
68590
|
-
};
|
68591
|
-
const ed25519 = {
|
68592
|
-
deriveKeypair(entropy) {
|
68593
|
-
const prefix = 'ED';
|
68594
|
-
const rawPrivateKey = hash(entropy);
|
68595
|
-
const privateKey = prefix + bytesToHex(rawPrivateKey);
|
68596
|
-
const publicKey = prefix + bytesToHex(Ed25519.keyFromSecret(rawPrivateKey).pubBytes());
|
68597
|
-
return { privateKey, publicKey };
|
68598
|
-
},
|
68599
|
-
sign(message, privateKey) {
|
68600
|
-
// caution: Ed25519.sign interprets all strings as hex, stripping
|
68601
|
-
// any non-hex characters without warning
|
68602
|
-
assert.ok(Array.isArray(message), 'message must be array of octets');
|
68603
|
-
return bytesToHex(Ed25519.sign(message, hexToBytes(privateKey).slice(1)).toBytes());
|
68604
|
-
},
|
68605
|
-
verify(message, signature, publicKey) {
|
68606
|
-
return Ed25519.verify(message, hexToBytes(signature), hexToBytes(publicKey).slice(1));
|
68607
|
-
},
|
68608
|
-
};
|
68609
|
-
function select(algorithm) {
|
68610
|
-
const methods = { 'ecdsa-secp256k1': secp256k1, ed25519 };
|
68611
|
-
return methods[algorithm];
|
68612
|
-
}
|
68613
|
-
function deriveKeypair(seed, options) {
|
68614
|
-
const decoded = addressCodec.decodeSeed(seed);
|
68615
|
-
const algorithm = decoded.type === 'ed25519' ? 'ed25519' : 'ecdsa-secp256k1';
|
68616
|
-
const method = select(algorithm);
|
68617
|
-
const keypair = method.deriveKeypair(decoded.bytes, options);
|
68618
|
-
const messageToVerify = hash('This test message should verify.');
|
68619
|
-
const signature = method.sign(messageToVerify, keypair.privateKey);
|
68620
|
-
/* istanbul ignore if */
|
68621
|
-
if (method.verify(messageToVerify, signature, keypair.publicKey) !== true) {
|
68622
|
-
throw new Error('derived keypair did not generate verifiable signature');
|
68623
|
-
}
|
68624
|
-
return keypair;
|
68625
|
-
}
|
68626
|
-
exports.deriveKeypair = deriveKeypair;
|
68627
|
-
function getAlgorithmFromKey(key) {
|
68628
|
-
const bytes = hexToBytes(key);
|
68629
|
-
return bytes.length === 33 && bytes[0] === 0xed
|
68630
|
-
? 'ed25519'
|
68631
|
-
: 'ecdsa-secp256k1';
|
68632
|
-
}
|
68633
|
-
function sign(messageHex, privateKey) {
|
68634
|
-
const algorithm = getAlgorithmFromKey(privateKey);
|
68635
|
-
return select(algorithm).sign(hexToBytes(messageHex), privateKey);
|
68636
|
-
}
|
68637
|
-
exports.sign = sign;
|
68638
|
-
function verify(messageHex, signature, publicKey) {
|
68639
|
-
const algorithm = getAlgorithmFromKey(publicKey);
|
68640
|
-
return select(algorithm).verify(hexToBytes(messageHex), signature, publicKey);
|
68641
|
-
}
|
68642
|
-
exports.verify = verify;
|
68643
|
-
function deriveAddressFromBytes(publicKeyBytes) {
|
68644
|
-
return addressCodec.encodeAccountID(utils.computePublicKeyHash(publicKeyBytes));
|
68645
|
-
}
|
68646
|
-
function deriveAddress(publicKey) {
|
68647
|
-
return deriveAddressFromBytes(Buffer.from(hexToBytes(publicKey)));
|
68648
|
-
}
|
68649
|
-
exports.deriveAddress = deriveAddress;
|
68650
|
-
function deriveNodeAddress(publicKey) {
|
68651
|
-
const generatorBytes = addressCodec.decodeNodePublic(publicKey);
|
68652
|
-
const accountPublicBytes = (0, secp256k1_1.accountPublicFromPublicGenerator)(generatorBytes);
|
68653
|
-
return deriveAddressFromBytes(accountPublicBytes);
|
68654
|
-
}
|
68655
|
-
exports.deriveNodeAddress = deriveNodeAddress;
|
68656
|
-
const { decodeSeed } = addressCodec;
|
68657
|
-
exports.decodeSeed = decodeSeed;
|
68658
|
-
|
68659
|
-
|
68660
|
-
/***/ }),
|
68661
|
-
|
68662
|
-
/***/ "../../node_modules/ripple-keypairs/dist/secp256k1.js":
|
68663
|
-
/*!************************************************************!*\
|
68664
|
-
!*** ../../node_modules/ripple-keypairs/dist/secp256k1.js ***!
|
68665
|
-
\************************************************************/
|
68666
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
67837
|
+
/***/ "../../node_modules/ripple-keypairs/dist/secp256k1.js":
|
67838
|
+
/*!************************************************************!*\
|
67839
|
+
!*** ../../node_modules/ripple-keypairs/dist/secp256k1.js ***!
|
67840
|
+
\************************************************************/
|
67841
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
68667
67842
|
|
68668
67843
|
"use strict";
|
68669
67844
|
|
@@ -74617,18 +73792,20 @@ var FaucetNetwork;
|
|
74617
73792
|
FaucetNetwork["Testnet"] = "faucet.altnet.rippletest.net";
|
74618
73793
|
FaucetNetwork["Devnet"] = "faucet.devnet.rippletest.net";
|
74619
73794
|
FaucetNetwork["AMMDevnet"] = "ammfaucet.devnet.rippletest.net";
|
74620
|
-
FaucetNetwork["
|
73795
|
+
FaucetNetwork["HooksV3Testnet"] = "hooks-testnet-v3.xrpl-labs.com";
|
73796
|
+
FaucetNetwork["SidechainDevnet"] = "sidechain-faucet.devnet.rippletest.net";
|
74621
73797
|
})(FaucetNetwork = exports.FaucetNetwork || (exports.FaucetNetwork = {}));
|
74622
73798
|
exports.FaucetNetworkPaths = {
|
74623
73799
|
[FaucetNetwork.Testnet]: '/accounts',
|
74624
73800
|
[FaucetNetwork.Devnet]: '/accounts',
|
74625
73801
|
[FaucetNetwork.AMMDevnet]: '/accounts',
|
74626
|
-
[FaucetNetwork.
|
73802
|
+
[FaucetNetwork.HooksV3Testnet]: '/accounts',
|
73803
|
+
[FaucetNetwork.SidechainDevnet]: '/accounts',
|
74627
73804
|
};
|
74628
73805
|
function getFaucetHost(client) {
|
74629
73806
|
const connectionUrl = client.url;
|
74630
|
-
if (connectionUrl.includes('hooks-testnet-
|
74631
|
-
return FaucetNetwork.
|
73807
|
+
if (connectionUrl.includes('hooks-testnet-v3')) {
|
73808
|
+
return FaucetNetwork.HooksV3Testnet;
|
74632
73809
|
}
|
74633
73810
|
if (connectionUrl.includes('altnet') || connectionUrl.includes('testnet')) {
|
74634
73811
|
return FaucetNetwork.Testnet;
|
@@ -74636,6 +73813,12 @@ function getFaucetHost(client) {
|
|
74636
73813
|
if (connectionUrl.includes('amm')) {
|
74637
73814
|
return FaucetNetwork.AMMDevnet;
|
74638
73815
|
}
|
73816
|
+
if (connectionUrl.includes('sidechain-net1')) {
|
73817
|
+
return FaucetNetwork.SidechainDevnet;
|
73818
|
+
}
|
73819
|
+
if (connectionUrl.includes('sidechain-net2')) {
|
73820
|
+
throw new errors_1.XRPLFaucetError('Cannot fund an account on an issuing chain. Accounts must be created via the bridge.');
|
73821
|
+
}
|
74639
73822
|
if (connectionUrl.includes('devnet')) {
|
74640
73823
|
return FaucetNetwork.Devnet;
|
74641
73824
|
}
|
@@ -74831,7 +74014,6 @@ exports["default"] = fundWallet;
|
|
74831
74014
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
74832
74015
|
|
74833
74016
|
"use strict";
|
74834
|
-
/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "../../node_modules/buffer/index.js")["Buffer"];
|
74835
74017
|
|
74836
74018
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
74837
74019
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
@@ -74840,7 +74022,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
74840
74022
|
const bignumber_js_1 = __importDefault(__webpack_require__(/*! bignumber.js */ "../../node_modules/bignumber.js/bignumber.js"));
|
74841
74023
|
const bip32_1 = __webpack_require__(/*! bip32 */ "../../node_modules/bip32/src/index.js");
|
74842
74024
|
const bip39_1 = __webpack_require__(/*! bip39 */ "../../node_modules/bip39/src/index.js");
|
74843
|
-
const isEqual_1 = __importDefault(__webpack_require__(/*! lodash/isEqual */ "../../node_modules/lodash/isEqual.js"));
|
74844
74025
|
const omitBy_1 = __importDefault(__webpack_require__(/*! lodash/omitBy */ "../../node_modules/lodash/omitBy.js"));
|
74845
74026
|
const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
|
74846
74027
|
const ripple_binary_codec_1 = __webpack_require__(/*! ripple-binary-codec */ "../../node_modules/ripple-binary-codec/dist/index.js");
|
@@ -74848,9 +74029,7 @@ const ripple_keypairs_1 = __webpack_require__(/*! ripple-keypairs */ "../../node
|
|
74848
74029
|
const ECDSA_1 = __importDefault(__webpack_require__(/*! ../ECDSA */ "./dist/npm/ECDSA.js"));
|
74849
74030
|
const errors_1 = __webpack_require__(/*! ../errors */ "./dist/npm/errors.js");
|
74850
74031
|
const transactions_1 = __webpack_require__(/*! ../models/transactions */ "./dist/npm/models/transactions/index.js");
|
74851
|
-
const
|
74852
|
-
const utils_1 = __webpack_require__(/*! ../models/utils */ "./dist/npm/models/utils/index.js");
|
74853
|
-
const utils_2 = __webpack_require__(/*! ../sugar/utils */ "./dist/npm/sugar/utils.js");
|
74032
|
+
const utils_1 = __webpack_require__(/*! ../sugar/utils */ "./dist/npm/sugar/utils.js");
|
74854
74033
|
const hashLedger_1 = __webpack_require__(/*! ../utils/hashes/hashLedger */ "./dist/npm/utils/hashes/hashLedger.js");
|
74855
74034
|
const rfc1751_1 = __webpack_require__(/*! ./rfc1751 */ "./dist/npm/Wallet/rfc1751.js");
|
74856
74035
|
const DEFAULT_ALGORITHM = ECDSA_1.default.ed25519;
|
@@ -74863,7 +74042,7 @@ class Wallet {
|
|
74863
74042
|
this.publicKey = publicKey;
|
74864
74043
|
this.privateKey = privateKey;
|
74865
74044
|
this.classicAddress = opts.masterAddress
|
74866
|
-
? (0,
|
74045
|
+
? (0, utils_1.ensureClassicAddress)(opts.masterAddress)
|
74867
74046
|
: (0, ripple_keypairs_1.deriveAddress)(publicKey);
|
74868
74047
|
this.seed = opts.seed;
|
74869
74048
|
}
|
@@ -74871,6 +74050,9 @@ class Wallet {
|
|
74871
74050
|
return this.classicAddress;
|
74872
74051
|
}
|
74873
74052
|
static generate(algorithm = DEFAULT_ALGORITHM) {
|
74053
|
+
if (!Object.values(ECDSA_1.default).includes(algorithm)) {
|
74054
|
+
throw new errors_1.ValidationError('Invalid cryptographic signing algorithm');
|
74055
|
+
}
|
74874
74056
|
const seed = (0, ripple_keypairs_1.generateSeed)({ algorithm });
|
74875
74057
|
return Wallet.fromSeed(seed);
|
74876
74058
|
}
|
@@ -74969,7 +74151,6 @@ class Wallet {
|
|
74969
74151
|
txToSignAndEncode.TxnSignature = computeSignature(txToSignAndEncode, this.privateKey);
|
74970
74152
|
}
|
74971
74153
|
const serialized = (0, ripple_binary_codec_1.encode)(txToSignAndEncode);
|
74972
|
-
this.checkTxSerialization(serialized, tx);
|
74973
74154
|
return {
|
74974
74155
|
tx_blob: serialized,
|
74975
74156
|
hash: (0, hashLedger_1.hashSignedTx)(serialized),
|
@@ -74986,73 +74167,6 @@ class Wallet {
|
|
74986
74167
|
getXAddress(tag = false, isTestnet = false) {
|
74987
74168
|
return (0, ripple_address_codec_1.classicAddressToXAddress)(this.classicAddress, tag, isTestnet);
|
74988
74169
|
}
|
74989
|
-
checkTxSerialization(serialized, tx) {
|
74990
|
-
var _a;
|
74991
|
-
const decoded = (0, ripple_binary_codec_1.decode)(serialized);
|
74992
|
-
const txCopy = Object.assign({}, tx);
|
74993
|
-
if (!decoded.TxnSignature && !decoded.Signers) {
|
74994
|
-
throw new errors_1.ValidationError('Serialized transaction must have a TxnSignature or Signers property');
|
74995
|
-
}
|
74996
|
-
delete decoded.TxnSignature;
|
74997
|
-
delete decoded.Signers;
|
74998
|
-
if (!tx.SigningPubKey) {
|
74999
|
-
delete decoded.SigningPubKey;
|
75000
|
-
}
|
75001
|
-
(_a = txCopy.Memos) === null || _a === void 0 ? void 0 : _a.map((memo) => {
|
75002
|
-
const memoCopy = Object.assign({}, memo);
|
75003
|
-
if (memo.Memo.MemoData) {
|
75004
|
-
if (!(0, utils_1.isHex)(memo.Memo.MemoData)) {
|
75005
|
-
throw new errors_1.ValidationError('MemoData field must be a hex value');
|
75006
|
-
}
|
75007
|
-
memoCopy.Memo.MemoData = memo.Memo.MemoData.toUpperCase();
|
75008
|
-
}
|
75009
|
-
if (memo.Memo.MemoType) {
|
75010
|
-
if (!(0, utils_1.isHex)(memo.Memo.MemoType)) {
|
75011
|
-
throw new errors_1.ValidationError('MemoType field must be a hex value');
|
75012
|
-
}
|
75013
|
-
memoCopy.Memo.MemoType = memo.Memo.MemoType.toUpperCase();
|
75014
|
-
}
|
75015
|
-
if (memo.Memo.MemoFormat) {
|
75016
|
-
if (!(0, utils_1.isHex)(memo.Memo.MemoFormat)) {
|
75017
|
-
throw new errors_1.ValidationError('MemoFormat field must be a hex value');
|
75018
|
-
}
|
75019
|
-
memoCopy.Memo.MemoFormat = memo.Memo.MemoFormat.toUpperCase();
|
75020
|
-
}
|
75021
|
-
return memo;
|
75022
|
-
});
|
75023
|
-
if (txCopy.TransactionType === 'NFTokenMint' && txCopy.URI) {
|
75024
|
-
txCopy.URI = txCopy.URI.toUpperCase();
|
75025
|
-
}
|
75026
|
-
Object.keys(txCopy).forEach((key) => {
|
75027
|
-
const standard_currency_code_len = 3;
|
75028
|
-
if (txCopy[key] && (0, common_1.isIssuedCurrency)(txCopy[key])) {
|
75029
|
-
const decodedAmount = decoded[key];
|
75030
|
-
const decodedCurrency = decodedAmount.currency;
|
75031
|
-
const txCurrency = txCopy[key].currency;
|
75032
|
-
if (txCurrency.length === standard_currency_code_len &&
|
75033
|
-
txCurrency.toUpperCase() === 'XRP') {
|
75034
|
-
throw new errors_1.XrplError(`Trying to sign an issued currency with a similar standard code to XRP (received '${txCurrency}'). XRP is not an issued currency.`);
|
75035
|
-
}
|
75036
|
-
const amount = txCopy[key];
|
75037
|
-
if (amount.currency.length !== decodedCurrency.length) {
|
75038
|
-
if (decodedCurrency.length === standard_currency_code_len) {
|
75039
|
-
decodedAmount.currency = isoToHex(decodedCurrency);
|
75040
|
-
}
|
75041
|
-
else {
|
75042
|
-
txCopy[key].currency = isoToHex(txCopy[key].currency);
|
75043
|
-
}
|
75044
|
-
}
|
75045
|
-
}
|
75046
|
-
});
|
75047
|
-
if (!(0, isEqual_1.default)(decoded, txCopy)) {
|
75048
|
-
const data = {
|
75049
|
-
decoded,
|
75050
|
-
tx,
|
75051
|
-
};
|
75052
|
-
const error = new errors_1.ValidationError('Serialized transaction does not match original txJSON. See error.data', data);
|
75053
|
-
throw error;
|
75054
|
-
}
|
75055
|
-
}
|
75056
74170
|
}
|
75057
74171
|
Wallet.fromSecret = Wallet.fromSeed;
|
75058
74172
|
function computeSignature(tx, privateKey, signAs) {
|
@@ -75073,14 +74187,6 @@ function removeTrailingZeros(tx) {
|
|
75073
74187
|
tx.Amount.value = new bignumber_js_1.default(tx.Amount.value).toString();
|
75074
74188
|
}
|
75075
74189
|
}
|
75076
|
-
function isoToHex(iso) {
|
75077
|
-
const bytes = Buffer.alloc(20);
|
75078
|
-
if (iso !== 'XRP') {
|
75079
|
-
const isoBytes = iso.split('').map((chr) => chr.charCodeAt(0));
|
75080
|
-
bytes.set(isoBytes, 12);
|
75081
|
-
}
|
75082
|
-
return bytes.toString('hex').toUpperCase();
|
75083
|
-
}
|
75084
74190
|
exports["default"] = Wallet;
|
75085
74191
|
|
75086
74192
|
|
@@ -76381,6 +75487,19 @@ Object.defineProperty(exports, "rfc1751MnemonicToKey", ({ enumerable: true, get:
|
|
76381
75487
|
__exportStar(__webpack_require__(/*! ./Wallet/signer */ "./dist/npm/Wallet/signer.js"), exports);
|
76382
75488
|
|
76383
75489
|
|
75490
|
+
/***/ }),
|
75491
|
+
|
75492
|
+
/***/ "./dist/npm/models/common/index.js":
|
75493
|
+
/*!*****************************************!*\
|
75494
|
+
!*** ./dist/npm/models/common/index.js ***!
|
75495
|
+
\*****************************************/
|
75496
|
+
/***/ ((__unused_webpack_module, exports) => {
|
75497
|
+
|
75498
|
+
"use strict";
|
75499
|
+
|
75500
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
75501
|
+
|
75502
|
+
|
76384
75503
|
/***/ }),
|
76385
75504
|
|
76386
75505
|
/***/ "./dist/npm/models/index.js":
|
@@ -76425,6 +75544,7 @@ Object.defineProperty(exports, "setTransactionFlagsToNumber", ({ enumerable: tru
|
|
76425
75544
|
Object.defineProperty(exports, "parseAccountRootFlags", ({ enumerable: true, get: function () { return flags_1.parseAccountRootFlags; } }));
|
76426
75545
|
__exportStar(__webpack_require__(/*! ./methods */ "./dist/npm/models/methods/index.js"), exports);
|
76427
75546
|
__exportStar(__webpack_require__(/*! ./transactions */ "./dist/npm/models/transactions/index.js"), exports);
|
75547
|
+
__exportStar(__webpack_require__(/*! ./common */ "./dist/npm/models/common/index.js"), exports);
|
76428
75548
|
|
76429
75549
|
|
76430
75550
|
/***/ }),
|
@@ -76450,6 +75570,7 @@ var AccountRootFlags;
|
|
76450
75570
|
AccountRootFlags[AccountRootFlags["lsfGlobalFreeze"] = 4194304] = "lsfGlobalFreeze";
|
76451
75571
|
AccountRootFlags[AccountRootFlags["lsfDefaultRipple"] = 8388608] = "lsfDefaultRipple";
|
76452
75572
|
AccountRootFlags[AccountRootFlags["lsfDepositAuth"] = 16777216] = "lsfDepositAuth";
|
75573
|
+
AccountRootFlags[AccountRootFlags["lsfAMM"] = 33554432] = "lsfAMM";
|
76453
75574
|
AccountRootFlags[AccountRootFlags["lsfDisallowIncomingNFTokenOffer"] = 67108864] = "lsfDisallowIncomingNFTokenOffer";
|
76454
75575
|
AccountRootFlags[AccountRootFlags["lsfDisallowIncomingCheck"] = 134217728] = "lsfDisallowIncomingCheck";
|
76455
75576
|
AccountRootFlags[AccountRootFlags["lsfDisallowIncomingPayChan"] = 268435456] = "lsfDisallowIncomingPayChan";
|
@@ -77108,7 +76229,8 @@ function validateXChainAddAccountCreateAttestation(tx) {
|
|
77108
76229
|
if (tx.XChainAccountCreateCount == null) {
|
77109
76230
|
throw new errors_1.ValidationError('XChainAddAccountCreateAttestation: missing field XChainAccountCreateCount');
|
77110
76231
|
}
|
77111
|
-
if (typeof tx.XChainAccountCreateCount !== 'string'
|
76232
|
+
if (typeof tx.XChainAccountCreateCount !== 'string' &&
|
76233
|
+
typeof tx.XChainAccountCreateCount !== 'number') {
|
77112
76234
|
throw new errors_1.ValidationError('XChainAddAccountCreateAttestation: invalid field XChainAccountCreateCount');
|
77113
76235
|
}
|
77114
76236
|
if (tx.XChainBridge == null) {
|
@@ -77191,7 +76313,8 @@ function validateXChainAddClaimAttestation(tx) {
|
|
77191
76313
|
if (tx.XChainClaimID == null) {
|
77192
76314
|
throw new errors_1.ValidationError('XChainAddClaimAttestation: missing field XChainClaimID');
|
77193
76315
|
}
|
77194
|
-
if (typeof tx.XChainClaimID !== 'string'
|
76316
|
+
if (typeof tx.XChainClaimID !== 'string' &&
|
76317
|
+
typeof tx.XChainClaimID !== 'number') {
|
77195
76318
|
throw new errors_1.ValidationError('XChainAddClaimAttestation: invalid field XChainClaimID');
|
77196
76319
|
}
|
77197
76320
|
}
|
@@ -78430,6 +77553,7 @@ exports.validateTicketCreate = validateTicketCreate;
|
|
78430
77553
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
78431
77554
|
exports.validate = void 0;
|
78432
77555
|
const errors_1 = __webpack_require__(/*! ../../errors */ "./dist/npm/errors.js");
|
77556
|
+
const utils_1 = __webpack_require__(/*! ../utils */ "./dist/npm/models/utils/index.js");
|
78433
77557
|
const flags_1 = __webpack_require__(/*! ../utils/flags */ "./dist/npm/models/utils/flags.js");
|
78434
77558
|
const accountDelete_1 = __webpack_require__(/*! ./accountDelete */ "./dist/npm/models/transactions/accountDelete.js");
|
78435
77559
|
const accountSet_1 = __webpack_require__(/*! ./accountSet */ "./dist/npm/models/transactions/accountSet.js");
|
@@ -78441,6 +77565,7 @@ const AMMWithdraw_1 = __webpack_require__(/*! ./AMMWithdraw */ "./dist/npm/model
|
|
78441
77565
|
const checkCancel_1 = __webpack_require__(/*! ./checkCancel */ "./dist/npm/models/transactions/checkCancel.js");
|
78442
77566
|
const checkCash_1 = __webpack_require__(/*! ./checkCash */ "./dist/npm/models/transactions/checkCash.js");
|
78443
77567
|
const checkCreate_1 = __webpack_require__(/*! ./checkCreate */ "./dist/npm/models/transactions/checkCreate.js");
|
77568
|
+
const common_1 = __webpack_require__(/*! ./common */ "./dist/npm/models/transactions/common.js");
|
78444
77569
|
const depositPreauth_1 = __webpack_require__(/*! ./depositPreauth */ "./dist/npm/models/transactions/depositPreauth.js");
|
78445
77570
|
const escrowCancel_1 = __webpack_require__(/*! ./escrowCancel */ "./dist/npm/models/transactions/escrowCancel.js");
|
78446
77571
|
const escrowCreate_1 = __webpack_require__(/*! ./escrowCreate */ "./dist/npm/models/transactions/escrowCreate.js");
|
@@ -78476,6 +77601,42 @@ function validate(transaction) {
|
|
78476
77601
|
if (typeof tx.TransactionType !== 'string') {
|
78477
77602
|
throw new errors_1.ValidationError("Object's `TransactionType` is not a string");
|
78478
77603
|
}
|
77604
|
+
if (tx.Memos != null && typeof tx.Memos !== 'object') {
|
77605
|
+
throw new errors_1.ValidationError('Memo must be array');
|
77606
|
+
}
|
77607
|
+
if (tx.Memos != null) {
|
77608
|
+
;
|
77609
|
+
tx.Memos.forEach((memo) => {
|
77610
|
+
if ((memo === null || memo === void 0 ? void 0 : memo.Memo) == null) {
|
77611
|
+
throw new errors_1.ValidationError('Memo data must be in a `Memo` field');
|
77612
|
+
}
|
77613
|
+
if (memo.Memo.MemoData) {
|
77614
|
+
if (!(0, utils_1.isHex)(memo.Memo.MemoData)) {
|
77615
|
+
throw new errors_1.ValidationError('MemoData field must be a hex value');
|
77616
|
+
}
|
77617
|
+
}
|
77618
|
+
if (memo.Memo.MemoType) {
|
77619
|
+
if (!(0, utils_1.isHex)(memo.Memo.MemoType)) {
|
77620
|
+
throw new errors_1.ValidationError('MemoType field must be a hex value');
|
77621
|
+
}
|
77622
|
+
}
|
77623
|
+
if (memo.Memo.MemoFormat) {
|
77624
|
+
if (!(0, utils_1.isHex)(memo.Memo.MemoFormat)) {
|
77625
|
+
throw new errors_1.ValidationError('MemoFormat field must be a hex value');
|
77626
|
+
}
|
77627
|
+
}
|
77628
|
+
});
|
77629
|
+
}
|
77630
|
+
Object.keys(tx).forEach((key) => {
|
77631
|
+
const standard_currency_code_len = 3;
|
77632
|
+
if (tx[key] && (0, common_1.isIssuedCurrency)(tx[key])) {
|
77633
|
+
const txCurrency = tx[key].currency;
|
77634
|
+
if (txCurrency.length === standard_currency_code_len &&
|
77635
|
+
txCurrency.toUpperCase() === 'XRP') {
|
77636
|
+
throw new errors_1.ValidationError(`Cannot have an issued currency with a similar standard code to XRP (received '${txCurrency}'). XRP is not an issued currency.`);
|
77637
|
+
}
|
77638
|
+
}
|
77639
|
+
});
|
78479
77640
|
(0, flags_1.setTransactionFlagsToNumber)(tx);
|
78480
77641
|
switch (tx.TransactionType) {
|
78481
77642
|
case 'AccountDelete':
|
@@ -79117,7 +78278,7 @@ const getOrderbookOptionsSet = new Set([
|
|
79117
78278
|
'ledger_hash',
|
79118
78279
|
'taker',
|
79119
78280
|
]);
|
79120
|
-
function getOrderbook(
|
78281
|
+
function getOrderbook(currency1, currency2, options = {}) {
|
79121
78282
|
var _a, _b;
|
79122
78283
|
return __awaiter(this, void 0, void 0, function* () {
|
79123
78284
|
Object.keys(options).forEach((key) => {
|
@@ -79144,16 +78305,16 @@ function getOrderbook(takerPays, takerGets, options = {}) {
|
|
79144
78305
|
}
|
79145
78306
|
const request = {
|
79146
78307
|
command: 'book_offers',
|
79147
|
-
taker_pays:
|
79148
|
-
taker_gets:
|
78308
|
+
taker_pays: currency1,
|
78309
|
+
taker_gets: currency2,
|
79149
78310
|
ledger_index: (_a = options.ledger_index) !== null && _a !== void 0 ? _a : 'validated',
|
79150
78311
|
ledger_hash: options.ledger_hash === null ? undefined : options.ledger_hash,
|
79151
78312
|
limit: (_b = options.limit) !== null && _b !== void 0 ? _b : DEFAULT_LIMIT,
|
79152
78313
|
taker: options.taker ? options.taker : undefined,
|
79153
78314
|
};
|
79154
78315
|
const directOfferResults = yield this.requestAll(request);
|
79155
|
-
request.taker_gets =
|
79156
|
-
request.taker_pays =
|
78316
|
+
request.taker_gets = currency1;
|
78317
|
+
request.taker_pays = currency2;
|
79157
78318
|
const reverseOfferResults = yield this.requestAll(request);
|
79158
78319
|
const directOffers = (0, flatMap_1.default)(directOfferResults, (directOfferResult) => directOfferResult.result.offers);
|
79159
78320
|
const reverseOffers = (0, flatMap_1.default)(reverseOfferResults, (reverseOfferResult) => reverseOfferResult.result.offers);
|
@@ -79316,8 +78477,20 @@ function waitForFinalTransactionOutcome(client, txHash, lastLedger, submissionRe
|
|
79316
78477
|
}
|
79317
78478
|
function isSigned(transaction) {
|
79318
78479
|
const tx = typeof transaction === 'string' ? (0, ripple_binary_codec_1.decode)(transaction) : transaction;
|
79319
|
-
|
79320
|
-
|
78480
|
+
if (typeof tx === 'string') {
|
78481
|
+
return false;
|
78482
|
+
}
|
78483
|
+
if (tx.Signers != null) {
|
78484
|
+
const signers = tx.Signers;
|
78485
|
+
for (const signer of signers) {
|
78486
|
+
if (signer.Signer.SigningPubKey == null ||
|
78487
|
+
signer.Signer.TxnSignature == null) {
|
78488
|
+
return false;
|
78489
|
+
}
|
78490
|
+
}
|
78491
|
+
return true;
|
78492
|
+
}
|
78493
|
+
return tx.SigningPubKey != null && tx.TxnSignature != null;
|
79321
78494
|
}
|
79322
78495
|
function getSignedTx(client, transaction, { autofill = true, wallet, } = {}) {
|
79323
78496
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -79373,35 +78546,6 @@ function ensureClassicAddress(account) {
|
|
79373
78546
|
exports.ensureClassicAddress = ensureClassicAddress;
|
79374
78547
|
|
79375
78548
|
|
79376
|
-
/***/ }),
|
79377
|
-
|
79378
|
-
/***/ "./dist/npm/utils/createCrossChainPayment.js":
|
79379
|
-
/*!***************************************************!*\
|
79380
|
-
!*** ./dist/npm/utils/createCrossChainPayment.js ***!
|
79381
|
-
\***************************************************/
|
79382
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
79383
|
-
|
79384
|
-
"use strict";
|
79385
|
-
|
79386
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
79387
|
-
const errors_1 = __webpack_require__(/*! ../errors */ "./dist/npm/errors.js");
|
79388
|
-
const stringConversion_1 = __webpack_require__(/*! ./stringConversion */ "./dist/npm/utils/stringConversion.js");
|
79389
|
-
function createCrossChainPayment(payment, destAccount) {
|
79390
|
-
var _a;
|
79391
|
-
const destAccountHex = (0, stringConversion_1.convertStringToHex)(destAccount);
|
79392
|
-
const destAccountMemo = { Memo: { MemoData: destAccountHex } };
|
79393
|
-
const memos = (_a = payment.Memos) !== null && _a !== void 0 ? _a : [];
|
79394
|
-
if (memos.length > 2) {
|
79395
|
-
throw new errors_1.XrplError('Cannot have more than 2 memos in a cross-chain transaction.');
|
79396
|
-
}
|
79397
|
-
const newMemos = [destAccountMemo, ...memos];
|
79398
|
-
const newPayment = Object.assign(Object.assign({}, payment), { Memos: newMemos });
|
79399
|
-
delete newPayment.TxnSignature;
|
79400
|
-
return newPayment;
|
79401
|
-
}
|
79402
|
-
exports["default"] = createCrossChainPayment;
|
79403
|
-
|
79404
|
-
|
79405
78549
|
/***/ }),
|
79406
78550
|
|
79407
78551
|
/***/ "./dist/npm/utils/derive.js":
|
@@ -80207,7 +79351,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
80207
79351
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
80208
79352
|
};
|
80209
79353
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
80210
|
-
exports.parseNFTokenID = exports.
|
79354
|
+
exports.parseNFTokenID = exports.getNFTokenID = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encodeForMultiSigning = exports.decode = exports.encode = exports.decodeXAddress = exports.encodeXAddress = exports.decodeAccountPublic = exports.encodeAccountPublic = exports.decodeNodePublic = exports.encodeNodePublic = exports.decodeAccountID = exports.encodeAccountID = exports.decodeSeed = exports.encodeSeed = exports.isValidClassicAddress = exports.isValidXAddress = exports.xAddressToClassicAddress = exports.classicAddressToXAddress = exports.convertHexToString = exports.convertStringToHex = exports.verifyPaymentChannelClaim = exports.verifyKeypairSignature = exports.signPaymentChannelClaim = exports.deriveXAddress = exports.deriveAddress = exports.deriveKeypair = exports.hashes = exports.isValidAddress = exports.isValidSecret = exports.qualityToDecimal = exports.transferRateToDecimal = exports.decimalToTransferRate = exports.percentToTransferRate = exports.decimalToQuality = exports.percentToQuality = exports.unixTimeToRippleTime = exports.rippleTimeToUnixTime = exports.isoTimeToRippleTime = exports.rippleTimeToISOTime = exports.hasNextPage = exports.xrpToDrops = exports.dropsToXrp = exports.getBalanceChanges = void 0;
|
80211
79355
|
const ripple_address_codec_1 = __webpack_require__(/*! ripple-address-codec */ "../../node_modules/ripple-address-codec/dist/index.js");
|
80212
79356
|
Object.defineProperty(exports, "classicAddressToXAddress", ({ enumerable: true, get: function () { return ripple_address_codec_1.classicAddressToXAddress; } }));
|
80213
79357
|
Object.defineProperty(exports, "decodeAccountID", ({ enumerable: true, get: function () { return ripple_address_codec_1.decodeAccountID; } }));
|
@@ -80226,8 +79370,6 @@ Object.defineProperty(exports, "xAddressToClassicAddress", ({ enumerable: true,
|
|
80226
79370
|
const rbc = __importStar(__webpack_require__(/*! ripple-binary-codec */ "../../node_modules/ripple-binary-codec/dist/index.js"));
|
80227
79371
|
const ripple_keypairs_1 = __webpack_require__(/*! ripple-keypairs */ "../../node_modules/ripple-keypairs/dist/index.js");
|
80228
79372
|
Object.defineProperty(exports, "verifyKeypairSignature", ({ enumerable: true, get: function () { return ripple_keypairs_1.verify; } }));
|
80229
|
-
const createCrossChainPayment_1 = __importDefault(__webpack_require__(/*! ./createCrossChainPayment */ "./dist/npm/utils/createCrossChainPayment.js"));
|
80230
|
-
exports.createCrossChainPayment = createCrossChainPayment_1.default;
|
80231
79373
|
const derive_1 = __webpack_require__(/*! ./derive */ "./dist/npm/utils/derive.js");
|
80232
79374
|
Object.defineProperty(exports, "deriveKeypair", ({ enumerable: true, get: function () { return derive_1.deriveKeypair; } }));
|
80233
79375
|
Object.defineProperty(exports, "deriveAddress", ({ enumerable: true, get: function () { return derive_1.deriveAddress; } }));
|
@@ -80810,7 +79952,7 @@ module.exports = JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1
|
|
80810
79952
|
/***/ ((module) => {
|
80811
79953
|
|
80812
79954
|
"use strict";
|
80813
|
-
module.exports = JSON.parse('{"TYPES":{"Done":-1,"Unknown":-2,"NotPresent":0,"UInt16":1,"UInt32":2,"UInt64":3,"Hash128":4,"Hash256":5,"Amount":6,"Blob":7,"AccountID":8,"STObject":14,"STArray":15,"UInt8":16,"Hash160":17,"PathSet":18,"Vector256":19,"UInt96":20,"UInt192":21,"UInt384":22,"UInt512":23,"Issue":24,"XChainBridge":25,"Transaction":10001,"LedgerEntry":10002,"Validation":10003,"Metadata":10004},"LEDGER_ENTRY_TYPES":{"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"Bridge":105,"LedgerHashes":104,"Amendments":102,"XChainClaimID":113,"XChainCreateAccountClaimID":116,"FeeSettings":115,"Escrow":117,"PayChannel":120,"Check":67,"DepositPreauth":112,"NegativeUNL":78,"NFTokenPage":80,"NFTokenOffer":55,"AMM":121,"Any":-3,"Child":-2,"Nickname":110,"Contract":99,"GeneratorMap":103},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["LedgerEntry",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"LedgerEntry"}],["Transaction",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"Transaction"}],["Validation",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"Validation"}],["Metadata",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Metadata"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["HookResult",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["WasLockingChainSend",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransferFee",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TradingFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Version",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookStateChangeCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookEmitCount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookExecutionIndex",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookApiVersion",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["NFTokenTaxon",{"nth":42,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["MintedNFTokens",{"nth":43,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BurnedNFTokens",{"nth":44,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HookStateCount",{"nth":45,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["EmitGeneration",{"nth":46,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["VoteWeight",{"nth":47,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DiscountedFee",{"nth":48,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LockCount",{"nth":49,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["Cookie",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ServerVersion",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["NFTokenOfferNode",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmitBurden",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookOn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookInstructionCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookReturnCode",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ReferenceCount",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainClaimID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountCreateCount",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountClaimCount",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenID",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitParentTxnID",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitNonce",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitHookHash",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AMMID",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ValidatedHash",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousPageMin",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NextPageMin",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenBuyOffer",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenSellOffer",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookStateKey",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookHash",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookNamespace",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookSetTxnID",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Amount2",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMin",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMax",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["NFTokenBrokerFee",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenOut",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenIn",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["EPrice",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Price",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenBalance",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SignatureReward",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinAccountCreateAmount",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LockedBalance",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["URI",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookStateData",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookReturnString",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterName",{"nth":24,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterValue",{"nth":25,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["NFTokenMinter",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["EmitCallback",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AMMAccount",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["HookAccount",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainSource",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainDestination",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationSignerAccount",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationRewardAccount",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["LockingChainDoor",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["IssuingChainDoor",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["NFTokenOffers",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["LockingChainIssue",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["IssuingChainIssue",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset2",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["XChainBridge",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"XChainBridge"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NFToken",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmitDetails",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Hook",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmittedTxn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookExecution",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookDefinition",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookParameter",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookGrant",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["VoteEntry",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuctionSlot",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuthAccount",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimProofSig",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountProofSig",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimAttestationBatchElement",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountAttestationBatchElement",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["NFTokens",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Hooks",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["VoteSlots",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookExecutions",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookParameters",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookGrants",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestationBatch",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestationBatch",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestations",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestations",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AuthAccounts",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temINVALID_COUNT":-266,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temSEQ_AND_TICKET":-263,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temAMM_BAD_TOKENS":-261,"temEQUAL_DOOR_ACCOUNTS":-259,"temBAD_XCHAIN_PROOF":-258,"temSIDECHAIN_BAD_ISSUES":-257,"temSIDECHAIN_NONDOOR_OWNER":-256,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-255,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-254,"temXCHAIN_TOO_MANY_ATTESTATIONS":-253,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"tefNO_TICKET":-180,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"terPRE_TICKET":-88,"terNO_AMM":-87,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152,"tecMAX_SEQUENCE_REACHED":154,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecINSUFFICIENT_FUNDS":159,"tecOBJECT_NOT_FOUND":160,"tecINSUFFICIENT_PAYMENT":161,"tecAMM_UNFUNDED":162,"tecAMM_BALANCE":163,"tecAMM_FAILED_DEPOSIT":164,"tecAMM_FAILED_WITHDRAW":165,"tecAMM_INVALID_TOKENS":166,"tecAMM_FAILED_BID":167,"tecAMM_FAILED_VOTE":168,"tecBAD_XCHAIN_TRANSFER_ISSUE":171,"tecXCHAIN_NO_CLAIM_ID":172,"tecXCHAIN_BAD_CLAIM_ID":173,"tecXCHAIN_CLAIM_NO_QUORUM":174,"tecXCHAIN_PROOF_UNKNOWN_KEY":175,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":176,"tecXCHAIN_WRONG_CHAIN":177,"tecXCHAIN_REWARD_MISMATCH":178,"tecXCHAIN_NO_SIGNERS_LIST":179,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":180,"tecXCHAIN_INSUFF_CREATE_AMOUNT":181,"tecXCHAIN_ACCOUNT_CREATE_PAST":182,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":183,"tecXCHAIN_PAYMENT_FAILED":184,"tecXCHAIN_SELF_COMMIT":185,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":186,"tecPRECISION_LOSS":187},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"SetHook":22,"NFTokenMint":25,"NFTokenBurn":26,"NFTokenCreateOffer":27,"NFTokenCancelOffer":28,"NFTokenAcceptOffer":29,"AMMCreate":35,"AMMDeposit":36,"AMMWithdraw":37,"AMMVote":38,"AMMBid":39,"XChainCreateBridge":40,"XChainCreateClaimID":41,"XChainCommit":42,"XChainClaim":43,"XChainAccountCreateCommit":44,"XChainAddClaimAttestation":45,"XChainAddAccountCreateAttestation":46,"XChainModifyBridge":47,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}');
|
79955
|
+
module.exports = JSON.parse('{"TYPES":{"Done":-1,"Unknown":-2,"NotPresent":0,"UInt16":1,"UInt32":2,"UInt64":3,"Hash128":4,"Hash256":5,"Amount":6,"Blob":7,"AccountID":8,"STObject":14,"STArray":15,"UInt8":16,"Hash160":17,"PathSet":18,"Vector256":19,"UInt96":20,"UInt192":21,"UInt384":22,"UInt512":23,"Issue":24,"XChainBridge":25,"Transaction":10001,"LedgerEntry":10002,"Validation":10003,"Metadata":10004},"LEDGER_ENTRY_TYPES":{"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"Bridge":105,"LedgerHashes":104,"Amendments":102,"XChainClaimID":113,"XChainCreateAccountClaimID":116,"FeeSettings":115,"Escrow":117,"PayChannel":120,"Check":67,"DepositPreauth":112,"NegativeUNL":78,"NFTokenPage":80,"NFTokenOffer":55,"AMM":121,"Any":-3,"Child":-2,"Nickname":110,"Contract":99,"GeneratorMap":103},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["LedgerEntry",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"LedgerEntry"}],["Transaction",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"Transaction"}],["Validation",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":true,"type":"Validation"}],["Metadata",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Metadata"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["HookResult",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["WasLockingChainSend",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransferFee",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TradingFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["DiscountedFee",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Version",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookStateChangeCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookEmitCount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookExecutionIndex",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["HookApiVersion",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["NetworkID",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["NFTokenTaxon",{"nth":42,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["MintedNFTokens",{"nth":43,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BurnedNFTokens",{"nth":44,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HookStateCount",{"nth":45,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["EmitGeneration",{"nth":46,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LockCount",{"nth":47,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["VoteWeight",{"nth":48,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstNFTokenSequence",{"nth":50,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["Cookie",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ServerVersion",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["NFTokenOfferNode",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmitBurden",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookOn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookInstructionCount",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HookReturnCode",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ReferenceCount",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainClaimID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountCreateCount",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["XChainAccountClaimCount",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenID",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitParentTxnID",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitNonce",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["EmitHookHash",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AMMID",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ValidatedHash",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousPageMin",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NextPageMin",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenBuyOffer",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["NFTokenSellOffer",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookStateKey",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookHash",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookNamespace",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["HookSetTxnID",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Amount2",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMin",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BidMax",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["NFTokenBrokerFee",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LockedBalance",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["BaseFeeDrops",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveBaseDrops",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["ReserveIncrementDrops",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenOut",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenIn",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["EPrice",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Price",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SignatureReward",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinAccountCreateAmount",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LPTokenBalance",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["URI",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookStateData",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookReturnString",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterName",{"nth":24,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["HookParameterValue",{"nth":25,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["NFTokenMinter",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["EmitCallback",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["HookAccount",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainSource",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["OtherChainDestination",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationSignerAccount",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["AttestationRewardAccount",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["LockingChainDoor",{"nth":22,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["IssuingChainDoor",{"nth":23,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["NFTokenOffers",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["LockingChainIssue",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["IssuingChainIssue",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["Asset2",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Issue"}],["XChainBridge",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"XChainBridge"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NFToken",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmitDetails",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Hook",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["EmittedTxn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookExecution",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookDefinition",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookParameter",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["HookGrant",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["VoteEntry",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuctionSlot",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["AuthAccount",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimProofSig",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountProofSig",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainClaimAttestationBatchElement",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["XChainCreateAccountAttestationBatchElement",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["NFTokens",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Hooks",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["VoteSlots",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookExecutions",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookParameters",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["HookGrants",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestationBatch",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestationBatch",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainClaimAttestations",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["XChainCreateAccountAttestations",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AuthAccounts",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"telWRONG_NETWORK":-386,"telREQUIRES_NETWORK_ID":-385,"telNETWORK_ID_MAKES_TX_NON_CANONICAL":-384,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temINVALID_COUNT":-266,"temUNCERTAIN":-265,"temUNKNOWN":-264,"temSEQ_AND_TICKET":-263,"temBAD_NFTOKEN_TRANSFER_FEE":-262,"temBAD_AMM_TOKENS":-261,"temEQUAL_DOOR_ACCOUNTS":-259,"temBAD_XCHAIN_PROOF":-258,"temSIDECHAIN_BAD_ISSUES":-257,"temSIDECHAIN_NONDOOR_OWNER":-256,"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT":-255,"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT":-254,"temXCHAIN_TOO_MANY_ATTESTATIONS":-253,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"tefNO_TICKET":-180,"tefNFTOKEN_IS_NOT_TRANSFERABLE":-179,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"terPRE_TICKET":-88,"terNO_AMM":-87,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152,"tecMAX_SEQUENCE_REACHED":154,"tecNO_SUITABLE_NFTOKEN_PAGE":155,"tecNFTOKEN_BUY_SELL_MISMATCH":156,"tecNFTOKEN_OFFER_TYPE_MISMATCH":157,"tecCANT_ACCEPT_OWN_NFTOKEN_OFFER":158,"tecINSUFFICIENT_FUNDS":159,"tecOBJECT_NOT_FOUND":160,"tecINSUFFICIENT_PAYMENT":161,"tecUNFUNDED_AMM":162,"tecAMM_BALANCE":163,"tecAMM_FAILED":164,"tecAMM_INVALID_TOKENS":165,"tecBAD_XCHAIN_TRANSFER_ISSUE":171,"tecXCHAIN_NO_CLAIM_ID":172,"tecXCHAIN_BAD_CLAIM_ID":173,"tecXCHAIN_CLAIM_NO_QUORUM":174,"tecXCHAIN_PROOF_UNKNOWN_KEY":175,"tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE":176,"tecXCHAIN_WRONG_CHAIN":177,"tecXCHAIN_REWARD_MISMATCH":178,"tecXCHAIN_NO_SIGNERS_LIST":179,"tecXCHAIN_SENDING_ACCOUNT_MISMATCH":180,"tecXCHAIN_INSUFF_CREATE_AMOUNT":181,"tecXCHAIN_ACCOUNT_CREATE_PAST":182,"tecXCHAIN_ACCOUNT_CREATE_TOO_MANY":183,"tecXCHAIN_PAYMENT_FAILED":184,"tecXCHAIN_SELF_COMMIT":185,"tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR":186,"tecREQUIRES_FLAG":187,"tecPRECISION_LOSS":188},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"SetHook":22,"NFTokenMint":25,"NFTokenBurn":26,"NFTokenCreateOffer":27,"NFTokenCancelOffer":28,"NFTokenAcceptOffer":29,"AMMCreate":35,"AMMDeposit":36,"AMMWithdraw":37,"AMMVote":38,"AMMBid":39,"XChainCreateBridge":40,"XChainCreateClaimID":41,"XChainCommit":42,"XChainClaim":43,"XChainAccountCreateCommit":44,"XChainAddClaimAttestation":45,"XChainAddAccountCreateAttestation":46,"XChainModifyBridge":47,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}');
|
80814
79956
|
|
80815
79957
|
/***/ }),
|
80816
79958
|
|