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AomD,KAAA,CAAAnqD,EAAAoI,EAAA,EAAA8iD,OAAA,IAAAlrD,EAAA+D,KAAA,EACA,KAAAomD,KAAA,CAAAnqD,EAAAoI,EAAA,EAAA8iD,OAAA,IAAAlrD,EAAAlB,MAAA,EACA,YAAAqrD,KAAA,CAAAnqD,EAAAoI,EAAA,IAEA,KAAAmuC,MAAA,CAAA7Y,gBAAA,iBAAArhC,IAAA,SAAA0H,IACA,KAAAwyC,MAAA,CAAA7Y,gBAAA,WAA6Cx7B,KAAAA,CAAA,CAAAs1C,OAAAA,CAAA,CAAc,IAC3D,KAAA6S,KAAA,EACA3hB,WAAA,SAAArsC,IAAA,SAAA6F,EAAAs1C,GAAA,GACA,KAAA6S,KAAA,IACA,KAAA9T,MAAA,QACA,MAAAr0C,IACA,KAAAyoD,kBAAA,GACA,KAAAL,SAAA,QAAAG,cAAA,MAAAE,kBAAA,WAAAF,cAAA,GACA,MAAAF,kBAAA,CAAA7hB,WACA,SAAAqiB,QAAA,CAAAhZ,EAAApqC,GACA,KAAA6iD,kBAAA,CACA,EACA,EACA,CACA","sources":["webpack://_N_E/../../node_modules/@solana/buffer-layout/lib/Layout.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/node_modules/eventemitter3/index.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-coin98/node_modules/bs58/index.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/borsh/lib/index.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/bs58/index.js","webpack://_N_E/../../node_modules/base-x/src/index.js","webpack://_N_E/../../node_modules/bigint-buffer/dist/browser.js","webpack://_N_E/../../node_modules/jayson/lib/client/browser/index.js","webpack://_N_E/../../node_modules/jayson/lib/generateRequest.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/rng.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/regex.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/validate.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/stringify.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/v4.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/index.js","webpack://_N_E/../../node_modules/@farcaster/auth-kit/dist/style.css","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/styles.css","webpack://_N_E/../../node_modules/text-encoding-utf-8/lib/encoding.lib.js","webpack://_N_E/../../node_modules/@noble/curves/esm/abstract/curve.js","webpack://_N_E/../../node_modules/@noble/curves/esm/abstract/modular.js","webpack://_N_E/../../node_modules/@noble/curves/esm/abstract/utils.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/sha512.js","webpack://_N_E/../../node_modules/@noble/curves/esm/abstract/edwards.js","webpack://_N_E/../../node_modules/@noble/curves/esm/ed25519.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/hmac.js","webpack://_N_E/../../node_modules/@noble/curves/esm/abstract/weierstrass.js","webpack://_N_E/../../node_modules/@noble/curves/esm/_shortw_utils.js","webpack://_N_E/../../node_modules/@noble/curves/esm/secp256k1.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/_assert.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/_md.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/_u64.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/sha256.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/sha3.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/crypto.js","webpack://_N_E/../../node_modules/@noble/hashes/esm/utils.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/errors.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/signer.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/types.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-coin98/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-coinbase/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-mathwallet/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-phantom/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/Collapse.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/Button.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletIcon.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletListItem.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletSVG.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModal.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModalProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/ConnectionProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/signIn.js","webpack://_N_E/../../node_modules/@solana-mobile/mobile-wallet-adapter-protocol/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana-mobile/wallet-adapter-mobile/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/standard.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/types.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signIn.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/endpoint.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/commitment.js","webpack://_N_E/../../node_modules/@wallet-standard/wallet/lib/esm/util.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@wallet-standard/app/lib/esm/wallets.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/getEnvironment.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/getInferredClusterFromEndpoint.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/useLocalStorage.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/errors.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/WalletProviderBase.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/WalletProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/useConnection.js","webpack://_N_E/../../node_modules/@wallet-standard/wallet/lib/esm/register.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/icon.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/wallet.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/detect.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-torus/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-trust/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-chains/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signAndSendTransaction.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signMessage.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signTransaction.js","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/connect.js","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/disconnect.js","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/events.js","webpack://_N_E/../../node_modules/rpc-websockets/dist/index.browser.mjs"],"sourcesContent":["/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (psz < source.length) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, bytesToNumberBE, bytesToNumberLE, ensureBytes, numberToBytesBE, numberToBytesLE, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = mod(num, fieldOrder - _1n) + _1n;\n return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","import { HashMD } from './_md.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nexport class SHA512 extends HashMD {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = /* @__PURE__ */ wrapConstructor(() => new SHA512());\nexport const sha512_224 = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());\nexport const sha384 = /* @__PURE__ */ wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { validateBasic, wNAF } from './curve.js';\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n << (BigInt(nByteLength * 8) - _1n);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit\n if (!zip215 && x === _0n && isLastByteOdd)\n // if x=0 and x_0 = 1, fail\n throw new Error('Point.fromHex: x=0 and x_0=1');\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { createHasher, expand_message_xmd } from './abstract/hash-to-curve.js';\nimport { Field, FpSqrtEven, isNegativeLE, mod, pow2 } from './abstract/modular.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { bytesToHex, bytesToNumberLE, ensureBytes, equalBytes, numberToBytesLE, } from './abstract/utils.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = /* @__PURE__ */ BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _5n = BigInt(5), _8n = BigInt(8);\nfunction ed25519_pow_2_252_3(x) {\n // prettier-ignore\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = /* @__PURE__ */ (() => Field(ED25519_P, undefined, true))();\nconst ed25519Defaults = /* @__PURE__ */ (() => ({\n // Param: a\n a: BigInt(-1), // Fp.create(-1) is proper; our way still works and is faster\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n**255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n**252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: _8n,\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n}))();\nexport const ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = /* @__PURE__ */ (() => twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n}))();\nexport const ed25519ph = /* @__PURE__ */ (() => twistedEdwards(Object.assign({}, ed25519Defaults, {\n domain: ed25519_domain,\n prehash: sha512,\n})))();\nexport const x25519 = /* @__PURE__ */ (() => montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255, // n is 253 bits\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, _3n, P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n}))();\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const someonesPub = ed25519.getPublicKey(ed25519.utils.randomPrivateKey());\n * const aPriv = x25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(aPriv, edwardsToMontgomeryPub(someonesPub))\n */\nexport function edwardsToMontgomeryPub(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((_1n + y) * Fp.inv(_1n - y)));\n}\nexport const edwardsToMontgomery = edwardsToMontgomeryPub; // deprecated\n/**\n * Converts ed25519 secret key to x25519 secret key.\n * @example\n * const someonesPub = x25519.getPublicKey(x25519.utils.randomPrivateKey());\n * const aPriv = ed25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(edwardsToMontgomeryPriv(aPriv), someonesPub)\n */\nexport function edwardsToMontgomeryPriv(edwardsPriv) {\n const hashed = ed25519Defaults.hash(edwardsPriv.subarray(0, 32));\n return ed25519Defaults.adjustScalarBytes(hashed).subarray(0, 32);\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = /* @__PURE__ */ (() => (Fp.ORDER + _3n) / _8n)(); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = /* @__PURE__ */ (() => Fp.pow(_2n, ELL2_C1))(); // 2. c2 = 2^c1\nconst ELL2_C3 = /* @__PURE__ */ (() => Fp.sqrt(Fp.neg(Fp.ONE)))(); // 3. c3 = sqrt(-1)\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n const ELL2_C4 = (Fp.ORDER - _5n) / _8n; // 4. c4 = (q - 5) / 8 # Integer arithmetic\n const ELL2_J = BigInt(486662);\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = /* @__PURE__ */ (() => FpSqrtEven(Fp, Fp.neg(BigInt(486664))))(); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) =\n // map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst htf = /* @__PURE__ */ (() => createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\nfunction assertRstPoint(other) {\n if (!(other instanceof RistPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = ED25519_SQRT_M1;\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = /* @__PURE__ */ BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-byte hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-byte output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistPoint(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return new RistPoint(this.ep.double());\n }\n negate() {\n return new RistPoint(this.ep.negate());\n }\n}\nexport const RistrettoPoint = /* @__PURE__ */ (() => {\n if (!RistPoint.BASE)\n RistPoint.BASE = new RistPoint(ed25519.ExtendedPoint.BASE);\n if (!RistPoint.ZERO)\n RistPoint.ZERO = new RistPoint(ed25519.ExtendedPoint.ZERO);\n return RistPoint;\n})();\n// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B\nexport const hashToRistretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = expand_message_xmd(msg, DST, 64, sha512);\n const P = RistPoint.hashToCurve(uniform_bytes);\n return P;\n};\nexport const hash_to_ristretto255 = hashToRistretto255; // legacy\n//# sourceMappingURL=ed25519.js.map","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assertHash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assertExists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assertExists(this);\n assertBytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport { validateBasic, wNAF } from './curve.js';\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n ut.abytes(data);\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (ut.isBytes(key))\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y;\n try {\n y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n }\n catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n throw new Error('Point is not on curve' + suffix);\n }\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = ut.isBytes(item);\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null && ent !== false) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || ut.isBytes(sg)) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { createCurve } from './_shortw_utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0), // equation params: a, b\n b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975\n Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n\n n: secp256k1N, // Curve order, total count of valid points in the field\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1), // Cofactor\n lowS: true, // Allow only low-S signatures by default in sign() and verify()\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Choice: a ? b : c\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nexport const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_md.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { HashMD, Chi, Maj } from './_md.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, isLE, byteSwap32, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n if (!isLE)\n byteSwap32(this.state32);\n keccakP(this.state32, this.rounds);\n if (!isLE)\n byteSwap32(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nexport const byteSwapIfBE = isLE ? (n) => n : (n) => byteSwap(n);\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import EventEmitter from 'eventemitter3';\nimport { WalletNotConnectedError } from './errors.js';\nexport { EventEmitter };\n/**\n * A wallet's readiness describes a series of states that the wallet can be in,\n * depending on what kind of wallet it is. An installable wallet (eg. a browser\n * extension like Phantom) might be `Installed` if we've found the Phantom API\n * in the global scope, or `NotDetected` otherwise. A loadable, zero-install\n * runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this\n * metadata to personalize the wallet list for each user (eg. to show their\n * installed wallets first).\n */\nexport var WalletReadyState;\n(function (WalletReadyState) {\n /**\n * User-installable wallets can typically be detected by scanning for an API\n * that they've injected into the global context. If such an API is present,\n * we consider the wallet to have been installed.\n */\n WalletReadyState[\"Installed\"] = \"Installed\";\n WalletReadyState[\"NotDetected\"] = \"NotDetected\";\n /**\n * Loadable wallets are always available to you. Since you can load them at\n * any time, it's meaningless to say that they have been detected.\n */\n WalletReadyState[\"Loadable\"] = \"Loadable\";\n /**\n * If a wallet is not supported on a given platform (eg. server-rendering, or\n * mobile) then it will stay in the `Unsupported` state.\n */\n WalletReadyState[\"Unsupported\"] = \"Unsupported\";\n})(WalletReadyState || (WalletReadyState = {}));\nexport class BaseWalletAdapter extends EventEmitter {\n get connected() {\n return !!this.publicKey;\n }\n async autoConnect() {\n await this.connect();\n }\n async prepareTransaction(transaction, connection, options = {}) {\n const publicKey = this.publicKey;\n if (!publicKey)\n throw new WalletNotConnectedError();\n transaction.feePayer = transaction.feePayer || publicKey;\n transaction.recentBlockhash =\n transaction.recentBlockhash ||\n (await connection.getLatestBlockhash({\n commitment: options.preflightCommitment,\n minContextSlot: options.minContextSlot,\n })).blockhash;\n return transaction;\n }\n}\nexport function scopePollingDetectionStrategy(detect) {\n // Early return when server-side rendering\n if (typeof window === 'undefined' || typeof document === 'undefined')\n return;\n const disposers = [];\n function detectAndDispose() {\n const detected = detect();\n if (detected) {\n for (const dispose of disposers) {\n dispose();\n }\n }\n }\n // Strategy #1: Try detecting every second.\n const interval = \n // TODO: #334 Replace with idle callback strategy.\n setInterval(detectAndDispose, 1000);\n disposers.push(() => clearInterval(interval));\n // Strategy #2: Detect as soon as the DOM becomes 'ready'/'interactive'.\n if (\n // Implies that `DOMContentLoaded` has not yet fired.\n document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', detectAndDispose, { once: true });\n disposers.push(() => document.removeEventListener('DOMContentLoaded', detectAndDispose));\n }\n // Strategy #3: Detect after the `window` has fully loaded.\n if (\n // If the `complete` state has been reached, we're too late.\n document.readyState !== 'complete') {\n window.addEventListener('load', detectAndDispose, { once: true });\n disposers.push(() => window.removeEventListener('load', detectAndDispose));\n }\n // Strategy #4: Detect synchronously, now.\n detectAndDispose();\n}\n/**\n * Users on iOS can be redirected into a wallet's in-app browser automatically,\n * if that wallet has a universal link configured to do so\n * But should not be redirected from within a webview, eg. if they're already\n * inside a wallet's browser\n * This function can be used to identify users who are on iOS and can be redirected\n *\n * @returns true if the user can be redirected\n */\nexport function isIosAndRedirectable() {\n // SSR: return false\n if (!navigator)\n return false;\n const userAgent = navigator.userAgent.toLowerCase();\n // if on iOS the user agent will contain either iPhone or iPad\n // caveat: if requesting desktop site then this won't work\n const isIos = userAgent.includes('iphone') || userAgent.includes('ipad');\n // if in a webview then it will not include Safari\n // note that other iOS browsers also include Safari\n // so we will redirect only if Safari is also included\n const isSafari = userAgent.includes('safari');\n return isIos && isSafari;\n}\n//# sourceMappingURL=adapter.js.map","export class WalletError extends Error {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(message, error) {\n super(message);\n this.error = error;\n }\n}\nexport class WalletNotReadyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotReadyError';\n }\n}\nexport class WalletLoadError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletLoadError';\n }\n}\nexport class WalletConfigError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConfigError';\n }\n}\nexport class WalletConnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConnectionError';\n }\n}\nexport class WalletDisconnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectedError';\n }\n}\nexport class WalletDisconnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectionError';\n }\n}\nexport class WalletAccountError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletAccountError';\n }\n}\nexport class WalletPublicKeyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletPublicKeyError';\n }\n}\nexport class WalletKeypairError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletKeypairError';\n }\n}\nexport class WalletNotConnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotConnectedError';\n }\n}\nexport class WalletSendTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSendTransactionError';\n }\n}\nexport class WalletSignTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignTransactionError';\n }\n}\nexport class WalletSignMessageError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignMessageError';\n }\n}\nexport class WalletSignInError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignInError';\n }\n}\nexport class WalletTimeoutError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletTimeoutError';\n }\n}\nexport class WalletWindowBlockedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowBlockedError';\n }\n}\nexport class WalletWindowClosedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowClosedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import { BaseWalletAdapter, } from './adapter.js';\nimport { WalletSendTransactionError, WalletSignTransactionError } from './errors.js';\nimport { isVersionedTransaction } from './transaction.js';\nexport class BaseSignerWalletAdapter extends BaseWalletAdapter {\n async sendTransaction(transaction, connection, options = {}) {\n let emit = true;\n try {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);\n try {\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, options);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n else {\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, sendOptions);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n }\n catch (error) {\n if (emit) {\n this.emit('error', error);\n }\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n for (const transaction of transactions) {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);\n }\n }\n const signedTransactions = [];\n for (const transaction of transactions) {\n signedTransactions.push(await this.signTransaction(transaction));\n }\n return signedTransactions;\n }\n}\nexport class BaseMessageSignerWalletAdapter extends BaseSignerWalletAdapter {\n}\nexport class BaseSignInMessageSignerWalletAdapter extends BaseMessageSignerWalletAdapter {\n}\n//# sourceMappingURL=signer.js.map","export function isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\n//# sourceMappingURL=transaction.js.map","export var WalletAdapterNetwork;\n(function (WalletAdapterNetwork) {\n WalletAdapterNetwork[\"Mainnet\"] = \"mainnet-beta\";\n WalletAdapterNetwork[\"Testnet\"] = \"testnet\";\n WalletAdapterNetwork[\"Devnet\"] = \"devnet\";\n})(WalletAdapterNetwork || (WalletAdapterNetwork = {}));\n//# sourceMappingURL=types.js.map","import { BaseMessageSignerWalletAdapter, scopePollingDetectionStrategy, WalletAccountError, WalletDisconnectionError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport bs58 from 'bs58';\nexport const Coin98WalletName = 'Coin98';\nexport class Coin98WalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = Coin98WalletName;\n this.url = 'https://coin98.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0ia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IDAgMCAxLS42MjMgMi40NzMgMTMuNTc0IDEzLjU3NCAwIDAgMSA0LjIxMyAyLjMyMiA5LjkwMyA5LjkwMyAwIDAgMCAxLjIzLTQuNzk1IDEwLjAzMiAxMC4wMzIgMCAwIDAtMi45NDYtNy4wODYgMTAuMDcgMTAuMDcgMCAwIDAtNy4xLTIuOTRabS0yMy43NSA3Ljk5aC0xLjYxN3YxLjc1YTIuNDE5IDIuNDE5IDAgMCAwLTEuNTgyIDIuNjg3IDIuNDE0IDIuNDE0IDAgMCAwIDIuMzkgMi4wMDYgMi40NSAyLjQ1IDAgMCAwIDEuNTU1LS41NzQgMi40MTQgMi40MTQgMCAwIDAtLjc0Ni00LjExOXYtMS43NVoiLz4KICA8L2c+Cjwvc3ZnPgo=';\n this.supportedTransactionVersions = null;\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.coin98?.sol) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.isConnected();\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.coin98.sol;\n let account;\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n account = (await wallet.connect())[0];\n }\n catch (error) {\n throw new WalletAccountError(error?.message, error);\n }\n let publicKey;\n try {\n publicKey = new PublicKey(account);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const response = await wallet.request({ method: 'sol_sign', params: [transaction] });\n const publicKey = new PublicKey(response.publicKey);\n const signature = bs58.decode(response.signature);\n transaction.addSignature(publicKey, signature);\n return transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const response = await wallet.request({ method: 'sol_signAllTransactions', params: [transactions] });\n const publicKey = new PublicKey(response.publicKey);\n const signatures = response.signatures;\n return transactions.map((transaction, index) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signature = bs58.decode(signatures[index]);\n transaction.addSignature(publicKey, signature);\n return transaction;\n });\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const response = await wallet.request({ method: 'sol_signMessage', params: [message] });\n return bs58.decode(response.signature);\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, isVersionedTransaction, scopePollingDetectionStrategy, WalletAccountError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const CoinbaseWalletName = 'Coinbase Wallet';\nexport class CoinbaseWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = CoinbaseWalletName;\n this.url = 'https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSI1MTIiIGN5PSI1MTIiIHI9IjUxMiIgZmlsbD0iIzAwNTJGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE1MiA1MTJDMTUyIDcxMC44MjMgMzEzLjE3NyA4NzIgNTEyIDg3MkM3MTAuODIzIDg3MiA4NzIgNzEwLjgyMyA4NzIgNTEyQzg3MiAzMTMuMTc3IDcxMC44MjMgMTUyIDUxMiAxNTJDMzEzLjE3NyAxNTIgMTUyIDMxMy4xNzcgMTUyIDUxMlpNNDIwIDM5NkM0MDYuNzQ1IDM5NiAzOTYgNDA2Ljc0NSAzOTYgNDIwVjYwNEMzOTYgNjE3LjI1NSA0MDYuNzQ1IDYyOCA0MjAgNjI4SDYwNEM2MTcuMjU1IDYyOCA2MjggNjE3LjI1NSA2MjggNjA0VjQyMEM2MjggNDA2Ljc0NSA2MTcuMjU1IDM5NiA2MDQgMzk2SDQyMFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window?.coinbaseSolana) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.coinbaseSolana;\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseSignerWalletAdapter, scopePollingDetectionStrategy, WalletAccountError, WalletDisconnectedError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const MathWalletName = 'MathWallet';\nexport class MathWalletAdapter extends BaseSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = MathWalletName;\n this.url = 'https://mathwallet.org';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwI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2LTIuMjc3MDM2MyA4LjI0NTg3NzggMCAyLjI3NzAzNjMgMi4yNzcwMzYyIDIuMjc3MDM2MyA1Ljk2ODg0MTUgMCA4LjI0NTg3NzgtMi4yNzcwMzYyIDIuMjc3MDM2Mi01Ljk2ODg0MTUgMi4yNzcwMzYyLTguMjQ1ODc3OCAweiIvPjwvZz48L3N2Zz4=';\n this.supportedTransactionVersions = null;\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._messaged = (event) => {\n const data = event.data;\n if (data && data.origin === 'mathwallet_internal' && data.type === 'lockStatusChanged' && !data.payload) {\n this._disconnected();\n }\n };\n this._disconnected = () => {\n if (this._wallet) {\n window.removeEventListener('message', this._messaged);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.solana?.isMathWallet) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.solana;\n let account;\n try {\n // @TODO: handle if popup is blocked\n account = await wallet.getAccount();\n }\n catch (error) {\n throw new WalletAccountError(error?.message, error);\n }\n let publicKey;\n try {\n publicKey = new PublicKey(account);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n window.addEventListener('message', this._messaged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n if (this._wallet) {\n window.removeEventListener('message', this._messaged);\n this._wallet = null;\n this._publicKey = null;\n }\n this.emit('disconnect');\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, WalletAccountError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const PhantomWalletName = 'Phantom';\nexport class PhantomWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = PhantomWalletName;\n this.url = 'https://phantom.app';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV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YxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n if (isIosAndRedirectable()) {\n // when in iOS (not webview), set Phantom as loadable instead of checking for install\n this._readyState = WalletReadyState.Loadable;\n this.emit('readyStateChange', this._readyState);\n }\n else {\n scopePollingDetectionStrategy(() => {\n if (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state\n // We can't redirect to a universal link without user input\n if (this.readyState === WalletReadyState.Installed) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this.readyState === WalletReadyState.Loadable) {\n // redirect to the Phantom /browse universal link\n // this will open the current URL in the Phantom in-wallet browser\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://phantom.app/ul/browse/${url}?ref=${ref}`;\n return;\n }\n if (this.readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.phantom?.solana || window.solana;\n if (!wallet.isConnected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import React, { useLayoutEffect, useRef } from 'react';\nexport const Collapse = ({ id, children, expanded = false }) => {\n const ref = useRef(null);\n const instant = useRef(true);\n const transition = 'height 250ms ease-out';\n const openCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.scrollHeight + 'px';\n });\n };\n const closeCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.offsetHeight + 'px';\n node.style.overflow = 'hidden';\n requestAnimationFrame(() => {\n node.style.height = '0';\n });\n });\n };\n useLayoutEffect(() => {\n if (expanded) {\n openCollapse();\n }\n else {\n closeCollapse();\n }\n }, [expanded]);\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node)\n return;\n function handleComplete() {\n if (!node)\n return;\n node.style.overflow = expanded ? 'initial' : 'hidden';\n if (expanded) {\n node.style.height = 'auto';\n }\n }\n function handleTransitionEnd(event) {\n if (node && event.target === node && event.propertyName === 'height') {\n handleComplete();\n }\n }\n if (instant.current) {\n handleComplete();\n instant.current = false;\n }\n node.addEventListener('transitionend', handleTransitionEnd);\n return () => node.removeEventListener('transitionend', handleTransitionEnd);\n }, [expanded]);\n return (React.createElement(\"div\", { className: \"wallet-adapter-collapse\", id: id, ref: ref, role: \"region\", style: { height: 0, transition: instant.current ? undefined : transition } }, children));\n};\n//# sourceMappingURL=Collapse.js.map","import React from 'react';\nexport const Button = (props) => {\n return (React.createElement(\"button\", { className: `wallet-adapter-button ${props.className || ''}`, disabled: props.disabled, style: props.style, onClick: props.onClick, tabIndex: props.tabIndex || 0, type: \"button\" },\n props.startIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-start-icon\" }, props.startIcon),\n props.children,\n props.endIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-end-icon\" }, props.endIcon)));\n};\n//# sourceMappingURL=Button.js.map","import React from 'react';\nexport const WalletIcon = ({ wallet, ...props }) => {\n return wallet && React.createElement(\"img\", { src: wallet.adapter.icon, alt: `${wallet.adapter.name} icon`, ...props });\n};\n//# sourceMappingURL=WalletIcon.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport React from 'react';\nimport { Button } from './Button.js';\nimport { WalletIcon } from './WalletIcon.js';\nexport const WalletListItem = ({ handleClick, tabIndex, wallet }) => {\n return (React.createElement(\"li\", null,\n React.createElement(Button, { onClick: handleClick, startIcon: React.createElement(WalletIcon, { wallet: wallet }), tabIndex: tabIndex },\n wallet.adapter.name,\n wallet.readyState === WalletReadyState.Installed && React.createElement(\"span\", null, \"Detected\"))));\n};\n//# sourceMappingURL=WalletListItem.js.map","import React from 'react';\nexport const WalletSVG = () => {\n return (React.createElement(\"svg\", { width: \"97\", height: \"96\", viewBox: \"0 0 97 96\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"48\", fill: \"url(#paint0_linear_880_5115)\", fillOpacity: \"0.1\" }),\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"47\", stroke: \"url(#paint1_linear_880_5115)\", strokeOpacity: \"0.4\", strokeWidth: \"2\" }),\n React.createElement(\"g\", { clipPath: \"url(#clip0_880_5115)\" },\n React.createElement(\"path\", { d: \"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z\", fill: \"url(#paint2_linear_880_5115)\" }),\n React.createElement(\"path\", { d: \"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z\", fill: \"url(#paint3_linear_880_5115)\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"linearGradient\", { id: \"paint0_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint1_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint2_linear_880_5115\", x1: \"25.9583\", y1: \"68.7101\", x2: \"67.2337\", y2: \"23.7879\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint3_linear_880_5115\", x1: \"58.3326\", y1: \"49.4467\", x2: \"61.0002\", y2: \"45.4453\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"clipPath\", { id: \"clip0_880_5115\" },\n React.createElement(\"rect\", { width: \"48\", height: \"48\", fill: \"white\", transform: \"translate(24.5 24)\" })))));\n};\n//# sourceMappingURL=WalletSVG.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport { useWallet } from '@solana/wallet-adapter-react';\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Collapse } from './Collapse.js';\nimport { WalletListItem } from './WalletListItem.js';\nimport { WalletSVG } from './WalletSVG.js';\nimport { useWalletModal } from './useWalletModal.js';\nexport const WalletModal = ({ className = '', container = 'body' }) => {\n const ref = useRef(null);\n const { wallets, select } = useWallet();\n const { setVisible } = useWalletModal();\n const [expanded, setExpanded] = useState(false);\n const [fadeIn, setFadeIn] = useState(false);\n const [portal, setPortal] = useState(null);\n const [listedWallets, collapsedWallets] = useMemo(() => {\n const installed = [];\n const notInstalled = [];\n for (const wallet of wallets) {\n if (wallet.readyState === WalletReadyState.Installed) {\n installed.push(wallet);\n }\n else {\n notInstalled.push(wallet);\n }\n }\n return installed.length ? [installed, notInstalled] : [notInstalled, []];\n }, [wallets]);\n const hideModal = useCallback(() => {\n setFadeIn(false);\n setTimeout(() => setVisible(false), 150);\n }, [setVisible]);\n const handleClose = useCallback((event) => {\n event.preventDefault();\n hideModal();\n }, [hideModal]);\n const handleWalletClick = useCallback((event, walletName) => {\n select(walletName);\n handleClose(event);\n }, [select, handleClose]);\n const handleCollapseClick = useCallback(() => setExpanded(!expanded), [expanded]);\n const handleTabKey = useCallback((event) => {\n const node = ref.current;\n if (!node)\n return;\n // here we query all focusable elements\n const focusableElements = node.querySelectorAll('button');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstElement = focusableElements[0];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lastElement = focusableElements[focusableElements.length - 1];\n if (event.shiftKey) {\n // if going backward by pressing tab and firstElement is active, shift focus to last focusable element\n if (document.activeElement === firstElement) {\n lastElement.focus();\n event.preventDefault();\n }\n }\n else {\n // if going forward by pressing tab and lastElement is active, shift focus to first focusable element\n if (document.activeElement === lastElement) {\n firstElement.focus();\n event.preventDefault();\n }\n }\n }, [ref]);\n useLayoutEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === 'Escape') {\n hideModal();\n }\n else if (event.key === 'Tab') {\n handleTabKey(event);\n }\n };\n // Get original overflow\n const { overflow } = window.getComputedStyle(document.body);\n // Hack to enable fade in animation after mount\n setTimeout(() => setFadeIn(true), 0);\n // Prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n // Listen for keydown events\n window.addEventListener('keydown', handleKeyDown, false);\n return () => {\n // Re-enable scrolling when component unmounts\n document.body.style.overflow = overflow;\n window.removeEventListener('keydown', handleKeyDown, false);\n };\n }, [hideModal, handleTabKey]);\n useLayoutEffect(() => setPortal(document.querySelector(container)), [container]);\n return (portal &&\n createPortal(React.createElement(\"div\", { \"aria-labelledby\": \"wallet-adapter-modal-title\", \"aria-modal\": \"true\", className: `wallet-adapter-modal ${fadeIn && 'wallet-adapter-modal-fade-in'} ${className}`, ref: ref, role: \"dialog\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-container\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-wrapper\" },\n React.createElement(\"button\", { onClick: handleClose, className: \"wallet-adapter-modal-button-close\" },\n React.createElement(\"svg\", { width: \"14\", height: \"14\" },\n React.createElement(\"path\", { d: \"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z\" }))),\n listedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"Connect a wallet on Solana to continue\"),\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" },\n listedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), wallet: wallet }))),\n collapsedWallets.length ? (React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))) : null),\n collapsedWallets.length ? (React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Less ' : 'More ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" })))) : null)) : (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"You'll need a wallet on Solana to continue\"),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-middle\" },\n React.createElement(WalletSVG, null)),\n collapsedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Hide ' : 'Already have a wallet? View ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" }))),\n React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" },\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))))) : null)))),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-overlay\", onMouseDown: handleClose })), portal));\n};\n//# sourceMappingURL=WalletModal.js.map","import React, { useState } from 'react';\nimport { WalletModalContext } from './useWalletModal.js';\nimport { WalletModal } from './WalletModal.js';\nexport const WalletModalProvider = ({ children, ...props }) => {\n const [visible, setVisible] = useState(false);\n return (React.createElement(WalletModalContext.Provider, { value: {\n visible,\n setVisible,\n } },\n children,\n visible && React.createElement(WalletModal, { ...props })));\n};\n//# sourceMappingURL=WalletModalProvider.js.map","import { Connection } from '@solana/web3.js';\nimport React, { useMemo } from 'react';\nimport { ConnectionContext } from './useConnection.js';\nexport const ConnectionProvider = ({ children, endpoint, config = { commitment: 'confirmed' }, }) => {\n const connection = useMemo(() => new Connection(endpoint, config), [endpoint, config]);\n return React.createElement(ConnectionContext.Provider, { value: { connection } }, children);\n};\n//# sourceMappingURL=ConnectionProvider.js.map","import { verifyMessageSignature } from './signMessage.js';\nimport { arraysEqual } from './util.js';\n/**\n * TODO: docs\n */\nexport function verifySignIn(input, output) {\n const { signedMessage, signature, account: { publicKey }, } = output;\n const message = deriveSignInMessage(input, output);\n return !!message && verifyMessageSignature({ message, signedMessage, signature, publicKey });\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessage(input, output) {\n const text = deriveSignInMessageText(input, output);\n if (!text)\n return null;\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessageText(input, output) {\n const parsed = parseSignInMessage(output.signedMessage);\n if (!parsed)\n return null;\n if (input.domain && input.domain !== parsed.domain)\n return null;\n if (input.address && input.address !== parsed.address)\n return null;\n if (input.statement !== parsed.statement)\n return null;\n if (input.uri !== parsed.uri)\n return null;\n if (input.version !== parsed.version)\n return null;\n if (input.chainId !== parsed.chainId)\n return null;\n if (input.nonce !== parsed.nonce)\n return null;\n if (input.issuedAt !== parsed.issuedAt)\n return null;\n if (input.expirationTime !== parsed.expirationTime)\n return null;\n if (input.notBefore !== parsed.notBefore)\n return null;\n if (input.requestId !== parsed.requestId)\n return null;\n if (input.resources) {\n if (!parsed.resources)\n return null;\n if (!arraysEqual(input.resources, parsed.resources))\n return null;\n }\n else if (parsed.resources)\n return null;\n return createSignInMessageText(parsed);\n}\n/**\n * TODO: docs\n */\nexport function parseSignInMessage(message) {\n const text = new TextDecoder().decode(message);\n return parseSignInMessageText(text);\n}\n// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md\nconst DOMAIN = '(?[^\\\\n]+?) wants you to sign in with your Solana account:\\\\n';\nconst ADDRESS = '(?
[^\\\\n]+)(?:\\\\n|$)';\nconst STATEMENT = '(?:\\\\n(?[\\\\S\\\\s]*?)(?:\\\\n|$))??';\nconst URI = '(?:\\\\nURI: (?[^\\\\n]+))?';\nconst VERSION = '(?:\\\\nVersion: (?[^\\\\n]+))?';\nconst CHAIN_ID = '(?:\\\\nChain ID: (?[^\\\\n]+))?';\nconst NONCE = '(?:\\\\nNonce: (?[^\\\\n]+))?';\nconst ISSUED_AT = '(?:\\\\nIssued At: (?[^\\\\n]+))?';\nconst EXPIRATION_TIME = '(?:\\\\nExpiration Time: (?[^\\\\n]+))?';\nconst NOT_BEFORE = '(?:\\\\nNot Before: (?[^\\\\n]+))?';\nconst REQUEST_ID = '(?:\\\\nRequest ID: (?[^\\\\n]+))?';\nconst RESOURCES = '(?:\\\\nResources:(?(?:\\\\n- [^\\\\n]+)*))?';\nconst FIELDS = `${URI}${VERSION}${CHAIN_ID}${NONCE}${ISSUED_AT}${EXPIRATION_TIME}${NOT_BEFORE}${REQUEST_ID}${RESOURCES}`;\nconst MESSAGE = new RegExp(`^${DOMAIN}${ADDRESS}${STATEMENT}${FIELDS}\\\\n*$`);\n/**\n * TODO: docs\n */\nexport function parseSignInMessageText(text) {\n const match = MESSAGE.exec(text);\n if (!match)\n return null;\n const groups = match.groups;\n if (!groups)\n return null;\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n domain: groups.domain,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n address: groups.address,\n statement: groups.statement,\n uri: groups.uri,\n version: groups.version,\n nonce: groups.nonce,\n chainId: groups.chainId,\n issuedAt: groups.issuedAt,\n expirationTime: groups.expirationTime,\n notBefore: groups.notBefore,\n requestId: groups.requestId,\n resources: groups.resources?.split('\\n- ').slice(1),\n };\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessage(input) {\n const text = createSignInMessageText(input);\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessageText(input) {\n // ${domain} wants you to sign in with your Solana account:\n // ${address}\n //\n // ${statement}\n //\n // URI: ${uri}\n // Version: ${version}\n // Chain ID: ${chain}\n // Nonce: ${nonce}\n // Issued At: ${issued-at}\n // Expiration Time: ${expiration-time}\n // Not Before: ${not-before}\n // Request ID: ${request-id}\n // Resources:\n // - ${resources[0]}\n // - ${resources[1]}\n // ...\n // - ${resources[n]}\n let message = `${input.domain} wants you to sign in with your Solana account:\\n`;\n message += `${input.address}`;\n if (input.statement) {\n message += `\\n\\n${input.statement}`;\n }\n const fields = [];\n if (input.uri) {\n fields.push(`URI: ${input.uri}`);\n }\n if (input.version) {\n fields.push(`Version: ${input.version}`);\n }\n if (input.chainId) {\n fields.push(`Chain ID: ${input.chainId}`);\n }\n if (input.nonce) {\n fields.push(`Nonce: ${input.nonce}`);\n }\n if (input.issuedAt) {\n fields.push(`Issued At: ${input.issuedAt}`);\n }\n if (input.expirationTime) {\n fields.push(`Expiration Time: ${input.expirationTime}`);\n }\n if (input.notBefore) {\n fields.push(`Not Before: ${input.notBefore}`);\n }\n if (input.requestId) {\n fields.push(`Request ID: ${input.requestId}`);\n }\n if (input.resources) {\n fields.push(`Resources:`);\n for (const resource of input.resources) {\n fields.push(`- ${resource}`);\n }\n }\n if (fields.length) {\n message += `\\n\\n${fields.join('\\n')}`;\n }\n return message;\n}\n//# sourceMappingURL=signIn.js.map","import { createSignInMessageText } from '@solana/wallet-standard-util';\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterErrorCode = {\n ERROR_ASSOCIATION_PORT_OUT_OF_RANGE: 'ERROR_ASSOCIATION_PORT_OUT_OF_RANGE',\n ERROR_FORBIDDEN_WALLET_BASE_URL: 'ERROR_FORBIDDEN_WALLET_BASE_URL',\n ERROR_SECURE_CONTEXT_REQUIRED: 'ERROR_SECURE_CONTEXT_REQUIRED',\n ERROR_SESSION_CLOSED: 'ERROR_SESSION_CLOSED',\n ERROR_SESSION_TIMEOUT: 'ERROR_SESSION_TIMEOUT',\n ERROR_WALLET_NOT_FOUND: 'ERROR_WALLET_NOT_FOUND',\n ERROR_INVALID_PROTOCOL_VERSION: 'ERROR_INVALID_PROTOCOL_VERSION',\n};\nclass SolanaMobileWalletAdapterError extends Error {\n constructor(...args) {\n const [code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaMobileWalletAdapterError';\n }\n}\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterProtocolErrorCode = {\n // Keep these in sync with `mobilewalletadapter/common/ProtocolContract.java`.\n ERROR_AUTHORIZATION_FAILED: -1,\n ERROR_INVALID_PAYLOADS: -2,\n ERROR_NOT_SIGNED: -3,\n ERROR_NOT_SUBMITTED: -4,\n ERROR_TOO_MANY_PAYLOADS: -5,\n ERROR_ATTEST_ORIGIN_ANDROID: -100,\n};\nclass SolanaMobileWalletAdapterProtocolError extends Error {\n constructor(...args) {\n const [jsonRpcMessageId, code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.jsonRpcMessageId = jsonRpcMessageId;\n this.name = 'SolanaMobileWalletAdapterProtocolError';\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction createHelloReq(ecdhPublicKey, associationKeypairPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const publicKeyBuffer = yield crypto.subtle.exportKey('raw', ecdhPublicKey);\n const signatureBuffer = yield crypto.subtle.sign({ hash: 'SHA-256', name: 'ECDSA' }, associationKeypairPrivateKey, publicKeyBuffer);\n const response = new Uint8Array(publicKeyBuffer.byteLength + signatureBuffer.byteLength);\n response.set(new Uint8Array(publicKeyBuffer), 0);\n response.set(new Uint8Array(signatureBuffer), publicKeyBuffer.byteLength);\n return response;\n });\n}\n\nfunction encode(input) {\n return window.btoa(input);\n}\n\nfunction createSIWSMessage(payload) {\n return createSignInMessageText(payload);\n}\nfunction createSIWSMessageBase64(payload) {\n return encode(createSIWSMessage(payload));\n}\n\n// optional features\nconst SolanaSignTransactions = 'solana:signTransactions';\nconst SolanaCloneAuthorization = 'solana:cloneAuthorization';\nconst SolanaSignInWithSolana = 'solana:signInWithSolana';\n\n/**\n * Creates a {@link MobileWallet} proxy that handles backwards compatibility and API to RPC conversion.\n *\n * @param protocolVersion the protocol version in use for this session/request\n * @param protocolRequestHandler callback function that handles sending the RPC request to the wallet endpoint.\n * @returns a {@link MobileWallet} proxy\n */\nfunction createMobileWalletProxy(protocolVersion, protocolRequestHandler) {\n return new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n target[p] = function (inputParams) {\n return __awaiter(this, void 0, void 0, function* () {\n const { method, params } = handleMobileWalletRequest(p, inputParams, protocolVersion);\n const result = yield protocolRequestHandler(method, params);\n // if the request tried to sign in but the wallet did not return a sign in result, fallback on message signing\n if (method === 'authorize' && params.sign_in_payload && !result.sign_in_result) {\n result['sign_in_result'] = yield signInFallback(params.sign_in_payload, result, protocolRequestHandler);\n }\n return handleMobileWalletResponse(p, result, protocolVersion);\n });\n };\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n}\n/**\n * Handles all {@link MobileWallet} API requests and determines the correct MWA RPC method and params to call.\n * This handles backwards compatibility, based on the provided @protocolVersion.\n *\n * @param methodName the name of {@link MobileWallet} method that was called\n * @param methodParams the parameters that were passed to the method\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the RPC request method and params that should be sent to the wallet endpoint\n */\nfunction handleMobileWalletRequest(methodName, methodParams, protocolVersion) {\n let params = methodParams;\n let method = methodName\n .toString()\n .replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)\n .toLowerCase();\n switch (methodName) {\n case 'authorize': {\n let { chain } = params;\n if (protocolVersion === 'legacy') {\n switch (chain) {\n case 'solana:testnet': {\n chain = 'testnet';\n break;\n }\n case 'solana:devnet': {\n chain = 'devnet';\n break;\n }\n case 'solana:mainnet': {\n chain = 'mainnet-beta';\n break;\n }\n default: {\n chain = params.cluster;\n }\n }\n params.cluster = chain;\n }\n else {\n switch (chain) {\n case 'testnet':\n case 'devnet': {\n chain = `solana:${chain}`;\n break;\n }\n case 'mainnet-beta': {\n chain = 'solana:mainnet';\n break;\n }\n }\n params.chain = chain;\n }\n }\n case 'reauthorize': {\n const { auth_token, identity } = params;\n if (auth_token) {\n switch (protocolVersion) {\n case 'legacy': {\n method = 'reauthorize';\n params = { auth_token: auth_token, identity: identity };\n break;\n }\n default: {\n method = 'authorize';\n break;\n }\n }\n }\n break;\n }\n }\n return { method, params };\n}\n/**\n * Handles all {@link MobileWallet} API responses and modifies the response for backwards compatibility, if needed\n *\n * @param method the {@link MobileWallet} method that was called\n * @param response the original response that was returned by the method call\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the possibly modified response\n */\nfunction handleMobileWalletResponse(method, response, protocolVersion) {\n switch (method) {\n case 'getCapabilities': {\n const capabilities = response;\n switch (protocolVersion) {\n case 'legacy': {\n const features = [SolanaSignTransactions];\n if (capabilities.supports_clone_authorization === true) {\n features.push(SolanaCloneAuthorization);\n }\n return Object.assign(Object.assign({}, capabilities), { features: features });\n }\n case 'v1': {\n return Object.assign(Object.assign({}, capabilities), { supports_sign_and_send_transactions: true, supports_clone_authorization: capabilities.features.includes(SolanaCloneAuthorization) });\n }\n }\n }\n }\n return response;\n}\nfunction signInFallback(signInPayload, authorizationResult, protocolRequestHandler) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const domain = (_a = signInPayload.domain) !== null && _a !== void 0 ? _a : window.location.host;\n const address = authorizationResult.accounts[0].address;\n const siwsMessage = createSIWSMessageBase64(Object.assign(Object.assign({}, signInPayload), { domain, address }));\n const signMessageResult = yield protocolRequestHandler('sign_messages', {\n addresses: [address],\n payloads: [siwsMessage]\n });\n const signInResult = {\n address: address,\n signed_message: siwsMessage,\n signature: signMessageResult.signed_payloads[0].slice(siwsMessage.length)\n };\n return signInResult;\n });\n}\n\nconst SEQUENCE_NUMBER_BYTES = 4;\nfunction createSequenceNumberVector(sequenceNumber) {\n if (sequenceNumber >= 4294967296) {\n throw new Error('Outbound sequence number overflow. The maximum sequence number is 32-bytes.');\n }\n const byteArray = new ArrayBuffer(SEQUENCE_NUMBER_BYTES);\n const view = new DataView(byteArray);\n view.setUint32(0, sequenceNumber, /* littleEndian */ false);\n return new Uint8Array(byteArray);\n}\n\nconst INITIALIZATION_VECTOR_BYTES = 12;\nconst ENCODED_PUBLIC_KEY_LENGTH_BYTES = 65;\nfunction encryptMessage(plaintext, sequenceNumber, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = createSequenceNumberVector(sequenceNumber);\n const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);\n crypto.getRandomValues(initializationVector);\n const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));\n const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);\n response.set(new Uint8Array(sequenceNumberVector), 0);\n response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);\n response.set(new Uint8Array(ciphertext), sequenceNumberVector.byteLength + initializationVector.byteLength);\n return response;\n });\n}\nfunction decryptMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = message.slice(0, SEQUENCE_NUMBER_BYTES);\n const initializationVector = message.slice(SEQUENCE_NUMBER_BYTES, SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const ciphertext = message.slice(SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const plaintextBuffer = yield crypto.subtle.decrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, ciphertext);\n const plaintext = getUtf8Decoder().decode(plaintextBuffer);\n return plaintext;\n });\n}\nfunction getAlgorithmParams(sequenceNumber, initializationVector) {\n return {\n additionalData: sequenceNumber,\n iv: initializationVector,\n name: 'AES-GCM',\n tagLength: 128, // 16 byte tag => 128 bits\n };\n}\nlet _utf8Decoder;\nfunction getUtf8Decoder() {\n if (_utf8Decoder === undefined) {\n _utf8Decoder = new TextDecoder('utf-8');\n }\n return _utf8Decoder;\n}\n\nfunction generateAssociationKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDSA',\n namedCurve: 'P-256',\n }, false /* extractable */, ['sign'] /* keyUsages */);\n });\n}\n\nfunction generateECDHKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDH',\n namedCurve: 'P-256',\n }, false /* extractable */, ['deriveKey', 'deriveBits'] /* keyUsages */);\n });\n}\n\nfunction encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = JSON.stringify(jsonRpcMessage);\n const sequenceNumber = jsonRpcMessage.id;\n return encryptMessage(plaintext, sequenceNumber, sharedSecret);\n });\n}\nfunction decryptJsonRpcMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonRpcMessage = JSON.parse(plaintext);\n if (Object.hasOwnProperty.call(jsonRpcMessage, 'error')) {\n throw new SolanaMobileWalletAdapterProtocolError(jsonRpcMessage.id, jsonRpcMessage.error.code, jsonRpcMessage.error.message);\n }\n return jsonRpcMessage;\n });\n}\n\nfunction parseHelloRsp(payloadBuffer, // The X9.62-encoded wallet endpoint ephemeral ECDH public keypoint.\nassociationPublicKey, ecdhPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const [associationPublicKeyBuffer, walletPublicKey] = yield Promise.all([\n crypto.subtle.exportKey('raw', associationPublicKey),\n crypto.subtle.importKey('raw', payloadBuffer.slice(0, ENCODED_PUBLIC_KEY_LENGTH_BYTES), { name: 'ECDH', namedCurve: 'P-256' }, false /* extractable */, [] /* keyUsages */),\n ]);\n const sharedSecret = yield crypto.subtle.deriveBits({ name: 'ECDH', public: walletPublicKey }, ecdhPrivateKey, 256);\n const ecdhSecretKey = yield crypto.subtle.importKey('raw', sharedSecret, 'HKDF', false /* extractable */, ['deriveKey'] /* keyUsages */);\n const aesKeyMaterialVal = yield crypto.subtle.deriveKey({\n name: 'HKDF',\n hash: 'SHA-256',\n salt: new Uint8Array(associationPublicKeyBuffer),\n info: new Uint8Array(),\n }, ecdhSecretKey, { name: 'AES-GCM', length: 128 }, false /* extractable */, ['encrypt', 'decrypt']);\n return aesKeyMaterialVal;\n });\n}\n\nfunction parseSessionProps(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonProperties = JSON.parse(plaintext);\n let protocolVersion = 'legacy';\n if (Object.hasOwnProperty.call(jsonProperties, 'v')) {\n switch (jsonProperties.v) {\n case 1:\n case '1':\n case 'v1':\n protocolVersion = 'v1';\n break;\n case 'legacy':\n protocolVersion = 'legacy';\n break;\n default:\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION, `Unknown/unsupported protocol version: ${jsonProperties.v}`);\n }\n }\n return ({\n protocol_version: protocolVersion\n });\n });\n}\n\nfunction getRandomAssociationPort() {\n return assertAssociationPort(49152 + Math.floor(Math.random() * (65535 - 49152 + 1)));\n}\nfunction assertAssociationPort(port) {\n if (port < 49152 || port > 65535) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE, `Association port number must be between 49152 and 65535. ${port} given.`, { port });\n }\n return port;\n}\n\n// https://stackoverflow.com/a/9458996/802047\nfunction arrayBufferToBase64String(buffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let ii = 0; ii < len; ii++) {\n binary += String.fromCharCode(bytes[ii]);\n }\n return window.btoa(binary);\n}\n\nfunction getStringWithURLUnsafeCharactersReplaced(unsafeBase64EncodedString) {\n return unsafeBase64EncodedString.replace(/[/+=]/g, (m) => ({\n '/': '_',\n '+': '-',\n '=': '.',\n }[m]));\n}\n\nconst INTENT_NAME = 'solana-wallet';\nfunction getPathParts(pathString) {\n return (pathString\n // Strip leading and trailing slashes\n .replace(/(^\\/+|\\/+$)/g, '')\n // Return an array of directories\n .split('/'));\n}\nfunction getIntentURL(methodPathname, intentUrlBase) {\n let baseUrl = null;\n if (intentUrlBase) {\n try {\n baseUrl = new URL(intentUrlBase);\n }\n catch (_a) { } // eslint-disable-line no-empty\n if ((baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.protocol) !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n }\n baseUrl || (baseUrl = new URL(`${INTENT_NAME}:/`));\n const pathname = methodPathname.startsWith('/')\n ? // Method is an absolute path. Replace it wholesale.\n methodPathname\n : // Method is a relative path. Merge it with the existing one.\n [...getPathParts(baseUrl.pathname), ...getPathParts(methodPathname)].join('/');\n return new URL(pathname, baseUrl);\n}\nfunction getAssociateAndroidIntentURL(associationPublicKey, putativePort, associationURLBase, protocolVersions = ['v1']) {\n return __awaiter(this, void 0, void 0, function* () {\n const associationPort = assertAssociationPort(putativePort);\n const exportedKey = yield crypto.subtle.exportKey('raw', associationPublicKey);\n const encodedKey = arrayBufferToBase64String(exportedKey);\n const url = getIntentURL('v1/associate/local', associationURLBase);\n url.searchParams.set('association', getStringWithURLUnsafeCharactersReplaced(encodedKey));\n url.searchParams.set('port', `${associationPort}`);\n protocolVersions.forEach((version) => {\n url.searchParams.set('v', version);\n });\n return url;\n });\n}\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst Browser = {\n Firefox: 0,\n Other: 1,\n};\nfunction assertUnreachable(x) {\n return x;\n}\nfunction getBrowser() {\n return navigator.userAgent.indexOf('Firefox/') !== -1 ? Browser.Firefox : Browser.Other;\n}\nfunction getDetectionPromise() {\n // Chrome and others silently fail if a custom protocol is not supported.\n // For these, we wait to see if the browser is navigated away from in\n // a reasonable amount of time (ie. the native wallet opened).\n return new Promise((resolve, reject) => {\n function cleanup() {\n clearTimeout(timeoutId);\n window.removeEventListener('blur', handleBlur);\n }\n function handleBlur() {\n cleanup();\n resolve();\n }\n window.addEventListener('blur', handleBlur);\n const timeoutId = setTimeout(() => {\n cleanup();\n reject();\n }, 2000);\n });\n}\nlet _frame = null;\nfunction launchUrlThroughHiddenFrame(url) {\n if (_frame == null) {\n _frame = document.createElement('iframe');\n _frame.style.display = 'none';\n document.body.appendChild(_frame);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _frame.contentWindow.location.href = url.toString();\n}\nfunction startSession(associationPublicKey, associationURLBase) {\n return __awaiter(this, void 0, void 0, function* () {\n const randomAssociationPort = getRandomAssociationPort();\n const associationUrl = yield getAssociateAndroidIntentURL(associationPublicKey, randomAssociationPort, associationURLBase);\n if (associationUrl.protocol === 'https:') {\n // The association URL is an Android 'App Link' or iOS 'Universal Link'.\n // These are regular web URLs that are designed to launch an app if it\n // is installed or load the actual target webpage if not.\n window.location.assign(associationUrl);\n }\n else {\n // The association URL has a custom protocol (eg. `solana-wallet:`)\n try {\n const browser = getBrowser();\n switch (browser) {\n case Browser.Firefox:\n // If a custom protocol is not supported in Firefox, it throws.\n launchUrlThroughHiddenFrame(associationUrl);\n // If we reached this line, it's supported.\n break;\n case Browser.Other: {\n const detectionPromise = getDetectionPromise();\n window.location.assign(associationUrl);\n yield detectionPromise;\n break;\n }\n default:\n assertUnreachable(browser);\n }\n }\n catch (e) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND, 'Found no installed wallet that supports the mobile wallet protocol.');\n }\n }\n return randomAssociationPort;\n });\n}\n\nconst WEBSOCKET_CONNECTION_CONFIG = {\n /**\n * 300 milliseconds is a generally accepted threshold for what someone\n * would consider an acceptable response time for a user interface\n * after having performed a low-attention tapping task. We set the initial\n * interval at which we wait for the wallet to set up the websocket at\n * half this, as per the Nyquist frequency, with a progressive backoff\n * sequence from there. The total wait time is 30s, which allows for the\n * user to be presented with a disambiguation dialog, select a wallet, and\n * for the wallet app to subsequently start.\n */\n retryDelayScheduleMs: [150, 150, 200, 500, 500, 750, 750, 1000],\n timeoutMs: 30000,\n};\nconst WEBSOCKET_PROTOCOL = 'com.solana.mobilewalletadapter.v1';\nfunction assertSecureContext() {\n if (typeof window === 'undefined' || window.isSecureContext !== true) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SECURE_CONTEXT_REQUIRED, 'The mobile wallet adapter protocol must be used in a secure context (`https`).');\n }\n}\nfunction assertSecureEndpointSpecificURI(walletUriBase) {\n let url;\n try {\n url = new URL(walletUriBase);\n }\n catch (_a) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Invalid base URL supplied by wallet');\n }\n if (url.protocol !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n}\nfunction getSequenceNumberFromByteArray(byteArray) {\n const view = new DataView(byteArray);\n return view.getUint32(0, /* littleEndian */ false);\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n assertSecureContext();\n const associationKeypair = yield generateAssociationKeypair();\n const sessionPort = yield startSession(associationKeypair.publicKey, config === null || config === void 0 ? void 0 : config.baseUri);\n const websocketURL = `ws://localhost:${sessionPort}/solana-wallet`;\n let connectionStartTime;\n const getNextRetryDelayMs = (() => {\n const schedule = [...WEBSOCKET_CONNECTION_CONFIG.retryDelayScheduleMs];\n return () => (schedule.length > 1 ? schedule.shift() : schedule[0]);\n })();\n let nextJsonRpcMessageId = 1;\n let lastKnownInboundSequenceNumber = 0;\n let state = { __type: 'disconnected' };\n return new Promise((resolve, reject) => {\n let socket;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const jsonRpcResponsePromises = {};\n const handleOpen = () => __awaiter(this, void 0, void 0, function* () {\n if (state.__type !== 'connecting') {\n console.warn('Expected adapter state to be `connecting` at the moment the websocket opens. ' +\n `Got \\`${state.__type}\\`.`);\n return;\n }\n const { associationKeypair } = state;\n socket.removeEventListener('open', handleOpen);\n const ecdhKeypair = yield generateECDHKeypair();\n socket.send(yield createHelloReq(ecdhKeypair.publicKey, associationKeypair.privateKey));\n state = {\n __type: 'hello_req_sent',\n associationPublicKey: associationKeypair.publicKey,\n ecdhPrivateKey: ecdhKeypair.privateKey,\n };\n });\n const handleClose = (evt) => {\n if (evt.wasClean) {\n state = { __type: 'disconnected' };\n }\n else {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_CLOSED, `The wallet session dropped unexpectedly (${evt.code}: ${evt.reason}).`, { closeEvent: evt }));\n }\n disposeSocket();\n };\n const handleError = (_evt) => __awaiter(this, void 0, void 0, function* () {\n disposeSocket();\n if (Date.now() - connectionStartTime >= WEBSOCKET_CONNECTION_CONFIG.timeoutMs) {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_TIMEOUT, `Failed to connect to the wallet websocket on port ${sessionPort}.`));\n }\n else {\n yield new Promise((resolve) => {\n const retryDelayMs = getNextRetryDelayMs();\n retryWaitTimeoutId = window.setTimeout(resolve, retryDelayMs);\n });\n attemptSocketConnection();\n }\n });\n const handleMessage = (evt) => __awaiter(this, void 0, void 0, function* () {\n const responseBuffer = yield evt.data.arrayBuffer();\n switch (state.__type) {\n case 'connected':\n try {\n const sequenceNumberVector = responseBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n const jsonRpcMessage = yield decryptJsonRpcMessage(responseBuffer, state.sharedSecret);\n const responsePromise = jsonRpcResponsePromises[jsonRpcMessage.id];\n delete jsonRpcResponsePromises[jsonRpcMessage.id];\n responsePromise.resolve(jsonRpcMessage.result);\n }\n catch (e) {\n if (e instanceof SolanaMobileWalletAdapterProtocolError) {\n const responsePromise = jsonRpcResponsePromises[e.jsonRpcMessageId];\n delete jsonRpcResponsePromises[e.jsonRpcMessageId];\n responsePromise.reject(e);\n }\n else {\n throw e;\n }\n }\n break;\n case 'hello_req_sent': {\n const sharedSecret = yield parseHelloRsp(responseBuffer, state.associationPublicKey, state.ecdhPrivateKey);\n const sessionPropertiesBuffer = responseBuffer.slice(ENCODED_PUBLIC_KEY_LENGTH_BYTES);\n const sessionProperties = sessionPropertiesBuffer.byteLength !== 0\n ? yield (() => __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = sessionPropertiesBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n return parseSessionProps(sessionPropertiesBuffer, sharedSecret);\n }))() : { protocol_version: 'legacy' };\n state = { __type: 'connected', sharedSecret, sessionProperties };\n const wallet = createMobileWalletProxy(sessionProperties.protocol_version, (method, params) => __awaiter(this, void 0, void 0, function* () {\n const id = nextJsonRpcMessageId++;\n socket.send(yield encryptJsonRpcMessage({\n id,\n jsonrpc: '2.0',\n method,\n params: params !== null && params !== void 0 ? params : {},\n }, sharedSecret));\n return new Promise((resolve, reject) => {\n jsonRpcResponsePromises[id] = {\n resolve(result) {\n switch (method) {\n case 'authorize':\n case 'reauthorize': {\n const { wallet_uri_base } = result;\n if (wallet_uri_base != null) {\n try {\n assertSecureEndpointSpecificURI(wallet_uri_base);\n }\n catch (e) {\n reject(e);\n return;\n }\n }\n break;\n }\n }\n resolve(result);\n },\n reject,\n };\n });\n }));\n try {\n resolve(yield callback(wallet));\n }\n catch (e) {\n reject(e);\n }\n finally {\n disposeSocket();\n socket.close();\n }\n break;\n }\n }\n });\n let disposeSocket;\n let retryWaitTimeoutId;\n const attemptSocketConnection = () => {\n if (disposeSocket) {\n disposeSocket();\n }\n state = { __type: 'connecting', associationKeypair };\n if (connectionStartTime === undefined) {\n connectionStartTime = Date.now();\n }\n socket = new WebSocket(websocketURL, [WEBSOCKET_PROTOCOL]);\n socket.addEventListener('open', handleOpen);\n socket.addEventListener('close', handleClose);\n socket.addEventListener('error', handleError);\n socket.addEventListener('message', handleMessage);\n disposeSocket = () => {\n window.clearTimeout(retryWaitTimeoutId);\n socket.removeEventListener('open', handleOpen);\n socket.removeEventListener('close', handleClose);\n socket.removeEventListener('error', handleError);\n socket.removeEventListener('message', handleMessage);\n };\n };\n attemptSocketConnection();\n });\n });\n}\n\nexport { SolanaCloneAuthorization, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterProtocolError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaSignInWithSolana, SolanaSignTransactions, transact };\n","import { VersionedMessage, Transaction, VersionedTransaction, SIGNATURE_LENGTH_IN_BYTES } from '@solana/web3.js';\nimport { transact as transact$1 } from '@solana-mobile/mobile-wallet-adapter-protocol';\nimport bs58 from 'bs58';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction fromUint8Array(byteArray) {\n return window.btoa(String.fromCharCode.call(null, ...byteArray));\n}\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getPayloadFromTransaction(transaction) {\n const serializedTransaction = 'version' in transaction\n ? transaction.serialize()\n : transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n });\n const payload = fromUint8Array(serializedTransaction);\n return payload;\n}\nfunction getTransactionFromWireMessage(byteArray) {\n const numSignatures = byteArray[0];\n const messageOffset = numSignatures * SIGNATURE_LENGTH_IN_BYTES + 1;\n const version = VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));\n if (version === 'legacy') {\n return Transaction.from(byteArray);\n }\n else {\n return VersionedTransaction.deserialize(byteArray);\n }\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n const augmentedCallback = (wallet) => {\n const augmentedAPI = new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n switch (p) {\n case 'signAndSendTransactions':\n target[p] = function (_a) {\n var { minContextSlot, commitment, skipPreflight, maxRetries, waitForCommitmentToSendNextTransaction, transactions } = _a, rest = __rest(_a, [\"minContextSlot\", \"commitment\", \"skipPreflight\", \"maxRetries\", \"waitForCommitmentToSendNextTransaction\", \"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const options = {\n min_context_slot: minContextSlot,\n commitment: commitment,\n skip_preflight: skipPreflight,\n max_retries: maxRetries,\n wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction\n };\n const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (Object.values(options).some(element => element != null)\n ? { options: options }\n : null)), { payloads }));\n const signatures = base64EncodedSignatures.map(toUint8Array).map(bs58.encode);\n return signatures;\n });\n };\n break;\n case 'signMessages':\n target[p] = function (_a) {\n var { payloads } = _a, rest = __rest(_a, [\"payloads\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const base64EncodedPayloads = payloads.map(fromUint8Array);\n const { signed_payloads: base64EncodedSignedMessages } = yield wallet.signMessages(Object.assign(Object.assign({}, rest), { payloads: base64EncodedPayloads }));\n const signedMessages = base64EncodedSignedMessages.map(toUint8Array);\n return signedMessages;\n });\n };\n break;\n case 'signTransactions':\n target[p] = function (_a) {\n var { transactions } = _a, rest = __rest(_a, [\"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));\n const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);\n const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);\n return signedTransactions;\n });\n };\n break;\n default: {\n target[p] = wallet[p];\n break;\n }\n }\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n return callback(augmentedAPI);\n };\n return yield transact$1(augmentedCallback, config);\n });\n}\n\nexport { transact };\n","import { BaseSignInMessageSignerWalletAdapter, WalletReadyState, WalletPublicKeyError, WalletNotReadyError, WalletConnectionError, WalletDisconnectedError, WalletNotConnectedError, WalletSignTransactionError, WalletSendTransactionError, WalletSignMessageError } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getIsSupported() {\n return (typeof window !== 'undefined' &&\n window.isSecureContext &&\n typeof document !== 'undefined' &&\n /android/i.test(navigator.userAgent));\n}\n\nconst SolanaMobileWalletAdapterWalletName = 'Mobile Wallet Adapter';\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\nfunction getPublicKeyFromAddress(address) {\n const publicKeyByteArray = toUint8Array(address);\n return new PublicKey(publicKeyByteArray);\n}\nfunction isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\nclass SolanaMobileWalletAdapter extends BaseSignInMessageSignerWalletAdapter {\n constructor(config) {\n var _a;\n super();\n this.supportedTransactionVersions = new Set(\n // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to.\n ['legacy', 0]);\n this.name = SolanaMobileWalletAdapterWalletName;\n this.url = 'https://solanamobile.com/wallets';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI4IiB3aWR0aD0iMjgiIHZpZXdCb3g9Ii0zIDAgMjggMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0RDQjhGRiI+PHBhdGggZD0iTTE3LjQgMTcuNEgxNXYyLjRoMi40di0yLjRabTEuMi05LjZoLTIuNHYyLjRoMi40VjcuOFoiLz48cGF0aCBkPSJNMjEuNiAzVjBoLTIuNHYzaC0zLjZWMGgtMi40djNoLTIuNHY2LjZINC41YTIuMSAyLjEgMCAxIDEgMC00LjJoMi43VjNINC41QTQuNSA0LjUgMCAwIDAgMCA3LjVWMjRoMjEuNnYtNi42aC0yLjR2NC4ySDIuNFYxMS41Yy41LjMgMS4yLjQgMS44LjVoNy41QTYuNiA2LjYgMCAwIDAgMjQgOVYzaC0yLjRabTAgNS43YTQuMiA0LjIgMCAxIDEtOC40IDBWNS40aDguNHYzLjNaIi8+PC9nPjwvc3ZnPg==';\n this._connecting = false;\n /**\n * Every time the connection is recycled in some way (eg. `disconnect()` is called)\n * increment this and use it to make sure that `transact` calls from the previous\n * 'generation' don't continue to do work and throw exceptions.\n */\n this._connectionGeneration = 0;\n this._readyState = getIsSupported() ? WalletReadyState.Loadable : WalletReadyState.Unsupported;\n this._authorizationResultCache = config.authorizationResultCache;\n this._addressSelector = config.addressSelector;\n this._appIdentity = config.appIdentity;\n this._chain = (_a = config.chain) !== null && _a !== void 0 ? _a : config.cluster;\n this._onWalletNotFound = config.onWalletNotFound;\n if (this._readyState !== WalletReadyState.Unsupported) {\n this._authorizationResultCache.get().then((authorizationResult) => {\n if (authorizationResult) {\n // Having a prior authorization result is, right now, the best\n // indication that a mobile wallet is installed. There is no API\n // we can use to test for whether the association URI is supported.\n this.declareWalletAsInstalled();\n }\n });\n }\n }\n get publicKey() {\n if (this._publicKey == null && this._selectedAddress != null) {\n try {\n this._publicKey = getPublicKeyFromAddress(this._selectedAddress);\n }\n catch (e) {\n throw new WalletPublicKeyError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n }\n return this._publicKey ? this._publicKey : null;\n }\n get connected() {\n return !!this._authorizationResult;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n declareWalletAsInstalled() {\n if (this._readyState !== WalletReadyState.Installed) {\n this.emit('readyStateChange', (this._readyState = WalletReadyState.Installed));\n }\n }\n runWithGuard(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield callback();\n }\n catch (e) {\n this.emit('error', e);\n throw e;\n }\n });\n }\n /** @deprecated Use `autoConnect()` instead. */\n autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.autoConnect();\n });\n }\n autoConnect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n }\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n connect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n yield this.performAuthorization();\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n performAuthorization(signInPayload) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n return cachedAuthorizationResult;\n }\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n const authorizationResult = yield wallet.authorize({\n chain: this._chain,\n identity: this._appIdentity,\n sign_in_payload: signInPayload,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n return authorizationResult;\n }));\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n });\n }\n handleAuthorizationResult(authorizationResult) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const didPublicKeysChange = \n // Case 1: We started from having no authorization.\n this._authorizationResult == null ||\n // Case 2: The number of authorized accounts changed.\n ((_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.accounts.length) !== authorizationResult.accounts.length ||\n // Case 3: The new list of addresses isn't exactly the same as the old list, in the same order.\n this._authorizationResult.accounts.some((account, ii) => account.address !== authorizationResult.accounts[ii].address);\n this._authorizationResult = authorizationResult;\n this.declareWalletAsInstalled();\n if (didPublicKeysChange) {\n const nextSelectedAddress = yield this._addressSelector.select(authorizationResult.accounts.map(({ address }) => address));\n if (nextSelectedAddress !== this._selectedAddress) {\n this._selectedAddress = nextSelectedAddress;\n delete this._publicKey;\n this.emit('connect', \n // Having just set `this._selectedAddress`, `this.publicKey` is definitely non-null\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.publicKey);\n }\n }\n });\n }\n performReauthorization(wallet, authToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const authorizationResult = yield wallet.authorize({\n auth_token: authToken,\n identity: this._appIdentity,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n }\n catch (e) {\n this.disconnect();\n throw new WalletDisconnectedError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n });\n }\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n this._authorizationResultCache.clear(); // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this._connecting = false;\n this._connectionGeneration++;\n delete this._authorizationResult;\n delete this._publicKey;\n delete this._selectedAddress;\n this.emit('disconnect');\n });\n }\n transact(callback) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const walletUriBase = (_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.wallet_uri_base;\n const config = walletUriBase ? { baseUri: walletUriBase } : undefined;\n const currentConnectionGeneration = this._connectionGeneration;\n try {\n return yield transact(callback, config);\n }\n catch (e) {\n if (this._connectionGeneration !== currentConnectionGeneration) {\n yield new Promise(() => { }); // Never resolve.\n }\n if (e instanceof Error &&\n e.name === 'SolanaMobileWalletAdapterError' &&\n e.code === 'ERROR_WALLET_NOT_FOUND') {\n yield this._onWalletNotFound(this);\n }\n throw e;\n }\n });\n }\n assertIsAuthorized() {\n if (!this._authorizationResult || !this._selectedAddress)\n throw new WalletNotConnectedError();\n return {\n authToken: this._authorizationResult.auth_token,\n selectedAddress: this._selectedAddress,\n };\n }\n performSignTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const signedTransactions = yield wallet.signTransactions({\n transactions,\n });\n return signedTransactions;\n }));\n }\n catch (error) {\n throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n });\n }\n sendTransaction(transaction, connection, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n const minContextSlot = options === null || options === void 0 ? void 0 : options.minContextSlot;\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n function getTargetCommitment() {\n let targetCommitment;\n switch (connection.commitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetCommitment = connection.commitment;\n break;\n default:\n targetCommitment = 'finalized';\n }\n let targetPreflightCommitment;\n switch (options === null || options === void 0 ? void 0 : options.preflightCommitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetPreflightCommitment = options.preflightCommitment;\n break;\n case undefined:\n targetPreflightCommitment = targetCommitment;\n break;\n default:\n targetPreflightCommitment = 'finalized';\n }\n const preflightCommitmentScore = targetPreflightCommitment === 'finalized'\n ? 2\n : targetPreflightCommitment === 'confirmed'\n ? 1\n : 0;\n const targetCommitmentScore = targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0;\n return preflightCommitmentScore < targetCommitmentScore\n ? targetPreflightCommitment\n : targetCommitment;\n }\n const [capabilities, _1, _2] = yield Promise.all([\n wallet.getCapabilities(),\n this.performReauthorization(wallet, authToken),\n isVersionedTransaction(transaction)\n ? null\n : /**\n * Unlike versioned transactions, legacy `Transaction` objects\n * may not have an associated `feePayer` or `recentBlockhash`.\n * This code exists to patch them up in case they are missing.\n */\n (() => __awaiter(this, void 0, void 0, function* () {\n var _a;\n transaction.feePayer || (transaction.feePayer = (_a = this.publicKey) !== null && _a !== void 0 ? _a : undefined);\n if (transaction.recentBlockhash == null) {\n const { blockhash } = yield connection.getLatestBlockhash({\n commitment: getTargetCommitment(),\n });\n transaction.recentBlockhash = blockhash;\n }\n }))(),\n ]);\n if (capabilities.supports_sign_and_send_transactions) {\n const signatures = yield wallet.signAndSendTransactions({\n minContextSlot,\n transactions: [transaction],\n });\n return signatures[0];\n }\n else {\n const [signedTransaction] = yield wallet.signTransactions({\n transactions: [transaction],\n });\n if (isVersionedTransaction(signedTransaction)) {\n return yield connection.sendTransaction(signedTransaction);\n }\n else {\n const serializedTransaction = signedTransaction.serialize();\n return yield connection.sendRawTransaction(serializedTransaction, Object.assign(Object.assign({}, options), { preflightCommitment: getTargetCommitment() }));\n }\n }\n }));\n }\n catch (error) {\n throw new WalletSendTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const [signedTransaction] = yield this.performSignTransactions([transaction]);\n return signedTransaction;\n }));\n });\n }\n signAllTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const signedTransactions = yield this.performSignTransactions(transactions);\n return signedTransactions;\n }));\n });\n }\n signMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken, selectedAddress } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const [signedMessage] = yield wallet.signMessages({\n addresses: [selectedAddress],\n payloads: [message],\n });\n const signature = signedMessage.slice(-SIGNATURE_LENGTH_IN_BYTES);\n return signature;\n }));\n }\n catch (error) {\n throw new WalletSignMessageError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signIn(input) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const authorizationResult = yield this.performAuthorization(Object.assign(Object.assign({}, input), { domain: (_a = input === null || input === void 0 ? void 0 : input.domain) !== null && _a !== void 0 ? _a : window.location.host }));\n if (!authorizationResult.sign_in_result) {\n throw new Error(\"Sign in failed, no sign in result returned by wallet\");\n }\n const signedInAddress = authorizationResult.sign_in_result.address;\n const signedInAccount = Object.assign(Object.assign({}, (_b = authorizationResult.accounts.find(acc => acc.address == signedInAddress)) !== null && _b !== void 0 ? _b : {\n address: signedInAddress\n }), { publicKey: toUint8Array(signedInAddress) });\n return {\n account: signedInAccount,\n signedMessage: toUint8Array(authorizationResult.sign_in_result.signed_message),\n signature: toUint8Array(authorizationResult.sign_in_result.signature)\n };\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n}\n\nfunction createDefaultAddressSelector() {\n return {\n select(addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n return addresses[0];\n });\n },\n };\n}\n\nconst CACHE_KEY = 'SolanaMobileWalletAdapterDefaultAuthorizationCache';\nfunction createDefaultAuthorizationResultCache() {\n let storage;\n try {\n storage = window.localStorage;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n return {\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.removeItem(CACHE_KEY);\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n get() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n return JSON.parse(storage.getItem(CACHE_KEY)) || undefined;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n set(authorizationResult) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.setItem(CACHE_KEY, JSON.stringify(authorizationResult));\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n };\n}\n\nfunction defaultWalletNotFoundHandler(mobileWalletAdapter) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof window !== 'undefined') {\n window.location.assign(mobileWalletAdapter.url);\n }\n });\n}\nfunction createDefaultWalletNotFoundHandler() {\n return defaultWalletNotFoundHandler;\n}\n\nexport { SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler };\n","import { SolanaSignAndSendTransaction, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardEvents, } from '@wallet-standard/features';\nexport function isWalletAdapterCompatibleStandardWallet(wallet) {\n return (StandardConnect in wallet.features &&\n StandardEvents in wallet.features &&\n (SolanaSignAndSendTransaction in wallet.features || SolanaSignTransaction in wallet.features));\n}\n//# sourceMappingURL=standard.js.map","import { isWalletAdapterCompatibleStandardWallet, } from '@solana/wallet-adapter-base';\n/**\n * @deprecated Use `isWalletAdapterCompatibleStandardWallet` from `@solana/wallet-adapter-base` instead.\n *\n * @group Deprecated\n */\nexport const isWalletAdapterCompatibleWallet = isWalletAdapterCompatibleStandardWallet;\n//# sourceMappingURL=types.js.map","/** Name of the feature. */\nexport const SolanaSignIn = 'solana:signIn';\n//# sourceMappingURL=signIn.js.map","import { SOLANA_DEVNET_CHAIN, SOLANA_LOCALNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN, } from '@solana/wallet-standard-chains';\n/** TODO: docs */\nexport const MAINNET_ENDPOINT = 'https://api.mainnet-beta.solana.com';\n/** TODO: docs */\nexport const DEVNET_ENDPOINT = 'https://api.devnet.solana.com';\n/** TODO: docs */\nexport const TESTNET_ENDPOINT = 'https://api.testnet.solana.com';\n/** TODO: docs */\nexport const LOCALNET_ENDPOINT = 'http://localhost:8899';\n/**\n * TODO: docs\n */\nexport function getChainForEndpoint(endpoint) {\n if (endpoint.includes(MAINNET_ENDPOINT))\n return SOLANA_MAINNET_CHAIN;\n if (/\\bdevnet\\b/i.test(endpoint))\n return SOLANA_DEVNET_CHAIN;\n if (/\\btestnet\\b/i.test(endpoint))\n return SOLANA_TESTNET_CHAIN;\n if (/\\blocalhost\\b/i.test(endpoint) || /\\b127\\.0\\.0\\.1\\b/.test(endpoint))\n return SOLANA_LOCALNET_CHAIN;\n return SOLANA_MAINNET_CHAIN;\n}\n/**\n * TODO: docs\n */\nexport function getEndpointForChain(chain, endpoint) {\n if (endpoint)\n return endpoint;\n if (chain === SOLANA_MAINNET_CHAIN)\n return MAINNET_ENDPOINT;\n if (chain === SOLANA_DEVNET_CHAIN)\n return DEVNET_ENDPOINT;\n if (chain === SOLANA_TESTNET_CHAIN)\n return TESTNET_ENDPOINT;\n if (chain === SOLANA_LOCALNET_CHAIN)\n return LOCALNET_ENDPOINT;\n return MAINNET_ENDPOINT;\n}\n//# sourceMappingURL=endpoint.js.map","/**\n * TODO: docs\n */\nexport function getCommitment(commitment) {\n switch (commitment) {\n case 'processed':\n case 'confirmed':\n case 'finalized':\n case undefined:\n return commitment;\n case 'recent':\n return 'processed';\n case 'single':\n case 'singleGossip':\n return 'confirmed';\n case 'max':\n case 'root':\n return 'finalized';\n default:\n return undefined;\n }\n}\n//# sourceMappingURL=commitment.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadonlyWalletAccount_address, _ReadonlyWalletAccount_publicKey, _ReadonlyWalletAccount_chains, _ReadonlyWalletAccount_features, _ReadonlyWalletAccount_label, _ReadonlyWalletAccount_icon;\n/**\n * Base implementation of a {@link \"@wallet-standard/base\".WalletAccount} to be used or extended by a\n * {@link \"@wallet-standard/base\".Wallet}.\n *\n * `WalletAccount` properties must be read-only. This class enforces this by making all properties\n * [truly private](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) and\n * read-only, using getters for access, returning copies instead of references, and calling\n * [Object.freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)\n * on the instance.\n *\n * @group Account\n */\nexport class ReadonlyWalletAccount {\n /**\n * Create and freeze a read-only account.\n *\n * @param account Account to copy properties from.\n */\n constructor(account) {\n _ReadonlyWalletAccount_address.set(this, void 0);\n _ReadonlyWalletAccount_publicKey.set(this, void 0);\n _ReadonlyWalletAccount_chains.set(this, void 0);\n _ReadonlyWalletAccount_features.set(this, void 0);\n _ReadonlyWalletAccount_label.set(this, void 0);\n _ReadonlyWalletAccount_icon.set(this, void 0);\n if (new.target === ReadonlyWalletAccount) {\n Object.freeze(this);\n }\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_address, account.address, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_publicKey, account.publicKey.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_chains, account.chains.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_features, account.features.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_label, account.label, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_icon, account.icon, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.address | WalletAccount::address} */\n get address() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_address, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.publicKey | WalletAccount::publicKey} */\n get publicKey() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_publicKey, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.chains | WalletAccount::chains} */\n get chains() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_chains, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.features | WalletAccount::features} */\n get features() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_features, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.label | WalletAccount::label} */\n get label() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_label, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.icon | WalletAccount::icon} */\n get icon() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_icon, \"f\");\n }\n}\n_ReadonlyWalletAccount_address = new WeakMap(), _ReadonlyWalletAccount_publicKey = new WeakMap(), _ReadonlyWalletAccount_chains = new WeakMap(), _ReadonlyWalletAccount_features = new WeakMap(), _ReadonlyWalletAccount_label = new WeakMap(), _ReadonlyWalletAccount_icon = new WeakMap();\n/**\n * Efficiently compare {@link Indexed} arrays (e.g. `Array` and `Uint8Array`).\n *\n * @param a An array.\n * @param b Another array.\n *\n * @return `true` if the arrays have the same length and elements, `false` otherwise.\n *\n * @group Util\n */\nexport function arraysEqual(a, b) {\n if (a === b)\n return true;\n const length = a.length;\n if (length !== b.length)\n return false;\n for (let i = 0; i < length; i++) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n/**\n * Efficiently compare byte arrays, using {@link arraysEqual}.\n *\n * @param a A byte array.\n * @param b Another byte array.\n *\n * @return `true` if the byte arrays have the same length and bytes, `false` otherwise.\n *\n * @group Util\n */\nexport function bytesEqual(a, b) {\n return arraysEqual(a, b);\n}\n/**\n * Efficiently concatenate byte arrays without modifying them.\n *\n * @param first A byte array.\n * @param others Additional byte arrays.\n *\n * @return New byte array containing the concatenation of all the byte arrays.\n *\n * @group Util\n */\nexport function concatBytes(first, ...others) {\n const length = others.reduce((length, bytes) => length + bytes.length, first.length);\n const bytes = new Uint8Array(length);\n bytes.set(first, 0);\n for (const other of others) {\n bytes.set(other, bytes.length);\n }\n return bytes;\n}\n/**\n * Create a new object with a subset of fields from a source object.\n *\n * @param source Object to pick fields from.\n * @param keys Names of fields to pick.\n *\n * @return New object with only the picked fields.\n *\n * @group Util\n */\nexport function pick(source, ...keys) {\n const picked = {};\n for (const key of keys) {\n picked[key] = source[key];\n }\n return picked;\n}\n/**\n * Call a callback function, catch an error if it throws, and log the error without rethrowing.\n *\n * @param callback Function to call.\n *\n * @group Util\n */\nexport function guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\n//# sourceMappingURL=util.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _StandardWalletAdapter_instances, _StandardWalletAdapter_account, _StandardWalletAdapter_publicKey, _StandardWalletAdapter_connecting, _StandardWalletAdapter_disconnecting, _StandardWalletAdapter_off, _StandardWalletAdapter_supportedTransactionVersions, _StandardWalletAdapter_wallet, _StandardWalletAdapter_readyState, _StandardWalletAdapter_connect, _StandardWalletAdapter_connected, _StandardWalletAdapter_disconnected, _StandardWalletAdapter_reset, _StandardWalletAdapter_changed, _StandardWalletAdapter_signTransaction, _StandardWalletAdapter_signAllTransactions, _StandardWalletAdapter_signMessage, _StandardWalletAdapter_signIn;\nimport { BaseWalletAdapter, isVersionedTransaction, WalletAccountError, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignInError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { SolanaSignAndSendTransaction, SolanaSignIn, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { getChainForEndpoint, getCommitment } from '@solana/wallet-standard-util';\nimport { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { arraysEqual } from '@wallet-standard/wallet';\nimport bs58 from 'bs58';\n/** TODO: docs */\nexport class StandardWalletAdapter extends BaseWalletAdapter {\n constructor({ wallet }) {\n super();\n _StandardWalletAdapter_instances.add(this);\n _StandardWalletAdapter_account.set(this, void 0);\n _StandardWalletAdapter_publicKey.set(this, void 0);\n _StandardWalletAdapter_connecting.set(this, void 0);\n _StandardWalletAdapter_disconnecting.set(this, void 0);\n _StandardWalletAdapter_off.set(this, void 0);\n _StandardWalletAdapter_supportedTransactionVersions.set(this, void 0);\n _StandardWalletAdapter_wallet.set(this, void 0);\n _StandardWalletAdapter_readyState.set(this, typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Installed);\n _StandardWalletAdapter_changed.set(this, (properties) => {\n // If accounts have changed on the wallet, reflect this on the adapter.\n if ('accounts' in properties) {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n // If the adapter isn't connected, or is disconnecting, or the first account hasn't changed, do nothing.\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\") && !__classPrivateFieldGet(this, _StandardWalletAdapter_disconnecting, \"f\") && account !== __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")) {\n // If there's a connected account, connect the adapter. Otherwise, disconnect it.\n if (account) {\n // Connect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n else {\n // Emit an error because the wallet spontaneously disconnected.\n this.emit('error', new WalletDisconnectedError());\n // Disconnect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n }\n }\n // After reflecting account changes, if features have changed on the wallet, reflect this on the adapter.\n if ('features' in properties) {\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n });\n __classPrivateFieldSet(this, _StandardWalletAdapter_wallet, wallet, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardEvents].on('change', __classPrivateFieldGet(this, _StandardWalletAdapter_changed, \"f\")), \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n get name() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").name;\n }\n get url() {\n return 'https://github.com/solana-labs/wallet-standard';\n }\n get icon() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").icon;\n }\n get readyState() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\");\n }\n get publicKey() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_publicKey, \"f\");\n }\n get connecting() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_connecting, \"f\");\n }\n get supportedTransactionVersions() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_supportedTransactionVersions, \"f\");\n }\n get wallet() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\");\n }\n get standard() {\n return true;\n }\n destroy() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n const off = __classPrivateFieldGet(this, _StandardWalletAdapter_off, \"f\");\n if (off) {\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, null, \"f\");\n off();\n }\n }\n async autoConnect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this, { silent: true });\n }\n async connect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this);\n }\n async disconnect() {\n if (StandardDisconnect in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n try {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, true, \"f\");\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardDisconnect].disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n }\n }\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n let feature;\n if (SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (account.features.includes(SolanaSignAndSendTransaction)) {\n feature = SolanaSignAndSendTransaction;\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features &&\n account.features.includes(SolanaSignTransaction)) {\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletAccountError();\n }\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletConfigError();\n }\n const chain = getChainForEndpoint(connection.rpcEndpoint);\n if (!account.chains.includes(chain))\n throw new WalletSendTransactionError();\n try {\n const { signers, ...sendOptions } = options;\n let serializedTransaction;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n serializedTransaction = transaction.serialize();\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n serializedTransaction = new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n }));\n }\n if (feature === SolanaSignAndSendTransaction) {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].signAndSendTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n skipPreflight: sendOptions.skipPreflight,\n maxRetries: sendOptions.maxRetries,\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return bs58.encode(output.signature);\n }\n else {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return await connection.sendRawTransaction(output.signedTransaction, {\n ...sendOptions,\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n });\n }\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n_StandardWalletAdapter_account = new WeakMap(), _StandardWalletAdapter_publicKey = new WeakMap(), _StandardWalletAdapter_connecting = new WeakMap(), _StandardWalletAdapter_disconnecting = new WeakMap(), _StandardWalletAdapter_off = new WeakMap(), _StandardWalletAdapter_supportedTransactionVersions = new WeakMap(), _StandardWalletAdapter_wallet = new WeakMap(), _StandardWalletAdapter_readyState = new WeakMap(), _StandardWalletAdapter_changed = new WeakMap(), _StandardWalletAdapter_instances = new WeakSet(), _StandardWalletAdapter_connect = async function _StandardWalletAdapter_connect(input) {\n try {\n if (this.connected || this.connecting)\n return;\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\") !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, true, \"f\");\n if (!__classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts.length) {\n try {\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardConnect].connect(input);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n if (!account)\n throw new WalletAccountError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n }\n}, _StandardWalletAdapter_connected = function _StandardWalletAdapter_connected(account) {\n let publicKey;\n try {\n // Use account.address instead of account.publicKey since address could be a PDA\n publicKey = new PublicKey(account.address);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, account, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, publicKey, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('connect', publicKey);\n}, _StandardWalletAdapter_disconnected = function _StandardWalletAdapter_disconnected() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('disconnect');\n}, _StandardWalletAdapter_reset = function _StandardWalletAdapter_reset() {\n const supportedTransactionVersions = SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features\n ? __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].supportedTransactionVersions\n : __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].supportedTransactionVersions;\n __classPrivateFieldSet(this, _StandardWalletAdapter_supportedTransactionVersions, arraysEqual(supportedTransactionVersions, ['legacy'])\n ? null\n : new Set(supportedTransactionVersions), \"f\");\n if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignTransaction)) {\n this.signTransaction = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signTransaction);\n this.signAllTransactions = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signAllTransactions);\n }\n else {\n delete this.signTransaction;\n delete this.signAllTransactions;\n }\n if (SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignMessage)) {\n this.signMessage = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signMessage);\n }\n else {\n delete this.signMessage;\n }\n if (SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n this.signIn = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signIn);\n }\n else {\n delete this.signIn;\n }\n}, _StandardWalletAdapter_signTransaction = async function _StandardWalletAdapter_signTransaction(transaction) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const serializedTransaction = signedTransactions[0].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(serializedTransaction)\n : Transaction.from(serializedTransaction));\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signAllTransactions = async function _StandardWalletAdapter_signAllTransactions(transactions) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction(...transactions.map((transaction) => ({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n })));\n return transactions.map((transaction, index) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signedTransaction = signedTransactions[index].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(signedTransaction)\n : Transaction.from(signedTransaction));\n });\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signMessage = async function _StandardWalletAdapter_signMessage(message) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignMessage))\n throw new WalletAccountError();\n try {\n const signedMessages = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignMessage].signMessage({\n account,\n message,\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedMessages[0].signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signIn = async function _StandardWalletAdapter_signIn(input = {}) {\n try {\n if (!(SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n let output;\n try {\n [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignIn].signIn(input);\n }\n catch (error) {\n throw new WalletSignInError(error?.message, error);\n }\n if (!output)\n throw new WalletSignInError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, output.account);\n return output;\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n};\n//# sourceMappingURL=adapter.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _AppReadyEvent_detail;\nlet wallets = undefined;\nconst registered = new Set();\nconst listeners = {};\n/**\n * Get an API for {@link Wallets.get | getting}, {@link Wallets.on | listening for}, and\n * {@link Wallets.register | registering} {@link \"@wallet-standard/base\".Wallet | Wallets}.\n *\n * When called for the first time --\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowAppReadyEvent} to notify each Wallet that the app is ready\n * to register it.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to listen for a notification\n * from each Wallet that the Wallet is ready to be registered by the app.\n *\n * This combination of event dispatch and listener guarantees that each Wallet will be registered synchronously as soon\n * as the app is ready whether the app loads before or after each Wallet.\n *\n * @return API for getting, listening for, and registering Wallets.\n *\n * @group App\n */\nexport function getWallets() {\n if (wallets)\n return wallets;\n wallets = Object.freeze({ register, get, on });\n if (typeof window === 'undefined')\n return wallets;\n const api = Object.freeze({ register });\n try {\n window.addEventListener('wallet-standard:register-wallet', ({ detail: callback }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event listener could not be added\\n', error);\n }\n try {\n window.dispatchEvent(new AppReadyEvent(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event could not be dispatched\\n', error);\n }\n return wallets;\n}\nfunction register(...wallets) {\n // Filter out wallets that have already been registered.\n // This prevents the same wallet from being registered twice, but it also prevents wallets from being\n // unregistered by reusing a reference to the wallet to obtain the unregister function for it.\n wallets = wallets.filter((wallet) => !registered.has(wallet));\n // If there are no new wallets to register, just return a no-op unregister function.\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (!wallets.length)\n return () => { };\n wallets.forEach((wallet) => registered.add(wallet));\n listeners['register']?.forEach((listener) => guard(() => listener(...wallets)));\n // Return a function that unregisters the registered wallets.\n return function unregister() {\n wallets.forEach((wallet) => registered.delete(wallet));\n listeners['unregister']?.forEach((listener) => guard(() => listener(...wallets)));\n };\n}\nfunction get() {\n return [...registered];\n}\nfunction on(event, listener) {\n listeners[event]?.push(listener) || (listeners[event] = [listener]);\n // Return a function that removes the event listener.\n return function off() {\n listeners[event] = listeners[event]?.filter((existingListener) => listener !== existingListener);\n };\n}\nfunction guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\nclass AppReadyEvent extends Event {\n constructor(api) {\n super('wallet-standard:app-ready', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _AppReadyEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _AppReadyEvent_detail, api, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _AppReadyEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:app-ready';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_AppReadyEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link getWallets} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_getWallets() {\n if (wallets)\n return wallets;\n wallets = getWallets();\n if (typeof window === 'undefined')\n return wallets;\n const callbacks = window.navigator.wallets || [];\n if (!Array.isArray(callbacks)) {\n console.error('window.navigator.wallets is not an array');\n return wallets;\n }\n const { register } = wallets;\n const push = (...callbacks) => callbacks.forEach((callback) => guard(() => callback({ register })));\n try {\n Object.defineProperty(window.navigator, 'wallets', {\n value: Object.freeze({ push }),\n });\n }\n catch (error) {\n console.error('window.navigator.wallets could not be set');\n return wallets;\n }\n push(...callbacks);\n return wallets;\n}\n//# sourceMappingURL=wallets.js.map","import { isWalletAdapterCompatibleWallet, StandardWalletAdapter } from '@solana/wallet-standard-wallet-adapter-base';\nimport { DEPRECATED_getWallets } from '@wallet-standard/app';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nexport function useStandardWalletAdapters(adapters) {\n const warnings = useConstant(() => new Set());\n const { get, on } = useConstant(() => DEPRECATED_getWallets());\n const [standardAdapters, setStandardAdapters] = useState(() => wrapWalletsWithAdapters(get()));\n useEffect(() => {\n const listeners = [\n on('register', (...wallets) => setStandardAdapters((standardAdapters) => [...standardAdapters, ...wrapWalletsWithAdapters(wallets)])),\n on('unregister', (...wallets) => setStandardAdapters((standardAdapters) => standardAdapters.filter((standardAdapter) => wallets.some((wallet) => wallet === standardAdapter.wallet)))),\n ];\n return () => listeners.forEach((off) => off());\n }, [on]);\n const prevStandardAdapters = usePrevious(standardAdapters);\n useEffect(() => {\n if (!prevStandardAdapters)\n return;\n const currentAdapters = new Set(standardAdapters);\n const removedAdapters = new Set(prevStandardAdapters.filter((previousAdapter) => !currentAdapters.has(previousAdapter)));\n removedAdapters.forEach((adapter) => adapter.destroy());\n }, [prevStandardAdapters, standardAdapters]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => () => standardAdapters.forEach((adapter) => adapter.destroy()), []);\n return useMemo(() => [\n ...standardAdapters,\n ...adapters.filter(({ name }) => {\n if (standardAdapters.some((standardAdapter) => standardAdapter.name === name)) {\n if (!warnings.has(name)) {\n warnings.add(name);\n console.warn(`${name} was registered as a Standard Wallet. The Wallet Adapter for ${name} can be removed from your app.`);\n }\n return false;\n }\n return true;\n }),\n ], [standardAdapters, adapters, warnings]);\n}\nfunction useConstant(fn) {\n const ref = useRef();\n if (!ref.current) {\n ref.current = { value: fn() };\n }\n return ref.current.value;\n}\nfunction usePrevious(state) {\n const ref = useRef();\n useEffect(() => {\n ref.current = state;\n });\n return ref.current;\n}\nfunction wrapWalletsWithAdapters(wallets) {\n return wallets.filter(isWalletAdapterCompatibleWallet).map((wallet) => new StandardWalletAdapter({ wallet }));\n}\n//# sourceMappingURL=useStandardWalletAdapters.js.map","import { SolanaMobileWalletAdapterWalletName } from '@solana-mobile/wallet-adapter-mobile';\nimport { WalletReadyState } from '@solana/wallet-adapter-base';\nexport var Environment;\n(function (Environment) {\n Environment[Environment[\"DESKTOP_WEB\"] = 0] = \"DESKTOP_WEB\";\n Environment[Environment[\"MOBILE_WEB\"] = 1] = \"MOBILE_WEB\";\n})(Environment || (Environment = {}));\nfunction isWebView(userAgentString) {\n return /(WebView|Version\\/.+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)|; wv\\).+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+))/i.test(userAgentString);\n}\nexport default function getEnvironment({ adapters, userAgentString }) {\n if (adapters.some((adapter) => adapter.name !== SolanaMobileWalletAdapterWalletName &&\n adapter.readyState === WalletReadyState.Installed)) {\n /**\n * There are only two ways a browser extension adapter should be able to reach `Installed` status:\n *\n * 1. Its browser extension is installed.\n * 2. The app is running on a mobile wallet's in-app browser.\n *\n * In either case, we consider the environment to be desktop-like.\n */\n return Environment.DESKTOP_WEB;\n }\n if (userAgentString &&\n // Step 1: Check whether we're on a platform that supports MWA at all.\n /android/i.test(userAgentString) &&\n // Step 2: Determine that we are *not* running in a WebView.\n !isWebView(userAgentString)) {\n return Environment.MOBILE_WEB;\n }\n else {\n return Environment.DESKTOP_WEB;\n }\n}\n//# sourceMappingURL=getEnvironment.js.map","export default function getInferredClusterFromEndpoint(endpoint) {\n if (!endpoint) {\n return 'mainnet-beta';\n }\n if (/devnet/i.test(endpoint)) {\n return 'devnet';\n }\n else if (/testnet/i.test(endpoint)) {\n return 'testnet';\n }\n else {\n return 'mainnet-beta';\n }\n}\n//# sourceMappingURL=getInferredClusterFromEndpoint.js.map","import { useEffect, useRef, useState } from 'react';\nexport function useLocalStorage(key, defaultState) {\n const state = useState(() => {\n try {\n const value = localStorage.getItem(key);\n if (value)\n return JSON.parse(value);\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n return defaultState;\n });\n const value = state[0];\n const isFirstRenderRef = useRef(true);\n useEffect(() => {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n return;\n }\n try {\n if (value === null) {\n localStorage.removeItem(key);\n }\n else {\n localStorage.setItem(key, JSON.stringify(value));\n }\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n }, [value, key]);\n return state;\n}\n//# sourceMappingURL=useLocalStorage.js.map","import { WalletError } from '@solana/wallet-adapter-base';\nexport class WalletNotSelectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotSelectedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import { WalletNotConnectedError, WalletNotReadyError, WalletReadyState, } from '@solana/wallet-adapter-base';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { WalletNotSelectedError } from './errors.js';\nimport { WalletContext } from './useWallet.js';\nexport function WalletProviderBase({ children, wallets: adapters, adapter, isUnloadingRef, onAutoConnectRequest, onConnectError, onError, onSelectWallet, }) {\n const isConnectingRef = useRef(false);\n const [connecting, setConnecting] = useState(false);\n const isDisconnectingRef = useRef(false);\n const [disconnecting, setDisconnecting] = useState(false);\n const [publicKey, setPublicKey] = useState(() => adapter?.publicKey ?? null);\n const [connected, setConnected] = useState(() => adapter?.connected ?? false);\n /**\n * Store the error handlers as refs so that a change in the\n * custom error handler does not recompute other dependencies.\n */\n const onErrorRef = useRef(onError);\n useEffect(() => {\n onErrorRef.current = onError;\n return () => {\n onErrorRef.current = undefined;\n };\n }, [onError]);\n const handleErrorRef = useRef((error, adapter) => {\n if (!isUnloadingRef.current) {\n if (onErrorRef.current) {\n onErrorRef.current(error, adapter);\n }\n else {\n console.error(error, adapter);\n if (error instanceof WalletNotReadyError && typeof window !== 'undefined' && adapter) {\n window.open(adapter.url, '_blank');\n }\n }\n }\n return error;\n });\n // Wrap adapters to conform to the `Wallet` interface\n const [wallets, setWallets] = useState(() => adapters\n .map((adapter) => ({\n adapter,\n readyState: adapter.readyState,\n }))\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n // When the adapters change, start to listen for changes to their `readyState`\n useEffect(() => {\n // When the adapters change, wrap them to conform to the `Wallet` interface\n setWallets((wallets) => adapters\n .map((adapter, index) => {\n const wallet = wallets[index];\n // If the wallet hasn't changed, return the same instance\n return wallet && wallet.adapter === adapter && wallet.readyState === adapter.readyState\n ? wallet\n : {\n adapter: adapter,\n readyState: adapter.readyState,\n };\n })\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n function handleReadyStateChange(readyState) {\n setWallets((prevWallets) => {\n const index = prevWallets.findIndex(({ adapter }) => adapter === this);\n if (index === -1)\n return prevWallets;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { adapter } = prevWallets[index];\n return [\n ...prevWallets.slice(0, index),\n { adapter, readyState },\n ...prevWallets.slice(index + 1),\n ].filter(({ readyState }) => readyState !== WalletReadyState.Unsupported);\n });\n }\n adapters.forEach((adapter) => adapter.on('readyStateChange', handleReadyStateChange, adapter));\n return () => {\n adapters.forEach((adapter) => adapter.off('readyStateChange', handleReadyStateChange, adapter));\n };\n }, [adapter, adapters]);\n const wallet = useMemo(() => wallets.find((wallet) => wallet.adapter === adapter) ?? null, [adapter, wallets]);\n // Setup and teardown event listeners when the adapter changes\n useEffect(() => {\n if (!adapter)\n return;\n const handleConnect = (publicKey) => {\n setPublicKey(publicKey);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(true);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleDisconnect = () => {\n if (isUnloadingRef.current)\n return;\n setPublicKey(null);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(false);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleError = (error) => {\n handleErrorRef.current(error, adapter);\n };\n adapter.on('connect', handleConnect);\n adapter.on('disconnect', handleDisconnect);\n adapter.on('error', handleError);\n return () => {\n adapter.off('connect', handleConnect);\n adapter.off('disconnect', handleDisconnect);\n adapter.off('error', handleError);\n handleDisconnect();\n };\n }, [adapter, isUnloadingRef]);\n // When the adapter changes, clear the `autoConnect` tracking flag\n const didAttemptAutoConnectRef = useRef(false);\n useEffect(() => {\n return () => {\n didAttemptAutoConnectRef.current = false;\n };\n }, [adapter]);\n // If auto-connect is enabled, request to connect when the adapter changes and is ready\n useEffect(() => {\n if (didAttemptAutoConnectRef.current ||\n isConnectingRef.current ||\n connected ||\n !onAutoConnectRequest ||\n !(wallet?.readyState === WalletReadyState.Installed || wallet?.readyState === WalletReadyState.Loadable))\n return;\n isConnectingRef.current = true;\n setConnecting(true);\n didAttemptAutoConnectRef.current = true;\n (async function () {\n try {\n await onAutoConnectRequest();\n }\n catch {\n onConnectError();\n // Drop the error. It will be caught by `handleError` anyway.\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n })();\n }, [connected, onAutoConnectRequest, onConnectError, wallet]);\n // Send a transaction using the provided connection\n const sendTransaction = useCallback(async (transaction, connection, options) => {\n if (!adapter)\n throw handleErrorRef.current(new WalletNotSelectedError());\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.sendTransaction(transaction, connection, options);\n }, [adapter, connected]);\n // Sign a transaction if the wallet supports it\n const signTransaction = useMemo(() => adapter && 'signTransaction' in adapter\n ? async (transaction) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signTransaction(transaction);\n }\n : undefined, [adapter, connected]);\n // Sign multiple transactions if the wallet supports it\n const signAllTransactions = useMemo(() => adapter && 'signAllTransactions' in adapter\n ? async (transactions) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signAllTransactions(transactions);\n }\n : undefined, [adapter, connected]);\n // Sign an arbitrary message if the wallet supports it\n const signMessage = useMemo(() => adapter && 'signMessage' in adapter\n ? async (message) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signMessage(message);\n }\n : undefined, [adapter, connected]);\n // Sign in if the wallet supports it\n const signIn = useMemo(() => adapter && 'signIn' in adapter\n ? async (input) => {\n return await adapter.signIn(input);\n }\n : undefined, [adapter]);\n const handleConnect = useCallback(async () => {\n if (isConnectingRef.current || isDisconnectingRef.current || wallet?.adapter.connected)\n return;\n if (!wallet)\n throw handleErrorRef.current(new WalletNotSelectedError());\n const { adapter, readyState } = wallet;\n if (!(readyState === WalletReadyState.Installed || readyState === WalletReadyState.Loadable))\n throw handleErrorRef.current(new WalletNotReadyError(), adapter);\n isConnectingRef.current = true;\n setConnecting(true);\n try {\n await adapter.connect();\n }\n catch (e) {\n onConnectError();\n throw e;\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n }, [onConnectError, wallet]);\n const handleDisconnect = useCallback(async () => {\n if (isDisconnectingRef.current)\n return;\n if (!adapter)\n return;\n isDisconnectingRef.current = true;\n setDisconnecting(true);\n try {\n await adapter.disconnect();\n }\n finally {\n setDisconnecting(false);\n isDisconnectingRef.current = false;\n }\n }, [adapter]);\n return (React.createElement(WalletContext.Provider, { value: {\n autoConnect: !!onAutoConnectRequest,\n wallets,\n wallet,\n publicKey,\n connected,\n connecting,\n disconnecting,\n select: onSelectWallet,\n connect: handleConnect,\n disconnect: handleDisconnect,\n sendTransaction,\n signTransaction,\n signAllTransactions,\n signMessage,\n signIn,\n } }, children));\n}\n//# sourceMappingURL=WalletProviderBase.js.map","import { createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler, SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, } from '@solana-mobile/wallet-adapter-mobile';\nimport { useStandardWalletAdapters } from '@solana/wallet-standard-wallet-adapter-react';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport getEnvironment, { Environment } from './getEnvironment.js';\nimport getInferredClusterFromEndpoint from './getInferredClusterFromEndpoint.js';\nimport { useConnection } from './useConnection.js';\nimport { useLocalStorage } from './useLocalStorage.js';\nimport { WalletProviderBase } from './WalletProviderBase.js';\nlet _userAgent;\nfunction getUserAgent() {\n if (_userAgent === undefined) {\n _userAgent = globalThis.navigator?.userAgent ?? null;\n }\n return _userAgent;\n}\nfunction getIsMobile(adapters) {\n const userAgentString = getUserAgent();\n return getEnvironment({ adapters, userAgentString }) === Environment.MOBILE_WEB;\n}\nfunction getUriForAppIdentity() {\n const location = globalThis.location;\n if (!location)\n return;\n return `${location.protocol}//${location.host}`;\n}\nexport function WalletProvider({ children, wallets: adapters, autoConnect, localStorageKey = 'walletName', onError, }) {\n const { connection } = useConnection();\n const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters);\n const mobileWalletAdapter = useMemo(() => {\n if (!getIsMobile(adaptersWithStandardAdapters)) {\n return null;\n }\n const existingMobileWalletAdapter = adaptersWithStandardAdapters.find((adapter) => adapter.name === SolanaMobileWalletAdapterWalletName);\n if (existingMobileWalletAdapter) {\n return existingMobileWalletAdapter;\n }\n return new SolanaMobileWalletAdapter({\n addressSelector: createDefaultAddressSelector(),\n appIdentity: {\n uri: getUriForAppIdentity(),\n },\n authorizationResultCache: createDefaultAuthorizationResultCache(),\n cluster: getInferredClusterFromEndpoint(connection?.rpcEndpoint),\n onWalletNotFound: createDefaultWalletNotFoundHandler(),\n });\n }, [adaptersWithStandardAdapters, connection?.rpcEndpoint]);\n const adaptersWithMobileWalletAdapter = useMemo(() => {\n if (mobileWalletAdapter == null || adaptersWithStandardAdapters.indexOf(mobileWalletAdapter) !== -1) {\n return adaptersWithStandardAdapters;\n }\n return [mobileWalletAdapter, ...adaptersWithStandardAdapters];\n }, [adaptersWithStandardAdapters, mobileWalletAdapter]);\n const [walletName, setWalletName] = useLocalStorage(localStorageKey, getIsMobile(adaptersWithStandardAdapters) ? SolanaMobileWalletAdapterWalletName : null);\n const adapter = useMemo(() => adaptersWithMobileWalletAdapter.find((a) => a.name === walletName) ?? null, [adaptersWithMobileWalletAdapter, walletName]);\n const changeWallet = useCallback((nextWalletName) => {\n if (walletName === nextWalletName)\n return;\n if (adapter &&\n // Selecting a wallet other than the mobile wallet adapter is not\n // sufficient reason to call `disconnect` on the mobile wallet adapter.\n // Calling `disconnect` on the mobile wallet adapter causes the entire\n // authorization store to be wiped.\n adapter.name !== SolanaMobileWalletAdapterWalletName) {\n adapter.disconnect();\n }\n setWalletName(nextWalletName);\n }, [adapter, setWalletName, walletName]);\n useEffect(() => {\n if (!adapter)\n return;\n function handleDisconnect() {\n if (isUnloadingRef.current)\n return;\n // Leave the adapter selected in the event of a disconnection.\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters))\n return;\n setWalletName(null);\n }\n adapter.on('disconnect', handleDisconnect);\n return () => {\n adapter.off('disconnect', handleDisconnect);\n };\n }, [adapter, adaptersWithStandardAdapters, setWalletName, walletName]);\n const hasUserSelectedAWallet = useRef(false);\n const handleAutoConnectRequest = useMemo(() => {\n if (!autoConnect || !adapter)\n return;\n return async () => {\n // If autoConnect is true or returns true, use the default autoConnect behavior.\n if (autoConnect === true || (await autoConnect(adapter))) {\n if (hasUserSelectedAWallet.current) {\n await adapter.connect();\n }\n else {\n await adapter.autoConnect();\n }\n }\n };\n }, [autoConnect, adapter]);\n const isUnloadingRef = useRef(false);\n useEffect(() => {\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters)) {\n isUnloadingRef.current = false;\n return;\n }\n function handleBeforeUnload() {\n isUnloadingRef.current = true;\n }\n /**\n * Some wallets fire disconnection events when the window unloads. Since there's no way to\n * distinguish between a disconnection event received because a user initiated it, and one\n * that was received because they've closed the window, we have to track window unload\n * events themselves. Downstream components use this information to decide whether to act\n * upon or drop wallet events and errors.\n */\n window.addEventListener('beforeunload', handleBeforeUnload);\n return () => {\n window.removeEventListener('beforeunload', handleBeforeUnload);\n };\n }, [adaptersWithStandardAdapters, walletName]);\n const handleConnectError = useCallback(() => {\n if (adapter && adapter.name !== SolanaMobileWalletAdapterWalletName) {\n // If any error happens while connecting, unset the adapter.\n changeWallet(null);\n }\n }, [adapter, changeWallet]);\n const selectWallet = useCallback((walletName) => {\n hasUserSelectedAWallet.current = true;\n changeWallet(walletName);\n }, [changeWallet]);\n return (React.createElement(WalletProviderBase, { wallets: adaptersWithMobileWalletAdapter, adapter: adapter, isUnloadingRef: isUnloadingRef, onAutoConnectRequest: handleAutoConnectRequest, onConnectError: handleConnectError, onError: onError, onSelectWallet: selectWallet }, children));\n}\n//# sourceMappingURL=WalletProvider.js.map","import { createContext, useContext } from 'react';\nexport const ConnectionContext = createContext({});\nexport function useConnection() {\n return useContext(ConnectionContext);\n}\n//# sourceMappingURL=useConnection.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _RegisterWalletEvent_detail;\n/**\n * Register a {@link \"@wallet-standard/base\".Wallet} as a Standard Wallet with the app.\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to notify the app that the Wallet is\n * ready to be registered.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowAppReadyEvent} to listen for a notification from\n * the app that the app is ready to register the Wallet.\n *\n * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously as soon\n * as the app is ready whether the Wallet loads before or after the app.\n *\n * @param wallet Wallet to register.\n *\n * @group Wallet\n */\nexport function registerWallet(wallet) {\n const callback = ({ register }) => register(wallet);\n try {\n window.dispatchEvent(new RegisterWalletEvent(callback));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event could not be dispatched\\n', error);\n }\n try {\n window.addEventListener('wallet-standard:app-ready', ({ detail: api }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event listener could not be added\\n', error);\n }\n}\nclass RegisterWalletEvent extends Event {\n constructor(callback) {\n super('wallet-standard:register-wallet', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _RegisterWalletEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _RegisterWalletEvent_detail, callback, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _RegisterWalletEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:register-wallet';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_RegisterWalletEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link registerWallet} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_registerWallet(wallet) {\n var _a;\n registerWallet(wallet);\n try {\n ((_a = window.navigator).wallets || (_a.wallets = [])).push(({ register }) => register(wallet));\n }\n catch (error) {\n console.error('window.navigator.wallets could not be pushed\\n', error);\n }\n}\n//# sourceMappingURL=register.js.map","/** @internal */\nexport const icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjIwLjI1IiB4Mj0iMjYuNTcxIiB5MT0iMjcuMTczIiB5Mj0iMTkuODU4Ij48c3RvcCBvZmZzZXQ9Ii4wOCIgc3RvcC1jb2xvcj0iIzk5NDVmZiIvPjxzdG9wIG9mZnNldD0iLjMiIHN0b3AtY29sb3I9IiM4NzUyZjMiLz48c3RvcCBvZmZzZXQ9Ii41IiBzdG9wLWNvbG9yPSIjNTQ5N2Q1Ii8+PHN0b3Agb2Zmc2V0PSIuNiIgc3RvcC1jb2xvcj0iIzQzYjRjYSIvPjxzdG9w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gLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=';\n//# sourceMappingURL=icon.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _SolflareMetaMaskWallet_instances, _SolflareMetaMaskWallet_listeners, _SolflareMetaMaskWallet_version, _SolflareMetaMaskWallet_name, _SolflareMetaMaskWallet_icon, _SolflareMetaMaskWallet_solflareMetaMask, _SolflareMetaMaskWallet_on, _SolflareMetaMaskWallet_emit, _SolflareMetaMaskWallet_off, _SolflareMetaMaskWallet_connect, _SolflareMetaMaskWallet_disconnect, _SolflareMetaMaskWallet_signAndSendTransaction, _SolflareMetaMaskWallet_signTransaction, _SolflareMetaMaskWallet_signMessage;\nimport { WalletNotConnectedError } from '@solana/wallet-adapter-base';\nimport { SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN } from '@solana/wallet-standard-chains';\nimport { SolanaSignAndSendTransaction, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { icon } from './icon.js';\nexport class SolflareMetaMaskWallet {\n constructor() {\n _SolflareMetaMaskWallet_instances.add(this);\n _SolflareMetaMaskWallet_listeners.set(this, {});\n _SolflareMetaMaskWallet_version.set(this, '1.0.0');\n _SolflareMetaMaskWallet_name.set(this, 'MetaMask');\n _SolflareMetaMaskWallet_icon.set(this, icon);\n _SolflareMetaMaskWallet_solflareMetaMask.set(this, null);\n _SolflareMetaMaskWallet_on.set(this, (event, listener) => {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.push(listener) || (__classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = [listener]);\n return () => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_off).call(this, event, listener);\n });\n _SolflareMetaMaskWallet_connect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\")) {\n let SolflareMetaMaskClass;\n try {\n SolflareMetaMaskClass = (await import('@solflare-wallet/metamask-sdk')).default;\n }\n catch (error) {\n throw new Error('Unable to load Solflare MetaMask SDK');\n }\n __classPrivateFieldSet(this, _SolflareMetaMaskWallet_solflareMetaMask, new SolflareMetaMaskClass(), \"f\");\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").on('standard_change', (properties) => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_emit).call(this, 'change', properties));\n }\n if (!this.accounts.length) {\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").connect();\n }\n return { accounts: this.accounts };\n });\n _SolflareMetaMaskWallet_disconnect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n return;\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").disconnect();\n });\n _SolflareMetaMaskWallet_signAndSendTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignAndSendTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signMessage.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignMessage(...inputs);\n });\n }\n get version() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_version, \"f\");\n }\n get name() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_name, \"f\");\n }\n get icon() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_icon, \"f\");\n }\n get chains() {\n return [SOLANA_MAINNET_CHAIN, SOLANA_DEVNET_CHAIN, SOLANA_TESTNET_CHAIN];\n }\n get features() {\n return {\n [StandardConnect]: {\n version: '1.0.0',\n connect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_connect, \"f\"),\n },\n [StandardDisconnect]: {\n version: '1.0.0',\n disconnect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_disconnect, \"f\"),\n },\n [StandardEvents]: {\n version: '1.0.0',\n on: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_on, \"f\"),\n },\n [SolanaSignAndSendTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signAndSendTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signAndSendTransaction, \"f\"),\n },\n [SolanaSignTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signTransaction, \"f\"),\n },\n [SolanaSignMessage]: {\n version: '1.0.0',\n signMessage: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signMessage, \"f\"),\n },\n };\n }\n get accounts() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\") ? __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardAccounts : [];\n }\n}\n_SolflareMetaMaskWallet_listeners = new WeakMap(), _SolflareMetaMaskWallet_version = new WeakMap(), _SolflareMetaMaskWallet_name = new WeakMap(), _SolflareMetaMaskWallet_icon = new WeakMap(), _SolflareMetaMaskWallet_solflareMetaMask = new WeakMap(), _SolflareMetaMaskWallet_on = new WeakMap(), _SolflareMetaMaskWallet_connect = new WeakMap(), _SolflareMetaMaskWallet_disconnect = new WeakMap(), _SolflareMetaMaskWallet_signAndSendTransaction = new WeakMap(), _SolflareMetaMaskWallet_signTransaction = new WeakMap(), _SolflareMetaMaskWallet_signMessage = new WeakMap(), _SolflareMetaMaskWallet_instances = new WeakSet(), _SolflareMetaMaskWallet_emit = function _SolflareMetaMaskWallet_emit(event, ...args) {\n // eslint-disable-next-line prefer-spread\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.forEach((listener) => listener.apply(null, args));\n}, _SolflareMetaMaskWallet_off = function _SolflareMetaMaskWallet_off(event, listener) {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.filter((existingListener) => listener !== existingListener);\n};\n//# sourceMappingURL=wallet.js.map","import { registerWallet } from '@wallet-standard/wallet';\nimport { SolflareMetaMaskWallet } from './wallet.js';\nlet registered = false;\nfunction register() {\n if (registered)\n return;\n registerWallet(new SolflareMetaMaskWallet());\n registered = true;\n}\n/** @internal */\nexport async function detectAndRegisterSolflareMetaMaskWallet() {\n const id = 'solflare-detect-metamask';\n function postMessage() {\n window.postMessage({\n target: 'metamask-contentscript',\n data: {\n name: 'metamask-provider',\n data: {\n id,\n jsonrpc: '2.0',\n method: 'wallet_getSnaps',\n },\n },\n }, window.location.origin);\n }\n function onMessage(event) {\n const message = event.data;\n if (message?.target === 'metamask-inpage' && message.data?.name === 'metamask-provider') {\n if (message.data.data?.id === id) {\n window.removeEventListener('message', onMessage);\n if (!message.data.data.error) {\n register();\n }\n }\n else {\n postMessage();\n }\n }\n }\n window.addEventListener('message', onMessage);\n window.setTimeout(() => window.removeEventListener('message', onMessage), 5000);\n postMessage();\n}\n//# sourceMappingURL=detect.js.map","import { BaseMessageSignerWalletAdapter, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { detectAndRegisterSolflareMetaMaskWallet } from './metamask/detect.js';\nexport const SolflareWalletName = 'Solflare';\nexport class SolflareWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = SolflareWalletName;\n this.url = 'https://solflare.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmMxMGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmYjNmMmUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2LjQ3ODM1IiB4Mj0iMzQuOTEwNyIgeGxpbms6aHJlZj0iI2EiIHkxPSI3LjkyIiB5Mj0iMzMuNjU5MyIvPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDQuOTkyMTg4MzIgMTIuMDYzODc5NjMgLTEyLjE4MTEzNjU1IDUuMDQwNzEwNzQgMjIuNTIwMiAyMC42MTgzKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHI9IjEiIHhsaW5rOmhyZWY9IiNhIi8+PHBhdGggZD0ibTI1LjE3MDggNDcuOTEwNGMuNTI1IDAgLjk1MDcuNDIxLjk1MDcuOTQwM3MtLjQyNTcuOTQwMi0uOTUwNy45NDAyLS45NTA3LS40MjA5LS45NTA3LS45NDAyLjQyNTctLjk0MDMuOTUwNy0uOTQwM3ptLTEuMDMyOC00NC45MTU2NWMuNDY0Ni4wMzgzNi44Mzk4LjM5MDQuOTAyNy44NDY4MW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OTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n if (!newPublicKey)\n return;\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._publicKey = null;\n this._wallet = null;\n this._config = config;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.solflare?.isSolflare || window.SolflareApp) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n detectAndRegisterSolflareMetaMaskWallet();\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.connected;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state on iOS\n // We can't redirect to a universal link without user input\n if (!(this.readyState === WalletReadyState.Loadable && isIosAndRedirectable())) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable && this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n // redirect to the Solflare /browse universal link\n // this will open the current URL in the Solflare in-wallet browser\n if (this.readyState === WalletReadyState.Loadable && isIosAndRedirectable()) {\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://solflare.com/ul/v1/browse/${url}?ref=${ref}`;\n return;\n }\n let SolflareClass;\n try {\n SolflareClass = (await import('@solflare-wallet/sdk')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = new SolflareClass({ network: this._config.network });\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n this._connecting = true;\n if (!wallet.connected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletConnectionError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n return await wallet.signAndSendTransaction(transaction, sendOptions);\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message, 'utf8');\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, WalletAccountError, WalletConfigError, WalletConnectionError, WalletDisconnectionError, WalletError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const TorusWalletName = 'Torus';\nexport class TorusWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor({ params = { showTorusButton: false } } = { params: { showTorusButton: false } }) {\n super();\n this.name = TorusWalletName;\n this.url = 'https://tor.us';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzMiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMyAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTYuNSIgY3k9IjE2IiByPSIxNiIgZmlsbD0iIzAzNjRGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjIxODYgOS40OTIxOUMxMC40NTM5IDkuNDkyMTkgOS44MzM5OCAxMC4xMTIxIDkuODMzOTggMTAuODc2OFYxMi40ODk4QzkuODMzOTggMTMuMjU0NSAxMC40NTM5IDEzLjg3NDQgMTEuMjE4NiAxMy44NzQ0SDEzLjY2ODRWMjIuODk3NkMxMy42Njg0IDIzLjY2MjMgMTQuMjg4MyAyNC4yODIyIDE1LjA1MyAyNC4yODIySDE2LjY2NkMxNy40MzA3IDI0LjI4MjIgMTguMDUwNiAyMy42NjIzIDE4LjA1MDYgMjIuODk3NlYxMi41MDE1QzE4LjA1MDYgMTIuNDk3NiAxOC4wNTA2IDEyLjQ5MzcgMTguMDUwNiAxMi40ODk4VjEwLjg3NjhDMTguMDUwNiAxMC4xMTIxIDE3LjQzMDcgOS40OTIxOSAxNi42NjYgOS40OTIxOUgxNS4wNTNIMTEuMjE4NloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yMS4zMzc2IDEzLjg3NDRDMjIuNTQ3NyAxMy44NzQ0IDIzLjUyODcgMTIuODkzNCAyMy41Mjg3IDExLjY4MzNDMjMuNTI4NyAxMC40NzMyIDIyLjU0NzcgOS40OTIxOSAyMS4zMzc2IDkuNDkyMTlDMjAuMTI3NSA5LjQ5MjE5IDE5LjE0NjUgMTAuNDczMiAxOS4xNDY1IDExLjY4MzNDMTkuMTQ2NSAxMi44OTM0IDIwLjEyNzUgMTMuODc0NCAyMS4zMzc2IDEzLjg3NDRaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';\n this.supportedTransactionVersions = null;\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n this._params = params;\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.isLoggedIn;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable)\n throw new WalletNotReadyError();\n this._connecting = true;\n let TorusClass;\n try {\n TorusClass = (await import('@toruslabs/solana-embed')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = window.torus || new TorusClass();\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n if (!wallet.isInitialized) {\n try {\n await wallet.init(this._params);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n let accounts;\n try {\n accounts = await wallet.login();\n }\n catch (error) {\n throw new WalletAccountError(error?.message, error);\n }\n let publicKey;\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n publicKey = new PublicKey(accounts[0]);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n this._wallet = null;\n this._publicKey = null;\n try {\n if (wallet.isLoggedIn)\n await wallet.cleanUp();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message);\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, scopePollingDetectionStrategy, WalletAccountError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const TrustWalletName = 'Trust';\nexport class TrustWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = TrustWalletName;\n this.url = 'https://trustwallet.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAyIiBoZWlnaHQ9IjQwMiIgdmlld0JveD0iMCAwIDQwMiA0MDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yM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aIi8+CjwvZGVmcz4KPC9zdmc+Cg==';\n this.supportedTransactionVersions = null;\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.trustwallet?.solana?.isTrust) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.isConnected;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.trustwallet.solana;\n if (!wallet.isConnected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","/** Solana Mainnet (beta) cluster, e.g. https://api.mainnet-beta.solana.com */\nexport const SOLANA_MAINNET_CHAIN = 'solana:mainnet';\n/** Solana Devnet cluster, e.g. https://api.devnet.solana.com */\nexport const SOLANA_DEVNET_CHAIN = 'solana:devnet';\n/** Solana Testnet cluster, e.g. https://api.testnet.solana.com */\nexport const SOLANA_TESTNET_CHAIN = 'solana:testnet';\n/** Solana Localnet cluster, e.g. http://localhost:8899 */\nexport const SOLANA_LOCALNET_CHAIN = 'solana:localnet';\n/** Array of all Solana clusters */\nexport const SOLANA_CHAINS = [\n SOLANA_MAINNET_CHAIN,\n SOLANA_DEVNET_CHAIN,\n SOLANA_TESTNET_CHAIN,\n SOLANA_LOCALNET_CHAIN,\n];\n/**\n * Check if a chain corresponds with one of the Solana clusters.\n */\nexport function isSolanaChain(chain) {\n return SOLANA_CHAINS.includes(chain);\n}\n//# sourceMappingURL=index.js.map","/** Name of the feature. */\nexport const SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';\n//# sourceMappingURL=signAndSendTransaction.js.map","/** Name of the feature. */\nexport const SolanaSignMessage = 'solana:signMessage';\n//# sourceMappingURL=signMessage.js.map","/** Name of the feature. */\nexport const SolanaSignTransaction = 'solana:signTransaction';\n//# sourceMappingURL=signTransaction.js.map","/** Name of the feature. */\nexport const StandardConnect = 'standard:connect';\n/**\n * @deprecated Use {@link StandardConnect} instead.\n *\n * @group Deprecated\n */\nexport const Connect = StandardConnect;\n//# sourceMappingURL=connect.js.map","/** Name of the feature. */\nexport const StandardDisconnect = 'standard:disconnect';\n/**\n * @deprecated Use {@link StandardDisconnect} instead.\n *\n * @group Deprecated\n */\nexport const Disconnect = StandardDisconnect;\n//# sourceMappingURL=disconnect.js.map","/** Name of the feature. */\nexport const StandardEvents = 'standard:events';\n/**\n * @deprecated Use {@link StandardEvents} instead.\n *\n * @group Deprecated\n */\nexport const Events = StandardEvents;\n//# sourceMappingURL=events.js.map","import { Buffer } from 'buffer';\nimport { EventEmitter } from 'eventemitter3';\n\n// node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js\nvar WebSocketBrowserImpl = class extends EventEmitter {\n socket;\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n constructor(address, options, protocols) {\n super();\n this.socket = new window.WebSocket(address, protocols);\n this.socket.onopen = () => this.emit(\"open\");\n this.socket.onmessage = (event) => this.emit(\"message\", event.data);\n this.socket.onerror = (error) => this.emit(\"error\", error);\n this.socket.onclose = (event) => {\n this.emit(\"close\", event.code, event.reason);\n };\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n send(data, optionsOrCallback, callback) {\n const cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n close(code, reason) {\n this.socket.close(code, reason);\n }\n addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n};\nfunction WebSocket(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}\n\n// src/lib/utils.ts\nvar DefaultDataPack = class {\n encode(value) {\n return JSON.stringify(value);\n }\n decode(value) {\n return JSON.parse(value);\n }\n};\n\n// src/lib/client.ts\nvar CommonClient = class extends EventEmitter {\n address;\n rpc_id;\n queue;\n options;\n autoconnect;\n ready;\n reconnect;\n reconnect_timer_id;\n reconnect_interval;\n max_reconnects;\n rest_options;\n current_reconnects;\n generate_request_id;\n socket;\n webSocketFactory;\n dataPack;\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n constructor(webSocketFactory, address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5,\n ...rest_options\n } = {}, generate_request_id, dataPack) {\n super();\n this.webSocketFactory = webSocketFactory;\n this.queue = {};\n this.rpc_id = 0;\n this.address = address;\n this.autoconnect = autoconnect;\n this.ready = false;\n this.reconnect = reconnect;\n this.reconnect_timer_id = void 0;\n this.reconnect_interval = reconnect_interval;\n this.max_reconnects = max_reconnects;\n this.rest_options = rest_options;\n this.current_reconnects = 0;\n this.generate_request_id = generate_request_id || (() => ++this.rpc_id);\n if (!dataPack) this.dataPack = new DefaultDataPack();\n else this.dataPack = dataPack;\n if (this.autoconnect)\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n connect() {\n if (this.socket) return;\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n call(method, params, timeout, ws_opts) {\n if (!ws_opts && \"object\" === typeof timeout) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const rpc_id = this.generate_request_id(method, params);\n const message = {\n jsonrpc: \"2.0\",\n method,\n params: params || void 0,\n id: rpc_id\n };\n this.socket.send(this.dataPack.encode(message), ws_opts, (error) => {\n if (error) return reject(error);\n this.queue[rpc_id] = { promise: [resolve, reject] };\n if (timeout) {\n this.queue[rpc_id].timeout = setTimeout(() => {\n delete this.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n async login(params) {\n const resp = await this.call(\"rpc.login\", params);\n if (!resp) throw new Error(\"authentication failed\");\n return resp;\n }\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n async listMethods() {\n return await this.call(\"__listMethods\");\n }\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n notify(method, params) {\n return new Promise((resolve, reject) => {\n if (!this.ready) return reject(new Error(\"socket not ready\"));\n const message = {\n jsonrpc: \"2.0\",\n method,\n params\n };\n this.socket.send(this.dataPack.encode(message), (error) => {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async subscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.on\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\n \"Failed subscribing to an event '\" + event + \"' with: \" + result[event]\n );\n return result;\n }\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async unsubscribe(event) {\n if (typeof event === \"string\") event = [event];\n const result = await this.call(\"rpc.off\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n return result;\n }\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n close(code, data) {\n this.socket.close(code || 1e3, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n _connect(address, options) {\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", () => {\n this.ready = true;\n this.emit(\"open\");\n this.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", ({ data: message }) => {\n if (message instanceof ArrayBuffer)\n message = Buffer.from(message).toString();\n try {\n message = this.dataPack.decode(message);\n } catch (error) {\n return;\n }\n if (message.notification && this.listeners(message.notification).length) {\n if (!Object.keys(message.params).length)\n return this.emit(message.notification);\n const args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);\n else\n for (let i = 0; i < message.params.length; i++)\n args.push(message.params[i]);\n return Promise.resolve().then(() => {\n this.emit.apply(this, args);\n });\n }\n if (!this.queue[message.id]) {\n if (message.method) {\n return Promise.resolve().then(() => {\n this.emit(message.method, message?.params);\n });\n }\n return;\n }\n if (\"error\" in message === \"result\" in message)\n this.queue[message.id].promise[1](\n new Error(\n 'Server response malformed. Response must include either \"result\" or \"error\", but not both.'\n )\n );\n if (this.queue[message.id].timeout)\n clearTimeout(this.queue[message.id].timeout);\n if (message.error) this.queue[message.id].promise[1](message.error);\n else this.queue[message.id].promise[0](message.result);\n delete this.queue[message.id];\n });\n this.socket.addEventListener(\"error\", (error) => this.emit(\"error\", error));\n this.socket.addEventListener(\"close\", ({ code, reason }) => {\n if (this.ready)\n setTimeout(() => this.emit(\"close\", code, reason), 0);\n this.ready = false;\n this.socket = void 0;\n if (code === 1e3) return;\n this.current_reconnects++;\n if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))\n this.reconnect_timer_id = setTimeout(\n () => this._connect(address, options),\n this.reconnect_interval\n );\n });\n }\n};\n\n// src/index.browser.ts\nvar Client = class extends CommonClient {\n constructor(address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5\n } = {}, generate_request_id) {\n super(\n WebSocket,\n address,\n {\n autoconnect,\n reconnect,\n reconnect_interval,\n max_reconnects\n },\n generate_request_id\n );\n }\n};\n\nexport { Client, CommonClient, DefaultDataPack, WebSocket };\n//# sourceMappingURL=out.js.map\n//# sourceMappingURL=index.browser.mjs.map"],"names":["exports","_O","Jq","KB","u8","cv","Ik","A9","n_","gM","buffer_1","__webpack_require__","checkUint8Array","b","Uint8Array","uint8ArrayToBuffer","Buffer","from","buffer","byteOffset","length","Layout","constructor","span","property","Number","isInteger","makeDestinationObject","getSpan","offset","replicate","rv","Object","create","prototype","assign","fromArray","values","nameWithProperty","name","lo","ExternalLayout","isCount","OffsetLayout","layout","UInt","UIntBE","decode","encode","src","readUIntLE","writeUIntLE","readUIntBE","writeUIntBE","divmodInt64","hi32","Math","floor","lo32","roundedInt64","NearUInt64","readUInt32LE","split","writeUInt32LE","NearInt64","readInt32LE","writeInt32LE","Sequence","elementLayout","count","idx","i","push","elo","reduce","v","Structure","fields","decodePrefixes","Array","isArray","acc","fd","undefined","e","fsp","dest","firstOffset","lastOffset","lastWrote","fv","shift","layoutFor","offsetOf","UnionDiscriminator","UnionLayoutDiscriminator","Union","discr","defaultLayout","discriminator","usesPrefixDiscriminator","registry","boundGetSourceVariant","defaultGetSourceVariant","bind","getSourceVariant","configGetSourceVariant","gsv","vlo","getVariant","hasOwnProperty","call","tag","dlo","clo","contentOffset","addVariant","variant","VariantLayout","vb","union","fixBitwiseResult","BitStructure","word","msb","value","_packedSetValue","_packedGetValue","addField","bits","bf","BitField","addBoolean","Boolean","fieldFor","container","totalBits","usedBits","sum","valueMask","start","wordMask","wordValue","Blob","slice","srcBuffer","write","toString","has","prefix","Events","EE","fn","context","once","addListener","emitter","event","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","__proto__","eventNames","events","names","getOwnPropertySymbols","concat","listeners","handlers","l","ee","listenerCount","emit","a1","a2","a3","a4","a5","args","len","arguments","removeListener","apply","j","on","removeAllListeners","off","prefixed","module","basex","__createBinding","o","m","k","k2","defineProperty","enumerable","get","__setModuleDefault","__decorate","decorators","target","key","desc","d","c","r","getOwnPropertyDescriptor","Reflect","decorate","__importStar","mod","__esModule","result","__importDefault","deserializeUnchecked","deserialize","serialize","BinaryReader","BinaryWriter","BorshError","baseDecode","baseEncode","bn_js_1","bs58_1","encoding","textDecoder","TextDecoder","fatal","default","Error","message","fieldPath","originalMessage","addToFieldPath","fieldName","splice","join","buf","alloc","maybeResize","writeU8","writeUInt8","writeU16","writeUInt16LE","writeU32","writeU64","writeBuffer","toArray","writeU128","writeU256","writeU512","subarray","writeString","str","writeFixedArray","array","writeArray","elem","handlingRangeError","propertyKey","propertyDescriptor","originalMethod","RangeError","indexOf","code","readU8","readUInt8","readU16","readUInt16LE","readU32","readU64","readBuffer","readU128","readU256","readU512","readString","readFixedArray","readArray","capitalizeFirstLetter","string","charAt","toUpperCase","serializeField","schema","fieldType","writer","item","kind","type","size","forEach","val","serializeStruct","error","obj","borshSerialize","structSchema","map","field","deserializeField","reader","arr","Map","set","deserializeStruct","classType","borshDeserialize","fieldValue","Writer","Reader","_Buffer","ALPHABET","BASE_MAP","x","xc","charCodeAt","BASE","LEADER","FACTOR","log","iFACTOR","decodeUnsafe","source","psz","zeroes","b256","carry","it3","it4","vch","allocUnsafe","fill","isBuffer","pbegin","pend","b58","it1","it2","repeat","oU","reversed","reverse","hex","BigInt","k$","num","width","padStart","uuid","v4","generateRequest","ClientBrowser","callServer","options","reviver","replacer","generator","version","notificationIdNull","request","method","params","id","callback","self","isBatch","isRaw","hasCallback","err","JSON","stringify","response","_parseResponse","responseText","parse","isError","res","filter","jsonrpc","getRandomValues","rnds8","regex","byteToHex","substr","esm_browser_stringify","toLowerCase","test","TypeError","esm_browser_v4","rnds","random","rng","crypto","msCrypto","inRange","a","min","max","ToDictionary","Stream","tokens","decoderError","opt_code_point","endOfStream","read","prepend","token","unshift","pop","DEFAULT_ENCODING","String","_streaming","_BOMseen","_decoder","_fatal","_ignoreBOM","TextEncoder","_encoder","_options","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","handler","stream","bite","code_point","UTF8Encoder","bytes","temp","input","ArrayBuffer","byteLength","input_stream","code_points","codePointsToString","s","cp","fromCharCode","opt_string","stringToCodePoints","n","u","_0n","_1n","wNAF","constTimeNegate","condition","neg","negate","opts","windows","ceil","W","windowSize","unsafeLadder","elm","p","ZERO","add","double","precomputeWindow","points","base","window","precomputes","f","mask","maxNumber","shiftBy","wbits","offset2","abs","cond1","cond2","wNAFCached","P","precomputesMap","transform","_WINDOW_SIZE","comp","validateBasic","curve","_modular_js__WEBPACK_IMPORTED_MODULE_0__","OP","Fp","_utils_js__WEBPACK_IMPORTED_MODULE_1__","FF","h","Gx","Gy","nBitLength","nByteLength","freeze","kK","ORDER","_2n","_3n","_4n","_5n","_8n","pow2","power","modulo","invert","number","y","q","gcd","isNegativeLE","FIELD_FIELDS","validateField","MASK","BYTES","BITS","_utils_js__WEBPACK_IMPORTED_MODULE_0__","nLength","_nBitLength","Field","bitLen","isLE","redef","sqrtP","FpSqrt","p1div4","root","pow","eql","sqr","c1","n2","mul","nv","sub","ONE","tonelliShanks","Q","S","Z","legendreC","Q1div2","g","t2","ge","dQ","isValid","is0","isOdd","lhs","rhs","FpPow","div","sqrN","addN","subN","mulN","inv","sqrt","invertBatch","FpInvertBatch","nums","tmp","lastMultiplied","inverted","reduceRight","lst","cmov","toBytes","S5","tL","fromBytes","ty","bytesToNumberBE","getFieldBytesLength","fieldOrder","bitLength","getMinHashLength","mapHashToField","fieldLen","minLen","reduced","isBytes","abytes","hexes","_","bytesToHex","hexToNumber","asciis","_0","_9","_A","_F","_a","_f","asciiToBase16","char","hexToBytes","hl","al","ai","hi","n1","bytesToNumberLE","numberToBytesBE","numberToBytesLE","ensureBytes","title","expectedLength","concatBytes","arrays","pad","bitMask","u8n","data","u8fr","createHmacDrbg","hashLen","qByteLen","hmacFn","reset","reseed","seed","gen","out","sl","pred","validatorFns","bigint","function","boolean","stringOrUint8Array","isSafeInteger","object","hash","outputLen","validateObject","validators","optValidators","checkField","isOptional","checkVal","entries","SHA512_Kh","SHA512_Kl","_u64","ZP","SHA512_W_H","Uint32Array","SHA512_W_L","SHA512","_md","VR","Ah","Al","Bh","Bl","Ch","Cl","Dh","Dl","Eh","El","Fh","Fl","Gh","Gl","Hh","Hl","process","view","getUint32","W15h","W15l","s0h","rotrSH","shrSH","s0l","rotrSL","shrSL","W2h","W2l","s1h","rotrBH","s1l","rotrBL","SUMl","add4L","SUMh","add4H","sigma1h","sigma1l","CHIh","CHIl","T1ll","add5L","T1h","add5H","T1l","sigma0h","sigma0l","MAJh","MAJl","All","add3L","add3H","roundClean","destroy","sha512_sha512","utils","hE","VERIFY_DEFAULT","zip215","ED25519_P","ED25519_SQRT_M1","ed25519_0n","ed25519_1n","ed25519_2n","ed25519_8n","uvRatio","v3","modular","wQ","ed25519_pow_2_252_3","_10n","_20n","_40n","_80n","b2","b4","oA","b5","b10","b20","b40","b80","b160","b240","b250","pow_p_5_8","vx2","root1","root2","useRoot1","useRoot2","noRoot","Tu","gN","ed25519","edwards_twistedEdwards","curveDef","CURVE","validateOpts","abstract_curve","K","abstract_utils","randomBytes","adjustScalarBytes","domain","mapToCurve","CURVE_ORDER","prehash","cHash","cofactor","modP","ctx","phflag","inBig","in0MaskRange","assertInRange","assertGE0","pointPrecomputes","isPoint","other","Point","ex","ey","ez","et","toAffine","fromAffine","normalizeZ","toInv","_setWindowSize","delete","assertValidity","X","Y","T","X2","Y2","Z2","Z4","aX2","left","XY","equals","X1","Y1","Z1","X1Z2","X2Z1","Y1Z2","Y2Z1","A","B","C","D","x1y1","E","G","F","H","X3","Y3","T3","T1","T2","subtract","wnaf","multiply","scalar","multiplyUnsafe","I","isSmallOrder","isTorsionFree","iz","z","ax","ay","zz","clearCofactor","fromHex","normed","ql","lastByte","y2","isXOdd","isLastByteOdd","fromPrivateKey","privKey","getExtendedPublicKey","point","toRawBytes","toHex","ci","M","modN_LE","hashed","head","pointBytes","hashDomainToScalar","msgs","eV","getPublicKey","sign","msg","R","verify","sig","publicKey","SB","RkA","ExtendedPoint","randomPrivateKey","precompute","O6","assertRstPoint","RistPoint","invertSqrt","bytes255ToNumberLE","calcElligatorRistrettoMap","r0","SQRT_M1","Ns","Ns_D_is_sq","s_","Nt","s2","W0","W1","W2","W3","ep","ap","hashToCurve","R1","R2","emsg","equalBytes","u1","u2","u1_2","u2_2","Dx","Dy","t","u2sq","invsqrt","D1","D2","zInv","_x","_y","one","two","HMAC","kb","_key","finished","destroyed","_assert","vp","O0","iHash","update","blockLen","digest","oHash","Gg","digestInto","aI","_cloneInto","to","getPrototypeOf","hmac","b2n","h2b","DER","Err","_parseInt","toSig","gk","sBytes","rBytesLeft","hexFromSig","parseInt","shl","rhl","rl","secp256k1P","secp256k1N","secp256k1_1n","secp256k1_2n","divNearest","_6n","_11n","_22n","_23n","_44n","_88n","b3","b6","b9","b11","b22","b44","b88","b176","b220","b223","t1","secp256k1","createCurve","defHash","weierstrass","bits2int","bits2int_modN","lowS","compressedLen","uncompressedLen","modN","invN","U_","ProjectivePoint","normPrivateKeyToScalar","weierstrassEquation","isWithinCurveOrder","weierstrassPoints","validatePointOpts","allowedPrivateKeyLengths","wrapPrivateKey","allowInfinityPoint","endo","beta","splitScalar","_c","_isCompressed","tail","x2","x3","assertGE","lengths","_t","includes","assertPrjPoint","px","py","pz","privateKey","right","hasEvenY","U1","U2","Z3","t0","t3","t4","t5","k1neg","k1","k2neg","k1p","k2p","fake","f1p","f2p","multiplyAndAddUnsafe","isCompressed","_bits","cat","sqrtError","numToNByteStr","slcNum","Signature","recovery","fromCompact","fromDER","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","ir","hasHighS","normalizeS","toDERRawBytes","toDERHex","toCompactRawBytes","toCompactHex","isProbPub","delta","ORDER_MASK","int2octets","defaultSigOpts","defaultVerOpts","getSharedSecret","privateA","publicB","k2sig","prepSig","some","extraEntropy","ent","h1int","seedArgs","kBytes","ik","normS","isBiggerThanHalfOrder","drbg","n$","signature","_sig","derError","sg","is","isValidPrivateKey","PS","Us","b1","POW_2_128","c2","esm_sha256","J","exists","instance","checkFinished","output","__webpack_exports__","bool","Chi","Maj","HashMD","padOffset","pos","GL","_assert_js__WEBPACK_IMPORTED_MODULE_1__","take","dataView","J8","setBigUint64","_32n","_u32_max","wh","wl","setUint32","oview","outLen","state","U32_MASK64","fromBig","le","rotlSH","rotlSL","rotlBH","rotlBL","toBig","_l","rotr32H","_h","rotr32L","low","SHA256_K","SHA256_IV","SHA256_W","SHA256","_md_js__WEBPACK_IMPORTED_MODULE_0__","W15","s0","np","s1","bc","l3","sha256","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_7n","_256n","_0x71n","round","SHA3_IOTA_H","SHA3_IOTA_L","_u64_js__WEBPACK_IMPORTED_MODULE_0__","Vl","rotlH","SD","EP","rotlL","mk","gm","Keccak","suffix","enableXOF","rounds","posOut","_assert_js__WEBPACK_IMPORTED_MODULE_2__","Rx","state32","keccak","iA","l1","keccakP","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","finish","writeInto","bufferOut","xofInto","xof","keccak_224","keccak_256","keccak_384","keccak_512","crypto_crypto","globalThis","u32","createView","DataView","rotr","byteSwap","byteSwap32","utf8ToBytes","Hash","clone","wrapConstructor","hashCons","hashC","bytesLength","WalletReadyState","BaseWalletAdapter","eventemitter3__WEBPACK_IMPORTED_MODULE_0__","connected","autoConnect","connect","prepareTransaction","transaction","connection","_errors_js__WEBPACK_IMPORTED_MODULE_1__","oS","feePayer","recentBlockhash","getLatestBlockhash","commitment","preflightCommitment","minContextSlot","blockhash","scopePollingDetectionStrategy","detect","document","disposers","detectAndDispose","dispose","interval","setInterval","clearInterval","readyState","addEventListener","removeEventListener","isIosAndRedirectable","navigator","userAgent","isIos","isSafari","WalletError","WalletNotReadyError","WalletLoadError","WalletConfigError","WalletConnectionError","WalletDisconnectedError","WalletDisconnectionError","WalletAccountError","WalletPublicKeyError","WalletNotConnectedError","WalletSendTransactionError","WalletSignTransactionError","WalletSignMessageError","WalletSignInError","BaseSignerWalletAdapter","_adapter_js__WEBPACK_IMPORTED_MODULE_0__","mI","sendTransaction","_transaction_js__WEBPACK_IMPORTED_MODULE_1__","supportedTransactionVersions","_errors_js__WEBPACK_IMPORTED_MODULE_2__","IW","rawTransaction","signTransaction","sendRawTransaction","PY","signers","sendOptions","partialSign","signAllTransactions","transactions","signedTransactions","BaseMessageSignerWalletAdapter","BaseSignInMessageSignerWalletAdapter","isVersionedTransaction","WalletAdapterNetwork","Coin98WalletAdapter","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_2__","eC","config","url","icon","_readyState","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_3__","i1","Unsupported","NotDetected","_connecting","_wallet","_publicKey","su","coin98","sol","Installed","connecting","isConnected","account","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_4__","OZ","wallet","cO","_solana_web3_js__WEBPACK_IMPORTED_MODULE_0__","nh","Nx","disconnect","UG","bs58__WEBPACK_IMPORTED_MODULE_1__","addSignature","signatures","index","signMessage","fk","CoinbaseWalletAdapter","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_1__","Set","_disconnected","at","coinbaseSolana","$w","signAndSendTransaction","lj","MathWalletAdapter","sz","_messaged","origin","payload","solana","isMathWallet","getAccount","PhantomWalletAdapter","_accountChanged","newPublicKey","Loadable","phantom","isPhantom","encodeURIComponent","location","href","ref","Collapse","children","expanded","react","useRef","instant","openCollapse","node","current","requestAnimationFrame","style","height","scrollHeight","closeCollapse","offsetHeight","overflow","useLayoutEffect","handleComplete","handleTransitionEnd","propertyName","createElement","className","role","transition","Button","props","disabled","onClick","tabIndex","startIcon","endIcon","WalletIcon","adapter","alt","WalletListItem","handleClick","WalletSVG","viewBox","xmlns","cx","cy","fillOpacity","stroke","strokeOpacity","strokeWidth","clipPath","x1","y1","gradientUnits","stopColor","WalletModal","wallets","select","useWallet","O","setVisible","useWalletModal","setExpanded","useState","fadeIn","setFadeIn","portal","setPortal","listedWallets","collapsedWallets","useMemo","installed","notInstalled","hideModal","useCallback","setTimeout","handleClose","preventDefault","handleWalletClick","walletName","handleCollapseClick","handleTabKey","focusableElements","querySelectorAll","firstElement","lastElement","shiftKey","activeElement","focus","handleKeyDown","getComputedStyle","body","querySelector","react_dom","createPortal","Fragment","onMouseDown","WalletModalProvider","visible","Provider","ConnectionProvider","endpoint","react__WEBPACK_IMPORTED_MODULE_1__","ew","_useConnection_js__WEBPACK_IMPORTED_MODULE_2__","_utf8Decoder","_userAgent","Environment","_StandardWalletAdapter_instances","_StandardWalletAdapter_account","_StandardWalletAdapter_publicKey","_StandardWalletAdapter_connecting","_StandardWalletAdapter_disconnecting","_StandardWalletAdapter_off","_StandardWalletAdapter_supportedTransactionVersions","_StandardWalletAdapter_wallet","_StandardWalletAdapter_readyState","_StandardWalletAdapter_connect","_StandardWalletAdapter_connected","_StandardWalletAdapter_disconnected","_StandardWalletAdapter_reset","_StandardWalletAdapter_changed","_StandardWalletAdapter_signTransaction","_StandardWalletAdapter_signAllTransactions","_StandardWalletAdapter_signMessage","_StandardWalletAdapter_signIn","_AppReadyEvent_detail","FIELDS","SolanaMobileWalletAdapterErrorCode","ERROR_ASSOCIATION_PORT_OUT_OF_RANGE","ERROR_FORBIDDEN_WALLET_BASE_URL","ERROR_SECURE_CONTEXT_REQUIRED","ERROR_SESSION_CLOSED","ERROR_SESSION_TIMEOUT","ERROR_WALLET_NOT_FOUND","ERROR_INVALID_PROTOCOL_VERSION","SolanaMobileWalletAdapterError","SolanaMobileWalletAdapterProtocolError","jsonRpcMessageId","__awaiter","thisArg","_arguments","Promise","resolve","reject","fulfilled","step","next","rejected","done","adopt","then","SolanaCloneAuthorization","decryptMessage","sharedSecret","sequenceNumberVector","initializationVector","SEQUENCE_NUMBER_BYTES","ciphertext","plaintextBuffer","subtle","decrypt","getAlgorithmParams","getUtf8Decoder","sequenceNumber","additionalData","iv","tagLength","assertAssociationPort","port","getPathParts","pathString","replace","Browser","Firefox","Other","_frame","getSequenceNumberFromByteArray","byteArray","__rest","propertyIsEnumerable","esm_awaiter","fromUint8Array","btoa","toUint8Array","base64EncodedByteArray","atob","getPayloadFromTransaction","requireAllSignatures","verifySignatures","getTransactionFromWireMessage","messageOffset","numSignatures","index_browser_esm","eT","EC","deserializeMessageVersion","YW","GS","lib_esm_awaiter","esm_toUint8Array","SolanaMobileWalletAdapterWalletName","SolanaMobileWalletAdapter","signer","qz","_connectionGeneration","getIsSupported","isSecureContext","esm_adapter","_authorizationResultCache","authorizationResultCache","_addressSelector","addressSelector","_appIdentity","appIdentity","_chain","chain","cluster","_onWalletNotFound","onWalletNotFound","authorizationResult","declareWalletAsInstalled","_selectedAddress","getPublicKeyFromAddress","address","publicKeyByteArray","errors","_authorizationResult","runWithGuard","autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cachedAuthorizationResult","handleAuthorizationResult","performAuthorization","signInPayload","transact","authorize","identity","sign_in_payload","all","didPublicKeysChange","accounts","ii","nextSelectedAddress","performReauthorization","authToken","auth_token","clear","walletUriBase","wallet_uri_base","currentConnectionGeneration","esm_transact","connectionStartTime","assertSecureContext","associationKeypair","generateAssociationKeypair","generateKey","namedCurve","sessionPort","startSession","associationPublicKey","associationURLBase","randomAssociationPort","associationUrl","getAssociateAndroidIntentURL","putativePort","protocolVersions","associationPort","encodedKey","arrayBufferToBase64String","binary","exportKey","getIntentURL","methodPathname","intentUrlBase","baseUrl","URL","protocol","startsWith","pathname","searchParams","unsafeBase64EncodedString","display","appendChild","contentWindow","detectionPromise","cleanup","clearTimeout","timeoutId","handleBlur","baseUri","websocketURL","getNextRetryDelayMs","schedule","nextJsonRpcMessageId","lastKnownInboundSequenceNumber","__type","socket","disposeSocket","retryWaitTimeoutId","jsonRpcResponsePromises","handleOpen","console","warn","ecdhKeypair","generateECDHKeypair","send","createHelloReq","ecdhPublicKey","associationKeypairPrivateKey","publicKeyBuffer","signatureBuffer","ecdhPrivateKey","wasClean","reason","closeEvent","handleError","Date","now","retryDelayMs","attemptSocketConnection","handleMessage","responseBuffer","arrayBuffer","jsonRpcMessage","decryptJsonRpcMessage","responsePromise","protocolVersion","protocolRequestHandler","parseHelloRsp","payloadBuffer","associationPublicKeyBuffer","walletPublicKey","importKey","deriveBits","public","ecdhSecretKey","deriveKey","salt","info","sessionPropertiesBuffer","sessionProperties","parseSessionProps","jsonProperties","protocol_version","encryptJsonRpcMessage","plaintext","encryptMessage","createSequenceNumberVector","encrypt","assertSecureEndpointSpecificURI","Proxy","inputParams","handleMobileWalletRequest","methodName","methodParams","letter","sign_in_result","signInFallback","host","siwsMessage","createSignInMessageText","statement","uri","chainId","nonce","issuedAt","expirationTime","notBefore","requestId","resources","resource","signMessageResult","addresses","payloads","signed_message","signed_payloads","handleMobileWalletResponse","features","capabilities","supports_clone_authorization","supports_sign_and_send_transactions","deleteProperty","close","WebSocket","skipPreflight","maxRetries","waitForCommitmentToSendNextTransaction","rest","min_context_slot","skip_preflight","max_retries","wait_for_commitment_to_send_next_transaction","base64EncodedSignatures","signAndSendTransactions","element","bs58","base64EncodedPayloads","base64EncodedSignedMessages","signMessages","base64EncodedCompiledTransactions","signTransactions","compiledTransactions","assertIsAuthorized","selectedAddress","performSignTransactions","getTargetCommitment","targetCommitment","targetPreflightCommitment","preflightCommitmentScore","targetCommitmentScore","_1","_2","getCapabilities","signedTransaction","serializedTransaction","signedMessage","signIn","_b","signedInAddress","find","CACHE_KEY","defaultWalletNotFoundHandler","mobileWalletAdapter","isWalletAdapterCompatibleWallet","V","SolanaSignIn","getCommitment","_ReadonlyWalletAccount_address","WeakMap","adapter_classPrivateFieldSet","receiver","adapter_classPrivateFieldGet","StandardWalletAdapter","properties","standard","silent","feature","p6","rpcEndpoint","esm","BR","gv","chains","esm_transaction","WeakSet","util_arraysEqual","signedMessages","bD","wallets_classPrivateFieldSet","wallets_classPrivateFieldGet","registered","register","wallets_guard","existingListener","AppReadyEvent","Event","api","bubbles","cancelable","composed","detail","stopImmediatePropagation","stopPropagation","useConstant","wrapWalletsWithAdapters","WalletNotSelectedError","WalletProviderBase","adapters","isUnloadingRef","onAutoConnectRequest","onConnectError","onError","onSelectWallet","isConnectingRef","setConnecting","isDisconnectingRef","disconnecting","setDisconnecting","setPublicKey","setConnected","onErrorRef","useEffect","handleErrorRef","open","setWallets","handleReadyStateChange","prevWallets","findIndex","handleConnect","handleDisconnect","didAttemptAutoConnectRef","getIsMobile","getEnvironment","userAgentString","DESKTOP_WEB","MOBILE_WEB","WalletProvider","localStorageKey","useConnection","adaptersWithStandardAdapters","useStandardWalletAdapters","warnings","DEPRECATED_getWallets","getWallets","dispatchEvent","callbacks","standardAdapters","setStandardAdapters","standardAdapter","prevStandardAdapters","usePrevious","currentAdapters","removedAdapters","previousAdapter","existingMobileWalletAdapter","getUriForAppIdentity","createDefaultAuthorizationResultCache","storage","localStorage","removeItem","getItem","setItem","adaptersWithMobileWalletAdapter","setWalletName","useLocalStorage","defaultState","isFirstRenderRef","changeWallet","nextWalletName","hasUserSelectedAWallet","handleAutoConnectRequest","handleBeforeUnload","handleConnectError","selectWallet","ConnectionContext","react__WEBPACK_IMPORTED_MODULE_0__","createContext","useContext","_RegisterWalletEvent_detail","_SolflareMetaMaskWallet_instances","_SolflareMetaMaskWallet_listeners","_SolflareMetaMaskWallet_version","_SolflareMetaMaskWallet_name","_SolflareMetaMaskWallet_icon","_SolflareMetaMaskWallet_solflareMetaMask","_SolflareMetaMaskWallet_on","_SolflareMetaMaskWallet_emit","_SolflareMetaMaskWallet_off","_SolflareMetaMaskWallet_connect","_SolflareMetaMaskWallet_disconnect","_SolflareMetaMaskWallet_signAndSendTransaction","_SolflareMetaMaskWallet_signTransaction","_SolflareMetaMaskWallet_signMessage","__classPrivateFieldSet","__classPrivateFieldGet","RegisterWalletEvent","wallet_classPrivateFieldGet","wallet_classPrivateFieldSet","SolflareMetaMaskWallet","SolflareMetaMaskClass","inputs","standardSignAndSendTransaction","standardSignTransaction","standardSignMessage","standardAccounts","detectAndRegisterSolflareMetaMaskWallet","postMessage","onMessage","registerWallet","SolflareWalletAdapter","_config","solflare","isSolflare","SolflareApp","SolflareClass","W8","network","TorusWalletAdapter","showTorusButton","_params","isLoggedIn","TorusClass","torus","isInitialized","init","login","cleanUp","TrustWalletAdapter","trustwallet","isTrust","SOLANA_MAINNET_CHAIN","SOLANA_DEVNET_CHAIN","SOLANA_TESTNET_CHAIN","SOLANA_LOCALNET_CHAIN","SolanaSignAndSendTransaction","SolanaSignMessage","SolanaSignTransaction","StandardConnect","StandardDisconnect","StandardEvents","WebSocketBrowserImpl","eventemitter3__WEBPACK_IMPORTED_MODULE_1__","protocols","onopen","onmessage","onerror","onclose","optionsOrCallback","cb","DefaultDataPack","CommonClient","rpc_id","queue","autoconnect","ready","reconnect","reconnect_timer_id","reconnect_interval","max_reconnects","rest_options","current_reconnects","generate_request_id","webSocketFactory","dataPack","_connect","timeout","ws_opts","promise","resp","listMethods","notify","subscribe","unsubscribe","setAutoReconnect","setReconnectInterval","setMaxReconnects","buffer__WEBPACK_IMPORTED_MODULE_0__","notification","keys"],"sourceRoot":""}