function number(n) { if (!Number.isSafeInteger(n) || n < 0) throw new Error(`Wrong positive integer: ${n}`); } function bool(b) { if (typeof b !== 'boolean') throw new Error(`Expected boolean, not ${b}`); } function bytes(b, ...lengths) { if (!(b instanceof Uint8Array)) throw new TypeError('Expected Uint8Array'); if (lengths.length > 0 && !lengths.includes(b.length)) throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`); } function hash(hash) { if (typeof hash !== 'function' || typeof hash.create !== 'function') throw new Error('Hash should be wrapped by utils.wrapConstructor'); number(hash.outputLen); number(hash.blockLen); } function exists(instance, checkFinished = true) { if (instance.destroyed) throw new Error('Hash instance has been destroyed'); if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called'); } function output(out, instance) { bytes(out); const min = instance.outputLen; if (out.length < min) { throw new Error(`digestInto() expects output buffer of length at least ${min}`); } } const assert$1 = { number, bool, bytes, hash, exists, output, }; /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */ // The import here is via the package name. This is to ensure // that exports mapping/resolution does fall into place. const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4)); const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44; // There is almost no big endian hardware, but js typed arrays uses platform specific endianness. // So, just to be sure not to corrupt anything. if (!isLE) throw new Error('Non little-endian hardware is not supported'); Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0')); function utf8ToBytes(str) { if (typeof str !== 'string') { throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`); } return new TextEncoder().encode(str); } function toBytes(data) { if (typeof data === 'string') data = utf8ToBytes(data); if (!(data instanceof Uint8Array)) throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`); return data; } // For runtime check if class implements interface class Hash { // Safe version that clones internal state clone() { return this._cloneInto(); } } function wrapConstructor(hashConstructor) { const hashC = (message) => hashConstructor().update(toBytes(message)).digest(); const tmp = hashConstructor(); hashC.outputLen = tmp.outputLen; hashC.blockLen = tmp.blockLen; hashC.create = () => hashConstructor(); return hashC; } function wrapConstructorWithOpts(hashCons) { const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest(); const tmp = hashCons({}); hashC.outputLen = tmp.outputLen; hashC.blockLen = tmp.blockLen; hashC.create = (opts) => hashCons(opts); return hashC; } const U32_MASK64 = BigInt(2 ** 32 - 1); const _32n = BigInt(32); // We are not using BigUint64Array, because they are extremely slow as per 2022 function fromBig(n, le = false) { if (le) return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) }; return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 }; } function split(lst, le = false) { let Ah = new Uint32Array(lst.length); let Al = new Uint32Array(lst.length); for (let i = 0; i < lst.length; i++) { const { h, l } = fromBig(lst[i], le); [Ah[i], Al[i]] = [h, l]; } return [Ah, Al]; } const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0); // for Shift in [0, 32) const shrSH = (h, l, s) => h >>> s; const shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s); // Right rotate for Shift in [1, 32) const rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s)); const rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s); // Right rotate for Shift in (32, 64), NOTE: 32 is special case. const rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32)); const rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s)); // Right rotate for shift===32 (just swaps l&h) const rotr32H = (h, l) => l; const rotr32L = (h, l) => h; // Left rotate for Shift in [1, 32) const rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s)); const rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s)); // Left rotate for Shift in (32, 64), NOTE: 32 is special case. const rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s)); const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s)); // JS uses 32-bit signed integers for bitwise operations which means we cannot // simple take carry out of low bit sum by shift, we need to use division. // Removing "export" has 5% perf penalty -_- function add(Ah, Al, Bh, Bl) { const l = (Al >>> 0) + (Bl >>> 0); return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 }; } // Addition with more than 2 elements const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0); const add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0; const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0); const add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0; const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0); const add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0; // prettier-ignore const u64 = { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, }; /* Do NOT modify this file; see /src.ts/_admin/update-version.ts */ /** * The current version of Ethers. */ const version = "6.6.6"; /** * Property helper functions. * * @_subsection api/utils:Properties [about-properties] */ function checkType(value, type, name) { const types = type.split("|").map(t => t.trim()); for (let i = 0; i < types.length; i++) { switch (type) { case "any": return; case "bigint": case "boolean": case "number": case "string": if (typeof (value) === type) { return; } } } const error = new Error(`invalid value for type ${type}`); error.code = "INVALID_ARGUMENT"; error.argument = `value.${name}`; error.value = value; throw error; } /** * Assigns the %%values%% to %%target%% as read-only values. * * It %%types%% is specified, the values are checked. */ function defineProperties(target, values, types) { for (let key in values) { let value = values[key]; const type = (types ? types[key] : null); if (type) { checkType(value, type, key); } Object.defineProperty(target, key, { enumerable: true, value, writable: false }); } } /** * All errors in ethers include properties to ensure they are both * human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``). * * The [[isError]] function can be used to check the error ``code`` and * provide a type guard for the properties present on that error interface. * * @_section: api/utils/errors:Errors [about-errors] */ function stringify(value) { if (value == null) { return "null"; } if (Array.isArray(value)) { return "[ " + (value.map(stringify)).join(", ") + " ]"; } if (value instanceof Uint8Array) { const HEX = "0123456789abcdef"; let result = "0x"; for (let i = 0; i < value.length; i++) { result += HEX[value[i] >> 4]; result += HEX[value[i] & 0xf]; } return result; } if (typeof (value) === "object" && typeof (value.toJSON) === "function") { return stringify(value.toJSON()); } switch (typeof (value)) { case "boolean": case "symbol": return value.toString(); case "bigint": return BigInt(value).toString(); case "number": return (value).toString(); case "string": return JSON.stringify(value); case "object": { const keys = Object.keys(value); keys.sort(); return "{ " + keys.map((k) => `${stringify(k)}: ${stringify(value[k])}`).join(", ") + " }"; } } return `[ COULD NOT SERIALIZE ]`; } /** * Returns a new Error configured to the format ethers emits errors, with * the %%message%%, [[api:ErrorCode]] %%code%% and additioanl properties * for the corresponding EthersError. * * Each error in ethers includes the version of ethers, a * machine-readable [[ErrorCode]], and depneding on %%code%%, additional * required properties. The error message will also include the %%meeage%%, * ethers version, %%code%% and all aditional properties, serialized. */ function makeError(message, code, info) { { const details = []; if (info) { if ("message" in info || "code" in info || "name" in info) { throw new Error(`value will overwrite populated values: ${stringify(info)}`); } for (const key in info) { const value = (info[key]); // try { details.push(key + "=" + stringify(value)); // } catch (error: any) { // console.log("MMM", error.message); // details.push(key + "=[could not serialize object]"); // } } } details.push(`code=${code}`); details.push(`version=${version}`); if (details.length) { message += " (" + details.join(", ") + ")"; } } let error; switch (code) { case "INVALID_ARGUMENT": error = new TypeError(message); break; case "NUMERIC_FAULT": case "BUFFER_OVERRUN": error = new RangeError(message); break; default: error = new Error(message); } defineProperties(error, { code }); if (info) { Object.assign(error, info); } return error; } /** * Throws an EthersError with %%message%%, %%code%% and additional error * %%info%% when %%check%% is falsish.. * * @see [[api:makeError]] */ function assert(check, message, code, info) { if (!check) { throw makeError(message, code, info); } } /** * A simple helper to simply ensuring provided arguments match expected * constraints, throwing if not. * * In TypeScript environments, the %%check%% has been asserted true, so * any further code does not need additional compile-time checks. */ function assertArgument(check, message, name, value) { assert(check, message, "INVALID_ARGUMENT", { argument: name, value: value }); } const _normalizeForms = ["NFD", "NFC", "NFKD", "NFKC"].reduce((accum, form) => { try { // General test for normalize /* c8 ignore start */ if ("test".normalize(form) !== "test") { throw new Error("bad"); } ; /* c8 ignore stop */ if (form === "NFD") { const check = String.fromCharCode(0xe9).normalize("NFD"); const expected = String.fromCharCode(0x65, 0x0301); /* c8 ignore start */ if (check !== expected) { throw new Error("broken"); } /* c8 ignore stop */ } accum.push(form); } catch (error) { } return accum; }, []); /** * Throws if the normalization %%form%% is not supported. */ function assertNormalize(form) { assert(_normalizeForms.indexOf(form) >= 0, "platform missing String.prototype.normalize", "UNSUPPORTED_OPERATION", { operation: "String.prototype.normalize", info: { form } }); } /** * Some data helpers. * * * @_subsection api/utils:Data Helpers [about-data] */ function _getBytes(value, name, copy) { if (value instanceof Uint8Array) { if (copy) { return new Uint8Array(value); } return value; } if (typeof (value) === "string" && value.match(/^0x([0-9a-f][0-9a-f])*$/i)) { const result = new Uint8Array((value.length - 2) / 2); let offset = 2; for (let i = 0; i < result.length; i++) { result[i] = parseInt(value.substring(offset, offset + 2), 16); offset += 2; } return result; } assertArgument(false, "invalid BytesLike value", name || "value", value); } /** * Get a typed Uint8Array for %%value%%. If already a Uint8Array * the original %%value%% is returned; if a copy is required use * [[getBytesCopy]]. * * @see: getBytesCopy */ function getBytes(value, name) { return _getBytes(value, name, false); } const HexCharacters = "0123456789abcdef"; /** * Returns a [[DataHexString]] representation of %%data%%. */ function hexlify(data) { const bytes = getBytes(data); let result = "0x"; for (let i = 0; i < bytes.length; i++) { const v = bytes[i]; result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; } return result; } /** * Using strings in Ethereum (or any security-basd system) requires * additional care. These utilities attempt to mitigate some of the * safety issues as well as provide the ability to recover and analyse * strings. * * @_subsection api/utils:Strings and UTF-8 [about-strings] */ function errorFunc(reason, offset, bytes, output, badCodepoint) { assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes); } function ignoreFunc(reason, offset, bytes, output, badCodepoint) { // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes if (reason === "BAD_PREFIX" || reason === "UNEXPECTED_CONTINUE") { let i = 0; for (let o = offset + 1; o < bytes.length; o++) { if (bytes[o] >> 6 !== 0x02) { break; } i++; } return i; } // This byte runs us past the end of the string, so just jump to the end // (but the first byte was read already read and therefore skipped) if (reason === "OVERRUN") { return bytes.length - offset - 1; } // Nothing to skip return 0; } function replaceFunc(reason, offset, bytes, output, badCodepoint) { // Overlong representations are otherwise "valid" code points; just non-deistingtished if (reason === "OVERLONG") { assertArgument(typeof (badCodepoint) === "number", "invalid bad code point for replacement", "badCodepoint", badCodepoint); output.push(badCodepoint); return 0; } // Put the replacement character into the output output.push(0xfffd); // Otherwise, process as if ignoring errors return ignoreFunc(reason, offset, bytes); } /** * A handful of popular, built-in UTF-8 error handling strategies. * * **``"error"``** - throws on ANY illegal UTF-8 sequence or * non-canonical (overlong) codepoints (this is the default) * * **``"ignore"``** - silently drops any illegal UTF-8 sequence * and accepts non-canonical (overlong) codepoints * * **``"replace"``** - replace any illegal UTF-8 sequence with the * UTF-8 replacement character (i.e. ``"\\ufffd"``) and accepts * non-canonical (overlong) codepoints * * @returns: Record<"error" | "ignore" | "replace", Utf8ErrorFunc> */ const Utf8ErrorFuncs = Object.freeze({ error: errorFunc, ignore: ignoreFunc, replace: replaceFunc }); // http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499 function getUtf8CodePoints(_bytes, onError) { if (onError == null) { onError = Utf8ErrorFuncs.error; } const bytes = getBytes(_bytes, "bytes"); const result = []; let i = 0; // Invalid bytes are ignored while (i < bytes.length) { const c = bytes[i++]; // 0xxx xxxx if (c >> 7 === 0) { result.push(c); continue; } // Multibyte; how many bytes left for this character? let extraLength = null; let overlongMask = null; // 110x xxxx 10xx xxxx if ((c & 0xe0) === 0xc0) { extraLength = 1; overlongMask = 0x7f; // 1110 xxxx 10xx xxxx 10xx xxxx } else if ((c & 0xf0) === 0xe0) { extraLength = 2; overlongMask = 0x7ff; // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx } else if ((c & 0xf8) === 0xf0) { extraLength = 3; overlongMask = 0xffff; } else { if ((c & 0xc0) === 0x80) { i += onError("UNEXPECTED_CONTINUE", i - 1, bytes, result); } else { i += onError("BAD_PREFIX", i - 1, bytes, result); } continue; } // Do we have enough bytes in our data? if (i - 1 + extraLength >= bytes.length) { i += onError("OVERRUN", i - 1, bytes, result); continue; } // Remove the length prefix from the char let res = c & ((1 << (8 - extraLength - 1)) - 1); for (let j = 0; j < extraLength; j++) { let nextChar = bytes[i]; // Invalid continuation byte if ((nextChar & 0xc0) != 0x80) { i += onError("MISSING_CONTINUE", i, bytes, result); res = null; break; } res = (res << 6) | (nextChar & 0x3f); i++; } // See above loop for invalid continuation byte if (res === null) { continue; } // Maximum code point if (res > 0x10ffff) { i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes, result, res); continue; } // Reserved for UTF-16 surrogate halves if (res >= 0xd800 && res <= 0xdfff) { i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes, result, res); continue; } // Check for overlong sequences (more bytes than needed) if (res <= overlongMask) { i += onError("OVERLONG", i - 1 - extraLength, bytes, result, res); continue; } result.push(res); } return result; } // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array /** * Returns the UTF-8 byte representation of %%str%%. * * If %%form%% is specified, the string is normalized. */ function toUtf8Bytes(str, form) { if (form != null) { assertNormalize(form); str = str.normalize(form); } let result = []; for (let i = 0; i < str.length; i++) { const c = str.charCodeAt(i); if (c < 0x80) { result.push(c); } else if (c < 0x800) { result.push((c >> 6) | 0xc0); result.push((c & 0x3f) | 0x80); } else if ((c & 0xfc00) == 0xd800) { i++; const c2 = str.charCodeAt(i); assertArgument(i < str.length && ((c2 & 0xfc00) === 0xdc00), "invalid surrogate pair", "str", str); // Surrogate Pair const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); result.push((pair >> 18) | 0xf0); result.push(((pair >> 12) & 0x3f) | 0x80); result.push(((pair >> 6) & 0x3f) | 0x80); result.push((pair & 0x3f) | 0x80); } else { result.push((c >> 12) | 0xe0); result.push(((c >> 6) & 0x3f) | 0x80); result.push((c & 0x3f) | 0x80); } } return new Uint8Array(result); } //export function _toUtf8String(codePoints) { return codePoints.map((codePoint) => { if (codePoint <= 0xffff) { return String.fromCharCode(codePoint); } codePoint -= 0x10000; return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00)); }).join(""); } /** * Returns the string represented by the UTF-8 data %%bytes%%. * * When %%onError%% function is specified, it is called on UTF-8 * errors allowing recovery using the [[Utf8ErrorFunc]] API. * (default: [error](Utf8ErrorFuncs)) */ function toUtf8String(bytes, onError) { return _toUtf8String(getUtf8CodePoints(bytes, onError)); } // Various per round constants calculations const [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []]; const _0n = BigInt(0); const _1n = BigInt(1); const _2n = BigInt(2); const _7n = BigInt(7); const _256n = BigInt(256); const _0x71n = BigInt(0x71); for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) { // Pi [x, y] = [y, (2 * x + 3 * y) % 5]; SHA3_PI.push(2 * (5 * y + x)); // Rotational SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64); // Iota let t = _0n; for (let j = 0; j < 7; j++) { R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n; if (R & _2n) t ^= _1n << ((_1n << BigInt(j)) - _1n); } _SHA3_IOTA.push(t); } const [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true); // Left rotation (without 0, 32, 64) const rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s); const rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s); // Same as keccakf1600, but allows to skip some rounds function keccakP(s, rounds = 24) { const B = new Uint32Array(5 * 2); // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js) for (let round = 24 - rounds; round < 24; round++) { // Theta θ for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40]; for (let x = 0; x < 10; x += 2) { const idx1 = (x + 8) % 10; const idx0 = (x + 2) % 10; const B0 = B[idx0]; const B1 = B[idx0 + 1]; const Th = rotlH(B0, B1, 1) ^ B[idx1]; const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1]; for (let y = 0; y < 50; y += 10) { s[x + y] ^= Th; s[x + y + 1] ^= Tl; } } // Rho (ρ) and Pi (π) let curH = s[2]; let curL = s[3]; for (let t = 0; t < 24; t++) { const shift = SHA3_ROTL[t]; const Th = rotlH(curH, curL, shift); const Tl = rotlL(curH, curL, shift); const PI = SHA3_PI[t]; curH = s[PI]; curL = s[PI + 1]; s[PI] = Th; s[PI + 1] = Tl; } // Chi (χ) for (let y = 0; y < 50; y += 10) { for (let x = 0; x < 10; x++) B[x] = s[y + x]; for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10]; } // Iota (ι) s[0] ^= SHA3_IOTA_H[round]; s[1] ^= SHA3_IOTA_L[round]; } B.fill(0); } class Keccak extends Hash { // NOTE: we accept arguments in bytes instead of bits here. constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) { super(); this.blockLen = blockLen; this.suffix = suffix; this.outputLen = outputLen; this.enableXOF = enableXOF; this.rounds = rounds; this.pos = 0; this.posOut = 0; this.finished = false; this.destroyed = false; // Can be passed from user as dkLen assert$1.number(outputLen); // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes if (0 >= this.blockLen || this.blockLen >= 200) throw new Error('Sha3 supports only keccak-f1600 function'); this.state = new Uint8Array(200); this.state32 = u32(this.state); } keccak() { keccakP(this.state32, this.rounds); this.posOut = 0; this.pos = 0; } update(data) { assert$1.exists(this); const { blockLen, state } = this; data = toBytes(data); const len = data.length; for (let pos = 0; pos < len;) { const take = Math.min(blockLen - this.pos, len - pos); for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++]; if (this.pos === blockLen) this.keccak(); } return this; } finish() { if (this.finished) return; this.finished = true; const { state, suffix, pos, blockLen } = this; // Do the padding state[pos] ^= suffix; if ((suffix & 0x80) !== 0 && pos === blockLen - 1) this.keccak(); state[blockLen - 1] ^= 0x80; this.keccak(); } writeInto(out) { assert$1.exists(this, false); assert$1.bytes(out); this.finish(); const bufferOut = this.state; const { blockLen } = this; for (let pos = 0, len = out.length; pos < len;) { if (this.posOut >= blockLen) this.keccak(); const take = Math.min(blockLen - this.posOut, len - pos); out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos); this.posOut += take; pos += take; } return out; } xofInto(out) { // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF if (!this.enableXOF) throw new Error('XOF is not possible for this instance'); return this.writeInto(out); } xof(bytes) { assert$1.number(bytes); return this.xofInto(new Uint8Array(bytes)); } digestInto(out) { assert$1.output(out, this); if (this.finished) throw new Error('digest() was already called'); this.writeInto(out); this.destroy(); return out; } digest() { return this.digestInto(new Uint8Array(this.outputLen)); } destroy() { this.destroyed = true; this.state.fill(0); } _cloneInto(to) { const { blockLen, suffix, outputLen, rounds, enableXOF } = this; to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds)); to.state32.set(this.state32); to.pos = this.pos; to.posOut = this.posOut; to.finished = this.finished; to.rounds = rounds; // Suffix can change in cSHAKE to.suffix = suffix; to.outputLen = outputLen; to.enableXOF = enableXOF; to.destroyed = this.destroyed; return to; } } const gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen)); gen(0x06, 144, 224 / 8); /** * SHA3-256 hash function * @param message - that would be hashed */ gen(0x06, 136, 256 / 8); gen(0x06, 104, 384 / 8); gen(0x06, 72, 512 / 8); gen(0x01, 144, 224 / 8); /** * keccak-256 hash function. Different from SHA3-256. * @param message - that would be hashed */ const keccak_256 = gen(0x01, 136, 256 / 8); gen(0x01, 104, 384 / 8); gen(0x01, 72, 512 / 8); const genShake = (suffix, blockLen, outputLen) => wrapConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true)); genShake(0x1f, 168, 128 / 8); genShake(0x1f, 136, 256 / 8); /** * Cryptographic hashing functions * * @_subsection: api/crypto:Hash Functions [about-crypto-hashing] */ let locked = false; const _keccak256 = function (data) { return keccak_256(data); }; let __keccak256 = _keccak256; /** * Compute the cryptographic KECCAK256 hash of %%data%%. * * The %%data%% **must** be a data representation, to compute the * hash of UTF-8 data use the [[id]] function. * * @returns DataHexstring * @example: * keccak256("0x") * //_result: * * keccak256("0x1337") * //_result: * * keccak256(new Uint8Array([ 0x13, 0x37 ])) * //_result: * * // Strings are assumed to be DataHexString, otherwise it will * // throw. To hash UTF-8 data, see the note above. * keccak256("Hello World") * //_error: */ function keccak256(_data) { const data = getBytes(_data, "data"); return hexlify(__keccak256(data)); } keccak256._ = _keccak256; keccak256.lock = function () { locked = true; }; keccak256.register = function (func) { if (locked) { throw new TypeError("keccak256 is locked"); } __keccak256 = func; }; Object.freeze(keccak256); /** * A simple hashing function which operates on UTF-8 strings to * compute an 32-byte identifier. * * This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes * the [[keccak256]]. * * @example: * id("hello world") * //_result: */ function id(value) { return keccak256(toUtf8Bytes(value)); } const subsChrs = " !#$%&'()*+,-./<=>?@[]^_`{|}~"; const Word = /^[a-z]*$/i; function unfold(words, sep) { let initial = 97; return words.reduce((accum, word) => { if (word === sep) { initial++; } else if (word.match(Word)) { accum.push(String.fromCharCode(initial) + word); } else { initial = 97; accum.push(word); } return accum; }, []); } /** * @_ignore */ function decode(data, subs) { // Replace all the substitutions with their expanded form for (let i = subsChrs.length - 1; i >= 0; i--) { data = data.split(subsChrs[i]).join(subs.substring(2 * i, 2 * i + 2)); } // Get all tle clumps; each suffix, first-increment and second-increment const clumps = []; const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => { if (semi) { for (let i = parseInt(semi); i >= 0; i--) { clumps.push(";"); } } else { clumps.push(item.toLowerCase()); } return ""; }); /* c8 ignore start */ if (leftover) { throw new Error(`leftovers: ${JSON.stringify(leftover)}`); } /* c8 ignore stop */ return unfold(unfold(clumps, ";"), ":"); } /** * @_ignore */ function decodeOwl(data) { assertArgument(data[0] === "0", "unsupported auwl data", "data", data); return decode(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length)); } /** * A Wordlist represents a collection of language-specific * words used to encode and devoce [[link-bip-39]] encoded data * by mapping words to 11-bit values and vice versa. */ class Wordlist { locale; /** * Creates a new Wordlist instance. * * Sub-classes MUST call this if they provide their own constructor, * passing in the locale string of the language. * * Generally there is no need to create instances of a Wordlist, * since each language-specific Wordlist creates an instance and * there is no state kept internally, so they are safe to share. */ constructor(locale) { defineProperties(this, { locale }); } /** * Sub-classes may override this to provide a language-specific * method for spliting %%phrase%% into individual words. * * By default, %%phrase%% is split using any sequences of * white-space as defined by regular expressions (i.e. ``/\s+/``). */ split(phrase) { return phrase.toLowerCase().split(/\s+/g); } /** * Sub-classes may override this to provider a language-specific * method for joining %%words%% into a phrase. * * By default, %%words%% are joined by a single space. */ join(words) { return words.join(" "); } } // Use the encode-latin.js script to create the necessary // data files to be consumed by this class /** * An OWL format Wordlist is an encoding method that exploits * the general locality of alphabetically sorted words to * achieve a simple but effective means of compression. * * This class is generally not useful to most developers as * it is used mainly internally to keep Wordlists for languages * based on ASCII-7 small. * * If necessary, there are tools within the ``generation/`` folder * to create the necessary data. */ class WordlistOwl extends Wordlist { #data; #checksum; /** * Creates a new Wordlist for %%locale%% using the OWL %%data%% * and validated against the %%checksum%%. */ constructor(locale, data, checksum) { super(locale); this.#data = data; this.#checksum = checksum; this.#words = null; } /** * The OWL-encoded data. */ get _data() { return this.#data; } /** * Decode all the words for the wordlist. */ _decodeWords() { return decodeOwl(this.#data); } #words; #loadWords() { if (this.#words == null) { const words = this._decodeWords(); // Verify the computed list matches the official list const checksum = id(words.join("\n") + "\n"); /* c8 ignore start */ if (checksum !== this.#checksum) { throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`); } /* c8 ignore stop */ this.#words = words; } return this.#words; } getWord(index) { const words = this.#loadWords(); assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, "index", index); return words[index]; } getWordIndex(word) { return this.#loadWords().indexOf(word); } } const words$4 = "0itatkastcenaovo$taouleraeki&chor*teci%enbalodaeladet'!Chn=0Di#%E%^1Resa2Rese3CeT'#0EjKohol0Pu)%0A&sDul#Ekdo)Ke)Ti#Ul|3}aOgan%0FaltI$@tPi,%TmaTronom0LasL{i#Ol0Tobus4Yl:B#}R'?TaUb_U/!U^U+Ur!Xer2A^v#Ambo,An#AtrEp)Ike)KoLohOnzOskevUn{#Usin#Z^Zy2Bl.Bn|})D _D#D'aF{Jar(Kv?LdokLvaN^NkrRzaTikVolZola3D+tL.T'#0Ukot:PartRev&3DrDu+J/JnLaLerLkemLn?N.Nn(N'#NtrumNzZ(2O&2KolivUv!4It_N(0Dn(Ke)KrPot0Ak~AlIkRkot2Kli$a:L-oRe[T_Tum1E,1B!a}'#Cib_Fic Fla%KlKr{Mokr!PreseRbyS#T-tiv3Kob,zKt|O^P]mSkSp+jV`]Vo/2AhaOuhoUhopis1Es0BroByt-C@t}ut DnesH+dHo^H,JemJn?Kl`KolaKtAzeDolObn(OgerieOzdSn(T Z(2B@}'noD-HaH'#S SnoT(0Oj?Or>2Nam :9O]gOnomie0EktronIpsa0AilIseO%P!ie2Izo^O/aOpejOs2EjEn%K<)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0Aj#AkAs>EvoHk(IvN'#Oup!1Uc|Uk0DaDiv(Doz&kD$voJ@skyJ&JskoLantL[L LnoSk'#Zid]Z'&0Ravo1Ab>A%tAhA)Ba}o+kH!StvaTu+0Ad T*p Tup0Ip4Bav Br!}|D!D,Fot H+d!H~Hod H,d Hub Jasn J{Jm=K]p Kon!L-!Maz!Mez Miz{Mys+tNe/!Nik!Nut P`!Pl! P,v Pu$ Raz R'n!Rv!Sl' SokoS)v Su~Syp!Tas Tes!Tr! Vi~Vol!Vrh_Zdob Zn!0AduBud }op DJ{Ji$ K+p!K*p Lep Mez Mot!Mys+tNe/!Nik!Pl! Poj Ps!Raz S)v Su~Taj Temn Tk~Ujm=Val Ve+tVin Vol!Vrt!Zvon 0Av RusuUd|Yt-1A+#ArmaAtn(IvoOb RojVihYm`]0L@.ManM.Pt!Z`uZdola2At Lt~Lubo#Ot' Ru[0MaMn?0Emn 0Lam!Oum!R!#Umav#0AtoEh#O[OmO$Ozvyk0Ap|ArAt-IjeIz{Ocn Odr!Rzl.Ut|0AkAl(Am@!Ovu0B,z Tav Ub-Ufa+0Lod Omal RavaR( Rud#Rvu1A^An C`]N (NoOv&Y/l Zav(1I/aR! 0B'.Br0Ed~EnkuEs_aOnR!Uk'odYk"; const checksum$4 = "0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a"; let wordlist$6 = null; /** * The [[link-bip39-cz]] for [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangCz extends WordlistOwl { /** * Creates a new instance of the Czech language Wordlist. * * Using the constructor should be unnecessary, instead use the * [[wordlist]] singleton method. * * @_ignore: */ constructor() { super("cz", words$4, checksum$4); } /** * Returns a singleton instance of a ``LangCz``, creating it * if this is the first time being called. */ static wordlist() { if (wordlist$6 == null) { wordlist$6 = new LangCz(); } return wordlist$6; } } const Base64 = ")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"; /** * @_ignore */ function decodeBits(width, data) { const maxValue = (1 << width) - 1; const result = []; let accum = 0, bits = 0, flood = 0; for (let i = 0; i < data.length; i++) { // Accumulate 6 bits of data accum = ((accum << 6) | Base64.indexOf(data[i])); bits += 6; // While we have enough for a word... while (bits >= width) { // ...read the word const value = (accum >> (bits - width)); accum &= (1 << (bits - width)) - 1; bits -= width; // A value of 0 indicates we exceeded maxValue, it // floods over into the next value if (value === 0) { flood += maxValue; } else { result.push(value + flood); flood = 0; } } } return result; } /** * @_ignore */ function decodeOwlA(data, accents) { let words = decodeOwl(data).join(","); // Inject the accents accents.split(/,/g).forEach((accent) => { const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/); assertArgument(match !== null, "internal error parsing accents", "accents", accents); let posOffset = 0; const positions = decodeBits(parseInt(match[3]), match[4]); const charCode = parseInt(match[2]); const regex = new RegExp(`([${match[1]}])`, "g"); words = words.replace(regex, (all, letter) => { const rem = --positions[posOffset]; if (rem === 0) { letter = String.fromCharCode(letter.charCodeAt(0), charCode); posOffset++; } return letter; }); }); return words.split(","); } /** * An OWL-A format Wordlist extends the OWL format to add an * overlay onto an OWL format Wordlist to support diacritic * marks. * * This class is generally not useful to most developers as * it is used mainly internally to keep Wordlists for languages * based on latin-1 small. * * If necessary, there are tools within the ``generation/`` folder * to create the necessary data. */ class WordlistOwlA extends WordlistOwl { #accent; /** * Creates a new Wordlist for %%locale%% using the OWLA %%data%% * and %%accent%% data and validated against the %%checksum%%. */ constructor(locale, data, accent, checksum) { super(locale, data, checksum); this.#accent = accent; } /** * The OWLA-encoded accent data. */ get _accent() { return this.#accent; } /** * Decode all the words for the wordlist. */ _decodeWords() { return decodeOwlA(this._data, this._accent); } } const words$3 = "0arertoiotadonoaRteirroenaNonaLsolocoiliaralaorrenadaChoN$n0A>Dom,EjaI!#Oga&O'Or#RazoR*Ue=U<0Ab Adem@CeLe%OmoRa!RozUn0DazD$GeLaM,#S,)T^0AlAnceA+EEl]`E`EstruzI.I<2ErU{U'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^Ptu[TaTi`:Ba&B!B$BleC GazG[&L/&L!oL*Lm.L.Ls/#LudLv Mb-c~Ndi-e Ng_Ni{dN}#PoQueRdin()nSt_TanU`Xof.3Cc~CoC_#C%DGu*IsL=LvaMa`M?l-d-Re'Rg*S#T?:Ba>BiqueB]BuCoC#JoL L>L,#Ll/.Ma'Mb^Ng}quePaPe)P@P.Qu?l(deRe(if(je%RotR+R%TuajeU+ZaZ.3At+|oC]CnicaJa&J!Ji&L/efo'MaM^Mp=NazNd!N!NisNRmi'Rnur(+rSisSo+StigoT!aX#Z3B$Bu+nEmpoEn{Er[EPoR(.TanT!eTu=Za5Al]B?=C Ci'DoG/&M N}#P PeQueRaxR!oRm,%RneoRoRpe&R_RS!Xi>2AbajoAc#rA!Afi>AgoAjeAmoAnceA#AumaAz EbolEguaEin%EnEp EsIbuIgoIpaIs)IunfoOfeoOmpaOn>OpaO)OzoU>Ue'Ufa2B!@BoEr#MbaM^NelNic(bin(ismoR'T^:0Ic 9C!a0B[l0I{dIrIv! b) { return 1; } return 0; } // Load all the words for (let length = 3; length <= 9; length++) { const d = data$2[length - 3]; for (let offset = 0; offset < d.length; offset += length) { const word = []; for (let i = 0; i < length; i++) { const k = mapping.indexOf(d[offset + i]); word.push(227); word.push((k & 0x40) ? 130 : 129); word.push((k & 0x3f) + 128); } wordlist.push(toString(word)); } } wordlist.sort(sortJapanese); // For some reason kyoku and kiyoku are flipped in node (!!). // The order SHOULD be: // - kyoku // - kiyoku // This should ignore "if", but that doesn't work here?? /* c8 ignore start */ if (hex(wordlist[442]) === KiYoKu && hex(wordlist[443]) === KyoKu) { const tmp = wordlist[442]; wordlist[442] = wordlist[443]; wordlist[443] = tmp; } /* c8 ignore stop */ // Verify the computed list matches the official list /* istanbul ignore if */ const checksum = id(wordlist.join("\n") + "\n"); /* c8 ignore start */ if (checksum !== "0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600") { throw new Error("BIP39 Wordlist for ja (Japanese) FAILED"); } /* c8 ignore stop */ _wordlist$2 = wordlist; return wordlist; } let wordlist$3 = null; /** * The [[link-bip39-ja]] for [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangJa extends Wordlist { /** * Creates a new instance of the Japanese language Wordlist. * * This should be unnecessary most of the time as the exported * [[langJa]] should suffice. * * @_ignore: */ constructor() { super("ja"); } getWord(index) { const words = loadWords$2(); assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, "index", index); return words[index]; } getWordIndex(word) { return loadWords$2().indexOf(word); } split(phrase) { //logger.assertNormalize(); return phrase.split(/(?:\u3000| )+/g); } join(words) { return words.join("\u3000"); } /** * Returns a singleton instance of a ``LangJa``, creating it * if this is the first time being called. */ static wordlist() { if (wordlist$3 == null) { wordlist$3 = new LangJa(); } return wordlist$3; } } const data$1 = [ "OYAa", "ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQ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^&*"; function getHangul(code) { if (code >= 40) { code = code + 168 - 40; } else if (code >= 19) { code = code + 97 - 19; } return toUtf8String(new Uint8Array([225, (code >> 6) + 132, (code & 0x3f) + 128])); } let _wordlist$1 = null; function loadWords$1() { if (_wordlist$1 != null) { return _wordlist$1; } const wordlist = []; data$1.forEach((data, length) => { length += 4; for (let i = 0; i < data.length; i += length) { let word = ""; for (let j = 0; j < length; j++) { word += getHangul(codes$1.indexOf(data[i + j])); } wordlist.push(word); } }); wordlist.sort(); // Verify the computed list matches the official list /* istanbul ignore if */ const checksum = id(wordlist.join("\n") + "\n"); /* c8 ignore start */ if (checksum !== "0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a") { throw new Error("BIP39 Wordlist for ko (Korean) FAILED"); } /* c8 ignore stop */ _wordlist$1 = wordlist; return wordlist; } let wordlist$2 = null; /** * The [[link-bip39-ko]] for [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangKo extends Wordlist { /** * Creates a new instance of the Korean language Wordlist. * * This should be unnecessary most of the time as the exported * [[langKo]] should suffice. * * @_ignore: */ constructor() { super("ko"); } getWord(index) { const words = loadWords$1(); assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, "index", index); return words[index]; } getWordIndex(word) { return loadWords$1().indexOf(word); } /** * Returns a singleton instance of a ``LangKo``, creating it * if this is the first time being called. */ static wordlist() { if (wordlist$2 == null) { wordlist$2 = new LangKo(); } return wordlist$2; } } const words$1 = "0torea noica!iosorolotaleratelanena%oiadoencotivomai t ca%a0A]Bagl'Bin#E.Is(Oli!Rasi_Rog#0Cade!C[$Cus#E Roba+U 0Ag'Deb{DomeEgu#Eri!IpeOtt&Ul&1Fabi,Fe|Fis(F-n Oris`O(R~$0AveEn.E_,Ganc'I!It&OnismoR>*Rume Uzzo4AbardaA Bat)Ber#BoBumeCeCol>E|Ertu-OdePari!Pe^ Pogg'P)@Pun Ri,1Ab~AchideAgos+Ald~Anc'Atu-AzzoB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,I]*Lc)Li=Llu LoceN#Ndemm?N RaceRba,Rgog=Rif~RoRru}Rt~,Sc~Ssil*S+,Te-$Tri=Tus 3Andan.B-n.C[daChingoCi=nzaDim&Gil?G< Go!LeL/$MiniNc{!O/Pe-Rgo/Ro*goRu,n S](S'5Cche)Fo*LuPpa"; const checksum$1 = "0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"; let wordlist$1 = null; /** * The [[link-bip39-it]] for [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangIt extends WordlistOwl { /** * Creates a new instance of the Italian language Wordlist. * * This should be unnecessary most of the time as the exported * [[langIt]] should suffice. * * @_ignore: */ constructor() { super("it", words$1, checksum$1); } /** * Returns a singleton instance of a ``LangIt``, creating it * if this is the first time being called. */ static wordlist() { if (wordlist$1 == null) { wordlist$1 = new LangIt(); } return wordlist$1; } } const words = "0arad!ototealirertainrasoent hoandoaR#riareha!aroele'oronul0Aca%AixoAl A%rDuz'El]Er$IsmoO$ Rum S-&T(i&TigoVo[=0F&.Il#P' S?S* So&/Sun$Tr&0Ac#Adu+Al/A[f E End(Er_EuIng'Ir?IvoOl{oRac Revi=RizU&Um0Di$rM-.R>o+TismoT|@Tu 0Ali An%Ar@Ent&Es,I?Is Ul,1Ila1Ar E=Ei%Ulejo:B BosaC&]uCh `C@GagemI+c>~/Se#S)n%Ta)Te=rTidaTomTuc Unil]3B(IjoIr^IsebolLd!eLezaLgaLisc Ndi$Ng&aNz(RimbauRl*d>_Sou_XigaZ(_3CoCu=En&Foc&Furc G|naLhe%Mest[Mo$rOlog@OmboOsf(aPol Rr-$Scoi$Sne$SpoSsex$TolaZ _2Ind#OcoOque 2A$BagemC#CejoChec]Ico.L^LetimL]LoMb{oNdeNecoNi)Rb~h>d>e&R+c]V*oXe?2AncoAsaAvezaEuIgaIl/Inc OaOchu+Onze O$Uxo2C]DismoF LeRacoScaS$Z*a:Bimb Rn{oRpe%R['>)zRv&/SacoScaSeb[S%loS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i.DemD*&Fci&Rd&RedeRtidaSmoSs#S%lTam T-%T* T_noUl^Us 3C~i D& Dest[D@t+D+G^I$r&IxeLeLicplexoRsi<>%nceRucaSc#SquisaS,aTisc 3AdaC#Ed!eGm-$Last+Lh#Lo.M-)Nc`NguimN]No%N.On{oPocaQue%ResRue)Sc S$laTg-$Rje)Tur Ud!eXof}eZ}&3C C~ DaD-$Di#Do,Du$rGm-$G[=Gun=IvaLe$LvagemM<&M-%N?N/rNsu&Nt#P #Rei>*g>+RvoTemb_T|3GiloLhue)Lic}eMetr@Mpat@M~ N&Nc(oNg~ NopseN$ni>-eRiTu#5B(fis)Rp[s>[&Rt'Sp'oS%n$:B`aBle%Bu^C/G `aLh(LoLvezMdioRef>j>+xaTuagemUr*oXativoXis)3Atr&C(Ci=Cl#Dio,IaIm Lef}eLh#Mp(oN-%N,rN.Rm&RnoRr-oSeSou+St#ToXtu+Xugo3A+G`aJoloMbr MidezNgi=N%'oRagemT~ 5Al]C]L( LiceM^Mil/N`Ntu+Pe%R>ci=RneioRqueRr!>$S.UcaUp{aX*a2Ab&/Acej Adu$rAfeg Aje$AmaAnc ApoAs{oAt?Av E*oEm(Epid EvoIagemIboIcicloId-%Ilog@Ind!eIploItur Iunf&Oc Ombe)OvaUnfoUque2B~ CquesaT` T|i&:7V 3Bigo0HaId!eIf|me3Olog@SoTigaUbu0A=InaUfru':C*aDi G o,I=,LaL-%Lid!eLo[sN)gemQu{oRe)Rr(Sc~ Sil]S,u+Z Zio3A=D Ge.Ic~ L{oLhiceLu=Nce=rNdav&N( Nt[Rb&Rd!eRe?Rg}h>m`/RnizRs R%n%SpaSti=T|i&3Adu$AgemAj Atu+Br?D{aDr @ElaGaG-%Gi G| L ejoNcoNhe)NilOle)R!>tudeSi.S$Tr&V{oZ*/5A=rArG&L<%LeibolL)gemLumo,Nt!e5L$Vuz`a::D[zRope3QueRe.Rife3Ng ::Ng#Rp 3BuL?9Mb Olog@5Mbi="; const checksum = "0x2219000926df7b50d8aa0a3d495826b988287df4657fbd100e6fe596c8f737ac"; let wordlist = null; /** * The [[link-bip39-pt]] for [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangPt extends WordlistOwl { /** * Creates a new instance of the Portuguese language Wordlist. * * This should be unnecessary most of the time as the exported * [[langPt]] should suffice. * * @_ignore: */ constructor() { super("pt", words, checksum); } /** * Returns a singleton instance of a ``LangPt``, creating it * if this is the first time being called. */ static wordlist() { if (wordlist == null) { wordlist = new LangPt(); } return wordlist; } } const data = "}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN> 2), 128 + codes.indexOf(data[i * 3 + 1]), 128 + codes.indexOf(data[i * 3 + 2]), ]; if (locale === "zh_tw") { const common = s % 4; for (let i = common; i < 3; i++) { bytes[i] = codes.indexOf(deltaData[deltaOffset++]) + ((i == 0) ? 228 : 128); } } wordlist.push(toUtf8String(new Uint8Array(bytes))); } // Verify the computed list matches the official list const checksum = id(wordlist.join("\n") + "\n"); /* c8 ignore start */ if (checksum !== Checks[locale]) { throw new Error(`BIP39 Wordlist for ${locale} (Chinese) FAILED`); } /* c8 ignore stop */ _wordlist[locale] = wordlist; return wordlist; } const wordlists = {}; /** * The [[link-bip39-zh_cn]] and [[link-bip39-zh_tw]] for * [mnemonic phrases](link-bip-39). * * @_docloc: api/wordlists */ class LangZh extends Wordlist { /** * Creates a new instance of the Chinese language Wordlist for * the %%dialect%%, either ``"cn"`` or ``"tw"`` for simplified * or traditional, respectively. * * This should be unnecessary most of the time as the exported * [[langZhCn]] and [[langZhTw]] should suffice. * * @_ignore: */ constructor(dialect) { super("zh_" + dialect); } getWord(index) { const words = loadWords(this.locale); assertArgument(index >= 0 && index < words.length, `invalid word index: ${index}`, "index", index); return words[index]; } getWordIndex(word) { return loadWords(this.locale).indexOf(word); } split(phrase) { phrase = phrase.replace(/(?:\u3000| )+/g, ""); return phrase.split(""); } /** * Returns a singleton instance of a ``LangZh`` for %%dialect%%, * creating it if this is the first time being called. * * Use the %%dialect%% ``"cn"`` or ``"tw"`` for simplified or * traditional, respectively. */ static wordlist(dialect) { if (wordlists[dialect] == null) { wordlists[dialect] = new LangZh(dialect); } return wordlists[dialect]; } } export { LangCz, LangEs, LangFr, LangIt, LangJa, LangKo, LangPt, LangZh }; //# sourceMappingURL=wordlists-extra.js.map